xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x73() {
  Assert_real((isgraph(115)),
              "/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",
              580, ("isgraph should be 1 for s"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x73>:
push   %rbp
mov    %rsp,%rbp
mov    $0x73,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x244,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x73>:
push   %rax
mov    $0x73,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x244,%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 = [26 x i8] c"isgraph should be 1 for s\00"
define void @t_isgraph_0x73() {
%1 = call i32 @isgraph(i32 115)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 580, 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for s\00"
define void @t_isgraph_0x73() {
%1 = tail call i32 @isgraph(i32 115)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 580, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR4E_get(void) { return U_WMRCORENONE_get("U_WMR4E"); }


x86 assembly (clang, -O0):
<U_WMR4E_get>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <U_WMRCORENONE_get@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR4E\00"
define i32 @U_WMR4E_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR4E\00"
define i32 @U_WMR4E_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Video_MenuInit();
void ResetDefaults(void *unused) { Video_MenuInit(); }


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

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

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

LLVM IR (-O2):
define void @ResetDefaults(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @Video_MenuInit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EA_AW_32();
int /*<<< orphan*/ m68ki_jump(int /*<<< orphan*/);
void m68k_op_jmp_32_aw(void) { m68ki_jump(EA_AW_32()); }


x86 assembly (clang, -O0):
<m68k_op_jmp_32_aw>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <EA_AW_32@plt>
mov    %eax,%edi
call   1030 <m68ki_jump@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_jmp_32_aw>:
push   %rax
xor    %eax,%eax
call   1040 <EA_AW_32@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <m68ki_jump@plt>

LLVM IR (-O0):
define void @m68k_op_jmp_32_aw() {
%1 = call i32 (...) @EA_AW_32()
%2 = call i32 @m68ki_jump(i32 %1)
ret void
}

LLVM IR (-O2):
define void @m68k_op_jmp_32_aw() {
%1 = tail call i32 (...) @EA_AW_32()
%2 = tail call i32 @m68ki_jump(i32 %1)
ret void
}
/* Type definitions */
struct Node {
  int dummy;
};

/* Variables and functions */
struct Node *internalAddLeft(struct Node *);
struct Node *addLeft(struct Node *node) {
  struct Node *newChild = internalAddLeft(node);
  return newChild;
}


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

x86 assembly (clang, -O2):
<addLeft>:
jmp    1030 <internalAddLeft@plt>

LLVM IR (-O0):
%struct.Node = type { i32 }
define %struct.Node* @addLeft(%struct.Node* %0) {
%2 = alloca %struct.Node*
%3 = alloca %struct.Node*
store %struct.Node* %0, %struct.Node** %2
%4 = load %struct.Node*, %struct.Node** %2
%5 = call %struct.Node* @internalAddLeft(%struct.Node* %4)
store %struct.Node* %5, %struct.Node** %3
%6 = load %struct.Node*, %struct.Node** %3
ret %struct.Node* %6
}

LLVM IR (-O2):
%struct.Node = type { i32 }
define %struct.Node* @addLeft(%struct.Node* %0) {
%2 = tail call %struct.Node* @internalAddLeft(%struct.Node* %0)
ret %struct.Node* %2
}
/* Variables and functions */
int /*<<< orphan*/ frint(int *, int);
int /*<<< orphan*/ marks(int *, int);
int main() {
  int point[5];
  marks(point, 5);
  frint(point, 5);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1030 <marks@plt>
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <frint@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <marks@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <frint@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%4 = call i32 @marks(i32* %3, i32 5)
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%6 = call i32 @frint(i32* %5, i32 5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @marks(i32* %3, i32 5)
%5 = call i32 @frint(i32* %3, i32 5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
char *strrchr(char *, char);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *ctime_now(void) {
  time_t now = time(NULL);
  char *now_str = ctime(&now);
  char *ptr = strrchr(now_str, '\n');
  if (ptr != NULL) {
    *ptr = '\0';
  }
  return now_str;
}


x86 assembly (clang, -O0):
<ctime_now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1175 <ctime_now+0x45>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctime_now>:
push   %rbx
sub    $0x10,%rsp
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <ctime@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0xa,%esi
call   1040 <strrchr@plt>
test   %rax,%rax
je     1162 <ctime_now+0x32>
movb   $0x0,(%rax)
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @ctime_now() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = call i32 @time(i32* null)
store i32 %4, i32* %1
%5 = call i8* @ctime(i32* %1)
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @strrchr(i8* %6, i8 signext 10)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = load i8*, i8** %3
store i8 0, i8* %11
br label %12
12: ; preds = %10, %0
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
define i8* @ctime_now() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call i8* @ctime(i32* %1)
%5 = call i8* @strrchr(i8* dereferenceable(1) %4, i8 signext 10)
%6 = icmp eq i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %0
store i8 0, i8* %5
br label %8
8: ; preds = %7, %0
ret i8* %4
}
/* Variables and functions */
char getchar();
void getch() {
  char ch;
  ch = getchar();
  ch = getchar();
}


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

x86 assembly (clang, -O2):
<getch>:
push   %rax
xor    %eax,%eax
call   1030 <getchar@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <getchar@plt>

LLVM IR (-O0):
define void @getch() {
%1 = alloca i8
%2 = call signext i8 (...) @getchar()
store i8 %2, i8* %1
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %1
ret void
}

LLVM IR (-O2):
define void @getch() {
%1 = tail call signext i8 (...) @getchar()
%2 = tail call signext i8 (...) @getchar()
ret void
}
int search(int arr[], int strt, int end, int value) {
  int i;
  for (i = strt; i <= end; i++) {
    if (arr[i] == value)
      break;
  }
  return i;
}


x86 assembly (clang, -O0):
<search>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     114f <search+0x4f>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
jne    113c <search+0x3c>
jmp    114f <search+0x4f>
jmp    1141 <search+0x41>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1117 <search+0x17>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<search>:
mov    %esi,%eax
cmp    %edx,%esi
jg     1121 <search+0x21>
movslq %eax,%rsi
add    $0x1,%edx
lea    (%rdi,%rsi,4),%rsi
cmp    %ecx,(%rsi)
je     1121 <search+0x21>
add    $0x1,%eax
add    $0x4,%rsi
cmp    %eax,%edx
jne    1110 <search+0x10>
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @search(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %1, %2
br i1 %5, label %20, label %6
6: ; preds = %4
%7 = sext i32 %1 to i64
%8 = add i32 %2, 1
br label %9
9: ; preds = %6, %14
%10 = phi i64 [ %7, %6 ], [ %15, %14 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %3
br i1 %13, label %18, label %14
14: ; preds = %9
%15 = add nsw i64 %10, 1
%16 = trunc i64 %15 to i32
%17 = icmp eq i32 %8, %16
br i1 %17, label %20, label %9
18: ; preds = %9
%19 = trunc i64 %10 to i32
br label %20
20: ; preds = %14, %18, %4
%21 = phi i32 [ %1, %4 ], [ %19, %18 ], [ %8, %14 ]
ret i32 %21
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int clear_quaddobl_witsols(void) {
  int *a, *b;
  double *c;
  int fail = _ada_use_c2phc4c(859, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<clear_quaddobl_witsols>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x35b,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_quaddobl_witsols>:
mov    $0x35b,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @clear_quaddobl_witsols() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca double*
%4 = alloca i32
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %3
%8 = call i32 @_ada_use_c2phc4c(i32 859, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @clear_quaddobl_witsols() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 859, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ cat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char **argv) {
  char Nome1[50];
  char Nome2[50];
  strcpy(Nome1, argv[1]);
  strcpy(Nome2, argv[2]);
  cat(Nome1, Nome2);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
lea    -0x90(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <strcpy@plt>
lea    -0x50(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1040 <cat@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x78,%rsp
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
lea    0x40(%rsp),%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
mov    0x10(%rbx),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <cat@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [50 x i8]
%7 = alloca [50 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @strcpy(i8* %8, i8* %11)
%13 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 2
%16 = load i8*, i8** %15
%17 = call i32 @strcpy(i8* %13, i8* %16)
%18 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%19 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%20 = call i32 @cat(i8* %18, i8* %19)
%21 = load i32, i32* @EXIT_SUCCESS
ret i32 %21
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [50 x i8]
%4 = alloca [50 x i8]
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @strcpy(i8* %5, i8* %8)
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = call i32 @strcpy(i8* %6, i8* %11)
%13 = call i32 @cat(i8* %5, i8* %6)
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}
float sub(float left, float right) { return left - right; }


x86 assembly (clang, -O0):
<sub>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub>:
subss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @sub(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fsub float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @sub(float %0, float %1) {
%3 = fsub float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void *helloWorldThreaded() {
  for (int i = 0; i < 5; i++) {
    printf("Hello, World!\n");
    sleep(3);
  }
}


x86 assembly (clang, -O0):
<helloWorldThreaded>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    115d <helloWorldThreaded+0x3d>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3,%edi
call   1040 <sleep@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112f <helloWorldThreaded+0xf>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helloWorldThreaded>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
pop    %rbx
jmp    1040 <sleep@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
define i8* @helloWorldThreaded() {
%1 = alloca i8*
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @sleep(i32 3)
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
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, World!\00"
define noalias i8* @helloWorldThreaded() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @sleep(i32 3)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @sleep(i32 3)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @sleep(i32 3)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 @sleep(i32 3)
ret i8* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
void fopen_sandbox_evasion(char *arg1) {
  0;
  0;
  FILE *fp = fopen(arg1, "rb");
  if (fp == NULL) {
    exit(0);
  }
  fclose(fp);
}


x86 assembly (clang, -O0):
<fopen_sandbox_evasion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1162 <fopen_sandbox_evasion+0x32>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fopen_sandbox_evasion>:
push   %rax
lea    0xec8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     114b <fopen_sandbox_evasion+0x1b>
mov    %rax,%rdi
pop    %rax
jmp    1030 <fclose@plt>
xor    %edi,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define void @fopen_sandbox_evasion(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %1
%7 = tail call i32 @fclose(i32* %2)
ret void
}
void RTCircBufAcquireReadBlock(void) {}


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

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

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

LLVM IR (-O2):
define void @RTCircBufAcquireReadBlock() {
ret void
}
/* Variables and functions */
size_t get_terminal_width(int fd) {
  size_t width = 80;
  return width;
}


x86 assembly (clang, -O0):
<get_terminal_width>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x50,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @get_terminal_width(i32 %0) {
ret i64 80
}
/* Variables and functions */
void *allocate(unsigned long);
int /*<<< orphan*/ memcpy(void *, void *, unsigned long);
void *duplicate(void *original, unsigned long len) {
  void *p = allocate(len + 1);
  memcpy(p, original, len);
  return p;
}


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

x86 assembly (clang, -O2):
<duplicate>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
lea    0x1(%rsi),%rdi
call   1040 <allocate@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @duplicate(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = add i64 %6, 1
%8 = call i8* @allocate(i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %3
%11 = load i64, i64* %4
%12 = call i32 @memcpy(i8* %9, i8* %10, i64 %11)
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
define i8* @duplicate(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i8* @allocate(i64 %3)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %1)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ stop_pomelo();
void sig_handler(int n) {
  (void)(n);
  stop_pomelo();
}


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

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

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

LLVM IR (-O2):
define void @sig_handler(i32 %0) {
%2 = tail call i32 (...) @stop_pomelo()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int tlib_export(int);
int main() {
  printf("The answer is: %d\n", tlib_export(42));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2a,%edi
call   1040 <tlib_export@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):
<main>:
push   %rax
mov    $0x2a,%edi
call   1040 <tlib_export@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"The answer is: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @tlib_export(i32 42)
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"The answer is: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @tlib_export(i32 42)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ USBD_CLR_SE0();
void USBD_Start(void) { USBD_CLR_SE0(); }


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

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

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

LLVM IR (-O2):
define void @USBD_Start() {
%1 = tail call i32 (...) @USBD_CLR_SE0()
ret void
}
/* Variables and functions */
int factor(int);
int ei_isprime(int n) { return (n == factor(n)); }


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

x86 assembly (clang, -O2):
<ei_isprime>:
push   %rbx
mov    %edi,%ebx
call   1030 <factor@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ei_isprime(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @factor(i32 %4)
%6 = icmp eq i32 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @ei_isprime(i32 %0) {
%2 = tail call i32 @factor(i32 %0)
%3 = icmp eq i32 %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
scalar_t__ rte_arch_bswap32(int);
uint64_t rte_arch_bswap64(uint64_t x) {
  uint64_t ret = 0;
  ret |= ((uint64_t)rte_arch_bswap32(x & 0xffffffffUL) << 32);
  ret |= ((uint64_t)rte_arch_bswap32((x >> 32) & 0xffffffffUL));
  return ret;
}


x86 assembly (clang, -O0):
<rte_arch_bswap64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xffffffff,%rcx
and    %rcx,%rax
mov    %eax,%edi
call   1030 <rte_arch_bswap32@plt>
mov    $0x20,%ecx
shl    %cl,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
cltq
movabs $0xffffffff,%rcx
and    %rcx,%rax
mov    %eax,%edi
call   1030 <rte_arch_bswap32@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rte_arch_bswap64>:
push   %rax
call   1030 <rte_arch_bswap32@plt>
pop    %rax
jmp    1030 <rte_arch_bswap32@plt>

LLVM IR (-O0):
define i32 @rte_arch_bswap64(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = and i64 %5, 4294967295
%7 = trunc i64 %6 to i32
%8 = call i64 @rte_arch_bswap32(i32 %7)
%9 = trunc i64 %8 to i32
%10 = shl i32 %9, 32
%11 = load i32, i32* %3
%12 = or i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = ashr i32 %13, 32
%15 = sext i32 %14 to i64
%16 = and i64 %15, 4294967295
%17 = trunc i64 %16 to i32
%18 = call i64 @rte_arch_bswap32(i32 %17)
%19 = trunc i64 %18 to i32
%20 = load i32, i32* %3
%21 = or i32 %20, %19
store i32 %21, i32* %3
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @rte_arch_bswap64(i32 %0) {
%2 = tail call i64 @rte_arch_bswap32(i32 %0)
%3 = tail call i64 @rte_arch_bswap32(i32 poison)
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ allocate_arrays();
int /*<<< orphan*/ compute_dir();
int /*<<< orphan*/ compute_first();
int /*<<< orphan*/ compute_follow();
int /*<<< orphan*/ compute_transparent();
run_ana() {
  allocate_arrays();
  compute_transparent();
  compute_first();
  compute_follow();
  compute_dir();
}


x86 assembly (clang, -O0):
<run_ana>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1070 <allocate_arrays@plt>
mov    $0x0,%al
call   1030 <compute_transparent@plt>
mov    $0x0,%al
call   1040 <compute_first@plt>
mov    $0x0,%al
call   1060 <compute_follow@plt>
mov    $0x0,%al
call   1050 <compute_dir@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_ana>:
push   %rax
xor    %eax,%eax
call   1070 <allocate_arrays@plt>
xor    %eax,%eax
call   1030 <compute_transparent@plt>
xor    %eax,%eax
call   1040 <compute_first@plt>
xor    %eax,%eax
call   1060 <compute_follow@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <compute_dir@plt>

LLVM IR (-O0):
define i32 @run_ana() {
%1 = alloca i32
%2 = call i32 (...) @allocate_arrays()
%3 = call i32 (...) @compute_transparent()
%4 = call i32 (...) @compute_first()
%5 = call i32 (...) @compute_follow()
%6 = call i32 (...) @compute_dir()
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @run_ana() {
%1 = tail call i32 (...) @allocate_arrays()
%2 = tail call i32 (...) @compute_transparent()
%3 = tail call i32 (...) @compute_first()
%4 = tail call i32 (...) @compute_follow()
%5 = tail call i32 (...) @compute_dir()
ret i32 undef
}
void RTEnvSet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTEnvSet() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
void *test_malloc(int);
void *test_malloc2(int num) {
  if (num <= 0) {
    return (void *)malloc(8);
  } else {
    return test_malloc(num - 1);
  }
}


x86 assembly (clang, -O0):
<test_malloc2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     1148 <test_malloc2+0x28>
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
jmp    1157 <test_malloc2+0x37>
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <test_malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_malloc2>:
test   %edi,%edi
jle    112c <test_malloc2+0xc>
add    $0xffffffff,%edi
jmp    1030 <test_malloc@plt>
mov    $0x8,%edi
jmp    1040 <malloc@plt>

LLVM IR (-O0):
define i8* @test_malloc2(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i64 @malloc(i32 8)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %2
br label %13
9: ; preds = %1
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 1
%12 = call i8* @test_malloc(i32 %11)
store i8* %12, i8** %2
br label %13
13: ; preds = %9, %6
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
define i8* @test_malloc2(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i64 @malloc(i32 8)
%5 = inttoptr i64 %4 to i8*
br label %9
6: ; preds = %1
%7 = add nsw i32 %0, -1
%8 = tail call i8* @test_malloc(i32 %7)
br label %9
9: ; preds = %6, %3
%10 = phi i8* [ %5, %3 ], [ %8, %6 ]
ret i8* %10
}
void ccuStopSlices(const unsigned int slices) {
  (*((volatile unsigned int *const)(0x48040000 + 0x0008))) = slices;
}


x86 assembly (clang, -O0):
<ccuStopSlices>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x48040008,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccuStopSlices>:
mov    %edi,0x48040008
ret

LLVM IR (-O0):
define void @ccuStopSlices(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store volatile i32 %3, i32* inttoptr (i64 1208221704 to i32*)
ret void
}

LLVM IR (-O2):
define void @ccuStopSlices(i32 %0) {
store volatile i32 %0, i32* inttoptr (i64 1208221704 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ p1();
int /*<<< orphan*/ printf(char *);
void p2() {
  p1();
  printf("p2\n");
}


x86 assembly (clang, -O0):
<p2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <p1@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<p2>:
push   %rax
xor    %eax,%eax
call   1040 <p1@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"p2\0A\00"
define void @p2() {
%1 = call i32 (...) @p1()
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [3 x i8] c"p2\00"
define void @p2() {
%1 = tail call i32 (...) @p1()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ trim_start(char **);
char *parse_connector(char **line) {
  trim_start(line);
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @parse_connector(i8** %0) {
%2 = tail call i32 @trim_start(i8** %0)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ strlcat(char *, char *, size_t const);
size_t strlen(char *);
size_t tpl_print_esc_char(char *buf, const size_t size) {
  assert(buf != NULL);
  char tmp[2] = {'$', 0};
  strlcat(buf, tmp, size);
  return strlen(tmp);
}


x86 assembly (clang, -O0):
<tpl_print_esc_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    0xea7(%rip),%ax
mov    %ax,-0x12(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x12(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <strlcat@plt>
lea    -0x12(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tpl_print_esc_char>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1050 <assert@plt>
movw   $0x24,0xe(%rsp)
lea    0xe(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <strlcat@plt>
mov    %r15,%rdi
call   1040 <strlen@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.tpl_print_esc_char.tmp = [2 x i8] c"$\00"
define i64 @tpl_print_esc_char(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca [2 x i8]
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = bitcast [2 x i8]* %5 to i8*
%11 = load i8*, i8** %3
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%13 = load i64, i64* %4
%14 = call i32 @strlcat(i8* %11, i8* %12, i64 %13)
%15 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%16 = call i64 @strlen(i8* %15)
ret i64 %16
}

LLVM IR (-O2):
define i64 @tpl_print_esc_char(i8* %0, i64 %1) {
%3 = alloca i16
%4 = icmp ne i8* %0, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = bitcast i16* %3 to i8*
store i16 36, i16* %3
%8 = call i32 @strlcat(i8* %0, i8* %7, i64 %1)
%9 = call i64 @strlen(i8* %7)
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  do {
    scanf("%d", &a);
    if (a != 42)
      printf("\n%d", a);
  } while (a != 42);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x2a,-0x8(%rbp)
je     1158 <main+0x38>
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
jmp    115d <main+0x3d>
cmpl   $0x2a,-0x8(%rbp)
jne    112f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed1(%rip),%r14
lea    0xc(%rsp),%rbx
lea    0xec4(%rip),%r15
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
cmp    $0x2a,%esi
je     1163 <main+0x43>
mov    %r15,%rdi
call   1030 <printf@plt>
cmpl   $0x2a,0xc(%rsp)
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %7, %0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 42
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 42
br i1 %10, label %11, label %3
11: ; preds = %3, %7
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ api_end();
int /*<<< orphan*/ api_putchar(char);
void HariMain(void) {
  char a[100];
  a[10] = 'A';
  api_putchar(a[10]);
  a[100] = 'B';
  api_putchar(a[100]);
  a[123] = 'C';
  api_putchar(a[123]);
  api_end();
}


x86 assembly (clang, -O0):
<HariMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movb   $0x41,-0x66(%rbp)
movsbl -0x66(%rbp),%edi
call   1040 <api_putchar@plt>
movb   $0x42,-0xc(%rbp)
movsbl -0xc(%rbp),%edi
call   1040 <api_putchar@plt>
movb   $0x43,0xb(%rbp)
movsbl 0xb(%rbp),%edi
call   1040 <api_putchar@plt>
mov    $0x0,%al
call   1030 <api_end@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HariMain>:
push   %rax
mov    $0x41,%edi
call   1040 <api_putchar@plt>
xor    %edi,%edi
call   1040 <api_putchar@plt>
xor    %edi,%edi
call   1040 <api_putchar@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <api_end@plt>

LLVM IR (-O0):
define void @HariMain() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 10
store i8 65, i8* %2
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 10
%4 = load i8, i8* %3
%5 = call i32 @api_putchar(i8 signext %4)
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 100
store i8 66, i8* %6
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 100
%8 = load i8, i8* %7
%9 = call i32 @api_putchar(i8 signext %8)
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 123
store i8 67, i8* %10
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 123
%12 = load i8, i8* %11
%13 = call i32 @api_putchar(i8 signext %12)
%14 = call i32 (...) @api_end()
ret void
}

LLVM IR (-O2):
define void @HariMain() {
%1 = tail call i32 @api_putchar(i8 signext 65)
%2 = tail call i32 @api_putchar(i8 signext poison)
%3 = tail call i32 @api_putchar(i8 signext poison)
%4 = tail call i32 (...) @api_end()
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ cmd;

/* Variables and functions */
int /*<<< orphan*/ spi_transfer(int *, int);
uint8_t read_fsr() {
  uint8_t cmd[2];
  cmd[0] = 0x05;
  cmd[1] = 0x00;
  spi_transfer(cmd, sizeof(cmd));
  return cmd[1];
}


x86 assembly (clang, -O0):
<read_fsr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x8,%esi
call   1030 <spi_transfer@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_fsr>:
push   %rax
movq   $0x5,(%rsp)
mov    %rsp,%rdi
mov    $0x8,%esi
call   1030 <spi_transfer@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @read_fsr() {
%1 = alloca [2 x i32]
%2 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
store i32 5, i32* %2
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
store i32 0, i32* %3
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%5 = call i32 @spi_transfer(i32* %4, i32 8)
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @read_fsr() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
store i32 5, i32* %3
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
store i32 0, i32* %4
%5 = call i32 @spi_transfer(i32* %3, i32 8)
%6 = load i32, i32* %4
ret i32 %6
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
struct TreeNode *buildBST(int *, int /*<<< orphan*/, int);
struct TreeNode *sortedArrayToBST(int *nums, int numsSize) {
  return buildBST(nums, 0, numsSize - 1);
}


x86 assembly (clang, -O0):
<sortedArrayToBST>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <buildBST@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sortedArrayToBST>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <buildBST@plt>

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define %struct.TreeNode* @sortedArrayToBST(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
%8 = call %struct.TreeNode* @buildBST(i32* %5, i32 0, i32 %7)
ret %struct.TreeNode* %8
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define %struct.TreeNode* @sortedArrayToBST(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call %struct.TreeNode* @buildBST(i32* %0, i32 0, i32 %3)
ret %struct.TreeNode* %4
}
/* Type definitions */
struct stat {
  int st_size;
};
typedef int off_t;

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
off_t _q_filesize(const char *filepath) {
  struct stat finfo;
  if (stat(filepath, &finfo) < 0)
    return -1;
  return finfo.st_size;
}


x86 assembly (clang, -O0):
<_q_filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    113f <_q_filesize+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1145 <_q_filesize+0x35>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_q_filesize>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
js     1129 <_q_filesize+0x19>
mov    (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @_q_filesize(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
void q931_get_number(unsigned char *num, int maxlen, unsigned char *src,
                     int len) {
  if ((len < 0) || (len > maxlen - 1)) {
    num[0] = 0;
    return;
  }
  memcpy(num, src, len);
  num[len] = 0;
}


x86 assembly (clang, -O0):
<q931_get_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     1141 <q931_get_number+0x31>
mov    -0x1c(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jle    114d <q931_get_number+0x3d>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    1169 <q931_get_number+0x59>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q931_get_number>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %ecx,%ecx
js     1132 <q931_get_number+0x22>
mov    %ecx,%ebp
cmp    %ecx,%esi
jle    1132 <q931_get_number+0x22>
mov    %rbx,%rdi
mov    %rdx,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
mov    %ebp,%eax
add    %rax,%rbx
movb   $0x0,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @q931_get_number(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = icmp sgt i32 %3, -1
%6 = icmp sgt i32 %1, %3
%7 = and i1 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = tail call i32 @memcpy(i8* %0, i8* %2, i32 %3)
%10 = zext i32 %3 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
br label %12
12: ; preds = %4, %8
%13 = phi i8* [ %11, %8 ], [ %0, %4 ]
store i8 0, i8* %13
ret void
}