xunge/DecIR huggingface dataset:
void swap(int array[], int first, int second) {
  int temp;
  temp = array[first];
  array[first] = array[second];
  array[second] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x6b() {
  Assert_real((isdigit(107) == 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_isdigit.c",
              540, ("isdigit should be 0 for k"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x6b>:
push   %rax
mov    $0x6b,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x21c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for k\00"
define void @t_isdigit_0x6b() {
%1 = call i64 @isdigit(i32 107)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 540, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for k\00"
define void @t_isdigit_0x6b() {
%1 = tail call i64 @isdigit(i32 107)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 540, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fn_glutMouseFunc(void *);
void glutMouseFunc(void *fn) { fn_glutMouseFunc(fn); }


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

x86 assembly (clang, -O2):
<glutMouseFunc>:
jmp    1030 <fn_glutMouseFunc@plt>

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

LLVM IR (-O2):
define void @glutMouseFunc(i8* %0) {
%2 = tail call i32 @fn_glutMouseFunc(i8* %0)
ret void
}
char const *dogMenu(void) { return "kuhanu govedinu"; }


x86 assembly (clang, -O0):
<dogMenu>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dogMenu>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"kuhanu govedinu\00"
define i8* @dogMenu() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"kuhanu govedinu\00"
define i8* @dogMenu() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
char const *buf2str_extended(int /*<<< orphan*/ const *, int,
                             int /*<<< orphan*/ *);
const char *buf2str(const uint8_t *buf, int len) {
  return buf2str_extended(buf, len, NULL);
}


x86 assembly (clang, -O0):
<buf2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <buf2str_extended@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @buf2str(i32* %0, i32 %1) {
%3 = tail call i8* @buf2str_extended(i32* %0, i32 %1, i32* null)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ tet_test();
int /*<<< orphan*/ tri_test();
int main() {
  tri_test();
  tet_test();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <tri_test@plt>
mov    $0x0,%al
call   1040 <tet_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @tri_test()
%3 = call i32 (...) @tet_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @tri_test()
%2 = tail call i32 (...) @tet_test()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
void BatchEnd(void) {
  SendChar((((0XFFFCFFFF) >> 16) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) >> 16) & 0xFF);
  SendChar((((0XFFFCFFFF) & 0xFFFF) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) & 0xFFFF) & 0xFF);
}


x86 assembly (clang, -O0):
<BatchEnd>:
push   %rbp
mov    %rsp,%rbp
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<BatchEnd>:
push   %rax
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
pop    %rax
jmp    1030 <SendChar@plt>

LLVM IR (-O0):
define void @BatchEnd() {
%1 = call i32 @SendChar(i32 255)
%2 = call i32 @SendChar(i32 252)
%3 = call i32 @SendChar(i32 255)
%4 = call i32 @SendChar(i32 255)
ret void
}

LLVM IR (-O2):
define void @BatchEnd() {
%1 = tail call i32 @SendChar(i32 255)
%2 = tail call i32 @SendChar(i32 252)
%3 = tail call i32 @SendChar(i32 255)
%4 = tail call i32 @SendChar(i32 255)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, int);
int /*<<< orphan*/ unlink(char *);
void remove_file(int nb) {
  char file[1024];
  sprintf(file, "./%s%d",
          "This_is_a_pretty_long_base_file_name_in_order_to_trigger_readdir_"
          "not_just_in_one_exchange_with_the_export_but_in_several_runs_toward_"
          "the_export______This_should_make_this_test_a_better_test_",
          nb);
  unlink(file);
}


x86 assembly (clang, -O0):
<remove_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x4(%rbp),%ecx
lea    0xec1(%rip),%rsi
lea    0xec1(%rip),%rdx
call   1040 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <unlink@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_file>:
push   %rbx
sub    $0x400,%rsp
mov    %edi,%ecx
lea    0xecf(%rip),%rsi
lea    0xecf(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <unlink@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"./%s%d\00"
@.str.1 = [191 x i8] c"This_is_a_pretty_long_base_file_name_in_order_to_trigger_readdir_not_just_in_one_exchange_with_the_export_but_in_several_runs_toward_the_export______This_should_make_this_test_a_better_test_\00"
define void @remove_file(i32 %0) {
%2 = alloca i32
%3 = alloca [1024 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([191 x i8], [191 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i32 @unlink(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"./%s%d\00"
@.str.1 = [191 x i8] c"This_is_a_pretty_long_base_file_name_in_order_to_trigger_readdir_not_just_in_one_exchange_with_the_export_but_in_several_runs_toward_the_export______This_should_make_this_test_a_better_test_\00"
define void @remove_file(i32 %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([191 x i8], [191 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%5 = call i32 @unlink(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BP_Test();
int /*<<< orphan*/ Test();
int main(void) {
  BP_Test();
  Test();
  for (;;) {
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <BP_Test@plt>
mov    $0x0,%al
call   1040 <Test@plt>
jmp    113d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <BP_Test@plt>
xor    %eax,%eax
call   1040 <Test@plt>
nop
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @BP_Test()
%3 = call i32 (...) @Test()
br label %4
4: ; preds = %4, %0
br label %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @BP_Test()
%2 = tail call i32 (...) @Test()
br label %3
3: ; preds = %3, %0
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ scanf(char *, int *);
void getArray(int *array, unsigned count) {
  unsigned i = 0;
  for (; i < count; ++i) {
    scanf("%d", array + i);
    getchar();
  }
}


x86 assembly (clang, -O0):
<getArray>:
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
jae    1171 <getArray+0x51>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%eax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xea9(%rip),%rdi
call   1040 <scanf@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <getArray+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getArray>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     115c <getArray+0x3c>
mov    %rdi,%rbx
mov    %esi,%r15d
lea    0xeca(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
call   1030 <getchar@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r15
jne    1140 <getArray+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @getArray(i32* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
%10 = tail call i32 (...) @getchar()
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glRasterPos4f(int /*<<< orphan*/, int /*<<< orphan*/,
                                 int /*<<< orphan*/, int /*<<< orphan*/);
void RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
  glRasterPos4f(x, y, z, w);
}


x86 assembly (clang, -O0):
<RasterPos4f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <glRasterPos4f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RasterPos4f>:
jmp    1030 <glRasterPos4f@plt>

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

LLVM IR (-O2):
define void @RasterPos4f(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @glRasterPos4f(i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
void I2C2_ER_IRQHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @I2C2_ER_IRQHandler() {
ret void
}
/* Variables and functions */
int gethdr();
int getheader() {
  int ret;
  ret = gethdr();
  return ret;
}


x86 assembly (clang, -O0):
<getheader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <gethdr@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @getheader() {
%1 = tail call i32 (...) @gethdr()
ret i32 %1
}
void rop3_9_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ S;
  stk1 = T | stk2;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_9_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_9_0_1>:
mov    (%rdi),%al
mov    %eax,%ecx
xor    %sil,%cl
or     %dl,%cl
not    %cl
not    %sil
and    %dl,%sil
and    %al,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_9_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = and i32 %27, %29
%31 = load i8, i8* %7
%32 = zext i8 %31 to i32
%33 = load i8, i8* %6
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = and i32 %32, %35
%37 = or i32 %30, %36
%38 = load i8, i8* %6
%39 = zext i8 %38 to i32
%40 = load i8, i8* %5
%41 = zext i8 %40 to i32
%42 = xor i32 %41, -1
%43 = and i32 %39, %42
%44 = load i8*, i8** %4
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = and i32 %43, %46
%48 = or i32 %37, %47
%49 = trunc i32 %48 to i8
%50 = load i8*, i8** %4
store i8 %49, i8* %50
ret void
}

LLVM IR (-O2):
define void @rop3_9_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = or i8 %5, %2
%7 = xor i8 %6, -1
%8 = xor i8 %1, -1
%9 = and i8 %8, %2
%10 = and i8 %9, %4
%11 = or i8 %10, %7
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cart_destroy();
int /*<<< orphan*/ cart_ram_save();
void cart_unload(void) {
  cart_ram_save();
  cart_destroy();
}


x86 assembly (clang, -O0):
<cart_unload>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cart_ram_save@plt>
mov    $0x0,%al
call   1040 <cart_destroy@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cart_unload>:
push   %rax
xor    %eax,%eax
call   1030 <cart_ram_save@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <cart_destroy@plt>

LLVM IR (-O0):
define void @cart_unload() {
%1 = call i32 (...) @cart_ram_save()
%2 = call i32 (...) @cart_destroy()
ret void
}

LLVM IR (-O2):
define void @cart_unload() {
%1 = tail call i32 (...) @cart_ram_save()
%2 = tail call i32 (...) @cart_destroy()
ret void
}
__int128_t quad_fetch_ior_release(__int128_t *ptr, __int128_t value) {
  return __atomic_fetch_or(ptr, value, 3);
}


x86 assembly (clang, -O0):
<quad_fetch_ior_release>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rdi,-0x28(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x48(%rbp)
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    %rcx,-0x68(%rbp)
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    $0x3,%ecx
call   1030 <__atomic_fetch_or_16@plt>
mov    %rax,-0x80(%rbp)
mov    %rdx,-0x78(%rbp)
mov    -0x80(%rbp),%rax
mov    -0x78(%rbp),%rcx
mov    %rcx,-0x58(%rbp)
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
mov    -0x58(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quad_fetch_ior_release>:
mov    $0x3,%ecx
jmp    1030 <__atomic_fetch_or_16@plt>

LLVM IR (-O0):
define { i64, i64 } @quad_fetch_ior_release(i128* %0, i64 %1, i64 %2) {
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128*
%7 = alloca i128
%8 = alloca i128
%9 = alloca i128
%10 = alloca i128
%11 = alloca i128
%12 = bitcast i128* %5 to { i64, i64 }*
%13 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %12, i32 0, i32 0
store i64 %1, i64* %13
%14 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %12, i32 0, i32 1
store i64 %2, i64* %14
%15 = load i128, i128* %5
store i128* %0, i128** %6
store i128 %15, i128* %7
%16 = load i128*, i128** %6
%17 = load i128, i128* %7
store i128 %17, i128* %8
%18 = bitcast i128* %16 to i8*
%19 = load i128, i128* %8
store i128 %19, i128* %10
%20 = bitcast i128* %10 to { i64, i64 }*
%21 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %20, i32 0, i32 0
%22 = load i64, i64* %21
%23 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %20, i32 0, i32 1
%24 = load i64, i64* %23
%25 = call { i64, i64 } @__atomic_fetch_or_16(i8* %18, i64 %22, i64 %24, i32 3)
%26 = bitcast i128* %11 to { i64, i64 }*
%27 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %26, i32 0, i32 0
%28 = extractvalue { i64, i64 } %25, 0
store i64 %28, i64* %27
%29 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %26, i32 0, i32 1
%30 = extractvalue { i64, i64 } %25, 1
store i64 %30, i64* %29
%31 = load i128, i128* %11
store i128 %31, i128* %9
%32 = load i128, i128* %9
store i128 %32, i128* %4
%33 = bitcast i128* %4 to { i64, i64 }*
%34 = load { i64, i64 }, { i64, i64 }* %33
ret { i64, i64 } %34
}

LLVM IR (-O2):
define { i64, i64 } @quad_fetch_ior_release(i128* %0, i64 %1, i64 %2) {
%4 = bitcast i128* %0 to i8*
%5 = tail call { i64, i64 } @__atomic_fetch_or_16(i8* %4, i64 %1, i64 %2, i32 3)
ret { i64, i64 } %5
}
int check(int len, char palindromlisi[]) {
  int i;
  for (i = 0; i < len; i++, len--) {
    if (palindromlisi[i] != palindromlisi[len - 1]) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    116b <check+0x6b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     114f <check+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    1172 <check+0x72>
jmp    1154 <check+0x54>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <check+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
mov    $0x1,%eax
test   %edi,%edi
jle    112b <check+0x2b>
mov    %edi,%ecx
mov    $0x1,%edi
movzbl -0x1(%rsi,%rdi,1),%edx
cmp    -0x1(%rsi,%rcx,1),%dl
jne    112c <check+0x2c>
add    $0xffffffffffffffff,%rcx
lea    0x1(%rdi),%rdx
cmp    %rcx,%rdi
mov    %rdx,%rdi
jl     1110 <check+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @check(i32 %0, i8* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %18
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %8
6: ; preds = %8
%7 = icmp slt i64 %17, %13
br i1 %7, label %8, label %18
8: ; preds = %4, %6
%9 = phi i64 [ %5, %4 ], [ %13, %6 ]
%10 = phi i64 [ 0, %4 ], [ %17, %6 ]
%11 = getelementptr inbounds i8, i8* %1, i64 %10
%12 = load i8, i8* %11
%13 = add nsw i64 %9, -1
%14 = getelementptr inbounds i8, i8* %1, i64 %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %12, %15
%17 = add nuw nsw i64 %10, 1
br i1 %16, label %6, label %18
18: ; preds = %8, %6, %2
%19 = phi i32 [ 1, %2 ], [ 1, %6 ], [ 0, %8 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ callrts(char *);
void convdoub2int(void) { callrts("ifix"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"ifix\00"
define void @convdoub2int() {
%1 = call i32 @callrts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"ifix\00"
define void @convdoub2int() {
%1 = tail call i32 @callrts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
scalar_t__ BPF_IMM;
scalar_t__ BPF_LD;
int /*<<< orphan*/ emit_bpf(scalar_t__, int /*<<< orphan*/);
void emit3(uint8_t x, uint8_t y, uint8_t z) {
  union {
    uint8_t buf[4];
    uint32_t imm;
  } operand = {.buf = {x, y, z, 0xa8}};
  emit_bpf(BPF_LD + BPF_IMM, operand.imm);
}


x86 assembly (clang, -O0):
<emit3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0xa8,-0x14(%rbp)
mov    0x2e97(%rip),%rax
mov    (%rax),%rdi
mov    0x2e95(%rip),%rax
add    (%rax),%rdi
mov    -0x20(%rbp),%esi
call   1030 <emit_bpf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit3>:
mov    %edi,%esi
mov    0x2ebf(%rip),%rax
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%rdi
add    (%rax),%rdi
jmp    1030 <emit_bpf@plt>

LLVM IR (-O0):
%union.anon = type { [4 x i32] }
@BPF_LD = global i64 0
@BPF_IMM = global i64 0
define void @emit3(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %union.anon
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = bitcast %union.anon* %7 to [4 x i32]*
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 0
%10 = load i32, i32* %4
store i32 %10, i32* %9
%11 = getelementptr inbounds i32, i32* %9, i64 1
%12 = load i32, i32* %5
store i32 %12, i32* %11
%13 = getelementptr inbounds i32, i32* %11, i64 1
%14 = load i32, i32* %6
store i32 %14, i32* %13
%15 = getelementptr inbounds i32, i32* %13, i64 1
store i32 168, i32* %15
%16 = load i64, i64* @BPF_LD
%17 = load i64, i64* @BPF_IMM
%18 = add nsw i64 %16, %17
%19 = bitcast %union.anon* %7 to i32*
%20 = load i32, i32* %19
%21 = call i32 @emit_bpf(i64 %18, i32 %20)
ret void
}

LLVM IR (-O2):
@BPF_LD = global i64 0
@BPF_IMM = global i64 0
define void @emit3(i32 %0, i32 %1, i32 %2) {
%4 = load i64, i64* @BPF_LD
%5 = load i64, i64* @BPF_IMM
%6 = add nsw i64 %5, %4
%7 = tail call i32 @emit_bpf(i64 %6, i32 %0)
ret void
}
int skip_atoi(const char **s) {
  int i, c;
  for (i = 0; '0' <= (c = **s) && c <= '9'; ++*s)
    i = i * 10 + c - '0';
  return i;
}


x86 assembly (clang, -O0):
<skip_atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edx
mov    %edx,-0x10(%rbp)
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0x11(%rbp)
jg     1138 <skip_atoi+0x38>
cmpl   $0x39,-0x10(%rbp)
setle  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1148 <skip_atoi+0x48>
jmp    1168 <skip_atoi+0x68>
imul   $0xa,-0xc(%rbp),%eax
add    -0x10(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    110f <skip_atoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_atoi>:
mov    (%rdi),%rcx
mov    (%rcx),%dl
lea    -0x30(%rdx),%esi
xor    %eax,%eax
cmp    $0x9,%sil
ja     113f <skip_atoi+0x3f>
add    $0x1,%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movzbl %dl,%edx
lea    (%rax,%rax,4),%eax
lea    (%rdx,%rax,2),%eax
add    $0xffffffd0,%eax
mov    %rcx,(%rdi)
movzbl (%rcx),%edx
lea    -0x30(%rdx),%esi
add    $0x1,%rcx
cmp    $0xa,%sil
jb     1120 <skip_atoi+0x20>
ret

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

LLVM IR (-O2):
define i32 @skip_atoi(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = add i8 %3, -48
%5 = icmp ult i8 %4, 10
br i1 %5, label %6, label %18
6: ; preds = %1, %6
%7 = phi i8 [ %15, %6 ], [ %3, %1 ]
%8 = phi i8* [ %14, %6 ], [ %2, %1 ]
%9 = phi i32 [ %13, %6 ], [ 0, %1 ]
%10 = zext i8 %7 to i32
%11 = mul nsw i32 %9, 10
%12 = add i32 %11, -48
%13 = add i32 %12, %10
%14 = getelementptr inbounds i8, i8* %8, i64 1
store i8* %14, i8** %0
%15 = load i8, i8* %14
%16 = add i8 %15, -48
%17 = icmp ult i8 %16, 10
br i1 %17, label %6, label %18
18: ; preds = %6, %1
%19 = phi i32 [ 0, %1 ], [ %13, %6 ]
ret i32 %19
}
char isleappartial(int year) { return (char)(year % 4); }


x86 assembly (clang, -O0):
<isleappartial>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %dl,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isleappartial>:
mov    %edi,%eax
lea    0x3(%rax),%ecx
test   %edi,%edi
cmovns %edi,%ecx
and    $0xfc,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @isleappartial(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 4
%5 = trunc i32 %4 to i8
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @isleappartial(i32 %0) {
%2 = srem i32 %0, 4
%3 = trunc i32 %2 to i8
ret i8 %3
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ timer_run_with_tv(struct timeval *);
void timer_run() {
  struct timeval now;
  gettimeofday(&now, NULL);
  timer_run_with_tv(&now);
}


x86 assembly (clang, -O0):
<timer_run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
lea    -0x8(%rbp),%rdi
call   1040 <timer_run_with_tv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_run>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    %rbx,%rdi
call   1040 <timer_run_with_tv@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define void @timer_run() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = call i32 @timer_run_with_tv(%struct.timeval* %1)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define void @timer_run() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = call i32 @timer_run_with_tv(%struct.timeval* %1)
ret void
}
int dmi_check_system(struct dmi_system_id *list) { return 0; }


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

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

LLVM IR (-O0):
%struct.dmi_system_id = type opaque
define i32 @dmi_check_system(%struct.dmi_system_id* %0) {
%2 = alloca %struct.dmi_system_id*
store %struct.dmi_system_id* %0, %struct.dmi_system_id** %2
ret i32 0
}

LLVM IR (-O2):
%struct.dmi_system_id = type opaque
define i32 @dmi_check_system(%struct.dmi_system_id* nocapture readnone %0) {
ret i32 0
}
void foo213() {}


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

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

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

LLVM IR (-O2):
define void @foo213() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ trancode_5001_(int);
int /*<<< orphan*/ trancode_5002_(int);
int /*<<< orphan*/ trancode_5004_(int);
int main(int argc, char **argv) {
  if (argc == 2) {
    printf("argv %s\n", argv[1]);
  }
  do {
    trancode_5004_(5004);
  } while (0);
  do {
    trancode_5002_(5002);
  } while (0);
  do {
    trancode_5001_(5001);
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1174 <main+0x34>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
jmp    1179 <main+0x39>
mov    $0x138c,%edi
call   1050 <trancode_5004_@plt>
jmp    1188 <main+0x48>
mov    $0x138a,%edi
call   1030 <trancode_5002_@plt>
jmp    1197 <main+0x57>
mov    $0x1389,%edi
call   1060 <trancode_5001_@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1156 <main+0x16>
mov    0x8(%rsi),%rsi
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
mov    $0x138c,%edi
call   1050 <trancode_5004_@plt>
mov    $0x138a,%edi
call   1030 <trancode_5002_@plt>
mov    $0x1389,%edi
call   1060 <trancode_5001_@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"argv %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %8, %2
br label %14
14: ; preds = %13
%15 = call i32 @trancode_5004_(i32 5004)
br label %16
16: ; preds = %14
br label %17
17: ; preds = %16
%18 = call i32 @trancode_5002_(i32 5002)
br label %19
19: ; preds = %17
br label %20
20: ; preds = %19
%21 = call i32 @trancode_5001_(i32 5001)
br label %22
22: ; preds = %20
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"argv %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %2, %4
%9 = tail call i32 @trancode_5004_(i32 5004)
%10 = tail call i32 @trancode_5002_(i32 5002)
%11 = tail call i32 @trancode_5001_(i32 5001)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ draw(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
void main() {
  int row = 1;
  printf("Please input an odd row number:\n");
  scanf("%d", &row);
  draw(row);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1030 <draw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <draw@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Please input an odd row number:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define void @main() {
%1 = alloca i32
store i32 1, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @draw(i32 %4)
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [32 x i8] c"Please input an odd row number:\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @draw(i32 %5)
ret void
}
/* Variables and functions */
scalar_t__ islower(int);
int toupper(int c) {
  if (islower(c))
    return 'A' - 'a' + c;
  return c;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     113d <toupper+0x2d>
mov    -0x8(%rbp),%eax
add    $0xffffffe0,%eax
mov    %eax,-0x4(%rbp)
jmp    1143 <toupper+0x33>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @islower(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = add nsw i32 -32, %8
store i32 %9, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %3
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i64 @islower(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ AbortProg(char *, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void AbortProg2(char *msg, char *msg2, int exitcode) {
  fprintf(stderr, "%s ", msg);
  AbortProg(msg2, exitcode);
}


x86 assembly (clang, -O0):
<AbortProg2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeb9(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <AbortProg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AbortProg2>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%rdx
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <AbortProg@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s \00"
define void @AbortProg2(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 i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @AbortProg(i8* %10, i32 %11)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s \00"
define void @AbortProg2(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = tail call i32 @AbortProg(i8* %1, i32 %2)
ret void
}
void larger_of(double *x, double *y) {
  *x = *x > *y ? *x : *y;
  *y = *x;
}


x86 assembly (clang, -O0):
<larger_of>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    1134 <larger_of+0x34>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1141 <larger_of+0x41>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<larger_of>:
movsd  (%rdi),%xmm0
maxsd  (%rsi),%xmm0
movsd  %xmm0,(%rdi)
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @larger_of(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = fcmp ogt double %6, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load double*, double** %3
%12 = load double, double* %11
br label %16
13: ; preds = %2
%14 = load double*, double** %4
%15 = load double, double* %14
br label %16
16: ; preds = %13, %10
%17 = phi double [ %12, %10 ], [ %15, %13 ]
%18 = load double*, double** %3
store double %17, double* %18
%19 = load double*, double** %3
%20 = load double, double* %19
%21 = load double*, double** %4
store double %20, double* %21
ret void
}

LLVM IR (-O2):
define void @larger_of(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fcmp ogt double %3, %4
%6 = select i1 %5, double %3, double %4
store double %6, double* %0
store double %6, double* %1
ret void
}
void _infix_operator_plus_i16_i16(signed short lhs, signed short rhs,
                                  signed short *__rval_1) {
  *__rval_1 = lhs + rhs;
}


x86 assembly (clang, -O0):
<_infix_operator_plus_i16_i16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    %rdx,-0x10(%rbp)
movswl -0x2(%rbp),%eax
movswl -0x4(%rbp),%ecx
add    %ecx,%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_infix_operator_plus_i16_i16>:
add    %esi,%edi
mov    %di,(%rdx)
ret

LLVM IR (-O0):
define void @_infix_operator_plus_i16_i16(i16 signext %0, i16 signext %1, i16* %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16*
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16* %2, i16** %6
%7 = load i16, i16* %4
%8 = sext i16 %7 to i32
%9 = load i16, i16* %5
%10 = sext i16 %9 to i32
%11 = add nsw i32 %8, %10
%12 = trunc i32 %11 to i16
%13 = load i16*, i16** %6
store i16 %12, i16* %13
ret void
}

LLVM IR (-O2):
define void @_infix_operator_plus_i16_i16(i16 signext %0, i16 signext %1, i16* nocapture writeonly %2) {
%4 = add i16 %1, %0
store i16 %4, i16* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fs_univ_freeinodes(int /*<<< orphan*/, int /*<<< orphan*/,
                                      int /*<<< orphan*/);
int /*<<< orphan*/ main_time();
void fsnodes_freeinodes(void) { fs_univ_freeinodes(main_time(), 0, 0); }


x86 assembly (clang, -O0):
<fsnodes_freeinodes>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <main_time@plt>
mov    %eax,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <fs_univ_freeinodes@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsnodes_freeinodes>:
push   %rax
xor    %eax,%eax
call   1040 <main_time@plt>
mov    %eax,%edi
xor    %esi,%esi
xor    %edx,%edx
pop    %rax
jmp    1030 <fs_univ_freeinodes@plt>

LLVM IR (-O0):
define void @fsnodes_freeinodes() {
%1 = call i32 (...) @main_time()
%2 = call i32 @fs_univ_freeinodes(i32 %1, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @fsnodes_freeinodes() {
%1 = tail call i32 (...) @main_time()
%2 = tail call i32 @fs_univ_freeinodes(i32 %1, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void show_digits_recur(int n) {
  if (n == 0)
    return;
  printf("%d\t", n % 10);
  return show_digits_recur(n / 10);
}


x86 assembly (clang, -O0):
<show_digits_recur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    113a <show_digits_recur+0x1a>
jmp    1165 <show_digits_recur+0x45>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <show_digits_recur@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_digits_recur>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
je     1164 <show_digits_recur+0x54>
mov    %edi,%ebx
lea    0xede(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %ebx,%r15
imul   $0x66666667,%r15,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x22,%rbx
add    %eax,%ebx
lea    (%rbx,%rbx,1),%eax
lea    (%rax,%rax,4),%eax
mov    %r15d,%esi
sub    %eax,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x9,%r15d
cmp    $0x12,%r15d
ja     1130 <show_digits_recur+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\09\00"
define void @show_digits_recur(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %12
6: ; preds = %1
%7 = load i32, i32* %2
%8 = srem i32 %7, 10
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = sdiv i32 %10, 10
br label %12
12: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\09\00"
define void @show_digits_recur(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = srem i32 %4, 10
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = sdiv i32 %4, 10
%8 = add i32 %4, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %1
ret void
}