xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int dll_fflush(int /*<<< orphan*/ *);
int __wrap_fflush(FILE *stream) { return dll_fflush(stream); }


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

x86 assembly (clang, -O2):
<__wrap_fflush>:
jmp    1030 <dll_fflush@plt>

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

LLVM IR (-O2):
define i32 @__wrap_fflush(i32* %0) {
%2 = tail call i32 @dll_fflush(i32* %0)
ret i32 %2
}
/* Variables and functions */
int INT_MAX;
int main(void) { INT_MAX >> 2; }


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

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

LLVM IR (-O0):
@INT_MAX = global i32 0
define i32 @main() {
%1 = load i32, i32* @INT_MAX
%2 = ashr i32 %1, 2
ret i32 0
}

LLVM IR (-O2):
@INT_MAX = global i32 0
define i32 @main() {
ret i32 0
}
/* Variables and functions */
double const sqrt(double const);
double rho_huber_without_sqrt_derivative(const double x2, const double c) {
  double c2 = c * c;
  if (x2 < c2)
    return 1;
  else
    return c / sqrt(x2);
}


x86 assembly (clang, -O0):
<rho_huber_without_sqrt_derivative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1157 <rho_huber_without_sqrt_derivative+0x47>
movsd  0xeb3(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117c <rho_huber_without_sqrt_derivative+0x6c>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rho_huber_without_sqrt_derivative>:
push   %rax
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1129 <rho_huber_without_sqrt_derivative+0x19>
movsd  0xed9(%rip),%xmm2
jmp    114c <rho_huber_without_sqrt_derivative+0x3c>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1139 <rho_huber_without_sqrt_derivative+0x29>
sqrtsd %xmm0,%xmm0
jmp    1148 <rho_huber_without_sqrt_derivative+0x38>
movsd  %xmm2,(%rsp)
call   1030 <sqrt@plt>
movsd  (%rsp),%xmm2
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rho_huber_without_sqrt_derivative(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
%7 = load double, double* %5
%8 = load double, double* %5
%9 = fmul double %7, %8
store double %9, double* %6
%10 = load double, double* %4
%11 = load double, double* %6
%12 = fcmp olt double %10, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store double 1.000000e+00, double* %3
br label %19
14: ; preds = %2
%15 = load double, double* %5
%16 = load double, double* %4
%17 = call double @sqrt(double %16)
%18 = fdiv double %15, %17
store double %18, double* %3
br label %19
19: ; preds = %14, %13
%20 = load double, double* %3
ret double %20
}

LLVM IR (-O2):
define double @rho_huber_without_sqrt_derivative(double %0, double %1) {
%3 = fmul double %1, %1
%4 = fcmp ogt double %3, %0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call double @sqrt(double %0)
%7 = fdiv double %1, %6
br label %8
8: ; preds = %2, %5
%9 = phi double [ %7, %5 ], [ 1.000000e+00, %2 ]
ret double %9
}
void gtk_main_level() {}


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

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

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

LLVM IR (-O2):
define void @gtk_main_level() {
ret void
}
void dpd_event(struct state *st) {}


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

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

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

LLVM IR (-O2):
%struct.state = type opaque
define void @dpd_event(%struct.state* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ klogHexWord(unsigned short);
void klogHexDword(unsigned int dword) {
  klogHexWord((unsigned short)((dword & 0xFFFF0000) >> 16));
  klogHexWord((unsigned short)(dword & 0xFFFF));
}


x86 assembly (clang, -O0):
<klogHexDword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff0000,%eax
shr    $0x10,%eax
movzwl %ax,%edi
call   1030 <klogHexWord@plt>
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
movzwl %ax,%edi
call   1030 <klogHexWord@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<klogHexDword>:
push   %rbx
mov    %edi,%ebx
shr    $0x10,%edi
call   1030 <klogHexWord@plt>
movzwl %bx,%edi
pop    %rbx
jmp    1030 <klogHexWord@plt>

LLVM IR (-O0):
define void @klogHexDword(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -65536
%5 = lshr i32 %4, 16
%6 = trunc i32 %5 to i16
%7 = call i32 @klogHexWord(i16 zeroext %6)
%8 = load i32, i32* %2
%9 = and i32 %8, 65535
%10 = trunc i32 %9 to i16
%11 = call i32 @klogHexWord(i16 zeroext %10)
ret void
}

LLVM IR (-O2):
define void @klogHexDword(i32 %0) {
%2 = lshr i32 %0, 16
%3 = trunc i32 %2 to i16
%4 = tail call i32 @klogHexWord(i16 zeroext %3)
%5 = trunc i32 %0 to i16
%6 = tail call i32 @klogHexWord(i16 zeroext %5)
ret void
}
/* Variables and functions */
char *pfcq_mstring(char *, char const *);
char *pfcq_strdup(const char *_string) { return pfcq_mstring("%s", _string); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i8* @pfcq_strdup(i8* %0) {
%2 = tail call i8* @pfcq_mstring(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %2
}
void gll_weights_order3_square(double *out_8586666373437537841) {
  out_8586666373437537841[0] = 0.166666666666667;
  out_8586666373437537841[1] = 0.833333333333333;
  out_8586666373437537841[2] = 0.833333333333333;
  out_8586666373437537841[3] = 0.166666666666667;
}


x86 assembly (clang, -O0):
<gll_weights_order3_square>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xeec(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0xee4(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movsd  0xeba(%rip),%xmm0
movsd  %xmm0,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gll_weights_order3_square>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movaps 0xeff(%rip),%xmm0
movups %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @gll_weights_order3_square(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
store double 0x3FC5555555555561, double* %4
%5 = load double*, double** %2
%6 = getelementptr inbounds double, double* %5, i64 1
store double 0x3FEAAAAAAAAAAAA8, double* %6
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 2
store double 0x3FEAAAAAAAAAAAA8, double* %8
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 3
store double 0x3FC5555555555561, double* %10
ret void
}

LLVM IR (-O2):
define void @gll_weights_order3_square(double* nocapture writeonly %0) {
%2 = bitcast double* %0 to <2 x double>*
store <2 x double> <double 0x3FC5555555555561, double 0x3FEAAAAAAAAAAAA8>, <2 x double>* %2
%3 = getelementptr inbounds double, double* %0, i64 2
%4 = bitcast double* %3 to <2 x double>*
store <2 x double> <double 0x3FEAAAAAAAAAAAA8, double 0x3FC5555555555561>, <2 x double>* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int cookie;
  if (cookie == 0x41424344) {
    printf("you win!\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x41424344,-0x8(%rbp)
jne    1138 <main+0x28>
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"you win!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1094861636
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int test_imm_3Cint8_mem(signed char *val) {
  return ((*val) & (0x3C << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_3Cint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 60
%7 = icmp ne i32 %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_3Cint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 60
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void INT_Excep_TPU8_TGI8A(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU8_TGI8A() {
ret void
}
void dummy_note_free(void *data) {}


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

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

LLVM IR (-O0):
define void @dummy_note_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @dummy_note_free(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ copy_32bit(char *);
int /*<<< orphan*/ swap_32bit(int /*<<< orphan*/);
uint32_t ntoh_32bit(char *ptr) { return swap_32bit(copy_32bit(ptr)); }


x86 assembly (clang, -O0):
<ntoh_32bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <copy_32bit@plt>
mov    %eax,%edi
call   1040 <swap_32bit@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ntoh_32bit(i8* %0) {
%2 = tail call i32 @copy_32bit(i8* %0)
%3 = tail call i32 @swap_32bit(i32 %2)
ret i32 %3
}
void wmf_moveto(long x, long y) {
  x = x;
  y = y;
}


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

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

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

LLVM IR (-O2):
define void @wmf_moveto(i64 %0, i64 %1) {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int padcon_dobldobl_initialize_parameter_homotopy(int idx, int verbose) {
  int fail;
  int precision = 1;
  int pars[2];
  double *c;
  pars[0] = idx;
  pars[1] = verbose;
  fail = _ada_use_c2phc4c(878, &precision, pars, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_dobldobl_initialize_parameter_homotopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x36e,%edi
lea    -0x10(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_dobldobl_initialize_parameter_homotopy>:
sub    $0x18,%rsp
movl   $0x1,0xc(%rsp)
mov    %edi,0x10(%rsp)
mov    %esi,0x14(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    $0x36e,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @padcon_dobldobl_initialize_parameter_homotopy(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [2 x i32]
%8 = alloca double*
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 1, i32* %6
%9 = load i32, i32* %3
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 %9, i32* %10
%11 = load i32, i32* %4
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %11, i32* %12
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%14 = load double*, double** %8
%15 = call i32 @_ada_use_c2phc4c(i32 878, i32* %6, i32* %13, double* %14, i32 0)
store i32 %15, i32* %5
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @padcon_dobldobl_initialize_parameter_homotopy(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca [2 x i32]
%5 = bitcast i32* %3 to i8*
store i32 1, i32* %3
%6 = bitcast [2 x i32]* %4 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 %0, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 %1, i32* %8
%9 = call i32 @_ada_use_c2phc4c(i32 878, i32* %3, i32* %7, double* undef, i32 0)
ret i32 %9
}
short Minval(short a, short b) {
  if (a < b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<Minval>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movswl -0x4(%rbp),%eax
movswl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jge    112f <Minval+0x2f>
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    1137 <Minval+0x37>
mov    -0x6(%rbp),%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Minval>:
mov    %esi,%eax
cmp    %ax,%di
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define signext i16 @Minval(i16 signext %0, i16 signext %1) {
%3 = icmp slt i16 %0, %1
%4 = select i1 %3, i16 %0, i16 %1
ret i16 %4
}
/* Variables and functions */
scalar_t__ strtoul(char *, char **, int /*<<< orphan*/);
int str2int(char *s) {
  char *ep;
  return (int)strtoul(s, &ep, 0);
}


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

x86 assembly (clang, -O2):
<str2int>:
push   %rax
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <strtoul@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @str2int(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strtoul(i8* %4, i8** %3, i32 0)
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @str2int(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtoul(i8* %0, i8** %2, i32 0)
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
void *realloc(void *, size_t);
int /*<<< orphan*/ sysbail(char *, unsigned long);
void *brealloc(void *p, size_t size) {
  p = realloc(p, size);
  if (p == NULL)
    sysbail("failed to realloc %lu bytes", (unsigned long)size);
  return p;
}


x86 assembly (clang, -O0):
<brealloc>:
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   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115c <brealloc+0x3c>
mov    -0x10(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1030 <sysbail@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <brealloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1030 <sysbail@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [28 x i8] c"failed to realloc %lu bytes\00"
define noalias i8* @brealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @sysbail(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int cache_invalidate_file_(char const *, int);
int cache_try_invalidate_file(const char *filename) {
  return cache_invalidate_file_(filename, false);
}


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

x86 assembly (clang, -O2):
<cache_try_invalidate_file>:
xor    %esi,%esi
jmp    1030 <cache_invalidate_file_@plt>

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

LLVM IR (-O2):
define i32 @cache_try_invalidate_file(i8* %0) {
%2 = tail call i32 @cache_invalidate_file_(i8* %0, i32 0)
ret i32 %2
}
/* Type definitions */
struct mempool {
  int dummy;
};

/* Variables and functions */
void *mp_start_fast_noalign(struct mempool *, unsigned int);
void *mp_start_noalign(struct mempool *pool, unsigned size) {
  return mp_start_fast_noalign(pool, size);
}


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

x86 assembly (clang, -O2):
<mp_start_noalign>:
jmp    1030 <mp_start_fast_noalign@plt>

LLVM IR (-O0):
%struct.mempool = type { i32 }
define i8* @mp_start_noalign(%struct.mempool* %0, i32 %1) {
%3 = alloca %struct.mempool*
%4 = alloca i32
store %struct.mempool* %0, %struct.mempool** %3
store i32 %1, i32* %4
%5 = load %struct.mempool*, %struct.mempool** %3
%6 = load i32, i32* %4
%7 = call i8* @mp_start_fast_noalign(%struct.mempool* %5, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
%struct.mempool = type { i32 }
define i8* @mp_start_noalign(%struct.mempool* %0, i32 %1) {
%3 = tail call i8* @mp_start_fast_noalign(%struct.mempool* %0, i32 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void FCEUD_NetworkClose(void) { printf("Close Network"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Close Network\00"
define void @FCEUD_NetworkClose() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Close Network\00"
define void @FCEUD_NetworkClose() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int read_mail_box(int, int);
bool read_rmb(int index) {
  int right_index = (index + (5 - 1)) % 5;
  return read_mail_box(true, right_index);
}


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

x86 assembly (clang, -O2):
<read_rmb>:
add    $0x4,%edi
movslq %edi,%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
mov    $0x1,%edi
jmp    1030 <read_mail_box@plt>

LLVM IR (-O0):
define i32 @read_rmb(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 4
%6 = srem i32 %5, 5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @read_mail_box(i32 1, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @read_rmb(i32 %0) {
%2 = add nsw i32 %0, 4
%3 = srem i32 %2, 5
%4 = tail call i32 @read_mail_box(i32 1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int rom_present(char *);
int s3_bahamas64_available() { return rom_present("bahamas64.bin"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"bahamas64.bin\00"
define i32 @s3_bahamas64_available() {
%1 = call i32 @rom_present(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [14 x i8] c"bahamas64.bin\00"
define i32 @s3_bahamas64_available() {
%1 = tail call i32 @rom_present(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
const char *get_string() { return "String"; }


x86 assembly (clang, -O0):
<get_string>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_string>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"String\00"
define i8* @get_string() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"String\00"
define i8* @get_string() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void __attribute__((destructor)) testd(void) { write(1, "destructor\n", 11); }


x86 assembly (clang, -O0):
<testd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0xb,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testd>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0xb,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"destructor\0A\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @testd, i8* null }]
define void @testd() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"destructor\0A\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @testd, i8* null }]
define void @testd() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11)
ret void
}
/* Variables and functions */
int str_replace(char *, char const *, int, char *, char *);
int str_dos2unix(char *dest, const char *src, int dest_size) {
  return str_replace(dest, src, dest_size, "\r\n", "\n");
}


x86 assembly (clang, -O0):
<str_dos2unix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xecb(%rip),%rcx
lea    0xec5(%rip),%r8
call   1030 <str_replace@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_dos2unix>:
lea    0xee9(%rip),%rcx
lea    0xee3(%rip),%r8
jmp    1030 <str_replace@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0D\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @str_dos2unix(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @str_replace(i8* %7, i8* %8, i32 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @str_dos2unix(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @str_replace(i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 %4
}
long absdiff_j(long x, long y) {
  long result;
  int ntest = x <= y;
  if (ntest)
    goto Else;
  result = x - y;
  goto Done;
Else:
  result = y - x;
Done:
  return result;
}


x86 assembly (clang, -O0):
<absdiff_j>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setle  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     112e <absdiff_j+0x2e>
jmp    113f <absdiff_j+0x3f>
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    114b <absdiff_j+0x4b>
mov    -0x10(%rbp),%rax
sub    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<absdiff_j>:
mov    %rdi,%rax
sub    %rsi,%rax
neg    %rax
sub    %rsi,%rdi
cmovg  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @absdiff_j(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = sub nsw i64 %1, %0
%5 = sub nsw i64 %0, %1
%6 = select i1 %3, i64 %5, i64 %4
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int x, y;
  scanf("%d%d", &x, &y);
  if (x > y)
    printf("YES");
  else
    printf("NO");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1160 <main+0x40>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
jmp    116c <main+0x4c>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    (%rsp),%eax
lea    0xec2(%rip),%rax
lea    0xebf(%rip),%rdi
cmovg  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %6, %7
%9 = select i1 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%10 = call i32 @printf(i8* dereferenceable(1) %9)
ret i32 0
}
const void f() {}


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

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
/* Type definitions */
struct intset {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ intset_find(struct intset *, int /*<<< orphan*/, size_t *);
int intset_insert(struct intset *, size_t, int /*<<< orphan*/);
int intset_add(struct intset *s, int64_t val) {
  size_t index;
  if (!intset_find(s, val, &index)) {
    return intset_insert(s, index, val);
  }
  return 0;
}


x86 assembly (clang, -O0):
<intset_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x20(%rbp),%rdx
call   1040 <intset_find@plt>
cmp    $0x0,%eax
jne    1160 <intset_add+0x40>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <intset_insert@plt>
mov    %eax,-0x4(%rbp)
jmp    1167 <intset_add+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intset_add>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rsp,%rdx
call   1040 <intset_find@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
jne    1146 <intset_add+0x26>
mov    (%rsp),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1030 <intset_insert@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.intset = type { i32 }
define i32 @intset_add(%struct.intset* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.intset*
%5 = alloca i32
%6 = alloca i64
store %struct.intset* %0, %struct.intset** %4
store i32 %1, i32* %5
%7 = load %struct.intset*, %struct.intset** %4
%8 = load i32, i32* %5
%9 = call i32 @intset_find(%struct.intset* %7, i32 %8, i64* %6)
%10 = icmp ne i32 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %2
%12 = load %struct.intset*, %struct.intset** %4
%13 = load i64, i64* %6
%14 = load i32, i32* %5
%15 = call i32 @intset_insert(%struct.intset* %12, i64 %13, i32 %14)
store i32 %15, i32* %3
br label %17
16: ; preds = %2
store i32 0, i32* %3
br label %17
17: ; preds = %16, %11
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.intset = type { i32 }
define i32 @intset_add(%struct.intset* %0, i32 %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = call i32 @intset_find(%struct.intset* %0, i32 %1, i64* %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i64, i64* %3
%9 = call i32 @intset_insert(%struct.intset* %0, i64 %8, i32 %1)
br label %10
10: ; preds = %2, %7
%11 = phi i32 [ %9, %7 ], [ 0, %2 ]
ret i32 %11
}
void midi_reset() {}


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

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

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

LLVM IR (-O2):
define void @midi_reset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int i;
  printf("TABELA DE CARACTERES\n");
  for (i = 33; i <= 126; i++) {
    printf("%d=%c\n", i, i);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x21,-0x8(%rbp)
cmpl   $0x7e,-0x8(%rbp)
jg     1160 <main+0x50>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
mov    $0x21,%ebx
lea    0xec4(%rip),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    $0x7f,%ebx
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [22 x i8] c"TABELA DE CARACTERES\0A\00"
@.str.1 = [7 x i8] c"%d=%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i32 33, i32* %2
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 126
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%d=%c\0A\00"
@str = [21 x i8] c"TABELA DE CARACTERES\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 33, %0 ], [ %5, %2 ]
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 %3)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 127
br i1 %6, label %7, label %2
7: ; preds = %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int ceph_frag_bits(int /*<<< orphan*/);
int /*<<< orphan*/ ceph_frag_make(int, int);
int ceph_frag_value(int /*<<< orphan*/);
__u32 ceph_frag_make_child(__u32 f, int by, int i) {
  int newbits = ceph_frag_bits(f) + by;
  return ceph_frag_make(newbits, ceph_frag_value(f) | (i << (24 - newbits)));
}


x86 assembly (clang, -O0):
<ceph_frag_make_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ceph_frag_bits@plt>
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <ceph_frag_value@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
mov    -0xc(%rbp),%eax
mov    $0x18,%ecx
sub    -0x10(%rbp),%ecx
shl    %cl,%eax
or     %eax,%esi
call   1040 <ceph_frag_make@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceph_frag_make_child>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
call   1030 <ceph_frag_bits@plt>
add    %eax,%ebp
mov    %r14d,%edi
call   1050 <ceph_frag_value@plt>
mov    $0x18,%cl
sub    %bpl,%cl
shl    %cl,%ebx
or     %eax,%ebx
mov    %ebp,%edi
mov    %ebx,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <ceph_frag_make@plt>

LLVM IR (-O0):
define i32 @ceph_frag_make_child(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = call i32 @ceph_frag_bits(i32 %8)
%10 = load i32, i32* %5
%11 = add nsw i32 %9, %10
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = load i32, i32* %4
%14 = call i32 @ceph_frag_value(i32 %13)
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = sub nsw i32 24, %16
%18 = shl i32 %15, %17
%19 = or i32 %14, %18
%20 = call i32 @ceph_frag_make(i32 %12, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
define i32 @ceph_frag_make_child(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @ceph_frag_bits(i32 %0)
%5 = add nsw i32 %4, %1
%6 = tail call i32 @ceph_frag_value(i32 %0)
%7 = sub nsw i32 24, %5
%8 = shl i32 %2, %7
%9 = or i32 %8, %6
%10 = tail call i32 @ceph_frag_make(i32 %5, i32 %9)
ret i32 %10
}
int checkPrivledge() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @checkPrivledge() {
ret i32 1
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ unlink(char const *);
int pt_comm_close(int fd, const char *addrstr) {
  if (addrstr != NULL) {
    unlink(addrstr);
  }
  return close(fd);
}


x86 assembly (clang, -O0):
<pt_comm_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1143 <pt_comm_close+0x23>
mov    -0x10(%rbp),%rdi
call   1030 <unlink@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pt_comm_close>:
push   %rbx
mov    %edi,%ebx
test   %rsi,%rsi
je     1130 <pt_comm_close+0x10>
mov    %rsi,%rdi
call   1030 <unlink@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>

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

LLVM IR (-O2):
define i32 @pt_comm_close(i32 %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @unlink(i8* %1)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 @close(i32 %0)
ret i32 %7
}
int test_imm_91uint32_reg(unsigned int val) {
  return ((val) & (0x91 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_91uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x91,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_91uint32_reg>:
test   $0x91,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_91uint32_reg(i32 %0) {
%2 = and i32 %0, 145
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int f(int a) { return (a << 3) << 6; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
shl    $0x6,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
shl    $0x9,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = shl i32 %0, 9
ret i32 %2
}
const char *td_reiserfs_version(void) { return "none"; }


x86 assembly (clang, -O0):
<td_reiserfs_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<td_reiserfs_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"none\00"
define i8* @td_reiserfs_version() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"none\00"
define i8* @td_reiserfs_version() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
void gtk_editable_paste_clipboard() {}


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

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

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

LLVM IR (-O2):
define void @gtk_editable_paste_clipboard() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usb_send_block_and_status(unsigned char *, int,
                                             int /*<<< orphan*/);
void usb_send_descriptor(unsigned char *device_descriptor, int descriptor_len,
                         int buffer_len) {
  int len = descriptor_len < buffer_len ? descriptor_len : buffer_len;
  usb_send_block_and_status(device_descriptor, len, 0);
}


x86 assembly (clang, -O0):
<usb_send_descriptor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1139 <usb_send_descriptor+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    113f <usb_send_descriptor+0x2f>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
xor    %edx,%edx
call   1030 <usb_send_block_and_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usb_send_descriptor>:
cmp    %edx,%esi
cmovge %edx,%esi
xor    %edx,%edx
jmp    1030 <usb_send_block_and_status@plt>

LLVM IR (-O0):
define void @usb_send_descriptor(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load i32, i32* %5
br label %15
13: ; preds = %3
%14 = load i32, i32* %6
br label %15
15: ; preds = %13, %11
%16 = phi i32 [ %12, %11 ], [ %14, %13 ]
store i32 %16, i32* %7
%17 = load i8*, i8** %4
%18 = load i32, i32* %7
%19 = call i32 @usb_send_block_and_status(i8* %17, i32 %18, i32 0)
ret void
}

LLVM IR (-O2):
define void @usb_send_descriptor(i8* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
%5 = select i1 %4, i32 %1, i32 %2
%6 = tail call i32 @usb_send_block_and_status(i8* %0, i32 %5, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glInitNames();
void InitNames(void) { glInitNames(); }


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

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

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

LLVM IR (-O2):
define void @InitNames() {
%1 = tail call i32 (...) @glInitNames()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t op_ge(uint32_t a, uint32_t b) { return a >= b; }


x86 assembly (clang, -O0):
<op_ge>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_ge>:
xor    %eax,%eax
cmp    %esi,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @op_ge(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sge i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @op_ge(i32 %0, i32 %1) {
%3 = icmp sge i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct map {
  int dummy;
};

/* Variables and functions */
struct map *map_init(int);
struct map *map_new() {
  return map_init(10);
}


x86 assembly (clang, -O0):
<map_new>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <map_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_new>:
mov    $0xa,%edi
jmp    1030 <map_init@plt>

LLVM IR (-O0):
%struct.map = type { i32 }
define %struct.map* @map_new() {
%1 = call %struct.map* @map_init(i32 10)
ret %struct.map* %1
}

LLVM IR (-O2):
%struct.map = type { i32 }
define %struct.map* @map_new() {
%1 = tail call %struct.map* @map_init(i32 10)
ret %struct.map* %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: revoke file ...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"usage: revoke file ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"usage: revoke file ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void CsvSetEncoding(char *encoding) {}


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

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

LLVM IR (-O0):
define void @CsvSetEncoding(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @CsvSetEncoding(i8* nocapture %0) {
ret void
}
void ERROR() {}


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

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

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

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