xunge/DecIR huggingface dataset:
/* Variables and functions */
int binary_search_2(int, int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int v[] = {3,  4,  5,  14, 22, 35, 36, 39, 41, 43, 44, 45, 48, 50, 51,
             56, 60, 63, 71, 74, 77, 81, 83, 84, 89, 91, 93, 98, 99, 100};
  printf("%d\n", binary_search_2(43, v, 30));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x80(%rbp),%rdi
lea    0xeb3(%rip),%rsi
mov    $0x78,%edx
call   1040 <memcpy@plt>
lea    -0x80(%rbp),%rsi
mov    $0x2b,%edi
mov    $0x1e,%edx
call   1050 <binary_search_2@plt>
mov    %eax,%esi
lea    0xf05(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x78,%rsp
mov    0xf45(%rip),%rax
mov    %rax,0x70(%rsp)
movaps 0xf29(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xf0d(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xef1(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeb9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe9d(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe81(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x2b,%edi
mov    $0x1e,%edx
call   1040 <binary_search_2@plt>
lea    0xedc(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x78,%rsp
ret

LLVM IR (-O0):
@__const.main.v = [30 x i32] [i32 3, i32 4, i32 5, i32 14, i32 22, i32 35, i32 36, i32 39, i32 41, i32 43, i32 44, i32 45, i32 48, i32 50, i32 51, i32 56, i32 60, i32 63, i32 71, i32 74, i32 77, i32 81, i32 83, i32 84, i32 89, i32 91, i32 93, i32 98, i32 99, i32 100]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [30 x i32]
store i32 0, i32* %1
%3 = bitcast [30 x i32]* %2 to i8*
%4 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 0
%5 = call i32 @binary_search_2(i32 43, i32* %4, i32 30)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.v = [30 x i32] [i32 3, i32 4, i32 5, i32 14, i32 22, i32 35, i32 36, i32 39, i32 41, i32 43, i32 44, i32 45, i32 48, i32 50, i32 51, i32 56, i32 60, i32 63, i32 71, i32 74, i32 77, i32 81, i32 83, i32 84, i32 89, i32 91, i32 93, i32 98, i32 99, i32 100]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [30 x i32]
%2 = bitcast [30 x i32]* %1 to i8*
%3 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 0
%4 = call i32 @binary_search_2(i32 43, i32* %3, i32 30)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
double CLOCKS_PER_SEC;
scalar_t__ clock();
void cclock(double *cpu) { *cpu = ((double)clock()) / CLOCKS_PER_SEC; }


x86 assembly (clang, -O0):
<cclock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
cvtsi2sd %rax,%xmm0
mov    0x2eb9(%rip),%rax
divsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cclock>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <clock@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
define void @cclock(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = call i64 (...) @clock()
%4 = sitofp i64 %3 to double
%5 = load double, double* @CLOCKS_PER_SEC
%6 = fdiv double %4, %5
%7 = load double*, double** %2
store double %6, double* %7
ret void
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
define void @cclock(double* nocapture writeonly %0) {
%2 = tail call i64 (...) @clock()
%3 = sitofp i64 %2 to double
%4 = load double, double* @CLOCKS_PER_SEC
%5 = fdiv double %3, %4
store double %5, double* %0
ret void
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
double ticks_delta(struct timespec t0, struct timespec t1) {
  double dsec = ((double)t1.tv_sec - (double)t0.tv_sec);
  double dnsec = ((double)t1.tv_nsec - (double)t0.tv_nsec) / 1e9;
  return dsec + dnsec;
}


x86 assembly (clang, -O0):
<ticks_delta>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x18(%rbp)
cvtsi2sdq -0x18(%rbp),%xmm0
cvtsi2sdq -0x8(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
cvtsi2sdq -0x20(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  0xebf(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ticks_delta>:
cvtsi2sd %rcx,%xmm1
cvtsi2sd %rsi,%xmm0
subsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %rdx,%xmm0
cvtsi2sd %rdi,%xmm2
subsd  %xmm2,%xmm0
divsd  0xed9(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define double @ticks_delta(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca %struct.timespec
%6 = alloca %struct.timespec
%7 = alloca double
%8 = alloca double
%9 = bitcast %struct.timespec* %5 to { i64, i64 }*
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %9, i32 0, i32 0
store i64 %0, i64* %10
%11 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %9, i32 0, i32 1
store i64 %1, i64* %11
%12 = bitcast %struct.timespec* %6 to { i64, i64 }*
%13 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %12, i32 0, i32 0
store i64 %2, i64* %13
%14 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %12, i32 0, i32 1
store i64 %3, i64* %14
%15 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i32 0, i32 1
%16 = load i64, i64* %15
%17 = sitofp i64 %16 to double
%18 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 1
%19 = load i64, i64* %18
%20 = sitofp i64 %19 to double
%21 = fsub double %17, %20
store double %21, double* %7
%22 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i32 0, i32 0
%23 = load i64, i64* %22
%24 = sitofp i64 %23 to double
%25 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 0
%26 = load i64, i64* %25
%27 = sitofp i64 %26 to double
%28 = fsub double %24, %27
%29 = fdiv double %28, 1.000000e+09
store double %29, double* %8
%30 = load double, double* %7
%31 = load double, double* %8
%32 = fadd double %30, %31
ret double %32
}

LLVM IR (-O2):
define double @ticks_delta(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = sitofp i64 %3 to double
%6 = sitofp i64 %1 to double
%7 = fsub double %5, %6
%8 = sitofp i64 %2 to double
%9 = sitofp i64 %0 to double
%10 = fsub double %8, %9
%11 = fdiv double %10, 1.000000e+09
%12 = fadd double %7, %11
ret double %12
}
char *plugin_info(void) { return "Icom R10 Receiver V1.0"; }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Icom R10 Receiver V1.0\00"
define i8* @plugin_info() {
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [23 x i8] c"Icom R10 Receiver V1.0\00"
define i8* @plugin_info() {
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ compute(int);
int example_push(int *array, int array_size) {
  compute(10);
  return 0;
}


x86 assembly (clang, -O0):
<example_push>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xa,%edi
call   1030 <compute@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @example_push(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @compute(i32 10)
ret i32 0
}
int cmp_floats(const void *v1, const void *v2) {
  if (*(float *)v2 == *(float *)v1) {
    return 0;
  }
  return (*(float *)v1 > *(float *)v2) ? 1 : -1;
}


x86 assembly (clang, -O0):
<cmp_floats>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomiss (%rax),%xmm0
jne    1133 <cmp_floats+0x33>
jp     1133 <cmp_floats+0x33>
movl   $0x0,-0x4(%rbp)
jmp    1156 <cmp_floats+0x56>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
mov    $0xffffffff,%eax
mov    $0x1,%ecx
ucomiss %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_floats>:
movss  (%rsi),%xmm0
movss  (%rdi),%xmm1
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
xor    %eax,%eax
ucomiss %xmm1,%xmm0
lea    -0x1(%rcx,%rcx,1),%ecx
cmovne %ecx,%eax
cmovp  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_floats(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to float*
%4 = load float, float* %3
%5 = bitcast i8* %0 to float*
%6 = load float, float* %5
%7 = fcmp oeq float %4, %6
%8 = fcmp ogt float %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 EINVAL;
__attribute__((visibility("default"))) int
sd_bus_message_append_string_memfd(void *m, int memfd) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_message_append_string_memfd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_message_append_string_memfd>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_message_append_string_memfd(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_message_append_string_memfd(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void adc_reg32_reg32(unsigned long reg1, unsigned long reg2) {
  put8(0x11);
  put8(0xC0 | (reg2 << 3) | reg1);
}


x86 assembly (clang, -O0):
<adc_reg32_reg32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x11,%edi
call   1030 <put8@plt>
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
or     $0xc0,%rax
or     -0x8(%rbp),%rax
mov    %eax,%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adc_reg32_reg32>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x11,%edi
call   1030 <put8@plt>
shl    $0x3,%r14d
or     %r14d,%ebx
or     $0xc0,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @adc_reg32_reg32(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i32 @put8(i32 17)
%6 = load i64, i64* %4
%7 = shl i64 %6, 3
%8 = or i64 192, %7
%9 = load i64, i64* %3
%10 = or i64 %8, %9
%11 = trunc i64 %10 to i32
%12 = call i32 @put8(i32 %11)
ret void
}

LLVM IR (-O2):
define void @adc_reg32_reg32(i64 %0, i64 %1) {
%3 = tail call i32 @put8(i32 17)
%4 = shl i64 %1, 3
%5 = or i64 %4, %0
%6 = trunc i64 %5 to i32
%7 = or i32 %6, 192
%8 = tail call i32 @put8(i32 %7)
ret void
}
void stop_master_send(child_socket_val) int child_socket_val;
{ close(child_socket_val); }


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

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

LLVM IR (-O0):
define void @stop_master_send(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %3)
ret void
}

LLVM IR (-O2):
define void @stop_master_send(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %0)
ret void
}
int libxmp_hmn_linear_bend(struct context_data *ctx, struct channel_data *xc) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.context_data = type opaque
%struct.channel_data = type opaque
define i32 @libxmp_hmn_linear_bend(%struct.context_data* %0, %struct.channel_data* %1) {
%3 = alloca %struct.context_data*
%4 = alloca %struct.channel_data*
store %struct.context_data* %0, %struct.context_data** %3
store %struct.channel_data* %1, %struct.channel_data** %4
ret i32 0
}

LLVM IR (-O2):
%struct.context_data = type opaque
%struct.channel_data = type opaque
define i32 @libxmp_hmn_linear_bend(%struct.context_data* nocapture readnone %0, %struct.channel_data* nocapture readnone %1) {
ret i32 0
}
int decreasing(const void *rigth, const void *left) {
  int f = *((int *)rigth);
  int s = *((int *)left);
  if (f > s)
    return -1;
  if (f < s)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<decreasing>:
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
jle    1136 <decreasing+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <decreasing+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    114e <decreasing+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <decreasing+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decreasing>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setl   %cl
mov    $0xffffffff,%eax
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define i32 @decreasing(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 sgt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = icmp slt 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 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @decreasing(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 sgt i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void music_mute(void) {}


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

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

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

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


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

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

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

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


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ KeySchedule(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void RunEncryptionKeySchedule(uint8_t *key, uint8_t *roundKeys) {
  KeySchedule(key, roundKeys);
}


x86 assembly (clang, -O0):
<RunEncryptionKeySchedule>:
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 <KeySchedule@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RunEncryptionKeySchedule>:
jmp    1030 <KeySchedule@plt>

LLVM IR (-O0):
define void @RunEncryptionKeySchedule(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 = call i32 @KeySchedule(i32* %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @RunEncryptionKeySchedule(i32* %0, i32* %1) {
%3 = tail call i32 @KeySchedule(i32* %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ noraw();
void curs_suspend(void) {
  noraw();
  endwin();
}


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

x86 assembly (clang, -O2):
<curs_suspend>:
push   %rax
xor    %eax,%eax
call   1030 <noraw@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <endwin@plt>

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

LLVM IR (-O2):
define void @curs_suspend() {
%1 = tail call i32 (...) @noraw()
%2 = tail call i32 (...) @endwin()
ret void
}
const double *env_csv_get_state(const struct XCSF *xcsf) {
  (void)xcsf;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.XCSF = type opaque
define double* @env_csv_get_state(%struct.XCSF* %0) {
%2 = alloca %struct.XCSF*
store %struct.XCSF* %0, %struct.XCSF** %2
%3 = load %struct.XCSF*, %struct.XCSF** %2
ret double* null
}

LLVM IR (-O2):
%struct.XCSF = type opaque
define noalias double* @env_csv_get_state(%struct.XCSF* nocapture readnone %0) {
ret double* null
}
unsigned get_digit(char p) {
  if (p >= 'a')
    return 10 + p - 'a';
  if (p >= 'A')
    return 10 + p - 'A';
  return p - '0';
}


x86 assembly (clang, -O0):
<get_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <get_digit+0x29>
movsbl -0x5(%rbp),%eax
add    $0xa,%eax
sub    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <get_digit+0x52>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1148 <get_digit+0x48>
movsbl -0x5(%rbp),%eax
add    $0xa,%eax
sub    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <get_digit+0x52>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_digit>:
cmp    $0x41,%dil
mov    $0xffffffc9,%eax
mov    $0xffffffd0,%ecx
cmovge %eax,%ecx
cmp    $0x61,%dil
mov    $0xffffffa9,%eax
cmovl  %ecx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @get_digit(i8 signext %0) {
%2 = alloca i32
%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 %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = add nsw i32 10, %9
%11 = sub nsw i32 %10, 97
store i32 %11, i32* %2
br label %25
12: ; preds = %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sge i32 %14, 65
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = add nsw i32 10, %18
%20 = sub nsw i32 %19, 65
store i32 %20, i32* %2
br label %25
21: ; preds = %12
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = sub nsw i32 %23, 48
store i32 %24, i32* %2
br label %25
25: ; preds = %21, %16, %7
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @get_digit(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = icmp sgt i8 %0, 96
%4 = icmp sgt i8 %0, 64
%5 = select i1 %4, i32 -55, i32 -48
%6 = select i1 %3, i32 -87, i32 %5
%7 = add nsw i32 %6, %2
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ func_work(char *);
void call_func_work(char *x) { func_work(x); }


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

x86 assembly (clang, -O2):
<call_func_work>:
jmp    1030 <func_work@plt>

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

LLVM IR (-O2):
define void @call_func_work(i8* %0) {
%2 = tail call i32 @func_work(i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
void viaduct_len_to_bytes(uint32_t len, uint8_t *buf) {
  buf[0] = (uint8_t)(len >> 16);
  buf[1] = (uint8_t)(len >> 8);
  buf[2] = (uint8_t)(len);
}


x86 assembly (clang, -O0):
<viaduct_len_to_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
movslq -0x4(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<viaduct_len_to_bytes>:
mov    %edi,%eax
sar    $0x10,%eax
cltq
mov    %rax,(%rsi)
movslq %edi,%rax
sar    $0x8,%edi
movslq %edi,%rcx
mov    %rcx,0x8(%rsi)
mov    %rax,0x10(%rsi)
ret

LLVM IR (-O0):
define void @viaduct_len_to_bytes(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = ashr i32 %5, 16
%7 = sext i32 %6 to i64
%8 = load i64*, i64** %4
%9 = getelementptr inbounds i64, i64* %8, i64 0
store i64 %7, i64* %9
%10 = load i32, i32* %3
%11 = ashr i32 %10, 8
%12 = sext i32 %11 to i64
%13 = load i64*, i64** %4
%14 = getelementptr inbounds i64, i64* %13, i64 1
store i64 %12, i64* %14
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = load i64*, i64** %4
%18 = getelementptr inbounds i64, i64* %17, i64 2
store i64 %16, i64* %18
ret void
}

LLVM IR (-O2):
define void @viaduct_len_to_bytes(i32 %0, i64* nocapture writeonly %1) {
%3 = ashr i32 %0, 16
%4 = sext i32 %3 to i64
store i64 %4, i64* %1
%5 = ashr i32 %0, 8
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i64, i64* %1, i64 1
store i64 %6, i64* %7
%8 = sext i32 %0 to i64
%9 = getelementptr inbounds i64, i64* %1, i64 2
store i64 %8, i64* %9
ret void
}
e(n) int n;
{ printf("Error %d\n", n); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"Error %d\0A\00"
define i32 @e(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 undef
}
/* Type definitions */
struct device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sunxi_rtc_setaie(unsigned int);
int sunxi_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) {
  if (!enabled)
    sunxi_rtc_setaie(enabled);
  return 0;
}


x86 assembly (clang, -O0):
<sunxi_rtc_alarm_irq_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1131 <sunxi_rtc_alarm_irq_enable+0x21>
mov    -0xc(%rbp),%edi
call   1030 <sunxi_rtc_setaie@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sunxi_rtc_alarm_irq_enable>:
test   %esi,%esi
je     1117 <sunxi_rtc_alarm_irq_enable+0x7>
xor    %eax,%eax
ret
push   %rax
xor    %edi,%edi
call   1030 <sunxi_rtc_setaie@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.device = type { i32 }
define i32 @sunxi_rtc_alarm_irq_enable(%struct.device* %0, i32 %1) {
%3 = alloca %struct.device*
%4 = alloca i32
store %struct.device* %0, %struct.device** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = call i32 @sunxi_rtc_setaie(i32 %8)
br label %10
10: ; preds = %7, %2
ret i32 0
}

LLVM IR (-O2):
%struct.device = type { i32 }
define i32 @sunxi_rtc_alarm_irq_enable(%struct.device* nocapture readnone %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @sunxi_rtc_setaie(i32 0)
br label %6
6: ; preds = %4, %2
ret i32 0
}
double form_volume(double length_a, double length_b, double length_c) {
  return length_a * length_b * length_c;
}


x86 assembly (clang, -O0):
<form_volume>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<form_volume>:
mulsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @form_volume(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fmul double %7, %8
%10 = load double, double* %6
%11 = fmul double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @form_volume(double %0, double %1, double %2) {
%4 = fmul double %0, %1
%5 = fmul double %4, %2
ret double %5
}
int test_imm_51int64_midword_reg(long long val) {
  return ((val >> 16) & (0x51 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_51int64_midword_reg>:
test   $0x510000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_51int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 81
%6 = icmp ne i64 %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_51int64_midword_reg(i64 %0) {
%2 = and i64 %0, 5308416
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int ebc_isspace(char c) {
  return (c == 0x40) || (c == 0x05) || (c == 0x15) || (c == 0x25) ||
         (c == 0x0b) || (c == 0x0c) || (c == 0x0d);
}


x86 assembly (clang, -O0):
<ebc_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x40,%ecx
mov    %al,-0x2(%rbp)
je     1183 <ebc_isspace+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5,%ecx
mov    %al,-0x2(%rbp)
je     1183 <ebc_isspace+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x15,%ecx
mov    %al,-0x2(%rbp)
je     1183 <ebc_isspace+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x25,%ecx
mov    %al,-0x2(%rbp)
je     1183 <ebc_isspace+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xb,%ecx
mov    %al,-0x2(%rbp)
je     1183 <ebc_isspace+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xc,%ecx
mov    %al,-0x2(%rbp)
je     1183 <ebc_isspace+0x83>
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ebc_isspace>:
lea    -0x5(%rdi),%ecx
cmp    $0x3b,%cl
ja     1121 <ebc_isspace+0x21>
mov    $0x1,%eax
movzbl %cl,%ecx
movabs $0x8000001000100c1,%rdx
bt     %rcx,%rdx
jae    1121 <ebc_isspace+0x21>
ret
xor    %eax,%eax
cmp    $0xd,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @ebc_isspace(i8 signext %0) {
switch i8 %0, label %2 [
i8 64, label %5
i8 37, label %5
i8 21, label %5
i8 12, label %5
i8 11, label %5
i8 5, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 13
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
main() {
  int nota_1 = 0, nota_2 = 0;
  int tot = 0;
  nota_1 = 6;
  nota_2 = 9;
  tot = nota_1 + nota_2;
  printf("Fim de Programa\n");
  printf("O valor: %d\n", tot);
  printf("Nota 1: %d   Nota 2: %d   Total: %d\n", nota_1, nota_2, tot);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x6,-0x4(%rbp)
movl   $0x9,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf0a(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x6,%esi
mov    $0x9,%edx
mov    $0xf,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Fim de Programa\0A\00"
@.str.1 = [13 x i8] c"O valor: %d\0A\00"
@.str.2 = [37 x i8] c"Nota 1: %d Nota 2: %d Total: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 6, i32* %1
store i32 9, i32* %2
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = add nsw i32 %4, %5
store i32 %6, i32* %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"O valor: %d\0A\00"
@.str.2 = [37 x i8] c"Nota 1: %d Nota 2: %d Total: %d\0A\00"
@str = [16 x i8] c"Fim de Programa\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 15)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 6, i32 9, i32 15)
ret i32 0
}
void gtk_font_button_get_font_name() {}


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

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

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

LLVM IR (-O2):
define void @gtk_font_button_get_font_name() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
void print_crc32(uint32_t crc, char *fname) {
  if (fname) {
    printf("%08X %s\n", crc, fname);
  } else {
    printf("%08X\n", crc);
  }
}


x86 assembly (clang, -O0):
<print_crc32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1144 <print_crc32+0x34>
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1155 <print_crc32+0x45>
mov    -0x4(%rbp),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_crc32>:
mov    %rsi,%rdx
mov    %edi,%esi
test   %rdx,%rdx
je     1128 <print_crc32+0x18>
lea    0xedf(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xeda(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%08X %s\0A\00"
@.str.1 = [6 x i8] c"%08X\0A\00"
define void @print_crc32(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 %11
7: ; preds = %2
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %9)
br label %14
11: ; preds = %2
%12 = load i32, i32* %3
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %11, %7
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%08X %s\0A\00"
@.str.1 = [6 x i8] c"%08X\0A\00"
define void @print_crc32(i32 %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
br label %8
6: ; preds = %2
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %0)
br label %8
8: ; preds = %6, %4
ret void
}
char lower(char s) {
  if (('A' <= s) && (s <= 'Z'))
    return (s = 'a' + (s - 'A'));
  return s;
}


x86 assembly (clang, -O0):
<lower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     113d <lower+0x3d>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     113d <lower+0x3d>
movsbl -0x2(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %al,-0x2(%rbp)
mov    %al,-0x1(%rbp)
jmp    1143 <lower+0x43>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%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* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sle i32 65, %5
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 65
%15 = add nsw i32 97, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %3
store i8 %16, i8* %2
br label %19
17: ; preds = %7, %1
%18 = load i8, i8* %3
store i8 %18, i8* %2
br label %19
19: ; preds = %17, %11
%20 = load i8, i8* %2
ret i8 %20
}

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 rand();
int generate_key(void) { return (rand() % 89999) + 10000; }


x86 assembly (clang, -O0):
<generate_key>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x15f8f,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x2710,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_key>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x2e9a98e7,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2e,%rcx
add    %edx,%ecx
imul   $0x15f8f,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0x2710,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @generate_key() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 89999
%3 = add nsw i32 %2, 10000
ret i32 %3
}

LLVM IR (-O2):
define i32 @generate_key() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 89999
%3 = add nsw i32 %2, 10000
ret i32 %3
}
const char *builtin_exec_path(void) {
  static const char *dot = ".";
  return dot;
}


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

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

LLVM IR (-O0):
@builtin_exec_path.dot = internal global i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0)
@.str = [2 x i8] c".\00"
define i8* @builtin_exec_path() {
%1 = load i8*, i8** @builtin_exec_path.dot
ret i8* %1
}

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


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

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

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

LLVM IR (-O2):
define void @dropPrivilege() {
ret void
}
/* Type definitions */
struct unrar_arguments_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_list_footer(struct unrar_arguments_t *unrar) {
  printf("---------------------------------------------------------------------"
         "----------\n");
  return;
}


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

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

LLVM IR (-O0):
%struct.unrar_arguments_t = type { i32 }
@.str = [81 x i8] c"-------------------------------------------------------------------------------\0A\00"
define void @show_list_footer(%struct.unrar_arguments_t* %0) {
%2 = alloca %struct.unrar_arguments_t*
store %struct.unrar_arguments_t* %0, %struct.unrar_arguments_t** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.unrar_arguments_t = type { i32 }
@str = [80 x i8] c"-------------------------------------------------------------------------------\00"
define void @show_list_footer(%struct.unrar_arguments_t* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __free_cf(void *);
void CGPDFContentStreamRelease(void *item) { __free_cf(item); }


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

x86 assembly (clang, -O2):
<CGPDFContentStreamRelease>:
jmp    1030 <__free_cf@plt>

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

LLVM IR (-O2):
define void @CGPDFContentStreamRelease(i8* %0) {
%2 = tail call i32 @__free_cf(i8* %0)
ret void
}
int is_alphanumeric(char c) {
  if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
      (c >= '0' && c <= '9'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_alphanumeric>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1124 <is_alphanumeric+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jle    1158 <is_alphanumeric+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     113e <is_alphanumeric+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jle    1158 <is_alphanumeric+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1164 <is_alphanumeric+0x64>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1164 <is_alphanumeric+0x64>
movl   $0x1,-0x4(%rbp)
jmp    116b <is_alphanumeric+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_alphanumeric>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
add    $0xd0,%dil
cmp    $0xa,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_alphanumeric(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %27, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 122
br i1 %18, label %27, label %19
19: ; preds = %15, %11
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sge i32 %21, 48
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp sle i32 %25, 57
br i1 %26, label %27, label %28
27: ; preds = %23, %15, %7
store i32 1, i32* %2
br label %29
28: ; preds = %23, %19
store i32 0, i32* %2
br label %29
29: ; preds = %28, %27
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @is_alphanumeric(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = add i8 %0, -48
%6 = icmp ult i8 %5, 10
%7 = or i1 %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void usage(FILE *f) {
  fputs("trunc"
        " [-c] file sz\n\nSet the filesize of FILE to SIZE.\n\n  -c: create "
        "FILE if it doesn't exist.\n\n  Multiplier suffixes for SIZE "
        "(case-insensitive):\n      k: SIZE * 1024\n      m: SIZE * 1024 * "
        "1024\n",
        f);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0xc3,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [196 x i8] c"trunc [-c] file sz\0A\0ASet the filesize of FILE to SIZE.\0A\0A -c: create FILE if it doesn't exist.\0A\0A Multiplier suffixes for SIZE (case-insensitive):\0A k: SIZE * 1024\0A m: SIZE * 1024 * 1024\0A\00"
define void @usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputs(i8* getelementptr inbounds ([196 x i8], [196 x i8]* @.str, i64 0, i64 0), i32* %3)
ret void
}

LLVM IR (-O2):
@.str = [196 x i8] c"trunc [-c] file sz\0A\0ASet the filesize of FILE to SIZE.\0A\0A -c: create FILE if it doesn't exist.\0A\0A Multiplier suffixes for SIZE (case-insensitive):\0A k: SIZE * 1024\0A m: SIZE * 1024 * 1024\0A\00"
define void @usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([196 x i8], [196 x i8]* @.str, i64 0, i64 0), i64 195, i64 1, i32* %0)
ret void
}
void swap(char *a, char *b) {
  if (a != b) {
    *a ^= *b;
    *b ^= *a;
    *a ^= *b;
  }
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1150 <swap+0x50>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %edx,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %edx,%ecx
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
cmp    %rsi,%rdi
je     1111 <swap+0x11>
mov    (%rdi),%al
xor    (%rsi),%al
mov    %al,(%rdi)
xor    (%rsi),%al
mov    %al,(%rsi)
xor    %al,(%rdi)
ret

LLVM IR (-O0):
define void @swap(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 = icmp ne i8* %5, %6
br i1 %7, label %8, label %33
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = load i8*, i8** %3
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = xor i32 %14, %11
%16 = trunc i32 %15 to i8
store i8 %16, i8* %12
%17 = load i8*, i8** %3
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = xor i32 %22, %19
%24 = trunc i32 %23 to i8
store i8 %24, i8* %20
%25 = load i8*, i8** %4
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = load i8*, i8** %3
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = xor i32 %30, %27
%32 = trunc i32 %31 to i8
store i8 %32, i8* %28
br label %33
33: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
define void @swap(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = load i8, i8* %1
%6 = load i8, i8* %0
%7 = xor i8 %6, %5
store i8 %7, i8* %0
%8 = load i8, i8* %1
%9 = xor i8 %8, %7
store i8 %9, i8* %1
%10 = load i8, i8* %0
%11 = xor i8 %10, %9
store i8 %11, i8* %0
br label %12
12: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
time_t get_1970_sec() { return time(NULL); }


x86 assembly (clang, -O0):
<get_1970_sec>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_1970_sec>:
xor    %edi,%edi
jmp    1030 <time@plt>

LLVM IR (-O0):
define i32 @get_1970_sec() {
%1 = call i32 @time(i32* null)
ret i32 %1
}

LLVM IR (-O2):
define i32 @get_1970_sec() {
%1 = tail call i32 @time(i32* null)
ret i32 %1
}