xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M568_f(char *s) {
  debug("M568_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M568_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M568_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M568_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M568_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M568_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M568_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
char lower(char input) {
  char output;
  output = -1;
  output = (input >= 'A' && input <= 'Z') ? (input + 32) : (input);
  return output;
}


x86 assembly (clang, -O0):
<lower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0xff,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1137 <lower+0x37>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
jg     1137 <lower+0x37>
movsbl -0x1(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    113e <lower+0x3e>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @lower(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
store i8 -1, i8* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 32
br label %18
15: ; preds = %7, %1
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
br label %18
18: ; preds = %15, %11
%19 = phi i32 [ %14, %11 ], [ %17, %15 ]
%20 = trunc i32 %19 to i8
store i8 %20, i8* %3
%21 = load i8, i8* %3
ret i8 %21
}

LLVM IR (-O2):
define signext i8 @lower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ openlog(char *, int, int);
int /*<<< orphan*/ strncpy(char *, char const *, int);
void go_openlog(const char *ident, int priority, int options) {
  static char _current_ident[1001] = {0};
  strncpy(_current_ident, ident, 1001 - 1);
  openlog(_current_ident, priority, options);
}


x86 assembly (clang, -O0):
<go_openlog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x2f03(%rip),%rdi
mov    $0x3e8,%edx
call   1030 <strncpy@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0x2eec(%rip),%rdi
call   1040 <openlog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<go_openlog>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,%rsi
lea    0x2f0e(%rip),%r14
mov    %r14,%rdi
mov    $0x3e8,%edx
call   1030 <strncpy@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <openlog@plt>

LLVM IR (-O0):
@go_openlog._current_ident = internal global [1001 x i8] zeroinitializer
define void @go_openlog(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = call i32 @strncpy(i8* getelementptr inbounds ([1001 x i8], [1001 x i8]* @go_openlog._current_ident, i64 0, i64 0), i8* %7, i32 1000)
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @openlog(i8* getelementptr inbounds ([1001 x i8], [1001 x i8]* @go_openlog._current_ident, i64 0, i64 0), i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
@go_openlog._current_ident = internal global [1001 x i8] zeroinitializer
define void @go_openlog(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @strncpy(i8* getelementptr inbounds ([1001 x i8], [1001 x i8]* @go_openlog._current_ident, i64 0, i64 0), i8* %0, i32 1000)
%5 = tail call i32 @openlog(i8* getelementptr inbounds ([1001 x i8], [1001 x i8]* @go_openlog._current_ident, i64 0, i64 0), i32 %1, i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ log(int);
double log_factorial(int n) {
  double ans = 0;
  for (int i = 1; i <= n; i++)
    ans += log(i);
  return ans;
}


x86 assembly (clang, -O0):
<log_factorial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     115b <log_factorial+0x4b>
mov    -0x14(%rbp),%edi
call   1030 <log@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112a <log_factorial+0x1a>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_factorial>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    116c <log_factorial+0x5c>
mov    %edi,%r14d
neg    %r14d
xorps  %xmm0,%xmm0
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm0,(%rsp)
mov    %ebx,%edi
call   1030 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  (%rsp),%xmm0
lea    (%r14,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1130 <log_factorial+0x20>
jmp    116f <log_factorial+0x5f>
xorps  %xmm0,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define double @log_factorial(i32 %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca i32
store i32 %0, i32* %2
store double 0.000000e+00, double* %3
store i32 1, i32* %4
br label %5
5: ; preds = %15, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %2
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = load i32, i32* %4
%11 = call i64 @log(i32 %10)
%12 = sitofp i64 %11 to double
%13 = load double, double* %3
%14 = fadd double %13, %12
store double %14, double* %3
br label %15
15: ; preds = %9
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %5
18: ; preds = %5
%19 = load double, double* %3
ret double %19
}

LLVM IR (-O2):
define double @log_factorial(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %5
3: ; preds = %5, %1
%4 = phi double [ 0.000000e+00, %1 ], [ %10, %5 ]
ret double %4
5: ; preds = %1, %5
%6 = phi i32 [ %11, %5 ], [ 1, %1 ]
%7 = phi double [ %10, %5 ], [ 0.000000e+00, %1 ]
%8 = tail call i64 @log(i32 %6)
%9 = sitofp i64 %8 to double
%10 = fadd double %7, %9
%11 = add nuw i32 %6, 1
%12 = icmp eq i32 %6, %0
br i1 %12, label %3, label %5
}
void bump_restore(void) {}


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

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

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

LLVM IR (-O2):
define void @bump_restore() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glColorTableParameterfv_size(int /*<<< orphan*/);
GLint __glColorTableParameteriv_size(GLenum pname) {
  return __glColorTableParameterfv_size(pname);
}


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

x86 assembly (clang, -O2):
<__glColorTableParameteriv_size>:
jmp    1030 <__glColorTableParameterfv_size@plt>

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

LLVM IR (-O2):
define i32 @__glColorTableParameteriv_size(i32 %0) {
%2 = tail call i32 @__glColorTableParameterfv_size(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, ...);
int main(int argc, const char *argv[]) {
  float weight;
  weight = 14.2;
  printf("The weight is: %f \n", weight);
  float cookingTime;
  cookingTime = 15.0 + (15.0 * weight);
  printf("The time to cook your %flb turkey, is: %f minues ", weight,
         cookingTime);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xecd(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea9(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xea3(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
movss  0xee0(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
movsd  0xed2(%rip),%xmm1
movss  0xec2(%rip),%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"The weight is: %f \0A\00"
@.str.1 = [50 x i8] c"The time to cook your %flb turkey, is: %f minues \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0x402C666660000000, float* %6
%8 = load float, float* %6
%9 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), float %8)
%10 = load float, float* %6
%11 = fpext float %10 to double
%12 = call double @llvm.fmuladd.f64(double 1.500000e+01, double %11, double 1.500000e+01)
%13 = fptrunc double %12 to float
store float %13, float* %7
%14 = load float, float* %6
%15 = load float, float* %7
%16 = fpext float %15 to double
%17 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), float %14, double %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"The weight is: %f \0A\00"
@.str.1 = [50 x i8] c"The time to cook your %flb turkey, is: %f minues \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), float 0x402C666660000000)
%4 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), float 0x402C666660000000, double 2.280000e+02)
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int _synctex_is_equivalent_file_name(const char *lhs, const char *rhs) {
  return 0 == strcmp(lhs, rhs) ? -1 : 0;
}


x86 assembly (clang, -O0):
<_synctex_is_equivalent_file_name>:
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 <strcmp@plt>
mov    %rax,%rsi
xor    %eax,%eax
mov    %eax,%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_synctex_is_equivalent_file_name>:
push   %rax
call   1030 <strcmp@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_synctex_is_equivalent_file_name(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 i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 0, %7
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 -1, i32 0
ret i32 %10
}

LLVM IR (-O2):
define i32 @_synctex_is_equivalent_file_name(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = sext i1 %4 to i32
ret i32 %5
}
void ExttAccountTypeAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttAccountTypeAuxTable() {
ret void
}
char my2upper(char a) {
  if (a >= 'a' && a <= 'z') {
    return a - ('a' - 'A');
  }
  return a;
}


x86 assembly (clang, -O0):
<my2upper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     1133 <my2upper+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0x7a,%eax
jg     1133 <my2upper+0x33>
movsbl -0x2(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1139 <my2upper+0x39>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my2upper>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @my2upper(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
int test_imm_46uint32_mem(unsigned int *val) {
  return ((*val) & (0x46 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_46uint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x46,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_46uint32_mem>:
testb  $0x46,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_46uint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 70
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_46uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 70
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ ClearConsole();
int cClearConsole(void) {
  ClearConsole();
  return 1;
}


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

x86 assembly (clang, -O2):
<cClearConsole>:
push   %rax
xor    %eax,%eax
call   1030 <ClearConsole@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cClearConsole() {
%1 = call i32 (...) @ClearConsole()
ret i32 1
}

LLVM IR (-O2):
define i32 @cClearConsole() {
%1 = tail call i32 (...) @ClearConsole()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ tempunlink();
volatile void exiterr() {
  tempunlink();
  _exit(2);
}


x86 assembly (clang, -O0):
<exiterr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <tempunlink@plt>
mov    $0x2,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<exiterr>:
push   %rax
xor    %eax,%eax
call   1040 <tempunlink@plt>
mov    $0x2,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @exiterr() {
%1 = call i32 (...) @tempunlink()
%2 = call i32 @_exit(i32 2)
unreachable
}

LLVM IR (-O2):
define void @exiterr() {
%1 = tail call i32 (...) @tempunlink()
%2 = tail call i32 @_exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ GetTokenName(int);
int /*<<< orphan*/ error(char *, int /*<<< orphan*/);
void errorUnexpectedToken(int tok) {
  error("Unexpected token %s\n", GetTokenName(tok));
}


x86 assembly (clang, -O0):
<errorUnexpectedToken>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <GetTokenName@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1040 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errorUnexpectedToken>:
push   %rax
call   1030 <GetTokenName@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <error@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Unexpected token %s\0A\00"
define void @errorUnexpectedToken(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @GetTokenName(i32 %3)
%5 = call i32 @error(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Unexpected token %s\0A\00"
define void @errorUnexpectedToken(i32 %0) {
%2 = tail call i32 @GetTokenName(i32 %0)
%3 = tail call i32 @error(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
void ASN1_BIT_STRING_new(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @transdata_setup() {
ret void
}
int map_netdb_error(int netdb_code) {
  switch (netdb_code) {
  default:
    return 7;
  }
}


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

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

LLVM IR (-O0):
define i32 @map_netdb_error(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %4 [
]
4: ; preds = %1
ret i32 7
}

LLVM IR (-O2):
define i32 @map_netdb_error(i32 %0) {
ret i32 7
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t is_doubleton_homogenous(void **arr) { return (arr[0] == arr[1]); }


x86 assembly (clang, -O0):
<is_doubleton_homogenous>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%rcx
cmp    0x8(%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_doubleton_homogenous>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    0x8(%rdi),%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @is_doubleton_homogenous(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = load i8**, i8*** %2
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = icmp eq i8* %5, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_doubleton_homogenous(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8*, i8** %0, i64 1
%4 = load i8*, i8** %3
%5 = icmp eq i8* %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
char c;
int getc();
int /*<<< orphan*/ putchar(char);
getchar() {
  register c;
  if ((c = getc() & 0xFF) == '\r')
    c = '\n';
  putchar(c);
  return (c);
}


x86 assembly (clang, -O0):
<getchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getc@plt>
and    $0xff,%eax
mov    %eax,-0x4(%rbp)
cmp    $0xd,%eax
jne    1147 <getchar+0x27>
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getchar>:
push   %rbx
xor    %eax,%eax
call   1040 <getc@plt>
movzbl %al,%eax
cmp    $0xd,%eax
mov    $0xa,%ebx
cmovne %eax,%ebx
movsbl %bl,%edi
call   1030 <putchar@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@c = global i8 0
define i32 @getchar() {
%1 = alloca i32
%2 = call i32 (...) @getc()
%3 = and i32 %2, 255
store i32 %3, i32* %1
%4 = icmp eq i32 %3, 13
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 10, i32* %1
br label %6
6: ; preds = %5, %0
%7 = load i32, i32* %1
%8 = trunc i32 %7 to i8
%9 = call i32 @putchar(i8 signext %8)
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@c = global i8 0
define i32 @getchar() {
%1 = tail call i32 (...) @getc()
%2 = and i32 %1, 255
%3 = icmp eq i32 %2, 13
%4 = select i1 %3, i32 10, i32 %2
%5 = trunc i32 %4 to i8
%6 = tail call i32 @putchar(i8 signext %5)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
void sprint_subb_Rn(char *str, unsigned char n) {
  sprintf(str, "SUBB  A, R%X                     ", n);
}


x86 assembly (clang, -O0):
<sprint_subb_Rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprint_subb_Rn>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"SUBB A, R%X \00"
define void @sprint_subb_Rn(i8* %0, i8 zeroext %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 @sprintf(i8* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"SUBB A, R%X \00"
define void @sprint_subb_Rn(i8* nocapture writeonly %0, i8 zeroext %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void ex_segfault(void) {
  int *x = NULL;
  int y = *x;
  printf("*NULL=%d\n", y);
}


x86 assembly (clang, -O0):
<ex_segfault>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"*NULL=%d\0A\00"
define void @ex_segfault() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 undef)
ret void
}
void search_ids(void) {}


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

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

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

LLVM IR (-O2):
define void @search_ids() {
ret void
}
/* Variables and functions */
int fconf_istoken(char const, char);
int fconf_istoken_numsign(const char str) { return fconf_istoken(str, '#'); }


x86 assembly (clang, -O0):
<fconf_istoken_numsign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x23,%esi
movsbl -0x1(%rbp),%edi
call   1030 <fconf_istoken@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fconf_istoken_numsign>:
mov    $0x23,%esi
jmp    1030 <fconf_istoken@plt>

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

LLVM IR (-O2):
define i32 @fconf_istoken_numsign(i8 signext %0) {
%2 = tail call i32 @fconf_istoken(i8 signext %0, i8 signext 35)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ foo_test_3();
__attribute__((__noreturn__)) void *test3(int arg) {
  while (1)
    foo_test_3();
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <foo_test_3@plt>
jmp    111b <test3+0xb>

x86 assembly (clang, -O2):
<test3>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <foo_test_3@plt>
jmp    1120 <test3+0x10>

LLVM IR (-O0):
define i8* @test3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %3
%4 = call i32 (...) @foo_test_3()
br label %3
}

LLVM IR (-O2):
define noalias i8* @test3(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 (...) @foo_test_3()
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ config_alarm(int);
int sscanf(char *, char *, int *);
void answer_st(char *c) {
  int n;
  if (sscanf(c, "st %d", &n) == 1 && n > 0)
    config_alarm(n);
}


x86 assembly (clang, -O0):
<answer_st>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <sscanf@plt>
cmp    $0x1,%eax
jne    115b <answer_st+0x3b>
cmpl   $0x0,-0xc(%rbp)
jle    115b <answer_st+0x3b>
mov    -0xc(%rbp),%edi
call   1030 <config_alarm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<answer_st>:
push   %rax
lea    0xed8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1040 <sscanf@plt>
cmp    $0x1,%eax
jne    1144 <answer_st+0x24>
mov    0x4(%rsp),%edi
test   %edi,%edi
jle    1144 <answer_st+0x24>
call   1030 <config_alarm@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"st %d\00"
define void @answer_st(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = icmp eq i32 %4, 1
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
%8 = select i1 %5, i1 %7, i1 false
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @config_alarm(i32 %6)
br label %11
11: ; preds = %9, %1
ret void
}
int test_imm_36uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x36 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_36uint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0x36,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_36uint64_midword_mem>:
testb  $0x36,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_36uint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 54
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_36uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 3538944
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
char item_tag(char *content, int size) { return *content; }


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

x86 assembly (clang, -O2):
<item_tag>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define signext i8 @item_tag(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 i8, i8* %5
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @item_tag(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
ret i8 %3
}
void utilLP_float(float *q, float i, float coeff) { *q += (i - *q) * coeff; }


x86 assembly (clang, -O0):
<utilLP_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
subss  (%rax),%xmm0
movss  -0x10(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<utilLP_float>:
movss  (%rdi),%xmm2
subss  %xmm2,%xmm0
mulss  %xmm1,%xmm0
addss  %xmm2,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @utilLP_float(float* %0, float %1, float %2) {
%4 = alloca float*
%5 = alloca float
%6 = alloca float
store float* %0, float** %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %5
%8 = load float*, float** %4
%9 = load float, float* %8
%10 = fsub float %7, %9
%11 = load float, float* %6
%12 = load float*, float** %4
%13 = load float, float* %12
%14 = call float @llvm.fmuladd.f32(float %10, float %11, float %13)
store float %14, float* %12
ret void
}

LLVM IR (-O2):
define void @utilLP_float(float* nocapture %0, float %1, float %2) {
%4 = load float, float* %0
%5 = fsub float %1, %4
%6 = tail call float @llvm.fmuladd.f32(float %5, float %2, float %4)
store float %6, float* %0
ret void
}
/* Variables and functions */
double luaL_check_number(int);
int /*<<< orphan*/ lua_pushnumber(int /*<<< orphan*/);
int /*<<< orphan*/ sin(double);
void math_sin(void) {
  lua_pushnumber(
      sin(((luaL_check_number(1)) * ((3.14159265358979323846) / 180.0))));
}


x86 assembly (clang, -O0):
<math_sin>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
movsd  0xeba(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <sin@plt>
mov    %eax,%edi
call   1050 <lua_pushnumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_sin>:
push   %rax
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
mulsd  0xebd(%rip),%xmm0
call   1040 <sin@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <lua_pushnumber@plt>

LLVM IR (-O0):
define void @math_sin() {
%1 = call double @luaL_check_number(i32 1)
%2 = fmul double %1, 0x3F91DF46A2529D39
%3 = call i32 @sin(double %2)
%4 = call i32 @lua_pushnumber(i32 %3)
ret void
}

LLVM IR (-O2):
define void @math_sin() {
%1 = tail call double @luaL_check_number(i32 1)
%2 = fmul double %1, 0x3F91DF46A2529D39
%3 = tail call i32 @sin(double %2)
%4 = tail call i32 @lua_pushnumber(i32 %3)
ret void
}
double doy2ep(year, doy)
int year;
double doy;
{
  double date, time;
  doy2dt(year, doy, &date, &time);
  return (dt2ep(date, time));
}


x86 assembly (clang, -O0):
<doy2ep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x1,%al
call   1040 <doy2dt@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    $0x2,%al
call   1030 <dt2ep@plt>
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doy2ep>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    $0x1,%al
call   1040 <doy2dt@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mov    $0x2,%al
call   1030 <dt2ep@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @doy2ep(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%7 = load i32, i32* %3
%8 = load double, double* %4
%9 = call i32 (i32, double, double*, double*, ...) bitcast (i32 (...)* @doy2dt to i32 (i32, double, double*, double*, ...)*)(i32 %7, double %8, double* %5, double* %6)
%10 = load double, double* %5
%11 = load double, double* %6
%12 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2ep to i32 (double, double, ...)*)(double %10, double %11)
%13 = sitofp i32 %12 to double
ret double %13
}

LLVM IR (-O2):
define double @doy2ep(i32 %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = bitcast double* %3 to i8*
%6 = bitcast double* %4 to i8*
%7 = call i32 (i32, double, double*, double*, ...) bitcast (i32 (...)* @doy2dt to i32 (i32, double, double*, double*, ...)*)(i32 %0, double %1, double* %3, double* %4)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2ep to i32 (double, double, ...)*)(double %8, double %9)
%11 = sitofp i32 %10 to double
ret double %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ arch_accel();
uint32_t mpeg2_detect_accel(void) {
  uint32_t accel;
  accel = 0;
  accel |= arch_accel();
  return accel;
}


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

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

LLVM IR (-O0):
define i32 @mpeg2_detect_accel() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @arch_accel()
%3 = load i32, i32* %1
%4 = or i32 %3, %2
store i32 %4, i32* %1
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @mpeg2_detect_accel() {
%1 = tail call i32 (...) @arch_accel()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ basic_test();
int main(void) {
  basic_test();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @basic_test()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ send_talked_phonemes();
void inqSpeakUtt() { send_talked_phonemes(); }


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

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

LLVM IR (-O0):
define void @inqSpeakUtt() {
%1 = call i32 (...) @send_talked_phonemes()
ret void
}

LLVM IR (-O2):
define void @inqSpeakUtt() {
%1 = tail call i32 (...) @send_talked_phonemes()
ret void
}
int sortIntegers(const void *a, const void *b) {
  int ia = *(int *)(a), ib = *(int *)(b);
  if (ia == ib)
    return 0;
  if (ib > ia)
    return -1;
  else
    return 1;
}


x86 assembly (clang, -O0):
<sortIntegers>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jne    1136 <sortIntegers+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1155 <sortIntegers+0x55>
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    114e <sortIntegers+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <sortIntegers+0x55>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sortIntegers>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
xor    %esi,%esi
cmp    %eax,%ecx
setle  %sil
lea    -0x1(%rsi,%rsi,1),%eax
cmove  %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @sortIntegers(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = icmp sgt i32 %6, %4
%9 = select i1 %8, i32 -1, i32 1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
scalar_t__ munlockall();
int rt_memory_unlock(int pid) {
  if (munlockall() != 0) {
    fatal("rt_memory_unlock : munlockall error : ");
  }
  return 0;
}


x86 assembly (clang, -O0):
<rt_memory_unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <munlockall@plt>
cmp    $0x0,%rax
je     1148 <rt_memory_unlock+0x28>
lea    0xebd(%rip),%rdi
call   1040 <fatal@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rt_memory_unlock>:
push   %rax
xor    %eax,%eax
call   1030 <munlockall@plt>
test   %rax,%rax
je     1139 <rt_memory_unlock+0x19>
lea    0xecc(%rip),%rdi
call   1040 <fatal@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"rt_memory_unlock : munlockall error : \00"
define i32 @rt_memory_unlock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @munlockall()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @fatal(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"rt_memory_unlock : munlockall error : \00"
define i32 @rt_memory_unlock(i32 %0) {
%2 = tail call i64 (...) @munlockall()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i32 0
}
void d_putul(register unsigned char *ptr, register unsigned long data) {
  *ptr++ = (data & 0xff000000UL) >> 24;
  *ptr++ = (data & 0x00ff0000UL) >> 16;
  *ptr++ = (data & 0x0000ff00UL) >> 8;
  *ptr = (data & 0x000000ffUL) >> 0;
}


x86 assembly (clang, -O0):
<d_putul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movabs $0xff000000,%rax
and    -0x10(%rbp),%rax
shr    $0x18,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
and    $0xff0000,%rax
shr    $0x10,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
and    $0xff00,%rax
shr    $0x8,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
shr    $0x0,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_putul>:
bswap  %esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @d_putul(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 4278190080
%7 = lshr i64 %6, 24
%8 = trunc i64 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %3
store i8 %8, i8* %9
%11 = load i64, i64* %4
%12 = and i64 %11, 16711680
%13 = lshr i64 %12, 16
%14 = trunc i64 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
store i8 %14, i8* %15
%17 = load i64, i64* %4
%18 = and i64 %17, 65280
%19 = lshr i64 %18, 8
%20 = trunc i64 %19 to i8
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
store i8 %20, i8* %21
%23 = load i64, i64* %4
%24 = and i64 %23, 255
%25 = lshr i64 %24, 0
%26 = trunc i64 %25 to i8
%27 = load i8*, i8** %3
store i8 %26, i8* %27
ret void
}

LLVM IR (-O2):
define void @d_putul(i8* nocapture writeonly %0, i64 %1) {
%3 = lshr i64 %1, 24
%4 = trunc i64 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %4, i8* %0
%6 = lshr i64 %1, 16
%7 = trunc i64 %6 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %7, i8* %5
%9 = lshr i64 %1, 8
%10 = trunc i64 %9 to i8
%11 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %10, i8* %8
%12 = trunc i64 %1 to i8
store i8 %12, i8* %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _co_fd_attribute_create(int);
void zcoroutine_enable_fd(int fd) { _co_fd_attribute_create(fd); }


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

x86 assembly (clang, -O2):
<zcoroutine_enable_fd>:
jmp    1030 <_co_fd_attribute_create@plt>

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

LLVM IR (-O2):
define void @zcoroutine_enable_fd(i32 %0) {
%2 = tail call i32 @_co_fd_attribute_create(i32 %0)
ret void
}
/* Variables and functions */
int clear_array(int *array, size_t length) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @clear_array(i32* nocapture readnone %0, i64 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char, int);
int /*<<< orphan*/ stderr;
void i(int x) { fprintf(stderr, "%c%d\n", 'i', x); }


x86 assembly (clang, -O0):
<i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
lea    0xed2(%rip),%rsi
mov    $0x69,%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i>:
mov    %edi,%ecx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
mov    $0x69,%edx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @i(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext 105, i32 %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @i(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext 105, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sStbFree(void *);
void stbi_image_free(void *retval_from_stbi_load) {
  sStbFree(retval_from_stbi_load);
}


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

x86 assembly (clang, -O2):
<stbi_image_free>:
jmp    1030 <sStbFree@plt>

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

LLVM IR (-O2):
define void @stbi_image_free(i8* %0) {
%2 = tail call i32 @sStbFree(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ notify_pvcall(char *);
int pvReturnVersion(char *lpVersion) {
  notify_pvcall("f");
  return (0);
}


x86 assembly (clang, -O0):
<pvReturnVersion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <notify_pvcall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"f\00"
define i32 @pvReturnVersion(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"f\00"
define i32 @pvReturnVersion(i8* nocapture readnone %0) {
%2 = tail call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
unsigned char remapcolor(unsigned char *table, unsigned char color,
                         unsigned char unused) {
  return table[color];
}


x86 assembly (clang, -O0):
<remapcolor>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl -0x9(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<remapcolor>:
mov    %esi,%eax
mov    (%rdi,%rax,1),%al
ret

LLVM IR (-O0):
define zeroext i8 @remapcolor(i8* %0, i8 zeroext %1, i8 zeroext %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* %5
%9 = zext i8 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @remapcolor(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = zext i8 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
ret i8 %6
}
void band_constant_Bad() {
  char a[1];
  int x = (-3) & 1;
  a[x] = 0;
}


x86 assembly (clang, -O0):
<band_constant_Bad>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
movslq -0x8(%rbp),%rax
movb   $0x0,-0x1(%rbp,%rax,1)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @band_constant_Bad() {
%1 = alloca [1 x i8]
%2 = alloca i32
store i32 1, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 %4
store i8 0, i8* %5
ret void
}

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


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

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

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

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