xunge/DecIR huggingface dataset:
int get_min(int a, int b) {
  int smaller = (a < b) ? a : b;
  return smaller;
}


x86 assembly (clang, -O0):
<get_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <get_min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1127 <get_min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @get_min(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %4
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
store i32 %14, i32* %5
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @get_min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int StatutBoutonPlosible(int statutBouton) {
  if (statutBouton == 1 || statutBouton == 0) {
    return 200;
  } else {
    return 400;
  }
}


x86 assembly (clang, -O0):
<StatutBoutonPlosible>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     111b <StatutBoutonPlosible+0x1b>
cmpl   $0x0,-0x8(%rbp)
jne    1127 <StatutBoutonPlosible+0x27>
movl   $0xc8,-0x4(%rbp)
jmp    112e <StatutBoutonPlosible+0x2e>
movl   $0x190,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<StatutBoutonPlosible>:
cmp    $0x2,%edi
mov    $0xc8,%ecx
mov    $0x190,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @StatutBoutonPlosible(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store i32 200, i32* %2
br label %11
10: ; preds = %6
store i32 400, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @StatutBoutonPlosible(i32 %0) {
%2 = icmp ult i32 %0, 2
%3 = select i1 %2, i32 200, i32 400
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main(int argc, char *argv[]) {
  int a, b;
  printf("&a %c &b\n", (&a > &b) ? '>' : ((&a < &b) ? '<' : '='));
  return 0;
}


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    -0x14(%rbp),%rax
lea    -0x18(%rbp),%rcx
cmp    %rcx,%rax
jbe    1144 <main+0x34>
mov    $0x3e,%eax
mov    %eax,-0x1c(%rbp)
jmp    115f <main+0x4f>
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rsi
mov    $0x3d,%eax
mov    $0x3c,%ecx
cmp    %rsi,%rdx
cmovb  %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
lea    0xe97(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rax
lea    0x4(%rsp),%rcx
cmp    %rax,%rcx
mov    $0x3d,%dl
sbb    $0x0,%dl
cmp    %rax,%rcx
movzbl %dl,%eax
mov    $0x3e,%ecx
cmovbe %eax,%ecx
movzbl %cl,%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"&a %c &b\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = icmp ugt i32* %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
br label %14
10: ; preds = %2
%11 = icmp ult i32* %6, %7
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 60, i32 61
br label %14
14: ; preds = %10, %9
%15 = phi i32 [ 62, %9 ], [ %13, %10 ]
%16 = trunc i32 %15 to i8
%17 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"&a %c &b\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = icmp ugt i32* %3, %4
%8 = icmp ult i32* %3, %4
%9 = select i1 %8, i8 60, i8 61
%10 = select i1 %7, i8 62, i8 %9
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %10)
ret i32 0
}
int get_min_array_size32(void) { return ((19937 / 128 + 1) * 4); }


x86 assembly (clang, -O0):
<get_min_array_size32>:
push   %rbp
mov    %rsp,%rbp
mov    $0x270,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_min_array_size32>:
mov    $0x270,%eax
ret

LLVM IR (-O0):
define i32 @get_min_array_size32() {
ret i32 624
}

LLVM IR (-O2):
define i32 @get_min_array_size32() {
ret i32 624
}
/* Variables and functions */
int kputchar(int);
int putchar(int ch) { return kputchar(ch); }


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <kputchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
jmp    1030 <kputchar@plt>

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

LLVM IR (-O2):
define i32 @putchar(i32 %0) {
%2 = tail call i32 @kputchar(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void allowStopExecution() { usleep(1000); }


x86 assembly (clang, -O0):
<allowStopExecution>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3e8,%edi
call   1030 <usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<allowStopExecution>:
mov    $0x3e8,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @allowStopExecution() {
%1 = call i32 @usleep(i32 1000)
ret void
}

LLVM IR (-O2):
define void @allowStopExecution() {
%1 = tail call i32 @usleep(i32 1000)
ret void
}
/* Variables and functions */
float __nv_atanf(float);
float atanf(float __a) { return __nv_atanf(__a); }


x86 assembly (clang, -O0):
<atanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__nv_atanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atanf>:
jmp    1030 <__nv_atanf@plt>

LLVM IR (-O0):
define float @atanf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @__nv_atanf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @atanf(float %0) {
%2 = tail call float @__nv_atanf(float %0)
ret float %2
}
void ff_hevc_put_hevc_bi_epel_hv64_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_hv64_8_avx2() {
ret void
}
void gf8mul_11000100(void) {
  __asm__ __volatile__("\tpxor    %xmm7, %xmm6\n"
                       "\tpxor    %xmm7, %xmm5\n"
                       "\tpxor    %xmm7, %xmm4\n"
                       "\tpxor    %xmm6, %xmm5\n"
                       "\tpxor    %xmm6, %xmm4\n"
                       "\tpxor    %xmm6, %xmm3\n"
                       "\tpxor    %xmm5, %xmm4\n"
                       "\tpxor    %xmm5, %xmm3\n"
                       "\tpxor    %xmm5, %xmm2\n"
                       "\tpxor    %xmm4, %xmm3\n"
                       "\tpxor    %xmm4, %xmm2\n"
                       "\tpxor    %xmm4, %xmm1\n"
                       "\tpxor    %xmm3, %xmm2\n"
                       "\tpxor    %xmm3, %xmm1\n"
                       "\tpxor    %xmm3, %xmm0\n"
                       "\tpxor    %xmm2, %xmm5\n"
                       "\tpxor    %xmm2, %xmm4\n"
                       "\tpxor    %xmm1, %xmm7\n"
                       "\tpxor    %xmm1, %xmm4\n"
                       "\tpxor    %xmm1, %xmm2\n"
                       "\tpxor    %xmm2, %xmm1\n"
                       "\tpxor    %xmm0, %xmm7\n"
                       "\tpxor    %xmm0, %xmm6\n"
                       "\tpxor    %xmm0, %xmm2\n"
                       "\tpxor    %xmm2, %xmm0\n");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pxor   %xmm7,%xmm6
pxor   %xmm7,%xmm5
pxor   %xmm7,%xmm4
pxor   %xmm6,%xmm5
pxor   %xmm6,%xmm4
pxor   %xmm6,%xmm3
pxor   %xmm5,%xmm4
pxor   %xmm5,%xmm3
pxor   %xmm5,%xmm2
pxor   %xmm4,%xmm3
pxor   %xmm4,%xmm2
pxor   %xmm4,%xmm1
pxor   %xmm3,%xmm2
pxor   %xmm3,%xmm1
pxor   %xmm3,%xmm0
pxor   %xmm2,%xmm5
pxor   %xmm2,%xmm4
pxor   %xmm1,%xmm7
pxor   %xmm1,%xmm4
pxor   %xmm1,%xmm2
pxor   %xmm2,%xmm1
pxor   %xmm0,%xmm7
pxor   %xmm0,%xmm6
pxor   %xmm0,%xmm2
pxor   %xmm2,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
pxor   %xmm7,%xmm6
pxor   %xmm7,%xmm5
pxor   %xmm7,%xmm4
pxor   %xmm6,%xmm5
pxor   %xmm6,%xmm4
pxor   %xmm6,%xmm3
pxor   %xmm5,%xmm4
pxor   %xmm5,%xmm3
pxor   %xmm5,%xmm2
pxor   %xmm4,%xmm3
pxor   %xmm4,%xmm2
pxor   %xmm4,%xmm1
pxor   %xmm3,%xmm2
pxor   %xmm3,%xmm1
pxor   %xmm3,%xmm0
pxor   %xmm2,%xmm5
pxor   %xmm2,%xmm4
pxor   %xmm1,%xmm7
pxor   %xmm1,%xmm4
pxor   %xmm1,%xmm2
pxor   %xmm2,%xmm1
pxor   %xmm0,%xmm7
pxor   %xmm0,%xmm6
pxor   %xmm0,%xmm2
pxor   %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define void @gf8mul_11000100() {
tail call void asm sideeffect "\09pxor %xmm7, %xmm6\0A\09pxor %xmm7, %xmm5\0A\09pxor %xmm7, %xmm4\0A\09pxor %xmm6, %xmm5\0A\09pxor %xmm6, %xmm4\0A\09pxor %xmm6, %xmm3\0A\09pxor %xmm5, %xmm4\0A\09pxor %xmm5, %xmm3\0A\09pxor %xmm5, %xmm2\0A\09pxor %xmm4, %xmm3\0A\09pxor %xmm4, %xmm2\0A\09pxor %xmm4, %xmm1\0A\09pxor %xmm3, %xmm2\0A\09pxor %xmm3, %xmm1\0A\09pxor %xmm3, %xmm0\0A\09pxor %xmm2, %xmm5\0A\09pxor %xmm2, %xmm4\0A\09pxor %xmm1, %xmm7\0A\09pxor %xmm1, %xmm4\0A\09pxor %xmm1, %xmm2\0A\09pxor %xmm2, %xmm1\0A\09pxor %xmm0, %xmm7\0A\09pxor %xmm0, %xmm6\0A\09pxor %xmm0, %xmm2\0A\09pxor %xmm2, %xmm0\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void basic_pointer2(int x) {
  int *adresse_von_x = &x;
  int y = x;
  printf("Der Wert von y ist %d\n", y);
  x = 10;
  y = *adresse_von_x;
  printf("Der Wert von y ist %d\n", y);
}


x86 assembly (clang, -O0):
<basic_pointer2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movl   $0xa,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basic_pointer2>:
push   %rbx
mov    %edi,%esi
lea    0xee6(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Der Wert von y ist %d\0A\00"
define void @basic_pointer2(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32 %0, i32* %2
store i32* %2, i32** %3
%5 = load i32, i32* %2
store i32 %5, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %6)
store i32 10, i32* %2
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Der Wert von y ist %d\0A\00"
define void @basic_pointer2(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 10)
ret void
}
/* Type definitions */
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
struct Cyc_Absyn_Exp *Cyc_Absyn_bool_exp(int /*<<< orphan*/, unsigned int);
struct Cyc_Absyn_Exp *Cyc_Absyn_false_exp(unsigned loc) {
  struct Cyc_Absyn_Exp *_T0;
  _T0 = Cyc_Absyn_bool_exp(0, loc);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Absyn_false_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
xor    %edi,%edi
call   1030 <Cyc_Absyn_bool_exp@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_false_exp>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <Cyc_Absyn_bool_exp@plt>

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_false_exp(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.Cyc_Absyn_Exp*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_bool_exp(i32 0, i32 %4)
store %struct.Cyc_Absyn_Exp* %5, %struct.Cyc_Absyn_Exp** %3
%6 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %3
ret %struct.Cyc_Absyn_Exp* %6
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_false_exp(i32 %0) {
%2 = tail call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_bool_exp(i32 0, i32 %0)
ret %struct.Cyc_Absyn_Exp* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr,
                "%s-%s usage:\nempty -f [-i fifo1 -o fifo2] [-p file.pid] [-L "
                "file] command [command args]\nempty -w [-Sv] [-t n] [-i fifo2 "
                "-o fifo1] key1 [answer1] ... [keyX answerX]\nempty -s [-Sc] "
                "[-o fifo1] [request]\nempty -r [-b size] [-t n] [-i "
                "fifo1]\nempty -l\nempty -k [pid] [signal]\nempty -h\n",
                "empty", "0.6.20b");
  exit(255);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xfde(%rip),%rdx
lea    0xfdd(%rip),%rcx
call   1030 <fprintf@plt>
mov    $0xff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xfe1(%rip),%rdx
lea    0xfe0(%rip),%rcx
call   1030 <fprintf@plt>
mov    $0xff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [281 x i8] c"%s-%s usage:\0Aempty -f [-i fifo1 -o fifo2] [-p file.pid] [-L file] command [command args]\0Aempty -w [-Sv] [-t n] [-i fifo2 -o fifo1] key1 [answer1] ... [keyX answerX]\0Aempty -s [-Sc] [-o fifo1] [request]\0Aempty -r [-b size] [-t n] [-i fifo1]\0Aempty -l\0Aempty -k [pid] [signal]\0Aempty -h\0A\00"
@.str.1 = [6 x i8] c"empty\00"
@.str.2 = [8 x i8] c"0.6.20b\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([281 x i8], [281 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 255)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [281 x i8] c"%s-%s usage:\0Aempty -f [-i fifo1 -o fifo2] [-p file.pid] [-L file] command [command args]\0Aempty -w [-Sv] [-t n] [-i fifo2 -o fifo1] key1 [answer1] ... [keyX answerX]\0Aempty -s [-Sc] [-o fifo1] [request]\0Aempty -r [-b size] [-t n] [-i fifo1]\0Aempty -l\0Aempty -k [pid] [signal]\0Aempty -h\0A\00"
@.str.1 = [6 x i8] c"empty\00"
@.str.2 = [8 x i8] c"0.6.20b\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([281 x i8], [281 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 255)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
scalar_t__ strstr(char const *, char *);
char *build_dest_dir(const char *full_path) {
  assert(full_path);
  if (strstr(full_path, "/x86_64-linux-gnu/"))
    return "/run/firejail/mnt/lib"
           "/x86_64-linux-gnu";
  return "/run/firejail/mnt/lib";
}


x86 assembly (clang, -O0):
<build_dest_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rdi
lea    0xec0(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     115f <build_dest_dir+0x3f>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116a <build_dest_dir+0x4a>
lea    0xed4(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_dest_dir>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
lea    0xef8(%rip),%rcx
lea    0xeca(%rip),%rax
cmove  %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"/x86_64-linux-gnu/\00"
@.str.1 = [39 x i8] c"/run/firejail/mnt/lib/x86_64-linux-gnu\00"
@.str.2 = [22 x i8] c"/run/firejail/mnt/lib\00"
define i8* @build_dest_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @assert(i8* %4)
%6 = load i8*, i8** %3
%7 = call i64 @strstr(i8* %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %11
10: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %11
11: ; preds = %10, %9
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [19 x i8] c"/x86_64-linux-gnu/\00"
@.str.1 = [39 x i8] c"/run/firejail/mnt/lib/x86_64-linux-gnu\00"
@.str.2 = [22 x i8] c"/run/firejail/mnt/lib\00"
define i8* @build_dest_dir(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x88() {
  Assert_real((isbdigit(136) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              685, ("isbdigit should be 0 for 0x88"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x88>:
push   %rbp
mov    %rsp,%rbp
mov    $0x88,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x2ad,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x88>:
push   %rax
mov    $0x88,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x2ad,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x88\00"
define void @t_isbdigit_0x88() {
%1 = call i64 @isbdigit(i32 136)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 685, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x88\00"
define void @t_isbdigit_0x88() {
%1 = tail call i64 @isbdigit(i32 136)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 685, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct where {
  int dummy;
};

/* Variables and functions */
char const *where_str_r(char *, struct where const *);
const char *where_str(const struct where *w) {
  static char buf[128];
  return where_str_r(buf, w);
}


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

x86 assembly (clang, -O2):
<where_str>:
mov    %rdi,%rsi
lea    0x2f26(%rip),%rdi
jmp    1030 <where_str_r@plt>

LLVM IR (-O0):
%struct.where = type { i32 }
@where_str.buf = internal global [128 x i8] zeroinitializer
define i8* @where_str(%struct.where* %0) {
%2 = alloca %struct.where*
store %struct.where* %0, %struct.where** %2
%3 = load %struct.where*, %struct.where** %2
%4 = call i8* @where_str_r(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @where_str.buf, i64 0, i64 0), %struct.where* %3)
ret i8* %4
}

LLVM IR (-O2):
%struct.where = type { i32 }
@where_str.buf = internal global [128 x i8] zeroinitializer
define i8* @where_str(%struct.where* %0) {
%2 = tail call i8* @where_str_r(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @where_str.buf, i64 0, i64 0), %struct.where* %0)
ret i8* %2
}
void check_memory_leak(void) {}


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

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

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

LLVM IR (-O2):
define void @check_memory_leak() {
ret void
}
/* Variables and functions */
char *MD5FileChunk(char const *, char *, int /*<<< orphan*/,
                   int /*<<< orphan*/);
char *MD5File(const char *filename, char *buf) {
  return (MD5FileChunk(filename, buf, 0, 0));
}


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

x86 assembly (clang, -O2):
<MD5File>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <MD5FileChunk@plt>

LLVM IR (-O0):
define i8* @MD5File(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 i8* @MD5FileChunk(i8* %5, i8* %6, i32 0, i32 0)
ret i8* %7
}

LLVM IR (-O2):
define i8* @MD5File(i8* %0, i8* %1) {
%3 = tail call i8* @MD5FileChunk(i8* %0, i8* %1, i32 0, i32 0)
ret i8* %3
}
/* Variables and functions */
unsigned long bfin_cli();
unsigned long __raw_local_irq_save(void) {
  unsigned long flags = bfin_cli();
  return flags;
}


x86 assembly (clang, -O0):
<__raw_local_irq_save>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <bfin_cli@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__raw_local_irq_save>:
xor    %eax,%eax
jmp    1030 <bfin_cli@plt>

LLVM IR (-O0):
define i64 @__raw_local_irq_save() {
%1 = alloca i64
%2 = call i64 (...) @bfin_cli()
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @__raw_local_irq_save() {
%1 = tail call i64 (...) @bfin_cli()
ret i64 %1
}
/* Variables and functions */
long double expl(long double);
long double sinl(long double);
long double f(long double x) { return expl(-x / 5.0L) - sinl(x); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xec9(%rip)
fdivrp %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <expl@plt>
fstpt  -0x1c(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sinl@plt>
fldt   -0x1c(%rbp)
fsubp  %st,%st(1)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x1c(%rsp)
fdivs  0xecc(%rip)
fstpt  (%rsp)
call   1040 <expl@plt>
fstpt  0x10(%rsp)
fldt   0x1c(%rsp)
fstpt  (%rsp)
call   1030 <sinl@plt>
fldt   0x10(%rsp)
fsubp  %st,%st(1)
add    $0x28,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @f(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fneg x86_fp80 %3
%5 = fdiv x86_fp80 %4, 0xK4001A000000000000000
%6 = call x86_fp80 @expl(x86_fp80 %5)
%7 = load x86_fp80, x86_fp80* %2
%8 = call x86_fp80 @sinl(x86_fp80 %7)
%9 = fsub x86_fp80 %6, %8
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @f(x86_fp80 %0) {
%2 = fdiv x86_fp80 %0, 0xKC001A000000000000000
%3 = tail call x86_fp80 @expl(x86_fp80 %2)
%4 = tail call x86_fp80 @sinl(x86_fp80 %0)
%5 = fsub x86_fp80 %3, %4
ret x86_fp80 %5
}
/* Variables and functions */
int peripheralClockFrequency();
void init_timer0(void) {
  (*(volatile unsigned long *)(0xE0004000 + 0x08)) = 0;
  (*(volatile unsigned long *)(0xE0004000 + 0x04)) = 0x0;
  (*(volatile unsigned long *)(0xE0004000 + 0x14)) = 0x3;
  (*(volatile unsigned long *)(0xE0004000 + 0x0C)) = 0;
  (*(volatile unsigned long *)(0xE0004000 + 0x10)) = 0;
  (*(volatile unsigned long *)(0xE0004000 + 0x18)) =
      peripheralClockFrequency() / 1000;
  (*(volatile unsigned long *)(0xE0004000 + 0x04)) = 0x1;
}


x86 assembly (clang, -O0):
<init_timer0>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0004008,%eax
movq   $0x0,(%rax)
mov    $0xe0004004,%eax
movq   $0x0,(%rax)
mov    $0xe0004014,%eax
movq   $0x3,(%rax)
mov    $0xe000400c,%eax
movq   $0x0,(%rax)
mov    $0xe0004010,%eax
movq   $0x0,(%rax)
mov    $0x0,%al
call   1030 <peripheralClockFrequency@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
movslq %eax,%rcx
mov    $0xe0004018,%eax
mov    %rcx,(%rax)
mov    $0xe0004004,%eax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_timer0>:
push   %rbx
mov    $0xe0004004,%ebx
movq   $0x0,0x4(%rbx)
movq   $0x0,(%rbx)
movq   $0x3,0x10(%rbx)
movq   $0x0,0x8(%rbx)
movq   $0x0,0xc(%rbx)
xor    %eax,%eax
call   1030 <peripheralClockFrequency@plt>
cltq
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
cltq
mov    %rax,0x14(%rbx)
movq   $0x1,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @init_timer0() {
store volatile i64 0, i64* inttoptr (i64 3758112776 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758112772 to i64*)
store volatile i64 3, i64* inttoptr (i64 3758112788 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758112780 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758112784 to i64*)
%1 = call i32 (...) @peripheralClockFrequency()
%2 = sdiv i32 %1, 1000
%3 = sext i32 %2 to i64
store volatile i64 %3, i64* inttoptr (i64 3758112792 to i64*)
store volatile i64 1, i64* inttoptr (i64 3758112772 to i64*)
ret void
}

LLVM IR (-O2):
define void @init_timer0() {
store volatile i64 0, i64* inttoptr (i64 3758112776 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758112772 to i64*)
store volatile i64 3, i64* inttoptr (i64 3758112788 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758112780 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758112784 to i64*)
%1 = tail call i32 (...) @peripheralClockFrequency()
%2 = sdiv i32 %1, 1000
%3 = sext i32 %2 to i64
store volatile i64 %3, i64* inttoptr (i64 3758112792 to i64*)
store volatile i64 1, i64* inttoptr (i64 3758112772 to i64*)
ret void
}
/* Variables and functions */
unsigned long nibble_sort_one(unsigned long);
void nibble_sort_rjk9(unsigned long *buffer) {
  for (int i = 0; i < 1024; ++i)
    buffer[i] = nibble_sort_one(buffer[i]);
}


x86 assembly (clang, -O0):
<nibble_sort_rjk9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x400,-0xc(%rbp)
jge    115e <nibble_sort_rjk9+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <nibble_sort_one@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <nibble_sort_rjk9+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nibble_sort_rjk9>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <nibble_sort_one@plt>
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    $0x400,%rbx
jne    1120 <nibble_sort_rjk9+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @nibble_sort_rjk9(i64* nocapture %0) {
br label %3
2: ; preds = %3
ret void
3: ; preds = %1, %3
%4 = phi i64 [ 0, %1 ], [ %8, %3 ]
%5 = getelementptr inbounds i64, i64* %0, i64 %4
%6 = load i64, i64* %5
%7 = tail call i64 @nibble_sort_one(i64 %6)
store i64 %7, i64* %5
%8 = add nuw nsw i64 %4, 1
%9 = icmp eq i64 %8, 1024
br i1 %9, label %2, label %3
}
double fp_barrier(double x) {
  volatile double y = x;
  return y;
}


x86 assembly (clang, -O0):
<fp_barrier>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fp_barrier>:
movsd  %xmm0,-0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @fp_barrier(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
store volatile double %4, double* %3
%5 = load volatile double, double* %3
ret double %5
}

LLVM IR (-O2):
define double @fp_barrier(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store volatile double %0, double* %2
%4 = load volatile double, double* %2
ret double %4
}
/* Type definitions */
struct AMCStaticRedBlackTree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _lock_Read_RbTree(struct AMCStaticRedBlackTree *);
int _rbTree_Delete(struct AMCStaticRedBlackTree *, unsigned long);
int /*<<< orphan*/ _unlock_Read_RbTree(struct AMCStaticRedBlackTree *);
int AMCStaticRbTree_Delete(struct AMCStaticRedBlackTree *tree,
                           unsigned long id) {
  int ret;
  _lock_Read_RbTree(tree);
  ret = _rbTree_Delete(tree, id);
  _unlock_Read_RbTree(tree);
  return ret;
}


x86 assembly (clang, -O0):
<AMCStaticRbTree_Delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_lock_Read_RbTree@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <_rbTree_Delete@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_unlock_Read_RbTree@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AMCStaticRbTree_Delete>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <_lock_Read_RbTree@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <_rbTree_Delete@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <_unlock_Read_RbTree@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.AMCStaticRedBlackTree = type { i32 }
define i32 @AMCStaticRbTree_Delete(%struct.AMCStaticRedBlackTree* %0, i64 %1) {
%3 = alloca %struct.AMCStaticRedBlackTree*
%4 = alloca i64
%5 = alloca i32
store %struct.AMCStaticRedBlackTree* %0, %struct.AMCStaticRedBlackTree** %3
store i64 %1, i64* %4
%6 = load %struct.AMCStaticRedBlackTree*, %struct.AMCStaticRedBlackTree** %3
%7 = call i32 @_lock_Read_RbTree(%struct.AMCStaticRedBlackTree* %6)
%8 = load %struct.AMCStaticRedBlackTree*, %struct.AMCStaticRedBlackTree** %3
%9 = load i64, i64* %4
%10 = call i32 @_rbTree_Delete(%struct.AMCStaticRedBlackTree* %8, i64 %9)
store i32 %10, i32* %5
%11 = load %struct.AMCStaticRedBlackTree*, %struct.AMCStaticRedBlackTree** %3
%12 = call i32 @_unlock_Read_RbTree(%struct.AMCStaticRedBlackTree* %11)
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
%struct.AMCStaticRedBlackTree = type { i32 }
define i32 @AMCStaticRbTree_Delete(%struct.AMCStaticRedBlackTree* %0, i64 %1) {
%3 = tail call i32 @_lock_Read_RbTree(%struct.AMCStaticRedBlackTree* %0)
%4 = tail call i32 @_rbTree_Delete(%struct.AMCStaticRedBlackTree* %0, i64 %1)
%5 = tail call i32 @_unlock_Read_RbTree(%struct.AMCStaticRedBlackTree* %0)
ret i32 %4
}
/* Variables and functions */
int ones32(unsigned int);
int int_log2(unsigned int x) {
  x |= (x >> 1);
  x |= (x >> 2);
  x |= (x >> 4);
  x |= (x >> 8);
  x |= (x >> 16);
  return ones32(x) - 1;
}


x86 assembly (clang, -O0):
<int_log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ones32@plt>
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_log2>:
push   %rax
mov    %edi,%eax
shr    %eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x2,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x8,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x10,%eax
or     %eax,%edi
call   1030 <ones32@plt>
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @int_log2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 1
%5 = load i32, i32* %2
%6 = or i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = lshr i32 %7, 2
%9 = load i32, i32* %2
%10 = or i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = lshr i32 %11, 4
%13 = load i32, i32* %2
%14 = or i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = lshr i32 %15, 8
%17 = load i32, i32* %2
%18 = or i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = lshr i32 %19, 16
%21 = load i32, i32* %2
%22 = or i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = call i32 @ones32(i32 %23)
%25 = sub nsw i32 %24, 1
ret i32 %25
}

LLVM IR (-O2):
define i32 @int_log2(i32 %0) {
%2 = lshr i32 %0, 1
%3 = or i32 %2, %0
%4 = lshr i32 %3, 2
%5 = or i32 %4, %3
%6 = lshr i32 %5, 4
%7 = or i32 %6, %5
%8 = lshr i32 %7, 8
%9 = or i32 %8, %7
%10 = lshr i32 %9, 16
%11 = or i32 %10, %9
%12 = tail call i32 @ones32(i32 %11)
%13 = add nsw i32 %12, -1
ret i32 %13
}
/* Type definitions */
struct statvfs {
  int dummy;
};
struct statfs {
  int dummy;
};

/* Variables and functions */
scalar_t__ __fstatfs(int, struct statfs *);
int /*<<< orphan*/ __internal_statvfs(int /*<<< orphan*/ *, struct statvfs *,
                                      struct statfs *, int);
int __fstatvfs(int fd, struct statvfs *buf) {
  struct statfs fsbuf;
  if (__fstatfs(fd, &fsbuf) < 0)
    return -1;
  __internal_statvfs(NULL, buf, &fsbuf, fd);
  return 0;
}


x86 assembly (clang, -O0):
<__fstatvfs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x18(%rbp),%rsi
call   1040 <__fstatfs@plt>
cmp    $0x0,%rax
jge    1151 <__fstatvfs+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <__fstatvfs+0x4c>
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%edi
lea    -0x18(%rbp),%rdx
call   1030 <__internal_statvfs@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fstatvfs>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %edi,%ebx
lea    0x8(%rsp),%rsi
call   1040 <__fstatfs@plt>
test   %rax,%rax
js     1153 <__fstatvfs+0x33>
xor    %r15d,%r15d
lea    0x8(%rsp),%rdx
xor    %edi,%edi
mov    %r14,%rsi
mov    %ebx,%ecx
call   1030 <__internal_statvfs@plt>
jmp    1159 <__fstatvfs+0x39>
mov    $0xffffffff,%r15d
mov    %r15d,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.statvfs = type { i32 }
%struct.statfs = type { i32 }
define i32 @__fstatvfs(i32 %0, %struct.statvfs* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.statvfs*
%6 = alloca %struct.statfs
store i32 %0, i32* %4
store %struct.statvfs* %1, %struct.statvfs** %5
%7 = load i32, i32* %4
%8 = call i64 @__fstatfs(i32 %7, %struct.statfs* %6)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %15
11: ; preds = %2
%12 = load %struct.statvfs*, %struct.statvfs** %5
%13 = load i32, i32* %4
%14 = call i32 @__internal_statvfs(i32* null, %struct.statvfs* %12, %struct.statfs* %6, i32 %13)
store i32 0, i32* %3
br label %15
15: ; preds = %11, %10
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.statvfs = type { i32 }
%struct.statfs = type { i32 }
define i32 @__fstatvfs(i32 %0, %struct.statvfs* %1) {
%3 = alloca %struct.statfs
%4 = bitcast %struct.statfs* %3 to i8*
%5 = call i64 @__fstatfs(i32 %0, %struct.statfs* %3)
%6 = icmp slt i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 @__internal_statvfs(i32* null, %struct.statvfs* %1, %struct.statfs* %3, i32 %0)
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ 0, %7 ], [ -1, %2 ]
ret i32 %10
}
void arch_Halt(void) { asm volatile("hlt"); }


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

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

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

LLVM IR (-O2):
define void @arch_Halt() {
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void f3() {
  int a[1];
  a[2] = 1;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f3() {
%1 = alloca [1 x i32]
%2 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 2
store i32 1, i32* %2
ret void
}

LLVM IR (-O2):
define void @f3() {
ret void
}
/* Variables and functions */
void *calloc(size_t, size_t);
void *xmalloc_fatal(size_t);
void *xcalloc(size_t mem, size_t size) {
  void *ptr = calloc(mem, size);
  if (ptr == NULL)
    return xmalloc_fatal(mem * size);
  return ptr;
}


x86 assembly (clang, -O0):
<xcalloc>:
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   1030 <calloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1163 <xcalloc+0x43>
mov    -0x10(%rbp),%rdi
imul   -0x18(%rbp),%rdi
call   1040 <xmalloc_fatal@plt>
mov    %rax,-0x8(%rbp)
jmp    116b <xcalloc+0x4b>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <calloc@plt>
test   %rax,%rax
je     113c <xcalloc+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
imul   %r14,%rbx
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <xmalloc_fatal@plt>

LLVM IR (-O0):
define i8* @xcalloc(i64 %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %4
store i64 %1, i64* %5
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = call i8* @calloc(i64 %7, i64 %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %17
12: ; preds = %2
%13 = load i64, i64* %4
%14 = load i64, i64* %5
%15 = mul i64 %13, %14
%16 = call i8* @xmalloc_fatal(i64 %15)
store i8* %16, i8** %3
br label %19
17: ; preds = %2
%18 = load i8*, i8** %6
store i8* %18, i8** %3
br label %19
19: ; preds = %17, %12
%20 = load i8*, i8** %3
ret i8* %20
}

LLVM IR (-O2):
define i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = mul i64 %1, %0
%7 = tail call i8* @xmalloc_fatal(i64 %6)
br label %8
8: ; preds = %2, %5
%9 = phi i8* [ %7, %5 ], [ %3, %2 ]
ret i8* %9
}
int c088(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c088() {
ret i32 0
}
/* Variables and functions */
int bma220_get_sc_filt_config(unsigned char *);
int bma220_get_bandwidth(unsigned char *bw) {
  return bma220_get_sc_filt_config(bw);
}


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

x86 assembly (clang, -O2):
<bma220_get_bandwidth>:
jmp    1030 <bma220_get_sc_filt_config@plt>

LLVM IR (-O0):
define i32 @bma220_get_bandwidth(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @bma220_get_sc_filt_config(i8* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @bma220_get_bandwidth(i8* %0) {
%2 = tail call i32 @bma220_get_sc_filt_config(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void xmlClose(void) { printf("</plugs>\n"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"</plugs>\0A\00"
define void @xmlClose() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [9 x i8] c"</plugs>\00"
define void @xmlClose() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ create_file_via_path(char *, float);
int /*<<< orphan*/ printf(char *, char *);
int touch(char *path) {
  if (create_file_via_path(path, 'f') == 0)
    return 0;
  printf("Touch succeeded: %s\n", path);
  return 1;
}


x86 assembly (clang, -O0):
<touch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movss  0xec8(%rip),%xmm0
call   1040 <create_file_via_path@plt>
cmp    $0x0,%rax
jne    1153 <touch+0x33>
movl   $0x0,-0x4(%rbp)
jmp    116a <touch+0x4a>
mov    -0x10(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<touch>:
push   %rbx
mov    %rdi,%rbx
movss  0xed4(%rip),%xmm0
call   1040 <create_file_via_path@plt>
test   %rax,%rax
je     114c <touch+0x2c>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Touch succeeded: %s\0A\00"
define i32 @touch(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @create_file_via_path(i8* %4, float 1.020000e+02)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %9)
store i32 1, i32* %2
br label %11
11: ; preds = %8, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [21 x i8] c"Touch succeeded: %s\0A\00"
define i32 @touch(i8* %0) {
%2 = tail call i64 @create_file_via_path(i8* %0, float 1.020000e+02)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
void ft_striteri(char *s, void (*f)(unsigned int, char *)) {
  unsigned int i;
  if (!s || !f)
    return;
  i = 0;
  while (s[i]) {
    (*f)(i, &s[i]);
    i++;
  }
}


x86 assembly (clang, -O0):
<ft_striteri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1126 <ft_striteri+0x26>
cmpq   $0x0,-0x10(%rbp)
jne    112b <ft_striteri+0x2b>
jmp    1164 <ft_striteri+0x64>
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     1164 <ft_striteri+0x64>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%ecx
add    %rcx,%rsi
call   *%rax
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1132 <ft_striteri+0x32>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striteri>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1133 <ft_striteri+0x33>
mov    %rsi,%r14
test   %rsi,%rsi
je     1133 <ft_striteri+0x33>
mov    %rdi,%r15
cmpb   $0x0,(%rdi)
je     1133 <ft_striteri+0x33>
xor    %ebx,%ebx
mov    %r15,%rsi
nop
mov    %ebx,%edi
call   *%r14
add    $0x1,%ebx
lea    (%r15,%rbx,1),%rsi
cmpb   $0x0,(%r15,%rbx,1)
jne    1120 <ft_striteri+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ft_striteri(i8* %0, void (i32, i8*)* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne void (i32, i8*)* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %17
6: ; preds = %2
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 0
br i1 %8, label %17, label %9
9: ; preds = %6, %9
%10 = phi i8* [ %14, %9 ], [ %0, %6 ]
%11 = phi i32 [ %12, %9 ], [ 0, %6 ]
tail call void %1(i32 %11, i8* %10)
%12 = add i32 %11, 1
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %9
17: ; preds = %9, %6, %2
ret void
}