xunge/DecIR huggingface dataset:
R0RX1(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ r0 = (p1[x1]); }


x86 assembly (clang, -O0):
<R0RX1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @R0RX1(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float*, float** %13
%17 = load i32, i32* %11
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds float, float* %16, i64 %18
%20 = load float, float* %19
store float %20, float* %8
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @R0RX1(double %0, double %1, i32 %2, i32 %3, float* nocapture readnone %4, float* nocapture readnone %5) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int Files_Exists(char *filename) {
  FILE *file;
  if ((file = fopen(filename, "r"))) {
    fclose(file);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<Files_Exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     115f <Files_Exists+0x3f>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1166 <Files_Exists+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Files_Exists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <Files_Exists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @Files_Exists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
int iscntrl(int c) { return ((c >= 0 && c <= 31) || c == 127); }


x86 assembly (clang, -O0):
<iscntrl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1120 <iscntrl+0x20>
mov    $0x1,%al
cmpl   $0x1f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    112a <iscntrl+0x2a>
cmpl   $0x7f,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscntrl>:
cmp    $0x20,%edi
setb   %al
cmp    $0x7f,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @iscntrl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 31
br i1 %7, label %11, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 127
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ true, %5 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
%2 = icmp ult i32 %0, 32
%3 = icmp eq i32 %0, 127
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int __infer_nondet_int();
int fwide(FILE *stream, int mode) { return __infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @fwide(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = call i32 (...) @__infer_nondet_int()
ret i32 %5
}

LLVM IR (-O2):
define i32 @fwide(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
ret i32 %3
}
void prefetch(void *p) {
  asm volatile("prefetcht0 (%0)" : : "r"(p));
  asm volatile("prefetcht1 (%0)" : : "r"(p));
  asm volatile("prefetcht2 (%0)" : : "r"(p));
  asm volatile("prefetchnta (%0)" : : "r"(p));
}


x86 assembly (clang, -O0):
<prefetch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
prefetcht0 (%rax)
mov    -0x8(%rbp),%rax
prefetcht1 (%rax)
mov    -0x8(%rbp),%rax
prefetcht2 (%rax)
mov    -0x8(%rbp),%rax
prefetchnta (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<prefetch>:
prefetcht0 (%rdi)
prefetcht1 (%rdi)
prefetcht2 (%rdi)
prefetchnta (%rdi)
ret

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

LLVM IR (-O2):
define void @prefetch(i8* %0) {
tail call void asm sideeffect "prefetcht0 ($0)", "r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
tail call void asm sideeffect "prefetcht1 ($0)", "r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
tail call void asm sideeffect "prefetcht2 ($0)", "r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
tail call void asm sideeffect "prefetchnta ($0)", "r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint8_t get_tnt_bit_size(uint64_t payload) {
  uint8_t size;
  for (size = 0;; size += 1) {
    payload >>= 1;
    if (!payload)
      break;
  }
  return size;
}


x86 assembly (clang, -O0):
<get_tnt_bit_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1127 <get_tnt_bit_size+0x27>
jmp    113d <get_tnt_bit_size+0x3d>
jmp    112c <get_tnt_bit_size+0x2c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110f <get_tnt_bit_size+0xf>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tnt_bit_size>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111d <get_tnt_bit_size+0x1d>
mov    %edi,%ecx
nopl   0x0(%rax)
sar    %ecx
add    $0x1,%rax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <get_tnt_bit_size+0x10>
ret

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

LLVM IR (-O2):
define i64 @get_tnt_bit_size(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nuw nsw i64 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i64 [ 0, %1 ], [ %7, %3 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/
CWE78_OS_Command_Injection__char_console_execl_41_goodG2BSink(char *);
int /*<<< orphan*/ strcat(char *, char *);
void goodG2B() {
  char *data;
  char dataBuffer[100] = "";
  data = dataBuffer;
  strcat(data, "*.*");
  CWE78_OS_Command_Injection__char_console_execl_41_goodG2BSink(data);
}


x86 assembly (clang, -O0):
<goodG2B>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
lea    -0x70(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea5(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x8(%rbp),%rdi
call   1040 <CWE78_OS_Command_Injection__char_console_execl_41_goodG2BSink@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goodG2B>:
push   %rbx
sub    $0x70,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
lea    0xeac(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strcat@plt>
mov    %rbx,%rdi
call   1030 <CWE78_OS_Command_Injection__char_console_execl_41_goodG2BSink@plt>
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"*.*\00"
define void @goodG2B() {
%1 = alloca i8*
%2 = alloca [100 x i8]
%3 = bitcast [100 x i8]* %2 to i8*
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
store i8* %4, i8** %1
%5 = load i8*, i8** %1
%6 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %1
%8 = call i32 @CWE78_OS_Command_Injection__char_console_execl_41_goodG2BSink(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"*.*\00"
define void @goodG2B() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @CWE78_OS_Command_Injection__char_console_execl_41_goodG2BSink(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int);
void zl_sleep(unsigned int millisecond) { usleep(millisecond * 1000); }


x86 assembly (clang, -O0):
<zl_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x3e8,-0x4(%rbp),%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zl_sleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @zl_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @zl_sleep(i32 %0) {
%2 = mul i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
char *shex2(char *, char *, int);
char *shex4(char *buf, char *end, int val) {
  buf = shex2(buf, end, val >> 8);
  return shex2(buf, end, val);
}


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

x86 assembly (clang, -O2):
<shex4>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
sar    $0x8,%edx
call   1030 <shex2@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <shex2@plt>

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

LLVM IR (-O2):
define i8* @shex4(i8* %0, i8* %1, i32 %2) {
%4 = ashr i32 %2, 8
%5 = tail call i8* @shex2(i8* %0, i8* %1, i32 %4)
%6 = tail call i8* @shex2(i8* %5, i8* %1, i32 %2)
ret i8* %6
}
not_duplicate(num, arr, n) double num, arr[];
int n;
{
  int m;
  for (m = 1; m <= n; ++m) {
    if (fabs(num - arr[m]) < 0.1)
      return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<not_duplicate>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     1171 <not_duplicate+0x71>
movsd  -0x10(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
movaps 0xed4(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xeb8(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    115e <not_duplicate+0x5e>
movl   $0x0,-0x4(%rbp)
jmp    1178 <not_duplicate+0x78>
jmp    1163 <not_duplicate+0x63>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1117 <not_duplicate+0x17>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<not_duplicate>:
mov    $0x1,%eax
test   %esi,%esi
jle    114c <not_duplicate+0x4c>
add    $0x1,%esi
mov    $0x1,%ecx
movapd 0xee7(%rip),%xmm1
movsd  0xeef(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movapd %xmm0,%xmm3
subsd  (%rdi,%rcx,8),%xmm3
andpd  %xmm1,%xmm3
ucomisd %xmm3,%xmm2
ja     114d <not_duplicate+0x4d>
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1130 <not_duplicate+0x30>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @not_duplicate(double %0, double* nocapture %1, i32 %2) {
%4 = icmp slt i32 %2, 1
br i1 %4, label %18, label %5
5: ; preds = %3
%6 = add nuw i32 %2, 1
%7 = zext i32 %6 to i64
br label %11
8: ; preds = %11
%9 = add nuw nsw i64 %12, 1
%10 = icmp eq i64 %9, %7
br i1 %10, label %18, label %11
11: ; preds = %5, %8
%12 = phi i64 [ 1, %5 ], [ %9, %8 ]
%13 = getelementptr inbounds double, double* %1, i64 %12
%14 = load double, double* %13
%15 = fsub double %0, %14
%16 = tail call double @llvm.fabs.f64(double %15)
%17 = fcmp olt double %16, 1.000000e-01
br i1 %17, label %18, label %8
18: ; preds = %11, %8, %3
%19 = phi i32 [ 1, %3 ], [ 1, %8 ], [ 0, %11 ]
ret i32 %19
}
/* Variables and functions */
char *strstr(char const *, char const *);
int str_istr(const char *cs, const char *ct) {
  int index = -1;
  if (cs != NULL && ct != NULL) {
    char *ptr_pos = NULL;
    ptr_pos = strstr(cs, ct);
    if (ptr_pos != NULL) {
      index = ptr_pos - cs;
    }
  }
  return index;
}


x86 assembly (clang, -O0):
<str_istr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1174 <str_istr+0x64>
cmpq   $0x0,-0x10(%rbp)
je     1174 <str_istr+0x64>
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     116f <str_istr+0x5f>
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x14(%rbp)
jmp    1174 <str_istr+0x64>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_istr>:
mov    $0xffffffff,%eax
test   %rdi,%rdi
je     1135 <str_istr+0x25>
test   %rsi,%rsi
je     1135 <str_istr+0x25>
push   %rbx
mov    %rdi,%rbx
call   1030 <strstr@plt>
mov    %eax,%ecx
sub    %ebx,%ecx
cmp    $0x1,%rax
sbb    %eax,%eax
or     %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @str_istr(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %14
6: ; preds = %2
%7 = tail call i8* @strstr(i8* %0, i8* %1)
%8 = icmp eq i8* %7, null
%9 = ptrtoint i8* %7 to i64
%10 = ptrtoint i8* %0 to i64
%11 = sub i64 %9, %10
%12 = trunc i64 %11 to i32
%13 = select i1 %8, i32 -1, i32 %12
br label %14
14: ; preds = %6, %2
%15 = phi i32 [ %13, %6 ], [ -1, %2 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ a(int, int, int);
int main() { a(1, 2, 3); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <a@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <a@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @a(i32 1, i32 2, i32 3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @a(i32 1, i32 2, i32 3)
ret i32 0
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *COM_FileBase(const char *in) {
  const char *s;
  s = strrchr(in, '/');
  if (s)
    return s + 1;
  return in;
}


x86 assembly (clang, -O0):
<COM_FileBase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114a <COM_FileBase+0x3a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <COM_FileBase+0x42>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<COM_FileBase>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @COM_FileBase(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
void module1_section3_topic5() {}


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

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

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

LLVM IR (-O2):
define void @module1_section3_topic5() {
ret void
}
int getpagesize(void) {
  extern unsigned int __page_size;
  return __page_size;
}


x86 assembly (clang, -O0):
<getpagesize>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpagesize>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@__page_size = external global i32
define i32 @getpagesize() {
%1 = load i32, i32* @__page_size
ret i32 %1
}

LLVM IR (-O2):
@__page_size = external global i32
define i32 @getpagesize() {
%1 = load i32, i32* @__page_size
ret i32 %1
}
/* Variables and functions */
scalar_t__ COND_CC();
int /*<<< orphan*/ EA_AW_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_scc_8_aw(void) { m68ki_write_8(EA_AW_8(), COND_CC() ? 0xff : 0); }


x86 assembly (clang, -O0):
<m68k_op_scc_8_aw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <EA_AW_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <COND_CC@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_scc_8_aw>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <EA_AW_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <COND_CC@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_scc_8_aw() {
%1 = call i32 (...) @EA_AW_8()
%2 = call i64 (...) @COND_CC()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_scc_8_aw() {
%1 = tail call i32 (...) @EA_AW_8()
%2 = tail call i64 (...) @COND_CC()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cl_platform_id;
typedef int /*<<< orphan*/ cl_context;

/* Variables and functions */
int main() { return sizeof(cl_platform_id) - sizeof(cl_context); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ msgMessage(int, char *, char const *);
char *strdup(char const *);
char *CheckStrdup(const char *s) {
  register char *r;
  if (!(r = strdup(s)))
    msgMessage((0x1000 | 0x0800 | 0x0001), "Can't strdup \"%s\"", s);
  return r;
}


x86 assembly (clang, -O0):
<CheckStrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1158 <CheckStrdup+0x38>
mov    -0x8(%rbp),%rdx
mov    $0x1801,%edi
lea    0xead(%rip),%rsi
call   1040 <msgMessage@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckStrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1148 <CheckStrdup+0x28>
lea    0xec5(%rip),%rsi
mov    $0x1801,%edi
mov    %r14,%rdx
call   1040 <msgMessage@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Can't strdup \22%s\22\00"
define i8* @CheckStrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @msgMessage(i32 6145, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [18 x i8] c"Can't strdup \22%s\22\00"
define noalias i8* @CheckStrdup(i8* %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @msgMessage(i32 6145, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x89() {
  Assert_real((isbdigit(137) == 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_isbdigit.c",
              690, ("isbdigit should be 0 for 0x89"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x89>:
push   %rax
mov    $0x89,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x2b2,%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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x89\00"
define void @t_isbdigit_0x89() {
%1 = call i64 @isbdigit(i32 137)
%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 690, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x89\00"
define void @t_isbdigit_0x89() {
%1 = tail call i64 @isbdigit(i32 137)
%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 690, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
mput(buf, aloc, an) int *aloc;
{
  register *loc;
  register n;
  loc = aloc;
  n = an >> 1;
  do {
    putw(*loc++, buf);
  } while (--n);
}


x86 assembly (clang, -O0):
<mput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <putw@plt>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
cmp    $0x0,%eax
jne    1133 <mput+0x23>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mput>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rsi,%r14
mov    %edi,%r15d
sar    %ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r14,%rbp,4),%edi
mov    %r15d,%esi
xor    %eax,%eax
call   1030 <putw@plt>
add    $0x1,%rbp
cmp    %ebp,%ebx
jne    1130 <mput+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @mput(i32 %0, i32* nocapture %1, i32 %2) {
%4 = ashr i32 %2, 1
br label %5
5: ; preds = %5, %3
%6 = phi i32* [ %1, %3 ], [ %8, %5 ]
%7 = phi i32 [ %4, %3 ], [ %11, %5 ]
%8 = getelementptr inbounds i32, i32* %6, i64 1
%9 = load i32, i32* %6
%10 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @putw to i32 (i32, i32, ...)*)(i32 %9, i32 %0)
%11 = add nsw i32 %7, -1
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5
ret i32 undef
}
/* Variables and functions */
unsigned long getCurrentMS();
unsigned long mainCounter(int mode) {
  static unsigned long base_ms = 0;
  unsigned long current_ms;
  current_ms = getCurrentMS();
  if (mode == 0 || current_ms < base_ms)
    base_ms = current_ms;
  return current_ms - base_ms;
}


x86 assembly (clang, -O0):
<mainCounter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getCurrentMS@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1141 <mainCounter+0x31>
mov    -0x10(%rbp),%rax
cmp    0x2ef5(%rip),%rax
jae    114c <mainCounter+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,0x2ee4(%rip)
mov    -0x10(%rbp),%rax
sub    0x2ed9(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mainCounter>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <getCurrentMS@plt>
test   %ebx,%ebx
je     112a <mainCounter+0x1a>
mov    0x2f0b(%rip),%rcx
cmp    %rcx,%rax
jae    1134 <mainCounter+0x24>
mov    %rax,0x2eff(%rip)
mov    %rax,%rcx
sub    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@mainCounter.base_ms = internal global i64 0
define i64 @mainCounter(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = call i64 (...) @getCurrentMS()
store i64 %4, i64* %3
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i64, i64* %3
%9 = load i64, i64* @mainCounter.base_ms
%10 = icmp ult i64 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %7, %1
%12 = load i64, i64* %3
store i64 %12, i64* @mainCounter.base_ms
br label %13
13: ; preds = %11, %7
%14 = load i64, i64* %3
%15 = load i64, i64* @mainCounter.base_ms
%16 = sub i64 %14, %15
ret i64 %16
}

LLVM IR (-O2):
@mainCounter.base_ms = internal unnamed_addr global i64 0
define i64 @mainCounter(i32 %0) {
%2 = tail call i64 (...) @getCurrentMS()
%3 = icmp eq i32 %0, 0
%4 = load i64, i64* @mainCounter.base_ms
%5 = icmp ult i64 %2, %4
%6 = select i1 %3, i1 true, i1 %5
br i1 %6, label %7, label %8
7: ; preds = %1
store i64 %2, i64* @mainCounter.base_ms
br label %8
8: ; preds = %1, %7
%9 = phi i64 [ %4, %1 ], [ %2, %7 ]
%10 = sub i64 %2, %9
ret i64 %10
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
int strverscmp(int /*<<< orphan*/, int /*<<< orphan*/);
int version_sort(const void *a, const void *b) {
  return strverscmp((*(const struct dirent **)a)->d_name,
                    (*(const struct dirent **)b)->d_name);
}


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

x86 assembly (clang, -O2):
<version_sort>:
mov    (%rdi),%rax
mov    (%rax),%edi
mov    (%rsi),%rax
mov    (%rax),%esi
jmp    1030 <strverscmp@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
define i32 @version_sort(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 %struct.dirent**
%7 = load %struct.dirent*, %struct.dirent** %6
%8 = getelementptr inbounds %struct.dirent, %struct.dirent* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to %struct.dirent**
%12 = load %struct.dirent*, %struct.dirent** %11
%13 = getelementptr inbounds %struct.dirent, %struct.dirent* %12, i32 0, i32 0
%14 = load i32, i32* %13
%15 = call i32 @strverscmp(i32 %9, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
define i32 @version_sort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to %struct.dirent**
%4 = load %struct.dirent*, %struct.dirent** %3
%5 = getelementptr inbounds %struct.dirent, %struct.dirent* %4, i64 0, i32 0
%6 = load i32, i32* %5
%7 = bitcast i8* %1 to %struct.dirent**
%8 = load %struct.dirent*, %struct.dirent** %7
%9 = getelementptr inbounds %struct.dirent, %struct.dirent* %8, i64 0, i32 0
%10 = load i32, i32* %9
%11 = tail call i32 @strverscmp(i32 %6, i32 %10)
ret i32 %11
}
/* Variables and functions */
int __infer_nondet_int();
int snprintf(char *__restrict s, size_t n, const char *__restrict format, ...) {
  int res;
  res = __infer_nondet_int();
  if (res < 0)
    while (1)
      ;
  return res;
}


x86 assembly (clang, -O0):
<snprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1142 <snprintf+0x32>
jmp    113d <snprintf+0x2d>
jmp    113d <snprintf+0x2d>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @snprintf(i8* noalias nocapture readnone %0, i64 %1, i8* noalias nocapture readnone %2, ...) {
%4 = tail call i32 (...) @__infer_nondet_int()
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %3, %6
br label %6
7: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float valor = 0;
  printf("Digite o valor do iPhone 6S: ");
  scanf("%f", &valor);
  printf("O valor de cada parcela em 10x sem juros é: %.2f\n", valor / 10.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe9a(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xeb8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xea6(%rip),%xmm0
lea    0xec8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Digite o valor do iPhone 6S: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [51 x i8] c"O valor de cada parcela em 10x sem juros \C3\A9: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = fdiv double %6, 1.000000e+01
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Digite o valor do iPhone 6S: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [51 x i8] c"O valor de cada parcela em 10x sem juros \C3\A9: %.2f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
store float 0.000000e+00, float* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = fdiv double %6, 1.000000e+01
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
/* Variables and functions */
double log(double);
double logPriorRatioGamma(double xnew, double x, double a, double b) {
  return (a - 1) * log(xnew / x) - b * (xnew - x);
}


x86 assembly (clang, -O0):
<logPriorRatioGamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xec7(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm2
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
subsd  -0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logPriorRatioGamma>:
sub    $0x28,%rsp
movsd  %xmm3,0x20(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
addsd  0xed2(%rip),%xmm2
movsd  %xmm2,0x18(%rsp)
divsd  %xmm1,%xmm0
call   1030 <log@plt>
movsd  0x10(%rsp),%xmm1
subsd  0x8(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm0
subsd  %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @logPriorRatioGamma(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %7
%10 = fsub double %9, 1.000000e+00
%11 = load double, double* %5
%12 = load double, double* %6
%13 = fdiv double %11, %12
%14 = call double @log(double %13)
%15 = load double, double* %8
%16 = load double, double* %5
%17 = load double, double* %6
%18 = fsub double %16, %17
%19 = fmul double %15, %18
%20 = fneg double %19
%21 = call double @llvm.fmuladd.f64(double %10, double %14, double %20)
ret double %21
}

LLVM IR (-O2):
define double @logPriorRatioGamma(double %0, double %1, double %2, double %3) {
%5 = fadd double %2, -1.000000e+00
%6 = fdiv double %0, %1
%7 = tail call double @log(double %6)
%8 = fsub double %0, %1
%9 = fneg double %8
%10 = fmul double %9, %3
%11 = tail call double @llvm.fmuladd.f64(double %5, double %7, double %10)
ret double %11
}
/* Variables and functions */
scalar_t__ malloc(unsigned int);
int /*<<< orphan*/ sprintf(char *, char *, unsigned int);
int /*<<< orphan*/ verror(char *);
char *vallocate(unsigned int size) {
  char *p, buf[60];
  if ((p = (char *)malloc(size)) == (char *)0) {
    sprintf(buf, "vallocate: request for %d bytes returned NULL", size);
    verror(buf);
  }
  return (p);
}


x86 assembly (clang, -O0):
<vallocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    116d <vallocate+0x3d>
lea    -0x50(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xea1(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x50(%rbp),%rdi
call   1050 <verror@plt>
mov    -0x10(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vallocate>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %edi,%ebp
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1163 <vallocate+0x33>
lea    0xeb2(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %ebp,%edx
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1050 <verror@plt>
mov    %rbx,%rax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [46 x i8] c"vallocate: request for %d bytes returned NULL\00"
define i8* @vallocate(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [60 x i8]
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %15
9: ; preds = %1
%10 = getelementptr inbounds [60 x i8], [60 x i8]* %4, i64 0, i64 0
%11 = load i32, i32* %2
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = getelementptr inbounds [60 x i8], [60 x i8]* %4, i64 0, i64 0
%14 = call i32 @verror(i8* %13)
br label %15
15: ; preds = %9, %1
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str = [46 x i8] c"vallocate: request for %d bytes returned NULL\00"
define i8* @vallocate(i32 %0) {
%2 = alloca [60 x i8]
%3 = getelementptr inbounds [60 x i8], [60 x i8]* %2, i64 0, i64 0
%4 = tail call i64 @malloc(i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %0)
%8 = call i32 @verror(i8* %3)
br label %9
9: ; preds = %6, %1
%10 = inttoptr i64 %4 to i8*
ret i8* %10
}
char *rindex(s, c)
char *s;
int c;
{ return strrchr(s, c); }


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

x86 assembly (clang, -O2):
<rindex>:
jmp    1030 <strrchr@plt>

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

LLVM IR (-O2):
define i8* @rindex(i8* %0, i32 %1) {
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i32 %1)
ret i8* %3
}
/* Variables and functions */
double sin(double);
int /*<<< orphan*/ track_stats(void *);
double sin2x(double x, void *params) {
  track_stats(params);
  return sin(x) * sin(x);
}


x86 assembly (clang, -O0):
<sin2x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <track_stats@plt>
movsd  -0x8(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @sin2x(double %0, i8* %1) {
%3 = alloca double
%4 = alloca i8*
store double %0, double* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @track_stats(i8* %5)
%7 = load double, double* %3
%8 = call double @sin(double %7)
%9 = load double, double* %3
%10 = call double @sin(double %9)
%11 = fmul double %8, %10
ret double %11
}

LLVM IR (-O2):
define double @sin2x(double %0, i8* %1) {
%3 = tail call i32 @track_stats(i8* %1)
%4 = tail call double @sin(double %0)
%5 = tail call double @sin(double %0)
%6 = fmul double %4, %5
ret double %6
}
_Noreturn void f7(int a) {
  if (a)
    exit(0);
}


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112c <f7+0x1c>
xor    %edi,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7>:
test   %edi,%edi
jne    1115 <f7+0x5>
ret
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @f7(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
unreachable
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @f7(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %1
tail call void @exit(i32 0)
unreachable
4: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, int);
void Move_Ret_To_Foreign_L(int index) {
  Inst_Printf("st", "%%o0,[%%l2+%d]", index * 4);
}


x86 assembly (clang, -O0):
<Move_Ret_To_Foreign_L>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
shl    $0x2,%edx
lea    0xed8(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Move_Ret_To_Foreign_L>:
lea    0x0(,%rdi,4),%edx
lea    0xee2(%rip),%rdi
lea    0xede(%rip),%rsi
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"st\00"
@.str.1 = [15 x i8] c"%%o0,[%%l2+%d]\00"
define void @Move_Ret_To_Foreign_L(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 4
%5 = call i32 @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"st\00"
@.str.1 = [15 x i8] c"%%o0,[%%l2+%d]\00"
define void @Move_Ret_To_Foreign_L(i32 %0) {
%2 = shl nsw i32 %0, 2
%3 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret void
}
void XSetWMProtocols() {}


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

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

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

LLVM IR (-O2):
define void @XSetWMProtocols() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void user_ping_spg(int val) { printf("Receiving %d\n", val); }


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"Receiving %d\0A\00"
define void @user_ping_spg(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}