// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %edi, -0x2c(%rbp)
movq %rsi, -0x38(%rbp)
leaq 0x3158(%rip), %rdi      # 0x74aa
movb $0x0, %al
callq 0x2080
movq -0x38(%rbp), %rax
movzwl (%rax), %esi
movq -0x38(%rbp), %rax
movzwl 0x2(%rax), %edx
movq -0x38(%rbp), %rax
movzwl 0x4(%rax), %ecx
leaq 0x313c(%rip), %rdi      # 0x74b3
movb $0x0, %al
callq 0x2080
movq -0x38(%rbp), %rax
movzwl 0x6(%rax), %esi
movq -0x38(%rbp), %rax
movzwl 0x8(%rax), %edx
movq -0x38(%rbp), %rax
movzwl 0xa(%rax), %ecx
leaq 0x3140(%rip), %rdi      # 0x74dd
movb $0x0, %al
callq 0x2080
movq -0x38(%rbp), %rax
movl 0xc(%rax), %edi
callq 0x55c0
movl %eax, %esi
leaq 0x3157(%rip), %rdi      # 0x7510
movb $0x0, %al
callq 0x2080
leaq 0x3157(%rip), %rdi      # 0x751e
movb $0x0, %al
callq 0x2080
movl -0x2c(%rbp), %edi
xorl %esi, %esi
movl $0x7, %edx
callq 0x53b0
movzwl %ax, %eax
movl %eax, -0x70(%rbp)
movl -0x2c(%rbp), %edi
xorl %esi, %esi
movl $0xb, %edx
callq 0x2e40
movzbl %al, %eax
movl %eax, -0x6c(%rbp)
movl -0x2c(%rbp), %edi
movl $0x1, %esi
movl $0x8, %edx
callq 0x53b0
movl -0x70(%rbp), %esi
movl -0x6c(%rbp), %edx
movzwl %ax, %ecx
leaq 0x3110(%rip), %rdi      # 0x752a
movb $0x0, %al
callq 0x2080
movl -0x2c(%rbp), %edi
xorl %esi, %esi
movl $0x9, %edx
callq 0x53b0
movzwl %ax, %eax
movl %eax, -0x68(%rbp)
movl -0x2c(%rbp), %edi
xorl %esi, %esi
movl $0xc, %edx
callq 0x2e40
movzbl %al, %eax
movl %eax, -0x64(%rbp)
movl -0x2c(%rbp), %edi
movl $0x1, %esi
movl $0xa, %edx
callq 0x53b0
movl -0x68(%rbp), %esi
movl -0x64(%rbp), %edx
movzwl %ax, %ecx
leaq 0x30dd(%rip), %rdi      # 0x754a
movb $0x0, %al
callq 0x2080
movl -0x2c(%rbp), %edi
movl $0x3, %esi
movl $0x42, %edx
callq 0x2e40
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
andl $0xf, %esi
movl -0x3c(%rbp), %edx
sarl $0x4, %edx
leaq 0x30cb(%rip), %rdi      # 0x756a
movb $0x0, %al
callq 0x2080
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x20c0
movl -0x2c(%rbp), %edi
leaq -0x60(%rbp), %r8
movl $0xa, %esi
xorl %eax, %eax
movl %eax, %ecx
movl $0x20, %r9d
movq %rcx, %rdx
callq 0x5270
cmpq $0x5, %rax
jl 0x45a4
movsbl -0x5c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
movl -0x3c(%rbp), %ecx
andl $0x1, %ecx
leaq 0x3662(%rip), %rdx      # 0x7b57
leaq 0x30b6(%rip), %rax      # 0x75b2
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x3c(%rbp), %edi
andl $0x2, %edi
leaq 0x3647(%rip), %rcx      # 0x7b57
leaq 0x30b3(%rip), %rax      # 0x75ca
cmpl $0x0, %edi
cmovneq %rax, %rcx
movl -0x3c(%rbp), %edi
andl $0x4, %edi
leaq 0x362c(%rip), %r8       # 0x7b57
leaq 0x30b4(%rip), %rax      # 0x75e6
cmpl $0x0, %edi
cmovneq %rax, %r8
movl -0x3c(%rbp), %edi
andl $0x8, %edi
leaq 0x3611(%rip), %r9       # 0x7b57
leaq 0x30af(%rip), %rax      # 0x75fc
cmpl $0x0, %edi
cmovneq %rax, %r9
movl -0x3c(%rbp), %edi
andl $0x10, %edi
leaq 0x35f6(%rip), %r10      # 0x7b57
leaq 0x30ad(%rip), %rax      # 0x7615
cmpl $0x0, %edi
cmovneq %rax, %r10
movl -0x3c(%rbp), %r11d
andl $0x20, %r11d
leaq 0x35d9(%rip), %rax      # 0x7b57
leaq 0x30ac(%rip), %rdi      # 0x7631
cmpl $0x0, %r11d
cmovneq %rdi, %rax
leaq 0x2ff0(%rip), %rdi      # 0x7584
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x2080
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x20c0
movl -0x2c(%rbp), %edi
leaq -0x60(%rbp), %r8
movl $0xb, %esi
xorl %eax, %eax
movl %eax, %ecx
movl $0x20, %r9d
movq %rcx, %rdx
callq 0x5270
cmpq $0xd, %rax
jl 0x4fd5
leaq -0x60(%rbp), %rdi
addq $0x4, %rdi
callq 0x5410
movzwl %ax, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
movl -0x3c(%rbp), %ecx
andl $0x1, %ecx
leaq 0x3558(%rip), %rdx      # 0x7b57
leaq 0x3070(%rip), %rax      # 0x7676
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x3c(%rbp), %edi
andl $0x2, %edi
leaq 0x353d(%rip), %rcx      # 0x7b57
leaq 0x306f(%rip), %rax      # 0x7690
cmpl $0x0, %edi
cmovneq %rax, %rcx
movl -0x3c(%rbp), %edi
andl $0x4, %edi
leaq 0x3522(%rip), %r8       # 0x7b57
leaq 0x305e(%rip), %rax      # 0x769a
cmpl $0x0, %edi
cmovneq %rax, %r8
movl -0x3c(%rbp), %edi
andl $0x8, %edi
leaq 0x3507(%rip), %r9       # 0x7b57
leaq 0x304d(%rip), %rax      # 0x76a4
cmpl $0x0, %edi
cmovneq %rax, %r9
movl -0x3c(%rbp), %r10d
andl $0x10, %r10d
leaq 0x34ea(%rip), %rax      # 0x7b57
leaq 0x303a(%rip), %rdi      # 0x76ae
cmpl $0x0, %r10d
cmovneq %rdi, %rax
movq %rax, -0xc0(%rbp)
movl -0x3c(%rbp), %r10d
andl $0x20, %r10d
leaq 0x34c5(%rip), %rax      # 0x7b57
leaq 0x302c(%rip), %rdi      # 0x76c5
cmpl $0x0, %r10d
cmovneq %rdi, %rax
movq %rax, -0xb8(%rbp)
movl -0x3c(%rbp), %r10d
andl $0x40, %r10d
leaq 0x34a0(%rip), %rax      # 0x7b57
leaq 0x3022(%rip), %rdi      # 0x76e0
cmpl $0x0, %r10d
cmovneq %rdi, %rax
movq %rax, -0xb0(%rbp)
movl -0x3c(%rbp), %edi
andl $0x80, %edi
leaq 0x347a(%rip), %r13      # 0x7b57
leaq 0x3012(%rip), %rax      # 0x76f6
cmpl $0x0, %edi
cmovneq %rax, %r13
movl -0x3c(%rbp), %edi
andl $0x100, %edi            # imm = 0x100
leaq 0x345c(%rip), %r12      # 0x7b57
leaq 0x3008(%rip), %rax      # 0x770a
cmpl $0x0, %edi
cmovneq %rax, %r12
movl -0x3c(%rbp), %edi
andl $0x200, %edi            # imm = 0x200
leaq 0x343e(%rip), %r15      # 0x7b57
leaq 0x3007(%rip), %rax      # 0x7727
cmpl $0x0, %edi
cmovneq %rax, %r15
movl -0x3c(%rbp), %edi
andl $0x400, %edi            # imm = 0x400
leaq 0x3420(%rip), %r14      # 0x7b57
leaq 0x3001(%rip), %rax      # 0x773f
cmpl $0x0, %edi
cmovneq %rax, %r14
movl -0x3c(%rbp), %edi
andl $0x800, %edi            # imm = 0x800
leaq 0x3402(%rip), %rbx      # 0x7b57
leaq 0x2ff6(%rip), %rax      # 0x7752
cmpl $0x0, %edi
cmovneq %rax, %rbx
movl -0x3c(%rbp), %edi
andl $0x1000, %edi           # imm = 0x1000
leaq 0x33e4(%rip), %r11      # 0x7b57
leaq 0x2fe7(%rip), %rax      # 0x7761
cmpl $0x0, %edi
cmovneq %rax, %r11
movl -0x3c(%rbp), %edi
andl $0x2000, %edi           # imm = 0x2000
leaq 0x33c6(%rip), %r10      # 0x7b57
leaq 0x2fdc(%rip), %rax      # 0x7774
cmpl $0x0, %edi
cmovneq %rax, %r10
movl -0x3c(%rbp), %eax
andl $0x4000, %eax           # imm = 0x4000
movl %eax, -0xcc(%rbp)
leaq 0x33a3(%rip), %rdi      # 0x7b57
leaq 0x2fce(%rip), %rax      # 0x7789
movq %rax, -0xc8(%rbp)
movl -0xcc(%rbp), %eax
cmpl $0x0, %eax
movq -0xc8(%rbp), %rax
cmovneq %rax, %rdi
movq -0xc0(%rbp), %rax
movq %rdi, -0xa8(%rbp)
leaq 0x2e52(%rip), %rdi      # 0x763d
movq %rax, (%rsp)
movq -0xb8(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0xb0(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0xa8(%rbp), %rax
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x40(%rsp)
movq %r10, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movb $0x0, %al
callq 0x2080
leaq -0x60(%rbp), %rdi
addq $0x6, %rdi
callq 0x5410
movzwl %ax, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
leaq 0x2f4b(%rip), %rdi      # 0x77a5
movb $0x0, %al
callq 0x2080
movsbl -0x58(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
movl -0x3c(%rbp), %ecx
andl $0x1, %ecx
leaq 0x32df(%rip), %rdx      # 0x7b57
leaq 0x2e77(%rip), %rax      # 0x76f6
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x3c(%rbp), %edi
andl $0x2, %edi
leaq 0x32c4(%rip), %rcx      # 0x7b57
leaq 0x2f56(%rip), %rax      # 0x77f0
cmpl $0x0, %edi
cmovneq %rax, %rcx
movl -0x3c(%rbp), %edi
andl $0x4, %edi
leaq 0x32a9(%rip), %r8       # 0x7b57
leaq 0x2f4e(%rip), %rax      # 0x7803
cmpl $0x0, %edi
cmovneq %rax, %r8
leaq 0x2f04(%rip), %rdi      # 0x77c7
movb $0x0, %al
callq 0x2080
movsbl -0x57(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
movl -0x3c(%rbp), %ecx
andl $0x1, %ecx
leaq 0x3276(%rip), %rdx      # 0x7b57
leaq 0x2f55(%rip), %rax      # 0x783d
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x3c(%rbp), %edi
andl $0x1, %edi
leaq 0x325b(%rip), %rcx      # 0x7b57
leaq 0x2f50(%rip), %rax      # 0x7853
cmpl $0x0, %edi
cmovneq %rax, %rcx
movl -0x3c(%rbp), %edi
andl $0x1, %edi
leaq 0x3240(%rip), %r8       # 0x7b57
leaq 0x2f4a(%rip), %rax      # 0x7868
cmpl $0x0, %edi
cmovneq %rax, %r8
leaq 0x2ee6(%rip), %rdi      # 0x7812
movb $0x0, %al
callq 0x2080
movsbl -0x56(%rbp), %esi
leaq 0x2f3b(%rip), %rdi      # 0x7879
movb $0x0, %al
callq 0x2080
movsbl -0x55(%rbp), %esi
leaq 0x2f3d(%rip), %rdi      # 0x788d
movb $0x0, %al
callq 0x2080
movsbl -0x54(%rbp), %esi
leaq 0x2f57(%rip), %rdi      # 0x78b9
movb $0x0, %al
callq 0x2080
movl -0x2c(%rbp), %edi
xorl %esi, %esi
movl $0x64, %edx
callq 0x2e40
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
movl -0x3c(%rbp), %ecx
andl $0x1, %ecx
leaq 0x31c9(%rip), %rdx      # 0x7b57
leaq 0x2f9f(%rip), %rax      # 0x7934
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x3c(%rbp), %edi
andl $0x2, %edi
leaq 0x31ae(%rip), %rcx      # 0x7b57
leaq 0x304b(%rip), %rax      # 0x79fb
cmpl $0x0, %edi
cmovneq %rax, %rcx
movl -0x3c(%rbp), %edi
andl $0x4, %edi
leaq 0x3193(%rip), %r8       # 0x7b57
leaq 0x2f5b(%rip), %rax      # 0x7926
cmpl $0x0, %edi
cmovneq %rax, %r8
movl -0x3c(%rbp), %edi
andl $0x10, %edi
leaq 0x3178(%rip), %r9       # 0x7b57
leaq 0x2f48(%rip), %rax      # 0x792e
cmpl $0x0, %edi
cmovneq %rax, %r9
movl -0x3c(%rbp), %r10d
andl $0x20, %r10d
leaq 0x315b(%rip), %rax      # 0x7b57
leaq 0x2f3a(%rip), %rdi      # 0x793d
cmpl $0x0, %r10d
cmovneq %rdi, %rax
leaq 0x2ee7(%rip), %rdi      # 0x78f9
movq %rax, (%rsp)
movb $0x0, %al
callq 0x2080
movl -0x2c(%rbp), %edi
xorl %esi, %esi
movl $0x80, %edx
callq 0x2e40
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
movl -0x3c(%rbp), %ecx
andl $0x1, %ecx
leaq 0x3115(%rip), %rdx      # 0x7b57
leaq 0x2f30(%rip), %rax      # 0x7979
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x3c(%rbp), %edi
andl $0x2, %edi
leaq 0x30fa(%rip), %rcx      # 0x7b57
leaq 0x2f25(%rip), %rax      # 0x7989
cmpl $0x0, %edi
cmovneq %rax, %rcx
movl -0x3c(%rbp), %edi
andl $0x4, %edi
leaq 0x30df(%rip), %r8       # 0x7b57
leaq 0x2f17(%rip), %rax      # 0x7996
cmpl $0x0, %edi
cmovneq %rax, %r8
movl -0x3c(%rbp), %edi
andl $0x8, %edi
leaq 0x30c4(%rip), %r9       # 0x7b57
leaq 0x2f04(%rip), %rax      # 0x799e
cmpl $0x0, %edi
cmovneq %rax, %r9
leaq 0x2ea1(%rip), %rdi      # 0x7949
movb $0x0, %al
callq 0x2080
movl -0x2c(%rbp), %edi
xorl %esi, %esi
movl $0x84, %edx
callq 0x53b0
movzwl %ax, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
movl -0x3c(%rbp), %ecx
andl $0x1, %ecx
leaq 0x3083(%rip), %rdx      # 0x7b57
leaq 0x2b9b(%rip), %rax      # 0x7676
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x3c(%rbp), %edi
andl $0x2, %edi
leaq 0x3068(%rip), %rcx      # 0x7b57
leaq 0x2b9a(%rip), %rax      # 0x7690
cmpl $0x0, %edi
cmovneq %rax, %rcx
movl -0x3c(%rbp), %edi
andl $0x4, %edi
leaq 0x304d(%rip), %r8       # 0x7b57
leaq 0x2b89(%rip), %rax      # 0x769a
cmpl $0x0, %edi
cmovneq %rax, %r8
movl -0x3c(%rbp), %edi
andl $0x8, %edi
leaq 0x3032(%rip), %r9       # 0x7b57
leaq 0x2b78(%rip), %rax      # 0x76a4
cmpl $0x0, %edi
cmovneq %rax, %r9
movl -0x3c(%rbp), %r10d
andl $0x10, %r10d
leaq 0x3015(%rip), %rax      # 0x7b57
leaq 0x2b65(%rip), %rdi      # 0x76ae
cmpl $0x0, %r10d
cmovneq %rdi, %rax
movq %rax, -0x90(%rbp)
movl -0x3c(%rbp), %r10d
andl $0x20, %r10d
leaq 0x2ff0(%rip), %rax      # 0x7b57
leaq 0x2b57(%rip), %rdi      # 0x76c5
cmpl $0x0, %r10d
cmovneq %rdi, %rax
movq %rax, -0x88(%rbp)
movl -0x3c(%rbp), %r10d
andl $0x40, %r10d
leaq 0x2fcb(%rip), %rax      # 0x7b57
leaq 0x2b4d(%rip), %rdi      # 0x76e0
cmpl $0x0, %r10d
cmovneq %rdi, %rax
movq %rax, -0x80(%rbp)
movl -0x3c(%rbp), %edi
andl $0x80, %edi
leaq 0x2fa8(%rip), %r13      # 0x7b57
leaq 0x2e3b(%rip), %rax      # 0x79f1
cmpl $0x0, %edi
cmovneq %rax, %r13
movl -0x3c(%rbp), %edi
andl $0x100, %edi            # imm = 0x100
leaq 0x2f8a(%rip), %r12      # 0x7b57
leaq 0x2b36(%rip), %rax      # 0x770a
cmpl $0x0, %edi
cmovneq %rax, %r12
movl -0x3c(%rbp), %edi
andl $0x200, %edi            # imm = 0x200
leaq 0x2f6c(%rip), %r15      # 0x7b57
leaq 0x2e10(%rip), %rax      # 0x7a02
cmpl $0x0, %edi
cmovneq %rax, %r15
movl -0x3c(%rbp), %edi
andl $0x400, %edi            # imm = 0x400
leaq 0x2f4e(%rip), %r14      # 0x7b57
leaq 0x2e06(%rip), %rax      # 0x7a16
cmpl $0x0, %edi
cmovneq %rax, %r14
movl -0x3c(%rbp), %edi
andl $0x800, %edi            # imm = 0x800
leaq 0x2f30(%rip), %rbx      # 0x7b57
leaq 0x2df4(%rip), %rax      # 0x7a22
cmpl $0x0, %edi
cmovneq %rax, %rbx
movl -0x3c(%rbp), %edi
andl $0x1000, %edi           # imm = 0x1000
leaq 0x2f12(%rip), %r11      # 0x7b57
leaq 0x2de1(%rip), %rax      # 0x7a2d
cmpl $0x0, %edi
cmovneq %rax, %r11
movl -0x3c(%rbp), %edi
andl $0x2000, %edi           # imm = 0x2000
leaq 0x2ef4(%rip), %r10      # 0x7b57
leaq 0x2dd8(%rip), %rax      # 0x7a42
cmpl $0x0, %edi
cmovneq %rax, %r10
movl -0x3c(%rbp), %eax
andl $0x4000, %eax           # imm = 0x4000
movl %eax, -0x9c(%rbp)
leaq 0x2ed1(%rip), %rdi      # 0x7b57
leaq 0x2dc1(%rip), %rax      # 0x7a4e
movq %rax, -0x98(%rbp)
movl -0x9c(%rbp), %eax
cmpl $0x0, %eax
movq -0x98(%rbp), %rax
cmovneq %rax, %rdi
movq -0x90(%rbp), %rax
movq %rdi, -0x78(%rbp)
leaq 0x2cec(%rip), %rdi      # 0x79a6
movq %rax, (%rsp)
movq -0x88(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0x80(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0x78(%rbp), %rax
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x40(%rsp)
movq %r10, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movb $0x0, %al
callq 0x2080
movl -0x2c(%rbp), %edi
xorl %esi, %esi
movl $0x66, %edx
callq 0x2e40
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
movl -0x3c(%rbp), %ecx
andl $0x1, %ecx
leaq 0x2e2c(%rip), %rdx      # 0x7b57
leaq 0x2c02(%rip), %rax      # 0x7934
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x3c(%rbp), %edi
andl $0x2, %edi
leaq 0x2e11(%rip), %rcx      # 0x7b57
leaq 0x2cae(%rip), %rax      # 0x79fb
cmpl $0x0, %edi
cmovneq %rax, %rcx
movl -0x3c(%rbp), %edi
andl $0x10, %edi
leaq 0x2df6(%rip), %r8       # 0x7b57
leaq 0x2bc6(%rip), %rax      # 0x792e
cmpl $0x0, %edi
cmovneq %rax, %r8
movl -0x3c(%rbp), %edi
andl $0x20, %edi
leaq 0x2ddb(%rip), %r9       # 0x7b57
leaq 0x2bba(%rip), %rax      # 0x793d
cmpl $0x0, %edi
cmovneq %rax, %r9
leaq 0x2ccc(%rip), %rdi      # 0x7a5d
movb $0x0, %al
callq 0x2080
movl -0x2c(%rbp), %edi
xorl %esi, %esi
movl $0x88, %edx
callq 0x2e40
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
movl -0x3c(%rbp), %ecx
andl $0x1, %ecx
leaq 0x2d9a(%rip), %rdx      # 0x7b57
leaq 0x2ce9(%rip), %rax      # 0x7aad
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x3c(%rbp), %edi
andl $0x2, %edi
leaq 0x2d7f(%rip), %rcx      # 0x7b57
leaq 0x2cdd(%rip), %rax      # 0x7abc
cmpl $0x0, %edi
cmovneq %rax, %rcx
movl -0x3c(%rbp), %edi
andl $0x10, %edi
leaq 0x2d64(%rip), %r8       # 0x7b57
leaq 0x28b4(%rip), %rax      # 0x76ae
cmpl $0x0, %edi
cmovneq %rax, %r8
movl -0x3c(%rbp), %edi
andl $0x20, %edi
leaq 0x2d49(%rip), %r9       # 0x7b57
leaq 0x28b0(%rip), %rax      # 0x76c5
cmpl $0x0, %edi
cmovneq %rax, %r9
movl -0x3c(%rbp), %edi
andl $0x40, %edi
leaq 0x2d2e(%rip), %r10      # 0x7b57
leaq 0x28b0(%rip), %rax      # 0x76e0
cmpl $0x0, %edi
cmovneq %rax, %r10
movl -0x3c(%rbp), %r11d
andl $0x80, %r11d
leaq 0x2d0e(%rip), %rax      # 0x7b57
leaq 0x2c7c(%rip), %rdi      # 0x7acc
cmpl $0x0, %r11d
cmovneq %rdi, %rax
leaq 0x2c1f(%rip), %rdi      # 0x7a7e
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x2080
movl -0x2c(%rbp), %edi
xorl %esi, %esi
movl $0x68, %edx
callq 0x2e40
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
movl -0x3c(%rbp), %ecx
andl $0x1, %ecx
leaq 0x2cc3(%rip), %rdx      # 0x7b57
leaq 0x2a99(%rip), %rax      # 0x7934
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x3c(%rbp), %edi
andl $0x2, %edi
leaq 0x2ca8(%rip), %rcx      # 0x7b57
leaq 0x2b45(%rip), %rax      # 0x79fb
cmpl $0x0, %edi
cmovneq %rax, %rcx
movl -0x3c(%rbp), %edi
andl $0x10, %edi
leaq 0x2c8d(%rip), %r8       # 0x7b57
leaq 0x2a5d(%rip), %rax      # 0x792e
cmpl $0x0, %edi
cmovneq %rax, %r8
movl -0x3c(%rbp), %edi
andl $0x20, %edi
leaq 0x2c72(%rip), %r9       # 0x7b57
leaq 0x2a51(%rip), %rax      # 0x793d
cmpl $0x0, %edi
cmovneq %rax, %r9
leaq 0x2be2(%rip), %rdi      # 0x7adc
movb $0x0, %al
callq 0x2080
movl -0x2c(%rbp), %edi
xorl %esi, %esi
movl $0x6a, %edx
callq 0x2e40
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
movl -0x3c(%rbp), %ecx
andl $0x1, %ecx
leaq 0x2c31(%rip), %rdx      # 0x7b57
leaq 0x2a07(%rip), %rax      # 0x7934
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x3c(%rbp), %edi
andl $0x2, %edi
leaq 0x2c16(%rip), %rcx      # 0x7b57
leaq 0x2ab3(%rip), %rax      # 0x79fb
cmpl $0x0, %edi
cmovneq %rax, %rcx
movl -0x3c(%rbp), %edi
andl $0x4, %edi
leaq 0x2bfb(%rip), %r8       # 0x7b57
leaq 0x2bb9(%rip), %rax      # 0x7b1c
cmpl $0x0, %edi
cmovneq %rax, %r8
movl -0x3c(%rbp), %edi
andl $0x8, %edi
leaq 0x2be0(%rip), %r9       # 0x7b57
leaq 0x2bac(%rip), %rax      # 0x7b2a
cmpl $0x0, %edi
cmovneq %rax, %r9
movl -0x3c(%rbp), %edi
andl $0x10, %edi
leaq 0x2bc5(%rip), %r10      # 0x7b57
leaq 0x2995(%rip), %rax      # 0x792e
cmpl $0x0, %edi
cmovneq %rax, %r10
movl -0x3c(%rbp), %r11d
andl $0x20, %r11d
leaq 0x2ba8(%rip), %rax      # 0x7b57
leaq 0x2987(%rip), %rdi      # 0x793d
cmpl $0x0, %r11d
cmovneq %rdi, %rax
leaq 0x2b36(%rip), %rdi      # 0x7afb
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x2080
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x20c0
movl -0x2c(%rbp), %edi
leaq -0x60(%rbp), %r8
movl $0xc, %esi
xorl %eax, %eax
movl %eax, %ecx
movl $0x20, %r9d
movq %rcx, %rdx
callq 0x5270
cmpq $0xb, %rax
jl 0x50a5
movsbl -0x5c(%rbp), %esi
leaq 0x2b21(%rip), %rdi      # 0x7b39
movb $0x0, %al
callq 0x2080
leaq -0x60(%rbp), %rdi
addq $0x5, %rdi
callq 0x5410
movzwl %ax, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x5059
movl -0x3c(%rbp), %ecx
andl $0xfff, %ecx            # imm = 0xFFF
xorl %eax, %eax
subl %ecx, %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, -0x3c(%rbp)
jmp 0x5077
cmpl $0x80, -0x3c(%rbp)
jl 0x5075
movl -0x3c(%rbp), %eax
andl $0xfff, %eax            # imm = 0xFFF
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, -0x3c(%rbp)
jmp 0x5077
movl -0x3c(%rbp), %esi
leaq 0x2ad7(%rip), %rdi      # 0x7b58
movb $0x0, %al
callq 0x2080
leaq -0x60(%rbp), %rdi
addq $0x7, %rdi
callq 0x5370
movl %eax, %esi
leaq 0x2ad8(%rip), %rdi      # 0x7b76
movb $0x0, %al
callq 0x2080
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x20c0
movl -0x2c(%rbp), %edi
leaq -0x60(%rbp), %r8
movl $0xd, %esi
xorl %eax, %eax
movl %eax, %ecx
movl $0x20, %r9d
movq %rcx, %rdx
callq 0x5270
cmpq $0xb, %rax
jl 0x522d
leaq -0x60(%rbp), %rdi
addq $0x4, %rdi
callq 0x5410
movzwl %ax, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
andl $0x7fff, %esi           # imm = 0x7FFF
movl -0x3c(%rbp), %ecx
andl $0x8000, %ecx           # imm = 0x8000
leaq 0x2aa8(%rip), %rdx      # 0x7bb1
leaq 0xfe8(%rip), %rax       # 0x60f8
cmpl $0x0, %ecx
cmovneq %rax, %rdx
leaq 0x2a6b(%rip), %rdi      # 0x7b89
movb $0x0, %al
callq 0x2080
leaq -0x60(%rbp), %rdi
addq $0x8, %rdi
callq 0x5410
movzwl %ax, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
andl $0x7fff, %esi           # imm = 0x7FFF
movl -0x3c(%rbp), %ecx
andl $0x8000, %ecx           # imm = 0x8000
leaq 0x2a60(%rip), %rdx      # 0x7bb1
leaq 0xfa0(%rip), %rax       # 0x60f8
cmpl $0x0, %ecx
cmovneq %rax, %rdx
leaq 0x2a4e(%rip), %rdi      # 0x7bb4
movb $0x0, %al
callq 0x2080
leaq -0x60(%rbp), %rdi
addq $0xc, %rdi
callq 0x5410
movzwl %ax, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %esi
andl $0x7fff, %esi           # imm = 0x7FFF
movl -0x3c(%rbp), %ecx
andl $0x8000, %ecx           # imm = 0x8000
leaq 0x2a18(%rip), %rdx      # 0x7bb1
leaq 0xf58(%rip), %rax       # 0x60f8
cmpl $0x0, %ecx
cmovneq %rax, %rdx
leaq 0x2a30(%rip), %rdi      # 0x7bde
movb $0x0, %al
callq 0x2080
leaq -0x60(%rbp), %rdi
addq $0x10, %rdi
callq 0x5410
movzwl %ax, %esi
leaq 0x2a3a(%rip), %rdi      # 0x7c06
movb $0x0, %al
callq 0x2080
leaq -0x60(%rbp), %rdi
addq $0x14, %rdi
callq 0x5410
movzwl %ax, %esi
leaq 0x2a45(%rip), %rdi      # 0x7c2f
movb $0x0, %al
callq 0x2080
leaq -0x60(%rbp), %rdi
addq $0x18, %rdi
callq 0x5410
movzwl %ax, %esi
leaq 0x2a53(%rip), %rdi      # 0x7c5b
movb $0x0, %al
callq 0x2080
leaq -0x60(%rbp), %rdi
addq $0x1c, %rdi
callq 0x5410
movzwl %ax, %esi
leaq 0x2a5f(%rip), %rdi      # 0x7c85
movb $0x0, %al
callq 0x2080
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop