#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 */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ iprintf(char *, int, int, int);
uint32_t bid_GetID(void) {
  int i;
  for (i = 0; i < 12; i++) {
    iprintf("ID #%d - 0x%x (%c)\n", i,
            ((i >= 0 && i < 12) ? (*(uint8_t *)(0x1FFFF7AC + (i))) : 0),
            ((i >= 0 && i < 12) ? (*(uint8_t *)(0x1FFFF7AC + (i))) : 0));
  }
  return ((0 >= 0 && 0 < 12) ? (*(uint8_t *)(0x1FFFF7AC + (0))) : 0) << 0 |
         ((1 >= 0 && 1 < 12) ? (*(uint8_t *)(0x1FFFF7AC + (1))) : 0) << 8 |
         ((2 >= 0 && 2 < 12) ? (*(uint8_t *)(0x1FFFF7AC + (2))) : 0) << 16 |
         ((3 >= 0 && 3 < 12) ? (*(uint8_t *)(0x1FFFF7AC + (3))) : 0) << 24;
}


x86 assembly (clang, -O0):
<bid_GetID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xc,-0x4(%rbp)
jge    11bc <bid_GetID+0xac>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1157 <bid_GetID+0x47>
cmpl   $0xc,-0x4(%rbp)
jge    1157 <bid_GetID+0x47>
mov    -0x4(%rbp),%eax
add    $0x1ffff7ac,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    1161 <bid_GetID+0x51>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1161 <bid_GetID+0x51>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     118f <bid_GetID+0x7f>
cmpl   $0xc,-0x4(%rbp)
jge    118f <bid_GetID+0x7f>
mov    -0x4(%rbp),%eax
add    $0x1ffff7ac,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1199 <bid_GetID+0x89>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1199 <bid_GetID+0x89>
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%esi
mov    -0x14(%rbp),%ecx
lea    0xe57(%rip),%rdi
call   1030 <iprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <bid_GetID+0xf>
mov    $0x1ffff7ac,%eax
mov    (%rax),%eax
shl    $0x0,%eax
mov    $0x1ffff7ad,%ecx
mov    (%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    $0x1ffff7ae,%ecx
mov    (%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    $0x1ffff7af,%ecx
mov    (%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bid_GetID>:
push   %rbx
mov    0x1ffff7ac,%ecx
lea    0xee1(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ecx,%edx
call   1030 <iprintf@plt>
mov    0x1ffff7ad,%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %ecx,%edx
call   1030 <iprintf@plt>
mov    0x1ffff7ae,%ecx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    %ecx,%edx
call   1030 <iprintf@plt>
mov    0x1ffff7af,%ecx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    %ecx,%edx
call   1030 <iprintf@plt>
mov    0x1ffff7b0,%ecx
mov    %rbx,%rdi
mov    $0x4,%esi
mov    %ecx,%edx
call   1030 <iprintf@plt>
mov    0x1ffff7b1,%ecx
mov    %rbx,%rdi
mov    $0x5,%esi
mov    %ecx,%edx
call   1030 <iprintf@plt>
mov    0x1ffff7b2,%ecx
mov    %rbx,%rdi
mov    $0x6,%esi
mov    %ecx,%edx
call   1030 <iprintf@plt>
mov    0x1ffff7b3,%ecx
mov    %rbx,%rdi
mov    $0x7,%esi
mov    %ecx,%edx
call   1030 <iprintf@plt>
mov    0x1ffff7b4,%ecx
mov    %rbx,%rdi
mov    $0x8,%esi
mov    %ecx,%edx
call   1030 <iprintf@plt>
mov    0x1ffff7b5,%ecx
mov    %rbx,%rdi
mov    $0x9,%esi
mov    %ecx,%edx
call   1030 <iprintf@plt>
mov    0x1ffff7b6,%ecx
mov    %rbx,%rdi
mov    $0xa,%esi
mov    %ecx,%edx
call   1030 <iprintf@plt>
mov    0x1ffff7b7,%ecx
mov    %rbx,%rdi
mov    $0xb,%esi
mov    %ecx,%edx
call   1030 <iprintf@plt>
mov    0x1ffff7ad,%ecx
mov    0x1ffff7ae,%edx
shl    $0x8,%ecx
or     0x1ffff7ac,%ecx
shl    $0x10,%edx
mov    0x1ffff7af,%eax
shl    $0x18,%eax
or     %edx,%eax
or     %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"ID #%d - 0x%x (%c)\0A\00"
define i32 @bid_GetID() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %36, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 12
br i1 %4, label %5, label %39
5: ; preds = %2
%6 = load i32, i32* %1
%7 = load i32, i32* %1
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = load i32, i32* %1
%11 = icmp slt i32 %10, 12
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = load i32, i32* %1
%14 = add nsw i32 536868780, %13
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
%17 = load i32, i32* %16
br label %19
18: ; preds = %9, %5
br label %19
19: ; preds = %18, %12
%20 = phi i32 [ %17, %12 ], [ 0, %18 ]
%21 = load i32, i32* %1
%22 = icmp sge i32 %21, 0
br i1 %22, label %23, label %32
23: ; preds = %19
%24 = load i32, i32* %1
%25 = icmp slt i32 %24, 12
br i1 %25, label %26, label %32
26: ; preds = %23
%27 = load i32, i32* %1
%28 = add nsw i32 536868780, %27
%29 = sext i32 %28 to i64
%30 = inttoptr i64 %29 to i32*
%31 = load i32, i32* %30
br label %33
32: ; preds = %23, %19
br label %33
33: ; preds = %32, %26
%34 = phi i32 [ %31, %26 ], [ 0, %32 ]
%35 = call i32 @iprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %20, i32 %34)
br label %36
36: ; preds = %33
%37 = load i32, i32* %1
%38 = add nsw i32 %37, 1
store i32 %38, i32* %1
br label %2
39: ; preds = %2
%40 = load i32, i32* inttoptr (i64 536868780 to i32*)
%41 = shl i32 %40, 0
%42 = load i32, i32* inttoptr (i64 536868781 to i32*)
%43 = shl i32 %42, 8
%44 = or i32 %41, %43
%45 = load i32, i32* inttoptr (i64 536868782 to i32*)
%46 = shl i32 %45, 16
%47 = or i32 %44, %46
%48 = load i32, i32* inttoptr (i64 536868783 to i32*)
%49 = shl i32 %48, 24
%50 = or i32 %47, %49
ret i32 %50
}

LLVM IR (-O2):
@.str = [20 x i8] c"ID #%d - 0x%x (%c)\0A\00"
define i32 @bid_GetID() {
%1 = load i32, i32* inttoptr (i64 536868780 to i32*)
%2 = tail call i32 @iprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 0, i32 %1, i32 %1)
%3 = load i32, i32* inttoptr (i64 536868781 to i32*)
%4 = tail call i32 @iprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 1, i32 %3, i32 %3)
%5 = load i32, i32* inttoptr (i64 536868782 to i32*)
%6 = tail call i32 @iprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 2, i32 %5, i32 %5)
%7 = load i32, i32* inttoptr (i64 536868783 to i32*)
%8 = tail call i32 @iprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 3, i32 %7, i32 %7)
%9 = load i32, i32* inttoptr (i64 536868784 to i32*)
%10 = tail call i32 @iprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 4, i32 %9, i32 %9)
%11 = load i32, i32* inttoptr (i64 536868785 to i32*)
%12 = tail call i32 @iprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 5, i32 %11, i32 %11)
%13 = load i32, i32* inttoptr (i64 536868786 to i32*)
%14 = tail call i32 @iprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 6, i32 %13, i32 %13)
%15 = load i32, i32* inttoptr (i64 536868787 to i32*)
%16 = tail call i32 @iprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 7, i32 %15, i32 %15)
%17 = load i32, i32* inttoptr (i64 536868788 to i32*)
%18 = tail call i32 @iprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 8, i32 %17, i32 %17)
%19 = load i32, i32* inttoptr (i64 536868789 to i32*)
%20 = tail call i32 @iprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 9, i32 %19, i32 %19)
%21 = load i32, i32* inttoptr (i64 536868790 to i32*)
%22 = tail call i32 @iprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 10, i32 %21, i32 %21)
%23 = load i32, i32* inttoptr (i64 536868791 to i32*)
%24 = tail call i32 @iprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 11, i32 %23, i32 %23)
%25 = load i32, i32* inttoptr (i64 536868780 to i32*)
%26 = load i32, i32* inttoptr (i64 536868781 to i32*)
%27 = shl i32 %26, 8
%28 = or i32 %27, %25
%29 = load i32, i32* inttoptr (i64 536868782 to i32*)
%30 = shl i32 %29, 16
%31 = or i32 %28, %30
%32 = load i32, i32* inttoptr (i64 536868783 to i32*)
%33 = shl i32 %32, 24
%34 = or i32 %31, %33
ret i32 %34
}