xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sys_reboot(char const *);
int main(int argc, char *argv[]) {
  const char *cmd = "";
  if (argc > 1) {
    cmd = argv[1];
  }
  sys_reboot(cmd);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1147 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <sys_reboot@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     111c <main+0xc>
mov    0x8(%rsi),%rdi
jmp    1123 <main+0x13>
lea    0xedd(%rip),%rdi
call   1030 <sys_reboot@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
store i8* %12, i8** %6
br label %13
13: ; preds = %9, %2
%14 = load i8*, i8** %6
%15 = call i32 @sys_reboot(i8* %14)
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
br label %7
7: ; preds = %4, %2
%8 = phi i8* [ %6, %4 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %2 ]
%9 = tail call i32 @sys_reboot(i8* %8)
ret i32 0
}
int u_fl(const float x) { return (int)x - (x < (int)x); }


x86 assembly (clang, -O0):
<u_fl>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
movss  -0x4(%rbp),%xmm1
cvttss2si -0x4(%rbp),%ecx
cvtsi2ss %ecx,%xmm0
ucomiss %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<u_fl>:
cvttss2si %xmm0,%eax
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @u_fl(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fptosi float %3 to i32
%5 = load float, float* %2
%6 = load float, float* %2
%7 = fptosi float %6 to i32
%8 = sitofp i32 %7 to float
%9 = fcmp olt float %5, %8
%10 = zext i1 %9 to i32
%11 = sub nsw i32 %4, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @u_fl(float %0) {
%2 = fptosi float %0 to i32
%3 = sitofp i32 %2 to float
%4 = fcmp ogt float %3, %0
%5 = sext i1 %4 to i32
%6 = add i32 %5, %2
ret i32 %6
}
void *ioport_map(unsigned long port, unsigned int len) { return (void *)port; }


x86 assembly (clang, -O0):
<ioport_map>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ioport_map>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @ioport_map(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
define i8* @ioport_map(i64 %0, i32 %1) {
%3 = inttoptr i64 %0 to i8*
ret i8* %3
}
void ft_strclr(char *s) {
  if (s) {
    while (*s)
      *s++ = 0;
  }
}


x86 assembly (clang, -O0):
<ft_strclr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1141 <ft_strclr+0x41>
jmp    1118 <ft_strclr+0x18>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113c <ft_strclr+0x3c>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
jmp    1118 <ft_strclr+0x18>
jmp    1141 <ft_strclr+0x41>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strclr>:
test   %rdi,%rdi
je     111d <ft_strclr+0x1d>
cmpb   $0x0,(%rdi)
je     111d <ft_strclr+0x1d>
add    $0x1,%rdi
xchg   %ax,%ax
movb   $0x0,-0x1(%rdi)
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <ft_strclr+0x10>
ret

LLVM IR (-O0):
define void @ft_strclr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %14
5: ; preds = %1
br label %6
6: ; preds = %10, %5
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
store i8 0, i8* %11
br label %6
13: ; preds = %6
br label %14
14: ; preds = %13, %1
ret void
}

LLVM IR (-O2):
define void @ft_strclr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %8, %6 ], [ %0, %3 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 0, i8* %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %3, %1
ret void
}
/* Variables and functions */
void exit(int status) {
  while (true) {
    (void)status;
  }
}


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <exit+0x7>

x86 assembly (clang, -O2):
<exit>:
jmp    1100 <exit>

LLVM IR (-O0):
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %3
%4 = load i32, i32* %2
br label %3
}

LLVM IR (-O2):
define void @exit(i32 %0) {
br label %2
2: ; preds = %1, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ vt100TextColor(int, int /*<<< orphan*/);
int /*<<< orphan*/ vt100TextDefault();
void PrintSuccessMessage(const char *msg) {
  vt100TextColor(2, 0);
  printf("%s\r\n", msg);
  vt100TextDefault();
}


x86 assembly (clang, -O0):
<PrintSuccessMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <vt100TextColor@plt>
mov    -0x8(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <vt100TextDefault@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintSuccessMessage>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <vt100TextColor@plt>
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <vt100TextDefault@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%s\0D\0A\00"
define void @PrintSuccessMessage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @vt100TextColor(i32 2, i32 0)
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @vt100TextDefault()
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s\0D\0A\00"
define void @PrintSuccessMessage(i8* %0) {
%2 = tail call i32 @vt100TextColor(i32 2, i32 0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @vt100TextDefault()
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int compare_name(void *a, void *b) { return strcmp((char *)a, (char *)b); }


x86 assembly (clang, -O0):
<compare_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_name>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @compare_name(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @compare_name(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int arch_audio_codec_read(int);
int arch_audio_power_read(int reg) {
  int ret = 0;
  ret = arch_audio_codec_read(reg);
  return ret;
}


x86 assembly (clang, -O0):
<arch_audio_power_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <arch_audio_codec_read@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_audio_power_read>:
jmp    1030 <arch_audio_codec_read@plt>

LLVM IR (-O0):
define i32 @arch_audio_power_read(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @arch_audio_codec_read(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @arch_audio_power_read(i32 %0) {
%2 = tail call i32 @arch_audio_codec_read(i32 %0)
ret i32 %2
}
void MMU_InvalidateTlbInstructionsAll(void) {}


x86 assembly (clang, -O0):
<MMU_InvalidateTlbInstructionsAll>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMU_InvalidateTlbInstructionsAll>:
ret

LLVM IR (-O0):
define void @MMU_InvalidateTlbInstructionsAll() {
ret void
}

LLVM IR (-O2):
define void @MMU_InvalidateTlbInstructionsAll() {
ret void
}
int gcd(int u, int v) {
  int x;
  int y;
  if (v == 0)
    return u;
  else
    return gcd(v, u - u / v * v);
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1133 <gcd+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114e <gcd+0x3e>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
imul   -0xc(%rbp),%eax
sub    %eax,%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gcd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* %4
store i32 %11, i32* %3
br label %22
12: ; preds = %2
%13 = load i32, i32* %5
%14 = load i32, i32* %4
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = sdiv i32 %15, %16
%18 = load i32, i32* %5
%19 = mul nsw i32 %17, %18
%20 = sub nsw i32 %14, %19
%21 = call i32 @gcd(i32 %13, i32 %20)
store i32 %21, i32* %3
br label %22
22: ; preds = %12, %10
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %5, %4 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ gf2_matrix_times(int /*<<< orphan*/ *, int /*<<< orphan*/);
void gf2_matrix_square(uint32_t *square, uint32_t *mat) {
  int n;
  for (n = 0; n < 32; n++)
    square[n] = gf2_matrix_times(mat, mat[n]);
}


x86 assembly (clang, -O0):
<gf2_matrix_square>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x20,-0x14(%rbp)
jge    1160 <gf2_matrix_square+0x50>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1030 <gf2_matrix_times@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <gf2_matrix_square+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf2_matrix_square>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r15,%rbx,4),%esi
mov    %r15,%rdi
call   1030 <gf2_matrix_times@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    1120 <gf2_matrix_square+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @gf2_matrix_square(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %21, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 32
br i1 %8, label %9, label %24
9: ; preds = %6
%10 = load i32*, i32** %4
%11 = load i32*, i32** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @gf2_matrix_times(i32* %10, i32 %15)
%17 = load i32*, i32** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
store i32 %16, i32* %20
br label %21
21: ; preds = %9
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %6
24: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @gf2_matrix_square(i32* nocapture writeonly %0, i32* %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %9, %3 ]
%5 = getelementptr inbounds i32, i32* %1, i64 %4
%6 = load i32, i32* %5
%7 = tail call i32 @gf2_matrix_times(i32* %1, i32 %6)
%8 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %7, i32* %8
%9 = add nuw nsw i64 %4, 1
%10 = icmp eq i64 %9, 32
br i1 %10, label %11, label %3
11: ; preds = %3
ret void
}
/* Variables and functions */
int factorial(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("Factorial of 4 is: %d\n", factorial(4));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <factorial@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1030 <factorial@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Factorial of 4 is: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @factorial(i32 4)
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Factorial of 4 is: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @factorial(i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
char *ctime_r(scalar_t__ const *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, long long);
char *cdf_ctime(const time_t *sec, char *buf) {
  char *ptr = ctime_r(sec, buf);
  if (ptr != NULL)
    return buf;
  (void)snprintf(buf, 26,
                 "*Bad* 0x%16.16"
                 "ll"
                 "x\n",
                 (long long)*sec);
  return buf;
}


x86 assembly (clang, -O0):
<cdf_ctime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <ctime_r@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1159 <cdf_ctime+0x39>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    117d <cdf_ctime+0x5d>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    $0x1a,%esi
lea    0xe90(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdf_ctime>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1040 <ctime_r@plt>
test   %rax,%rax
jne    114b <cdf_ctime+0x2b>
mov    (%r14),%rcx
lea    0xec2(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1a,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [19 x i8] c"*Bad* 0x%16.16llx\0A\00"
define i8* @cdf_ctime(i64* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i64*
%5 = alloca i8*
%6 = alloca i8*
store i64* %0, i64** %4
store i8* %1, i8** %5
%7 = load i64*, i64** %4
%8 = load i8*, i8** %5
%9 = call i8* @ctime_r(i64* %7, i8* %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i8*, i8** %5
store i8* %13, i8** %3
br label %20
14: ; preds = %2
%15 = load i8*, i8** %5
%16 = load i64*, i64** %4
%17 = load i64, i64* %16
%18 = call i32 @snprintf(i8* %15, i32 26, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 %17)
%19 = load i8*, i8** %5
store i8* %19, i8** %3
br label %20
20: ; preds = %14, %12
%21 = load i8*, i8** %3
ret i8* %21
}

LLVM IR (-O2):
@.str = [19 x i8] c"*Bad* 0x%16.16llx\0A\00"
define i8* @cdf_ctime(i64* %0, i8* returned %1) {
%3 = tail call i8* @ctime_r(i64* %0, i8* %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i64, i64* %0
%7 = tail call i32 @snprintf(i8* %1, i32 26, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 %6)
br label %8
8: ; preds = %2, %5
ret i8* %1
}
/* Variables and functions */
char get_c();
int /*<<< orphan*/ isdigit(char);
int /*<<< orphan*/ put_i(int /*<<< orphan*/);
int /*<<< orphan*/ put_s(char *);
void main() {
  char c;
  put_s("c=");
  c = get_c();
  put_i(isdigit(c));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1040 <put_s@plt>
mov    $0x0,%al
call   1060 <get_c@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
mov    %eax,%edi
call   1050 <put_i@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <put_s@plt>
xor    %eax,%eax
call   1060 <get_c@plt>
movsbl %al,%edi
call   1030 <isdigit@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <put_i@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"c=\00"
define void @main() {
%1 = alloca i8
%2 = call i32 @put_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = call signext i8 (...) @get_c()
store i8 %3, i8* %1
%4 = load i8, i8* %1
%5 = call i32 @isdigit(i8 signext %4)
%6 = call i32 @put_i(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"c=\00"
define void @main() {
%1 = tail call i32 @put_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @get_c()
%3 = tail call i32 @isdigit(i8 signext %2)
%4 = tail call i32 @put_i(i32 %3)
ret void
}
/* Type definitions */
struct usocket {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int urecv(struct usocket *sock, void *buf, size_t len) {
  assert(sock != NULL);
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<urecv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%ecx
mov    0x2e92(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<urecv>:
push   %rax
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
mov    %eax,%edi
call   1030 <assert@plt>
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
mov    0x2ea8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.usocket = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @urecv(%struct.usocket* %0, i8* %1, i64 %2) {
%4 = alloca %struct.usocket*
%5 = alloca i8*
%6 = alloca i64
store %struct.usocket* %0, %struct.usocket** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load %struct.usocket*, %struct.usocket** %4
%8 = icmp ne %struct.usocket* %7, null
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* @ENOSYS
store i32 %11, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.usocket = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @urecv(%struct.usocket* readnone %0, i8* nocapture readnone %1, i64 %2) {
%4 = icmp ne %struct.usocket* %0, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = load i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i32 -1
}
__attribute__((no, noclone)) long long f4(int x) { return ((long long)x) << 4; }


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
movslq %edi,%rax
shl    $0x4,%rax
ret

LLVM IR (-O0):
define i64 @f4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = shl i64 %4, 4
ret i64 %5
}

LLVM IR (-O2):
define i64 @f4(i32 %0) {
%2 = sext i32 %0 to i64
%3 = shl nsw i64 %2, 4
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void VM_flush(void) { fflush(stdout); }


x86 assembly (clang, -O0):
<VM_flush>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<VM_flush>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @VM_flush() {
%1 = load i32, i32* @stdout
%2 = call i32 @fflush(i32 %1)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @VM_flush() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fflush(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _uint2str(unsigned long, char *);
char *uint2str(unsigned long val, char *out) {
  _uint2str(val, out);
  return out;
}


x86 assembly (clang, -O0):
<uint2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <_uint2str@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint2str>:
push   %rbx
mov    %rsi,%rbx
call   1030 <_uint2str@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @uint2str(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i64, i64* %3
%6 = load i8*, i8** %4
%7 = call i32 @_uint2str(i64 %5, i8* %6)
%8 = load i8*, i8** %4
ret i8* %8
}

LLVM IR (-O2):
define i8* @uint2str(i64 %0, i8* returned %1) {
%3 = tail call i32 @_uint2str(i64 %0, i8* %1)
ret i8* %1
}
void InicializaTabuleiro(char matriz[8][8]) {
  int i, j;
  for (i = 0; i <= 7; i++)
    for (j = 0; j <= 7; j++)
      matriz[i][j] = '-';
}


x86 assembly (clang, -O0):
<InicializaTabuleiro>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
jg     1162 <InicializaTabuleiro+0x62>
movl   $0x0,-0x10(%rbp)
cmpl   $0x7,-0x10(%rbp)
jg     114f <InicializaTabuleiro+0x4f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movb   $0x2d,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <InicializaTabuleiro+0x20>
jmp    1154 <InicializaTabuleiro+0x54>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <InicializaTabuleiro+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<InicializaTabuleiro>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @InicializaTabuleiro([8 x i8]* %0) {
%2 = alloca [8 x i8]*
%3 = alloca i32
%4 = alloca i32
store [8 x i8]* %0, [8 x i8]** %2
store i32 0, i32* %3
br label %5
5: ; preds = %24, %1
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 7
br i1 %7, label %8, label %27
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %20, %8
%10 = load i32, i32* %4
%11 = icmp sle i32 %10, 7
br i1 %11, label %12, label %23
12: ; preds = %9
%13 = load [8 x i8]*, [8 x i8]** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [8 x i8], [8 x i8]* %13, i64 %15
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [8 x i8], [8 x i8]* %16, i64 0, i64 %18
store i8 45, i8* %19
br label %20
20: ; preds = %12
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %9
23: ; preds = %9
br label %24
24: ; preds = %23
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %5
27: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @InicializaTabuleiro([8 x i8]* nocapture writeonly %0) {
%2 = getelementptr [8 x i8], [8 x i8]* %0, i64 0, i64 0
ret void
}
void gtk_text_buffer_delete_mark_by_name() {}


x86 assembly (clang, -O0):
<gtk_text_buffer_delete_mark_by_name>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_text_buffer_delete_mark_by_name>:
ret

LLVM IR (-O0):
define void @gtk_text_buffer_delete_mark_by_name() {
ret void
}

LLVM IR (-O2):
define void @gtk_text_buffer_delete_mark_by_name() {
ret void
}
__attribute__((always_)) int ecbdic_isspace(char c) {
  return (c == 0x40) || (c == 0x05) || (c == 0x15) || (c == 0x25) ||
         (c == 0x0b) || (c == 0x0c) || (c == 0x0d);
}


x86 assembly (clang, -O0):
<ecbdic_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x40,%ecx
mov    %al,-0x2(%rbp)
je     1183 <ecbdic_isspace+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5,%ecx
mov    %al,-0x2(%rbp)
je     1183 <ecbdic_isspace+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x15,%ecx
mov    %al,-0x2(%rbp)
je     1183 <ecbdic_isspace+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x25,%ecx
mov    %al,-0x2(%rbp)
je     1183 <ecbdic_isspace+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xb,%ecx
mov    %al,-0x2(%rbp)
je     1183 <ecbdic_isspace+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xc,%ecx
mov    %al,-0x2(%rbp)
je     1183 <ecbdic_isspace+0x83>
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ecbdic_isspace>:
lea    -0x5(%rdi),%ecx
cmp    $0x3b,%cl
ja     1121 <ecbdic_isspace+0x21>
mov    $0x1,%eax
movzbl %cl,%ecx
movabs $0x8000001000100c1,%rdx
bt     %rcx,%rdx
jae    1121 <ecbdic_isspace+0x21>
ret
xor    %eax,%eax
cmp    $0xd,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @ecbdic_isspace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 64
br i1 %5, label %30, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 5
br i1 %9, label %30, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 21
br i1 %13, label %30, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 37
br i1 %17, label %30, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 11
br i1 %21, label %30, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 12
br i1 %25, label %30, label %26
26: ; preds = %22
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 13
br label %30
30: ; preds = %26, %22, %18, %14, %10, %6, %1
%31 = phi i1 [ true, %22 ], [ true, %18 ], [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %29, %26 ]
%32 = zext i1 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @ecbdic_isspace(i8 signext %0) {
switch i8 %0, label %2 [
i8 64, label %5
i8 37, label %5
i8 21, label %5
i8 12, label %5
i8 11, label %5
i8 5, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 13
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
void INT_Excep_TPU5_TCI5V(void) {}


x86 assembly (clang, -O0):
<INT_Excep_TPU5_TCI5V>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<INT_Excep_TPU5_TCI5V>:
ret

LLVM IR (-O0):
define void @INT_Excep_TPU5_TCI5V() {
ret void
}

LLVM IR (-O2):
define void @INT_Excep_TPU5_TCI5V() {
ret void
}
main() { int x[] = {1, 2}; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
@__const.main.x = [2 x i32] [i32 1, i32 2]
define i32 @main() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void RealMainP$Scheduler$taskLoop(void) {
  SchedulerBasicP$Scheduler$taskLoop();
}


x86 assembly (clang, -O0):
<RealMainP$Scheduler$taskLoop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <SchedulerBasicP$Scheduler$taskLoop@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RealMainP$Scheduler$taskLoop>:
xor    %eax,%eax
jmp    1030 <SchedulerBasicP$Scheduler$taskLoop@plt>

LLVM IR (-O0):
define void @"RealMainP$Scheduler$taskLoop"() {
%1 = call i32 (...) @"SchedulerBasicP$Scheduler$taskLoop"()
ret void
}

LLVM IR (-O2):
define void @"RealMainP$Scheduler$taskLoop"() {
%1 = tail call i32 (...) @"SchedulerBasicP$Scheduler$taskLoop"()
ret void
}
int execute_request_key() { return 0; }


x86 assembly (clang, -O0):
<execute_request_key>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute_request_key>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @execute_request_key() {
ret i32 0
}

LLVM IR (-O2):
define i32 @execute_request_key() {
ret i32 0
}
int handleCommand_BaseScreen(int command) { return 0; }


x86 assembly (clang, -O0):
<handleCommand_BaseScreen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<handleCommand_BaseScreen>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @handleCommand_BaseScreen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @handleCommand_BaseScreen(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ reset_tty();
void timeout() {
  reset_tty();
  exit(0);
}


x86 assembly (clang, -O0):
<timeout>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <reset_tty@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<timeout>:
push   %rax
xor    %eax,%eax
call   1030 <reset_tty@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @timeout() {
%1 = call i32 (...) @reset_tty()
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @timeout() {
%1 = tail call i32 (...) @reset_tty()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ reply(int, char *, char *);
void nack(char *s) { reply(502, "%s command not implemented.", s); }


x86 assembly (clang, -O0):
<nack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1f6,%edi
lea    0xed4(%rip),%rsi
call   1030 <reply@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nack>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rsi
mov    $0x1f6,%edi
jmp    1030 <reply@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"%s command not implemented.\00"
define void @nack(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @reply(i32 502, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"%s command not implemented.\00"
define void @nack(i8* %0) {
%2 = tail call i32 @reply(i32 502, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void XrmGetResource() {}


x86 assembly (clang, -O0):
<XrmGetResource>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XrmGetResource>:
ret

LLVM IR (-O0):
define void @XrmGetResource() {
ret void
}

LLVM IR (-O2):
define void @XrmGetResource() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void close_file_handles(int argc, FILE **fh_in, FILE **fh_out) {
  switch (argc) {
  case 4:
    (void)fclose(*fh_out);
  case 3:
    (void)fclose(*fh_in);
  }
  *fh_in = NULL;
  *fh_out = NULL;
}


x86 assembly (clang, -O0):
<close_file_handles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x3,%eax
je     1154 <close_file_handles+0x44>
jmp    1137 <close_file_handles+0x27>
mov    -0x1c(%rbp),%eax
sub    $0x4,%eax
jne    1160 <close_file_handles+0x50>
jmp    1148 <close_file_handles+0x38>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1030 <fclose@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <fclose@plt>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_file_handles>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
cmp    $0x3,%edi
je     112c <close_file_handles+0x1c>
cmp    $0x4,%edi
jne    1134 <close_file_handles+0x24>
mov    (%r14),%rdi
call   1030 <fclose@plt>
mov    (%rbx),%rdi
call   1030 <fclose@plt>
movq   $0x0,(%rbx)
movq   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @close_file_handles(i32 %0, i32** %1, i32** %2) {
%4 = alloca i32
%5 = alloca i32**
%6 = alloca i32**
store i32 %0, i32* %4
store i32** %1, i32*** %5
store i32** %2, i32*** %6
%7 = load i32, i32* %4
switch i32 %7, label %16 [
i32 4, label %8
i32 3, label %12
]
8: ; preds = %3
%9 = load i32**, i32*** %6
%10 = load i32*, i32** %9
%11 = call i32 @fclose(i32* %10)
br label %12
12: ; preds = %3, %8
%13 = load i32**, i32*** %5
%14 = load i32*, i32** %13
%15 = call i32 @fclose(i32* %14)
br label %16
16: ; preds = %12, %3
%17 = load i32**, i32*** %5
store i32* null, i32** %17
%18 = load i32**, i32*** %6
store i32* null, i32** %18
ret void
}

LLVM IR (-O2):
define void @close_file_handles(i32 %0, i32** nocapture %1, i32** nocapture %2) {
switch i32 %0, label %10 [
i32 4, label %4
i32 3, label %7
]
4: ; preds = %3
%5 = load i32*, i32** %2
%6 = tail call i32 @fclose(i32* %5)
br label %7
7: ; preds = %3, %4
%8 = load i32*, i32** %1
%9 = tail call i32 @fclose(i32* %8)
br label %10
10: ; preds = %7, %3
store i32* null, i32** %1
store i32* null, i32** %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello, world.\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, world.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, world.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double __ocml_fma_rte_f64(double, double, double);
double __fma_rn(double x, double y, double z) {
  return __ocml_fma_rte_f64(x, y, z);
}


x86 assembly (clang, -O0):
<__fma_rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <__ocml_fma_rte_f64@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fma_rn>:
jmp    1030 <__ocml_fma_rte_f64@plt>

LLVM IR (-O0):
define double @__fma_rn(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call double @__ocml_fma_rte_f64(double %7, double %8, double %9)
ret double %10
}

LLVM IR (-O2):
define double @__fma_rn(double %0, double %1, double %2) {
%4 = tail call double @__ocml_fma_rte_f64(double %0, double %1, double %2)
ret double %4
}
int squareOf(int number) {
  int squared = number * number;
  return squared;
}


x86 assembly (clang, -O0):
<squareOf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<squareOf>:
mov    %edi,%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @squareOf(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = mul nsw i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @squareOf(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void ComparatorIntDisable(uint32_t ui32Base, uint32_t ui32Comp) {
  ;
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000008))) &= ~(1 << ui32Comp);
}


x86 assembly (clang, -O0):
<ComparatorIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
movslq %eax,%rdx
mov    -0x4(%rbp),%eax
add    $0x8,%eax
cltq
mov    (%rax),%rcx
and    %rdx,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComparatorIntDisable>:
mov    %esi,%ecx
mov    $0xfffffffe,%eax
rol    %cl,%eax
cltq
movslq %edi,%rcx
and    %rax,0x8(%rcx)
ret

LLVM IR (-O0):
define void @ComparatorIntDisable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 1, %5
%7 = xor i32 %6, -1
%8 = sext i32 %7 to i64
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 8
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i64*
%13 = load volatile i64, i64* %12
%14 = and i64 %13, %8
store volatile i64 %14, i64* %12
ret void
}

LLVM IR (-O2):
define void @ComparatorIntDisable(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = sext i32 %4 to i64
%6 = add nsw i32 %0, 8
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = and i64 %9, %5
store volatile i64 %10, i64* %8
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_resp2_reg(uint32_t *emmc) {
  uint32_t resp2 = *(emmc + 0x18 / 4);
  printf("RESP2:-----------------------------------------\n");
  printf("RESP2:             %#08X\n", resp2);
}


x86 assembly (clang, -O0):
<print_resp2_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
mov    %eax,-0xc(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_resp2_reg>:
push   %rbx
mov    0x18(%rdi),%ebx
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [49 x i8] c"RESP2:-----------------------------------------\0A\00"
@.str.1 = [26 x i8] c"RESP2: %X\0A\00"
define void @print_resp2_reg(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 6
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret void
}

LLVM IR (-O2):
@.str.1 = [26 x i8] c"RESP2: %X\0A\00"
@str = [48 x i8] c"RESP2:-----------------------------------------\00"
define void @print_resp2_reg(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 6
%3 = load i32, i32* %2
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ waitpid(int /*<<< orphan*/, int /*<<< orphan*/ *,
                   int /*<<< orphan*/);
void claimChildren() {
  pid_t pid;
  do {
    pid = waitpid(0, NULL, WNOHANG);
  } while (pid > 0);
}


x86 assembly (clang, -O0):
<claimChildren>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <waitpid@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jg     1118 <claimChildren+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<claimChildren>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
test   %rax,%rax
jg     1120 <claimChildren+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @claimChildren() {
%1 = alloca i64
br label %2
2: ; preds = %5, %0
%3 = load i32, i32* @WNOHANG
%4 = call i64 @waitpid(i32 0, i32* null, i32 %3)
store i64 %4, i64* %1
br label %5
5: ; preds = %2
%6 = load i64, i64* %1
%7 = icmp sgt i64 %6, 0
br i1 %7, label %2, label %8
8: ; preds = %5
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @claimChildren() {
br label %1
1: ; preds = %1, %0
%2 = load i32, i32* @WNOHANG
%3 = tail call i64 @waitpid(i32 0, i32* null, i32 %2)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((hotpatch(1000000, 1000001))) void hp4(void) {
  printf("hello, world!\n");
}


x86 assembly (clang, -O0):
<hp4>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hp4>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"hello, world!\0A\00"
define void @hp4() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"hello, world!\00"
define void @hp4() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
void security_inode_post_lookup(struct inode *inode, struct dentry *dentry) {}


x86 assembly (clang, -O0):
<security_inode_post_lookup>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<security_inode_post_lookup>:
ret

LLVM IR (-O0):
%struct.inode = type opaque
%struct.dentry = type opaque
define void @security_inode_post_lookup(%struct.inode* %0, %struct.dentry* %1) {
%3 = alloca %struct.inode*
%4 = alloca %struct.dentry*
store %struct.inode* %0, %struct.inode** %3
store %struct.dentry* %1, %struct.dentry** %4
ret void
}

LLVM IR (-O2):
%struct.inode = type opaque
%struct.dentry = type opaque
define void @security_inode_post_lookup(%struct.inode* nocapture %0, %struct.dentry* nocapture %1) {
ret void
}
int die_is_recursing_builtin(void) {
  static int dying;
  return dying++;
}


x86 assembly (clang, -O0):
<die_is_recursing_builtin>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2f0f(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<die_is_recursing_builtin>:
mov    0x2f1e(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f15(%rip)
ret

LLVM IR (-O0):
@die_is_recursing_builtin.dying = internal global i32 0
define i32 @die_is_recursing_builtin() {
%1 = load i32, i32* @die_is_recursing_builtin.dying
%2 = add nsw i32 %1, 1
store i32 %2, i32* @die_is_recursing_builtin.dying
ret i32 %1
}

LLVM IR (-O2):
@die_is_recursing_builtin.dying = internal unnamed_addr global i32 0
define i32 @die_is_recursing_builtin() {
%1 = load i32, i32* @die_is_recursing_builtin.dying
%2 = add nsw i32 %1, 1
store i32 %2, i32* @die_is_recursing_builtin.dying
ret i32 %1
}
/* Type definitions */
typedef int ptrdiff_t;

/* Variables and functions */
unsigned int hashf_void(const void *key) {
  return ((ptrdiff_t)key ^ ((ptrdiff_t)key >> 16));
}


x86 assembly (clang, -O0):
<hashf_void>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
sar    $0x10,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashf_void>:
mov    %edi,%eax
sar    $0x10,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @hashf_void(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i32
%5 = load i8*, i8** %2
%6 = ptrtoint i8* %5 to i32
%7 = ashr i32 %6, 16
%8 = xor i32 %4, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @hashf_void(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = ashr i32 %3, 16
%5 = xor i32 %4, %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_print_numbers(void) {
  char c;
  c = '0' - 1;
  while (++c <= '9')
    ft_putchar(c);
}


x86 assembly (clang, -O0):
<ft_print_numbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x2f,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
movsbl %al,%eax
cmp    $0x39,%eax
jg     113e <ft_print_numbers+0x2e>
movsbl -0x1(%rbp),%edi
call   1030 <ft_putchar@plt>
jmp    111c <ft_print_numbers+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_numbers>:
push   %rax
mov    $0x30,%edi
call   1030 <ft_putchar@plt>
mov    $0x31,%edi
call   1030 <ft_putchar@plt>
mov    $0x32,%edi
call   1030 <ft_putchar@plt>
mov    $0x33,%edi
call   1030 <ft_putchar@plt>
mov    $0x34,%edi
call   1030 <ft_putchar@plt>
mov    $0x35,%edi
call   1030 <ft_putchar@plt>
mov    $0x36,%edi
call   1030 <ft_putchar@plt>
mov    $0x37,%edi
call   1030 <ft_putchar@plt>
mov    $0x38,%edi
call   1030 <ft_putchar@plt>
mov    $0x39,%edi
pop    %rax
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_print_numbers() {
%1 = alloca i8
store i8 47, i8* %1
br label %2
2: ; preds = %7, %0
%3 = load i8, i8* %1
%4 = add i8 %3, 1
store i8 %4, i8* %1
%5 = sext i8 %4 to i32
%6 = icmp sle i32 %5, 57
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8, i8* %1
%9 = call i32 @ft_putchar(i8 signext %8)
br label %2
10: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @ft_print_numbers() {
%1 = tail call i32 @ft_putchar(i8 signext 48)
%2 = tail call i32 @ft_putchar(i8 signext 49)
%3 = tail call i32 @ft_putchar(i8 signext 50)
%4 = tail call i32 @ft_putchar(i8 signext 51)
%5 = tail call i32 @ft_putchar(i8 signext 52)
%6 = tail call i32 @ft_putchar(i8 signext 53)
%7 = tail call i32 @ft_putchar(i8 signext 54)
%8 = tail call i32 @ft_putchar(i8 signext 55)
%9 = tail call i32 @ft_putchar(i8 signext 56)
%10 = tail call i32 @ft_putchar(i8 signext 57)
ret void
}
void INT_Excep_PERIA_INTA244(void) {}


x86 assembly (clang, -O0):
<INT_Excep_PERIA_INTA244>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<INT_Excep_PERIA_INTA244>:
ret

LLVM IR (-O0):
define void @INT_Excep_PERIA_INTA244() {
ret void
}

LLVM IR (-O2):
define void @INT_Excep_PERIA_INTA244() {
ret void
}