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

/* Variables and functions */
int /*<<< orphan*/ load_xmm(int, void *);
int /*<<< orphan*/ print_vec_int32(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
void print_xmm_int32(int i) {
  static int32_t v[4];
  load_xmm(i, (void *)v);
  printf("xmm%d = ", i);
  print_vec_int32(v);
}


x86 assembly (clang, -O0):
<print_xmm_int32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0x2f0b(%rip),%rsi
call   1040 <load_xmm@plt>
mov    -0x4(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
lea    0x2ef0(%rip),%rdi
call   1050 <print_vec_int32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_xmm_int32>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x2f13(%rip),%r14
mov    %r14,%rsi
call   1040 <load_xmm@plt>
lea    0xeb4(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <print_vec_int32@plt>

LLVM IR (-O0):
@print_xmm_int32.v = internal global [4 x i32] zeroinitializer
@.str = [9 x i8] c"xmm%d = \00"
define void @print_xmm_int32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @load_xmm(i32 %3, i8* bitcast ([4 x i32]* @print_xmm_int32.v to i8*))
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @print_vec_int32(i32* getelementptr inbounds ([4 x i32], [4 x i32]* @print_xmm_int32.v, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@print_xmm_int32.v = internal global [4 x i32] zeroinitializer
@.str = [9 x i8] c"xmm%d = \00"
define void @print_xmm_int32(i32 %0) {
%2 = tail call i32 @load_xmm(i32 %0, i8* bitcast ([4 x i32]* @print_xmm_int32.v to i8*))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @print_vec_int32(i32* getelementptr inbounds ([4 x i32], [4 x i32]* @print_xmm_int32.v, i64 0, i64 0))
ret void
}
/* Variables and functions */
int do_bt();
int call_do_bt(void) { return do_bt() + 1; }


x86 assembly (clang, -O0):
<call_do_bt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <do_bt@plt>
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_do_bt>:
push   %rax
xor    %eax,%eax
call   1030 <do_bt@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @call_do_bt() {
%1 = call i32 (...) @do_bt()
%2 = add nsw i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @call_do_bt() {
%1 = tail call i32 (...) @do_bt()
%2 = add nsw i32 %1, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void sig_handler() {
  printf("*** Server ended due to interrupt ***\n");
  exit(0);
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sig_handler>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"*** Server ended due to interrupt ***\0A\00"
define void @sig_handler() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [38 x i8] c"*** Server ended due to interrupt ***\00"
define void @sig_handler() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ sleep(unsigned int);
int /*<<< orphan*/ usleep(unsigned int);
int os_sleep(unsigned int s, unsigned int u) {
  if (s == 0) {
    usleep(u);
  } else {
    sleep(s);
  }
  return 0;
}


x86 assembly (clang, -O0):
<os_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1145 <os_sleep+0x25>
mov    -0x8(%rbp),%edi
call   1040 <usleep@plt>
jmp    114d <os_sleep+0x2d>
mov    -0x4(%rbp),%edi
call   1030 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_sleep>:
push   %rax
test   %edi,%edi
je     112c <os_sleep+0xc>
call   1030 <sleep@plt>
jmp    1133 <os_sleep+0x13>
mov    %esi,%edi
call   1040 <usleep@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @os_sleep(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @usleep(i32 %1)
br label %8
6: ; preds = %2
%7 = tail call i32 @sleep(i32 %0)
br label %8
8: ; preds = %6, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ init(char *);
int ok();
int /*<<< orphan*/ test();
int main() {
  init("initializer lists");
  test();
  return ok();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <init@plt>
mov    $0x0,%al
call   1050 <test@plt>
mov    $0x0,%al
call   1030 <ok@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <init@plt>
xor    %eax,%eax
call   1050 <test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ok@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"initializer lists\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @init(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test()
%4 = call i32 (...) @ok()
ret i32 %4
}

LLVM IR (-O2):
@.str = [18 x i8] c"initializer lists\00"
define i32 @main() {
%1 = tail call i32 @init(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test()
%3 = tail call i32 (...) @ok()
ret i32 %3
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y, oldx;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x >= 0 || y >= 0) {
    oldx = x;
    x = y - 1;
    y = oldx - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jge    114c <main+0x3c>
cmpl   $0x0,-0xc(%rbp)
setge  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    115c <main+0x4c>
jmp    1179 <main+0x69>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x20,%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
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %2
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %3
br label %7
7: ; preds = %15, %0
%8 = load i32, i32* %2
%9 = icmp sge i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp sge i32 %11, 0
br label %13
13: ; preds = %10, %7
%14 = phi i1 [ true, %7 ], [ %12, %10 ]
br i1 %14, label %15, label %21
15: ; preds = %13
%16 = load i32, i32* %2
store i32 %16, i32* %4
%17 = load i32, i32* %3
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %2
%19 = load i32, i32* %4
%20 = sub nsw i32 %19, 1
store i32 %20, i32* %3
br label %7
21: ; preds = %13
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 /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int some_symbol();
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int ret = some_symbol();
  if (ret == 1)
    return 0;
  fprintf(stderr, "ret was %i instead of 1\n", ret);
  return -1;
}


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 <some_symbol@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1156 <main+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1175 <main+0x55>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xe97(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <some_symbol@plt>
cmp    $0x1,%eax
je     114b <main+0x2b>
mov    0x2eaa(%rip),%rcx
mov    (%rcx),%edi
lea    0xec1(%rip),%rsi
mov    %eax,%edx
call   1040 <fprintf@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"ret was %i instead of 1\0A\00"
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 (...) @some_symbol()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 0, i32* %3
br label %15
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i32, i32* %6
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %13)
store i32 -1, i32* %3
br label %15
15: ; preds = %11, %10
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"ret was %i instead of 1\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @some_symbol()
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ -1, %5 ], [ 0, %2 ]
ret i32 %9
}
long x86_syscall3(long nr, long a0, long a1, long a2) {
  long ret;
  asm volatile("syscall"
               : "=a"(ret)
               : "a"(nr), "D"(a0), "S"(a1), "d"(a2)
               : "cc", "memory", "rcx", "r8", "r9", "r10", "r11");
  return ret;
}


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

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

LLVM IR (-O0):
define i64 @x86_syscall3(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%10 = load i64, i64* %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = call i64 asm sideeffect "syscall", "={ax},{ax},{di},{si},{dx},~{cc},~{memory},~{rcx},~{r8},~{r9},~{r10},~{r11},~{dirflag},~{fpsr},~{flags}"(i64 %10, i64 %11, i64 %12, i64 %13)
store i64 %14, i64* %9
%15 = load i64, i64* %9
ret i64 %15
}

LLVM IR (-O2):
define i64 @x86_syscall3(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i64 asm sideeffect "syscall", "={ax},{ax},{di},{si},{dx},~{cc},~{memory},~{rcx},~{r8},~{r9},~{r10},~{r11},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2, i64 %3)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *process) { printf("Usage: %s program\n", process); }


x86 assembly (clang, -O0):
<usage>:
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):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [19 x i8] c"Usage: %s program\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ rand();
double xrand(double xl, double xh) {
  double x;
  x = (xl + (xh - xl) * ((double)rand()) / 2147483647.0);
  return (x);
}


x86 assembly (clang, -O0):
<xrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
cvtsi2sd %rax,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xea3(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrand>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mulsd  0x8(%rsp),%xmm0
divsd  0xebf(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @xrand(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = load double, double* %3
%9 = fsub double %7, %8
%10 = call i64 (...) @rand()
%11 = sitofp i64 %10 to double
%12 = fmul double %9, %11
%13 = fdiv double %12, 0x41DFFFFFFFC00000
%14 = fadd double %6, %13
store double %14, double* %5
%15 = load double, double* %5
ret double %15
}

LLVM IR (-O2):
define double @xrand(double %0, double %1) {
%3 = fsub double %1, %0
%4 = tail call i64 (...) @rand()
%5 = sitofp i64 %4 to double
%6 = fmul double %3, %5
%7 = fdiv double %6, 0x41DFFFFFFFC00000
%8 = fadd double %7, %0
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ rrnx_substr(char *, char const *, int, int);
int rrnx_trim_trailing(char *);
int rrnx_substr_trimmed2(char *dest, const char *src, int offset, int len) {
  rrnx_substr(dest, src, offset, len);
  return rrnx_trim_trailing(dest);
}


x86 assembly (clang, -O0):
<rrnx_substr_trimmed2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <rrnx_substr@plt>
mov    -0x8(%rbp),%rdi
call   1040 <rrnx_trim_trailing@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rrnx_substr_trimmed2>:
push   %rbx
mov    %rdi,%rbx
call   1030 <rrnx_substr@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <rrnx_trim_trailing@plt>

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

LLVM IR (-O2):
define i32 @rrnx_substr_trimmed2(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @rrnx_substr(i8* %0, i8* %1, i32 %2, i32 %3)
%6 = tail call i32 @rrnx_trim_trailing(i8* %0)
ret i32 %6
}
int creat_label() {
  static int labelno = 0;
  return ++labelno;
}


x86 assembly (clang, -O0):
<creat_label>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f11(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<creat_label>:
mov    0x2f1e(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f15(%rip)
ret

LLVM IR (-O0):
@creat_label.labelno = internal global i32 0
define i32 @creat_label() {
%1 = load i32, i32* @creat_label.labelno
%2 = add nsw i32 %1, 1
store i32 %2, i32* @creat_label.labelno
ret i32 %2
}

LLVM IR (-O2):
@creat_label.labelno = internal unnamed_addr global i32 0
define i32 @creat_label() {
%1 = load i32, i32* @creat_label.labelno
%2 = add nsw i32 %1, 1
store i32 %2, i32* @creat_label.labelno
ret i32 %2
}
struct Value *handle_unhook_command(args)
char *args;
{
  return newint_fl(remove_macro(args, 0, 1),
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/gary9872/tf40s1/refs/"
                   "heads/master/src/command.c",
                   751);
}


x86 assembly (clang, -O0):
<handle_unhook_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1040 <remove_macro@plt>
mov    %eax,%edi
lea    0xeb9(%rip),%rsi
mov    $0x2ef,%edx
mov    $0x0,%al
call   1030 <newint_fl@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_unhook_command>:
push   %rax
xor    %esi,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <remove_macro@plt>
lea    0xeca(%rip),%rsi
mov    %eax,%edi
mov    $0x2ef,%edx
xor    %eax,%eax
call   1030 <newint_fl@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
%struct.Value = type opaque
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/gary9872/tf40s1/refs/heads/master/src/command.c\00"
define %struct.Value* @handle_unhook_command(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @remove_macro to i32 (i8*, i32, i32, ...)*)(i8* %3, i32 0, i32 1)
%5 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @newint_fl to i32 (i32, i8*, i32, ...)*)(i32 %4, i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 751)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to %struct.Value*
ret %struct.Value* %7
}

LLVM IR (-O2):
%struct.Value = type opaque
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/gary9872/tf40s1/refs/heads/master/src/command.c\00"
define %struct.Value* @handle_unhook_command(i8* %0) {
%2 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @remove_macro to i32 (i8*, i32, i32, ...)*)(i8* %0, i32 0, i32 1)
%3 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @newint_fl to i32 (i32, i8*, i32, ...)*)(i32 %2, i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 751)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to %struct.Value*
ret %struct.Value* %5
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char, unsigned char,
                           unsigned char, char *);
void lineprint3(char *outf, long ctr, unsigned char *op, char *outstring) {
  sprintf(outf, "%02X %02X %02X    %s", *op, *(op + 1), *(op + 2), outstring);
}


x86 assembly (clang, -O0):
<lineprint3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%dl
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    0x2(%rax),%al
mov    -0x20(%rbp),%r9
lea    0xeb5(%rip),%rsi
movzbl %dl,%edx
movzbl %cl,%ecx
movzbl %al,%r8d
call   1030 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lineprint3>:
mov    %rcx,%r9
movzbl (%rdx),%eax
movzbl 0x1(%rdx),%ecx
movzbl 0x2(%rdx),%r8d
lea    0xeda(%rip),%rsi
mov    %eax,%edx
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"%02X %02X %02X %s\00"
define void @lineprint3(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %7
%11 = load i8, i8* %10
%12 = load i8*, i8** %7
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = load i8*, i8** %7
%16 = getelementptr inbounds i8, i8* %15, i64 2
%17 = load i8, i8* %16
%18 = load i8*, i8** %8
%19 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8 zeroext %11, i8 zeroext %14, i8 zeroext %17, i8* %18)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"%02X %02X %02X %s\00"
define void @lineprint3(i8* nocapture writeonly %0, i64 %1, i8* nocapture %2, i8* %3) {
%5 = load i8, i8* %2
%6 = getelementptr inbounds i8, i8* %2, i64 1
%7 = load i8, i8* %6
%8 = getelementptr inbounds i8, i8* %2, i64 2
%9 = load i8, i8* %8
%10 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8 zeroext %5, i8 zeroext %7, i8 zeroext %9, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execve(char *, int /*<<< orphan*/, int /*<<< orphan*/);
void fn() { execve("/bin/sh", 0, 0); }


x86 assembly (clang, -O0):
<fn>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <execve@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <execve@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/sh\00"
define void @fn() {
%1 = call i32 @execve(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/sh\00"
define void @fn() {
%1 = tail call i32 @execve(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void hideemail_deinit(void *userdata) {
  if (userdata) {
    free(userdata);
  }
}


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

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

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

LLVM IR (-O2):
define void @hideemail_deinit(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ add_sentence(int *, int /*<<< orphan*/ *, int *, int);
int /*<<< orphan*/ setleu16(int *, int, int);
void gen_st_wind_angel(uint8_t *b, uint32_t *buflen) {
  uint8_t sentence[] = {0x10, 0xF1, 0x00, 0x00};
  setleu16(sentence, (int)(90.0 * 2.0), 2);
  add_sentence(b, buflen, sentence, 4);
}


x86 assembly (clang, -O0):
<gen_st_wind_angel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec9(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec6(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0xb4,%esi
mov    $0x2,%edx
call   1040 <setleu16@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x4,%ecx
call   1030 <add_sentence@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_st_wind_angel>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movaps 0xeca(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0xb4,%esi
mov    $0x2,%edx
call   1040 <setleu16@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    $0x4,%ecx
call   1030 <add_sentence@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.gen_st_wind_angel.sentence = [4 x i32] [i32 16, i32 241, i32 0, i32 0]
define void @gen_st_wind_angel(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [4 x i32]
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = bitcast [4 x i32]* %5 to i8*
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%8 = call i32 @setleu16(i32* %7, i32 180, i32 2)
%9 = load i32*, i32** %3
%10 = load i32*, i32** %4
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%12 = call i32 @add_sentence(i32* %9, i32* %10, i32* %11, i32 4)
ret void
}

LLVM IR (-O2):
@__const.gen_st_wind_angel.sentence = [4 x i32] [i32 16, i32 241, i32 0, i32 0]
define void @gen_st_wind_angel(i32* %0, i32* %1) {
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %3 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%6 = call i32 @setleu16(i32* %5, i32 180, i32 2)
%7 = call i32 @add_sentence(i32* %0, i32* %1, i32* %5, i32 4)
ret void
}
/* Variables and functions */
double fabs(double);
double SIGN(double a, double b) { return ((b) >= 0.0 ? fabs(a) : -fabs(a)); }


x86 assembly (clang, -O0):
<SIGN>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     113a <SIGN+0x3a>
movsd  -0x8(%rbp),%xmm0
movaps 0xed4(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1166 <SIGN+0x66>
movsd  -0x8(%rbp),%xmm0
movaps 0xeba(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SIGN>:
movapd 0xef8(%rip),%xmm2
andpd  %xmm0,%xmm2
orpd   0xefc(%rip),%xmm0
xorpd  %xmm3,%xmm3
cmpnlesd %xmm1,%xmm3
andpd  %xmm3,%xmm0
andnpd %xmm2,%xmm3
orpd   %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @SIGN(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fcmp oge double %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load double, double* %3
%9 = call double @llvm.fabs.f64(double %8)
br label %14
10: ; preds = %2
%11 = load double, double* %3
%12 = call double @llvm.fabs.f64(double %11)
%13 = fneg double %12
br label %14
14: ; preds = %10, %7
%15 = phi double [ %9, %7 ], [ %13, %10 ]
ret double %15
}

LLVM IR (-O2):
define double @SIGN(double %0, double %1) {
%3 = fcmp ult double %1, 0.000000e+00
%4 = tail call double @llvm.fabs.f64(double %0)
%5 = fneg double %4
%6 = select i1 %3, double %5, double %4
ret double %6
}
/* Variables and functions */
int mexpdrv_simple_interact(int, int, int);
int mexpdrv_start_mult(void) {
  return mexpdrv_simple_interact(0x80000000, 0x60000000, 6);
}


x86 assembly (clang, -O0):
<mexpdrv_start_mult>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80000000,%edi
mov    $0x60000000,%esi
mov    $0x6,%edx
call   1030 <mexpdrv_simple_interact@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mexpdrv_start_mult>:
mov    $0x80000000,%edi
mov    $0x60000000,%esi
mov    $0x6,%edx
jmp    1030 <mexpdrv_simple_interact@plt>

LLVM IR (-O0):
define i32 @mexpdrv_start_mult() {
%1 = call i32 @mexpdrv_simple_interact(i32 -2147483648, i32 1610612736, i32 6)
ret i32 %1
}

LLVM IR (-O2):
define i32 @mexpdrv_start_mult() {
%1 = tail call i32 @mexpdrv_simple_interact(i32 -2147483648, i32 1610612736, i32 6)
ret i32 %1
}
int hex_to_dec(const char hex) {
  if (hex >= '0' && hex <= '9')
    return hex - '0';
  else if (hex >= 'A' && hex <= 'F')
    return hex - 'A' + 10;
  else
    return 0;
}


x86 assembly (clang, -O0):
<hex_to_dec>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1133 <hex_to_dec+0x33>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1133 <hex_to_dec+0x33>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1166 <hex_to_dec+0x66>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     115f <hex_to_dec+0x5f>
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jg     115f <hex_to_dec+0x5f>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1166 <hex_to_dec+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_to_dec>:
mov    %edi,%eax
lea    -0x30(%rax),%ecx
cmp    $0x9,%cl
ja     110e <hex_to_dec+0xe>
add    $0xffffffd0,%eax
ret
lea    -0x41(%rax),%ecx
add    $0xffffffc9,%eax
xor    %edx,%edx
cmp    $0x6,%cl
cmovb  %eax,%edx
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @hex_to_dec(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
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 48
store i32 %14, i32* %2
br label %29
15: ; preds = %7, %1
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sge i32 %17, 65
br i1 %18, label %19, label %28
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sle i32 %21, 70
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = sub nsw i32 %25, 65
%27 = add nsw i32 %26, 10
store i32 %27, i32* %2
br label %29
28: ; preds = %19, %15
store i32 0, i32* %2
br label %29
29: ; preds = %28, %23, %11
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @hex_to_dec(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = add nsw i32 %2, -48
br label %12
7: ; preds = %1
%8 = add i8 %0, -65
%9 = icmp ult i8 %8, 6
%10 = add nsw i32 %2, -55
%11 = select i1 %9, i32 %10, i32 0
br label %12
12: ; preds = %7, %5
%13 = phi i32 [ %6, %5 ], [ %11, %7 ]
ret i32 %13
}
/* Variables and functions */
int strcmp(char *, char *);
int compare_instn_def(const void *a, const void *b) {
  char **_a = (char **)a;
  char **_b = (char **)b;
  return strcmp(*_a, *_b);
}


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

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

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

LLVM IR (-O2):
define i32 @compare_instn_def(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ error();
void gl_write(int i) {
  switch (i) {
  case 0:
  case 1:
    break;
  default:
    error();
  }
}


x86 assembly (clang, -O0):
<gl_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
ja     1131 <gl_write+0x21>
jmp    112c <gl_write+0x1c>
jmp    1138 <gl_write+0x28>
mov    $0x0,%al
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gl_write>:
cmp    $0x2,%edi
jae    1116 <gl_write+0x6>
ret
xor    %eax,%eax
jmp    1030 <error@plt>

LLVM IR (-O0):
define void @gl_write(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %5 [
i32 0, label %4
i32 1, label %4
]
4: ; preds = %1, %1
br label %7
5: ; preds = %1
%6 = call i32 (...) @error()
br label %7
7: ; preds = %5, %4
ret void
}

LLVM IR (-O2):
define void @gl_write(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @error()
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x16() {
  Assert_real((isodigit(22) == 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_isodigit.c",
              115, ("isodigit should be 0 for 0x16"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x16>:
push   %rax
mov    $0x16,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x73,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x16\00"
define void @t_isodigit_0x16() {
%1 = call i64 @isodigit(i32 22)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 115, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x16\00"
define void @t_isodigit_0x16() {
%1 = tail call i64 @isodigit(i32 22)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 115, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void sub_reg32_imm32(int reg32, unsigned long imm32) {
  put8(0x81);
  put8(0xE8 + reg32);
  put32(imm32);
}


x86 assembly (clang, -O0):
<sub_reg32_imm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x81,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
add    $0xe8,%edi
call   1030 <put8@plt>
mov    -0x10(%rbp),%rdi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_reg32_imm32>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x81,%edi
call   1030 <put8@plt>
add    $0xe8,%ebp
mov    %ebp,%edi
call   1030 <put8@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @sub_reg32_imm32(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = call i32 @put8(i32 129)
%6 = load i32, i32* %3
%7 = add nsw i32 232, %6
%8 = call i32 @put8(i32 %7)
%9 = load i64, i64* %4
%10 = call i32 @put32(i64 %9)
ret void
}

LLVM IR (-O2):
define void @sub_reg32_imm32(i32 %0, i64 %1) {
%3 = tail call i32 @put8(i32 129)
%4 = add nsw i32 %0, 232
%5 = tail call i32 @put8(i32 %4)
%6 = tail call i32 @put32(i64 %1)
ret void
}
void RTAssertMsg2AddWeakV(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAssertMsg2AddWeakV() {
ret void
}
/* Variables and functions */
void GLS_BeginScene(void) {}


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

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

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

LLVM IR (-O2):
define void @GLS_BeginScene() {
ret void
}
__attribute__((no, noclone)) unsigned char fn6(unsigned char x, unsigned char y,
                                               int *ovf) {
  unsigned char res;
  x = (x & 63) + ((unsigned char)~0 - 66);
  y = (y & 3);
  *ovf = __builtin_add_overflow(x, y, &res);
  return res;
}


x86 assembly (clang, -O0):
<fn6>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x3f,%eax
add    $0xbd,%eax
mov    %al,-0x1(%rbp)
movzbl -0x2(%rbp),%eax
and    $0x3,%eax
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%cl
add    -0x2(%rbp),%cl
setb   %al
mov    %cl,-0x11(%rbp)
and    $0x1,%al
movzbl %al,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movzbl -0x11(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn6>:
and    $0x3f,%dil
and    $0x3,%sil
lea    (%rsi,%rdi,1),%eax
add    $0xbd,%al
movl   $0x0,(%rdx)
ret

LLVM IR (-O0):
define zeroext i8 @fn6(i8 zeroext %0, i8 zeroext %1, i32* %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i32*
%7 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i32* %2, i32** %6
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = and i32 %9, 63
%11 = add nsw i32 %10, 189
%12 = trunc i32 %11 to i8
store i8 %12, i8* %4
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = and i32 %14, 3
%16 = trunc i32 %15 to i8
store i8 %16, i8* %5
%17 = load i8, i8* %4
%18 = load i8, i8* %5
%19 = call { i8, i1 } @llvm.uadd.with.overflow.i8(i8 %17, i8 %18)
%20 = extractvalue { i8, i1 } %19, 1
%21 = extractvalue { i8, i1 } %19, 0
store i8 %21, i8* %7
%22 = zext i1 %20 to i32
%23 = load i32*, i32** %6
store i32 %22, i32* %23
%24 = load i8, i8* %7
ret i8 %24
}

LLVM IR (-O2):
define zeroext i8 @fn6(i8 zeroext %0, i8 zeroext %1, i32* nocapture writeonly %2) {
%4 = and i8 %0, 63
%5 = add nuw nsw i8 %4, -67
%6 = and i8 %1, 3
%7 = add nuw nsw i8 %5, %6
store i32 0, i32* %2
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ verilog_task(int, int *);
int c_task(int i, int *o) {
  printf("Hello from c_task()\n");
  verilog_task(i, o);
  *o = 2 * i;
  return (0);
}


x86 assembly (clang, -O0):
<c_task>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <verilog_task@plt>
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_task>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <verilog_task@plt>
add    %ebp,%ebp
mov    %ebp,(%rbx)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Hello from c_task()\0A\00"
define i32 @c_task(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = load i32*, i32** %4
%8 = call i32 @verilog_task(i32 %6, i32* %7)
%9 = load i32, i32* %3
%10 = mul nsw i32 2, %9
%11 = load i32*, i32** %4
store i32 %10, i32* %11
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"Hello from c_task()\00"
define i32 @c_task(i32 %0, i32* %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @verilog_task(i32 %0, i32* %1)
%5 = shl nsw i32 %0, 1
store i32 %5, i32* %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ esc(char *);
hts() { esc("H"); }


x86 assembly (clang, -O0):
<hts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <esc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"H\00"
define i32 @hts() {
%1 = alloca i32
%2 = call i32 @esc(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [2 x i8] c"H\00"
define i32 @hts() {
%1 = tail call i32 @esc(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xc4() {
  Assert_real((isgraph(196) == 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_isgraph.c",
              985, ("isgraph should be 0 for 0xc4"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xc4>:
push   %rax
mov    $0xc4,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3d9,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xc4\00"
define void @t_isgraph_0xc4() {
%1 = call i64 @isgraph(i32 196)
%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 985, i8* getelementptr inbounds ([29 x i8], [29 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xc4\00"
define void @t_isgraph_0xc4() {
%1 = tail call i64 @isgraph(i32 196)
%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 985, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct addrinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ orig_freeaddrinfo(struct addrinfo *);
void fake_freeaddrinfo(struct addrinfo *ai) { orig_freeaddrinfo(ai); }


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

x86 assembly (clang, -O2):
<fake_freeaddrinfo>:
jmp    1030 <orig_freeaddrinfo@plt>

LLVM IR (-O0):
%struct.addrinfo = type { i32 }
define void @fake_freeaddrinfo(%struct.addrinfo* %0) {
%2 = alloca %struct.addrinfo*
store %struct.addrinfo* %0, %struct.addrinfo** %2
%3 = load %struct.addrinfo*, %struct.addrinfo** %2
%4 = call i32 @orig_freeaddrinfo(%struct.addrinfo* %3)
ret void
}

LLVM IR (-O2):
%struct.addrinfo = type { i32 }
define void @fake_freeaddrinfo(%struct.addrinfo* %0) {
%2 = tail call i32 @orig_freeaddrinfo(%struct.addrinfo* %0)
ret void
}
/* Variables and functions */
long fread(char *, int, long, void *);
long dumb_stdfile_getnc(char *ptr, long n, void *f) {
  return fread(ptr, 1, n, f);
}


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

x86 assembly (clang, -O2):
<dumb_stdfile_getnc>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    $0x1,%esi
jmp    1030 <fread@plt>

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

LLVM IR (-O2):
define i64 @dumb_stdfile_getnc(i8* nocapture %0, i64 %1, i8* nocapture %2) {
%4 = tail call i64 @fread(i8* %0, i32 1, i64 %1, i8* %2)
ret i64 %4
}
int vde_chain_nm7_n_out(void) { return 3; }


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

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

LLVM IR (-O0):
define i32 @vde_chain_nm7_n_out() {
ret i32 3
}

LLVM IR (-O2):
define i32 @vde_chain_nm7_n_out() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ test_init(int, char **);
int /*<<< orphan*/ test_msg(char *, char *, int);
int main(int argc, char **argv) {
  test_init(argc, argv);
  test_msg("SKIP: %s:%d: "
           "Inotify not supported."
           "\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/kawamuray/criu/refs/heads/master/test/"
           "zdtm/live/static/inotify_system.c",
           388);
  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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <test_init@plt>
lea    0xeb7(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x184,%edx
call   1040 <test_msg@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <test_init@plt>
lea    0xed3(%rip),%rdi
lea    0xef1(%rip),%rsi
mov    $0x184,%edx
call   1040 <test_msg@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"SKIP: %s:%d: Inotify not supported.\0A\00"
@.str.1 = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kawamuray/criu/refs/heads/master/test/zdtm/live/static/inotify_system.c\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @test_init(i32 %6, i8** %7)
%9 = call i32 @test_msg(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str.1, i64 0, i64 0), i32 388)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"SKIP: %s:%d: Inotify not supported.\0A\00"
@.str.1 = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kawamuray/criu/refs/heads/master/test/zdtm/live/static/inotify_system.c\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @test_init(i32 %0, i8** %1)
%4 = tail call i32 @test_msg(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str.1, i64 0, i64 0), i32 388)
ret i32 0
}