what-the-bank/sources/o/KDZ.java

262 lines
10 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import com.huawei.hms.android.SystemUtils;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.text.DecimalFormat;
/* loaded from: classes.dex */
public final class KDZ extends C0743NnU<YnT> {
public KDZ(YnT ynT) {
super(ynT);
}
@Override // o.C0743NnU
public final String d(int i) {
if (i == 8) {
Integer j = ((YnT) this.a).j(8);
if (j == null) {
return null;
}
return String.format("%d.%d.%d", Integer.valueOf(j.intValue() >> 24), Integer.valueOf((j.intValue() & 15728640) >> 20), Integer.valueOf((j.intValue() & 983040) >> 16));
}
if (i == 12) {
return j();
}
if (i == 40) {
return e();
}
if (i == 64) {
return a(64, "Perceptual", "Media-Relative Colorimetric", "Saturation", "ICC-Absolute Colorimetric");
}
if (i > 538976288 && i < 2054847098) {
return j(i);
}
return super.d(i);
}
private String j(int i) {
String str;
String str2;
try {
byte[] b = ((YnT) this.a).b(i);
if (b == null) {
return ((YnT) this.a).o(i);
}
C0925RrQ c0925RrQ = new C0925RrQ(b);
int g = c0925RrQ.g(0);
int i2 = 7;
int i3 = 12;
switch (g) {
case 1482250784:
StringBuilder sb = new StringBuilder();
DecimalFormat decimalFormat = new DecimalFormat("0.####");
int length = (b.length - 8) / 12;
for (int i4 = 0; i4 < length; i4++) {
int i5 = i4 * 12;
float h = c0925RrQ.h(i5 + 8);
float h2 = c0925RrQ.h(i5 + 12);
float h3 = c0925RrQ.h(i5 + 16);
if (i4 > 0) {
sb.append(", ");
}
sb.append("(");
sb.append(decimalFormat.format(h));
sb.append(", ");
sb.append(decimalFormat.format(h2));
sb.append(", ");
sb.append(decimalFormat.format(h3));
sb.append(")");
}
return sb.toString();
case 1668641398:
int g2 = c0925RrQ.g(8);
StringBuilder sb2 = new StringBuilder();
int i6 = 0;
while (i6 < g2) {
if (i6 != 0) {
sb2.append(", ");
}
double l = c0925RrQ.l((i6 << 1) + i3) / 65535.0d;
long abs = Math.abs((long) l);
StringBuilder sb3 = sb2;
long round = (int) Math.round((Math.abs(l) - abs) * Math.pow(10.0d, 7.0d));
String str3 = "";
long j = round;
int i7 = i2;
String str4 = "";
while (i7 > 0) {
double d = l;
byte abs2 = (byte) Math.abs(j % 10);
j /= 10;
if (str4.length() > 0 || abs2 != 0 || i7 == 1) {
StringBuilder sb4 = new StringBuilder();
sb4.append((int) abs2);
sb4.append(str4);
str4 = sb4.toString();
}
i7--;
l = d;
}
String str5 = str4;
long j2 = abs + j;
boolean z = l < 0.0d && !(j2 == 0 && round == 0);
StringBuilder sb5 = new StringBuilder();
if (z) {
str3 = "-";
}
sb5.append(str3);
sb5.append(j2);
sb5.append(".");
sb5.append(str5);
sb3.append(sb5.toString());
i6++;
sb2 = sb3;
i2 = 7;
i3 = 12;
}
return sb2.toString();
case 1684370275:
return new String(b, 12, c0925RrQ.g(8) - 1);
case 1835360627:
int g3 = c0925RrQ.g(8);
float h4 = c0925RrQ.h(12);
float h5 = c0925RrQ.h(16);
float h6 = c0925RrQ.h(20);
int g4 = c0925RrQ.g(24);
float h7 = c0925RrQ.h(28);
int g5 = c0925RrQ.g(32);
String format = g3 != 0 ? g3 != 1 ? g3 != 2 ? String.format("Unknown %d", Integer.valueOf(g3)) : "1964 10°" : "1931 2°" : "Unknown";
String format2 = g4 != 0 ? g4 != 1 ? g4 != 2 ? String.format("Unknown %d", Integer.valueOf(g3)) : "0/d or d/0" : "0/45 or 45/0" : "Unknown";
switch (g5) {
case 0:
str = SystemUtils.UNKNOWN;
break;
case 1:
str = "D50";
break;
case 2:
str = "D65";
break;
case 3:
str = "D93";
break;
case 4:
str = "F2";
break;
case 5:
str = "D55";
break;
case 6:
str = "A";
break;
case 7:
str = "Equi-Power (E)";
break;
case 8:
str = "F8";
break;
default:
Object[] objArr = new Object[1];
objArr[0] = Integer.valueOf(g5);
str = String.format("Unknown %d", objArr);
break;
}
DecimalFormat decimalFormat2 = new DecimalFormat("0.###");
return String.format("%s Observer, Backing (%s, %s, %s), Geometry %s, Flare %d%%, Illuminant %s", format, decimalFormat2.format(h4), decimalFormat2.format(h5), decimalFormat2.format(h6), format2, Integer.valueOf(Math.round(h7 * 100.0f)), str);
case 1835824483:
int g6 = c0925RrQ.g(8);
StringBuilder sb6 = new StringBuilder();
sb6.append(g6);
for (int i8 = 0; i8 < g6; i8++) {
int i9 = i8 * 12;
String b2 = GXv.b(c0925RrQ.g(i9 + 16));
int g7 = c0925RrQ.g(i9 + 20);
int g8 = c0925RrQ.g(i9 + 24);
try {
str2 = new String(b, g8, g7, "UTF-16BE");
} catch (UnsupportedEncodingException unused) {
str2 = new String(b, g8, g7);
}
sb6.append(" ");
sb6.append(b2);
sb6.append("(");
sb6.append(str2);
sb6.append(")");
}
return sb6.toString();
case 1936287520:
return GXv.b(c0925RrQ.g(8));
case 1952807028:
try {
return new String(b, 8, b.length - 9, "ASCII");
} catch (UnsupportedEncodingException unused2) {
return new String(b, 8, b.length - 9);
}
default:
Object[] objArr2 = new Object[3];
objArr2[0] = GXv.b(g);
objArr2[1] = Integer.valueOf(g);
objArr2[2] = Integer.valueOf(b.length);
return String.format("%s (0x%08X): %d bytes", objArr2);
}
} catch (IOException unused3) {
return null;
}
}
private String e() {
String o2 = ((YnT) this.a).o(40);
if (o2 == null) {
return null;
}
try {
switch (new C0925RrQ(o2.getBytes()).g(0)) {
case 1095782476:
return "Apple Computer, Inc.";
case 1297303124:
return "Microsoft Corporation";
case 1397180704:
return "Silicon Graphics, Inc.";
case 1398099543:
return "Sun Microsystems, Inc.";
case 1413959252:
return "Taligent, Inc.";
default:
return String.format("Unknown (%s)", o2);
}
} catch (IOException unused) {
return o2;
}
}
private String j() {
String o2 = ((YnT) this.a).o(12);
if (o2 == null) {
return null;
}
try {
switch (new C0925RrQ(o2.getBytes()).g(0)) {
case 1633842036:
return "Abstract";
case 1818848875:
return "DeviceLink";
case 1835955314:
return "Display Device";
case 1852662636:
return "Named Color";
case 1886549106:
return "Output Device";
case 1935896178:
return "Input Device";
case 1936744803:
return "ColorSpace Conversion";
default:
return String.format("Unknown (%s)", o2);
}
} catch (IOException unused) {
return o2;
}
}
}