xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ link_failure_remainderl();
scalar_t__ remainderl(long double, long double);
void test_remainderl(long double ld1, long double ld2) {
  if (remainderl(ld1, ld2) != remainderl(ld1, ld2))
    link_failure_remainderl();
}


x86 assembly (clang, -O0):
<test_remainderl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1040 <remainderl@plt>
mov    %rax,-0x28(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1040 <remainderl@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
je     1175 <test_remainderl+0x55>
mov    $0x0,%al
call   1030 <link_failure_remainderl@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_remainderl>:
push   %rbx
sub    $0x40,%rsp
fldt   0x50(%rsp)
fld    %st(0)
fstpt  0x34(%rsp)
fldt   0x60(%rsp)
fld    %st(0)
fstpt  0x28(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1040 <remainderl@plt>
mov    %rax,%rbx
fldt   0x28(%rsp)
fstpt  0x10(%rsp)
fldt   0x34(%rsp)
fstpt  (%rsp)
call   1040 <remainderl@plt>
cmp    %rax,%rbx
jne    1167 <test_remainderl+0x47>
add    $0x40,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
jmp    1030 <link_failure_remainderl@plt>

LLVM IR (-O0):
define void @test_remainderl(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* %4
%7 = call i64 @remainderl(x86_fp80 %5, x86_fp80 %6)
%8 = load x86_fp80, x86_fp80* %3
%9 = load x86_fp80, x86_fp80* %4
%10 = call i64 @remainderl(x86_fp80 %8, x86_fp80 %9)
%11 = icmp ne i64 %7, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @link_failure_remainderl()
br label %14
14: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
define void @test_remainderl(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call i64 @remainderl(x86_fp80 %0, x86_fp80 %1)
%4 = tail call i64 @remainderl(x86_fp80 %0, x86_fp80 %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_remainderl()
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SmpcResetButton();
void YabauseResetButton(void) { SmpcResetButton(); }


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

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

LLVM IR (-O0):
define void @YabauseResetButton() {
%1 = call i32 (...) @SmpcResetButton()
ret void
}

LLVM IR (-O2):
define void @YabauseResetButton() {
%1 = tail call i32 (...) @SmpcResetButton()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ my_free(int *);
int *my_malloc(int);
void af2() {
  int *p = my_malloc(12);
  my_free(p);
  free(p);
}


x86 assembly (clang, -O0):
<af2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1040 <my_malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <my_free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<af2>:
push   %rbx
mov    $0xc,%edi
call   1040 <my_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <my_free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @af2() {
%1 = alloca i32*
%2 = call i32* @my_malloc(i32 12)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @my_free(i32* %3)
%5 = load i32*, i32** %1
%6 = call i32 @free(i32* %5)
ret void
}

LLVM IR (-O2):
define void @af2() {
%1 = tail call i32* @my_malloc(i32 12)
%2 = tail call i32 @my_free(i32* %1)
%3 = tail call i32 @free(i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cgincbind(char *, char *, int);
void cginc2ib(void) { cgincbind("bx", "add", 1); }


x86 assembly (clang, -O0):
<cginc2ib>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x1,%edx
call   1030 <cgincbind@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cginc2ib>:
lea    0xee9(%rip),%rdi
lea    0xee5(%rip),%rsi
mov    $0x1,%edx
jmp    1030 <cgincbind@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"bx\00"
@.str.1 = [4 x i8] c"add\00"
define void @cginc2ib() {
%1 = call i32 @cgincbind(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"bx\00"
@.str.1 = [4 x i8] c"add\00"
define void @cginc2ib() {
%1 = tail call i32 @cgincbind(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void error(int code, char *obj, char *msg) {
  fprintf(stderr, "%s: %s", obj, msg);
  fflush(stderr);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    0x2eb2(%rip),%rbx
mov    (%rbx),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"%s: %s\00"
@stdout = global i32 0
define void @error(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
%11 = load i32, i32* @stderr
%12 = call i32 @fflush(i32 %11)
%13 = load i32, i32* @stdout
%14 = call i32 @fflush(i32 %13)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%s: %s\00"
@stdout = global i32 0
define void @error(i32 %0, i8* %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fflush(i32 %6)
%8 = load i32, i32* @stdout
%9 = tail call i32 @fflush(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_URG(int /*<<< orphan*/);
int gen_URG() { handle_URG(0); }


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

x86 assembly (clang, -O2):
<gen_URG>:
xor    %edi,%edi
jmp    1030 <handle_URG@plt>

LLVM IR (-O0):
define i32 @gen_URG() {
%1 = alloca i32
%2 = call i32 @handle_URG(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gen_URG() {
%1 = tail call i32 @handle_URG(i32 0)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ gpio_function_select(int, int);
int32_t gpio_direction_output(int which_one) {
  return gpio_function_select(which_one, 0x1);
}


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

x86 assembly (clang, -O2):
<gpio_direction_output>:
mov    $0x1,%esi
jmp    1030 <gpio_function_select@plt>

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

LLVM IR (-O2):
define i32 @gpio_direction_output(i32 %0) {
%2 = tail call i32 @gpio_function_select(i32 %0, i32 1)
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void store_le32(char *c, int y) {
  uint32_t x = (uint32_t)y;
  c[0] = x & 0xff;
  c[1] = (x >> 8) & 0xff;
  c[2] = (x >> 16) & 0xff;
  c[3] = (x >> 24) & 0xff;
}


x86 assembly (clang, -O0):
<store_le32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_le32>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @store_le32(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %1, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
void gdk_window_get_events() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_get_events() {
ret void
}
/* Variables and functions */
long random();
int rnd_coinflip(int n) {
  int heads;
  do {
    heads = (int)(random() % (long)(2)) > 0;
  } while (heads && n--);
  return heads;
}


x86 assembly (clang, -O0):
<rnd_coinflip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %edx,%eax
cmp    $0x0,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     115f <rnd_coinflip+0x4f>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    111b <rnd_coinflip+0xb>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd_coinflip>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1030 <random@plt>
mov    %rax,%rcx
shr    $0x3f,%rcx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
sub    $0x1,%ebx
setb   %cl
test   %eax,%eax
jle    1143 <rnd_coinflip+0x33>
test   %cl,%cl
je     1120 <rnd_coinflip+0x10>
xor    %ecx,%ecx
test   %eax,%eax
setg   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rnd_coinflip(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %17, %1
%5 = call i64 (...) @random()
%6 = srem i64 %5, 2
%7 = trunc i64 %6 to i32
%8 = icmp sgt i32 %7, 0
%9 = zext i1 %8 to i32
store i32 %9, i32* %3
br label %10
10: ; preds = %4
%11 = load i32, i32* %3
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i32, i32* %2
%15 = add nsw i32 %14, -1
store i32 %15, i32* %2
%16 = icmp ne i32 %14, 0
br label %17
17: ; preds = %13, %10
%18 = phi i1 [ false, %10 ], [ %16, %13 ]
br i1 %18, label %4, label %19
19: ; preds = %17
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @rnd_coinflip(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %9, %2 ]
%4 = tail call i64 (...) @random()
%5 = srem i64 %4, 2
%6 = trunc i64 %5 to i32
%7 = icmp sgt i32 %6, 0
%8 = xor i1 %7, true
%9 = add nsw i32 %3, -1
%10 = icmp eq i32 %3, 0
%11 = select i1 %8, i1 true, i1 %10
br i1 %11, label %12, label %2
12: ; preds = %2
%13 = zext i1 %7 to i32
ret i32 %13
}
/* Variables and functions */
scalar_t__ unknown();
int test17() { (void)(1 && unknown()); }


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

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

LLVM IR (-O0):
define i32 @test17() {
%1 = alloca i32
%2 = call i64 (...) @unknown()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @test17() {
%1 = tail call i64 (...) @unknown()
ret i32 undef
}
/* Variables and functions */
float sqrt(int);
float etr_area_side(float side) {
  float square_root_3 = sqrt(3);
  float area = (side * side) * square_root_3 / 4;
  return area;
}


x86 assembly (clang, -O0):
<etr_area_side>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x3,%edi
call   1030 <sqrt@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xebd(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<etr_area_side>:
push   %rax
movss  %xmm0,0x4(%rsp)
mov    $0x3,%edi
call   1030 <sqrt@plt>
movss  0x4(%rsp),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm1,%xmm0
mulss  0xec9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @etr_area_side(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = call float @sqrt(i32 3)
store float %5, float* %3
%6 = load float, float* %2
%7 = load float, float* %2
%8 = fmul float %6, %7
%9 = load float, float* %3
%10 = fmul float %8, %9
%11 = fdiv float %10, 4.000000e+00
store float %11, float* %4
%12 = load float, float* %4
ret float %12
}

LLVM IR (-O2):
define float @etr_area_side(float %0) {
%2 = tail call float @sqrt(i32 3)
%3 = fmul float %0, %0
%4 = fmul float %3, %2
%5 = fmul float %4, 2.500000e-01
ret float %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int sys_getresuid(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                  int /*<<< orphan*/ *);
int sys_getresuid32(uid_t *ruid, uid_t *euid, uid_t *suid) {
  return sys_getresuid(ruid, euid, suid);
}


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

x86 assembly (clang, -O2):
<sys_getresuid32>:
jmp    1030 <sys_getresuid@plt>

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

LLVM IR (-O2):
define i32 @sys_getresuid32(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @sys_getresuid(i32* %0, i32* %1, i32* %2)
ret i32 %4
}
/* Variables and functions */
int pr_close_nowait(int);
int pr_wait(int);
int pr_close(int fd) {
  int pid = pr_close_nowait(fd);
  return pr_wait(pid);
}


x86 assembly (clang, -O0):
<pr_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <pr_close_nowait@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <pr_wait@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_close>:
push   %rax
call   1040 <pr_close_nowait@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <pr_wait@plt>

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

LLVM IR (-O2):
define i32 @pr_close(i32 %0) {
%2 = tail call i32 @pr_close_nowait(i32 %0)
%3 = tail call i32 @pr_wait(i32 %2)
ret i32 %3
}
/* Type definitions */
struct timespec {
  double tv_sec;
  int tv_nsec;
};

/* Variables and functions */
double seconds_between(struct timespec *a, struct timespec *b) {
  return (b->tv_sec - a->tv_sec) + (b->tv_nsec - a->tv_nsec) * 1e-9;
}


x86 assembly (clang, -O0):
<seconds_between>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
mov    -0x8(%rbp),%rcx
sub    0x8(%rcx),%eax
cvtsi2sd %eax,%xmm0
movsd  0xeca(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<seconds_between>:
movsd  (%rsi),%xmm1
subsd  (%rdi),%xmm1
mov    0x8(%rsi),%eax
sub    0x8(%rdi),%eax
cvtsi2sd %eax,%xmm0
mulsd  0xee6(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timespec = type { double, i32 }
define double @seconds_between(%struct.timespec* %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timespec*, %struct.timespec** %4
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 0
%7 = load double, double* %6
%8 = load %struct.timespec*, %struct.timespec** %3
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i32 0, i32 0
%10 = load double, double* %9
%11 = fsub double %7, %10
%12 = load %struct.timespec*, %struct.timespec** %4
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %12, i32 0, i32 1
%14 = load i32, i32* %13
%15 = load %struct.timespec*, %struct.timespec** %3
%16 = getelementptr inbounds %struct.timespec, %struct.timespec* %15, i32 0, i32 1
%17 = load i32, i32* %16
%18 = sub nsw i32 %14, %17
%19 = sitofp i32 %18 to double
%20 = call double @llvm.fmuladd.f64(double %19, double 1.000000e-09, double %11)
ret double %20
}

LLVM IR (-O2):
%struct.timespec = type { double, i32 }
define double @seconds_between(%struct.timespec* nocapture %0, %struct.timespec* nocapture %1) {
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%6 = load double, double* %5
%7 = fsub double %4, %6
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%11 = load i32, i32* %10
%12 = sub nsw i32 %9, %11
%13 = sitofp i32 %12 to double
%14 = tail call double @llvm.fmuladd.f64(double %13, double 1.000000e-09, double %7)
ret double %14
}
/* Variables and functions */
double fmod(double, double);
double de_normalize_time(double jde, double jde_start, double jde_end,
                         int sets) {
  double t0 = (jde_end - jde_start) / (double)sets;
  double t1 = fmod(jde - jde_start, t0);
  return 2.0 * (t1 / t0) - 1.0;
}


x86 assembly (clang, -O0):
<de_normalize_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
call   1030 <fmod@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xe8f(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<de_normalize_time>:
push   %rax
movapd %xmm2,%xmm3
subsd  %xmm1,%xmm3
xorps  %xmm2,%xmm2
cvtsi2sd %edi,%xmm2
divsd  %xmm2,%xmm3
movsd  %xmm3,(%rsp)
subsd  %xmm1,%xmm0
movapd %xmm3,%xmm1
call   1030 <fmod@plt>
divsd  (%rsp),%xmm0
addsd  %xmm0,%xmm0
addsd  0xeb9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @de_normalize_time(double %0, double %1, double %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i32
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store i32 %3, i32* %8
%11 = load double, double* %7
%12 = load double, double* %6
%13 = fsub double %11, %12
%14 = load i32, i32* %8
%15 = sitofp i32 %14 to double
%16 = fdiv double %13, %15
store double %16, double* %9
%17 = load double, double* %5
%18 = load double, double* %6
%19 = fsub double %17, %18
%20 = load double, double* %9
%21 = call double @fmod(double %19, double %20)
store double %21, double* %10
%22 = load double, double* %10
%23 = load double, double* %9
%24 = fdiv double %22, %23
%25 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %24, double -1.000000e+00)
ret double %25
}

LLVM IR (-O2):
define double @de_normalize_time(double %0, double %1, double %2, i32 %3) {
%5 = fsub double %2, %1
%6 = sitofp i32 %3 to double
%7 = fdiv double %5, %6
%8 = fsub double %0, %1
%9 = tail call double @fmod(double %8, double %7)
%10 = fdiv double %9, %7
%11 = tail call double @llvm.fmuladd.f64(double %10, double 2.000000e+00, double -1.000000e+00)
ret double %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
long int filesize(FILE *fp) {
  long int save_pos, size_of_file;
  save_pos = ftell(fp);
  fseek(fp, 0L, SEEK_END);
  size_of_file = ftell(fp);
  fseek(fp, save_pos, SEEK_SET);
  return (size_of_file);
}


x86 assembly (clang, -O0):
<filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e6d(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filesize>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r15
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @filesize(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @ftell(i32* %5)
store i64 %6, i64* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i64 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %4
%12 = load i32*, i32** %2
%13 = load i64, i64* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i64 %13, i32 %14)
%16 = load i64, i64* %4
ret i64 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @filesize(i32* nocapture %0) {
%2 = tail call i64 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i64 %2, i32 %6)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ BSP_MotorControlBoard_Reset();
void L6474_Reset(void) { BSP_MotorControlBoard_Reset(); }


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

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

LLVM IR (-O0):
define void @L6474_Reset() {
%1 = call i32 (...) @BSP_MotorControlBoard_Reset()
ret void
}

LLVM IR (-O2):
define void @L6474_Reset() {
%1 = tail call i32 (...) @BSP_MotorControlBoard_Reset()
ret void
}
int pptp_timeout() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pptp_timeout() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ h2o_fatal(char *);
void *realloc(void *, size_t);
void *h2o_mem_realloc(void *oldp, size_t sz) {
  void *newp = realloc(oldp, sz);
  if (newp == NULL) {
    h2o_fatal("no memory");
    return oldp;
  }
  return newp;
}


x86 assembly (clang, -O0):
<h2o_mem_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1165 <h2o_mem_realloc+0x45>
lea    0xead(%rip),%rdi
call   1030 <h2o_fatal@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116d <h2o_mem_realloc+0x4d>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_mem_realloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <realloc@plt>
test   %rax,%rax
je     1130 <h2o_mem_realloc+0x10>
pop    %rbx
ret
lea    0xec9(%rip),%rdi
call   1030 <h2o_fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"no memory\00"
define i8* @h2o_mem_realloc(i8* %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @h2o_fatal(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = phi i8* [ %0, %5 ], [ %3, %2 ]
ret i8* %8
}
/* Type definitions */
struct item {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ check_is_pair(struct item *);
int /*<<< orphan*/ item_free(struct item *);
int /*<<< orphan*/ pair_get_components(struct item *, struct item **,
                                       struct item **);
struct item *pair_get_first(struct item *pair) {
  struct item *first;
  struct item *second;
  check_is_pair(pair);
  pair_get_components(pair, &first, &second);
  item_free(second);
  return first;
}


x86 assembly (clang, -O0):
<pair_get_first>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <check_is_pair@plt>
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <pair_get_components@plt>
mov    -0x18(%rbp),%rdi
call   1040 <item_free@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pair_get_first>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1050 <check_is_pair@plt>
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
mov    %rbx,%rdi
call   1030 <pair_get_components@plt>
mov    (%rsp),%rdi
call   1040 <item_free@plt>
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.item = type { i32 }
define %struct.item* @pair_get_first(%struct.item* %0) {
%2 = alloca %struct.item*
%3 = alloca %struct.item*
%4 = alloca %struct.item*
store %struct.item* %0, %struct.item** %2
%5 = load %struct.item*, %struct.item** %2
%6 = call i32 @check_is_pair(%struct.item* %5)
%7 = load %struct.item*, %struct.item** %2
%8 = call i32 @pair_get_components(%struct.item* %7, %struct.item** %3, %struct.item** %4)
%9 = load %struct.item*, %struct.item** %4
%10 = call i32 @item_free(%struct.item* %9)
%11 = load %struct.item*, %struct.item** %3
ret %struct.item* %11
}

LLVM IR (-O2):
%struct.item = type { i32 }
define %struct.item* @pair_get_first(%struct.item* %0) {
%2 = alloca %struct.item*
%3 = alloca %struct.item*
%4 = bitcast %struct.item** %2 to i8*
%5 = bitcast %struct.item** %3 to i8*
%6 = tail call i32 @check_is_pair(%struct.item* %0)
%7 = call i32 @pair_get_components(%struct.item* %0, %struct.item** %2, %struct.item** %3)
%8 = load %struct.item*, %struct.item** %3
%9 = call i32 @item_free(%struct.item* %8)
%10 = load %struct.item*, %struct.item** %2
ret %struct.item* %10
}
void nand_cmd(unsigned char cmd) {
  *((volatile unsigned long *)0x70200008) = cmd;
}


x86 assembly (clang, -O0):
<nand_cmd>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,%ecx
mov    $0x70200008,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nand_cmd>:
mov    %edi,%eax
mov    %rax,0x70200008
70
ret

LLVM IR (-O0):
define void @nand_cmd(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i64
store volatile i64 %4, i64* inttoptr (i64 1881145352 to i64*)
ret void
}

LLVM IR (-O2):
define void @nand_cmd(i8 zeroext %0) {
%2 = zext i8 %0 to i64
store volatile i64 %2, i64* inttoptr (i64 1881145352 to i64*)
ret void
}
/* Variables and functions */
scalar_t__ chdir(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void goto_installpath(const char *argv0) {
  if (chdir("/usr/share/games/gltron") < 0) {
    fprintf(stderr, "Couldn't change to install directory\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<goto_installpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <chdir@plt>
cmp    $0x0,%rax
jge    1171 <goto_installpath+0x41>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xeb6(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goto_installpath>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <chdir@plt>
test   %rax,%rax
js     1144 <goto_installpath+0x14>
pop    %rax
ret
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"/usr/share/games/gltron\00"
@stderr = global i32 0
@.str.1 = [38 x i8] c"Couldn't change to install directory\0A\00"
define void @goto_installpath(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 @chdir(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"/usr/share/games/gltron\00"
@stderr = global i32 0
@.str.1 = [38 x i8] c"Couldn't change to install directory\0A\00"
define void @goto_installpath(i8* nocapture readnone %0) {
%2 = tail call i64 @chdir(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double wtime(void) {
  struct timeval t;
  gettimeofday(&t, NULL);
  return (double)t.tv_sec + ((double)t.tv_usec) / 1000000.0;
}


x86 assembly (clang, -O0):
<wtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
movsd  0xec7(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wtime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
divsd  0xeca(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @wtime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %5, %9
ret double %10
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @wtime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = fdiv double %9, 1.000000e+06
%11 = fadd double %10, %6
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ FatalErrnoError(int, int, char *);
int dup2(int, int);
int Edup2(int oldfd, int newfd) {
  int res = dup2(oldfd, newfd);
  FatalErrnoError(res == -1, 1, "dup2()");
  return res;
}


x86 assembly (clang, -O0):
<Edup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <dup2@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x1,%esi
lea    0xeac(%rip),%rdx
call   1040 <FatalErrnoError@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Edup2>:
push   %rbx
call   1030 <dup2@plt>
mov    %eax,%ebx
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
lea    0xec8(%rip),%rdx
mov    $0x1,%esi
call   1040 <FatalErrnoError@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"dup2()\00"
define i32 @Edup2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @dup2(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, -1
%11 = zext i1 %10 to i32
%12 = call i32 @FatalErrnoError(i32 %11, i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
@.str = [7 x i8] c"dup2()\00"
define i32 @Edup2(i32 %0, i32 %1) {
%3 = tail call i32 @dup2(i32 %0, i32 %1)
%4 = icmp eq i32 %3, -1
%5 = zext i1 %4 to i32
%6 = tail call i32 @FatalErrnoError(i32 %5, i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint8_t u64_b4(uint64_t value) {
  return (uint8_t)((value & 0x000000FF00000000) >> 32);
}


x86 assembly (clang, -O0):
<u64_b4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xff00000000,%rcx
and    %rcx,%rax
sar    $0x20,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<u64_b4>:
sar    $0x1f,%edi
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @u64_b4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = and i64 %4, 1095216660480
%6 = ashr i64 %5, 32
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @u64_b4(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i32 255, i32 0
ret i32 %3
}
int ade7753_initialize_ring(struct iio_ring_buffer *ring) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iio_ring_buffer = type opaque
define i32 @ade7753_initialize_ring(%struct.iio_ring_buffer* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char *status_entry(char *);
char *cpus_allowed_list(void) { return status_entry("Cpus_allowed_list"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Cpus_allowed_list\00"
define i8* @cpus_allowed_list() {
%1 = call i8* @status_entry(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [18 x i8] c"Cpus_allowed_list\00"
define i8* @cpus_allowed_list() {
%1 = tail call i8* @status_entry(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
int hash_table_purge_f(void *dp, void *ap) {
  int *npurgedp;
  npurgedp = (int *)ap;
  *npurgedp += 1;
  return ((1 << 1));
}


x86 assembly (clang, -O0):
<hash_table_purge_f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_table_purge_f>:
addl   $0x1,(%rsi)
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @hash_table_purge_f(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %8
ret i32 2
}

LLVM IR (-O2):
define i32 @hash_table_purge_f(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 1
store i32 %5, i32* %3
ret i32 2
}
/* Variables and functions */
int strcmp(char const *, char const *);
int str_cmp(const void *av, const void *bv) {
  return strcmp(*(const char **)av, *(const char **)bv);
}


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

x86 assembly (clang, -O2):
<str_cmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @str_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @str_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
int do_937() { return 937; }


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

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

LLVM IR (-O0):
define i32 @do_937() {
ret i32 937
}

LLVM IR (-O2):
define i32 @do_937() {
ret i32 937
}
void arg_ulong3(unsigned long x, unsigned long y, unsigned long z) {}


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

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

LLVM IR (-O0):
define void @arg_ulong3(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
ret void
}

LLVM IR (-O2):
define void @arg_ulong3(i64 %0, i64 %1, i64 %2) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t min(uint32_t a, uint32_t b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <min+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <min+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @min(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ value;
typedef int /*<<< orphan*/ int64_t;
typedef scalar_t__ caddr_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(scalar_t__, int /*<<< orphan*/ *, int);
void ptr_set_int64_t(void *arg1, int offset, int64_t value) {
  memcpy((caddr_t)arg1 + offset, &value, sizeof(value));
}


x86 assembly (clang, -O0):
<ptr_set_int64_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
add    %rax,%rdi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptr_set_int64_t>:
push   %rax
mov    %edx,0x4(%rsp)
movslq %esi,%rax
add    %rax,%rdi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @ptr_set_int64_t(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = add nsw i64 %8, %10
%12 = call i32 @memcpy(i64 %11, i32* %6, i32 4)
ret void
}

LLVM IR (-O2):
define void @ptr_set_int64_t(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
store i32 %2, i32* %4
%5 = ptrtoint i8* %0 to i64
%6 = sext i32 %1 to i64
%7 = add nsw i64 %6, %5
%8 = call i32 @memcpy(i64 %7, i32* %4, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128GeneralIOPinP__19__IO__toggle();
void LedsP__Led1__toggle(void) { HplAtm128GeneralIOPinP__19__IO__toggle(); }


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

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

LLVM IR (-O0):
define void @LedsP__Led1__toggle() {
%1 = call i32 (...) @HplAtm128GeneralIOPinP__19__IO__toggle()
ret void
}

LLVM IR (-O2):
define void @LedsP__Led1__toggle() {
%1 = tail call i32 (...) @HplAtm128GeneralIOPinP__19__IO__toggle()
ret void
}
void c_LEVEL7_IRQ(struct c_exception_frame *frame) {}


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

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

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

LLVM IR (-O2):
%struct.c_exception_frame = type opaque
define void @c_LEVEL7_IRQ(%struct.c_exception_frame* nocapture %0) {
ret void
}
void test___atomic_xor_fetch_2(int *mem) { __atomic_xor_fetch(mem, 1, 4); }


x86 assembly (clang, -O0):
<test___atomic_xor_fetch_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%esi
mov    %eax,%edx
xor    %esi,%edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x24(%rbp)
test   $0x1,%cl
mov    %eax,-0x14(%rbp)
jne    114b <test___atomic_xor_fetch_2+0x4b>
jmp    1122 <test___atomic_xor_fetch_2+0x22>
mov    -0x18(%rbp),%ecx
mov    -0x24(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test___atomic_xor_fetch_2>:
lock xorl $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test___atomic_xor_fetch_2(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
store i32 1, i32* %3
%6 = load i32, i32* %3
%7 = atomicrmw xor i32* %5, i32 %6 acq_rel
%8 = xor i32 %7, %6
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @test___atomic_xor_fetch_2(i32* nocapture %0) {
%2 = atomicrmw xor i32* %0, i32 1 acq_rel
ret void
}
/* Variables and functions */
int musbgm_wait(int, int);
int mus_bgm_wait(int no, int timeout) { return musbgm_wait(no, timeout); }


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

x86 assembly (clang, -O2):
<mus_bgm_wait>:
jmp    1030 <musbgm_wait@plt>

LLVM IR (-O0):
define i32 @mus_bgm_wait(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 i32 @musbgm_wait(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @mus_bgm_wait(i32 %0, i32 %1) {
%3 = tail call i32 @musbgm_wait(i32 %0, i32 %1)
ret i32 %3
}