xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int a, b, x;
  scanf("%d", &a);
  scanf("%d", &b);
  x = a + b;
  printf("X = %d", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xebe(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%esi
add    0xc(%rsp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"X = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, %7
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
char *supported_mass_units();
void print_unit_info() {
  char *sup_units = supported_mass_units();
  printf("%s\n", "This program supports the following units:");
  printf("%s\n", sup_units);
  free(sup_units);
}


x86 assembly (clang, -O0):
<print_unit_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <supported_mass_units@plt>
mov    %rax,-0x8(%rbp)
lea    0xeb6(%rip),%rdi
lea    0xeb3(%rip),%rsi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_unit_info>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <supported_mass_units@plt>
mov    %rax,%rbx
lea    0xebb(%rip),%r14
lea    0xeb8(%rip),%rsi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [43 x i8] c"This program supports the following units:\00"
define void @print_unit_info() {
%1 = alloca i8*
%2 = call i8* (...) @supported_mass_units()
store i8* %2, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %1
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [43 x i8] c"This program supports the following units:\00"
define void @print_unit_info() {
%1 = tail call i8* (...) @supported_mass_units()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @free(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x27() {
  Assert_real((isodigit(39) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              200, ("isodigit should be 0 for '"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for '\00"
define void @t_isodigit_0x27() {
%1 = call i64 @isodigit(i32 39)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 200, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for '\00"
define void @t_isodigit_0x27() {
%1 = tail call i64 @isodigit(i32 39)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 200, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 123;
  printf("If you saw this, it's normal state. %d\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7b,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%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
mov    $0x7b,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"If you saw this, it's normal state. %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 123, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"If you saw this, it's normal state. %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 123)
ret i32 0
}
void ff_hevc_put_hevc_uni_w_pel_pixels32_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_pel_pixels32_8_sse4() {
ret void
}
double exp(double x) {
  return ({
    extern __typeof__(exp) module_libc_exp;
    &module_libc_exp;
  })(x);
}


x86 assembly (clang, -O0):
<exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ec4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  -0x8(%rbp),%xmm0
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp>:
jmp    1030 <module_libc_exp@plt>

LLVM IR (-O0):
define double @exp(double %0) {
%2 = alloca double
%3 = alloca double (double)*
store double %0, double* %2
store double (double)* @module_libc_exp, double (double)** %3
%4 = load double (double)*, double (double)** %3
%5 = load double, double* %2
%6 = call double %4(double %5)
ret double %6
}

LLVM IR (-O2):
define double @exp(double %0) {
%2 = tail call double @module_libc_exp(double %0)
ret double %2
}
void x2_x_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @x2_x_targetInit__I() {
ret void
}
/* Variables and functions */
char *NewPtr(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
char *NewPtrClear(int size) {
  char *ptr = NewPtr(size);
  if (!ptr)
    return 0;
  memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<NewPtrClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <NewPtr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    114f <NewPtrClear+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    1165 <NewPtrClear+0x45>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NewPtrClear>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1030 <NewPtr@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113e <NewPtrClear+0x1e>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1040 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @NewPtrClear(i32 %0) {
%2 = tail call i8* @NewPtr(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i32 %0)
br label %6
6: ; preds = %1, %4
ret i8* %2
}
int verify(s, c)
char s[], c;
{
  int i;
  for (i = 0; s[i] != '\0'; i++)
    if (s[i] != c)
      return (i);
  return (-1);
}


x86 assembly (clang, -O0):
<verify>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1160 <verify+0x60>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
je     114d <verify+0x4d>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <verify+0x67>
jmp    1152 <verify+0x52>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <verify+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify>:
mov    (%rdi),%dl
mov    $0xffffffff,%eax
test   %dl,%dl
je     1134 <verify+0x34>
movsbl %sil,%esi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %dl,%edx
cmp    %edx,%esi
jne    1135 <verify+0x35>
movzbl 0x1(%rdi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1120 <verify+0x20>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @verify(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %20, label %5
5: ; preds = %2
%6 = shl i32 %1, 24
%7 = ashr exact i32 %6, 24
br label %8
8: ; preds = %5, %13
%9 = phi i64 [ 0, %5 ], [ %14, %13 ]
%10 = phi i8 [ %3, %5 ], [ %16, %13 ]
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %7, %11
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = add nuw i64 %9, 1
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %20, label %8
18: ; preds = %8
%19 = trunc i64 %9 to i32
br label %20
20: ; preds = %13, %18, %2
%21 = phi i32 [ -1, %2 ], [ %19, %18 ], [ -1, %13 ]
ret i32 %21
}
void set_highmem_pages_init(void) {}


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

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

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

LLVM IR (-O2):
define void @set_highmem_pages_init() {
ret void
}
/* Variables and functions */
int rand();
int time(int /*<<< orphan*/ *);
int Chance(int n) {
  unsigned int v = (rand() >> 12) ^ time(NULL);
  v %= 100;
  if (v > n)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<Chance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
sar    $0xc,%eax
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x64,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    1172 <Chance+0x52>
movl   $0x0,-0x4(%rbp)
jmp    1179 <Chance+0x59>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Chance>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,%ebp
sar    $0xc,%ebp
xor    %edi,%edi
call   1030 <time@plt>
xor    %ebp,%eax
imul   $0x51eb851f,%rax,%rcx
shr    $0x25,%rcx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
xor    %ecx,%ecx
cmp    %ebx,%eax
setbe  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Chance(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = call i32 (...) @rand()
%6 = ashr i32 %5, 12
%7 = call i32 @time(i32* null)
%8 = xor i32 %6, %7
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = urem i32 %9, 100
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = icmp ugt i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %1
store i32 0, i32* %2
br label %16
15: ; preds = %1
store i32 1, i32* %2
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @Chance(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = ashr i32 %2, 12
%4 = tail call i32 @time(i32* null)
%5 = xor i32 %3, %4
%6 = urem i32 %5, 100
%7 = icmp ule i32 %6, %0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
double system_math(double input, bool MCS, double offset, double origin) {
  if (MCS)
    return input;
  else
    return origin + offset + input;
}


x86 assembly (clang, -O0):
<system_math>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     112f <system_math+0x2f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1143 <system_math+0x43>
movsd  -0x28(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<system_math>:
test   %edi,%edi
je     110e <system_math+0xe>
movsd  0xef4(%rip),%xmm1
jmp    1112 <system_math+0x12>
addsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @system_math(double %0, i32 %1, double %2, double %3) {
%5 = icmp eq i32 %1, 0
%6 = fadd double %2, %3
%7 = select i1 %5, double %6, double -0.000000e+00
%8 = fadd double %7, %0
ret double %8
}
void foo324() {}


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

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

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

LLVM IR (-O2):
define void @foo324() {
ret void
}
int __stub_neg() { return -1; }


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

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

LLVM IR (-O0):
define i32 @__stub_neg() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @__stub_neg() {
ret i32 -1
}
void I422ToUYVYRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @I422ToUYVYRow_Any_NEON() {
ret void
}
/* Variables and functions */
int abs(int);
int taxi_dist(int a, int b) {
  return abs(a % 10 - b % 10) + abs(a / 10 - b / 10);
}


x86 assembly (clang, -O0):
<taxi_dist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
sub    %edx,%edi
call   1030 <abs@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
sub    %eax,%edi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<taxi_dist>:
movslq %esi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%edx
sub    %eax,%edx
movslq %edi,%rsi
imul   $0x66666667,%rsi,%rcx
mov    %rcx,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rcx
add    %edi,%ecx
lea    (%rcx,%rcx,1),%edi
lea    (%rdi,%rdi,4),%edi
sub    %edi,%esi
add    %edx,%esi
mov    %esi,%edx
neg    %edx
cmovs  %esi,%edx
imul   $0xffffffff99999999,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x22,%rsi
add    %eax,%esi
add    %ecx,%esi
mov    %esi,%eax
neg    %eax
cmovs  %esi,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @taxi_dist(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 = srem i32 %5, 10
%7 = load i32, i32* %4
%8 = srem i32 %7, 10
%9 = sub nsw i32 %6, %8
%10 = call i32 @abs(i32 %9)
%11 = load i32, i32* %3
%12 = sdiv i32 %11, 10
%13 = load i32, i32* %4
%14 = sdiv i32 %13, 10
%15 = sub nsw i32 %12, %14
%16 = call i32 @abs(i32 %15)
%17 = add nsw i32 %10, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @taxi_dist(i32 %0, i32 %1) {
%3 = srem i32 %0, 10
%4 = srem i32 %1, 10
%5 = sub nsw i32 %3, %4
%6 = tail call i32 @llvm.abs.i32(i32 %5, i1 true)
%7 = sdiv i32 %0, 10
%8 = sdiv i32 %1, -10
%9 = add nsw i32 %8, %7
%10 = tail call i32 @llvm.abs.i32(i32 %9, i1 true)
%11 = add nuw nsw i32 %6, %10
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vfs;

/* Variables and functions */
int SQLITE_IOERR_DELETE;
int SQLITE_OK;
int /*<<< orphan*/ printfHelper(char *, char const *);
int scmDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync) {
  int rc = 0;
  printfHelper("scmDelete %s\n", zPath);
  return (rc == 0 ? SQLITE_OK : SQLITE_IOERR_DELETE);
}


x86 assembly (clang, -O0):
<scmDelete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xecb(%rip),%rdi
call   1030 <printfHelper@plt>
cmpl   $0x0,-0x18(%rbp)
jne    1155 <scmDelete+0x45>
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
jmp    1161 <scmDelete+0x51>
mov    0x2e84(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scmDelete>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printfHelper@plt>
mov    0x2ec4(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"scmDelete %s\0A\00"
@SQLITE_OK = global i32 0
@SQLITE_IOERR_DELETE = global i32 0
define i32 @scmDelete(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
store i32 0, i32* %7
%8 = load i8*, i8** %5
%9 = call i32 @printfHelper(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32, i32* %7
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = load i32, i32* @SQLITE_OK
br label %16
14: ; preds = %3
%15 = load i32, i32* @SQLITE_IOERR_DELETE
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
ret i32 %17
}

LLVM IR (-O2):
@.str = [14 x i8] c"scmDelete %s\0A\00"
@SQLITE_OK = global i32 0
@SQLITE_IOERR_DELETE = global i32 0
define i32 @scmDelete(i32* nocapture readnone %0, i8* %1, i32 %2) {
%4 = tail call i32 @printfHelper(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = load i32, i32* @SQLITE_OK
ret i32 %5
}
int compare1(const void *a, const void *b) { return (*(int *)a - *(int *)b); }


x86 assembly (clang, -O0):
<compare1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare1>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

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

LLVM IR (-O2):
define i32 @compare1(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_nondet_int();
int mlog(int /*<<< orphan*/);
int main() { return mlog(__VERIFIER_nondet_int()); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @mlog(i32 %1)
ret i32 %2
}
double fabs(double x) {
  if (x < 0.0)
    return -x;
  else
    return x;
}


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    113d <fabs+0x3d>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1147 <fabs+0x47>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @fabs(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ strerr_die(int, char *, char *, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/);
void nomem(void) {
  strerr_die((111), ("envuidgid: fatal: "), ("out of memory"), 0, 0, 0, 0, 0);
}


x86 assembly (clang, -O0):
<nomem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x6f,%edi
lea    0xedc(%rip),%rsi
lea    0xee8(%rip),%rdx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <strerr_die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nomem>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xef4(%rip),%rdx
mov    $0x6f,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1030 <strerr_die@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"envuidgid: fatal: \00"
@.str.1 = [14 x i8] c"out of memory\00"
define void @nomem() {
%1 = call i32 @strerr_die(i32 111, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 0, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"envuidgid: fatal: \00"
@.str.1 = [14 x i8] c"out of memory\00"
define void @nomem() {
%1 = tail call i32 @strerr_die(i32 111, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 0, i32 0, i32 0, i32 0)
ret void
}
signed int inplace_split_key_val(unsigned char *line) {
  int i = 0;
  while (line[i] != '\0') {
    if (line[i] == ' ') {
      line[i] = '\0';
      return i;
    }
    i++;
  }
  return -1;
}


x86 assembly (clang, -O0):
<inplace_split_key_val>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115e <inplace_split_key_val+0x5e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    1150 <inplace_split_key_val+0x50>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1165 <inplace_split_key_val+0x65>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <inplace_split_key_val+0xf>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inplace_split_key_val>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1123 <inplace_split_key_val+0x23>
cmp    $0x20,%cl
je     1129 <inplace_split_key_val+0x29>
add    $0x1,%rax
jmp    1110 <inplace_split_key_val+0x10>
mov    $0xffffffff,%eax
ret
mov    %eax,%ecx
movb   $0x0,(%rdi,%rcx,1)
ret

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

LLVM IR (-O2):
define i32 @inplace_split_key_val(i8* nocapture %0) {
br label %2
2: ; preds = %10, %1
%3 = phi i64 [ %11, %10 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %10 [
i8 0, label %12
i8 32, label %6
]
6: ; preds = %2
%7 = trunc i64 %3 to i32
%8 = and i64 %3, 4294967295
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 0, i8* %9
br label %12
10: ; preds = %2
%11 = add nuw i64 %3, 1
br label %2
12: ; preds = %2, %6
%13 = phi i32 [ %7, %6 ], [ -1, %2 ]
ret i32 %13
}
int my_atomic_casptr(void *volatile *a, void **cmp, void *set) {
  void *cmp_val = *cmp;
  void *sav = __sync_val_compare_and_swap(a, cmp_val, set);
  int ret = (sav == cmp_val);
  if (!ret)
    *cmp = sav;
  return ret;
}


x86 assembly (clang, -O0):
<my_atomic_casptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rdx
lock cmpxchg %rdx,(%rcx)
sete   %cl
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jne    115b <my_atomic_casptr+0x5b>
mov    -0x28(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x2c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_atomic_casptr>:
mov    (%rsi),%rcx
mov    %rcx,%rax
lock cmpxchg %rdx,(%rdi)
cmp    %rax,%rcx
je     1113 <my_atomic_casptr+0x13>
mov    %rax,(%rsi)
xor    %edx,%edx
cmp    %rax,%rcx
sete   %dl
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @my_atomic_casptr(i8** %0, i8** %1, i8* %2) {
%4 = alloca i8**
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
store i8** %0, i8*** %4
store i8** %1, i8*** %5
store i8* %2, i8** %6
%10 = load i8**, i8*** %5
%11 = load i8*, i8** %10
store i8* %11, i8** %7
%12 = load i8**, i8*** %4
%13 = bitcast i8** %12 to i64*
%14 = load i8*, i8** %7
%15 = ptrtoint i8* %14 to i64
%16 = load i8*, i8** %6
%17 = ptrtoint i8* %16 to i64
%18 = cmpxchg i64* %13, i64 %15, i64 %17 seq_cst seq_cst
%19 = extractvalue { i64, i1 } %18, 0
%20 = inttoptr i64 %19 to i8*
store i8* %20, i8** %8
%21 = load i8*, i8** %8
%22 = load i8*, i8** %7
%23 = icmp eq i8* %21, %22
%24 = zext i1 %23 to i32
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = icmp ne i32 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %3
%28 = load i8*, i8** %8
%29 = load i8**, i8*** %5
store i8* %28, i8** %29
br label %30
30: ; preds = %27, %3
%31 = load i32, i32* %9
ret i32 %31
}

LLVM IR (-O2):
define i32 @my_atomic_casptr(i8** nocapture %0, i8** nocapture %1, i8* %2) {
%4 = load i8*, i8** %1
%5 = bitcast i8** %0 to i64*
%6 = ptrtoint i8* %4 to i64
%7 = ptrtoint i8* %2 to i64
%8 = cmpxchg i64* %5, i64 %6, i64 %7 seq_cst seq_cst
%9 = extractvalue { i64, i1 } %8, 0
%10 = inttoptr i64 %9 to i8*
%11 = icmp eq i8* %4, %10
br i1 %11, label %13, label %12
12: ; preds = %3
store i8* %10, i8** %1
br label %13
13: ; preds = %12, %3
%14 = zext i1 %11 to i32
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
void SHAREMIND_MAP_KEY_FREE_int64_t(int64_t *const dest) { (void)dest; }


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

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

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

LLVM IR (-O2):
define void @SHAREMIND_MAP_KEY_FREE_int64_t(i32* nocapture %0) {
ret void
}
/* Type definitions */
struct sock {
  int dummy;
};

/* Variables and functions */
scalar_t__ sock_write(struct sock *);
void sock_out(void *arg) {
  struct sock *f = arg;
  while (sock_write(f))
    ;
}


x86 assembly (clang, -O0):
<sock_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <sock_write@plt>
cmp    $0x0,%rax
je     113c <sock_out+0x2c>
jmp    1124 <sock_out+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sock_out>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <sock_write@plt>
test   %rax,%rax
jne    1120 <sock_out+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.sock = type { i32 }
define void @sock_out(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.sock*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.sock*
store %struct.sock* %5, %struct.sock** %3
br label %6
6: ; preds = %10, %1
%7 = load %struct.sock*, %struct.sock** %3
%8 = call i64 @sock_write(%struct.sock* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
br label %6
11: ; preds = %6
ret void
}

LLVM IR (-O2):
%struct.sock = type { i32 }
define void @sock_out(i8* %0) {
%2 = bitcast i8* %0 to %struct.sock*
br label %3
3: ; preds = %3, %1
%4 = tail call i64 @sock_write(%struct.sock* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3
ret void
}
/* Variables and functions */
double cos(double const);
double _cosine(const int numInputs, const double *inputs,
               const double *connectionWeights) {
  return cos(inputs[0]);
}


x86 assembly (clang, -O0):
<_cosine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <cos@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cosine>:
movsd  (%rsi),%xmm0
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define double @_cosine(i32 %0, double* nocapture %1, double* nocapture readnone %2) {
%4 = load double, double* %1
%5 = tail call double @cos(double %4)
ret double %5
}
/* Variables and functions */
double sin(double);
double root0(double E, double e) { return (E - e * sin(E)); }


x86 assembly (clang, -O0):
<root0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<root0>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <sin@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @root0(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = load double, double* %3
%8 = call double @sin(double %7)
%9 = fneg double %6
%10 = call double @llvm.fmuladd.f64(double %9, double %8, double %5)
ret double %10
}

LLVM IR (-O2):
define double @root0(double %0, double %1) {
%3 = tail call double @sin(double %0)
%4 = fneg double %1
%5 = tail call double @llvm.fmuladd.f64(double %4, double %3, double %0)
ret double %5
}
void f2(const void *p) {
  unsigned long v = (unsigned long)p;
  v;
}


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

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

LLVM IR (-O0):
define void @f2(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret void
}

LLVM IR (-O2):
define void @f2(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char *strdup(char const *);
char *g_strdup(const char *str) { return str ? strdup(str) : NULL; }


x86 assembly (clang, -O0):
<g_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <g_strdup+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <strdup@plt>
mov    %rax,-0x10(%rbp)
jmp    1144 <g_strdup+0x34>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1144 <g_strdup+0x34>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @g_strdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i8* @strdup(i8* %6)
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi i8* [ %7, %5 ], [ null, %8 ]
ret i8* %10
}

LLVM IR (-O2):
define noalias i8* @g_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @strdup(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ setIsRollingX();
int /*<<< orphan*/ setIsRollingY();
int /*<<< orphan*/ setIsRollingZ();
void areRolling() {
  setIsRollingX();
  setIsRollingY();
  setIsRollingZ();
}


x86 assembly (clang, -O0):
<areRolling>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <setIsRollingX@plt>
mov    $0x0,%al
call   1030 <setIsRollingY@plt>
mov    $0x0,%al
call   1050 <setIsRollingZ@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<areRolling>:
push   %rax
xor    %eax,%eax
call   1040 <setIsRollingX@plt>
xor    %eax,%eax
call   1030 <setIsRollingY@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <setIsRollingZ@plt>

LLVM IR (-O0):
define void @areRolling() {
%1 = call i32 (...) @setIsRollingX()
%2 = call i32 (...) @setIsRollingY()
%3 = call i32 (...) @setIsRollingZ()
ret void
}

LLVM IR (-O2):
define void @areRolling() {
%1 = tail call i32 (...) @setIsRollingX()
%2 = tail call i32 (...) @setIsRollingY()
%3 = tail call i32 (...) @setIsRollingZ()
ret void
}
/* Type definitions */
struct sbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct sbuf *);
void destroy_sbuf(struct sbuf *buf) { free(buf); }


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

x86 assembly (clang, -O2):
<destroy_sbuf>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.sbuf = type { i32 }
define void @destroy_sbuf(%struct.sbuf* nocapture %0) {
%2 = tail call i32 @free(%struct.sbuf* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ array_test();
int /*<<< orphan*/ cast_test();
int /*<<< orphan*/ expr_arithmetic_test();
int /*<<< orphan*/ expr_cmp_test();
int /*<<< orphan*/ plus_minus_test();
int /*<<< orphan*/ pointer_op_test();
int main() {
  expr_arithmetic_test();
  pointer_op_test();
  expr_cmp_test();
  array_test();
  plus_minus_test();
  cast_test();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <expr_arithmetic_test@plt>
mov    $0x0,%al
call   1070 <pointer_op_test@plt>
mov    $0x0,%al
call   1030 <expr_cmp_test@plt>
mov    $0x0,%al
call   1060 <array_test@plt>
mov    $0x0,%al
call   1050 <plus_minus_test@plt>
mov    $0x0,%al
call   1080 <cast_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <expr_arithmetic_test@plt>
xor    %eax,%eax
call   1070 <pointer_op_test@plt>
xor    %eax,%eax
call   1030 <expr_cmp_test@plt>
xor    %eax,%eax
call   1060 <array_test@plt>
xor    %eax,%eax
call   1050 <plus_minus_test@plt>
xor    %eax,%eax
call   1080 <cast_test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @expr_arithmetic_test()
%3 = call i32 (...) @pointer_op_test()
%4 = call i32 (...) @expr_cmp_test()
%5 = call i32 (...) @array_test()
%6 = call i32 (...) @plus_minus_test()
%7 = call i32 (...) @cast_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @expr_arithmetic_test()
%2 = tail call i32 (...) @pointer_op_test()
%3 = tail call i32 (...) @expr_cmp_test()
%4 = tail call i32 (...) @array_test()
%5 = tail call i32 (...) @plus_minus_test()
%6 = tail call i32 (...) @cast_test()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stderr;
int vfprintf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int Print_to_stderr(const char *format, va_list args) {
  return vfprintf(stderr, format, args);
}


x86 assembly (clang, -O0):
<Print_to_stderr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vfprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Print_to_stderr>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vfprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
define i32 @Print_to_stderr(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ swap(int *, int *);
char *test_swap() {
  int a = 5;
  int b = 3;
  swap(&a, &b);
  do {
    if (!(a == 3 && b == 5))
      return "e: test_swap";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <swap@plt>
cmpl   $0x3,-0xc(%rbp)
jne    1147 <test_swap+0x37>
cmpl   $0x5,-0x10(%rbp)
je     1157 <test_swap+0x47>
lea    0xeb2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1164 <test_swap+0x54>
jmp    115c <test_swap+0x4c>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_swap>:
push   %rax
movl   $0x5,0x4(%rsp)
movl   $0x3,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <swap@plt>
mov    0x4(%rsp),%ecx
xor    $0x3,%ecx
mov    (%rsp),%edx
xor    $0x5,%edx
lea    0xebf(%rip),%rsi
xor    %eax,%eax
or     %ecx,%edx
cmovne %rsi,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"e: test_swap\00"
define i8* @test_swap() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 3, i32* %2
%5 = call i32 @swap(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 3
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 5
%10 = select i1 %7, i1 %9, i1 false
%11 = select i1 %10, i8* null, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
ret i8* %11
}
int main(int argc, char **argv) {
  switch (argc) {
  case 1:
    return 0;
  default:
    return 1;
  }
  return 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
jne    112f <main+0x2f>
jmp    1123 <main+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1136 <main+0x36>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
cmp    $0x1,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
switch i32 %6, label %8 [
i32 1, label %7
]
7: ; preds = %2
store i32 0, i32* %3
br label %9
8: ; preds = %2
store i32 1, i32* %3
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp ne i32 %0, 1
%4 = zext i1 %3 to i32
ret i32 %4
}