xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ CheckedCommand(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                  char *, int, int, int);
void SetPosition(FILE *p_cmd, FILE *p_res, int i_overlay, int i_x, int i_y) {
  CheckedCommand(p_cmd, p_res, "SetPosition %d %d %d\n", i_overlay, i_x, i_y);
}


x86 assembly (clang, -O0):
<SetPosition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
lea    0xebc(%rip),%rdx
call   1030 <CheckedCommand@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetPosition>:
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
lea    0xee1(%rip),%rdx
jmp    1030 <CheckedCommand@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"SetPosition %d %d %d\0A\00"
define void @SetPosition(i32* %0, i32* %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @CheckedCommand(i32* %11, i32* %12, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"SetPosition %d %d %d\0A\00"
define void @SetPosition(i32* %0, i32* %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @CheckedCommand(i32* %0, i32* %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ test_buf();
int /*<<< orphan*/ test_opt();
int /*<<< orphan*/ test_rowtop();
int /*<<< orphan*/ test_transpose();
int /*<<< orphan*/ test_util();
int main(void) {
  fprintf(stderr, "start test\n");
  test_buf();
  test_rowtop();
  test_util();
  test_opt();
  test_transpose();
  fprintf(stderr, "end test\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
lea    0xe81(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1080 <test_buf@plt>
mov    $0x0,%al
call   1030 <test_rowtop@plt>
mov    $0x0,%al
call   1050 <test_util@plt>
mov    $0x0,%al
call   1070 <test_opt@plt>
mov    $0x0,%al
call   1060 <test_transpose@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
lea    0xe55(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2e78(%rip),%rbx
mov    (%rbx),%edi
lea    0xe8f(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1080 <test_buf@plt>
xor    %eax,%eax
call   1030 <test_rowtop@plt>
xor    %eax,%eax
call   1050 <test_util@plt>
xor    %eax,%eax
call   1070 <test_opt@plt>
xor    %eax,%eax
call   1060 <test_transpose@plt>
mov    (%rbx),%edi
lea    0xe6a(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"start test\0A\00"
@.str.1 = [10 x i8] c"end test\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @test_buf()
%5 = call i32 (...) @test_rowtop()
%6 = call i32 (...) @test_util()
%7 = call i32 (...) @test_opt()
%8 = call i32 (...) @test_transpose()
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"start test\0A\00"
@.str.1 = [10 x i8] c"end test\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @test_buf()
%4 = tail call i32 (...) @test_rowtop()
%5 = tail call i32 (...) @test_util()
%6 = tail call i32 (...) @test_opt()
%7 = tail call i32 (...) @test_transpose()
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
float linear_interp(low_value, high_value, position)
float low_value, high_value, position;
{
  float result;
  result = ((low_value * (1.0 - position)) + (high_value * position));
  return (result);
}


x86 assembly (clang, -O0):
<linear_interp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm2,-0x18(%rbp)
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm2,%xmm2
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm2,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xeba(%rip),%xmm2
subsd  %xmm1,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<linear_interp>:
cvtsd2ss %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm2,%xmm2
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm2,%xmm3
movsd  0xee4(%rip),%xmm4
subsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
mulss  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
addsd  %xmm4,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @linear_interp(double %0, double %1, double %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = fptrunc double %0 to float
%9 = fptrunc double %1 to float
%10 = fptrunc double %2 to float
store float %8, float* %4
store float %9, float* %5
store float %10, float* %6
%11 = load float, float* %4
%12 = fpext float %11 to double
%13 = load float, float* %6
%14 = fpext float %13 to double
%15 = fsub double 1.000000e+00, %14
%16 = load float, float* %5
%17 = load float, float* %6
%18 = fmul float %16, %17
%19 = fpext float %18 to double
%20 = call double @llvm.fmuladd.f64(double %12, double %15, double %19)
%21 = fptrunc double %20 to float
store float %21, float* %7
%22 = load float, float* %7
ret float %22
}

LLVM IR (-O2):
define float @linear_interp(double %0, double %1, double %2) {
%4 = fptrunc double %0 to float
%5 = fptrunc double %1 to float
%6 = fptrunc double %2 to float
%7 = fpext float %4 to double
%8 = fpext float %6 to double
%9 = fsub double 1.000000e+00, %8
%10 = fmul float %5, %6
%11 = fpext float %10 to double
%12 = tail call double @llvm.fmuladd.f64(double %7, double %9, double %11)
%13 = fptrunc double %12 to float
ret float %13
}
int CopyIntegerVectorxToy(x_p, y_p, nz_p)
int *x_p, *y_p;
int *nz_p;
{
  register int i;
  for (i = 0; i < *nz_p; i++)
    *y_p++ = *x_p++;
  return 0;
}


x86 assembly (clang, -O0):
<CopyIntegerVectorxToy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    1156 <CopyIntegerVectorxToy+0x56>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <CopyIntegerVectorxToy+0x17>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopyIntegerVectorxToy>:
cmpl   $0x0,(%rdx)
jle    111e <CopyIntegerVectorxToy+0x1e>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
mov    (%rdi,%rax,4),%ecx
mov    %ecx,(%rsi,%rax,4)
add    $0x1,%rax
cmp    (%rdx),%eax
jl     1110 <CopyIntegerVectorxToy+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @CopyIntegerVectorxToy(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
store i32 0, i32* %7
br label %8
8: ; preds = %19, %3
%9 = load i32, i32* %7
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %22
13: ; preds = %8
%14 = load i32*, i32** %4
%15 = getelementptr inbounds i32, i32* %14, i32 1
store i32* %15, i32** %4
%16 = load i32, i32* %14
%17 = load i32*, i32** %5
%18 = getelementptr inbounds i32, i32* %17, i32 1
store i32* %18, i32** %5
store i32 %16, i32* %17
br label %19
19: ; preds = %13
%20 = load i32, i32* %7
%21 = add nsw i32 %20, 1
store i32 %21, i32* %7
br label %8
22: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
define i32 @CopyIntegerVectorxToy(i32* nocapture %0, i32* nocapture writeonly %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %3, %6
%7 = phi i32 [ %13, %6 ], [ 0, %3 ]
%8 = phi i32* [ %10, %6 ], [ %0, %3 ]
%9 = phi i32* [ %12, %6 ], [ %1, %3 ]
%10 = getelementptr inbounds i32, i32* %8, i64 1
%11 = load i32, i32* %8
%12 = getelementptr inbounds i32, i32* %9, i64 1
store i32 %11, i32* %9
%13 = add nuw nsw i32 %7, 1
%14 = load i32, i32* %2
%15 = icmp slt i32 %13, %14
br i1 %15, label %6, label %16
16: ; preds = %6, %3
ret i32 0
}
void fnMyStrCpy(char *dest, char *src) {
  int i;
  for (i = 0; *(src + i) != '\0'; i++) {
    *(dest + i) = *(src + i);
  }
  *(dest + i) = '\0';
}


x86 assembly (clang, -O0):
<fnMyStrCpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114c <fnMyStrCpy+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <fnMyStrCpy+0x13>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnMyStrCpy>:
mov    (%rsi),%al
test   %al,%al
je     1127 <fnMyStrCpy+0x27>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %al,(%rdi,%rcx,1)
movzbl 0x1(%rsi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1110 <fnMyStrCpy+0x10>
mov    %ecx,%eax
movb   $0x0,(%rdi,%rax,1)
ret
xor    %eax,%eax
movb   $0x0,(%rdi,%rax,1)
ret

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

LLVM IR (-O2):
define void @fnMyStrCpy(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = and i64 %9, 4294967295
br label %15
15: ; preds = %13, %2
%16 = phi i64 [ 0, %2 ], [ %14, %13 ]
%17 = getelementptr inbounds i8, i8* %0, i64 %16
store i8 0, i8* %17
ret void
}
int ri_util_is_little_endian() {
  int x = 1;
  if (*(char *)x) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<ri_util_is_little_endian>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
movslq -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1124 <ri_util_is_little_endian+0x24>
movl   $0x1,-0x4(%rbp)
jmp    112b <ri_util_is_little_endian+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ri_util_is_little_endian>:
xor    %eax,%eax
cmpb   $0x0,0x1
setne  %al
ret

LLVM IR (-O0):
define i32 @ri_util_is_little_endian() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 1, i32* %1
br label %10
9: ; preds = %0
store i32 0, i32* %1
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @ri_util_is_little_endian() {
%1 = load i8, i8* inttoptr (i64 1 to i8*)
%2 = icmp ne i8 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void gtk_tool_button_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tool_button_new() {
ret void
}
/* Variables and functions */
int atoi(char *);
int read(int, char *, int);
int read_int(int fd) {
  char buf[32];
  int r = read(fd, buf, 32);
  return atoi(buf);
}


x86 assembly (clang, -O0):
<read_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x20,%edx
call   1030 <read@plt>
mov    %eax,-0x34(%rbp)
lea    -0x30(%rbp),%rdi
call   1040 <atoi@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_int>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    $0x20,%edx
call   1030 <read@plt>
mov    %rbx,%rdi
call   1040 <atoi@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @read_int(i32 %0) {
%2 = alloca i32
%3 = alloca [32 x i8]
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%7 = call i32 @read(i32 %5, i8* %6, i32 32)
store i32 %7, i32* %4
%8 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%9 = call i32 @atoi(i8* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @read_int(i32 %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = call i32 @read(i32 %0, i8* %3, i32 32)
%5 = call i32 @atoi(i8* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs("Usage: "
        "true"
        "\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Usage: true\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [13 x i8] c"Usage: true\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t checksumm_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @checksumm_init() {
ret i32 0
}
char *opt_data(char *packet) { return packet + 8; }


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

x86 assembly (clang, -O2):
<opt_data>:
lea    0x8(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @opt_data(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 8
ret i8* %4
}

LLVM IR (-O2):
define i8* @opt_data(i8* readnone %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 8
ret i8* %2
}
int xmlUCSIsKangxiRadicals(int code) {
  return (((code >= 0x2F00) && (code <= 0x2FDF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsKangxiRadicals>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x2f00,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsKangxiRadicals+0x26>
cmpl   $0x2fdf,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsKangxiRadicals>:
add    $0xffffd100,%edi
xor    %eax,%eax
cmp    $0xe0,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsKangxiRadicals(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 12032
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 12255
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsKangxiRadicals(i32 %0) {
%2 = add i32 %0, -12032
%3 = icmp ult i32 %2, 224
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint32_t ROTR(uint32_t value, unsigned int places) {
  assert(places < 32);
  return (value >> places) | (value << (32 - places));
}


x86 assembly (clang, -O0):
<ROTR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROTR>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x20,%esi
setb   %dil
call   1030 <assert@plt>
mov    %ebx,%ecx
ror    %cl,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ROTR(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ult i32 %5, 32
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = lshr i32 %9, %10
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = sub i32 32, %13
%15 = shl i32 %12, %14
%16 = or i32 %11, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @ROTR(i32 %0, i32 %1) {
%3 = icmp ult i32 %1, 32
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = lshr i32 %0, %1
%7 = sub i32 32, %1
%8 = shl i32 %0, %7
%9 = or i32 %8, %6
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
void size_put(size_t number, FILE *stream) {
  if (number > (size_t)9) {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
    size_put(number / (size_t)10, stream);
#pragma GCC diagnostic pop
  }
  fputc('0' + (char)(number % (size_t)10), stream);
}


x86 assembly (clang, -O0):
<size_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x9,-0x8(%rbp)
jbe    1155 <size_put+0x35>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <size_put@plt>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %dl,%al
movsbl %al,%eax
add    $0x30,%eax
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1040 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_put>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
movabs $0xcccccccccccccccd,%r15
cc cc cc
cmp    $0xa,%rdi
jb     1150 <size_put+0x30>
mov    %rbx,%rax
mul    %r15
mov    %rdx,%rdi
shr    $0x3,%rdi
mov    %r14,%rsi
call   1030 <size_put@plt>
mov    %rbx,%rax
mul    %r15
shr    $0x2,%edx
and    $0xfffffffe,%edx
lea    (%rdx,%rdx,4),%eax
sub    %eax,%ebx
or     $0x30,%bl
movzbl %bl,%edi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <fputc@plt>

LLVM IR (-O0):
define void @size_put(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
store i64 %0, i64* %3
store i32* %1, i32** %4
%5 = load i64, i64* %3
%6 = icmp ugt i64 %5, 9
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i64, i64* %3
%9 = udiv i64 %8, 10
%10 = load i32*, i32** %4
br label %11
11: ; preds = %7, %2
%12 = load i64, i64* %3
%13 = urem i64 %12, 10
%14 = trunc i64 %13 to i8
%15 = sext i8 %14 to i32
%16 = add nsw i32 48, %15
%17 = trunc i32 %16 to i8
%18 = load i32*, i32** %4
%19 = call i32 @fputc(i8 signext %17, i32* %18)
ret void
}

LLVM IR (-O2):
define void @size_put(i64 %0, i32* nocapture %1) {
%3 = icmp ugt i64 %0, 9
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = udiv i64 %0, 10
tail call void @size_put(i64 %5, i32* %1)
br label %6
6: ; preds = %4, %2
%7 = urem i64 %0, 10
%8 = trunc i64 %7 to i8
%9 = or i8 %8, 48
%10 = tail call i32 @fputc(i8 signext %9, i32* %1)
ret void
}
int func(void) {
  int n = 3;
  int m = 5;
  n ^ m;
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
void RTVfsChainSpecFree(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsChainSpecFree() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ japi_setechochar(int, char);
void j_setechochar(int arg0, char arg1) { japi_setechochar(arg0, arg1); }


x86 assembly (clang, -O0):
<j_setechochar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
movsbl -0x5(%rbp),%esi
call   1030 <japi_setechochar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j_setechochar>:
jmp    1030 <japi_setechochar@plt>

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

LLVM IR (-O2):
define void @j_setechochar(i32 %0, i8 signext %1) {
%3 = tail call i32 @japi_setechochar(i32 %0, i8 signext %1)
ret void
}
/* Variables and functions */
int rand();
int internal_rand_i(int value) { return rand(); }


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

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

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

LLVM IR (-O2):
define i32 @internal_rand_i(i32 %0) {
%2 = tail call i32 (...) @rand()
ret i32 %2
}
int compare_add(int x, int y) {
  int z;
  z = x + y;
  if (z < 0)
    return z;
  else
    return z + 2;
}


x86 assembly (clang, -O0):
<compare_add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    1128 <compare_add+0x28>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1131 <compare_add+0x31>
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_add>:
lea    (%rsi,%rdi,1),%eax
add    $0x2,%eax
mov    %esi,%ecx
add    %edi,%ecx
cmovs  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = icmp slt i32 %3, 0
%5 = add nsw i32 %3, 2
%6 = select i1 %4, i32 %3, i32 %5
ret i32 %6
}
extern void extern_extern_undeclared2(void) {}


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

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

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

LLVM IR (-O2):
define void @extern_extern_undeclared2() {
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void WatchdogIntTypeSet(uint32_t ui32Base, uint32_t ui32Type) {
  ;

  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000008))) =
      ((*((volatile unsigned long *)(ui32Base + 0x00000008))) & ~0x00000004) |
      ui32Type;
}


x86 assembly (clang, -O0):
<WatchdogIntTypeSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
and    $0xfffffffffffffffb,%rcx
mov    -0x10(%rbp),%rax
or     %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogIntTypeSet>:
mov    %rdi,-0x10(%rsp)
mov    %rsi,-0x8(%rsp)
mov    -0x10(%rsp),%rax
mov    0x8(%rax),%rax
and    $0xfffffffffffffffb,%rax
or     -0x8(%rsp),%rax
mov    -0x10(%rsp),%rcx
mov    %rax,0x8(%rcx)
ret

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

LLVM IR (-O2):
define void @WatchdogIntTypeSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %3
%6 = add i64 %5, 8
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = and i64 %8, -5
%10 = load volatile i64, i64* %4
%11 = or i64 %9, %10
%12 = load volatile i64, i64* %3
%13 = add i64 %12, 8
%14 = inttoptr i64 %13 to i64*
store volatile i64 %11, i64* %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void char_destroy(void *to_delete) { free(to_delete); }


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

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

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

LLVM IR (-O2):
define void @char_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int f2(int a, int b) {
  assert(a - b == 0);
  return 48;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x30,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rax
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
mov    %eax,%edi
call   1030 <assert@plt>
mov    $0x30,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f2(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 = sub nsw i32 %5, %6
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
ret i32 48
}

LLVM IR (-O2):
define i32 @f2(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
ret i32 48
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ perror(char *);
scalar_t__ waitpid(scalar_t__, int *, int /*<<< orphan*/);
int waiting_for_child(pid_t child) {
  int status;
  pid_t result = waitpid(child, &status, WNOHANG);
  if (result < 0)
    perror("child failed during wait");
  return result == 0;
}


x86 assembly (clang, -O0):
<waiting_for_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
lea    -0xc(%rbp),%rsi
call   1030 <waitpid@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jge    115d <waiting_for_child+0x3d>
lea    0xea8(%rip),%rdi
call   1040 <perror@plt>
cmpq   $0x0,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waiting_for_child>:
push   %rbx
sub    $0x10,%rsp
mov    0x2ebc(%rip),%rax
mov    (%rax),%edx
lea    0xc(%rsp),%rsi
call   1030 <waitpid@plt>
mov    %rax,%rbx
test   %rax,%rax
js     114e <waiting_for_child+0x2e>
xor    %eax,%eax
test   %rbx,%rbx
sete   %al
add    $0x10,%rsp
pop    %rbx
ret
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
jmp    1140 <waiting_for_child+0x20>

LLVM IR (-O0):
@WNOHANG = global i32 0
@.str = [25 x i8] c"child failed during wait\00"
define i32 @waiting_for_child(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = load i32, i32* @WNOHANG
%7 = call i64 @waitpid(i64 %5, i32* %3, i32 %6)
store i64 %7, i64* %4
%8 = load i64, i64* %4
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %1
%13 = load i64, i64* %4
%14 = icmp eq i64 %13, 0
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
@WNOHANG = global i32 0
@.str = [25 x i8] c"child failed during wait\00"
define i32 @waiting_for_child(i64 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @WNOHANG
%5 = call i64 @waitpid(i64 %0, i32* %2, i32 %4)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = icmp eq i64 %5, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int poll(int /*<<< orphan*/, int /*<<< orphan*/, unsigned int);
int wait_for_timeout(unsigned int ms) { return poll(0, 0, ms); }


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

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

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

LLVM IR (-O2):
define i32 @wait_for_timeout(i32 %0) {
%2 = tail call i32 @poll(i32 0, i32 0, i32 %0)
ret i32 %2
}
/* Type definitions */
struct pci_dev {
  int dummy;
};

/* Variables and functions */
int enable_flash_sis5x0(struct pci_dev *, char const *, int, int);
int enable_flash_sis540(struct pci_dev *dev, const char *name) {
  return enable_flash_sis5x0(dev, name, 0x80, 0x40);
}


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

x86 assembly (clang, -O2):
<enable_flash_sis540>:
mov    $0x80,%edx
mov    $0x40,%ecx
jmp    1030 <enable_flash_sis5x0@plt>

LLVM IR (-O0):
%struct.pci_dev = type { i32 }
define i32 @enable_flash_sis540(%struct.pci_dev* %0, i8* %1) {
%3 = alloca %struct.pci_dev*
%4 = alloca i8*
store %struct.pci_dev* %0, %struct.pci_dev** %3
store i8* %1, i8** %4
%5 = load %struct.pci_dev*, %struct.pci_dev** %3
%6 = load i8*, i8** %4
%7 = call i32 @enable_flash_sis5x0(%struct.pci_dev* %5, i8* %6, i32 128, i32 64)
ret i32 %7
}

LLVM IR (-O2):
%struct.pci_dev = type { i32 }
define i32 @enable_flash_sis540(%struct.pci_dev* %0, i8* %1) {
%3 = tail call i32 @enable_flash_sis5x0(%struct.pci_dev* %0, i8* %1, i32 128, i32 64)
ret i32 %3
}
/* Variables and functions */
int vect_mus_audio_open_input(int, int, int, int, int);
int mus_audio_open_input(int ur_dev, int srate, int chans, int format,
                         int requested_size) {
  return (
      vect_mus_audio_open_input(ur_dev, srate, chans, format, requested_size));
}


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

x86 assembly (clang, -O2):
<mus_audio_open_input>:
jmp    1030 <vect_mus_audio_open_input@plt>

LLVM IR (-O0):
define i32 @mus_audio_open_input(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @vect_mus_audio_open_input(i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @mus_audio_open_input(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @vect_mus_audio_open_input(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
ret i32 %6
}
/* Variables and functions */
double exp(double);
double intr_wrap_040(double p1) { return exp(p1); }


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

x86 assembly (clang, -O2):
<intr_wrap_040>:
jmp    1030 <exp@plt>

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

LLVM IR (-O2):
define double @intr_wrap_040(double %0) {
%2 = tail call double @exp(double %0)
ret double %2
}
void gtk_rc_parse_priority() {}


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

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

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

LLVM IR (-O2):
define void @gtk_rc_parse_priority() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void horizontal() {
  int i;
  for (i = 0; i < 80; i++) {
    putchar('-');
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<horizontal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x50,-0x4(%rbp)
jge    1141 <horizontal+0x31>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <horizontal+0xf>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<horizontal>:
push   %rbx
mov    $0x50,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <horizontal+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @horizontal() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 80
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 @putchar(i8 signext 45)
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
%11 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @horizontal() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @putchar(i8 signext 45)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 80
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
scalar_t__ errno;
int make_path(char const *, int, int, int, int, int);
int umask(int);
int os_MakeDirPath(char const *path, int mode) {
  int newmode, parent_mode, err;
  int old_mask = umask(0);
  newmode = 0777 & ~old_mask;
  parent_mode = newmode | 0300;
  errno = 0;
  err = make_path(path, newmode, parent_mode, -1, -1, 1);
  umask(old_mask);
  return -err;
}


x86 assembly (clang, -O0):
<os_MakeDirPath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %edi,%edi
call   1030 <umask@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
xor    $0xffffffff,%eax
and    $0x1ff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     $0xc0,%eax
mov    %eax,-0x14(%rbp)
mov    0x2e87(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    $0xffffffff,%r8d
mov    $0x1,%r9d
mov    %r8d,%ecx
call   1040 <make_path@plt>
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <umask@plt>
xor    %eax,%eax
sub    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_MakeDirPath>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <umask@plt>
mov    %eax,%ebp
mov    %eax,%esi
not    %esi
and    $0x1ff,%esi
mov    %esi,%edx
or     $0xc0,%edx
mov    0x2e98(%rip),%rax
movq   $0x0,(%rax)
mov    %rbx,%rdi
mov    $0xffffffff,%ecx
mov    $0xffffffff,%r8d
mov    $0x1,%r9d
call   1040 <make_path@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1030 <umask@plt>
neg    %ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i64 0
define i32 @os_MakeDirPath(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%9 = call i32 @umask(i32 0)
store i32 %9, i32* %8
%10 = load i32, i32* %8
%11 = xor i32 %10, -1
%12 = and i32 511, %11
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = or i32 %13, 192
store i32 %14, i32* %6
store i64 0, i64* @errno
%15 = load i8*, i8** %3
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = call i32 @make_path(i8* %15, i32 %16, i32 %17, i32 -1, i32 -1, i32 1)
store i32 %18, i32* %7
%19 = load i32, i32* %8
%20 = call i32 @umask(i32 %19)
%21 = load i32, i32* %7
%22 = sub nsw i32 0, %21
ret i32 %22
}

LLVM IR (-O2):
@errno = global i64 0
define i32 @os_MakeDirPath(i8* %0, i32 %1) {
%3 = tail call i32 @umask(i32 0)
%4 = and i32 %3, 511
%5 = xor i32 %4, 511
%6 = or i32 %5, 192
store i64 0, i64* @errno
%7 = tail call i32 @make_path(i8* %0, i32 %5, i32 %6, i32 -1, i32 -1, i32 1)
%8 = tail call i32 @umask(i32 %3)
%9 = sub nsw i32 0, %7
ret i32 %9
}
/* Type definitions */
struct snd_pcm_hw_params {
  int dummy;
};
struct pcm_params {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct snd_pcm_hw_params *);
void pcm_params_free(struct pcm_params *pcm_params) {
  struct snd_pcm_hw_params *params = (struct snd_pcm_hw_params *)pcm_params;
  if (params)
    free(params);
}


x86 assembly (clang, -O0):
<pcm_params_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1138 <pcm_params_free+0x28>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcm_params_free>:
test   %rdi,%rdi
je     111a <pcm_params_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.pcm_params = type { i32 }
%struct.snd_pcm_hw_params = type { i32 }
define void @pcm_params_free(%struct.pcm_params* %0) {
%2 = alloca %struct.pcm_params*
%3 = alloca %struct.snd_pcm_hw_params*
store %struct.pcm_params* %0, %struct.pcm_params** %2
%4 = load %struct.pcm_params*, %struct.pcm_params** %2
%5 = bitcast %struct.pcm_params* %4 to %struct.snd_pcm_hw_params*
store %struct.snd_pcm_hw_params* %5, %struct.snd_pcm_hw_params** %3
%6 = load %struct.snd_pcm_hw_params*, %struct.snd_pcm_hw_params** %3
%7 = icmp ne %struct.snd_pcm_hw_params* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load %struct.snd_pcm_hw_params*, %struct.snd_pcm_hw_params** %3
%10 = call i32 @free(%struct.snd_pcm_hw_params* %9)
br label %11
11: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
%struct.pcm_params = type { i32 }
%struct.snd_pcm_hw_params = type { i32 }
define void @pcm_params_free(%struct.pcm_params* %0) {
%2 = icmp eq %struct.pcm_params* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = bitcast %struct.pcm_params* %0 to %struct.snd_pcm_hw_params*
%5 = tail call i32 @free(%struct.snd_pcm_hw_params* %4)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int BufferTotalContent();
int /*<<< orphan*/ Fill();
int Available(void) {
  Fill();
  return BufferTotalContent();
}


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

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

LLVM IR (-O0):
define i32 @Available() {
%1 = call i32 (...) @Fill()
%2 = call i32 (...) @BufferTotalContent()
ret i32 %2
}

LLVM IR (-O2):
define i32 @Available() {
%1 = tail call i32 (...) @Fill()
%2 = tail call i32 (...) @BufferTotalContent()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ usb_lld_set_data_to_send(void const *, size_t);
extern void usb_lld_set_data_to_recv(void *p, size_t len) {
  usb_lld_set_data_to_send((const void *)p, len);
}


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

x86 assembly (clang, -O2):
<usb_lld_set_data_to_recv>:
jmp    1030 <usb_lld_set_data_to_send@plt>

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

LLVM IR (-O2):
define void @usb_lld_set_data_to_recv(i8* %0, i64 %1) {
%3 = tail call i32 @usb_lld_set_data_to_send(i8* %0, i64 %1)
ret void
}
int isEmptyTileData(unsigned int *tiles, int numTiles) {
  int i;
  unsigned int *tile;
  i = numTiles * 8;
  tile = tiles;
  while (i--) {
    if (*tile++)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isEmptyTileData>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
je     1159 <isEmptyTileData+0x59>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x20(%rbp)
cmpl   $0x0,(%rax)
je     1154 <isEmptyTileData+0x54>
movl   $0x0,-0x4(%rbp)
jmp    1160 <isEmptyTileData+0x60>
jmp    111c <isEmptyTileData+0x1c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEmptyTileData>:
shl    $0x3,%esi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %eax,%esi
je     1121 <isEmptyTileData+0x21>
cmpl   $0x0,(%rdi,%rax,4)
lea    0x1(%rax),%rax
je     1110 <isEmptyTileData+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @isEmptyTileData(i32* nocapture %0, i32 %1) {
%3 = shl nsw i32 %1, 3
br label %4
4: ; preds = %8, %2
%5 = phi i32 [ %3, %2 ], [ %9, %8 ]
%6 = phi i32* [ %0, %2 ], [ %10, %8 ]
%7 = icmp eq i32 %5, 0
br i1 %7, label %13, label %8
8: ; preds = %4
%9 = add nsw i32 %5, -1
%10 = getelementptr inbounds i32, i32* %6, i64 1
%11 = load i32, i32* %6
%12 = icmp eq i32 %11, 0
br i1 %12, label %4, label %13
13: ; preds = %4, %8
%14 = phi i32 [ 0, %8 ], [ 1, %4 ]
ret i32 %14
}
void malloc_unlock_nop() {}


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

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

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

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