xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d\n", 8 * 2);
  printf("%d\n", 9 + 3);
  printf("%d\n", 8 / 3);
  printf("%d\n", 3 - 5);
  printf("%d\n", 8 / 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
mov    $0xfffffffe,%esi
call   1030 <printf@plt>
lea    0xe96(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffffe,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 16)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 12)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
void gtk_tree_view_column_set_sizing() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_set_sizing() {
ret void
}
/* Variables and functions */
long DBbenchmark(char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
long DeleteOneRecordWithoutProtection(int id) {
  char query[1000];
  char *stat = "DELETE FROM benchmark.user WHERE id = %d";
  snprintf(query, 1000, stat, id);
  return DBbenchmark("DeleteOneRecordWithoutProtection", query);
}


x86 assembly (clang, -O0):
<DeleteOneRecordWithoutProtection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
mov    %edi,-0x4(%rbp)
lea    0xecb(%rip),%rax
mov    %rax,-0x3f8(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    -0x3f8(%rbp),%rdx
mov    -0x4(%rbp),%ecx
mov    $0x3e8,%esi
call   1030 <snprintf@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xec4(%rip),%rdi
call   1040 <DBbenchmark@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DeleteOneRecordWithoutProtection>:
push   %rbx
sub    $0x3f0,%rsp
mov    %edi,%ecx
lea    0xecf(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1030 <snprintf@plt>
lea    0xee1(%rip),%rdi
mov    %rbx,%rsi
call   1040 <DBbenchmark@plt>
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"DELETE FROM benchmark.user WHERE id = %d\00"
@.str.1 = [33 x i8] c"DeleteOneRecordWithoutProtection\00"
define i64 @DeleteOneRecordWithoutProtection(i32 %0) {
%2 = alloca i32
%3 = alloca [1000 x i8]
%4 = alloca i8*
store i32 %0, i32* %2
store i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %4
%7 = load i32, i32* %2
%8 = call i32 @snprintf(i8* %5, i32 1000, i8* %6, i32 %7)
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%10 = call i64 @DBbenchmark(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret i64 %10
}

LLVM IR (-O2):
@.str = [41 x i8] c"DELETE FROM benchmark.user WHERE id = %d\00"
@.str.1 = [33 x i8] c"DeleteOneRecordWithoutProtection\00"
define i64 @DeleteOneRecordWithoutProtection(i32 %0) {
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 1000, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i64 @DBbenchmark(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret i64 %5
}
/* Type definitions */
struct lconv {
  int dummy;
};

/* Variables and functions */
scalar_t__ localeconv();
void *Ada_localeconv() {
  void *jresult;
  struct lconv *result = 0;
  result = (struct lconv *)localeconv();
  jresult = (void *)result;
  return jresult;
}


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

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

LLVM IR (-O0):
%struct.lconv = type { i32 }
define i8* @Ada_localeconv() {
%1 = alloca i8*
%2 = alloca %struct.lconv*
store %struct.lconv* null, %struct.lconv** %2
%3 = call i64 (...) @localeconv()
%4 = inttoptr i64 %3 to %struct.lconv*
store %struct.lconv* %4, %struct.lconv** %2
%5 = load %struct.lconv*, %struct.lconv** %2
%6 = bitcast %struct.lconv* %5 to i8*
store i8* %6, i8** %1
%7 = load i8*, i8** %1
ret i8* %7
}

LLVM IR (-O2):
%struct.lconv = type { i32 }
define i8* @Ada_localeconv() {
%1 = tail call i64 (...) @localeconv()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
OP(dd, c0) { op_c0(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_c0()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ int80(int, char *, int /*<<< orphan*/, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
void closePipe(char *name) { int80(34, name, 0, 0, 0, 0); }


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

x86 assembly (clang, -O2):
<closePipe>:
mov    %rdi,%rsi
mov    $0x22,%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <int80@plt>

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

LLVM IR (-O2):
define void @closePipe(i8* %0) {
%2 = tail call i32 @int80(i32 34, i8* %0, i32 0, i32 0, i32 0, i32 0)
ret void
}
void do_thread_task(void (*task_loop)(void)) { task_loop(); }


x86 assembly (clang, -O0):
<do_thread_task>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_thread_task>:
jmp    *%rdi

LLVM IR (-O0):
define void @do_thread_task(void ()* %0) {
%2 = alloca void ()*
store void ()* %0, void ()** %2
%3 = load void ()*, void ()** %2
ret void
}

LLVM IR (-O2):
define void @do_thread_task(void ()* nocapture %0) {
tail call void %0()
ret void
}
void gtk_combo_box_set_column_span_column() {}


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

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

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

LLVM IR (-O2):
define void @gtk_combo_box_set_column_span_column() {
ret void
}
/* Variables and functions */
int opt_config(char *, int /*<<< orphan*/);
int /*<<< orphan*/ opt_get(int, char **);
int sat_init(int argc, char **argv) {
  return opt_config(argv[0], opt_get(argc, argv));
}


x86 assembly (clang, -O0):
<sat_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <opt_get@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <opt_config@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sat_init>:
push   %rbx
mov    (%rsi),%rbx
call   1030 <opt_get@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <opt_config@plt>

LLVM IR (-O0):
define i32 @sat_init(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = load i32, i32* %3
%9 = load i8**, i8*** %4
%10 = call i32 @opt_get(i32 %8, i8** %9)
%11 = call i32 @opt_config(i8* %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @sat_init(i32 %0, i8** %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @opt_get(i32 %0, i8** %1)
%5 = tail call i32 @opt_config(i8* %3, i32 %4)
ret i32 %5
}
/* Variables and functions */
char *cap_string(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char s[] = "Expect the best. Prepare for the worst. Capitalize on what "
             "comes.\nhello world! hello-world 012346hello world\thello "
             "world.hello world\n";
  char *p;
  p = cap_string(s);
  printf("%s", p);
  printf("%s", s);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x86,%edx
call   1050 <memcpy@plt>
lea    -0x90(%rbp),%rdi
call   1030 <cap_string@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rsi
lea    0xf0b(%rip),%rdi
call   1040 <printf@plt>
lea    -0x90(%rbp),%rsi
lea    0xef8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x88,%rsp
lea    0xebf(%rip),%rsi
mov    %rsp,%r14
mov    $0x86,%edx
mov    %r14,%rdi
call   1050 <memcpy@plt>
mov    %r14,%rdi
call   1030 <cap_string@plt>
lea    0xf26(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.s = [134 x i8] c"Expect the best. Prepare for the worst. Capitalize on what comes.\0Ahello world! hello-world 012346hello world\09hello world.hello world\0A\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [134 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [134 x i8]* %2 to i8*
%5 = getelementptr inbounds [134 x i8], [134 x i8]* %2, i64 0, i64 0
%6 = call i8* @cap_string(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [134 x i8], [134 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [134 x i8] c"Expect the best. Prepare for the worst. Capitalize on what comes.\0Ahello world! hello-world 012346hello world\09hello world.hello world\0A\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [134 x i8]
%2 = getelementptr inbounds [134 x i8], [134 x i8]* %1, i64 0, i64 0
%3 = call i8* @cap_string(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void chplayer() {}


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

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

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

LLVM IR (-O2):
define void @chplayer() {
ret void
}
int benchmarkIterationsCount() { return 40; }


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

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

LLVM IR (-O0):
define i32 @benchmarkIterationsCount() {
ret i32 40
}

LLVM IR (-O2):
define i32 @benchmarkIterationsCount() {
ret i32 40
}
float fastLog(int *x_bits, float *LogLUT) {
  return (LogLUT[(*x_bits & 0x7FFFFF) >> (23 - 8)] +
          (float)((0x0FF & ((*x_bits >> 23))) - 127) * 0.693147180559945f);
}


x86 assembly (clang, -O0):
<fastLog>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%ecx
and    $0x7fffff,%ecx
sar    $0xf,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm1
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sar    $0x17,%eax
and    $0xff,%eax
sub    $0x7f,%eax
cvtsi2ss %eax,%xmm0
movss  0xebc(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastLog>:
mov    (%rdi),%eax
mov    %rax,%rcx
shr    $0xd,%rcx
and    $0x3fc,%ecx
shr    $0x17,%eax
movzbl %al,%eax
add    $0xffffff81,%eax
cvtsi2ss %eax,%xmm0
mulss  0xedc(%rip),%xmm0
addss  (%rsi,%rcx,1),%xmm0
ret

LLVM IR (-O0):
define float @fastLog(i32* %0, float* %1) {
%3 = alloca i32*
%4 = alloca float*
store i32* %0, i32** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = and i32 %7, 8388607
%9 = ashr i32 %8, 15
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds float, float* %5, i64 %10
%12 = load float, float* %11
%13 = load i32*, i32** %3
%14 = load i32, i32* %13
%15 = ashr i32 %14, 23
%16 = and i32 255, %15
%17 = sub nsw i32 %16, 127
%18 = sitofp i32 %17 to float
%19 = call float @llvm.fmuladd.f32(float %18, float 0x3FE62E4300000000, float %12)
ret float %19
}

LLVM IR (-O2):
define float @fastLog(i32* nocapture %0, float* nocapture %1) {
%3 = load i32, i32* %0
%4 = lshr i32 %3, 15
%5 = and i32 %4, 255
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds float, float* %1, i64 %6
%8 = load float, float* %7
%9 = lshr i32 %3, 23
%10 = and i32 %9, 255
%11 = add nsw i32 %10, -127
%12 = sitofp i32 %11 to float
%13 = tail call float @llvm.fmuladd.f32(float %12, float 0x3FE62E4300000000, float %8)
ret float %13
}
int test_imm_10int8_reg(signed char val) {
  return ((val) & (-0x10 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_10int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xfffffff0,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_10int8_reg>:
cmp    $0x10,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_10int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -16
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_10int8_reg(i8 signext %0) {
%2 = icmp ult i8 %0, 16
%3 = select i1 %2, i32 -40, i32 -20
ret i32 %3
}
void buzzer_OFF(void) {
  ((*(volatile unsigned int *)0x7F0080A4) &= ~(1 << 14));
}


x86 assembly (clang, -O0):
<buzzer_OFF>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f0080a4,%eax
mov    (%rax),%ecx
and    $0xffffbfff,%ecx
mov    $0x7f0080a4,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<buzzer_OFF>:
andl   $0xffffbfff,0x7f0080a4
ff bf ff ff
ret

LLVM IR (-O0):
define void @buzzer_OFF() {
%1 = load volatile i32, i32* inttoptr (i64 2130739364 to i32*)
%2 = and i32 %1, -16385
store volatile i32 %2, i32* inttoptr (i64 2130739364 to i32*)
ret void
}

LLVM IR (-O2):
define void @buzzer_OFF() {
%1 = load volatile i32, i32* inttoptr (i64 2130739364 to i32*)
%2 = and i32 %1, -16385
store volatile i32 %2, i32* inttoptr (i64 2130739364 to i32*)
ret void
}
/* Variables and functions */
double third_order_polynomial(double, double, double, double, double);
double argument_latitude_moon(double jce) {
  return third_order_polynomial(1.0 / 327270.0, -0.0036825, 483202.017538,
                                93.27191, jce);
}


x86 assembly (clang, -O0):
<argument_latitude_moon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm4
movsd  0xed6(%rip),%xmm0
movsd  0xed6(%rip),%xmm1
movsd  0xed6(%rip),%xmm2
movsd  0xed6(%rip),%xmm3
call   1030 <third_order_polynomial@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<argument_latitude_moon>:
movaps %xmm0,%xmm4
movsd  0xee5(%rip),%xmm0
movsd  0xee5(%rip),%xmm1
movsd  0xee5(%rip),%xmm2
movsd  0xee5(%rip),%xmm3
jmp    1030 <third_order_polynomial@plt>

LLVM IR (-O0):
define double @argument_latitude_moon(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @third_order_polynomial(double 0x3EC9A1CF6E0AD913, double -3.682500e-03, double 0x411D7E0811F57B42, double 0x40575166F9335D25, double %3)
ret double %4
}

LLVM IR (-O2):
define double @argument_latitude_moon(double %0) {
%2 = tail call double @third_order_polynomial(double 0x3EC9A1CF6E0AD913, double -3.682500e-03, double 0x411D7E0811F57B42, double 0x40575166F9335D25, double %0)
ret double %2
}
int ld_gt_mm2(long double *a1, long double *a2) { return !(((*a1) > (*a2))); }


x86 assembly (clang, -O0):
<ld_gt_mm2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    -0x10(%rbp),%rax
fldt   (%rax)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_gt_mm2>:
fldt   (%rdi)
fldt   (%rsi)
xor    %eax,%eax
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setbe  %al
ret

LLVM IR (-O0):
define i32 @ld_gt_mm2(x86_fp80* %0, x86_fp80* %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80*, x86_fp80** %4
%8 = load x86_fp80, x86_fp80* %7
%9 = fcmp ogt x86_fp80 %6, %8
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @ld_gt_mm2(x86_fp80* nocapture %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = load x86_fp80, x86_fp80* %1
%5 = fcmp ule x86_fp80 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int test_imm_F1uint32_reg(unsigned int val) {
  return ((val) & (0xF1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F1uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xf1,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F1uint32_reg>:
test   $0xf1,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F1uint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 241
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_F1uint32_reg(i32 %0) {
%2 = and i32 %0, 241
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int canoes_aux(size_t, unsigned int *, int /*<<< orphan*/);
unsigned canoes(size_t N, unsigned kids[N]) { return canoes_aux(N, kids, 0); }


x86 assembly (clang, -O0):
<canoes>:
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    %edx,%edx
call   1030 <canoes_aux@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<canoes>:
xor    %edx,%edx
jmp    1030 <canoes_aux@plt>

LLVM IR (-O0):
define i32 @canoes(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 = load i64, i64* %3
%7 = load i32*, i32** %4
%8 = call i32 @canoes_aux(i64 %6, i32* %7, i32 0)
ret i32 %8
}

LLVM IR (-O2):
define i32 @canoes(i64 %0, i32* %1) {
%3 = tail call i32 @canoes_aux(i64 %0, i32* %1, i32 0)
ret i32 %3
}
void gtk_movement_step_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_movement_step_get_type() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *get_timestamp() {
  static char buffer[128];
  time_t ttime;
  struct tm *timeinfo;
  time(&ttime);
  timeinfo = localtime(&ttime);
  strftime(buffer, sizeof buffer, "%Y-%m-%d %H:%M:%S", timeinfo);
  return buffer;
}


x86 assembly (clang, -O0):
<get_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    0x2ef7(%rip),%rdi
mov    $0x80,%esi
lea    0xe9b(%rip),%rdx
call   1050 <strftime@plt>
lea    0x2edf(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_timestamp>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
lea    0x2eff(%rip),%rbx
lea    0xea8(%rip),%rdx
mov    %rbx,%rdi
mov    $0x80,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@get_timestamp.buffer = internal global [128 x i8] zeroinitializer
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i8* @get_timestamp() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %4, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
%6 = call i32 @strftime(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @get_timestamp.buffer, i64 0, i64 0), i32 128, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @get_timestamp.buffer, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@get_timestamp.buffer = internal global [128 x i8] zeroinitializer
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i8* @get_timestamp() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
%5 = call i32 @strftime(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @get_timestamp.buffer, i64 0, i64 0), i32 128, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @get_timestamp.buffer, i64 0, i64 0)
}
int func8() {
#pragma critTer : 30 :../../ test / resources / functionNumber.c:
  return 0;
#pragma critTer : 31 :../../ test / resources / functionNumber.c:
}


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

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

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

LLVM IR (-O2):
define i32 @func8() {
ret i32 0
}
void cmd_print_help() {}


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

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

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

LLVM IR (-O2):
define void @cmd_print_help() {
ret void
}
v() { return 2; }


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

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

LLVM IR (-O0):
define i32 @v() {
ret i32 2
}

LLVM IR (-O2):
define i32 @v() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(size_t, size_t);
int /*<<< orphan*/ perror(char *);
void *xcalloc(size_t count, size_t sz) {
  void *p;
  if (p = calloc(count, sz), p == NULL) {
    perror("calloc");
    abort();
  }
  return p;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116f <xcalloc+0x3f>
lea    0xe9d(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %rax
call   1040 <calloc@plt>
test   %rax,%rax
je     113d <xcalloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"calloc\00"
define i8* @xcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [7 x i8] c"calloc\00"
define noalias 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 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fork();
int main(int argc, char *argv[]) {
  int p1, p2, p3, p4, p5, p6, p7, p8, p9, status;
  p1 = fork();
  p2 = fork();
  p3 = fork();
  p4 = fork();
  p5 = fork();
  p6 = fork();
  p7 = fork();
  p8 = fork();
  p9 = fork();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x30(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x34(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = call i32 (...) @fork()
store i32 %16, i32* %6
%17 = call i32 (...) @fork()
store i32 %17, i32* %7
%18 = call i32 (...) @fork()
store i32 %18, i32* %8
%19 = call i32 (...) @fork()
store i32 %19, i32* %9
%20 = call i32 (...) @fork()
store i32 %20, i32* %10
%21 = call i32 (...) @fork()
store i32 %21, i32* %11
%22 = call i32 (...) @fork()
store i32 %22, i32* %12
%23 = call i32 (...) @fork()
store i32 %23, i32* %13
%24 = call i32 (...) @fork()
store i32 %24, i32* %14
%25 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @fork()
%4 = tail call i32 (...) @fork()
%5 = tail call i32 (...) @fork()
%6 = tail call i32 (...) @fork()
%7 = tail call i32 (...) @fork()
%8 = tail call i32 (...) @fork()
%9 = tail call i32 (...) @fork()
%10 = tail call i32 (...) @fork()
%11 = tail call i32 (...) @fork()
%12 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ f(void *);
main() { f((void *)0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @f(i8* null)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i8* null)
ret i32 0
}
int test_00(unsigned char x) { return x & -129 ? -20 : -40; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff7f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
test   $0x7f,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_00(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -129
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_00(i8 zeroext %0) {
%2 = and i8 %0, 127
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ scanline_pad;
};
typedef TYPE_1__ ScreenFormat;

/* Variables and functions */
int get_ScreenFormat_scanline_pad(void *_p) {
  return (int)((ScreenFormat *)_p)->scanline_pad;
}


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

x86 assembly (clang, -O2):
<get_ScreenFormat_scanline_pad>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_ScreenFormat_scanline_pad(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_ScreenFormat_scanline_pad(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ logger_start_buffer(void *);
int logger_start_signal_cb(void *data, const char *signal,
                           const char *type_data, void *signal_data) {
  (void)data;
  (void)signal;
  (void)type_data;
  logger_start_buffer(signal_data);
  return 0;
}


x86 assembly (clang, -O0):
<logger_start_signal_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <logger_start_buffer@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logger_start_signal_cb>:
push   %rax
mov    %rcx,%rdi
call   1030 <logger_start_buffer@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @logger_start_signal_cb(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @logger_start_buffer(i8* %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @logger_start_signal_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* %3) {
%5 = tail call i32 @logger_start_buffer(i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_puthex(unsigned int);
int /*<<< orphan*/ uart_puthexnl(int /*<<< orphan*/);
int /*<<< orphan*/ uart_puts(char *);
void eventsSWIHandler(unsigned int syscallnum) {
  static unsigned int cnt = 0;
  uart_puts("SWI Handler:");
  uart_puts("syscall number =");
  uart_puthex(syscallnum);
  uart_puts(", cnt =");
  uart_puthexnl(cnt++);
}


x86 assembly (clang, -O0):
<eventsSWIHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1050 <uart_puts@plt>
lea    0xebf(%rip),%rdi
call   1050 <uart_puts@plt>
mov    -0x4(%rbp),%edi
call   1030 <uart_puthex@plt>
lea    0xebc(%rip),%rdi
call   1050 <uart_puts@plt>
mov    0x2ecf(%rip),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,0x2ec4(%rip)
call   1040 <uart_puthexnl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eventsSWIHandler>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1050 <uart_puts@plt>
lea    0xec7(%rip),%rdi
call   1050 <uart_puts@plt>
mov    %ebx,%edi
call   1030 <uart_puthex@plt>
lea    0xec5(%rip),%rdi
call   1050 <uart_puts@plt>
mov    0x2ed8(%rip),%edi
lea    0x1(%rdi),%eax
mov    %eax,0x2ecf(%rip)
pop    %rbx
jmp    1040 <uart_puthexnl@plt>

LLVM IR (-O0):
@eventsSWIHandler.cnt = internal global i32 0
@.str = [13 x i8] c"SWI Handler:\00"
@.str.1 = [17 x i8] c"syscall number =\00"
@.str.2 = [8 x i8] c", cnt =\00"
define void @eventsSWIHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @uart_puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @uart_puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @uart_puthex(i32 %5)
%7 = call i32 @uart_puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* @eventsSWIHandler.cnt
%9 = add i32 %8, 1
store i32 %9, i32* @eventsSWIHandler.cnt
%10 = call i32 @uart_puthexnl(i32 %8)
ret void
}

LLVM IR (-O2):
@eventsSWIHandler.cnt = internal unnamed_addr global i32 0
@.str = [13 x i8] c"SWI Handler:\00"
@.str.1 = [17 x i8] c"syscall number =\00"
@.str.2 = [8 x i8] c", cnt =\00"
define void @eventsSWIHandler(i32 %0) {
%2 = tail call i32 @uart_puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @uart_puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @uart_puthex(i32 %0)
%5 = tail call i32 @uart_puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32, i32* @eventsSWIHandler.cnt
%7 = add i32 %6, 1
store i32 %7, i32* @eventsSWIHandler.cnt
%8 = tail call i32 @uart_puthexnl(i32 %6)
ret void
}
unsigned getval_416() { return 2425378941U; }


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

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

LLVM IR (-O0):
define i32 @getval_416() {
ret i32 -1869588355
}

LLVM IR (-O2):
define i32 @getval_416() {
ret i32 -1869588355
}
void freetokens(char **tokens, int tokenc) {
  int i;
  for (i = 0; i < tokenc; i++)
    free(tokens[i]);
  free(tokens);
}


x86 assembly (clang, -O0):
<freetokens>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <freetokens+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <freetokens+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freetokens>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <freetokens+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <freetokens+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freetokens(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t instruction_extension_extract_bd_size(uint16_t instruction) {
  return (instruction >> 0x04) & 0x03;
}


x86 assembly (clang, -O0):
<instruction_extension_extract_bd_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
and    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<instruction_extension_extract_bd_size>:
mov    %edi,%eax
shr    $0x4,%eax
and    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @instruction_extension_extract_bd_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 4
%5 = and i32 %4, 3
ret i32 %5
}

LLVM IR (-O2):
define i32 @instruction_extension_extract_bd_size(i32 %0) {
%2 = lshr i32 %0, 4
%3 = and i32 %2, 3
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("sdd"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"sdd\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"sdd\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int test_imm_17int64_midword_reg(long long val) {
  return ((val >> 16) & (0x17 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_17int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x17,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_17int64_midword_reg>:
test   $0x170000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_17int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 23
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_17int64_midword_reg(i64 %0) {
%2 = and i64 %0, 1507328
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void print_chars(FILE *f, unsigned char *data, int n) {
  int i;
  for (i = 0; i < n; i++) {
    fprintf(f, " %02x", (int)data[i]);
  }
}


x86 assembly (clang, -O0):
<print_chars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1160 <print_chars+0x50>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <print_chars+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_chars>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %edx,%edx
jle    1149 <print_chars+0x39>
mov    %rsi,%r14
mov    %rdi,%r12
mov    %edx,%r13d
xor    %ebx,%ebx
lea    0xed1(%rip),%r15
nop
movzbl (%r14,%rbx,1),%edx
mov    %r12,%rdi
mov    %r15,%rsi
call   1030 <fprintf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1130 <print_chars+0x20>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c" %02x\00"
define void @print_chars(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %21, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %24
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i8*, i8** %5
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %12
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
br label %8
24: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c" %02x\00"
define void @print_chars(i32* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %13, %7 ]
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %3
ret void
}
/* Variables and functions */
scalar_t__ strtoll(char const *, char **, int);
long strtol(const char *nptr, char **endptr, int base) {
  return (long)strtoll(nptr, endptr, base);
}


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

x86 assembly (clang, -O2):
<strtol>:
jmp    1030 <strtoll@plt>

LLVM IR (-O0):
define i64 @strtol(i8* %0, i8** %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %5
%9 = load i32, i32* %6
%10 = call i64 @strtoll(i8* %7, i8** %8, i32 %9)
ret i64 %10
}

LLVM IR (-O2):
define i64 @strtol(i8* %0, i8** nocapture %1, i32 %2) {
%4 = tail call i64 @strtoll(i8* %0, i8** %1, i32 %2)
ret i64 %4
}
/* Type definitions */
struct lms_parser_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct lms_parser_info *);
void lms_parser_info_free(struct lms_parser_info *info) { free(info); }


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

x86 assembly (clang, -O2):
<lms_parser_info_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.lms_parser_info = type { i32 }
define void @lms_parser_info_free(%struct.lms_parser_info* %0) {
%2 = alloca %struct.lms_parser_info*
store %struct.lms_parser_info* %0, %struct.lms_parser_info** %2
%3 = load %struct.lms_parser_info*, %struct.lms_parser_info** %2
%4 = call i32 @free(%struct.lms_parser_info* %3)
ret void
}

LLVM IR (-O2):
%struct.lms_parser_info = type { i32 }
define void @lms_parser_info_free(%struct.lms_parser_info* nocapture %0) {
%2 = tail call i32 @free(%struct.lms_parser_info* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putnbr(int);
int /*<<< orphan*/ ft_putstr(char *);
void ft_putnbr_succ(int nb) {
  ft_putstr("\x1B[32m");
  ft_putnbr(nb);
  ft_putstr("\x1B[0m");
}


x86 assembly (clang, -O0):
<ft_putnbr_succ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <ft_putstr@plt>
mov    -0x4(%rbp),%edi
call   1030 <ft_putnbr@plt>
lea    0xec0(%rip),%rdi
call   1040 <ft_putstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putnbr_succ>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1040 <ft_putstr@plt>
mov    %ebx,%edi
call   1030 <ft_putnbr@plt>
lea    0xec9(%rip),%rdi
pop    %rbx
jmp    1040 <ft_putstr@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[32m\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
define void @ft_putnbr_succ(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ft_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @ft_putnbr(i32 %4)
%6 = call i32 @ft_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[32m\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
define void @ft_putnbr_succ(i32 %0) {
%2 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @ft_putnbr(i32 %0)
%4 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}