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

/* Variables and functions */
int av_process_program(struct program *);
int av_start_program(char const **, struct program **);
int /*<<< orphan*/ av_unref_obj(struct program *);
int av_run_program(const char **prog) {
  int res;
  struct program *pr;
  res = av_start_program(prog, &pr);
  if (res < 0)
    return res;
  res = av_process_program(pr);
  av_unref_obj(pr);
  return res;
}


x86 assembly (clang, -O0):
<av_run_program>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <av_start_program@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1161 <av_run_program+0x31>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117c <av_run_program+0x4c>
mov    -0x20(%rbp),%rdi
call   1050 <av_process_program@plt>
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <av_unref_obj@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_run_program>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rsi
call   1040 <av_start_program@plt>
test   %eax,%eax
js     115b <av_run_program+0x2b>
mov    0x8(%rsp),%rdi
call   1050 <av_process_program@plt>
mov    %eax,%ebx
mov    0x8(%rsp),%rdi
call   1030 <av_unref_obj@plt>
jmp    115d <av_run_program+0x2d>
mov    %eax,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.program = type { i32 }
define i32 @av_run_program(i8** %0) {
%2 = alloca i32
%3 = alloca i8**
%4 = alloca i32
%5 = alloca %struct.program*
store i8** %0, i8*** %3
%6 = load i8**, i8*** %3
%7 = call i32 @av_start_program(i8** %6, %struct.program** %5)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %18
12: ; preds = %1
%13 = load %struct.program*, %struct.program** %5
%14 = call i32 @av_process_program(%struct.program* %13)
store i32 %14, i32* %4
%15 = load %struct.program*, %struct.program** %5
%16 = call i32 @av_unref_obj(%struct.program* %15)
%17 = load i32, i32* %4
store i32 %17, i32* %2
br label %18
18: ; preds = %12, %10
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
%struct.program = type { i32 }
define i32 @av_run_program(i8** %0) {
%2 = alloca %struct.program*
%3 = bitcast %struct.program** %2 to i8*
%4 = call i32 @av_start_program(i8** %0, %struct.program** %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load %struct.program*, %struct.program** %2
%8 = call i32 @av_process_program(%struct.program* %7)
%9 = load %struct.program*, %struct.program** %2
%10 = call i32 @av_unref_obj(%struct.program* %9)
br label %11
11: ; preds = %1, %6
%12 = phi i32 [ %8, %6 ], [ %4, %1 ]
ret i32 %12
}
/* Variables and functions */
char *itex2MML_copy3(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
char *itex2MML_copy_string(const char *str) {
  return itex2MML_copy3(str, 0, 0);
}


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

x86 assembly (clang, -O2):
<itex2MML_copy_string>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <itex2MML_copy3@plt>

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

LLVM IR (-O2):
define i8* @itex2MML_copy_string(i8* %0) {
%2 = tail call i8* @itex2MML_copy3(i8* %0, i32 0, i32 0)
ret i8* %2
}
/* Variables and functions */
scalar_t__ _U_Qfcmp(long double, long double, int);
int _U_Qfeq(long double a, long double b) { return (_U_Qfcmp(a, b, 4) != 0); }


x86 assembly (clang, -O0):
<_U_Qfeq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
mov    $0x4,%edi
call   1030 <_U_Qfcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_U_Qfeq>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fldt   0x40(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
mov    $0x4,%edi
call   1030 <_U_Qfcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @_U_Qfeq(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call i64 @_U_Qfcmp(x86_fp80 %5, x86_fp80 %6, i32 4)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @_U_Qfeq(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call i64 @_U_Qfcmp(x86_fp80 %0, x86_fp80 %1, i32 4)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
float bits_to_float(int /*<<< orphan*/);
int /*<<< orphan*/ fgetc(unsigned int);
float fget_float(unsigned handle) { return bits_to_float(fgetc(handle)); }


x86 assembly (clang, -O0):
<fget_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <fgetc@plt>
mov    %eax,%edi
call   1040 <bits_to_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fget_float>:
push   %rax
call   1030 <fgetc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <bits_to_float@plt>

LLVM IR (-O0):
define float @fget_float(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @fgetc(i32 %3)
%5 = call float @bits_to_float(i32 %4)
ret float %5
}

LLVM IR (-O2):
define float @fget_float(i32 %0) {
%2 = tail call i32 @fgetc(i32 %0)
%3 = tail call float @bits_to_float(i32 %2)
ret float %3
}
int tu(a)
unsigned int a;
{
  if (a < 1000 && a > 2000)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<tu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jae    112d <tu+0x2d>
cmpl   $0x7d0,-0x8(%rbp)
jbe    112d <tu+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    1134 <tu+0x34>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @tu(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RIFSIGNALED(int);
int /*<<< orphan*/ RIFTIMEDOUT(int);
int RIFEXITED(int status) {
  return !RIFSIGNALED(status) && !RIFTIMEDOUT(status);
}


x86 assembly (clang, -O0):
<RIFEXITED>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <RIFSIGNALED@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
jne    1156 <RIFEXITED+0x36>
mov    -0x4(%rbp),%edi
call   1030 <RIFTIMEDOUT@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RIFEXITED>:
push   %rbx
mov    %edi,%ebx
call   1040 <RIFSIGNALED@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1132 <RIFEXITED+0x12>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <RIFTIMEDOUT@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @RIFEXITED(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @RIFSIGNALED(i32 %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @RIFTIMEDOUT(i32 %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @RIFEXITED(i32 %0) {
%2 = tail call i32 @RIFSIGNALED(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @RIFTIMEDOUT(i32 %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
int fibonacci(int x) {
  if ((x >= 1) && (x <= 2))
    return 1;
  else
    return (fibonacci(x - 1) + fibonacci(x - 2));
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     113b <fibonacci+0x2b>
cmpl   $0x2,-0x8(%rbp)
jg     113b <fibonacci+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    115e <fibonacci+0x4e>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacci@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
add    $0xffffffff,%ebp
mov    $0x1,%ebx
cmp    $0x2,%ebp
jb     1144 <fibonacci+0x34>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebp,%edi
call   1030 <fibonacci@plt>
add    %eax,%ebx
add    $0xfffffffe,%ebp
cmp    $0x1,%ebp
ja     1130 <fibonacci+0x20>
add    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fibonacci(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 1
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %18
10: ; preds = %6, %1
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 1
%13 = call i32 @fibonacci(i32 %12)
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 2
%16 = call i32 @fibonacci(i32 %15)
%17 = add nsw i32 %13, %16
store i32 %17, i32* %2
br label %18
18: ; preds = %10, %9
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @fibonacci(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 2
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %10, %4 ], [ 0, %1 ]
%8 = tail call i32 @fibonacci(i32 %5)
%9 = add nsw i32 %6, -2
%10 = add nsw i32 %8, %7
%11 = add i32 %6, -3
%12 = icmp ult i32 %11, 2
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = add i32 %10, 1
br label %15
15: ; preds = %13, %1
%16 = phi i32 [ 1, %1 ], [ %14, %13 ]
ret i32 %16
}
/* Type definitions */
struct Var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pA(char *, char const *, char const *, char const *);
void __func_add_uint(struct Var *avar, const char *areg, const char *lreg,
                     const char *rreg) {
  pA("%s = %s + %s;", areg, lreg, rreg);
}


x86 assembly (clang, -O0):
<__func_add_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xec5(%rip),%rdi
call   1030 <pA@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s + %s;\00"
define void @__func_add_uint(%struct.Var* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Var*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Var* %0, %struct.Var** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s + %s;\00"
define void @__func_add_uint(%struct.Var* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
ret void
}
/* Variables and functions */
double __nv_ldexp(double, int);
double ldexp(double __a, int __b) { return __nv_ldexp(__a, __b); }


x86 assembly (clang, -O0):
<ldexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
call   1030 <__nv_ldexp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldexp>:
jmp    1030 <__nv_ldexp@plt>

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

LLVM IR (-O2):
define double @ldexp(double %0, i32 %1) {
%3 = tail call double @__nv_ldexp(double %0, i32 %1)
ret double %3
}
/* Type definitions */
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int connect(int, struct sockaddr *, int);
int /*<<< orphan*/ log_unix_error(char *);
int Connect(int sockfd, struct sockaddr *serv_addr, int addrlen) {
  int rc;
  if ((rc = connect(sockfd, serv_addr, addrlen)) < 0)
    log_unix_error("Connect error");
  return rc;
}


x86 assembly (clang, -O0):
<Connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <connect@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jge    1159 <Connect+0x39>
lea    0xeac(%rip),%rdi
call   1030 <log_unix_error@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Connect>:
push   %rbx
call   1040 <connect@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <Connect+0x18>
lea    0xecd(%rip),%rdi
call   1030 <log_unix_error@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@.str = [14 x i8] c"Connect error\00"
define i32 @Connect(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = tail call i32 @connect(i32 %0, %struct.sockaddr* %1, i32 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @log_unix_error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
int rmdir(char *);
int fb_lfs_rmdir(char *path) { return (rmdir(path)); }


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

x86 assembly (clang, -O2):
<fb_lfs_rmdir>:
jmp    1030 <rmdir@plt>

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

LLVM IR (-O2):
define i32 @fb_lfs_rmdir(i8* nocapture %0) {
%2 = tail call i32 @rmdir(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ glColor3us(unsigned short, unsigned short, unsigned short);
void Color3us(unsigned short r, unsigned short g, unsigned short b) {
  glColor3us(r, g, b);
}


x86 assembly (clang, -O0):
<Color3us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    -0x2(%rbp),%cx
mov    -0x4(%rbp),%ax
movzwl %cx,%edi
movzwl %ax,%esi
movzwl -0x6(%rbp),%edx
call   1030 <glColor3us@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Color3us>:
jmp    1030 <glColor3us@plt>

LLVM IR (-O0):
define void @Color3us(i16 zeroext %0, i16 zeroext %1, i16 zeroext %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%7 = load i16, i16* %4
%8 = load i16, i16* %5
%9 = load i16, i16* %6
%10 = call i32 @glColor3us(i16 zeroext %7, i16 zeroext %8, i16 zeroext %9)
ret void
}

LLVM IR (-O2):
define void @Color3us(i16 zeroext %0, i16 zeroext %1, i16 zeroext %2) {
%4 = tail call i32 @glColor3us(i16 zeroext %0, i16 zeroext %1, i16 zeroext %2)
ret void
}
unsigned char ADC_Conversion(unsigned char Ch) {
  unsigned char a;
  Ch = Ch & 0x07;
  return a;
}


x86 assembly (clang, -O0):
<ADC_Conversion>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x7,%eax
mov    %al,-0x1(%rbp)
movzbl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @ADC_Conversion(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = and i32 %5, 7
%7 = trunc i32 %6 to i8
store i8 %7, i8* %2
%8 = load i8, i8* %3
ret i8 %8
}

LLVM IR (-O2):
define zeroext i8 @ADC_Conversion(i8 zeroext %0) {
ret i8 undef
}
__attribute__((no, noclone)) int f1(int x) { return x < 0 ? ~x : x; }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111f <f1+0x1f>
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1125 <f1+0x25>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    %edi,%eax
sar    $0x1f,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = xor i32 %6, -1
br label %10
8: ; preds = %1
%9 = load i32, i32* %2
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @f1(i32 %0) {
%2 = ashr i32 %0, 31
%3 = xor i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
__attribute__((__weak__, __always___)) int
softboundmpx_strcasecmp(const char *s1, const char *s2) {
  return strcasecmp(s1, s2);
}


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

x86 assembly (clang, -O2):
<softboundmpx_strcasecmp>:
jmp    1030 <strcasecmp@plt>

LLVM IR (-O0):
define weak i32 @softboundmpx_strcasecmp(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 = load i8*, i8** %4
%7 = call i32 @strcasecmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define weak i32 @softboundmpx_strcasecmp(i8* %0, i8* %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ glp_assert_(char *, char *, int);
int strcmp(void const *, void const *);
int _glp_avl_strcmp(void *info, const void *key1, const void *key2) {
  ((void)((info == info) ||
          (glp_assert_(
               "info == info",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/Erez-Buchnik/Bouma2/refs/"
               "heads/master/dep/glpk/glpavl.c",
               43),
           1)));
  return strcmp(key1, key2);
}


x86 assembly (clang, -O0):
<_glp_avl_strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmp    -0x8(%rbp),%rcx
mov    %al,-0x19(%rbp)
je     1164 <_glp_avl_strcmp+0x44>
lea    0xeb2(%rip),%rdi
lea    0xeb8(%rip),%rsi
mov    $0x2b,%edx
call   1040 <glp_assert_@plt>
mov    $0x1,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_glp_avl_strcmp>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"info == info\00"
@.str.1 = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Erez-Buchnik/Bouma2/refs/heads/master/dep/glpk/glpavl.c\00"
define i32 @_glp_avl_strcmp(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %4
%9 = icmp eq i8* %7, %8
br i1 %9, label %12, label %10
10: ; preds = %3
%11 = call i32 @glp_assert_(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str.1, i64 0, i64 0), i32 43)
br label %12
12: ; preds = %10, %3
%13 = phi i1 [ true, %3 ], [ true, %10 ]
%14 = zext i1 %13 to i32
%15 = load i8*, i8** %5
%16 = load i8*, i8** %6
%17 = call i32 @strcmp(i8* %15, i8* %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @_glp_avl_strcmp(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture %2) {
%4 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(1) %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ terminal_writeline(char const *);
void printl(const char *data) { terminal_writeline(data); }


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

x86 assembly (clang, -O2):
<printl>:
jmp    1030 <terminal_writeline@plt>

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

LLVM IR (-O2):
define void @printl(i8* %0) {
%2 = tail call i32 @terminal_writeline(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/ *);
int /*<<< orphan*/ cond_destroy(int /*<<< orphan*/ *);
int pthread_cond_destroy(pthread_cond_t *cond) {
  assert(cond);
  cond_destroy(cond);
  return 0;
}


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

x86 assembly (clang, -O2):
<pthread_cond_destroy>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1040 <cond_destroy@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @pthread_cond_destroy(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @assert(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @cond_destroy(i32* %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @pthread_cond_destroy(i32* %0) {
%2 = tail call i32 @assert(i32* %0)
%3 = tail call i32 @cond_destroy(i32* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int main(void) {
  sleep(600);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sleep(i32 600)
ret i32 0
}
void SockCleanup(void) { return; }


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

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

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

LLVM IR (-O2):
define void @SockCleanup() {
ret void
}
int pci_iov_bus_range(struct pci_bus *bus) { return 0; }


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

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

LLVM IR (-O0):
%struct.pci_bus = type opaque
define i32 @pci_iov_bus_range(%struct.pci_bus* %0) {
%2 = alloca %struct.pci_bus*
store %struct.pci_bus* %0, %struct.pci_bus** %2
ret i32 0
}

LLVM IR (-O2):
%struct.pci_bus = type opaque
define i32 @pci_iov_bus_range(%struct.pci_bus* nocapture readnone %0) {
ret i32 0
}
void transfer_RGB_FLOAT_to_RGBA_FLOAT(float *(*output), float *input) {
  (*output)[0] = input[0];
  (*output)[1] = input[1];
  (*output)[2] = input[2];
  (*output)[3] = 1.0;
}


x86 assembly (clang, -O0):
<transfer_RGB_FLOAT_to_RGBA_FLOAT>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movss  0xea8(%rip),%xmm0
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<transfer_RGB_FLOAT_to_RGBA_FLOAT>:
movss  (%rsi),%xmm0
mov    (%rdi),%rax
movss  %xmm0,(%rax)
movss  0x4(%rsi),%xmm0
movss  %xmm0,0x4(%rax)
movss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rax)
movl   $0x3f800000,0xc(%rax)
ret

LLVM IR (-O0):
define void @transfer_RGB_FLOAT_to_RGBA_FLOAT(float** %0, float* %1) {
%3 = alloca float**
%4 = alloca float*
store float** %0, float*** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float**, float*** %3
%9 = load float*, float** %8
%10 = getelementptr inbounds float, float* %9, i64 0
store float %7, float* %10
%11 = load float*, float** %4
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float**, float*** %3
%15 = load float*, float** %14
%16 = getelementptr inbounds float, float* %15, i64 1
store float %13, float* %16
%17 = load float*, float** %4
%18 = getelementptr inbounds float, float* %17, i64 2
%19 = load float, float* %18
%20 = load float**, float*** %3
%21 = load float*, float** %20
%22 = getelementptr inbounds float, float* %21, i64 2
store float %19, float* %22
%23 = load float**, float*** %3
%24 = load float*, float** %23
%25 = getelementptr inbounds float, float* %24, i64 3
store float 1.000000e+00, float* %25
ret void
}

LLVM IR (-O2):
define void @transfer_RGB_FLOAT_to_RGBA_FLOAT(float** nocapture %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = load float*, float** %0
store float %3, float* %4
%5 = getelementptr inbounds float, float* %1, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %4, i64 1
store float %6, float* %7
%8 = getelementptr inbounds float, float* %1, i64 2
%9 = load float, float* %8
%10 = getelementptr inbounds float, float* %4, i64 2
store float %9, float* %10
%11 = getelementptr inbounds float, float* %4, i64 3
store float 1.000000e+00, float* %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("hello,\n\tworld\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"hello,\0A\09world\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"hello,\0A\09world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void sws_isSupportedInput() {}


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

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

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

LLVM IR (-O2):
define void @sws_isSupportedInput() {
ret void
}
void sighandler(int signo) { (void)signo; }


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

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

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

LLVM IR (-O2):
define void @sighandler(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_gettid;
int /*<<< orphan*/ syscall(int /*<<< orphan*/);
pid_t get_tid() { return syscall(SYS_gettid); }


x86 assembly (clang, -O0):
<get_tid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tid>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_gettid = global i32 0
define i32 @get_tid() {
%1 = load i32, i32* @SYS_gettid
%2 = call i32 @syscall(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@SYS_gettid = global i32 0
define i32 @get_tid() {
%1 = load i32, i32* @SYS_gettid
%2 = tail call i32 @syscall(i32 %1)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t read_u64(const void *const ptr) { return *(uint64_t *)ptr; }


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

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

LLVM IR (-O0):
define i32 @read_u64(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @read_u64(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_RESPID;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_RESPID_it;
void OCSP_RESPID_free(OCSP_RESPID *a) {
  ASN1_item_free((ASN1_VALUE *)a, &OCSP_RESPID_it);
}


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

x86 assembly (clang, -O2):
<OCSP_RESPID_free>:
mov    0x2ec9(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@OCSP_RESPID_it = global i32 0
define void @OCSP_RESPID_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @OCSP_RESPID_it)
ret void
}

LLVM IR (-O2):
@OCSP_RESPID_it = global i32 0
define void @OCSP_RESPID_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @OCSP_RESPID_it)
ret void
}
void __attribute__((noipa)) check(float r, int g, int g2) {
  if (r < 7.39 || r > 7.41 || g != 6 || g2 != 6)
    __builtin_abort();
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xecc(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     116d <check+0x5d>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb9(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     116d <check+0x5d>
cmpl   $0x6,-0x8(%rbp)
jne    116d <check+0x5d>
cmpl   $0x6,-0xc(%rbp)
je     1172 <check+0x62>
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
push   %rax
cvtss2sd %xmm0,%xmm0
movsd  0xee3(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1139 <check+0x29>
ucomisd 0xedd(%rip),%xmm0
ja     1139 <check+0x29>
cmp    $0x6,%edi
jne    1139 <check+0x29>
cmp    $0x6,%esi
jne    1139 <check+0x29>
pop    %rax
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define void @check(float %0, i32 %1, i32 %2) {
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
store float %0, float* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = fcmp olt double %8, 7.390000e+00
br i1 %9, label %20, label %10
10: ; preds = %3
%11 = load float, float* %4
%12 = fpext float %11 to double
%13 = fcmp ogt double %12, 7.410000e+00
br i1 %13, label %20, label %14
14: ; preds = %10
%15 = load i32, i32* %5
%16 = icmp ne i32 %15, 6
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %6
%19 = icmp ne i32 %18, 6
br i1 %19, label %20, label %21
20: ; preds = %17, %14, %10, %3
unreachable
21: ; preds = %17
ret void
}

LLVM IR (-O2):
define void @check(float %0, i32 %1, i32 %2) {
%4 = fpext float %0 to double
%5 = fcmp olt double %4, 7.390000e+00
br i1 %5, label %12, label %6
6: ; preds = %3
%7 = fcmp ogt double %4, 7.410000e+00
%8 = icmp ne i32 %1, 6
%9 = or i1 %7, %8
%10 = icmp ne i32 %2, 6
%11 = or i1 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %6, %3
tail call void @abort()
unreachable
13: ; preds = %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *const);
scalar_t__ malloc(int);
void buffer_underflow(void) {
  char *const memory = (char *)malloc(sizeof(int));
  memory[-1] = '!';
  free(memory);
}


x86 assembly (clang, -O0):
<buffer_underflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x21,-0x1(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_underflow>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
movb   $0x21,-0x1(%rax)
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @buffer_underflow() {
%1 = alloca i8*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = getelementptr inbounds i8, i8* %4, i64 -1
store i8 33, i8* %5
%6 = load i8*, i8** %1
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
define void @buffer_underflow() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i8*
%3 = getelementptr inbounds i8, i8* %2, i64 -1
store i8 33, i8* %3
%4 = tail call i32 @free(i8* %2)
ret void
}
void *dfn_rp() { return 0; }


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

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

LLVM IR (-O0):
define i8* @dfn_rp() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @dfn_rp() {
ret i8* null
}
int main(void) {
  int i = 0;
  int count = 0;
  int j = 0;
  for (i = 0; i < count; i++) {
    j = ((i + j) * 4) % 100;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1155 <main+0x55>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
shl    $0x2,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1127 <main+0x27>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %2
br label %5
5: ; preds = %15, %0
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = load i32, i32* %2
%11 = load i32, i32* %4
%12 = add nsw i32 %10, %11
%13 = mul nsw i32 %12, 4
%14 = srem i32 %13, 100
store i32 %14, i32* %4
br label %15
15: ; preds = %9
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %5
18: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int ArgItem();
void Act_Join(void) { ArgItem(), ArgItem(); }


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

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

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

LLVM IR (-O2):
define void @Act_Join() {
%1 = tail call i32 (...) @ArgItem()
%2 = tail call i32 (...) @ArgItem()
ret void
}
int accel_y() {}


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

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

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

LLVM IR (-O2):
define i32 @accel_y() {
ret i32 undef
}
/* Type definitions */
struct mesh_var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ line_border_cond(struct mesh_var *, int const, int, int);
scalar_t__ line_mesh(struct mesh_var *, int const);
void periodic_1D_mesh(struct mesh_var *mv) {
  const int n_a = 2;
  if (line_mesh(mv, n_a) == 0)
    exit(5);
  line_border_cond(mv, n_a, -7, -7);
}


x86 assembly (clang, -O0):
<periodic_1D_mesh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1050 <line_mesh@plt>
cmp    $0x0,%rax
jne    1165 <periodic_1D_mesh+0x35>
mov    $0x5,%edi
call   1030 <exit@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
mov    $0xfffffff9,%ecx
mov    %ecx,%edx
call   1040 <line_border_cond@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<periodic_1D_mesh>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2,%esi
call   1050 <line_mesh@plt>
test   %rax,%rax
je     115b <periodic_1D_mesh+0x2b>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0xfffffff9,%edx
mov    $0xfffffff9,%ecx
pop    %rbx
jmp    1040 <line_border_cond@plt>
mov    $0x5,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
%struct.mesh_var = type { i32 }
define void @periodic_1D_mesh(%struct.mesh_var* %0) {
%2 = alloca %struct.mesh_var*
%3 = alloca i32
store %struct.mesh_var* %0, %struct.mesh_var** %2
store i32 2, i32* %3
%4 = load %struct.mesh_var*, %struct.mesh_var** %2
%5 = call i64 @line_mesh(%struct.mesh_var* %4, i32 2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @exit(i32 5)
unreachable
9: ; preds = %1
%10 = load %struct.mesh_var*, %struct.mesh_var** %2
%11 = call i32 @line_border_cond(%struct.mesh_var* %10, i32 2, i32 -7, i32 -7)
ret void
}

LLVM IR (-O2):
%struct.mesh_var = type { i32 }
define void @periodic_1D_mesh(%struct.mesh_var* %0) {
%2 = tail call i64 @line_mesh(%struct.mesh_var* %0, i32 2)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @exit(i32 5)
unreachable
6: ; preds = %1
%7 = tail call i32 @line_border_cond(%struct.mesh_var* %0, i32 2, i32 -7, i32 -7)
ret void
}
int ffloor(float f) { return f >= 0 ? (int)f : ((int)(f - 1)); }


x86 assembly (clang, -O0):
<ffloor>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1127 <ffloor+0x27>
cvttss2si -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    113f <ffloor+0x3f>
movss  -0x4(%rbp),%xmm0
movss  0xecc(%rip),%xmm1
subss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffloor>:
movss  0xef8(%rip),%xmm1
addss  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpnless %xmm0,%xmm2
andps  %xmm2,%xmm1
andnps %xmm0,%xmm2
orps   %xmm1,%xmm2
cvttss2si %xmm2,%eax
ret

LLVM IR (-O0):
define i32 @ffloor(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oge float %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = fptosi float %6 to i32
br label %12
8: ; preds = %1
%9 = load float, float* %2
%10 = fsub float %9, 1.000000e+00
%11 = fptosi float %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ %7, %5 ], [ %11, %8 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @ffloor(float %0) {
%2 = fcmp ult float %0, 0.000000e+00
%3 = fadd float %0, -1.000000e+00
%4 = select i1 %2, float %3, float %0
%5 = fptosi float %4 to i32
ret i32 %5
}
void unixLeaveMutex(void) {}


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

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

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

LLVM IR (-O2):
define void @unixLeaveMutex() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ analyzedir(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    printf("\n No folder specified. \n");
    return -1;
  }
  analyzedir(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1158 <main+0x38>
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <main+0x4c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <analyzedir@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1139 <main+0x19>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
mov    0x8(%rsi),%rdi
call   1040 <analyzedir@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [24 x i8] c"\0A No folder specified. \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %10
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @analyzedir(i8* %8)
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ -1, %4 ], [ 0, %6 ]
ret i32 %11
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
int main() { printf("EOF is in fact: %d.\n", EOF); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [21 x i8] c"EOF is in fact: %d.\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pause();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("hello world\n");
  pause();
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @pause()
ret i32 0
}
void MM_Init(void) {}


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

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

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

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