// File: /workspace/github_c_makefile_star2_O0/rajatxjain[P]gpiocfg/gpiocfg.c
// Function: parse_dw0
static void parse_dw0(u_int32_t dw0)
{
	printf("------------- DW0 -------------\n");
	PARSE_2_BIT_FIELD(dw0, 30, 31, "[Pad Reset Config]",
			  "RSMRST#", 
			  "Host deep reset", 
			  "PLTRST#",
			  "Reserved");

	PARSE_1_BIT_FIELD(dw0, 29, "[RX Pad State Select]",
			  "Raw RX pad state directly from RX buffer",
			  "Internal RX pad state");

	PARSE_1_BIT_FIELD(dw0, 28, "[RX Raw Override to '1']",
			  "No Override",
			  "RX drive 1 internally");

	PARSE_2_BIT_FIELD(dw0, 25, 26, "[RX Level/Edge Configuration]",
			  "Level",
			  "Edge (RxInv=0 for rising edge; 1 for falling edge)",
			  "Disable",
			  "Either rising edge or falling edge");

	PARSE_1_BIT_FIELD(dw0, 24, "[Pre Glitch Filter Stage RX Pad State Select]",
			  "Select synchronized, non filtered RX pad state",
			  "Select synchronized, filtered RX pad state");

	PARSE_1_BIT_FIELD(dw0, 23, "[RX Invert]",
			  "No inversion",
			  "Inversion");

	PARSE_2_BIT_FIELD(dw0, 21, 22, "[RX/TX Enable Config]",
			  "Function defined in Pad Mode controls TX and RX Enables",
			  "Function controls TX Enable and RX Disabled with RX drive 0 internally",
			  "Function controls TX Enable and RX Disabled with RX drive 1 internally",
			  "Function controls TX Enabled and RX is always enabled");

	PARSE_1_BIT_FIELD(dw0, 20, "[GPIO Input Route IOxAPIC]",
			  "Routing does not cause peripheral IRQ",
			  "Routing can cause peripheral IRQ");

	PARSE_1_BIT_FIELD(dw0, 19, "[GPIO Input Route SCI]",
			  "Routing Routing does not cause SCI",
			  "Routing can cause SCI");

	PARSE_1_BIT_FIELD(dw0, 18, "[GPIO Input Route SMI]",
			  "Routing does not cause SMI",
			  "Routing can cause SMI");

	PARSE_1_BIT_FIELD(dw0, 17, "[GPIO Input Route NMI]",
			  "Routing does not cause NMI",
			  "Routing can cause SMI");

	printf("[bit 12-10][Pad Mode]                     = 0x%X ", BITS(dw0, 10, 12));
	switch (BITS(dw0, 10, 12)) {
	case 0:
		printf("(GPIO controls the Pad)\n");
		break;
	case 1:
		printf("(native function 1, if applicable, controls the Pad)\n");
		break;
	case 2:
		printf("(native function 2, if applicable, controls the Pad)\n");
		break;
	case 3:
		printf("(native function 3, if applicable, controls the Pad)\n");
		break;
	case 4:
		printf("(native function 4, if applicable, controls the Pad)\n");
		break;
	case 5:
		printf("(native function 5, if applicable, controls the Pad)\n");
		break;
	default:
		printf("(WTF? ? ? ?)\n");
		break;
	}

	PARSE_1_BIT_FIELD(dw0, 9, "[GPIO RX Disable]",
			  "Enable the input buffer (active low enable) of the pad",
			  "Disable the input buffer of the pad");

	PARSE_1_BIT_FIELD(dw0, 8, "[GPIO TX Disable]",
			  "Enable the output buffer (active low enable) of the pad",
			  "Disable the output buffer of the pad");

	PARSE_1_BIT_FIELD(dw0, 1, "[GPIO RX State]",
			  "Current internal RX pad state",
			  "Current internal RX pad state");

	PARSE_1_BIT_FIELD(dw0, 0, "[GPIO TX State]",
			  "Drive a level '0' to the TX output pad",
			  "Drive a level '1' to the TX output pad");
	printf("-------------------------------\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x4(%rbp)
leaq 0x1d10(%rip), %rdi      # 0x34c5
movb $0x0, %al
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x1e, %eax
movl %eax, %r8d
leaq 0x1d1a(%rip), %rdi      # 0x34e6
leaq 0x1d2e(%rip), %rcx      # 0x3501
xorl %eax, %eax
movl $0x1f, %esi
movl $0x1e, %edx
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x1e, %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0x3, %eax
ja 0x1863
movq -0x10(%rbp), %rax
leaq 0x18e4(%rip), %rcx      # 0x30e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1d04(%rip), %rdi      # 0x3514
leaq 0x1d03(%rip), %rsi      # 0x351a
movb $0x0, %al
callq 0x1060
jmp 0x1863
leaq 0x1ced(%rip), %rdi      # 0x3514
leaq 0x1cf4(%rip), %rsi      # 0x3522
movb $0x0, %al
callq 0x1060
jmp 0x1863
leaq 0x1cd6(%rip), %rdi      # 0x3514
leaq 0x1ced(%rip), %rsi      # 0x3532
movb $0x0, %al
callq 0x1060
jmp 0x1863
leaq 0x1cbf(%rip), %rdi      # 0x3514
leaq 0x1cde(%rip), %rsi      # 0x353a
movb $0x0, %al
callq 0x1060
jmp 0x1865
jmp 0x1867
movl -0x4(%rbp), %eax
shrl $0x1d, %eax
andl $0x1, %eax
movl %eax, %ecx
leaq 0x1cca(%rip), %rdi      # 0x3543
leaq 0x1cda(%rip), %rdx      # 0x355a
xorl %eax, %eax
movl $0x1d, %esi
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x1d, %eax
andl $0x1, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
testl %eax, %eax
je 0x18ad
jmp 0x18a1
movq -0x18(%rbp), %rax
subq $0x1, %rax
je 0x18c4
jmp 0x18d9
leaq 0x1c60(%rip), %rdi      # 0x3514
leaq 0x1cb5(%rip), %rsi      # 0x3570
movb $0x0, %al
callq 0x1060
jmp 0x18d9
leaq 0x1c49(%rip), %rdi      # 0x3514
leaq 0x1cc7(%rip), %rsi      # 0x3599
movb $0x0, %al
callq 0x1060
jmp 0x18db
jmp 0x18dd
movl -0x4(%rbp), %eax
shrl $0x1c, %eax
andl $0x1, %eax
movl %eax, %ecx
leaq 0x1c54(%rip), %rdi      # 0x3543
leaq 0x1cb9(%rip), %rdx      # 0x35af
xorl %eax, %eax
movl $0x1c, %esi
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x1c, %eax
andl $0x1, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
testl %eax, %eax
je 0x1923
jmp 0x1917
movq -0x20(%rbp), %rax
subq $0x1, %rax
je 0x193a
jmp 0x194f
leaq 0x1bea(%rip), %rdi      # 0x3514
leaq 0x1c97(%rip), %rsi      # 0x35c8
movb $0x0, %al
callq 0x1060
jmp 0x194f
leaq 0x1bd3(%rip), %rdi      # 0x3514
leaq 0x1e7f(%rip), %rsi      # 0x37c7
movb $0x0, %al
callq 0x1060
jmp 0x1951
jmp 0x1953
movl -0x4(%rbp), %eax
shrl $0x19, %eax
andl $0x3, %eax
movl %eax, %r8d
leaq 0x1b80(%rip), %rdi      # 0x34e6
leaq 0x1c67(%rip), %rcx      # 0x35d4
xorl %eax, %eax
movl $0x1a, %esi
movl $0x19, %edx
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x19, %eax
andl $0x3, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x3, %eax
ja 0x1a00
movq -0x28(%rbp), %rax
leaq 0x1757(%rip), %rcx      # 0x30f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1b67(%rip), %rdi      # 0x3514
leaq 0x1c3e(%rip), %rsi      # 0x35f2
movb $0x0, %al
callq 0x1060
jmp 0x1a00
leaq 0x1b50(%rip), %rdi      # 0x3514
leaq 0x1c2d(%rip), %rsi      # 0x35f8
movb $0x0, %al
callq 0x1060
jmp 0x1a00
leaq 0x1b39(%rip), %rdi      # 0x3514
leaq 0x1c49(%rip), %rsi      # 0x362b
movb $0x0, %al
callq 0x1060
jmp 0x1a00
leaq 0x1b22(%rip), %rdi      # 0x3514
leaq 0x1c3a(%rip), %rsi      # 0x3633
movb $0x0, %al
callq 0x1060
jmp 0x1a02
jmp 0x1a04
movl -0x4(%rbp), %eax
shrl $0x18, %eax
andl $0x1, %eax
movl %eax, %ecx
leaq 0x1b2d(%rip), %rdi      # 0x3543
leaq 0x1c39(%rip), %rdx      # 0x3656
xorl %eax, %eax
movl $0x18, %esi
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x18, %eax
andl $0x1, %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
testl %eax, %eax
je 0x1a4a
jmp 0x1a3e
movq -0x30(%rbp), %rax
subq $0x1, %rax
je 0x1a61
jmp 0x1a76
leaq 0x1ac3(%rip), %rdi      # 0x3514
leaq 0x1c2c(%rip), %rsi      # 0x3684
movb $0x0, %al
callq 0x1060
jmp 0x1a76
leaq 0x1aac(%rip), %rdi      # 0x3514
leaq 0x1c44(%rip), %rsi      # 0x36b3
movb $0x0, %al
callq 0x1060
jmp 0x1a78
jmp 0x1a7a
movl -0x4(%rbp), %eax
shrl $0x17, %eax
andl $0x1, %eax
movl %eax, %ecx
leaq 0x1ab7(%rip), %rdi      # 0x3543
leaq 0x1c4b(%rip), %rdx      # 0x36de
xorl %eax, %eax
movl $0x17, %esi
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x17, %eax
andl $0x1, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
testl %eax, %eax
je 0x1ac0
jmp 0x1ab4
movq -0x38(%rbp), %rax
subq $0x1, %rax
je 0x1ad7
jmp 0x1aec
leaq 0x1a4d(%rip), %rdi      # 0x3514
leaq 0x1c1c(%rip), %rsi      # 0x36ea
movb $0x0, %al
callq 0x1060
jmp 0x1aec
leaq 0x1a36(%rip), %rdi      # 0x3514
leaq 0x1c12(%rip), %rsi      # 0x36f7
movb $0x0, %al
callq 0x1060
jmp 0x1aee
jmp 0x1af0
movl -0x4(%rbp), %eax
shrl $0x15, %eax
andl $0x3, %eax
movl %eax, %r8d
leaq 0x19e3(%rip), %rdi      # 0x34e6
leaq 0x1bf7(%rip), %rcx      # 0x3701
xorl %eax, %eax
movl $0x16, %esi
movl $0x15, %edx
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x15, %eax
andl $0x3, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x3, %eax
ja 0x1b9d
movq -0x40(%rbp), %rax
leaq 0x15ca(%rip), %rcx      # 0x3104
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x19ca(%rip), %rdi      # 0x3514
leaq 0x1bc6(%rip), %rsi      # 0x3717
movb $0x0, %al
callq 0x1060
jmp 0x1b9d
leaq 0x19b3(%rip), %rdi      # 0x3514
leaq 0x1be7(%rip), %rsi      # 0x374f
movb $0x0, %al
callq 0x1060
jmp 0x1b9d
leaq 0x199c(%rip), %rdi      # 0x3514
leaq 0x1c17(%rip), %rsi      # 0x3796
movb $0x0, %al
callq 0x1060
jmp 0x1b9d
leaq 0x1985(%rip), %rdi      # 0x3514
leaq 0x1c47(%rip), %rsi      # 0x37dd
movb $0x0, %al
callq 0x1060
jmp 0x1b9f
jmp 0x1ba1
movl -0x4(%rbp), %eax
shrl $0x14, %eax
andl $0x1, %eax
movl %eax, %ecx
leaq 0x1990(%rip), %rdi      # 0x3543
leaq 0x1c59(%rip), %rdx      # 0x3813
xorl %eax, %eax
movl $0x14, %esi
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x14, %eax
andl $0x1, %eax
movl %eax, %ecx
movq %rcx, -0x48(%rbp)
testl %eax, %eax
je 0x1be7
jmp 0x1bdb
movq -0x48(%rbp), %rax
subq $0x1, %rax
je 0x1bfe
jmp 0x1c13
leaq 0x1926(%rip), %rdi      # 0x3514
leaq 0x1c39(%rip), %rsi      # 0x382e
movb $0x0, %al
callq 0x1060
jmp 0x1c13
leaq 0x190f(%rip), %rdi      # 0x3514
leaq 0x1c48(%rip), %rsi      # 0x3854
movb $0x0, %al
callq 0x1060
jmp 0x1c15
jmp 0x1c17
movl -0x4(%rbp), %eax
shrl $0x13, %eax
andl $0x1, %eax
movl %eax, %ecx
leaq 0x191a(%rip), %rdi      # 0x3543
leaq 0x1c45(%rip), %rdx      # 0x3875
xorl %eax, %eax
movl $0x13, %esi
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x13, %eax
andl $0x1, %eax
movl %eax, %ecx
movq %rcx, -0x50(%rbp)
testl %eax, %eax
je 0x1c5d
jmp 0x1c51
movq -0x50(%rbp), %rax
subq $0x1, %rax
je 0x1c74
jmp 0x1c89
leaq 0x18b0(%rip), %rdi      # 0x3514
leaq 0x1c21(%rip), %rsi      # 0x388c
movb $0x0, %al
callq 0x1060
jmp 0x1c89
leaq 0x1899(%rip), %rdi      # 0x3514
leaq 0x1c2d(%rip), %rsi      # 0x38af
movb $0x0, %al
callq 0x1060
jmp 0x1c8b
jmp 0x1c8d
movl -0x4(%rbp), %eax
shrl $0x12, %eax
andl $0x1, %eax
movl %eax, %ecx
leaq 0x18a4(%rip), %rdi      # 0x3543
leaq 0x1c1f(%rip), %rdx      # 0x38c5
xorl %eax, %eax
movl $0x12, %esi
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x12, %eax
andl $0x1, %eax
movl %eax, %ecx
movq %rcx, -0x58(%rbp)
testl %eax, %eax
je 0x1cd3
jmp 0x1cc7
movq -0x58(%rbp), %rax
subq $0x1, %rax
je 0x1cea
jmp 0x1cff
leaq 0x183a(%rip), %rdi      # 0x3514
leaq 0x1bfb(%rip), %rsi      # 0x38dc
movb $0x0, %al
callq 0x1060
jmp 0x1cff
leaq 0x1823(%rip), %rdi      # 0x3514
leaq 0x1bff(%rip), %rsi      # 0x38f7
movb $0x0, %al
callq 0x1060
jmp 0x1d01
jmp 0x1d03
movl -0x4(%rbp), %eax
shrl $0x11, %eax
andl $0x1, %eax
movl %eax, %ecx
leaq 0x182e(%rip), %rdi      # 0x3543
leaq 0x1bf1(%rip), %rdx      # 0x390d
xorl %eax, %eax
movl $0x11, %esi
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x11, %eax
andl $0x1, %eax
movl %eax, %ecx
movq %rcx, -0x60(%rbp)
testl %eax, %eax
je 0x1d49
jmp 0x1d3d
movq -0x60(%rbp), %rax
subq $0x1, %rax
je 0x1d60
jmp 0x1d75
leaq 0x17c4(%rip), %rdi      # 0x3514
leaq 0x1bcd(%rip), %rsi      # 0x3924
movb $0x0, %al
callq 0x1060
jmp 0x1d75
leaq 0x17ad(%rip), %rdi      # 0x3514
leaq 0x1b89(%rip), %rsi      # 0x38f7
movb $0x0, %al
callq 0x1060
jmp 0x1d77
movl -0x4(%rbp), %eax
shrl $0xa, %eax
andl $0x7, %eax
movl %eax, %esi
leaq 0x1bb6(%rip), %rdi      # 0x393f
xorl %eax, %eax
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0xa, %eax
andl $0x7, %eax
movl %eax, %ecx
movq %rcx, -0x68(%rbp)
subl $0x5, %eax
ja 0x1e18
movq -0x68(%rbp), %rax
leaq 0x1365(%rip), %rcx      # 0x3114
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1bb2(%rip), %rdi      # 0x3971
movb $0x0, %al
callq 0x1060
jmp 0x1e26
leaq 0x1bbb(%rip), %rdi      # 0x398a
movb $0x0, %al
callq 0x1060
jmp 0x1e26
leaq 0x1be1(%rip), %rdi      # 0x39c0
movb $0x0, %al
callq 0x1060
jmp 0x1e26
leaq 0x1c07(%rip), %rdi      # 0x39f6
movb $0x0, %al
callq 0x1060
jmp 0x1e26
leaq 0x1c2d(%rip), %rdi      # 0x3a2c
movb $0x0, %al
callq 0x1060
jmp 0x1e26
leaq 0x1c53(%rip), %rdi      # 0x3a62
movb $0x0, %al
callq 0x1060
jmp 0x1e26
leaq 0x1c79(%rip), %rdi      # 0x3a98
movb $0x0, %al
callq 0x1060
jmp 0x1e28
movl -0x4(%rbp), %eax
shrl $0x9, %eax
andl $0x1, %eax
movl %eax, %ecx
leaq 0x1709(%rip), %rdi      # 0x3543
leaq 0x1c65(%rip), %rdx      # 0x3aa6
xorl %eax, %eax
movl $0x9, %esi
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x9, %eax
andl $0x1, %eax
movl %eax, %ecx
movq %rcx, -0x70(%rbp)
testl %eax, %eax
je 0x1e6e
jmp 0x1e62
movq -0x70(%rbp), %rax
subq $0x1, %rax
je 0x1e85
jmp 0x1e9a
leaq 0x169f(%rip), %rdi      # 0x3514
leaq 0x1c3c(%rip), %rsi      # 0x3ab8
movb $0x0, %al
callq 0x1060
jmp 0x1e9a
leaq 0x1688(%rip), %rdi      # 0x3514
leaq 0x1c5c(%rip), %rsi      # 0x3aef
movb $0x0, %al
callq 0x1060
jmp 0x1e9c
jmp 0x1e9e
movl -0x4(%rbp), %eax
shrl $0x8, %eax
andl $0x1, %eax
movl %eax, %ecx
leaq 0x1693(%rip), %rdi      # 0x3543
leaq 0x1c5c(%rip), %rdx      # 0x3b13
xorl %eax, %eax
movl $0x8, %esi
callq 0x1060
movl -0x4(%rbp), %eax
shrl $0x8, %eax
andl $0x1, %eax
movl %eax, %ecx
movq %rcx, -0x78(%rbp)
testl %eax, %eax
je 0x1ee4
jmp 0x1ed8
movq -0x78(%rbp), %rax
subq $0x1, %rax
je 0x1efb
jmp 0x1f10
leaq 0x1629(%rip), %rdi      # 0x3514
leaq 0x1c33(%rip), %rsi      # 0x3b25
movb $0x0, %al
callq 0x1060
jmp 0x1f10
leaq 0x1612(%rip), %rdi      # 0x3514
leaq 0x1c54(%rip), %rsi      # 0x3b5d
movb $0x0, %al
callq 0x1060
jmp 0x1f12
jmp 0x1f14
movl -0x4(%rbp), %eax
andl $0x2, %eax
shrl %eax
movl %eax, %ecx
leaq 0x161e(%rip), %rdi      # 0x3543
leaq 0x1c56(%rip), %rdx      # 0x3b82
xorl %eax, %eax
movl $0x1, %esi
callq 0x1060
movl -0x4(%rbp), %eax
andl $0x2, %eax
shrl %eax
movl %eax, %ecx
movq %rcx, -0x80(%rbp)
testl %eax, %eax
je 0x1f58
jmp 0x1f4c
movq -0x80(%rbp), %rax
subq $0x1, %rax
je 0x1f6f
jmp 0x1f84
leaq 0x15b5(%rip), %rdi      # 0x3514
leaq 0x1c2c(%rip), %rsi      # 0x3b92
movb $0x0, %al
callq 0x1060
jmp 0x1f84
leaq 0x159e(%rip), %rdi      # 0x3514
leaq 0x1c15(%rip), %rsi      # 0x3b92
movb $0x0, %al
callq 0x1060
jmp 0x1f86
jmp 0x1f88
movl -0x4(%rbp), %eax
andl $0x1, %eax
movl %eax, %ecx
leaq 0x15ac(%rip), %rdi      # 0x3543
leaq 0x1c12(%rip), %rdx      # 0x3bb0
xorl %esi, %esi
movb %sil, %al
callq 0x1060
movl -0x4(%rbp), %eax
andq $0x1, %rax
movq %rax, -0x88(%rbp)
je 0x1fc9
jmp 0x1fba
movq -0x88(%rbp), %rax
subq $0x1, %rax
je 0x1fe0
jmp 0x1ff5
leaq 0x1544(%rip), %rdi      # 0x3514
leaq 0x1be9(%rip), %rsi      # 0x3bc0
movb $0x0, %al
callq 0x1060
jmp 0x1ff5
leaq 0x152d(%rip), %rdi      # 0x3514
leaq 0x1bf9(%rip), %rsi      # 0x3be7
movb $0x0, %al
callq 0x1060
jmp 0x1ff7
leaq 0x1c10(%rip), %rdi      # 0x3c0e
movb $0x0, %al
callq 0x1060
addq $0x90, %rsp
popq %rbp
retq
nop