xunge/DecIR huggingface dataset:
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("-- testing clock_gettime\n");
  struct timespec ts;
  clock_gettime(CLOCK_REALTIME, &ts);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1040 <clock_gettime@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@.str = [26 x i8] c"-- testing clock_gettime\0A\00"
@CLOCK_REALTIME = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timespec
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @CLOCK_REALTIME
%5 = call i32 @clock_gettime(i32 %4, %struct.timespec* %2)
ret i32 0
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
@str = [25 x i8] c"-- testing clock_gettime\00"
define i32 @main() {
%1 = alloca %struct.timespec
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%3 = bitcast %struct.timespec* %1 to i8*
%4 = load i32, i32* @CLOCK_REALTIME
%5 = call i32 @clock_gettime(i32 %4, %struct.timespec* %1)
ret i32 0
}
void f_complete() {
  struct S1 {
    char j;
  };
  if (1) {
    struct S1 {
      char i;
      char j;
    };
  }
}


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

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

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

LLVM IR (-O2):
define void @f_complete() {
ret void
}
/* Type definitions */
struct forth_instance {
  int dummy;
};

/* Variables and functions */
scalar_t__ st_pop(struct forth_instance *);
int /*<<< orphan*/ st_push(struct forth_instance *, uintptr_t);
void ulshift(struct forth_instance *fi) {
  uintptr_t tp;
  tp = (uintptr_t)st_pop(fi);
  st_push(fi, (uintptr_t)st_pop(fi) << tp);
}


x86 assembly (clang, -O0):
<ulshift>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <st_pop@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <st_pop@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rsi
mov    -0x10(%rbp),%rcx
shl    %cl,%rsi
call   1040 <st_push@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulshift>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <st_pop@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <st_pop@plt>
mov    %r14d,%ecx
shl    %cl,%rax
mov    %rbx,%rdi
mov    %rax,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <st_push@plt>

LLVM IR (-O0):
%struct.forth_instance = type { i32 }
define void @ulshift(%struct.forth_instance* %0) {
%2 = alloca %struct.forth_instance*
%3 = alloca i64
store %struct.forth_instance* %0, %struct.forth_instance** %2
%4 = load %struct.forth_instance*, %struct.forth_instance** %2
%5 = call i64 @st_pop(%struct.forth_instance* %4)
store i64 %5, i64* %3
%6 = load %struct.forth_instance*, %struct.forth_instance** %2
%7 = load %struct.forth_instance*, %struct.forth_instance** %2
%8 = call i64 @st_pop(%struct.forth_instance* %7)
%9 = load i64, i64* %3
%10 = shl i64 %8, %9
%11 = call i32 @st_push(%struct.forth_instance* %6, i64 %10)
ret void
}

LLVM IR (-O2):
%struct.forth_instance = type { i32 }
define void @ulshift(%struct.forth_instance* %0) {
%2 = tail call i64 @st_pop(%struct.forth_instance* %0)
%3 = tail call i64 @st_pop(%struct.forth_instance* %0)
%4 = shl i64 %3, %2
%5 = tail call i32 @st_push(%struct.forth_instance* %0, i64 %4)
ret void
}
/* Type definitions */
struct position {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ map3d_position_double(struct position *, double *, double *,
                                         char const *);
void map3d_position(struct position *pos, int *x, int *y, const char *what) {
  double xx, yy;
  map3d_position_double(pos, &xx, &yy, what);
  *x = xx;
  *y = yy;
}


x86 assembly (clang, -O0):
<map3d_position>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1030 <map3d_position_double@plt>
cvttsd2si -0x28(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
cvttsd2si -0x30(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map3d_position>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <map3d_position_double@plt>
cvttsd2si 0x10(%rsp),%eax
mov    %eax,(%rbx)
cvttsd2si 0x8(%rsp),%eax
mov    %eax,(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.position = type { i32 }
define void @map3d_position(%struct.position* %0, i32* %1, i32* %2, i8* %3) {
%5 = alloca %struct.position*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca double
%10 = alloca double
store %struct.position* %0, %struct.position** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%11 = load %struct.position*, %struct.position** %5
%12 = load i8*, i8** %8
%13 = call i32 @map3d_position_double(%struct.position* %11, double* %9, double* %10, i8* %12)
%14 = load double, double* %9
%15 = fptosi double %14 to i32
%16 = load i32*, i32** %6
store i32 %15, i32* %16
%17 = load double, double* %10
%18 = fptosi double %17 to i32
%19 = load i32*, i32** %7
store i32 %18, i32* %19
ret void
}

LLVM IR (-O2):
%struct.position = type { i32 }
define void @map3d_position(%struct.position* %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i8* %3) {
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %5 to i8*
%8 = bitcast double* %6 to i8*
%9 = call i32 @map3d_position_double(%struct.position* %0, double* %5, double* %6, i8* %3)
%10 = load double, double* %5
%11 = fptosi double %10 to i32
store i32 %11, i32* %1
%12 = load double, double* %6
%13 = fptosi double %12 to i32
store i32 %13, i32* %2
ret void
}
/* Type definitions */
struct ioq_fd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ioq_fd_rewait(struct ioq_fd *, int /*<<< orphan*/);
void ioq_fd_cancel(struct ioq_fd *f) { ioq_fd_rewait(f, 0); }


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

x86 assembly (clang, -O2):
<ioq_fd_cancel>:
xor    %esi,%esi
jmp    1030 <ioq_fd_rewait@plt>

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

LLVM IR (-O2):
%struct.ioq_fd = type { i32 }
define void @ioq_fd_cancel(%struct.ioq_fd* %0) {
%2 = tail call i32 @ioq_fd_rewait(%struct.ioq_fd* %0, i32 0)
ret void
}
/* Variables and functions */
scalar_t__ sio_read(char *, int);
int getch() {
  char buf;
  while (sio_read(&buf, 1) == 0)
    ;
  return buf & 0xff;
}


x86 assembly (clang, -O0):
<getch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
call   1030 <sio_read@plt>
cmp    $0x0,%rax
jne    1135 <getch+0x25>
jmp    1118 <getch+0x8>
movsbl -0x1(%rbp),%eax
and    $0xff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getch>:
push   %rbx
sub    $0x10,%rsp
lea    0xf(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <sio_read@plt>
test   %rax,%rax
je     1120 <getch+0x10>
movzbl 0xf(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getch() {
%1 = alloca i8
br label %2
2: ; preds = %5, %0
%3 = call i64 @sio_read(i8* %1, i32 1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
%9 = and i32 %8, 255
ret i32 %9
}

LLVM IR (-O2):
define i32 @getch() {
%1 = alloca i8
br label %2
2: ; preds = %2, %0
%3 = call i64 @sio_read(i8* %1, i32 1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %2, label %5
5: ; preds = %2
%6 = load i8, i8* %1
%7 = zext i8 %6 to i32
ret i32 %7
}
/* Variables and functions */
int fact(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int n;
  scanf("%d", &n);
  printf("%d\n", fact(n));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1040 <fact@plt>
mov    %eax,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <fact@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @fact(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void signal_handler_func(int signal_num) {
  printf("[SERVER] "
         "catch signal: %d\n",
         signal_num);
}


x86 assembly (clang, -O0):
<signal_handler_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_handler_func>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"[SERVER] catch signal: %d\0A\00"
define void @signal_handler_func(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"[SERVER] catch signal: %d\0A\00"
define void @signal_handler_func(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int Cyc_block_comment_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_block_comment(struct Cyc_Lexing_lexbuf *lexbuf) {
  int _T0;
  _T0 = Cyc_block_comment_rec(lexbuf, 18);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_block_comment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x12,%esi
call   1030 <Cyc_block_comment_rec@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_block_comment>:
mov    $0x12,%esi
jmp    1030 <Cyc_block_comment_rec@plt>

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

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_block_comment(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_block_comment_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 18)
ret i32 %2
}
/* Variables and functions */
scalar_t__ foo(int *);
unsigned int tr1(int array[], unsigned int n) {
  int sum = 0;
  unsigned int x;
  for (x = 0; x < n; ++x)
    sum += foo(&array[x]);
  return sum;
}


x86 assembly (clang, -O0):
<tr1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1167 <tr1+0x57>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%eax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <foo@plt>
mov    %rax,%rcx
movslq -0x10(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <tr1+0x1d>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tr1>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
je     1137 <tr1+0x27>
mov    %rdi,%rbx
mov    %esi,%ebp
xor    %r14d,%r14d
mov    %rbx,%rdi
call   1030 <foo@plt>
add    %eax,%r14d
add    $0x4,%rbx
add    $0xffffffffffffffff,%rbp
jne    1120 <tr1+0x10>
jmp    113a <tr1+0x2a>
xor    %r14d,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @tr1(i32* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %15, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %13, %6 ]
%8 = phi i32 [ 0, %4 ], [ %12, %6 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %7
%10 = tail call i64 @foo(i32* %9)
%11 = trunc i64 %10 to i32
%12 = add i32 %8, %11
%13 = add nuw nsw i64 %7, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %15, label %6
15: ; preds = %6, %2
%16 = phi i32 [ 0, %2 ], [ %12, %6 ]
ret i32 %16
}
void _ZN3FSM4VirtEv(struct l_class_OC_FSM *llvm_cbe_this) {
  struct l_class_OC_FSM *llvm_cbe_this_2e_addr;
  struct l_class_OC_FSM *llvm_cbe_this1;
  *(&llvm_cbe_this_2e_addr) = llvm_cbe_this;
  llvm_cbe_this1 = *(&llvm_cbe_this_2e_addr);
  return;
}


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

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

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

LLVM IR (-O2):
%struct.l_class_OC_FSM = type opaque
define void @_ZN3FSM4VirtEv(%struct.l_class_OC_FSM* nocapture %0) {
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
__attribute__((visibility("default"))) int _gettimeofday(struct timeval *tp,
                                                         void *tzp) {
  (void)tzp;
  if (tp) {
    tp->tv_sec = 0;
    tp->tv_usec = 0;
  } else {
    errno = EINVAL;
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<_gettimeofday>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1133 <_gettimeofday+0x33>
mov    -0x10(%rbp),%rax
movq   $0x0,0x8(%rax)
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
jmp    1151 <_gettimeofday+0x51>
mov    0x2e9e(%rip),%rax
mov    (%rax),%ecx
mov    0x2e9d(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1158 <_gettimeofday+0x58>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gettimeofday>:
test   %rdi,%rdi
je     110e <_gettimeofday+0xe>
xorps  %xmm0,%xmm0
movups %xmm0,(%rdi)
xor    %eax,%eax
ret
mov    0x2ec3(%rip),%rax
mov    (%rax),%eax
mov    0x2ec2(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
@EINVAL = global i32 0
@errno = global i32 0
define i32 @_gettimeofday(%struct.timeval* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.timeval*
%5 = alloca i8*
store %struct.timeval* %0, %struct.timeval** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = load %struct.timeval*, %struct.timeval** %4
%8 = icmp ne %struct.timeval* %7, null
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load %struct.timeval*, %struct.timeval** %4
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %10, i32 0, i32 1
store i64 0, i64* %11
%12 = load %struct.timeval*, %struct.timeval** %4
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 0
store i64 0, i64* %13
br label %16
14: ; preds = %2
%15 = load i32, i32* @EINVAL
store i32 %15, i32* @errno
store i32 -1, i32* %3
br label %17
16: ; preds = %9
store i32 0, i32* %3
br label %17
17: ; preds = %16, %14
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
@EINVAL = global i32 0
@errno = global i32 0
define i32 @_gettimeofday(%struct.timeval* writeonly %0, i8* nocapture readnone %1) {
%3 = icmp eq %struct.timeval* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = bitcast %struct.timeval* %0 to i8*
br label %8
6: ; preds = %2
%7 = load i32, i32* @EINVAL
store i32 %7, i32* @errno
br label %8
8: ; preds = %4, %6
%9 = phi i32 [ 0, %4 ], [ -1, %6 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ slick_fatal(char *, char const *, int const);
void slick_assert(const int v, const char *file, const int line) {
  if (!v) {
    slick_fatal("slick_assert(): failed at %s:%d", file, line);
  }
}


x86 assembly (clang, -O0):
<slick_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    113f <slick_assert+0x2f>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xec6(%rip),%rdi
call   1030 <slick_fatal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slick_assert>:
test   %edi,%edi
je     1115 <slick_assert+0x5>
ret
lea    0xee4(%rip),%rdi
jmp    1030 <slick_fatal@plt>

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

LLVM IR (-O2):
@.str = [32 x i8] c"slick_assert(): failed at %s:%d\00"
define void @slick_assert(i32 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @slick_fatal(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
br label %7
7: ; preds = %5, %3
ret void
}
int jac_chain_nm3_work(int *sz_arg, int *sz_res, int *sz_iw, int *sz_w) {
  if (sz_arg)
    *sz_arg = 2;
  if (sz_res)
    *sz_res = 2;
  if (sz_iw)
    *sz_iw = 0;
  if (sz_w)
    *sz_w = 19;
  return 0;
}


x86 assembly (clang, -O0):
<jac_chain_nm3_work>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <jac_chain_nm3_work+0x29>
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <jac_chain_nm3_work+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <jac_chain_nm3_work+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <jac_chain_nm3_work+0x68>
mov    -0x20(%rbp),%rax
movl   $0x13,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm3_work>:
test   %rdi,%rdi
je     110b <jac_chain_nm3_work+0xb>
movl   $0x2,(%rdi)
test   %rsi,%rsi
je     1116 <jac_chain_nm3_work+0x16>
movl   $0x2,(%rsi)
test   %rdx,%rdx
je     1121 <jac_chain_nm3_work+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <jac_chain_nm3_work+0x2c>
movl   $0x13,(%rcx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @jac_chain_nm3_work(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 2, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 2, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 19, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void o_printer(char *string, int begin, int end) {
  int i;
  for (i = begin; i <= end; ++i)
    printf("%c", string[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<o_printer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     115c <o_printer+0x4c>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1128 <o_printer+0x18>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<o_printer>:
push   %r15
push   %r14
push   %rbx
cmp    %edx,%esi
jg     1143 <o_printer+0x33>
mov    %edx,%r15d
mov    %rdi,%r14
movslq %esi,%rax
add    %rax,%r14
sub    %esi,%r15d
add    $0x1,%r15d
xor    %ebx,%ebx
xchg   %ax,%ax
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <o_printer+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @o_printer(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
store i32 %8, i32* %7
br label %9
9: ; preds = %21, %3
%10 = load i32, i32* %7
%11 = load i32, i32* %6
%12 = icmp sle i32 %10, %11
br i1 %12, label %13, label %24
13: ; preds = %9
%14 = load i8*, i8** %4
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %13
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
br label %9
24: ; preds = %9
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @o_printer(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, %2
br i1 %4, label %17, label %5
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = add i32 %2, 1
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %6, %5 ], [ %14, %8 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = tail call i32 @putchar(i32 %12)
%14 = add nsw i64 %9, 1
%15 = trunc i64 %14 to i32
%16 = icmp eq i32 %7, %15
br i1 %16, label %17, label %8
17: ; preds = %8, %3
%18 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(int argc, char *argv[]) {
  int x = 20, y = 10, z = 0;
  z = ((++x) > (y++)) ? (++x) : (y++);
  ;
  printf("%d, %d, %d\n", x, y, z);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x14,-0x14(%rbp)
movl   $0xa,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x18(%rbp)
cmp    %ecx,%eax
jle    1168 <main+0x58>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    %eax,-0x20(%rbp)
jmp    1176 <main+0x66>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x16,%esi
mov    $0xb,%edx
mov    $0x16,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d, %d, %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 20, i32* %6
store i32 10, i32* %7
store i32 0, i32* %8
%9 = load i32, i32* %6
%10 = add nsw i32 %9, 1
store i32 %10, i32* %6
%11 = load i32, i32* %7
%12 = add nsw i32 %11, 1
store i32 %12, i32* %7
%13 = icmp sgt i32 %10, %11
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load i32, i32* %6
%16 = add nsw i32 %15, 1
store i32 %16, i32* %6
br label %20
17: ; preds = %2
%18 = load i32, i32* %7
%19 = add nsw i32 %18, 1
store i32 %19, i32* %7
br label %20
20: ; preds = %17, %14
%21 = phi i32 [ %16, %14 ], [ %18, %17 ]
store i32 %21, i32* %8
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = load i32, i32* %8
%25 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %22, i32 %23, i32 %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d, %d, %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 22, i32 11, i32 22)
ret i32 0
}
void initialize_logging() {}


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

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

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

LLVM IR (-O2):
define void @initialize_logging() {
ret void
}
double calculate_sui_tax(const double amount, const double rate) {
  double tax = amount * rate;
  return tax;
}


x86 assembly (clang, -O0):
<calculate_sui_tax>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_sui_tax>:
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @calculate_sui_tax(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 = fmul double %6, %7
store double %8, double* %5
%9 = load double, double* %5
ret double %9
}

LLVM IR (-O2):
define double @calculate_sui_tax(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ _i2c_set(int, unsigned char);
int /*<<< orphan*/ usleep(int);
void _i2c_write(unsigned char *buf, int num) {
  int i;
  for (i = 0; i < num; i++) {
    _i2c_set(0x7d44, *buf);
    buf++;
    usleep(1000);
  }
}


x86 assembly (clang, -O0):
<_i2c_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1177 <_i2c_write+0x57>
mov    -0x8(%rbp),%rax
mov    $0x7d44,%edi
movzbl (%rax),%esi
call   1030 <_i2c_set@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <_i2c_write+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_i2c_write>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1162 <_i2c_write+0x42>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%r14,%rbx,1),%esi
mov    $0x7d44,%edi
call   1030 <_i2c_set@plt>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1140 <_i2c_write+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @_i2c_write(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ 0, %2 ]
%6 = phi i8* [ %9, %4 ], [ %0, %2 ]
%7 = load i8, i8* %6
%8 = tail call i32 @_i2c_set(i32 32068, i8 zeroext %7)
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = tail call i32 @usleep(i32 1000)
%11 = add nuw nsw i32 %5, 1
%12 = icmp eq i32 %11, %1
br i1 %12, label %13, label %4
13: ; preds = %4, %2
ret void
}
/* Variables and functions */
long strtol(char const *, char **, int);
int parse_long(const char *str, long *value) {
  char *end;
  const long n = strtol(str, &end, 10);
  return str == end || !(*value = n);
}


x86 assembly (clang, -O0):
<parse_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmp    -0x18(%rbp),%rcx
mov    %al,-0x21(%rbp)
je     1160 <parse_long+0x50>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_long>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
cmp    %rbx,(%rsp)
je     113d <parse_long+0x2d>
mov    %rax,%rcx
mov    %rax,(%r14)
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
jmp    1142 <parse_long+0x32>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @parse_long(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %3
store i64* %1, i64** %4
%7 = load i8*, i8** %3
%8 = call i64 @strtol(i8* %7, i8** %5, i32 10)
store i64 %8, i64* %6
%9 = load i8*, i8** %3
%10 = load i8*, i8** %5
%11 = icmp eq i8* %9, %10
br i1 %11, label %17, label %12
12: ; preds = %2
%13 = load i64, i64* %6
%14 = load i64*, i64** %4
store i64 %13, i64* %14
%15 = icmp ne i64 %13, 0
%16 = xor i1 %15, true
br label %17
17: ; preds = %12, %2
%18 = phi i1 [ true, %2 ], [ %16, %12 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @parse_long(i8* %0, i64* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i64 @strtol(i8* %0, i8** %3, i32 10)
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %0
br i1 %7, label %11, label %8
8: ; preds = %2
store i64 %5, i64* %1
%9 = icmp eq i64 %5, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %8, %2
%12 = phi i32 [ 1, %2 ], [ %10, %8 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
int __attribute__((no)) only_called_by_test_34(int parm) {
  __analyzer_eval(parm == 42);
  return parm * 2;
}


x86 assembly (clang, -O0):
<only_called_by_test_34>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2a,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<only_called_by_test_34>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x2a,%ebx
sete   %dil
call   1030 <__analyzer_eval@plt>
add    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @only_called_by_test_34(i32 %0) {
%2 = icmp eq i32 %0, 42
%3 = zext i1 %2 to i32
%4 = tail call i32 @__analyzer_eval(i32 %3)
%5 = shl nsw i32 %0, 1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ STDERR_FILENO;
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ close(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int setsid();
int /*<<< orphan*/ sniffer_trace(char *);
int /*<<< orphan*/ umask(int /*<<< orphan*/);
void daemonize() {
  if (0) {
    sniffer_trace("ENTERING: daemonize");
  }
  umask(0);
  int sid = setsid();
  if (sid < 0) {
    exit(0);
  }
  close(STDIN_FILENO);
  close(STDOUT_FILENO);
  close(STDERR_FILENO);
  if (0) {
    sniffer_trace("LEAVING: daemonize");
  }
}


x86 assembly (clang, -O0):
<daemonize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1050 <umask@plt>
mov    $0x0,%al
call   1040 <setsid@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    116a <daemonize+0x2a>
xor    %edi,%edi
call   1060 <exit@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
call   1030 <close@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1030 <close@plt>
mov    0x2e4b(%rip),%rax
mov    (%rax),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<daemonize>:
push   %rax
xor    %edi,%edi
call   1050 <umask@plt>
xor    %eax,%eax
call   1040 <setsid@plt>
test   %eax,%eax
js     117e <daemonize+0x3e>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
call   1030 <close@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1030 <close@plt>
mov    0x2e62(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <close@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
@STDOUT_FILENO = global i32 0
@STDERR_FILENO = global i32 0
define void @daemonize() {
%1 = alloca i32
%2 = call i32 @umask(i32 0)
%3 = call i32 (...) @setsid()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
8: ; preds = %0
%9 = load i32, i32* @STDIN_FILENO
%10 = call i32 @close(i32 %9)
%11 = load i32, i32* @STDOUT_FILENO
%12 = call i32 @close(i32 %11)
%13 = load i32, i32* @STDERR_FILENO
%14 = call i32 @close(i32 %13)
ret void
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
@STDOUT_FILENO = global i32 0
@STDERR_FILENO = global i32 0
define void @daemonize() {
%1 = tail call i32 @umask(i32 0)
%2 = tail call i32 (...) @setsid()
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %0
%7 = load i32, i32* @STDIN_FILENO
%8 = tail call i32 @close(i32 %7)
%9 = load i32, i32* @STDOUT_FILENO
%10 = tail call i32 @close(i32 %9)
%11 = load i32, i32* @STDERR_FILENO
%12 = tail call i32 @close(i32 %11)
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
__attribute__((always_)) __attribute__((warn_unused_result)) int32_t
clamp(int32_t in, int32_t min, int32_t max) {
  return in <= min ? min : (in >= max ? max : in);
}


x86 assembly (clang, -O0):
<clamp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jg     112b <clamp+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1156 <clamp+0x56>
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jl     1146 <clamp+0x46>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    114e <clamp+0x4e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp>:
mov    %rdx,%rax
cmp    %rdx,%rdi
cmovl  %rdi,%rax
cmp    %rsi,%rdi
cmovle %rsi,%rax
ret

LLVM IR (-O0):
define i64 @clamp(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = icmp sle i64 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i64, i64* %5
br label %22
12: ; preds = %3
%13 = load i64, i64* %4
%14 = load i64, i64* %6
%15 = icmp sge i64 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load i64, i64* %6
br label %20
18: ; preds = %12
%19 = load i64, i64* %4
br label %20
20: ; preds = %18, %16
%21 = phi i64 [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi i64 [ %11, %10 ], [ %21, %20 ]
ret i64 %23
}

LLVM IR (-O2):
define i64 @clamp(i64 %0, i64 %1, i64 %2) {
%4 = icmp sgt i64 %0, %1
%5 = icmp slt i64 %0, %2
%6 = select i1 %5, i64 %0, i64 %2
%7 = select i1 %4, i64 %6, i64 %1
ret i64 %7
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ sleep(int);
int main() {
  pid_t child_pid;
  child_pid = fork();
  if (child_pid > 0) {
    sleep(60);
  } else {
    exit(0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1164 <main+0x34>
mov    $0x3c,%edi
call   1040 <sleep@plt>
jmp    116b <main+0x3b>
xor    %edi,%edi
call   1030 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <fork@plt>
test   %rax,%rax
jle    114b <main+0x1b>
mov    $0x3c,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i64 (...) @fork()
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @sleep(i32 60)
br label %10
8: ; preds = %0
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp sgt i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @sleep(i32 60)
ret i32 0
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct msqid_ds {
  int dummy;
};
typedef int cmd;

/* Variables and functions */
int IPC_STAT;
int __syscall(int, int, int, struct msqid_ds *);
int __syscall_ret(int);
int msgctl(int q, int cmd, struct msqid_ds *buf) {
  int r = __syscall(304, q, (((cmd) & ~(IPC_STAT & 0x100)) | 0x100), buf);
  return __syscall_ret(r);
}


x86 assembly (clang, -O0):
<msgctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
and    $0x100,%eax
xor    $0xffffffff,%eax
and    %eax,%edx
or     $0x100,%edx
mov    -0x10(%rbp),%rcx
mov    $0x130,%edi
call   1030 <__syscall@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <__syscall_ret@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgctl>:
push   %rax
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
or     $0x100,%edx
mov    $0x130,%edi
call   1030 <__syscall@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <__syscall_ret@plt>

LLVM IR (-O0):
%struct.msqid_ds = type { i32 }
@IPC_STAT = global i32 0
define i32 @msgctl(i32 %0, i32 %1, %struct.msqid_ds* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.msqid_ds*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.msqid_ds* %2, %struct.msqid_ds** %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* @IPC_STAT
%11 = and i32 %10, 256
%12 = xor i32 %11, -1
%13 = and i32 %9, %12
%14 = or i32 %13, 256
%15 = load %struct.msqid_ds*, %struct.msqid_ds** %6
%16 = call i32 @__syscall(i32 304, i32 %8, i32 %14, %struct.msqid_ds* %15)
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = call i32 @__syscall_ret(i32 %17)
ret i32 %18
}

LLVM IR (-O2):
%struct.msqid_ds = type { i32 }
@IPC_STAT = global i32 0
define i32 @msgctl(i32 %0, i32 %1, %struct.msqid_ds* %2) {
%4 = or i32 %1, 256
%5 = tail call i32 @__syscall(i32 304, i32 %0, i32 %4, %struct.msqid_ds* %2)
%6 = tail call i32 @__syscall_ret(i32 %5)
ret i32 %6
}
int cfunc(int x) { return x + 1; }


x86 assembly (clang, -O0):
<cfunc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfunc>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @cfunc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @cfunc(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ do_quick_sort(int *, int /*<<< orphan*/, int);
void quick_sort(int arr[], int n) { do_quick_sort(arr, 0, n - 1); }


x86 assembly (clang, -O0):
<quick_sort>:
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 <do_quick_sort@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @quick_sort(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 i32 @do_quick_sort(i32* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @quick_sort(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @do_quick_sort(i32* %0, i32 0, i32 %3)
ret void
}
void ansic_c_ast_placeholder(void) {}


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

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

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

LLVM IR (-O2):
define void @ansic_c_ast_placeholder() {
ret void
}
/* Variables and functions */
int core3_swap(char *, int);
int U_EMRSETSTRETCHBLTMODE_swap(char *record, int torev) {
  return (core3_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRSETSTRETCHBLTMODE_swap>:
jmp    1030 <core3_swap@plt>

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

LLVM IR (-O2):
define i32 @U_EMRSETSTRETCHBLTMODE_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core3_swap(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ gather_data();
int /*<<< orphan*/ setup_query_listener();
int main() {
  setup_query_listener();
  gather_data();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @setup_query_listener()
%3 = call i32 (...) @gather_data()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @setup_query_listener()
%2 = tail call i32 (...) @gather_data()
ret i32 0
}
void foo686(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo686(i32 %0) {
ret void
}
void arch_clean(void) {}


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

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

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

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