#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*/ gpio_init_pin(unsigned int);
void gpio_init_outpin(unsigned int pin) {
  {
    (*((volatile unsigned int *)(((volatile void *)0x01C14000) + 0x38 +
                                 (0) * 0x4))) = 0x83E70B13;
    (*((volatile unsigned int *)(((volatile void *)0x01C14000) + 0x38 +
                                 (1) * 0x4))) = 0x95A4F1E0;
  };
  gpio_init_pin(pin);
  *((volatile unsigned int *)((((volatile void *)0x01E26000) + 0x10 +
                               (pin >> 5) * 0x28) +
                              0x0C)) = (1 << (pin & 0x1F));
  *((volatile unsigned int *)((((volatile void *)0x01E26000) + 0x10 +
                               (pin >> 5) * 0x28) +
                              0x00)) &= ~(1 << (pin & 0x1F));
  {
    (*((volatile unsigned int *)(((volatile void *)0x01C14000) + 0x38 +
                                 (0) * 0x4))) = 0x0;
    (*((volatile unsigned int *)(((volatile void *)0x01C14000) + 0x38 +
                                 (1) * 0x4))) = 0x0;
  };
}


x86 assembly (clang, -O0):
<gpio_init_outpin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1c14000,%eax
movl   $0x83e70b13,0x38(%rax)
mov    $0x1c14000,%eax
movl   $0x95a4f1e0,0x3c(%rax)
mov    -0x4(%rbp),%edi
call   1030 <gpio_init_pin@plt>
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x4(%rbp),%eax
shr    $0x5,%eax
imul   $0x28,%eax,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1e26000,%eax
mov    %edx,0x1c(%rax,%rcx,1)
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    -0x4(%rbp),%ecx
shr    $0x5,%ecx
imul   $0x28,%ecx,%ecx
mov    %ecx,%ecx
mov    $0x1e26000,%edx
mov    0x10(%rdx,%rcx,1),%edx
and    %eax,%edx
mov    $0x1e26000,%eax
mov    %edx,0x10(%rax,%rcx,1)
mov    $0x1c14000,%eax
movl   $0x0,0x38(%rax)
mov    $0x1c14000,%eax
movl   $0x0,0x3c(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_init_outpin>:
push   %rbx
mov    %edi,%ebx
movl   $0x83e70b13,0x1c14038
13 0b e7 83
movl   $0x95a4f1e0,0x1c1403c
e0 f1 a4 95
call   1030 <gpio_init_pin@plt>
mov    $0x1,%eax
mov    %ebx,%ecx
shl    %cl,%eax
mov    %ebx,%ecx
shr    $0x2,%ecx
and    $0xfffffff8,%ecx
lea    (%rcx,%rcx,4),%edx
mov    $0xfffffffe,%esi
mov    %ebx,%ecx
rol    %cl,%esi
mov    %eax,0x1e2601c(%rdx)
and    %esi,0x1e26010(%rdx)
movl   $0x0,0x1c14038
movl   $0x0,0x1c1403c
pop    %rbx
ret

LLVM IR (-O0):
define void @gpio_init_outpin(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
store volatile i32 -2082010349, i32* bitcast (i8* getelementptr (i8, i8* inttoptr (i64 29442048 to i8*), i64 56) to i32*)
store volatile i32 -1784352288, i32* bitcast (i8* getelementptr (i8, i8* inttoptr (i64 29442048 to i8*), i64 60) to i32*)
%3 = load i32, i32* %2
%4 = call i32 @gpio_init_pin(i32 %3)
%5 = load i32, i32* %2
%6 = and i32 %5, 31
%7 = shl i32 1, %6
%8 = load i32, i32* %2
%9 = lshr i32 %8, 5
%10 = mul i32 %9, 40
%11 = zext i32 %10 to i64
%12 = getelementptr i8, i8* getelementptr (i8, i8* inttoptr (i64 31612928 to i8*), i64 16), i64 %11
%13 = getelementptr i8, i8* %12, i64 12
%14 = bitcast i8* %13 to i32*
store volatile i32 %7, i32* %14
%15 = load i32, i32* %2
%16 = and i32 %15, 31
%17 = shl i32 1, %16
%18 = xor i32 %17, -1
%19 = load i32, i32* %2
%20 = lshr i32 %19, 5
%21 = mul i32 %20, 40
%22 = zext i32 %21 to i64
%23 = getelementptr i8, i8* getelementptr (i8, i8* inttoptr (i64 31612928 to i8*), i64 16), i64 %22
%24 = getelementptr i8, i8* %23, i64 0
%25 = bitcast i8* %24 to i32*
%26 = load volatile i32, i32* %25
%27 = and i32 %26, %18
store volatile i32 %27, i32* %25
store volatile i32 0, i32* bitcast (i8* getelementptr (i8, i8* inttoptr (i64 29442048 to i8*), i64 56) to i32*)
store volatile i32 0, i32* bitcast (i8* getelementptr (i8, i8* inttoptr (i64 29442048 to i8*), i64 60) to i32*)
ret void
}

LLVM IR (-O2):
define void @gpio_init_outpin(i32 %0) {
store volatile i32 -2082010349, i32* inttoptr (i64 29442104 to i32*)
store volatile i32 -1784352288, i32* inttoptr (i64 29442108 to i32*)
%2 = tail call i32 @gpio_init_pin(i32 %0)
%3 = and i32 %0, 31
%4 = shl nuw i32 1, %3
%5 = lshr i32 %0, 5
%6 = mul i32 %5, 40
%7 = zext i32 %6 to i64
%8 = getelementptr i8, i8* inttoptr (i64 31612944 to i8*), i64 %7
%9 = getelementptr i8, i8* %8, i64 12
%10 = bitcast i8* %9 to i32*
store volatile i32 %4, i32* %10
%11 = xor i32 %4, -1
%12 = bitcast i8* %8 to i32*
%13 = load volatile i32, i32* %12
%14 = and i32 %13, %11
store volatile i32 %14, i32* %12
store volatile i32 0, i32* inttoptr (i64 29442104 to i32*)
store volatile i32 0, i32* inttoptr (i64 29442108 to i32*)
ret void
}