// File: /workspace/github_c_makefile_star2_O1/truenas[P]binaries/src/ixnvdimm.c
// Function: health
static void
health(int fd, struct ixnvdimm_info *info)
{
	int val;
	char buf[32];

	printf("Module:\n");
	printf("vendor: %04x device: %04x revision: %02x\n",
	    info->VendorId, info->DeviceId, info->RevisionId);
	printf("subvendor: %04x subdevice: %04x subrevision: %02x\n",
	    info->SubsystemVendorId, info->SubsystemDeviceId,
	    info->SubsystemRevisionId);
	printf("serial: %08X\n", be32toh(info->SerialNumber));

	printf("\nFirmware:\n");
	printf("slot0: %04x sub: %02x es: %04x\n", i2c_read16(fd, 0, 0x07),
	    i2c_read(fd, 0, 0x0b), i2c_read16(fd, 1, 0x08));
	printf("slot1: %04x sub: %02x es: %04x\n", i2c_read16(fd, 0, 0x09),
	    i2c_read(fd, 0, 0x0c), i2c_read16(fd, 1, 0x0a));
	val = i2c_read(fd, 0x03, FW_SLOT_INFO);
	printf("selected: %u running: %u\n", val & 0x0f, val >> 4);

	bzero(&buf, sizeof(buf));
	if (calldsm(fd, 10, NULL, 0, buf, sizeof(buf)) >= 5) {
		val = buf[4];
		printf("\nCritical Health Info: 0x%02x <%s%s%s%s%s%s>\n",
		    val,
		    val & 0x01 ? "PERSISTENCY_LOST_ERROR,":"",
		    val & 0x02 ? "WARNING_THRESHOLD_EXCEEDED,":"",
		    val & 0x04 ? "PERSISTENCY_RESTORED,":"",
		    val & 0x08 ? "BELOW_WARNING_THRESHOLD,":"",
		    val & 0x10 ? "PERMANENT_HARDWARE_FAILURE,":"",
		    val & 0x20 ? "EVENT_N_LOW":"");
	}

	bzero(&buf, sizeof(buf));
	if (calldsm(fd, 11, NULL, 0, buf, sizeof(buf)) >= 13) {
		val = le16dec(&buf[4]);
		printf("\nModule Health: 0x%04x <%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s>\n",
		    val,
		    val & 0x0001 ? "VOLTAGE_REGULATOR_FAILED,":"",
		    val & 0x0002 ? "VDD_LOST,":"",
		    val & 0x0004 ? "VPP_LOST,":"",
		    val & 0x0008 ? "VTT_LOST,":"",
		    val & 0x0010 ? "DRAM_NOT_SELF_REFRESH,":"",
		    val & 0x0020 ? "CONTROLLER_HARDWARE_ERROR,":"",
		    val & 0x0040 ? "NVM_CONTROLLER_ERROR,":"",
		    val & 0x0080 ? "NVM_LIFETIME_ERROR,":"",
		    val & 0x0100 ? "NOT_ENOUGH_ENERGY_FOR_CSAVE,":"",
		    val & 0x0200 ? "INVALID_FIRMWARE_ERROR,":"",
		    val & 0x0400 ? "CONFIG_DATA_ERROR,":"",
		    val & 0x0800 ? "NO_ES_PRESENT,":"",
		    val & 0x1000 ? "ES_POLICY_NOT_SET,":"",
		    val & 0x2000 ? "ES_HARDWARE_FAILURE,":"",
		    val & 0x4000 ? "ES_HEALTH_ASSESSMENT_ERROR,":"");
		val = le16dec(&buf[6]);
		printf("Module Current Temperature: %d C\n", val);
		val = buf[8];
		printf("Error Threshold Status: 0x%02x <%s%s%s>\n",
		    val,
		    val & 0x01 ? "NVM_LIFETIME_ERROR,":"",
		    val & 0x02 ? "ES_LIFETIME_ERROR,":"",
		    val & 0x04 ? "ES_TEMP_ERROR,":"");
		val = buf[9];
		printf("Warning Threshold Status: 0x%02x <%s%s%s>\n",
		    val,
		    val & 0x01 ? "NVM_LIFETIME_WARNING,":"",
		    val & 0x01 ? "ES_LIFETIME_WARNING,":"",
		    val & 0x01 ? "ES_TEMP_WARNING,":"");
		printf("NVM Lifetime: %d%%\n",  buf[10]);
		printf("Count of DRAM Uncorrectable ECC Errors: %d\n", buf[11]);
		printf("Count of DRAM Correctable ECC Error Above Threshold Events: %d\n",
		    buf[12]);
		val = i2c_read(fd, 0, 0x64);
		printf("Last Catastrophic Save: 0x%02x <%s%s%s%s%s>\n", val,
		    val & 0x01 ? "SUCCESS,":"",
		    val & 0x02 ? "ERROR,":"",
		    val & 0x04 ? "REJECT,":"",
		    val & 0x10 ? "ABORT_SUCCESS,":"",
		    val & 0x20 ? "ABORT_ERROR":"");
		val = i2c_read(fd, 0, 0x80);
		printf("Last Catastrophic Save Info: 0x%02x <%s%s%s%s>\n", val,
		    val & 0x01 ? "NVM_Data_Valid,":"",
		    val & 0x02 ? "START_CSAVE,":"",
		    val & 0x04 ? "SAVE_n,":"",
		    val & 0x08 ? "RESET_n":"");
		val = i2c_read16(fd, 0, 0x84);
		printf("Last Catastrophic Save Fail Info: 0x%04x <%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s>\n",
		    val,
		    val & 0x0001 ? "VOLTAGE_REGULATOR_FAILED,":"",
		    val & 0x0002 ? "VDD_LOST,":"",
		    val & 0x0004 ? "VPP_LOST,":"",
		    val & 0x0008 ? "VTT_LOST,":"",
		    val & 0x0010 ? "DRAM_NOT_SELF_REFRESH,":"",
		    val & 0x0020 ? "CONTROLLER_HARDWARE_ERROR,":"",
		    val & 0x0040 ? "NVM_CONTROLLER_ERROR,":"",
		    val & 0x0080 ? "NVM_MEDIA_ERROR,":"",
		    val & 0x0100 ? "NOT_ENOUGH_ENERGY_FOR_CSAVE,":"",
		    val & 0x0200 ? "PARTIAL_DATA_SAVED,":"",
		    val & 0x0400 ? "SAVE_ABORT,":"",
		    val & 0x0800 ? "NO_SAVE_N,":"",
		    val & 0x1000 ? "INSUFFICIENT_SAVE_N,":"",
		    val & 0x2000 ? "NO_RESET_N,":"",
		    val & 0x4000 ? "SECURITY_ERROR":"");
		val = i2c_read(fd, 0, 0x66);
		printf("Last Restore: 0x%02x <%s%s%s%s>\n", val,
		    val & 0x01 ? "SUCCESS,":"",
		    val & 0x02 ? "ERROR,":"",
		    val & 0x10 ? "ABORT_SUCCESS,":"",
		    val & 0x20 ? "ABORT_ERROR":"");
		val = i2c_read(fd, 0, 0x88);
		printf("Last Restore Fail Info: 0x%02x <%s%s%s%s%s%s>\n", val,
		    val & 0x01 ? "INVALID_IMAGE,":"",
		    val & 0x02 ? "SECURITY_ERROR,":"",
		    val & 0x10 ? "DRAM_NOT_SELF_REFRESH,":"",
		    val & 0x20 ? "CONTROLLER_HARDWARE_ERROR,":"",
		    val & 0x40 ? "NVM_CONTROLLER_ERROR,":"",
		    val & 0x80 ? "NVM_MEDIA_ERROR":"");
		val = i2c_read(fd, 0, 0x68);
		printf("Last Erase: 0x%02x <%s%s%s%s>\n", val,
		    val & 0x01 ? "SUCCESS,":"",
		    val & 0x02 ? "ERROR,":"",
		    val & 0x10 ? "ABORT_SUCCESS,":"",
		    val & 0x20 ? "ABORT_ERROR":"");
		val = i2c_read(fd, 0, 0x6a);
		printf("Last Arm: 0x%02x <%s%s%s%s%s%s>\n", val,
		    val & 0x01 ? "SUCCESS,":"",
		    val & 0x02 ? "ERROR,":"",
		    val & 0x04 ? "SAVE_N_ARMED,":"",
		    val & 0x08 ? "RESET_N_ARMED,":"",
		    val & 0x10 ? "ABORT_SUCCESS,":"",
		    val & 0x20 ? "ABORT_ERROR":"");
	}

	bzero(&buf, sizeof(buf));
	if (calldsm(fd, 12, NULL, 0, buf, sizeof(buf)) >= 11) {
		printf("\nES Lifetime Percentage: %d%%\n", buf[4]);
		val = le16dec(&buf[5]);
		/* Workaround wrong units reported by Micron NVDIMMs. */
		if ((val & 0x1000) != 0)
			val = - (val & 0x0fff) / 16;
		else if (val >= 128)
			val = (val & 0x0fff) / 16;
		printf("ES Current Temperature: %d C\n", val);
		printf("Total Runtime: %d\n", le32dec(&buf[7]));
	}

	bzero(&buf, sizeof(buf));
	if (calldsm(fd, 13, NULL, 0, buf, sizeof(buf)) >= 11) {
		val = le16dec(&buf[4]);
		printf("\nDuration of Last Save Operation: %d%s\n",
		    val & 0x7fff, val & 0x8000 ? "s" : "ms");
		val = le16dec(&buf[8]);
		printf("Duration of Last Restore Operation: %d%s\n",
		    val & 0x7fff, val & 0x8000 ? "s" : "ms");
		val = le16dec(&buf[12]);
		printf("Duration of Last Erase Operation: %d%s\n",
		    val & 0x7fff, val & 0x8000 ? "s" : "ms");
		printf("Number of Save Operations Completed: %d\n",
		    le16dec(&buf[16]));
		printf("Number of Restore Operations Completed: %d\n",
		    le16dec(&buf[20]));
		printf("Number of Erase Operations Completed: %d\n",
		    le16dec(&buf[24]));
		printf("Number of Module Power Cycles: %d\n",
		    le16dec(&buf[28]));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movl %edi, %r15d
leaq 0x2f82(%rip), %rdi      # 0x6bab
callq 0x2070
movzwl (%r14), %esi
movzwl 0x2(%r14), %edx
movzwl 0x4(%r14), %ecx
leaq 0x2639(%rip), %rdi      # 0x627c
xorl %eax, %eax
callq 0x20a0
movzwl 0x6(%r14), %esi
movzwl 0x8(%r14), %edx
movzwl 0xa(%r14), %ecx
leaq 0x2646(%rip), %rdi      # 0x62a6
xorl %eax, %eax
callq 0x20a0
movl 0xc(%r14), %esi
bswapl %esi
leaq 0x2665(%rip), %rdi      # 0x62d9
xorl %eax, %eax
callq 0x20a0
leaq 0x2f31(%rip), %rdi      # 0x6bb3
callq 0x2070
movl %r15d, %edi
xorl %esi, %esi
movl $0x7, %edx
callq 0x2b2d
movzbl %al, %ebx
movl %r15d, %edi
xorl %esi, %esi
movl $0x8, %edx
callq 0x2b2d
movzbl %al, %ebp
shll $0x8, %ebp
orl %ebx, %ebp
movl %r15d, %edi
xorl %esi, %esi
movl $0xb, %edx
callq 0x2b2d
movzbl %al, %r14d
movl %r15d, %edi
movl $0x1, %esi
movl $0x8, %edx
callq 0x2b2d
movzbl %al, %ebx
movl %r15d, %edi
movl $0x1, %esi
movl $0x9, %edx
callq 0x2b2d
movzbl %al, %ecx
shll $0x8, %ecx
orl %ebx, %ecx
leaq 0x25ee(%rip), %rdi      # 0x62e7
movl %ebp, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x20a0
movl %r15d, %edi
xorl %esi, %esi
movl $0x9, %edx
callq 0x2b2d
movzbl %al, %ebx
movl %r15d, %edi
xorl %esi, %esi
movl $0xa, %edx
callq 0x2b2d
movzbl %al, %ebp
shll $0x8, %ebp
orl %ebx, %ebp
movl %r15d, %edi
xorl %esi, %esi
movl $0xc, %edx
callq 0x2b2d
movzbl %al, %r14d
movl %r15d, %edi
movl $0x1, %esi
movl $0xa, %edx
callq 0x2b2d
movzbl %al, %ebx
movl %r15d, %edi
movl $0x1, %esi
movl $0xb, %edx
callq 0x2b2d
movzbl %al, %ecx
shll $0x8, %ecx
orl %ebx, %ecx
leaq 0x2590(%rip), %rdi      # 0x6307
movl %ebp, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x20a0
movl %r15d, %edi
movl $0x3, %esi
movl $0x42, %edx
callq 0x2b2d
movzbl %al, %edx
movl %edx, %esi
andl $0xf, %esi
shrl $0x4, %edx
leaq 0x2580(%rip), %rdi      # 0x6327
xorl %eax, %eax
callq 0x20a0
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r8
movaps %xmm0, (%r8)
movaps %xmm0, 0x10(%r8)
movl $0x20, %r9d
movl %r15d, %edi
movl $0xa, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x461f
leaq 0x2b37(%rip), %rbp      # 0x6914
cmpq $0x5, %rax
jl 0x3e58
movsbl 0x14(%rsp), %esi
testb $0x1, %sil
leaq 0x257c(%rip), %rdx      # 0x636f
cmoveq %rbp, %rdx
testb $0x2, %sil
leaq 0x2585(%rip), %rcx      # 0x6387
cmoveq %rbp, %rcx
testb $0x4, %sil
leaq 0x2592(%rip), %r8       # 0x63a3
cmoveq %rbp, %r8
testb $0x8, %sil
leaq 0x2599(%rip), %r9       # 0x63b9
cmoveq %rbp, %r9
testb $0x10, %sil
leaq 0x25a3(%rip), %r10      # 0x63d2
cmoveq %rbp, %r10
testb $0x20, %sil
leaq 0x25b0(%rip), %r11      # 0x63ee
cmoveq %rbp, %r11
leaq 0x24f8(%rip), %rdi      # 0x6341
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x20a0
addq $0x10, %rsp
leaq 0x10(%rsp), %r8
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%r8)
movaps %xmm0, (%r8)
movl $0x20, %r9d
movl %r15d, %edi
movl $0xb, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x461f
cmpq $0xd, %rax
jl 0x4468
movzbl 0x15(%rsp), %eax
movl %eax, %esi
shll $0x8, %esi
movzbl 0x14(%rsp), %edi
orl %edi, %esi
testb $0x1, %dil
leaq 0x258d(%rip), %rdx      # 0x6433
cmoveq %rbp, %rdx
testb $0x2, %dil
leaq 0x2598(%rip), %rcx      # 0x644d
cmoveq %rbp, %rcx
testb $0x4, %dil
leaq 0x2593(%rip), %r8       # 0x6457
cmoveq %rbp, %r8
testb $0x8, %dil
leaq 0x258e(%rip), %r9       # 0x6461
movq %r9, 0x58(%rsp)
cmoveq %rbp, %r9
testb $0x10, %dil
leaq 0x2584(%rip), %r10      # 0x646b
cmoveq %rbp, %r10
movq %r10, 0x48(%rsp)
testb $0x20, %dil
leaq 0x2587(%rip), %r10      # 0x6482
cmoveq %rbp, %r10
movq %r10, 0x40(%rsp)
testb $0x40, %dil
leaq 0x258e(%rip), %r10      # 0x649d
cmoveq %rbp, %r10
movq %r10, 0x38(%rsp)
testb %dil, %dil
leaq 0x2591(%rip), %rdi      # 0x64b3
cmovnsq %rbp, %rdi
movq %rdi, 0x60(%rsp)
testb $0x1, %al
leaq 0x2593(%rip), %rdi      # 0x64c7
movq %rdi, 0x50(%rsp)
movl %r15d, 0xc(%rsp)
movq %rdi, %r15
cmoveq %rbp, %r15
testb $0x2, %al
leaq 0x2596(%rip), %r11      # 0x64e4
cmoveq %rbp, %r11
testb $0x4, %al
leaq 0x25a1(%rip), %rbx      # 0x64fc
cmoveq %rbp, %rbx
testb $0x8, %al
leaq 0x25a7(%rip), %r10      # 0x650f
cmoveq %rbp, %r10
testb $0x10, %al
leaq 0x25a9(%rip), %r13      # 0x651e
cmoveq %rbp, %r13
testb $0x20, %al
leaq 0x25af(%rip), %r12      # 0x6531
cmoveq %rbp, %r12
testb $0x40, %al
leaq 0x25b7(%rip), %r14      # 0x6546
cmoveq %rbp, %r14
subq $0x8, %rsp
leaq 0x245c(%rip), %rdi      # 0x63fa
xorl %eax, %eax
pushq %r14
pushq %r12
pushq %r13
pushq %r10
pushq %rbx
pushq %r11
pushq %r15
pushq 0xa0(%rsp)
pushq 0x80(%rsp)
pushq 0x90(%rsp)
pushq 0xa0(%rsp)
callq 0x20a0
addq $0x60, %rsp
movzwl 0x16(%rsp), %esi
leaq 0x2584(%rip), %rdi      # 0x6562
xorl %eax, %eax
callq 0x20a0
movsbl 0x18(%rsp), %esi
testb $0x1, %sil
leaq 0x24be(%rip), %rdx      # 0x64b3
cmoveq %rbp, %rdx
testb $0x2, %sil
leaq 0x25a9(%rip), %rcx      # 0x65ad
cmoveq %rbp, %rcx
testb $0x4, %sil
leaq 0x25ad(%rip), %r8       # 0x65c0
cmoveq %rbp, %r8
leaq 0x2566(%rip), %rdi      # 0x6584
xorl %eax, %eax
callq 0x20a0
movsbl 0x19(%rsp), %esi
testb $0x1, %sil
leaq 0x25c5(%rip), %rdx      # 0x65fa
cmoveq %rbp, %rdx
leaq 0x25d0(%rip), %rcx      # 0x6610
cmoveq %rbp, %rcx
leaq 0x25da(%rip), %r8       # 0x6625
cmoveq %rbp, %r8
leaq 0x2579(%rip), %rdi      # 0x65cf
xorl %eax, %eax
callq 0x20a0
movsbl 0x1a(%rsp), %esi
leaq 0x25cd(%rip), %rdi      # 0x6636
xorl %eax, %eax
callq 0x20a0
movsbl 0x1b(%rsp), %esi
leaq 0x25ce(%rip), %rdi      # 0x664a
xorl %eax, %eax
callq 0x20a0
movsbl 0x1c(%rsp), %esi
leaq 0x25e7(%rip), %rdi      # 0x6676
xorl %eax, %eax
callq 0x20a0
movl 0xc(%rsp), %edi
xorl %esi, %esi
movl $0x64, %edx
callq 0x2b2d
movzbl %al, %esi
testb $0x1, %sil
leaq 0x263d(%rip), %rdx      # 0x66f1
cmoveq %rbp, %rdx
testb $0x2, %sil
leaq 0x26f5(%rip), %rcx      # 0x67b8
cmoveq %rbp, %rcx
testb $0x4, %sil
leaq 0x2611(%rip), %r8       # 0x66e3
cmoveq %rbp, %r8
testb $0x10, %sil
leaq 0x260a(%rip), %r9       # 0x66eb
cmoveq %rbp, %r9
testb $0x20, %sil
leaq 0x260a(%rip), %r10      # 0x66fa
cmoveq %rbp, %r10
subq $0x8, %rsp
leaq 0x25b7(%rip), %rdi      # 0x66b6
xorl %eax, %eax
pushq %r10
callq 0x20a0
addq $0x10, %rsp
movl 0xc(%rsp), %edi
xorl %esi, %esi
movl $0x80, %edx
callq 0x2b2d
movzbl %al, %esi
testb $0x1, %sil
leaq 0x260c(%rip), %rdx      # 0x6736
cmoveq %rbp, %rdx
testb $0x2, %sil
leaq 0x260d(%rip), %rcx      # 0x6746
cmoveq %rbp, %rcx
testb $0x4, %sil
leaq 0x260b(%rip), %r8       # 0x6753
cmoveq %rbp, %r8
testb $0x8, %sil
leaq 0x2604(%rip), %r9       # 0x675b
cmoveq %rbp, %r9
leaq 0x25a4(%rip), %rdi      # 0x6706
xorl %eax, %eax
callq 0x20a0
movl 0xc(%rsp), %edi
xorl %esi, %esi
movl $0x84, %edx
callq 0x2b2d
movzbl %al, %ebx
movl 0xc(%rsp), %edi
xorl %esi, %esi
movl $0x85, %edx
callq 0x2b2d
movzbl %al, %eax
movl %eax, %esi
shll $0x8, %esi
orl %ebx, %esi
testb $0x1, %bl
leaq 0x2293(%rip), %rdx      # 0x6433
cmoveq %rbp, %rdx
testb $0x2, %bl
leaq 0x229f(%rip), %r9       # 0x644d
cmoveq %rbp, %r9
testb $0x4, %bl
leaq 0x229b(%rip), %r8       # 0x6457
cmoveq %rbp, %r8
testb $0x8, %bl
movq 0x58(%rsp), %rcx
cmoveq %rbp, %rcx
movq %rcx, 0x58(%rsp)
testb $0x10, %bl
leaq 0x2290(%rip), %rcx      # 0x646b
cmoveq %rbp, %rcx
movq %rcx, 0x48(%rsp)
testb $0x20, %bl
leaq 0x2294(%rip), %rcx      # 0x6482
cmoveq %rbp, %rcx
movq %rcx, 0x40(%rsp)
testb $0x40, %bl
leaq 0x229c(%rip), %rcx      # 0x649d
cmoveq %rbp, %rcx
movq %rcx, 0x38(%rsp)
testb %bl, %bl
leaq 0x259b(%rip), %r12      # 0x67ae
cmovnsq %rbp, %r12
testb $0x1, %al
movq 0x50(%rsp), %rcx
cmoveq %rbp, %rcx
movq %rcx, 0x50(%rsp)
testb $0x2, %al
leaq 0x258f(%rip), %r15      # 0x67bf
cmoveq %rbp, %r15
testb $0x4, %al
leaq 0x2596(%rip), %rbx      # 0x67d3
cmoveq %rbp, %rbx
testb $0x8, %al
leaq 0x2595(%rip), %r13      # 0x67df
cmoveq %rbp, %r13
testb $0x10, %al
leaq 0x2593(%rip), %r14      # 0x67ea
cmoveq %rbp, %r14
testb $0x20, %al
leaq 0x259b(%rip), %r11      # 0x67ff
cmoveq %rbp, %r11
testb $0x40, %al
leaq 0x259a(%rip), %r10      # 0x680b
cmoveq %rbp, %r10
subq $0x8, %rsp
leaq 0x24e3(%rip), %rdi      # 0x6763
movq %r9, %rcx
movq 0x60(%rsp), %r9
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r14
pushq %r13
pushq %rbx
pushq %r15
movl 0x44(%rsp), %r15d
pushq 0x88(%rsp)
pushq %r12
pushq 0x80(%rsp)
pushq 0x90(%rsp)
pushq 0xa0(%rsp)
callq 0x20a0
addq $0x60, %rsp
movl %r15d, %edi
xorl %esi, %esi
movl $0x66, %edx
callq 0x2b2d
movzbl %al, %esi
testb $0x1, %sil
leaq 0x2413(%rip), %r12      # 0x66f1
movq %r12, %rdx
cmoveq %rbp, %rdx
testb $0x2, %sil
leaq 0x24c8(%rip), %r13      # 0x67b8
movq %r13, %rcx
cmoveq %rbp, %rcx
testb $0x10, %sil
leaq 0x23e9(%rip), %rbx      # 0x66eb
movq %rbx, %r8
cmoveq %rbp, %r8
testb $0x20, %sil
leaq 0x23e6(%rip), %r14      # 0x66fa
movq %r14, %r9
cmoveq %rbp, %r9
leaq 0x24f8(%rip), %rdi      # 0x681a
xorl %eax, %eax
callq 0x20a0
movl %r15d, %edi
xorl %esi, %esi
movl $0x88, %edx
callq 0x2b2d
movzbl %al, %esi
testb $0x1, %sil
leaq 0x2524(%rip), %rdx      # 0x686a
cmoveq %rbp, %rdx
testb $0x2, %sil
leaq 0x2524(%rip), %rcx      # 0x6879
cmoveq %rbp, %rcx
testb $0x10, %sil
leaq 0x2107(%rip), %r8       # 0x646b
cmoveq %rbp, %r8
testb $0x20, %sil
leaq 0x210f(%rip), %r9       # 0x6482
cmoveq %rbp, %r9
testb $0x40, %sil
leaq 0x211b(%rip), %r11      # 0x649d
cmoveq %rbp, %r11
testb %sil, %sil
leaq 0x24f9(%rip), %r10      # 0x6889
cmovnsq %rbp, %r10
leaq 0x24a0(%rip), %rdi      # 0x683b
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x20a0
addq $0x10, %rsp
movl %r15d, %edi
xorl %esi, %esi
movl $0x68, %edx
callq 0x2b2d
movzbl %al, %esi
testb $0x1, %sil
movq %r12, %rdx
cmoveq %rbp, %rdx
testb $0x2, %sil
movq %r13, %rcx
cmoveq %rbp, %rcx
testb $0x10, %sil
movq %rbx, %r8
cmoveq %rbp, %r8
testb $0x20, %sil
movq %r14, %r9
cmoveq %rbp, %r9
leaq 0x24aa(%rip), %rdi      # 0x6899
xorl %eax, %eax
callq 0x20a0
movl %r15d, %edi
xorl %esi, %esi
movl $0x6a, %edx
callq 0x2b2d
movzbl %al, %esi
testb $0x1, %sil
movq %r12, %rdx
cmoveq %rbp, %rdx
testb $0x2, %sil
movq %r13, %rcx
cmoveq %rbp, %rcx
testb $0x4, %sil
leaq 0x24b0(%rip), %r8       # 0x68d9
cmoveq %rbp, %r8
testb $0x8, %sil
leaq 0x24af(%rip), %r9       # 0x68e7
cmoveq %rbp, %r9
testb $0x10, %sil
movq %rbx, %r10
cmoveq %rbp, %r10
testb $0x20, %sil
movq %r14, %r11
cmoveq %rbp, %r11
leaq 0x245f(%rip), %rdi      # 0x68b8
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x20a0
addq $0x10, %rsp
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r8
movaps %xmm0, 0x10(%r8)
movaps %xmm0, (%r8)
movl $0x20, %r9d
movl %r15d, %edi
movl $0xc, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x461f
cmpq $0xb, %rax
jl 0x44f0
movsbl 0x14(%rsp), %esi
leaq 0x2454(%rip), %rdi      # 0x68f6
xorl %eax, %eax
callq 0x20a0
movzwl 0x15(%rsp), %esi
btl $0xc, %esi
jb 0x44c7
movzwl %si, %eax
cmpl $0x80, %eax
jb 0x44d0
shrl $0x4, %esi
movzbl %sil, %esi
jmp 0x44d0
shrl $0x4, %esi
movzbl %sil, %esi
negl %esi
leaq 0x243e(%rip), %rdi      # 0x6915
xorl %eax, %eax
callq 0x20a0
movl 0x17(%rsp), %esi
leaq 0x244a(%rip), %rdi      # 0x6933
xorl %eax, %eax
callq 0x20a0
leaq 0x10(%rsp), %r8
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%r8)
movaps %xmm0, (%r8)
movl $0x20, %r9d
movl %r15d, %edi
movl $0xd, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x461f
cmpq $0xb, %rax
jl 0x4610
movzbl 0x15(%rsp), %eax
shll $0x8, %eax
movzbl 0x14(%rsp), %ecx
movl $0x7f00, %ebp           # imm = 0x7F00
movl %eax, %esi
andl %ebp, %esi
orl %ecx, %esi
testw %ax, %ax
leaq 0x242a(%rip), %r14      # 0x696e
leaq 0xace(%rip), %rbx       # 0x5019
movq %rbx, %rdx
cmovnsq %r14, %rdx
leaq 0x23ed(%rip), %rdi      # 0x6946
xorl %eax, %eax
callq 0x20a0
movzbl 0x19(%rsp), %eax
shll $0x8, %eax
movzbl 0x18(%rsp), %ecx
movl %eax, %esi
andl %ebp, %esi
orl %ecx, %esi
testw %ax, %ax
movq %rbx, %rdx
cmovnsq %r14, %rdx
leaq 0x23ed(%rip), %rdi      # 0x6971
xorl %eax, %eax
callq 0x20a0
movzbl 0x1d(%rsp), %eax
shll $0x8, %eax
movzbl 0x1c(%rsp), %ecx
movl %eax, %esi
andl %ebp, %esi
orl %ecx, %esi
testw %ax, %ax
cmovnsq %r14, %rbx
leaq 0x23ef(%rip), %rdi      # 0x699b
movq %rbx, %rdx
xorl %eax, %eax
callq 0x20a0
movzwl 0x20(%rsp), %esi
leaq 0x2401(%rip), %rdi      # 0x69c3
xorl %eax, %eax
callq 0x20a0
movzwl 0x24(%rsp), %esi
leaq 0x2417(%rip), %rdi      # 0x69ec
xorl %eax, %eax
callq 0x20a0
movzwl 0x28(%rsp), %esi
leaq 0x2430(%rip), %rdi      # 0x6a18
xorl %eax, %eax
callq 0x20a0
movzwl 0x2c(%rsp), %esi
leaq 0x2447(%rip), %rdi      # 0x6a42
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20a0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq