#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_inpin(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) +
                              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_inpin>:
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,%eax
shl    %cl,%eax
mov    -0x4(%rbp),%ecx
shr    $0x5,%ecx
imul   $0x28,%ecx,%ecx
mov    %ecx,%ecx
mov    $0x1e26000,%edx
mov    0x10(%rdx,%rcx,1),%edx
or     %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_inpin>:
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
shr    $0x2,%ebx
and    $0xfffffff8,%ebx
lea    (%rbx,%rbx,4),%ecx
or     %eax,0x1e26010(%rcx)
movl   $0x0,0x1c14038
movl   $0x0,0x1c1403c
pop    %rbx
ret

LLVM IR (-O0):
define void @gpio_init_inpin(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 0
%14 = bitcast i8* %13 to i32*
%15 = load volatile i32, i32* %14
%16 = or i32 %15, %7
store volatile i32 %16, i32* %14
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_inpin(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 = bitcast i8* %8 to i32*
%10 = load volatile i32, i32* %9
%11 = or i32 %10, %4
store volatile i32 %11, i32* %9
store volatile i32 0, i32* inttoptr (i64 29442104 to i32*)
store volatile i32 0, i32* inttoptr (i64 29442108 to i32*)
ret void
}