xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _dbg_check_suspend();
int /*<<< orphan*/ port_suspend();
void chSysSuspend(void) {
  port_suspend();
  _dbg_check_suspend();
}


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

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

LLVM IR (-O0):
define void @chSysSuspend() {
%1 = call i32 (...) @port_suspend()
%2 = call i32 (...) @_dbg_check_suspend()
ret void
}

LLVM IR (-O2):
define void @chSysSuspend() {
%1 = tail call i32 (...) @port_suspend()
%2 = tail call i32 (...) @_dbg_check_suspend()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dequeue();
int /*<<< orphan*/ display();
int /*<<< orphan*/ enqueue(int);
int main() {
  dequeue();
  enqueue(15);
  enqueue(49);
  enqueue(54);
  enqueue(2);
  enqueue(97);
  display();
  dequeue();
  dequeue();
  display();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <dequeue@plt>
mov    $0xf,%edi
call   1050 <enqueue@plt>
mov    $0x31,%edi
call   1050 <enqueue@plt>
mov    $0x36,%edi
call   1050 <enqueue@plt>
mov    $0x2,%edi
call   1050 <enqueue@plt>
mov    $0x61,%edi
call   1050 <enqueue@plt>
mov    $0x0,%al
call   1030 <display@plt>
mov    $0x0,%al
call   1040 <dequeue@plt>
mov    $0x0,%al
call   1040 <dequeue@plt>
mov    $0x0,%al
call   1030 <display@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <dequeue@plt>
mov    $0xf,%edi
call   1050 <enqueue@plt>
mov    $0x31,%edi
call   1050 <enqueue@plt>
mov    $0x36,%edi
call   1050 <enqueue@plt>
mov    $0x2,%edi
call   1050 <enqueue@plt>
mov    $0x61,%edi
call   1050 <enqueue@plt>
xor    %eax,%eax
call   1030 <display@plt>
xor    %eax,%eax
call   1040 <dequeue@plt>
xor    %eax,%eax
call   1040 <dequeue@plt>
xor    %eax,%eax
call   1030 <display@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @dequeue()
%3 = call i32 @enqueue(i32 15)
%4 = call i32 @enqueue(i32 49)
%5 = call i32 @enqueue(i32 54)
%6 = call i32 @enqueue(i32 2)
%7 = call i32 @enqueue(i32 97)
%8 = call i32 (...) @display()
%9 = call i32 (...) @dequeue()
%10 = call i32 (...) @dequeue()
%11 = call i32 (...) @display()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @dequeue()
%2 = tail call i32 @enqueue(i32 15)
%3 = tail call i32 @enqueue(i32 49)
%4 = tail call i32 @enqueue(i32 54)
%5 = tail call i32 @enqueue(i32 2)
%6 = tail call i32 @enqueue(i32 97)
%7 = tail call i32 (...) @display()
%8 = tail call i32 (...) @dequeue()
%9 = tail call i32 (...) @dequeue()
%10 = tail call i32 (...) @display()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ update_STAT();
void cycle_video(void) { update_STAT(); }


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

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

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

LLVM IR (-O2):
define void @cycle_video() {
%1 = tail call i32 (...) @update_STAT()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int stbi_is_hdr_from_file(int /*<<< orphan*/ *);
extern int stbi_is_hdr(char const *filename) {
  FILE *f = fopen(filename, "rb");
  int result = 0;
  if (f) {
    result = stbi_is_hdr_from_file(f);
    fclose(f);
  }
  return result;
}


x86 assembly (clang, -O0):
<stbi_is_hdr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1177 <stbi_is_hdr+0x47>
mov    -0x10(%rbp),%rdi
call   1050 <stbi_is_hdr_from_file@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stbi_is_hdr>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     115d <stbi_is_hdr+0x2d>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <stbi_is_hdr_from_file@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %ebp,%eax
jmp    115f <stbi_is_hdr+0x2f>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define i32 @stbi_is_hdr(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @stbi_is_hdr_from_file(i32* %2)
%6 = tail call i32 @fclose(i32* %2)
br label %7
7: ; preds = %4, %1
%8 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ mrg_seed(unsigned int, unsigned int, unsigned int,
                            unsigned int, unsigned int, unsigned int);
void mrg_seed_array(unsigned int *a) {
  mrg_seed(a[0], a[1], a[2], a[3], a[4], a[5]);
}


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

x86 assembly (clang, -O2):
<mrg_seed_array>:
mov    (%rdi),%eax
mov    0x4(%rdi),%esi
mov    0x8(%rdi),%edx
mov    0xc(%rdi),%ecx
mov    0x10(%rdi),%r8d
mov    0x14(%rdi),%r9d
mov    %eax,%edi
jmp    1030 <mrg_seed@plt>

LLVM IR (-O0):
define void @mrg_seed_array(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 2
%11 = load i32, i32* %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 3
%14 = load i32, i32* %13
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 4
%17 = load i32, i32* %16
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i64 5
%20 = load i32, i32* %19
%21 = call i32 @mrg_seed(i32 %5, i32 %8, i32 %11, i32 %14, i32 %17, i32 %20)
ret void
}

LLVM IR (-O2):
define void @mrg_seed_array(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %0, i64 3
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %0, i64 4
%10 = load i32, i32* %9
%11 = getelementptr inbounds i32, i32* %0, i64 5
%12 = load i32, i32* %11
%13 = tail call i32 @mrg_seed(i32 %2, i32 %4, i32 %6, i32 %8, i32 %10, i32 %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  for (;;) {
    system("free");
    system("sleep 1s");
    system("clear");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <system@plt>
lea    0xecc(%rip),%rdi
call   1030 <system@plt>
lea    0xec9(%rip),%rdi
call   1030 <system@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xee4(%rip),%r14
lea    0xee2(%rip),%r15
lea    0xee4(%rip),%rbx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <system@plt>
mov    %r15,%rdi
call   1030 <system@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
jmp    1130 <main+0x20>

LLVM IR (-O0):
@.str = [5 x i8] c"free\00"
@.str.1 = [9 x i8] c"sleep 1s\00"
@.str.2 = [6 x i8] c"clear\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %6
6: ; preds = %6, %2
%7 = call i32 @system(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %6
}

LLVM IR (-O2):
@.str = [5 x i8] c"free\00"
@.str.1 = [9 x i8] c"sleep 1s\00"
@.str.2 = [6 x i8] c"clear\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @system(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %3
}
int fun1006() { return 1006; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x3ee,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x3ee,%eax
ret

LLVM IR (-O0):
define i32 @fun1006() {
ret i32 1006
}

LLVM IR (-O2):
define i32 @fun1006() {
ret i32 1006
}
unsigned int uint4_missing(unsigned const char *p) {
  int t;
  t = p[0];
  t = t << 8 | p[1];
  t = t << 8 | p[2];
  t = t << 8 | p[3];
  if (t == 0xffffffff)
    return 0;
  return t;
}


x86 assembly (clang, -O0):
<uint4_missing>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1161 <uint4_missing+0x61>
movl   $0x0,-0x4(%rbp)
jmp    1167 <uint4_missing+0x67>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint4_missing>:
mov    (%rdi),%ecx
bswap  %ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @uint4_missing(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %3, 16
%8 = shl nuw nsw i32 %6, 8
%9 = or i32 %8, %7
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = or i32 %9, %12
%14 = shl nuw i32 %13, 8
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %14, %17
%19 = icmp eq i32 %18, -1
%20 = select i1 %19, i32 0, i32 %18
ret i32 %20
}
unsigned char av_clip_uint8(int a) {
  if (a & (~255))
    return (-a) >> 31;
  else
    return a;
}


x86 assembly (clang, -O0):
<av_clip_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffffff00,%eax
cmp    $0x0,%eax
je     1128 <av_clip_uint8+0x28>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
sar    $0x1f,%eax
mov    %al,-0x1(%rbp)
jmp    112e <av_clip_uint8+0x2e>
mov    -0x8(%rbp),%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_clip_uint8>:
test   %edi,%edi
setg   %al
neg    %al
cmp    $0x100,%edi
movzbl %al,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @av_clip_uint8(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, -256
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 0, %8
%10 = ashr i32 %9, 31
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
br label %15
12: ; preds = %1
%13 = load i32, i32* %3
%14 = trunc i32 %13 to i8
store i8 %14, i8* %2
br label %15
15: ; preds = %12, %7
%16 = load i8, i8* %2
ret i8 %16
}

LLVM IR (-O2):
define zeroext i8 @av_clip_uint8(i32 %0) {
%2 = icmp ult i32 %0, 256
%3 = icmp sgt i32 %0, 0
%4 = sext i1 %3 to i32
%5 = select i1 %2, i32 %0, i32 %4
%6 = trunc i32 %5 to i8
ret i8 %6
}
int f(int a, float b, short int c, char d, int z) {
  ++a;
  ++b;
  ++c;
  return a + b + c + d + z;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %si,%dx
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %dx,-0xa(%rbp)
mov    %al,-0xb(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
movss  0xed4(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0xa(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xa(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movswl -0xa(%rbp),%eax
cvtsi2ss %eax,%xmm1
addss  %xmm1,%xmm0
movsbl -0xb(%rbp),%eax
cvtsi2ss %eax,%xmm1
addss  %xmm1,%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
add    $0x1,%edi
addss  0xef5(%rip),%xmm0
add    $0x1,%esi
cvtsi2ss %edi,%xmm1
movswl %si,%eax
cvtsi2ss %eax,%xmm2
addss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
addss  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtsi2ss %ecx,%xmm1
addss  %xmm2,%xmm0
addss  %xmm0,%xmm1
cvttss2si %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, float %1, i16 signext %2, i8 signext %3, i32 %4) {
%6 = alloca i32
%7 = alloca float
%8 = alloca i16
%9 = alloca i8
%10 = alloca i32
store i32 %0, i32* %6
store float %1, float* %7
store i16 %2, i16* %8
store i8 %3, i8* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = add nsw i32 %11, 1
store i32 %12, i32* %6
%13 = load float, float* %7
%14 = fadd float %13, 1.000000e+00
store float %14, float* %7
%15 = load i16, i16* %8
%16 = add i16 %15, 1
store i16 %16, i16* %8
%17 = load i32, i32* %6
%18 = sitofp i32 %17 to float
%19 = load float, float* %7
%20 = fadd float %18, %19
%21 = load i16, i16* %8
%22 = sext i16 %21 to i32
%23 = sitofp i32 %22 to float
%24 = fadd float %20, %23
%25 = load i8, i8* %9
%26 = sext i8 %25 to i32
%27 = sitofp i32 %26 to float
%28 = fadd float %24, %27
%29 = load i32, i32* %10
%30 = sitofp i32 %29 to float
%31 = fadd float %28, %30
%32 = fptosi float %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @f(i32 %0, float %1, i16 signext %2, i8 signext %3, i32 %4) {
%6 = add nsw i32 %0, 1
%7 = fadd float %1, 1.000000e+00
%8 = add i16 %2, 1
%9 = sitofp i32 %6 to float
%10 = fadd float %7, %9
%11 = sitofp i16 %8 to float
%12 = fadd float %10, %11
%13 = sitofp i8 %3 to float
%14 = fadd float %12, %13
%15 = sitofp i32 %4 to float
%16 = fadd float %14, %15
%17 = fptosi float %16 to i32
ret i32 %17
}
void interval2minimum_intervalDelim_maximum() {}


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

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

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

LLVM IR (-O2):
define void @interval2minimum_intervalDelim_maximum() {
ret void
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ memset(char *, int, size_t);
char *InitBuffer(size_t nSize) {
  char *cBuffer = malloc(nSize);
  memset(cBuffer, 0xFF, nSize);
  cBuffer[0] = 0;
  return cBuffer;
}


x86 assembly (clang, -O0):
<InitBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0xff,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitBuffer>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0xff,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
movb   $0x0,(%rbx)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @InitBuffer(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i64, i64* %2
%8 = call i32 @memset(i8* %6, i32 255, i64 %7)
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 0, i8* %10
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @InitBuffer(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = tail call i32 @memset(i8* %2, i32 255, i64 %0)
store i8 0, i8* %2
ret i8* %2
}
/* Variables and functions */
bool nrf51_errata_55(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf51_errata_55() {
ret i32 0
}
void elLoggerDestroy_f(void) {}


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

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

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

LLVM IR (-O2):
define void @elLoggerDestroy_f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output_header(int);
void output_magic(void) {
  output_header(0x6c);
  output_header(0x53);
  output_header(0x2e);
  output_header(0x46);
}


x86 assembly (clang, -O0):
<output_magic>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6c,%edi
call   1030 <output_header@plt>
mov    $0x53,%edi
call   1030 <output_header@plt>
mov    $0x2e,%edi
call   1030 <output_header@plt>
mov    $0x46,%edi
call   1030 <output_header@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_magic>:
push   %rax
mov    $0x6c,%edi
call   1030 <output_header@plt>
mov    $0x53,%edi
call   1030 <output_header@plt>
mov    $0x2e,%edi
call   1030 <output_header@plt>
mov    $0x46,%edi
pop    %rax
jmp    1030 <output_header@plt>

LLVM IR (-O0):
define void @output_magic() {
%1 = call i32 @output_header(i32 108)
%2 = call i32 @output_header(i32 83)
%3 = call i32 @output_header(i32 46)
%4 = call i32 @output_header(i32 70)
ret void
}

LLVM IR (-O2):
define void @output_magic() {
%1 = tail call i32 @output_header(i32 108)
%2 = tail call i32 @output_header(i32 83)
%3 = tail call i32 @output_header(i32 46)
%4 = tail call i32 @output_header(i32 70)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int sleep(int);
void *routine(void *arg) {
  int unslept = 9;
  while (unslept > 0)
    unslept = sleep(unslept);
  printf("hello thread\n");
}


x86 assembly (clang, -O0):
<routine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x9,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    114d <routine+0x2d>
mov    -0x14(%rbp),%edi
call   1040 <sleep@plt>
mov    %eax,-0x14(%rbp)
jmp    1133 <routine+0x13>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<routine>:
push   %rax
mov    $0x9,%eax
cs nopw 0x0(%rax,%rax,1)
mov    %eax,%edi
call   1040 <sleep@plt>
test   %eax,%eax
jg     1130 <routine+0x10>
lea    0xebe(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"hello thread\0A\00"
define i8* @routine(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 9, i32* %4
br label %5
5: ; preds = %8, %1
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %4
%10 = call i32 @sleep(i32 %9)
store i32 %10, i32* %4
br label %5
11: ; preds = %5
%12 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
@str = [13 x i8] c"hello thread\00"
define noalias i8* @routine(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 9, %1 ], [ %4, %2 ]
%4 = tail call i32 @sleep(i32 %3)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_stream_set_skt_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_stream@%p::set_skt (rtpp_stream_set_skt) is invoked "
          "after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_stream_set_skt_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_stream_set_skt_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [83 x i8] c"Method rtpp_stream@%p::set_skt (rtpp_stream_set_skt) is invoked after destruction\0A\00"
define void @rtpp_stream_set_skt_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [83 x i8] c"Method rtpp_stream@%p::set_skt (rtpp_stream_set_skt) is invoked after destruction\0A\00"
define void @rtpp_stream_set_skt_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void bar(void) { fprintf(stderr, "called bar()\n"); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"called bar()\0A\00"
define void @bar() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"called bar()\0A\00"
define void @bar() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
void freeresources(void) {}


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

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

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

LLVM IR (-O2):
define void @freeresources() {
ret void
}
int AND(int x, int y) {
  if (x == 1 && y == 1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AND>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    112a <AND+0x2a>
cmpl   $0x1,-0xc(%rbp)
jne    112a <AND+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <AND+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AND>:
xor    $0x1,%edi
xor    $0x1,%esi
xor    %eax,%eax
or     %edi,%esi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @AND(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1
%4 = icmp eq i32 %1, 1
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
unsigned int distance(int dx, int dy) {
  if (dx < 0)
    dx = -dx;
  if (dy < 0)
    dy = -dy;
  return (dx < dy ? dy : dx);
}


x86 assembly (clang, -O0):
<distance>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111c <distance+0x1c>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    112e <distance+0x2e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1145 <distance+0x45>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    114b <distance+0x4b>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<distance>:
mov    %edi,%ecx
neg    %ecx
cmovs  %edi,%ecx
mov    %esi,%eax
neg    %eax
cmovs  %esi,%eax
cmp    %eax,%ecx
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @distance(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 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = sub nsw i32 0, %8
store i32 %9, i32* %3
br label %10
10: ; preds = %7, %2
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %4
%15 = sub nsw i32 0, %14
store i32 %15, i32* %4
br label %16
16: ; preds = %13, %10
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = load i32, i32* %4
br label %24
22: ; preds = %16
%23 = load i32, i32* %3
br label %24
24: ; preds = %22, %20
%25 = phi i32 [ %21, %20 ], [ %23, %22 ]
ret i32 %25
}

LLVM IR (-O2):
define i32 @distance(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%4 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
%5 = icmp ult i32 %3, %4
%6 = select i1 %5, i32 %4, i32 %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ basename;
int /*<<< orphan*/ cdecl_func__basename(int /*<<< orphan*/);
void cdecl_expr__basename() { cdecl_func__basename(basename); }


x86 assembly (clang, -O0):
<cdecl_expr__basename>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <cdecl_func__basename@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdecl_expr__basename>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <cdecl_func__basename@plt>

LLVM IR (-O0):
@basename = global i32 0
define void @cdecl_expr__basename() {
%1 = load i32, i32* @basename
%2 = call i32 @cdecl_func__basename(i32 %1)
ret void
}

LLVM IR (-O2):
@basename = global i32 0
define void @cdecl_expr__basename() {
%1 = load i32, i32* @basename
%2 = tail call i32 @cdecl_func__basename(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ flashfsFlushSync();
int /*<<< orphan*/ flashfsSetTailAddress(int /*<<< orphan*/);
void flashfsSeekAbs(uint32_t offset) {
  flashfsFlushSync();
  flashfsSetTailAddress(offset);
}


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

x86 assembly (clang, -O2):
<flashfsSeekAbs>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <flashfsFlushSync@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <flashfsSetTailAddress@plt>

LLVM IR (-O0):
define void @flashfsSeekAbs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @flashfsFlushSync()
%4 = load i32, i32* %2
%5 = call i32 @flashfsSetTailAddress(i32 %4)
ret void
}

LLVM IR (-O2):
define void @flashfsSeekAbs(i32 %0) {
%2 = tail call i32 (...) @flashfsFlushSync()
%3 = tail call i32 @flashfsSetTailAddress(i32 %0)
ret void
}
void cprop_test13(int *data) {
  int j = data[1];
  int k = data[0];
  if (j == 5 && k == 10)
    j = j * 21 + 100 / k;
  data[2] = j;
}


x86 assembly (clang, -O0):
<cprop_test13>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x5,-0xc(%rbp)
jne    1149 <cprop_test13+0x49>
cmpl   $0xa,-0x10(%rbp)
jne    1149 <cprop_test13+0x49>
imul   $0x15,-0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x64,%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cprop_test13>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
mov    %ecx,%edx
xor    $0x5,%edx
xor    $0xa,%eax
or     %edx,%eax
mov    $0x73,%eax
cmovne %ecx,%eax
mov    %eax,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @cprop_test13(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = load i32, i32* %0
%5 = icmp eq i32 %3, 5
%6 = icmp eq i32 %4, 10
%7 = select i1 %5, i1 %6, i1 false
%8 = select i1 %7, i32 115, i32 %3
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
ret void
}
void steal_accessry(struct battle_char *origin, struct battle_char *target) {}


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

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

LLVM IR (-O0):
%struct.battle_char = type opaque
define void @steal_accessry(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
ret void
}

LLVM IR (-O2):
%struct.battle_char = type opaque
define void @steal_accessry(%struct.battle_char* nocapture %0, %struct.battle_char* nocapture %1) {
ret void
}
void disk_level_insert(struct lsm_tree *tree, struct kv_pair *kv) {
  (void)tree;
  (void)kv;
}


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

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

LLVM IR (-O0):
%struct.lsm_tree = type opaque
%struct.kv_pair = type opaque
define void @disk_level_insert(%struct.lsm_tree* %0, %struct.kv_pair* %1) {
%3 = alloca %struct.lsm_tree*
%4 = alloca %struct.kv_pair*
store %struct.lsm_tree* %0, %struct.lsm_tree** %3
store %struct.kv_pair* %1, %struct.kv_pair** %4
%5 = load %struct.lsm_tree*, %struct.lsm_tree** %3
%6 = load %struct.kv_pair*, %struct.kv_pair** %4
ret void
}

LLVM IR (-O2):
%struct.lsm_tree = type opaque
%struct.kv_pair = type opaque
define void @disk_level_insert(%struct.lsm_tree* nocapture %0, %struct.kv_pair* nocapture %1) {
ret void
}
void holdLaunch() { holdLaunch(); }


x86 assembly (clang, -O0):
<holdLaunch>:
push   %rbp
mov    %rsp,%rbp
call   1030 <holdLaunch@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<holdLaunch>:
jmp    1100 <holdLaunch>

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

LLVM IR (-O2):
define void @holdLaunch() {
br label %1
1: ; preds = %1, %0
br label %1
}
void MemClr_lc898122_sharp(unsigned char *NcTgtPtr, unsigned short UsClrSiz) {
  unsigned short UsClrIdx;
  for (UsClrIdx = 0; UsClrIdx < UsClrSiz; UsClrIdx++) {
    *NcTgtPtr = 0;
    NcTgtPtr++;
  }
}


x86 assembly (clang, -O0):
<MemClr_lc898122_sharp>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movw   $0x0,-0xc(%rbp)
movzwl -0xc(%rbp),%eax
movzwl -0xa(%rbp),%ecx
cmp    %ecx,%eax
jge    1149 <MemClr_lc898122_sharp+0x49>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xc(%rbp)
jmp    1115 <MemClr_lc898122_sharp+0x15>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MemClr_lc898122_sharp>:
test   %esi,%esi
je     1123 <MemClr_lc898122_sharp+0x13>
push   %rax
movzwl %si,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @MemClr_lc898122_sharp(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = icmp eq i16 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i16 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t smpte_hbrmt_get_frame_count(const uint8_t *p_hbrmt) {
  return p_hbrmt[1];
}


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

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

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

LLVM IR (-O2):
define i32 @smpte_hbrmt_get_frame_count(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fread(char *, int, int, int /*<<< orphan*/ *);
int readword(FILE *inf, unsigned int *value) {
  return ((fread((char *)value, sizeof(unsigned int), 1, inf) == 1) ? 0 : -1);
}


x86 assembly (clang, -O0):
<readword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %eax,%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x1,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readword>:
push   %rax
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @readword(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 = bitcast i32* %5 to i8*
%7 = load i32*, i32** %3
%8 = call i32 @fread(i8* %6, i32 4, i32 1, i32* %7)
%9 = icmp eq i32 %8, 1
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 0, i32 -1
ret i32 %11
}

LLVM IR (-O2):
define i32 @readword(i32* nocapture %0, i32* nocapture %1) {
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 @fread(i8* %3, i32 4, i32 1, i32* %0)
%5 = icmp ne i32 %4, 1
%6 = sext i1 %5 to i32
ret i32 %6
}
int do_153() { return 153; }


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

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

LLVM IR (-O0):
define i32 @do_153() {
ret i32 153
}

LLVM IR (-O2):
define i32 @do_153() {
ret i32 153
}
void finalize_cache_mp_read_session_response(
    struct cache_mp_read_session_response *mp_rs_response) {
  (void)0;
  (void)0;
}


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

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

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

LLVM IR (-O2):
%struct.cache_mp_read_session_response = type opaque
define void @finalize_cache_mp_read_session_response(%struct.cache_mp_read_session_response* nocapture %0) {
ret void
}
void rmnl(char *s) {
  for (; *s; s++)
    if (*s == '\n')
      *s = '\0';
}


x86 assembly (clang, -O0):
<rmnl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1142 <rmnl+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    112c <rmnl+0x2c>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    1131 <rmnl+0x31>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <rmnl+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rmnl>:
jmp    1117 <rmnl+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x0,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0xa,%al
je     1110 <rmnl+0x10>
test   %al,%al
jne    1113 <rmnl+0x13>
ret

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

LLVM IR (-O2):
define void @rmnl(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 10, label %5
]
5: ; preds = %2
store i8 0, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void indent(int ind) {
  while (ind--)
    putc('\t', stderr);
}


x86 assembly (clang, -O0):
<indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1147 <indent+0x37>
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
mov    $0x9,%edi
call   1030 <putc@plt>
jmp    111b <indent+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indent>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
je     1142 <indent+0x32>
mov    %edi,%ebx
mov    0x2ebf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14),%esi
mov    $0x9,%edi
call   1030 <putc@plt>
add    $0xffffffff,%ebx
jne    1130 <indent+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
define void @indent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
%6 = icmp ne i32 %4, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i32, i32* @stderr
%9 = call i32 @putc(i8 signext 9, i32 %8)
br label %3
10: ; preds = %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @indent(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = load i32, i32* @stderr
%7 = tail call i32 @putc(i8 signext 9, i32 %6)
%8 = icmp eq i32 %5, 0
br i1 %8, label %9, label %3
9: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ swap(char *, char *);
void reverseAWord(char *start, char *end) {
  while (start < end) {
    swap(start, end);
    start++;
    end--;
  }
}


x86 assembly (clang, -O0):
<reverseAWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1158 <reverseAWord+0x48>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <swap@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <reverseAWord+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseAWord>:
push   %r14
push   %rbx
push   %rax
cmp    %rsi,%rdi
jae    1138 <reverseAWord+0x28>
mov    %rsi,%r14
mov    %rdi,%rbx
nop
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <swap@plt>
add    $0x1,%rbx
add    $0xffffffffffffffff,%r14
cmp    %r14,%rbx
jb     1120 <reverseAWord+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @reverseAWord(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %9, %2
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = icmp ult i8* %6, %7
br i1 %8, label %9, label %17
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i32 @swap(i8* %10, i8* %11)
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %3
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i32 -1
store i8* %16, i8** %4
br label %5
17: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @reverseAWord(i8* %0, i8* %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %4, label %11
4: ; preds = %2, %4
%5 = phi i8* [ %9, %4 ], [ %1, %2 ]
%6 = phi i8* [ %8, %4 ], [ %0, %2 ]
%7 = tail call i32 @swap(i8* %6, i8* %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = getelementptr inbounds i8, i8* %5, i64 -1
%10 = icmp ult i8* %8, %9
br i1 %10, label %4, label %11
11: ; preds = %4, %2
ret void
}
void XkbSetNames() {}


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

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

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

LLVM IR (-O2):
define void @XkbSetNames() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ sys_exit(int);
int sys_write(int /*<<< orphan*/, int /*<<< orphan*/ *, int);
void output(uint64_t i) {
  if (sys_write(STDOUT_FILENO, &i, sizeof i) != sizeof i)
    sys_exit(2);
}


x86 assembly (clang, -O0):
<output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1040 <sys_write@plt>
cltq
cmp    $0x4,%rax
je     1158 <output+0x38>
mov    $0x2,%edi
call   1030 <sys_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output>:
push   %rax
mov    %edi,0x4(%rsp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1040 <sys_write@plt>
cmp    $0x4,%eax
je     114c <output+0x2c>
mov    $0x2,%edi
call   1030 <sys_exit@plt>
pop    %rax
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define void @output(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @sys_write(i32 %3, i32* %2, i32 4)
%5 = sext i32 %4 to i64
%6 = icmp ne i64 %5, 4
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @sys_exit(i32 2)
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define void @output(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @sys_write(i32 %3, i32* %2, i32 4)
%5 = icmp eq i32 %4, 4
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @sys_exit(i32 2)
br label %8
8: ; preds = %6, %1
ret void
}
void RTStrToLatin1ExTag(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrToLatin1ExTag() {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void smpte_hbrmt_set_video_source_format(uint8_t *p_hbrmt) {
  p_hbrmt[0] |= 0x8;
}


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

x86 assembly (clang, -O2):
<smpte_hbrmt_set_video_source_format>:
orb    $0x8,(%rdi)
ret

LLVM IR (-O0):
define void @smpte_hbrmt_set_video_source_format(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = or i32 %5, 8
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define void @smpte_hbrmt_set_video_source_format(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = or i32 %2, 8
store i32 %3, i32* %0
ret void
}