#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ exynos_5410_gpio_setup_pin(unsigned int, unsigned int,
                                              int /*<<< orphan*/, unsigned int);
int /*<<< orphan*/ odroid_xu_pin_lookup(int, unsigned int *, unsigned int *);
void odroid_xu_gpio_setup_all_input(unsigned int pullup) {
  unsigned int bank_offset, bit_index;
  for (int i = 13; i <= 27; i++) {
    odroid_xu_pin_lookup(i, &bank_offset, &bit_index);
    exynos_5410_gpio_setup_pin(bank_offset, 1U << bit_index, 0, pullup);
  }
}


x86 assembly (clang, -O0):
<odroid_xu_gpio_setup_all_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xd,-0x10(%rbp)
cmpl   $0x1b,-0x10(%rbp)
jg     1171 <odroid_xu_gpio_setup_all_input+0x51>
mov    -0x10(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <odroid_xu_pin_lookup@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x4(%rbp),%ecx
xor    %edx,%edx
call   1040 <exynos_5410_gpio_setup_pin@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1132 <odroid_xu_gpio_setup_all_input+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odroid_xu_gpio_setup_all_input>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xd,%ebp
lea    0x4(%rsp),%r14
mov    %rsp,%r15
cs nopw 0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <odroid_xu_pin_lookup@plt>
mov    0x4(%rsp),%edi
movzbl (%rsp),%ecx
mov    $0x1,%esi
shl    %cl,%esi
xor    %edx,%edx
mov    %ebx,%ecx
call   1040 <exynos_5410_gpio_setup_pin@plt>
add    $0x1,%ebp
cmp    $0x1c,%ebp
jne    1140 <odroid_xu_gpio_setup_all_input+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @odroid_xu_gpio_setup_all_input(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 13, i32* %5
br label %6
6: ; preds = %17, %1
%7 = load i32, i32* %5
%8 = icmp sle i32 %7, 27
br i1 %8, label %9, label %20
9: ; preds = %6
%10 = load i32, i32* %5
%11 = call i32 @odroid_xu_pin_lookup(i32 %10, i32* %3, i32* %4)
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = shl i32 1, %13
%15 = load i32, i32* %2
%16 = call i32 @exynos_5410_gpio_setup_pin(i32 %12, i32 %14, i32 0, i32 %15)
br label %17
17: ; preds = %9
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @odroid_xu_gpio_setup_all_input(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
br label %7
6: ; preds = %7
ret void
7: ; preds = %1, %7
%8 = phi i32 [ 13, %1 ], [ %14, %7 ]
%9 = call i32 @odroid_xu_pin_lookup(i32 %8, i32* %2, i32* %3)
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = shl nuw i32 1, %11
%13 = call i32 @exynos_5410_gpio_setup_pin(i32 %10, i32 %12, i32 0, i32 %0)
%14 = add nuw nsw i32 %8, 1
%15 = icmp eq i32 %14, 28
br i1 %15, label %6, label %7
}