xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(size_t, size_t);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void *xcalloc(size_t count, size_t size) {
  void *retval = calloc(count, size);
  if (retval == NULL) {
    fprintf(stderr, "calloc failed!\n");
    abort();
  }
  return retval;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1178 <xcalloc+0x48>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %rax
call   1040 <calloc@plt>
test   %rax,%rax
je     113d <xcalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"calloc failed!\0A\00"
define i8* @xcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"calloc failed!\0A\00"
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ pclog(char *);
void iso_eject(void) { pclog("iso_eject stub\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"iso_eject stub\0A\00"
define void @iso_eject() {
%1 = call i32 @pclog(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"iso_eject stub\0A\00"
define void @iso_eject() {
%1 = tail call i32 @pclog(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
int foo(int a, int b) {
  if (!(a || b)) {
    return (1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    112a <foo+0x2a>
cmpl   $0x0,-0xc(%rbp)
jne    112a <foo+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <foo+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
or     %esi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int pathconN_nm2_work(int *sz_arg, int *sz_res, int *sz_iw, int *sz_w) {
  if (sz_arg)
    *sz_arg = 1;
  if (sz_res)
    *sz_res = 2;
  if (sz_iw)
    *sz_iw = 0;
  if (sz_w)
    *sz_w = 0;
  return 0;
}


x86 assembly (clang, -O0):
<pathconN_nm2_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 <pathconN_nm2_work+0x29>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <pathconN_nm2_work+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <pathconN_nm2_work+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <pathconN_nm2_work+0x68>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pathconN_nm2_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 1, 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 0, i32* %27
br label %28
28: ; preds = %26, %23
ret i32 0
}

LLVM IR (-O2):
define i32 @pathconN_nm2_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 1, 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 0, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ printw(char *);
void clearbelowmovebox() {
  int i;
  move(17, 42);
  printw("*--------------------------*");
  for (i = 1; i <= 2; i++) {
    move(17 + i, 42);
    printw("                            ");
  }
}


x86 assembly (clang, -O0):
<clearbelowmovebox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x11,%edi
mov    $0x2a,%esi
call   1040 <move@plt>
lea    0xec2(%rip),%rdi
call   1030 <printw@plt>
movl   $0x1,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jg     117e <clearbelowmovebox+0x5e>
mov    -0x4(%rbp),%edi
add    $0x11,%edi
mov    $0x2a,%esi
call   1040 <move@plt>
lea    0xeb2(%rip),%rdi
call   1030 <printw@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114a <clearbelowmovebox+0x2a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearbelowmovebox>:
push   %rbx
mov    $0x11,%edi
mov    $0x2a,%esi
call   1040 <move@plt>
lea    0xec9(%rip),%rdi
call   1030 <printw@plt>
mov    $0x12,%edi
mov    $0x2a,%esi
call   1040 <move@plt>
lea    0xecb(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printw@plt>
mov    $0x13,%edi
mov    $0x2a,%esi
call   1040 <move@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printw@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"*--------------------------*\00"
@.str.1 = [29 x i8] c" \00"
define void @clearbelowmovebox() {
%1 = alloca i32
%2 = call i32 @move(i32 17, i32 42)
%3 = call i32 @printw(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %4
4: ; preds = %12, %0
%5 = load i32, i32* %1
%6 = icmp sle i32 %5, 2
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %1
%9 = add nsw i32 17, %8
%10 = call i32 @move(i32 %9, i32 42)
%11 = call i32 @printw(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %7
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"*--------------------------*\00"
@.str.1 = [29 x i8] c" \00"
define void @clearbelowmovebox() {
%1 = tail call i32 @move(i32 17, i32 42)
%2 = tail call i32 @printw(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @move(i32 18, i32 42)
%4 = tail call i32 @printw(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @move(i32 19, i32 42)
%6 = tail call i32 @printw(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printProcList() {
  printf("Hi,please select the process below the list\n");
  printf("1. ASCII Text to Decimal\n");
}


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

x86 assembly (clang, -O2):
<printProcList>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf08(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"Hi,please select the process below the list\0A\00"
@.str.1 = [26 x i8] c"1. ASCII Text to Decimal\0A\00"
define void @printProcList() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [44 x i8] c"Hi,please select the process below the list\00"
@str.2 = [25 x i8] c"1. ASCII Text to Decimal\00"
define void @printProcList() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ remove_leading_spaces(char *);
int /*<<< orphan*/ remove_trailing_spaces(char *);
void remove_leading_trailing_spaces(char *s) {
  remove_leading_spaces(s);
  remove_trailing_spaces(s);
}


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

x86 assembly (clang, -O2):
<remove_leading_trailing_spaces>:
push   %rbx
mov    %rdi,%rbx
call   1030 <remove_leading_spaces@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <remove_trailing_spaces@plt>

LLVM IR (-O0):
define void @remove_leading_trailing_spaces(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @remove_leading_spaces(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @remove_trailing_spaces(i8* %5)
ret void
}

LLVM IR (-O2):
define void @remove_leading_trailing_spaces(i8* %0) {
%2 = tail call i32 @remove_leading_spaces(i8* %0)
%3 = tail call i32 @remove_trailing_spaces(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ greet();
int /*<<< orphan*/ interact();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  greet();
  interact();
  printf("Bye!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"Bye!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @greet()
%7 = call i32 (...) @interact()
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [5 x i8] c"Bye!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @greet()
%4 = tail call i32 (...) @interact()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
double ls_cost_nm4_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<ls_cost_nm4_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <ls_cost_nm4_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <ls_cost_nm4_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <ls_cost_nm4_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <ls_cost_nm4_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_cost_nm4_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @ls_cost_nm4_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
signed short int signedshortint_ignoring_signedchar(signed short int x,
                                                    signed char y) {
  return x;
}


x86 assembly (clang, -O0):
<signedshortint_ignoring_signedchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signedshortint_ignoring_signedchar>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i16 @signedshortint_ignoring_signedchar(i16 signext %0, i8 signext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @signedshortint_ignoring_signedchar(i16 returned signext %0, i8 signext %1) {
ret i16 %0
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
int napms(int ms) {
  struct timespec ts;
  ts.tv_sec = ms / 1000;
  ts.tv_nsec = (ms % 1000) * 1000000;
  (void)nanosleep(&ts, NULL);
  return ((0));
}


x86 assembly (clang, -O0):
<napms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
imul   $0xf4240,%edx,%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<napms>:
push   %rax
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
mov    %ecx,(%rsp)
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
imul   $0xf4240,%eax,%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define i32 @napms(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = sdiv i32 %0, 1000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %4, i32* %5
%6 = srem i32 %0, 1000
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i32 %7, i32* %8
%9 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret i32 0
}
int stc_rng_is_full() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @stc_rng_is_full() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ dup2(int, int);
int open(char const *, int, int);
void __util_redirect(int src_fd, const char *target_file, int open_flags) {
  int new_fd = open(target_file, open_flags, 0644);
  dup2(new_fd, src_fd);
  close(new_fd);
}


x86 assembly (clang, -O0):
<__util_redirect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0x1a4,%edx
call   1050 <open@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <dup2@plt>
mov    -0x18(%rbp),%edi
call   1040 <close@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__util_redirect>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %rsi,%rdi
mov    %edx,%esi
mov    $0x1a4,%edx
call   1050 <open@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <dup2@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <close@plt>

LLVM IR (-O0):
define void @__util_redirect(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @open(i8* %8, i32 %9, i32 420)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = load i32, i32* %4
%13 = call i32 @dup2(i32 %11, i32 %12)
%14 = load i32, i32* %7
%15 = call i32 @close(i32 %14)
ret void
}

LLVM IR (-O2):
define void @__util_redirect(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @open(i8* %1, i32 %2, i32 420)
%5 = tail call i32 @dup2(i32 %4, i32 %0)
%6 = tail call i32 @close(i32 %4)
ret void
}
tcapkclose() {}


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

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

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

LLVM IR (-O2):
define i32 @tcapkclose() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *argv0, char *text) {
  printf("%s\n", text);
  printf("\n\nUsage:\n\n%s\n\n", argv0);
  printf("allocates pieces of memory of different sizes\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <puts@plt>
lea    0xebd(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [15 x i8] c"\0A\0AUsage:\0A\0A%s\0A\0A\00"
@.str.2 = [47 x i8] c"allocates pieces of memory of different sizes\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str.1 = [15 x i8] c"\0A\0AUsage:\0A\0A%s\0A\0A\00"
@str = [46 x i8] c"allocates pieces of memory of different sizes\00"
define void @usage(i8* %0, i8* nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) %1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ *malloc(int);
int /*<<< orphan*/ pthread_mutex_init(int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
int sys_mutex_init(pthread_mutex_t **mtx) {
  int ret = 0;
  if (mtx != NULL) {
    *mtx = malloc(sizeof(**mtx));
    if (*mtx != NULL) {
      pthread_mutex_init(*mtx, NULL);
      ret = 1;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<sys_mutex_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     117c <sys_mutex_init+0x5c>
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1177 <sys_mutex_init+0x57>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pthread_mutex_init@plt>
movl   $0x1,-0xc(%rbp)
jmp    117c <sys_mutex_init+0x5c>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_mutex_init>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
test   %rdi,%rdi
je     114e <sys_mutex_init+0x2e>
mov    %rdi,%rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,(%rbx)
test   %rax,%rax
je     114e <sys_mutex_init+0x2e>
mov    %rax,%rdi
xor    %esi,%esi
call   1040 <pthread_mutex_init@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @sys_mutex_init(i32** writeonly %0) {
%2 = icmp eq i32** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32* @malloc(i32 4)
store i32* %4, i32** %0
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @pthread_mutex_init(i32* %4, i32* null)
br label %8
8: ; preds = %3, %6, %1
%9 = phi i32 [ 1, %6 ], [ 0, %3 ], [ 0, %1 ]
ret i32 %9
}
void xmm_copy(float *x, float *y, int size) {
  int k;
  for (k = 0; k < size; k = k + 4) {
    asm volatile("movups (%1), %%xmm0\n\t"
                 "movups %%xmm0, (%0)\n\t"
                 :
                 : "r"(x + k), "r"(y + k)
                 : "%xmm0");
  }
}


x86 assembly (clang, -O0):
<xmm_copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <xmm_copy+0x54>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
shl    $0x2,%rdx
add    %rdx,%rcx
movups (%rcx),%xmm0
movups %xmm0,(%rax)
mov    -0x18(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x18(%rbp)
jmp    1116 <xmm_copy+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmm_copy>:
test   %edx,%edx
jle    1125 <xmm_copy+0x25>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movups (%rsi),%xmm0
movups %xmm0,(%rdi)
add    $0x10,%rsi
add    $0x10,%rdi
add    $0x4,%eax
cmp    %edx,%eax
jl     1110 <xmm_copy+0x10>
ret

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

LLVM IR (-O2):
define void @xmm_copy(float* %0, float* %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %12
5: ; preds = %3, %5
%6 = phi i64 [ %9, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds float, float* %0, i64 %6
%8 = getelementptr inbounds float, float* %1, i64 %6
tail call void asm sideeffect "movups ($1), %xmm0\0A\09movups %xmm0, ($0)\0A\09", "r,r,~{xmm0},~{dirflag},~{fpsr},~{flags}"(float* %7, float* %8)
%9 = add nuw i64 %6, 4
%10 = trunc i64 %9 to i32
%11 = icmp slt i32 %10, %2
br i1 %11, label %5, label %12
12: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  float a = 2.5;
  float b = 2.5;
  __VERIFIER_assert(a > b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 2.500000e+00, float* %2
store float 2.500000e+00, float* %3
%4 = load float, float* %2
%5 = load float, float* %3
%6 = fcmp ogt float %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @__VERIFIER_assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  float f = 1 / 10;
  printf("%.1f\n", f);
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"%.1f\0A\00"
define i32 @main() {
%1 = alloca float
store float 0.000000e+00, float* %1
%2 = load float, float* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.1f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float 0.000000e+00)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ read(int, char *, int);
short read_half(int fd) {
  int i;
  short forExport = 0;
  char temp;
  for (i = 0; i < 2; i++) {
    read(fd, &temp, sizeof(char));
    forExport += ((short)(temp) << (i * 8));
  }
  return forExport;
}


x86 assembly (clang, -O0):
<read_half>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movw   $0x0,-0xa(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    116a <read_half+0x5a>
mov    -0x4(%rbp),%edi
lea    -0xb(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
movsbl -0xb(%rbp),%eax
cwtl
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
shl    %cl,%eax
mov    %eax,%ecx
movswl -0xa(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1128 <read_half+0x18>
movswl -0xa(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_half>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xf(%rsp),%r14
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <read@plt>
movsbl 0xf(%rsp),%ebp
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <read@plt>
movzbl 0xf(%rsp),%eax
shl    $0x8,%eax
add    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define signext i16 @read_half(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i16
%5 = alloca i8
store i32 %0, i32* %2
store i16 0, i16* %4
store i32 0, i32* %3
br label %6
6: ; preds = %22, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %25
9: ; preds = %6
%10 = load i32, i32* %2
%11 = call i32 @read(i32 %10, i8* %5, i32 1)
%12 = load i8, i8* %5
%13 = sext i8 %12 to i16
%14 = sext i16 %13 to i32
%15 = load i32, i32* %3
%16 = mul nsw i32 %15, 8
%17 = shl i32 %14, %16
%18 = load i16, i16* %4
%19 = sext i16 %18 to i32
%20 = add nsw i32 %19, %17
%21 = trunc i32 %20 to i16
store i16 %21, i16* %4
br label %22
22: ; preds = %9
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %6
25: ; preds = %6
%26 = load i16, i16* %4
ret i16 %26
}

LLVM IR (-O2):
define signext i16 @read_half(i32 %0) {
%2 = alloca i8
%3 = call i32 @read(i32 %0, i8* %2, i32 1)
%4 = load i8, i8* %2
%5 = sext i8 %4 to i16
%6 = call i32 @read(i32 %0, i8* %2, i32 1)
%7 = load i8, i8* %2
%8 = zext i8 %7 to i16
%9 = shl nuw i16 %8, 8
%10 = add i16 %9, %5
ret i16 %10
}
void SwapUVPlane() {}


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

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

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

LLVM IR (-O2):
define void @SwapUVPlane() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_fpu_state(void *);
int /*<<< orphan*/ set_fpu_except_flags(int /*<<< orphan*/, int);
void ieee_procedure_entry(void *state) {
  get_fpu_state(state);
  set_fpu_except_flags(0, (1 | 2 | 4 | 8 | 16 | 32));
}


x86 assembly (clang, -O0):
<ieee_procedure_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_fpu_state@plt>
xor    %edi,%edi
mov    $0x3f,%esi
call   1040 <set_fpu_except_flags@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee_procedure_entry>:
push   %rax
call   1030 <get_fpu_state@plt>
xor    %edi,%edi
mov    $0x3f,%esi
pop    %rax
jmp    1040 <set_fpu_except_flags@plt>

LLVM IR (-O0):
define void @ieee_procedure_entry(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @get_fpu_state(i8* %3)
%5 = call i32 @set_fpu_except_flags(i32 0, i32 63)
ret void
}

LLVM IR (-O2):
define void @ieee_procedure_entry(i8* %0) {
%2 = tail call i32 @get_fpu_state(i8* %0)
%3 = tail call i32 @set_fpu_except_flags(i32 0, i32 63)
ret void
}
void foo129() {}


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

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

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

LLVM IR (-O2):
define void @foo129() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int condition_reduction(int *, int);
int main(void) {
  int a[32] = {11, -12, 13, 14, 15, 16, 17, 18, 19, 20, 1,  2,  -3, 4,  5,  6,
               7,  -8,  9,  10, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
  int ret = condition_reduction(a, 16);
  if (ret != 19)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x80,%edx
call   1040 <memcpy@plt>
lea    -0x90(%rbp),%rdi
mov    $0x10,%esi
call   1050 <condition_reduction@plt>
mov    %eax,-0x94(%rbp)
cmpl   $0x13,-0x94(%rbp)
je     1185 <main+0x55>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x88,%rsp
movaps 0xf42(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xf26(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xf0a(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xeee(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xed2(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeb6(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe9a(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe7e(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x10,%esi
call   1040 <condition_reduction@plt>
cmp    $0x13,%eax
jne    11a2 <main+0x82>
xor    %eax,%eax
add    $0x88,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.main.a = [32 x i32] [i32 11, i32 -12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 1, i32 2, i32 -3, i32 4, i32 5, i32 6, i32 7, i32 -8, i32 9, i32 10, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 32]
define i32 @main() {
%1 = alloca i32
%2 = alloca [32 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [32 x i32]* %2 to i8*
%5 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%6 = call i32 @condition_reduction(i32* %5, i32 16)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 19
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [32 x i32] [i32 11, i32 -12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 1, i32 2, i32 -3, i32 4, i32 5, i32 6, i32 7, i32 -8, i32 9, i32 10, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 32]
define i32 @main() {
%1 = alloca [32 x i32]
%2 = bitcast [32 x i32]* %1 to i8*
%3 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 0
%4 = call i32 @condition_reduction(i32* %3, i32 16)
%5 = icmp eq i32 %4, 19
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
ret i32 0
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *);
extern void porter_UTF_8_close_env(struct SN_env *z) { SN_close_env(z); }


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

x86 assembly (clang, -O2):
<porter_UTF_8_close_env>:
jmp    1030 <SN_close_env@plt>

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

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @porter_UTF_8_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0)
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  int /*<<< orphan*/ tv_sec;
};
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ secs_to_usecs(int /*<<< orphan*/);
int64_t timeval_to_usecs(const struct timeval *tv) {
  return (secs_to_usecs(tv->tv_sec) + tv->tv_usec);
}


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

x86 assembly (clang, -O2):
<timeval_to_usecs>:
push   %rbx
mov    %rdi,%rbx
mov    0x8(%rdi),%edi
call   1030 <secs_to_usecs@plt>
add    (%rbx),%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i32 }
define i64 @timeval_to_usecs(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%5 = load i32, i32* %4
%6 = call i64 @secs_to_usecs(i32 %5)
%7 = load %struct.timeval*, %struct.timeval** %2
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 0
%9 = load i64, i64* %8
%10 = add nsw i64 %6, %9
ret i64 %10
}

LLVM IR (-O2):
%struct.timeval = type { i64, i32 }
define i64 @timeval_to_usecs(%struct.timeval* nocapture %0) {
%2 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%3 = load i32, i32* %2
%4 = tail call i64 @secs_to_usecs(i32 %3)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%6 = load i64, i64* %5
%7 = add nsw i64 %6, %4
ret i64 %7
}
void foo37() {}


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

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

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

LLVM IR (-O2):
define void @foo37() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: tcpm source target\n");
  printf("Copy the contents of the source to target\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef6(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Usage: tcpm source target\0A\00"
@.str.1 = [43 x i8] c"Copy the contents of the source to target\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [26 x i8] c"Usage: tcpm source target\00"
@str.2 = [42 x i8] c"Copy the contents of the source to target\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *calloc(int, size_t);
int /*<<< orphan*/ memfatal(char *, size_t);
void *xmalloc0(size_t size) {
  void *ptr = calloc(1, size);
  if (!ptr)
    memfatal("calloc", size);
  return ptr;
}


x86 assembly (clang, -O0):
<xmalloc0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1159 <xmalloc0+0x39>
mov    -0x8(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1040 <memfatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc0>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x1,%edi
mov    %r14,%rsi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114b <xmalloc0+0x2b>
lea    0xebd(%rip),%rdi
mov    %r14,%rsi
call   1040 <memfatal@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"calloc\00"
define i8* @xmalloc0(i64 %0) {
%2 = tail call i8* @calloc(i32 1, i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @memfatal(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
char *testMallocPrintf(char *, char const *);
char *getName(const char *zSystem) {
  char *zRet;
  zRet = testMallocPrintf("rollback.%s", zSystem);
  return zRet;
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"rollback.%s\00"
define i8* @getName(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @testMallocPrintf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
@.str = [12 x i8] c"rollback.%s\00"
define i8* @getName(i8* %0) {
%2 = tail call i8* @testMallocPrintf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %2
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int get_value_of_continuation_parameter(int k, double *val) {
  int *b, fail;
  fail = _ada_use_c2phc4c(189, &k, b, val, 0);
  return fail;
}


x86 assembly (clang, -O0):
<get_value_of_continuation_parameter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0xbd,%edi
lea    -0x4(%rbp),%rsi
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):
<get_value_of_continuation_parameter>:
push   %rax
mov    %rsi,%rcx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0xbd,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @get_value_of_continuation_parameter(i32 %0, double* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 189, i32* %3, i32* undef, double* %1, i32 0)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int __infer_nondet_int();
int wprintf(const wchar_t *format, ...) {
  int res;
  res = __infer_nondet_int();
  if (res < 0)
    while (1)
      ;
  return res;
}


x86 assembly (clang, -O0):
<wprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    113a <wprintf+0x2a>
jmp    1135 <wprintf+0x25>
jmp    1135 <wprintf+0x25>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wprintf>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
test   %eax,%eax
js     1120 <wprintf+0x10>
pop    %rcx
ret
xchg   %ax,%ax
jmp    1120 <wprintf+0x10>

LLVM IR (-O0):
define i32 @wprintf(i32* %0, ...) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = call i32 (...) @__infer_nondet_int()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
br label %8
8: ; preds = %7, %8
br label %8
9: ; preds = %1
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @wprintf(i32* nocapture readnone %0, ...) {
%2 = tail call i32 (...) @__infer_nondet_int()
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1, %4
br label %4
5: ; preds = %1
ret i32 %2
}
f(char *x) { return (*x & 2) || (*x & 3); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
and    $0x2,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    1133 <f+0x33>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
and    $0x3,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
testb  $0x3,(%rdi)
setne  %al
ret

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

LLVM IR (-O2):
define i32 @f(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 3
%4 = icmp ne i8 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}