xunge/DecIR huggingface dataset:
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x + y > 0) {
    if (x > y) {
      x = x - 1;
    } else {
      if (x == y) {
        x = x - 1;
      } else {
        y = y - 1;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x0,%eax
jle    1189 <main+0x79>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    115c <main+0x4c>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1184 <main+0x74>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1176 <main+0x66>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    117f <main+0x6f>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1184 <main+0x74>
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int atoi(char *);
int fibonacciR(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  int desired, answer;
  int i;
  desired = atoi(argv[1]);
  answer = fibonacciR(desired);
  fprintf(stdout, "Fibonacci[%d] = %d\n", desired, answer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <fibonacciR@plt>
mov    %eax,-0x18(%rbp)
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xe89(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <fibonacciR@plt>
mov    0x2e96(%rip),%rcx
mov    (%rcx),%edi
lea    0xead(%rip),%rsi
mov    %ebx,%edx
mov    %eax,%ecx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [20 x i8] c"Fibonacci[%d] = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = call i32 @fibonacciR(i32 %13)
store i32 %14, i32* %7
%15 = load i32, i32* @stdout
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %17)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [20 x i8] c"Fibonacci[%d] = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @fibonacciR(i32 %5)
%7 = load i32, i32* @stdout
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ pawns_able_to_push(int, int, int);
void pawns_able_to_push_test(void **state) {
  assert_int_equal(
      0x0000000004228100ul,
      pawns_able_to_push(0x000000001422C100ul, 0x0000000422810000ul, 0));
  assert_int_equal(
      0x00A3140000000000ul,
      pawns_able_to_push(0x00E3140800000000ul, 0x0000A31400000000ul, 1));
}


x86 assembly (clang, -O0):
<pawns_able_to_push_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1422c100,%edi
mov    $0x22810000,%esi
xor    %edx,%edx
call   1030 <pawns_able_to_push@plt>
mov    %eax,%esi
mov    $0x4228100,%edi
call   1040 <assert_int_equal@plt>
xor    %esi,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1030 <pawns_able_to_push@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pawns_able_to_push_test>:
push   %rax
mov    $0x1422c100,%edi
mov    $0x22810000,%esi
xor    %edx,%edx
call   1030 <pawns_able_to_push@plt>
mov    $0x4228100,%edi
mov    %eax,%esi
call   1040 <assert_int_equal@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <pawns_able_to_push@plt>
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @pawns_able_to_push_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @pawns_able_to_push(i32 337821952, i32 578879488, i32 0)
%4 = call i32 @assert_int_equal(i32 69370112, i32 %3)
%5 = call i32 @pawns_able_to_push(i32 0, i32 0, i32 1)
%6 = call i32 @assert_int_equal(i32 0, i32 %5)
ret void
}

LLVM IR (-O2):
define void @pawns_able_to_push_test(i8** nocapture readnone %0) {
%2 = tail call i32 @pawns_able_to_push(i32 337821952, i32 578879488, i32 0)
%3 = tail call i32 @assert_int_equal(i32 69370112, i32 %2)
%4 = tail call i32 @pawns_able_to_push(i32 0, i32 0, i32 1)
%5 = tail call i32 @assert_int_equal(i32 0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ determine_game_version();
int /*<<< orphan*/ process_arguments(int, char const **);
int main(int argc, const char *argv[]) {
  determine_game_version();
  process_arguments(argc, argv);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <determine_game_version@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <process_arguments@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @determine_game_version()
%4 = tail call i32 @process_arguments(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int jump_steps(int);
int /*<<< orphan*/ printf(char *, int);
int test_jump_steps(int argc, const char *argv[]) {
  printf("number is %d", jump_steps(5));
  return 0;
}


x86 assembly (clang, -O0):
<test_jump_steps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x5,%edi
call   1040 <jump_steps@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_jump_steps>:
push   %rax
mov    $0x5,%edi
call   1040 <jump_steps@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"number is %d\00"
define i32 @test_jump_steps(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @jump_steps(i32 5)
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"number is %d\00"
define i32 @test_jump_steps(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @jump_steps(i32 5)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gtk(int, char **);
int /*<<< orphan*/ hello();
int /*<<< orphan*/ whine();
int main(int argc, char *argv[]) {
  hello();
  whine();
  gtk(argc, argv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <hello@plt>
mov    $0x0,%al
call   1040 <whine@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <gtk@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <hello@plt>
xor    %eax,%eax
call   1040 <whine@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <gtk@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @hello()
%7 = call i32 (...) @whine()
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @gtk(i32 %8, i8** %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @hello()
%4 = tail call i32 (...) @whine()
%5 = tail call i32 @gtk(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
bool sancus_get_urll(long long v, long long a, long long b, unsigned *out) {
  if ((v >= a) && (v <= b)) {
    if (out != NULL)
      *out = (unsigned)v;
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<sancus_get_urll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jl     1153 <sancus_get_urll+0x53>
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jg     1153 <sancus_get_urll+0x53>
cmpq   $0x0,-0x28(%rbp)
je     1147 <sancus_get_urll+0x47>
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    115a <sancus_get_urll+0x5a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sancus_get_urll>:
xor    %eax,%eax
cmp    %rsi,%rdi
jl     1118 <sancus_get_urll+0x18>
cmp    %rdx,%rdi
jg     1118 <sancus_get_urll+0x18>
mov    $0x1,%eax
test   %rcx,%rcx
je     1118 <sancus_get_urll+0x18>
mov    %edi,(%rcx)
ret

LLVM IR (-O0):
define i32 @sancus_get_urll(i64 %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32*
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i32* %3, i32** %9
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = icmp sge i64 %10, %11
br i1 %12, label %13, label %25
13: ; preds = %4
%14 = load i64, i64* %6
%15 = load i64, i64* %8
%16 = icmp sle i64 %14, %15
br i1 %16, label %17, label %25
17: ; preds = %13
%18 = load i32*, i32** %9
%19 = icmp ne i32* %18, null
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load i64, i64* %6
%22 = trunc i64 %21 to i32
%23 = load i32*, i32** %9
store i32 %22, i32* %23
br label %24
24: ; preds = %20, %17
store i32 1, i32* %5
br label %26
25: ; preds = %13, %4
store i32 0, i32* %5
br label %26
26: ; preds = %25, %24
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @sancus_get_urll(i64 %0, i64 %1, i64 %2, i32* writeonly %3) {
%5 = icmp slt i64 %0, %1
%6 = icmp sgt i64 %0, %2
%7 = or i1 %5, %6
br i1 %7, label %12, label %8
8: ; preds = %4
%9 = icmp eq i32* %3, null
br i1 %9, label %12, label %10
10: ; preds = %8
%11 = trunc i64 %0 to i32
store i32 %11, i32* %3
br label %12
12: ; preds = %4, %8, %10
%13 = phi i32 [ 1, %10 ], [ 1, %8 ], [ 0, %4 ]
ret i32 %13
}
/* Variables and functions */
bool bitops_parity(int i) {
  bool parity = false;
  while (i) {
    parity = !parity;
    i = i & (i - 1);
  }
  return parity;
}


x86 assembly (clang, -O0):
<bitops_parity>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113c <bitops_parity+0x3c>
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <bitops_parity+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitops_parity>:
xor    %eax,%eax
test   %edi,%edi
je     111c <bitops_parity+0x1c>
cs nopw 0x0(%rax,%rax,1)
xor    $0x1,%eax
lea    -0x1(%rdi),%ecx
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <bitops_parity+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitops_parity(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = xor i32 %4, 1
%7 = add nsw i32 %5, -1
%8 = and i32 %7, %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %11
}
/* Variables and functions */
int boot(int, char **);
int main(int nargs, char **argv) { return boot(nargs, argv); }


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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <boot@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <boot@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @boot(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ gpio_clear_tck();
int /*<<< orphan*/ gpio_clear_trst();
int /*<<< orphan*/ gpio_set_tck();
int /*<<< orphan*/ gpio_set_trst();
int /*<<< orphan*/ interface_init();
void initialize_jtag_hardware() {
  interface_init();
  gpio_clear_tck();
  gpio_clear_trst();
  gpio_set_tck();
  gpio_set_trst();
}


x86 assembly (clang, -O0):
<initialize_jtag_hardware>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <interface_init@plt>
mov    $0x0,%al
call   1060 <gpio_clear_tck@plt>
mov    $0x0,%al
call   1040 <gpio_clear_trst@plt>
mov    $0x0,%al
call   1070 <gpio_set_tck@plt>
mov    $0x0,%al
call   1050 <gpio_set_trst@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_jtag_hardware>:
push   %rax
xor    %eax,%eax
call   1030 <interface_init@plt>
xor    %eax,%eax
call   1060 <gpio_clear_tck@plt>
xor    %eax,%eax
call   1040 <gpio_clear_trst@plt>
xor    %eax,%eax
call   1070 <gpio_set_tck@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <gpio_set_trst@plt>

LLVM IR (-O0):
define void @initialize_jtag_hardware() {
%1 = call i32 (...) @interface_init()
%2 = call i32 (...) @gpio_clear_tck()
%3 = call i32 (...) @gpio_clear_trst()
%4 = call i32 (...) @gpio_set_tck()
%5 = call i32 (...) @gpio_set_trst()
ret void
}

LLVM IR (-O2):
define void @initialize_jtag_hardware() {
%1 = tail call i32 (...) @interface_init()
%2 = tail call i32 (...) @gpio_clear_tck()
%3 = tail call i32 (...) @gpio_clear_trst()
%4 = tail call i32 (...) @gpio_set_tck()
%5 = tail call i32 (...) @gpio_set_trst()
ret void
}
int printArray(int arr[], int n) {
  int i = 1;
  while (arr[i] == arr[0]) {
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jne    1137 <printArray+0x37>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <printArray+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
mov    (%rdi),%ecx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rax,%rdx
add    $0x1,%rax
cmp    %ecx,0x4(%rdi,%rdx,4)
je     1110 <printArray+0x10>
ret

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

LLVM IR (-O2):
define i32 @printArray(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
br label %4
4: ; preds = %4, %2
%5 = phi i64 [ %9, %4 ], [ 1, %2 ]
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, %3
%9 = add nuw i64 %5, 1
br i1 %8, label %4, label %10
10: ; preds = %4
%11 = trunc i64 %5 to i32
ret i32 %11
}
void log_debug(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @log_debug(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int random();
int main() {
  int i;
  for (i = 0; i < 1000; ++i)
    printf("%d\n", random());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1166 <main+0x46>
mov    $0x0,%al
call   1040 <random@plt>
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x3e8,%ebp
lea    0xed1(%rip),%rbx
nop
xor    %eax,%eax
call   1040 <random@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebp
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 (...) @random()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 1000
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x21() {
  Assert_real((isdigit(33) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              170, ("isdigit should be 0 for !"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for !\00"
define void @t_isdigit_0x21() {
%1 = call i64 @isdigit(i32 33)
%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 170, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for !\00"
define void @t_isdigit_0x21() {
%1 = tail call i64 @isdigit(i32 33)
%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 170, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t hashmapIntEquals(void *keyA, void *keyB) {
  int a = *((int *)keyA);
  int b = *((int *)keyB);
  return a == b;
}


x86 assembly (clang, -O0):
<hashmapIntEquals>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashmapIntEquals>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @hashmapIntEquals(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = icmp eq i32 %13, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @hashmapIntEquals(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int rand();
int rnd(int max) { return (rand() % max) + 1; }


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

x86 assembly (clang, -O2):
<rnd>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
lea    0x1(%rdx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rnd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
%6 = add nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @rnd(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
%4 = add nsw i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int dup2(int, int);
int replace_file(int oldfd, int fd) { return dup2(oldfd, fd); }


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

x86 assembly (clang, -O2):
<replace_file>:
jmp    1030 <dup2@plt>

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

LLVM IR (-O2):
define i32 @replace_file(i32 %0, i32 %1) {
%3 = tail call i32 @dup2(i32 %0, i32 %1)
ret i32 %3
}
int fn1(int x) { return ~x | x; }


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

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

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

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

/* Variables and functions */
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ ungetc(int, int /*<<< orphan*/ *);
void skip_whitespace(FILE *f) {
  int c;
  while (1) {
    c = getc(f);
    if (c != ' ' && c != '\t' && c != '\r' && c != '\n')
      break;
  }
  ungetc(c, f);
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getc@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
je     1165 <skip_whitespace+0x45>
cmpl   $0x9,-0xc(%rbp)
je     1165 <skip_whitespace+0x45>
cmpl   $0xd,-0xc(%rbp)
je     1165 <skip_whitespace+0x45>
cmpl   $0xa,-0xc(%rbp)
je     1165 <skip_whitespace+0x45>
jmp    116a <skip_whitespace+0x4a>
jmp    112c <skip_whitespace+0xc>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <ungetc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movabs $0x100002600,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <getc@plt>
cmp    $0x20,%eax
ja     1155 <skip_whitespace+0x35>
mov    %eax,%ecx
bt     %rcx,%r14
jb     1140 <skip_whitespace+0x20>
mov    %eax,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <ungetc@plt>

LLVM IR (-O0):
define void @skip_whitespace(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
br label %4
4: ; preds = %1, %19
%5 = load i32*, i32** %2
%6 = call i32 @getc(i32* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 32
br i1 %8, label %9, label %19
9: ; preds = %4
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 9
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp ne i32 %13, 13
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp ne i32 %16, 10
br i1 %17, label %18, label %19
18: ; preds = %15
br label %20
19: ; preds = %15, %12, %9, %4
br label %4
20: ; preds = %18
%21 = load i32, i32* %3
%22 = load i32*, i32** %2
%23 = call i32 @ungetc(i32 %21, i32* %22)
ret void
}

LLVM IR (-O2):
define void @skip_whitespace(i32* nocapture %0) {
br label %2
2: ; preds = %4, %1
%3 = tail call i32 @getc(i32* %0)
switch i32 %3, label %5 [
i32 32, label %4
i32 13, label %4
i32 10, label %4
i32 9, label %4
]
4: ; preds = %2, %2, %2, %2
br label %2
5: ; preds = %2
%6 = tail call i32 @ungetc(i32 %3, i32* %0)
ret void
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
int defines_str_32(int *, char const **);
int __attribute__((__unused__)) defines_str_8(int8_t *num, const char *argv[]) {
  int i, ret;
  ret = defines_str_32(&i, argv);
  *num = i;
  return ret;
}


x86 assembly (clang, -O0):
<defines_str_8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdi
call   1030 <defines_str_32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<defines_str_8>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
call   1030 <defines_str_32@plt>
mov    0xc(%rsp),%ecx
mov    %ecx,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @defines_str_8(i32* nocapture writeonly %0, i8** %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @defines_str_32(i32* %3, i8** %1)
%6 = load i32, i32* %3
store i32 %6, i32* %0
ret i32 %5
}
/* Variables and functions */
int const rand();
int rand_int(const int range) { return rand() % range + 1; }


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

x86 assembly (clang, -O2):
<rand_int>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
lea    0x1(%rdx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rand_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
%6 = add nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @rand_int(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
%4 = add nsw i32 %3, 1
ret i32 %4
}
void util_setrlimit() {}


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

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

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

LLVM IR (-O2):
define void @util_setrlimit() {
ret void
}
/* Variables and functions */
int dwarf_get_ID_name(unsigned int, char const **);
char const *ellipname(int, unsigned int, char const *, char *, int);
const char *get_ID_name(unsigned int val_in, int printonerr) {
  const char *v = 0;
  int res = dwarf_get_ID_name(val_in, &v);
  return ellipname(res, val_in, v, "ID", printonerr);
}


x86 assembly (clang, -O0):
<get_ID_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1030 <dwarf_get_ID_name@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%r8d
lea    0xea6(%rip),%rcx
call   1040 <ellipname@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ID_name>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1030 <dwarf_get_ID_name@plt>
mov    (%rsp),%rdx
lea    0xebe(%rip),%rcx
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%r8d
call   1040 <ellipname@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"ID\00"
define i8* @get_ID_name(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* null, i8** %5
%7 = load i32, i32* %3
%8 = call i32 @dwarf_get_ID_name(i32 %7, i8** %5)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = load i8*, i8** %5
%12 = load i32, i32* %4
%13 = call i8* @ellipname(i32 %9, i32 %10, i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [3 x i8] c"ID\00"
define i8* @get_ID_name(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @dwarf_get_ID_name(i32 %0, i8** %3)
%6 = load i8*, i8** %3
%7 = call i8* @ellipname(i32 %5, i32 %0, i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %7
}
int DiagWrite(int iHandle, const char *pcBuf, unsigned long ulLen, int iMode) {
  return (-1);
}


x86 assembly (clang, -O0):
<DiagWrite>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @DiagWrite(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
ret i32 -1
}

LLVM IR (-O2):
define i32 @DiagWrite(i32 %0, i8* nocapture readnone %1, i64 %2, i32 %3) {
ret i32 -1
}
void ff_hevc_put_hevc_uni_w_pel_pixels24_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_pel_pixels24_10_sse4() {
ret void
}
/* Type definitions */
typedef double uint64_t;

/* Variables and functions */
double byteswap8(double);
int /*<<< orphan*/ memcpy(double *, double *, int);
double byteswap_double(double num) {
  uint64_t answer = 0;
  memcpy(&answer, &num, 8);
  answer = byteswap8(answer);
  memcpy(&num, &answer, 8);
  return num;
}


x86 assembly (clang, -O0):
<byteswap_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
movsd  -0x10(%rbp),%xmm0
call   1030 <byteswap8@plt>
movsd  %xmm0,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<byteswap_double>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%r14
lea    0x10(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
movsd  0x8(%rsp),%xmm0
call   1030 <byteswap8@plt>
movsd  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define double @byteswap_double(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %3
%4 = call i32 @memcpy(double* %3, double* %2, i32 8)
%5 = load double, double* %3
%6 = call double @byteswap8(double %5)
store double %6, double* %3
%7 = call i32 @memcpy(double* %2, double* %3, i32 8)
%8 = load double, double* %2
ret double %8
}

LLVM IR (-O2):
define double @byteswap_double(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = bitcast double* %3 to i8*
store double 0.000000e+00, double* %3
%5 = call i32 @memcpy(double* %3, double* %2, i32 8)
%6 = load double, double* %3
%7 = call double @byteswap8(double %6)
store double %7, double* %3
%8 = call i32 @memcpy(double* %2, double* %3, i32 8)
%9 = load double, double* %2
ret double %9
}
int _evhtp_is_http_11(const char major, const char minor) {
  if (major >= 1 && minor >= 1) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<_evhtp_is_http_11>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x1,%eax
jl     1136 <_evhtp_is_http_11+0x36>
movsbl -0x6(%rbp),%eax
cmp    $0x1,%eax
jl     1136 <_evhtp_is_http_11+0x36>
movl   $0x1,-0x4(%rbp)
jmp    113d <_evhtp_is_http_11+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_evhtp_is_http_11>:
test   %dil,%dil
setg   %al
test   %sil,%sil
setg   %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @_evhtp_is_http_11(i8 signext %0, i8 signext %1) {
%3 = icmp sgt i8 %0, 0
%4 = icmp sgt i8 %1, 0
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int nsu_ispow2(unsigned int x) { return x > 1 ? !(x & (x - 1)) : 0; }


x86 assembly (clang, -O0):
<nsu_ispow2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jbe    1131 <nsu_ispow2+0x31>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <nsu_ispow2+0x3b>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <nsu_ispow2+0x3b>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsu_ispow2>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     1111 <nsu_ispow2+0x11>
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
test   %ecx,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @nsu_ispow2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ugt i32 %3, 1
br i1 %4, label %5, label %13
5: ; preds = %1
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = sub i32 %7, 1
%9 = and i32 %6, %8
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
br label %14
13: ; preds = %1
br label %14
14: ; preds = %13, %5
%15 = phi i32 [ %12, %5 ], [ 0, %13 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @nsu_ispow2(i32 %0) {
%2 = icmp ugt i32 %0, 1
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i32 @llvm.ctpop.i32(i32 %0)
%5 = icmp ult i32 %4, 2
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 0, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO(int);
long int BNC_2() {
  long int stat = 99;
  BNCIO(2);
  return (stat);
}


x86 assembly (clang, -O0):
<BNC_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x63,-0x8(%rbp)
mov    $0x2,%edi
call   1030 <BNCIO@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BNC_2>:
push   %rax
mov    $0x2,%edi
call   1030 <BNCIO@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @BNC_2() {
%1 = alloca i64
store i64 99, i64* %1
%2 = call i32 @BNCIO(i32 2)
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @BNC_2() {
%1 = tail call i32 @BNCIO(i32 2)
ret i64 99
}
XUngrabKeyboard() {}


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

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

LLVM IR (-O0):
define i32 @XUngrabKeyboard() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XUngrabKeyboard() {
ret i32 undef
}
/* Variables and functions */
int actual();
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  int dead;
  dead = actual();
  sleep(3);
  return actual();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <actual@plt>
mov    %eax,-0x14(%rbp)
mov    $0x3,%edi
call   1040 <sleep@plt>
mov    $0x0,%al
call   1030 <actual@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <actual@plt>
mov    $0x3,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <actual@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @actual()
store i32 %7, i32* %6
%8 = call i32 @sleep(i32 3)
%9 = call i32 (...) @actual()
ret i32 %9
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @actual()
%4 = tail call i32 @sleep(i32 3)
%5 = tail call i32 (...) @actual()
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ ptrdiff_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ inv_adst16_1d_internal_c(int /*<<< orphan*/ *const,
                                            int /*<<< orphan*/ const, int const,
                                            int const,
                                            int /*<<< orphan*/ *const,
                                            int /*<<< orphan*/ const);
void dav1d_inv_adst16_1d_c(int32_t *const c, const ptrdiff_t stride,
                           const int min, const int max) {
  inv_adst16_1d_internal_c(c, stride, min, max, c, stride);
}


x86 assembly (clang, -O0):
<dav1d_inv_adst16_1d_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%r8
mov    -0xc(%rbp),%r9d
call   1030 <inv_adst16_1d_internal_c@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dav1d_inv_adst16_1d_c>:
mov    %rdi,%r8
mov    %esi,%r9d
jmp    1030 <inv_adst16_1d_internal_c@plt>

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

LLVM IR (-O2):
define void @dav1d_inv_adst16_1d_c(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @inv_adst16_1d_internal_c(i32* %0, i32 %1, i32 %2, i32 %3, i32* %0, i32 %1)
ret void
}
int p_strlen(const char *buffer) {
  const char *ptr = buffer;
  while (*ptr++)
    continue;
  return (ptr - buffer - 1);
}


x86 assembly (clang, -O0):
<p_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
je     112d <p_strlen+0x2d>
jmp    1110 <p_strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <p_strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @p_strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %4 to i64
%9 = ptrtoint i8* %0 to i64
%10 = xor i64 %9, -1
%11 = add i64 %8, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}
/* Variables and functions */
char **getGroupKeys(char *group) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8** @getGroupKeys(i8* nocapture readnone %0) {
ret i8** null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello , world! From Hello1\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Hello , world! From Hello1\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [27 x i8] c"Hello , world! From Hello1\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret i32 0
}
long main() {
  long res;
  char *str;
  char **strstar;
  double dub;
  double *dubstar;
  long num;
  long *numstar;
  res = 1.5 > 2.0;
  res = 1.5 <= 'a';
  if (num == 1)
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x10(%rbp)
movq   $0x1,-0x10(%rbp)
cmpq   $0x1,-0x38(%rbp)
jne    112c <main+0x2c>
movq   $0x0,-0x8(%rbp)
jmp    1134 <main+0x34>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xffffffffffffffff,%rax
ret

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

LLVM IR (-O2):
define i64 @main() {
ret i64 -1
}