// File: /workspace/github_cpp_makefile_star2_O3/merelin[P]mediasmartserverd/src/led_control_sch5127_base.h
// Function: LedControlSCH5127Base::setGpioSelInput_(int, int)
void setGpioSelInput_( int bits1, int bits2 ) {
		// Use Select (0 = native function, 1 = GPIO)
		{
			const unsigned int gpio_use_sel  = io_lpc_gpiobase_ + GPIO_USE_SEL;
			const unsigned int gpio_use_sel2 = io_lpc_gpiobase_ + GPIO_USE_SEL2;
			if ( ioperm(gpio_use_sel,  4, 1) ) throw ErrnoException("ioperm");
			if ( ioperm(gpio_use_sel2, 4, 1) ) throw ErrnoException("ioperm");
			
			outl( inl(gpio_use_sel)  | bits1, gpio_use_sel  );
			outl( inl(gpio_use_sel2) | bits2, gpio_use_sel2 );
			
			ioperm( gpio_use_sel, 4, 0 );
			ioperm( gpio_use_sel2, 4, 0 );
		}
		// Input/Output select (0 = Output, 1 = Input)
		{
			const unsigned int gp_io_sel  = io_lpc_gpiobase_ + GP_IO_SEL;
			const unsigned int gp_io_sel2 = io_lpc_gpiobase_ + GP_IO_SEL2;
			if ( ioperm(gp_io_sel,  4, 1) ) throw ErrnoException("ioperm");
			if ( ioperm(gp_io_sel2, 4, 1) ) throw ErrnoException("ioperm");
			
			outl( inl(gp_io_sel)  & ~bits1, gp_io_sel  );
			outl( inl(gp_io_sel2) & ~bits2, gp_io_sel2 );
			
			ioperm( gp_io_sel, 4, 0 );
			ioperm( gp_io_sel2, 4, 0 );
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl 0x8(%rdi), %r15d
movl $0x4, %esi
movq %r15, %rdi
movl $0x1, %edx
callq 0x44b0
testl %eax, %eax
jne 0x8f17
leal 0x30(%r15), %r13d
movl %r13d, %r12d
movl $0x4, %esi
movq %r12, %rdi
movl $0x1, %edx
callq 0x44b0
testl %eax, %eax
jne 0x8f79
movl %r15d, %edx
inl %dx, %eax
orl %ebp, %eax
outl %eax, %dx
movl %r13d, %edx
inl %dx, %eax
orl %ebx, %eax
outl %eax, %dx
movl $0x4, %esi
movq %r15, %rdi
xorl %edx, %edx
callq 0x44b0
movl $0x4, %esi
movq %r12, %rdi
xorl %edx, %edx
callq 0x44b0
movl 0x8(%r14), %r15d
leal 0x4(%r15), %r14d
movl $0x4, %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x44b0
testl %eax, %eax
jne 0x8fdb
addl $0x34, %r15d
movl %r15d, %r12d
movl $0x4, %esi
movq %r12, %rdi
movl $0x1, %edx
callq 0x44b0
testl %eax, %eax
jne 0x903a
movl %r14d, %edx
inl %dx, %eax
notl %ebp
andl %ebp, %eax
outl %eax, %dx
movl %r15d, %edx
inl %dx, %eax
notl %ebx
andl %ebx, %eax
outl %eax, %dx
movl $0x4, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x44b0
movl $0x4, %esi
movq %r12, %rdi
xorl %edx, %edx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x44b0
movl $0x10, %edi
callq 0x4140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2bee(%rip), %rsi      # 0xbb22
leaq 0x2bed(%rip), %rdx      # 0xbb28
leaq 0x8(%rsp), %rdi
callq 0x5e90
callq 0x4030
movl (%rax), %edx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5be6
xorl %ebp, %ebp
leaq 0x681b(%rip), %rsi      # 0xf780
movq 0x7034(%rip), %rdx      # 0xffa0
movq %rbx, %rdi
callq 0x4520
jmp 0x9097
movl $0x10, %edi
callq 0x4140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b8c(%rip), %rsi      # 0xbb22
leaq 0x2b8b(%rip), %rdx      # 0xbb28
leaq 0x8(%rsp), %rdi
callq 0x5e90
callq 0x4030
movl (%rax), %edx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5be6
xorl %ebp, %ebp
leaq 0x67b9(%rip), %rsi      # 0xf780
movq 0x6fd2(%rip), %rdx      # 0xffa0
movq %rbx, %rdi
callq 0x4520
jmp 0x9097
movl $0x10, %edi
callq 0x4140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2b2a(%rip), %rsi      # 0xbb22
leaq 0x2b29(%rip), %rdx      # 0xbb28
leaq 0x8(%rsp), %rdi
callq 0x5e90
callq 0x4030
movl (%rax), %edx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5be6
xorl %ebp, %ebp
leaq 0x6757(%rip), %rsi      # 0xf780
movq 0x6f70(%rip), %rdx      # 0xffa0
movq %rbx, %rdi
callq 0x4520
jmp 0x9097
movl $0x10, %edi
callq 0x4140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2acb(%rip), %rsi      # 0xbb22
leaq 0x2aca(%rip), %rdx      # 0xbb28
leaq 0x8(%rsp), %rdi
callq 0x5e90
callq 0x4030
movl (%rax), %edx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5be6
xorl %ebp, %ebp
leaq 0x66f8(%rip), %rsi      # 0xf780
movq 0x6f11(%rip), %rdx      # 0xffa0
movq %rbx, %rdi
callq 0x4520
jmp 0x90a3
jmp 0x90c4
jmp 0x90a3
jmp 0x90c4
jmp 0x90a3
jmp 0x90c4
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x90bd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42c0
testb %bpl, %bpl
jne 0x90c7
jmp 0x90cf
movq %rax, %r14
movq %rbx, %rdi
callq 0x41e0
movq %r14, %rdi
callq 0x4550
nop