xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x6b() {
  Assert_real((isspace(107) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              540, ("isspace should be 0 for k"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for k\00"
define void @t_isspace_0x6b() {
%1 = call i64 @isspace(i32 107)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 540, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for k\00"
define void @t_isspace_0x6b() {
%1 = tail call i64 @isspace(i32 107)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 540, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void INT_Excep_SCI3_TXI3(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCI3_TXI3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
void test_range_int_ge_lt(int i) {
  if (i >= 4)
    if (i < 5)
      __analyzer_eval(i == 4);
}


x86 assembly (clang, -O0):
<test_range_int_ge_lt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jl     1145 <test_range_int_ge_lt+0x35>
cmpl   $0x5,-0x4(%rbp)
jge    1140 <test_range_int_ge_lt+0x30>
cmpl   $0x4,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
jmp    1145 <test_range_int_ge_lt+0x35>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_range_int_ge_lt>:
cmp    $0x4,%edi
jne    111f <test_range_int_ge_lt+0xf>
mov    $0x1,%edi
jmp    1030 <__analyzer_eval@plt>
ret

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

LLVM IR (-O2):
define void @test_range_int_ge_lt(i32 %0) {
%2 = icmp eq i32 %0, 4
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @__analyzer_eval(i32 1)
br label %5
5: ; preds = %3, %1
ret void
}
int rho_ruby_is_string(unsigned long val) { return 0; }


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

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

LLVM IR (-O0):
define i32 @rho_ruby_is_string(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @rho_ruby_is_string(i64 %0) {
ret i32 0
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ die();
void *xcalloc(size_t count, size_t size) {
  void *ptr = calloc(count, size);
  if (!ptr && size != 0) {
    die();
  }
  return ptr;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115e <xcalloc+0x3e>
cmpq   $0x0,-0x10(%rbp)
je     115e <xcalloc+0x3e>
mov    $0x0,%al
call   1040 <die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <calloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1140 <xcalloc+0x20>
test   %r14,%r14
jne    1140 <xcalloc+0x20>
xor    %eax,%eax
call   1040 <die@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @xcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %16, label %11
11: ; preds = %2
%12 = load i64, i64* %4
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @die()
br label %16
16: ; preds = %14, %11, %2
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
%5 = icmp ne i64 %1, 0
%6 = and i1 %5, %4
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 (...) @die()
br label %9
9: ; preds = %7, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
main() {
  int a, b;
  while (1) {
    scanf("%d*d%d", &a, &b);
    printf("%d %d\n", a, b);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%r14
lea    0x4(%rsp),%r15
mov    %rsp,%r12
lea    0xec9(%rip),%rbx
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
mov    %rbx,%rdi
call   1030 <printf@plt>
jmp    1140 <main+0x20>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d*d%d\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
br label %5
5: ; preds = %5, %0
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
br label %5
}
int do_292() { return 292; }


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

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

LLVM IR (-O0):
define i32 @do_292() {
ret i32 292
}

LLVM IR (-O2):
define i32 @do_292() {
ret i32 292
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ traverse(struct TreeNode *, int *, int /*<<< orphan*/);
int sumOfLeftLeaves(struct TreeNode *root) {
  int *sum = (int *)malloc(sizeof(int));
  *sum = 0;
  traverse(root, sum, 0);
  return *sum;
}


x86 assembly (clang, -O0):
<sumOfLeftLeaves>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <traverse@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumOfLeftLeaves>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movl   $0x0,(%rax)
mov    %r14,%rdi
mov    %rax,%rsi
xor    %edx,%edx
call   1030 <traverse@plt>
mov    (%rbx),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32 @sumOfLeftLeaves(%struct.TreeNode* %0) {
%2 = alloca %struct.TreeNode*
%3 = alloca i32*
store %struct.TreeNode* %0, %struct.TreeNode** %2
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
store i32 0, i32* %6
%7 = load %struct.TreeNode*, %struct.TreeNode** %2
%8 = load i32*, i32** %3
%9 = call i32 @traverse(%struct.TreeNode* %7, i32* %8, i32 0)
%10 = load i32*, i32** %3
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32 @sumOfLeftLeaves(%struct.TreeNode* %0) {
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32 0, i32* %3
%4 = tail call i32 @traverse(%struct.TreeNode* %0, i32* %3, i32 0)
%5 = load i32, i32* %3
ret i32 %5
}
int fsync(int fd) { return 0; }


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

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

LLVM IR (-O0):
define i32 @fsync(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @fsync(i32 %0) {
ret i32 0
}
/* Type definitions */
struct in_addr {
  int s_addr;
};
typedef int in_addr_t;

/* Variables and functions */
int /*<<< orphan*/ __inet_aton(char const *, struct in_addr *);
in_addr_t inet_addr(const char *p) {
  struct in_addr a;
  if (!__inet_aton(p, &a))
    return -1;
  return a.s_addr;
}


x86 assembly (clang, -O0):
<inet_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <__inet_aton@plt>
cmp    $0x0,%eax
jne    113e <inet_addr+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1144 <inet_addr+0x34>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inet_addr>:
push   %rax
mov    %rsp,%rsi
call   1030 <__inet_aton@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
or     (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
define i32 @inet_addr(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.in_addr
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @__inet_aton(i8* %5, %struct.in_addr* %4)
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %1
store i32 -1, i32* %2
br label %12
9: ; preds = %1
%10 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %4, i32 0, i32 0
%11 = load i32, i32* %10
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %8
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
define i32 @inet_addr(i8* %0) {
%2 = alloca %struct.in_addr
%3 = bitcast %struct.in_addr* %2 to i8*
%4 = call i32 @__inet_aton(i8* %0, %struct.in_addr* %2)
%5 = icmp eq i32 %4, 0
%6 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int foo(int volatile, int volatile, int volatile, int volatile);
int main() {
  volatile int a = 10;
  volatile int b = 20;
  volatile int c = 30;
  volatile int d = 40;
  volatile int sum = 0;
  sum = foo(a, b, c, d);
  if (sum != 100)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
movl   $0x1e,-0x10(%rbp)
movl   $0x28,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1040 <foo@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    $0x64,%eax
je     1179 <main+0x59>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0xa,0x14(%rsp)
movl   $0x14,0x10(%rsp)
movl   $0x1e,0xc(%rsp)
movl   $0x28,0x8(%rsp)
movl   $0x0,0x4(%rsp)
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%ecx
call   1040 <foo@plt>
mov    %eax,0x4(%rsp)
mov    0x4(%rsp),%eax
cmp    $0x64,%eax
jne    1175 <main+0x55>
xor    %eax,%eax
add    $0x18,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store volatile i32 10, i32* %2
store volatile i32 20, i32* %3
store volatile i32 30, i32* %4
store volatile i32 40, i32* %5
store volatile i32 0, i32* %6
%7 = load volatile i32, i32* %2
%8 = load volatile i32, i32* %3
%9 = load volatile i32, i32* %4
%10 = load volatile i32, i32* %5
%11 = call i32 @foo(i32 %7, i32 %8, i32 %9, i32 %10)
store volatile i32 %11, i32* %6
%12 = load volatile i32, i32* %6
%13 = icmp ne i32 %12, 100
br i1 %13, label %14, label %16
14: ; preds = %0
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
store volatile i32 10, i32* %1
%7 = bitcast i32* %2 to i8*
store volatile i32 20, i32* %2
%8 = bitcast i32* %3 to i8*
store volatile i32 30, i32* %3
%9 = bitcast i32* %4 to i8*
store volatile i32 40, i32* %4
%10 = bitcast i32* %5 to i8*
store volatile i32 0, i32* %5
%11 = load volatile i32, i32* %1
%12 = load volatile i32, i32* %2
%13 = load volatile i32, i32* %3
%14 = load volatile i32, i32* %4
%15 = tail call i32 @foo(i32 %11, i32 %12, i32 %13, i32 %14)
store volatile i32 %15, i32* %5
%16 = load volatile i32, i32* %5
%17 = icmp eq i32 %16, 100
br i1 %17, label %20, label %18
18: ; preds = %0
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %0
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rot32r13(uint32_t x) { return (x >> 13) | (x << 19); }


x86 assembly (clang, -O0):
<rot32r13>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xd,%eax
mov    -0x4(%rbp),%ecx
shl    $0x13,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot32r13>:
mov    %edi,%eax
sar    $0xd,%eax
shl    $0x13,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot32r13(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 13
%5 = load i32, i32* %2
%6 = shl i32 %5, 19
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot32r13(i32 %0) {
%2 = ashr i32 %0, 13
%3 = shl i32 %0, 19
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
void swap(char *arr[], size_t i, size_t j) {
  char *tmp = arr[i];
  arr[i] = arr[j];
  arr[j] = tmp;
}


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

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi,%rsi,8),%rax
mov    (%rdi,%rdx,8),%rcx
mov    %rcx,(%rdi,%rsi,8)
mov    %rax,(%rdi,%rdx,8)
ret

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

LLVM IR (-O2):
define void @swap(i8** nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i8*, i8** %0, i64 %1
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8*, i8** %0, i64 %2
%7 = load i8*, i8** %6
store i8* %7, i8** %4
store i8* %5, i8** %6
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
size_t append_hex_out(uint8_t *dst) {
  dst[0] = 0xb0;
  dst[1] = 0x04;
  dst[2] = 0xb3;
  dst[3] = 0x01;
  dst[4] = 0xcd;
  dst[5] = 0x80;
  return 6;
}


x86 assembly (clang, -O0):
<append_hex_out>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xb0,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x4,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0xb3,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0xc(%rax)
mov    -0x8(%rbp),%rax
movl   $0xcd,0x10(%rax)
mov    -0x8(%rbp),%rax
movl   $0x80,0x14(%rax)
mov    $0x6,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<append_hex_out>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movabs $0x80000000cd,%rax
mov    %rax,0x10(%rdi)
mov    $0x6,%eax
ret

LLVM IR (-O0):
define i64 @append_hex_out(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 176, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 4, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 2
store i32 179, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 3
store i32 1, i32* %10
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 4
store i32 205, i32* %12
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 5
store i32 128, i32* %14
ret i64 6
}

LLVM IR (-O2):
define i64 @append_hex_out(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 176, i32 4, i32 179, i32 1>, <4 x i32>* %2
%3 = getelementptr inbounds i32, i32* %0, i64 4
store i32 205, i32* %3
%4 = getelementptr inbounds i32, i32* %0, i64 5
store i32 128, i32* %4
ret i64 6
}
/* Variables and functions */
int /*<<< orphan*/ assert_context_process();
unsigned long nondet_ulong();
unsigned long copy_from_user(void *to, void *from, unsigned long n) {
  unsigned long tmp;
  {
    assert_context_process();
    tmp = nondet_ulong();
    return (tmp);
  }
}


x86 assembly (clang, -O0):
<copy_from_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <assert_context_process@plt>
mov    $0x0,%al
call   1040 <nondet_ulong@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @copy_from_user(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
%4 = tail call i32 (...) @assert_context_process()
%5 = tail call i64 (...) @nondet_ulong()
ret i64 %5
}
void gtk_icon_set_copy() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_set_copy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ files_ls(int, char *, int);
void cmd_lsa(int idx, char *par) { files_ls(idx, par, 1); }


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

x86 assembly (clang, -O2):
<cmd_lsa>:
mov    $0x1,%edx
jmp    1030 <files_ls@plt>

LLVM IR (-O0):
define void @cmd_lsa(i32 %0, i8* %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 @files_ls(i32 %5, i8* %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @cmd_lsa(i32 %0, i8* %1) {
%3 = tail call i32 @files_ls(i32 %0, i8* %1, i32 1)
ret void
}
int main(void) {
  int i = 0;
  for (; i != 0;) {
    ++i;
  }
  for (; i != 10; ++i)
    ;
  for (; i != 3; ++i)
    i = 0;
  for (i = 0; i != 5; ++i)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112a <main+0x2a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
jmp    112f <main+0x2f>
cmpl   $0xa,-0x8(%rbp)
je     114c <main+0x4c>
jmp    113e <main+0x3e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <main+0x2f>
jmp    1151 <main+0x51>
cmpl   $0x3,-0x8(%rbp)
je     1170 <main+0x70>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1151 <main+0x51>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     1194 <main+0x94>
jmp    1186 <main+0x86>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1177 <main+0x77>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O2):
int precedence(char c) {
  switch (c) {
  case '+':
  case '-':
    return 1;
  case '*':
  case '/':
    return 2;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<precedence>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffd6,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5,%eax
ja     114c <precedence+0x4c>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1153 <precedence+0x53>
movl   $0x2,-0x4(%rbp)
jmp    1153 <precedence+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<precedence>:
add    $0xffffffd6,%edi
xor    %eax,%eax
cmp    $0x5,%edi
ja     1117 <precedence+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @precedence(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 43, label %6
i32 45, label %6
i32 42, label %7
i32 47, label %7
]
6: ; preds = %1, %1
store i32 1, i32* %2
br label %9
7: ; preds = %1, %1
store i32 2, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7, %6
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@switch.table.precedence = [6 x i32] [i32 2, i32 1, i32 0, i32 1, i32 0, i32 2]
define i32 @precedence(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -42
%4 = icmp ult i32 %3, 6
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.precedence, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ %8, %5 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char const *, int);
void ft_putstr(const char *s) {
  int i;
  i = 0;
  while (s[i] != '\0')
    i++;
  write(1, s, i);
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1146 <ft_putstr+0x36>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ft_putstr+0x13>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
mov    %rdi,%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x0,(%rsi,%rdx,1)
lea    0x1(%rdx),%rdx
jne    1120 <ft_putstr+0x10>
add    $0xffffffff,%edx
mov    $0x1,%edi
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @ft_putstr(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
%10 = tail call i32 @write(i32 1, i8* %0, i32 %9)
ret void
}
void foo051(int p) {}


x86 assembly (clang, -O0):
<foo051>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @foo051(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XSizeHints;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XSizeHints(void) {
  XSizeHints *_p = (XSizeHints *)malloc(sizeof(XSizeHints));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XSizeHints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XSizeHints+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XSizeHints>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XSizeHints+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XSizeHints() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XSizeHints() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
/* Type definitions */
typedef int uint64_t;
struct timespec {
  int tv_nsec;
  int tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
uint64_t opdi_get_time_ms(void) {
  struct timespec ts;
  uint64_t theTick = 0U;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  theTick = ts.tv_nsec / 1000000;
  theTick += ts.tv_sec * 1000;
  return theTick;
}


x86 assembly (clang, -O0):
<opdi_get_time_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x8(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
imul   $0x3e8,-0x4(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opdi_get_time_ms>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
movslq (%rsp),%rax
imul   $0x431bde83,%rax,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x32,%rcx
add    %eax,%ecx
imul   $0x3e8,0x4(%rsp),%eax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @opdi_get_time_ms() {
%1 = alloca %struct.timespec
%2 = alloca i32
store i32 0, i32* %2
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%6 = load i32, i32* %5
%7 = sdiv i32 %6, 1000000
store i32 %7, i32* %2
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 1000
%11 = load i32, i32* %2
%12 = add nsw i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @opdi_get_time_ms() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = sdiv i32 %6, 1000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 1000
%11 = add nsw i32 %10, %7
ret i32 %11
}
int create_connection() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @create_connection() {
ret i32 0
}
/* Variables and functions */
int mwsp_send_command(int, int, int);
int mwsp_mag_calibration(int fd) { return mwsp_send_command(fd, 206, 0x1); }


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

x86 assembly (clang, -O2):
<mwsp_mag_calibration>:
mov    $0xce,%esi
mov    $0x1,%edx
jmp    1030 <mwsp_send_command@plt>

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

LLVM IR (-O2):
define i32 @mwsp_mag_calibration(i32 %0) {
%2 = tail call i32 @mwsp_send_command(i32 %0, i32 206, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void h5(char *str) { printf("<H5>%s</H5>\n", str); }


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

x86 assembly (clang, -O2):
<h5>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"<H5>%s</H5>\0A\00"
define void @h5(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"<H5>%s</H5>\0A\00"
define void @h5(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
void _mm_mark(const void *p) {
  extern const bool mm_debug_enabled;
  extern void _mm_check_managed(const void *);
  extern void _mm_push(const void *);
  if (mm_debug_enabled)
    _mm_check_managed(p);
  _mm_push(p);
}


x86 assembly (clang, -O0):
<_mm_mark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
cmpl   $0x0,(%rax)
je     1145 <_mm_mark+0x25>
mov    -0x8(%rbp),%rdi
call   1040 <_mm_check_managed@plt>
mov    -0x8(%rbp),%rdi
call   1030 <_mm_push@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_mark>:
push   %rbx
mov    %rdi,%rbx
mov    0x2eb5(%rip),%rax
cmpl   $0x0,(%rax)
je     1138 <_mm_mark+0x18>
mov    %rbx,%rdi
call   1040 <_mm_check_managed@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <_mm_push@plt>

LLVM IR (-O0):
@mm_debug_enabled = external constant i32
define void @_mm_mark(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @mm_debug_enabled
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i8*, i8** %2
br label %7
7: ; preds = %5, %1
%8 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
@mm_debug_enabled = external constant i32
define void @_mm_mark(i8* %0) {
%2 = load i32, i32* @mm_debug_enabled
%3 = icmp eq i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %1
tail call void @_mm_check_managed(i8* %0)
br label %5
5: ; preds = %4, %1
tail call void @_mm_push(i8* %0)
ret void
}
void XmbResetIC() {}


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

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

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

LLVM IR (-O2):
define void @XmbResetIC() {
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *avl_malloc(size_t size, void *param) { return malloc(size); }


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

x86 assembly (clang, -O2):
<avl_malloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @avl_malloc(i64 %0, i8* nocapture readnone %1) {
%3 = tail call i8* @malloc(i64 %0)
ret i8* %3
}
double celsius_to_farenheit(double celsius_temp) {
  return celsius_temp * (9.0 / 5.0) + 32.0;
}


x86 assembly (clang, -O0):
<celsius_to_farenheit>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee6(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<celsius_to_farenheit>:
mulsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @celsius_to_farenheit(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fmuladd.f64(double %3, double 1.800000e+00, double 3.200000e+01)
ret double %4
}

LLVM IR (-O2):
define double @celsius_to_farenheit(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 1.800000e+00, double 3.200000e+01)
ret double %2
}
/* Variables and functions */
int close(int);
int tun_close(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<tun_close>:
jmp    1030 <close@plt>

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

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

/* Variables and functions */
void emu8k_work_eq(int32_t *inoutbuf, int count) {}


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

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

LLVM IR (-O0):
define void @emu8k_work_eq(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @emu8k_work_eq(i32* nocapture %0, i32 %1) {
ret void
}
void INT_Excep_MTU2_TCIU2(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU2_TCIU2() {
ret void
}
char *dln_find_exe(fname, path) const char *fname;
const char *path;
{
  if (!path) {
    path = getenv("PATH");
  }
  if (!path) {
    path = "/usr/local/bin:/usr/ucb:/usr/bin:/bin:.";
  }
  return dln_find_1(fname, path, 1);
}


x86 assembly (clang, -O0):
<dln_find_exe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114f <dln_find_exe+0x2f>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <getenv@plt>
cltq
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1165 <dln_find_exe+0x45>
lea    0xea4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
mov    $0x0,%al
call   1040 <dln_find_1@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dln_find_exe>:
push   %rbx
mov    %rdi,%rbx
test   %rsi,%rsi
jne    113a <dln_find_exe+0x1a>
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1030 <getenv@plt>
movslq %eax,%rsi
test   %rsi,%rsi
lea    0xec1(%rip),%rax
cmovne %rsi,%rax
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <dln_find_1@plt>
cltq
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"PATH\00"
@.str.1 = [40 x i8] c"/usr/local/bin:/usr/ucb:/usr/bin:/bin:.\00"
define i8* @dln_find_exe(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @getenv to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %4
br label %11
11: ; preds = %7, %2
%12 = load i8*, i8** %4
%13 = icmp ne i8* %12, null
br i1 %13, label %15, label %14
14: ; preds = %11
store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8** %4
br label %15
15: ; preds = %14, %11
%16 = load i8*, i8** %3
%17 = load i8*, i8** %4
%18 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @dln_find_1 to i32 (i8*, i8*, i32, ...)*)(i8* %16, i8* %17, i32 1)
%19 = sext i32 %18 to i64
%20 = inttoptr i64 %19 to i8*
ret i8* %20
}

LLVM IR (-O2):
@.str = [5 x i8] c"PATH\00"
@.str.1 = [40 x i8] c"/usr/local/bin:/usr/ucb:/usr/bin:/bin:.\00"
define i8* @dln_find_exe(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @getenv to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
br label %8
8: ; preds = %4, %2
%9 = phi i8* [ %1, %2 ], [ %7, %4 ]
%10 = icmp eq i8* %9, null
%11 = select i1 %10, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8* %9
%12 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @dln_find_1 to i32 (i8*, i8*, i32, ...)*)(i8* %0, i8* %11, i32 1)
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
ret i8* %14
}
/* Variables and functions */
char *lws_malloc(scalar_t__, char *);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *lws_strdup(const char *s) {
  char *d = lws_malloc(strlen(s) + 1, "strdup");
  if (d)
    strcpy(d, s);
  return d;
}


x86 assembly (clang, -O0):
<lws_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
lea    0xead(%rip),%rsi
call   1030 <lws_malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1174 <lws_strdup+0x44>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lws_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <strlen@plt>
lea    0x1(%rax),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <lws_malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     115f <lws_strdup+0x2f>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"strdup\00"
define i8* @lws_strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @lws_malloc(i64 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ polyglot_array_typeid(int /*<<< orphan*/,
                                         int /*<<< orphan*/);
int /*<<< orphan*/ polyglot_double_typeid();
void *polyglot_from_typed(double *, int /*<<< orphan*/);
__attribute__((always_)) void *polyglot_from_double_array(double *arr,
                                                          uint64_t len) {
  return polyglot_from_typed(
      arr, polyglot_array_typeid(polyglot_double_typeid(), len));
}


x86 assembly (clang, -O0):
<polyglot_from_double_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <polyglot_double_typeid@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1050 <polyglot_array_typeid@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <polyglot_from_typed@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<polyglot_from_double_array>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %eax,%eax
call   1040 <polyglot_double_typeid@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1050 <polyglot_array_typeid@plt>
mov    %r14,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <polyglot_from_typed@plt>

LLVM IR (-O0):
define i8* @polyglot_from_double_array(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = call i32 (...) @polyglot_double_typeid()
%7 = load i32, i32* %4
%8 = call i32 @polyglot_array_typeid(i32 %6, i32 %7)
%9 = call i8* @polyglot_from_typed(double* %5, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @polyglot_from_double_array(double* %0, i32 %1) {
%3 = tail call i32 (...) @polyglot_double_typeid()
%4 = tail call i32 @polyglot_array_typeid(i32 %3, i32 %1)
%5 = tail call i8* @polyglot_from_typed(double* %0, i32 %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128GeneralIOPinP__28__IO__makeInput();
void CC2420TransmitP__SFD__makeInput(void) {
  HplAtm128GeneralIOPinP__28__IO__makeInput();
}


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

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

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

LLVM IR (-O2):
define void @CC2420TransmitP__SFD__makeInput() {
%1 = tail call i32 (...) @HplAtm128GeneralIOPinP__28__IO__makeInput()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addstr(char *);
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ sleep(int);
void show(char *sign) {
  move(5, 10);
  addstr(sign);
  move(1, 0);
  refresh();
  sleep(1);
}


x86 assembly (clang, -O0):
<show>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x5,%edi
mov    $0xa,%esi
call   1060 <move@plt>
mov    -0x8(%rbp),%rdi
call   1040 <addstr@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1060 <move@plt>
mov    $0x0,%al
call   1030 <refresh@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show>:
push   %rbx
mov    %rdi,%rbx
mov    $0x5,%edi
mov    $0xa,%esi
call   1060 <move@plt>
mov    %rbx,%rdi
call   1040 <addstr@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1060 <move@plt>
xor    %eax,%eax
call   1030 <refresh@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1050 <sleep@plt>

LLVM IR (-O0):
define void @show(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @move(i32 5, i32 10)
%4 = load i8*, i8** %2
%5 = call i32 @addstr(i8* %4)
%6 = call i32 @move(i32 1, i32 0)
%7 = call i32 (...) @refresh()
%8 = call i32 @sleep(i32 1)
ret void
}

LLVM IR (-O2):
define void @show(i8* %0) {
%2 = tail call i32 @move(i32 5, i32 10)
%3 = tail call i32 @addstr(i8* %0)
%4 = tail call i32 @move(i32 1, i32 0)
%5 = tail call i32 (...) @refresh()
%6 = tail call i32 @sleep(i32 1)
ret void
}
void stopMjpgStreamer(void) {}


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

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

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

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