#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,
                                              int /*<<< orphan*/);
int /*<<< orphan*/ odroid_xu_pin_lookup(int, unsigned int *, unsigned int *);
void odroid_xu_gpio_setup_all_output() {
  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, 1, 0);
  }
}


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

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

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

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