// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rdi
callq 0x44e0
testl %eax, %eax
jne 0x814a
leal 0x30(%r15), %r13d
movl %r13d, %r12d
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rdi
callq 0x44e0
testl %eax, %eax
jne 0x819f
movl %r15d, %edx
inl %dx, %eax
orl %ebp, %eax
outl %eax, %dx
movl %r13d, %edx
inl %dx, %eax
orl %ebx, %eax
outl %eax, %dx
pushq $0x4
popq %r13
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x44e0
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x44e0
movl 0x8(%r14), %r15d
leal 0x4(%r15), %r14d
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0x44e0
testl %eax, %eax
jne 0x81f4
addl $0x34, %r15d
movl %r15d, %r12d
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rdi
callq 0x44e0
testl %eax, %eax
jne 0x8246
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
pushq $0x4
popq %rbx
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x44e0
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x44e0
pushq $0x10
popq %rdi
callq 0x4160
movq %rax, %rbx
leaq 0x29ae(%rip), %rsi      # 0xab0a
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x5694
callq 0x4030
movl (%rax), %edx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x56d0
xorl %ebp, %ebp
leaq 0x7555(%rip), %rsi      # 0xf6e0
movq 0x7e0e(%rip), %rdx      # 0xffa0
movq %rbx, %rdi
callq 0x4530
jmp 0x8296
pushq $0x10
popq %rdi
callq 0x4160
movq %rax, %rbx
leaq 0x2959(%rip), %rsi      # 0xab0a
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x5694
callq 0x4030
movl (%rax), %edx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x56d0
xorl %ebp, %ebp
leaq 0x7500(%rip), %rsi      # 0xf6e0
movq 0x7db9(%rip), %rdx      # 0xffa0
movq %rbx, %rdi
callq 0x4530
jmp 0x8296
pushq $0x10
popq %rdi
callq 0x4160
movq %rax, %rbx
leaq 0x2904(%rip), %rsi      # 0xab0a
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x5694
callq 0x4030
movl (%rax), %edx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x56d0
xorl %ebp, %ebp
leaq 0x74ab(%rip), %rsi      # 0xf6e0
movq 0x7d64(%rip), %rdx      # 0xffa0
movq %rbx, %rdi
callq 0x4530
jmp 0x8296
pushq $0x10
popq %rdi
callq 0x4160
movq %rax, %rbx
leaq 0x28b2(%rip), %rsi      # 0xab0a
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x5694
callq 0x4030
movl (%rax), %edx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x56d0
xorl %ebp, %ebp
leaq 0x7459(%rip), %rsi      # 0xf6e0
movq 0x7d12(%rip), %rdx      # 0xffa0
movq %rbx, %rdi
callq 0x4530
jmp 0x82a2
jmp 0x82b6
jmp 0x82a2
jmp 0x82b6
jmp 0x82a2
jmp 0x82b6
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4150
testb %bpl, %bpl
jne 0x82b9
jmp 0x82c1
movq %rax, %r14
movq %rbx, %rdi
callq 0x4220
movq %r14, %rdi
callq 0x4550
nop