xunge/DecIR huggingface dataset:
int up_smp_call_function(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @up_smp_call_function() {
ret i32 0
}

LLVM IR (-O2):
define i32 @up_smp_call_function() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  int i = 0;
  for (; i < 100; ++i) {
    printf("%d\n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    1154 <main+0x44>
mov    -0x14(%rbp),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x64,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %6, %3 ]
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 100
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 0
}
/* Type definitions */
struct sip_msg {
  int dummy;
};

/* Variables and functions */
int check_register(struct sip_msg *, int);
int allow_register_2(struct sip_msg *msg, char *allow_file, char *deny_file) {
  return check_register(msg, (int)(long)allow_file);
}


x86 assembly (clang, -O0):
<allow_register_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %eax,%esi
call   1030 <check_register@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allow_register_2>:
jmp    1030 <check_register@plt>

LLVM IR (-O0):
%struct.sip_msg = type { i32 }
define i32 @allow_register_2(%struct.sip_msg* %0, i8* %1, i8* %2) {
%4 = alloca %struct.sip_msg*
%5 = alloca i8*
%6 = alloca i8*
store %struct.sip_msg* %0, %struct.sip_msg** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.sip_msg*, %struct.sip_msg** %4
%8 = load i8*, i8** %5
%9 = ptrtoint i8* %8 to i64
%10 = trunc i64 %9 to i32
%11 = call i32 @check_register(%struct.sip_msg* %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.sip_msg = type { i32 }
define i32 @allow_register_2(%struct.sip_msg* %0, i8* %1, i8* nocapture readnone %2) {
%4 = ptrtoint i8* %1 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @check_register(%struct.sip_msg* %0, i32 %5)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_and_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_sqrt_ps(int /*<<< orphan*/);
__m128 t1(__m128 a, __m128 b) {
  a = _mm_sqrt_ps(a);
  b = _mm_sqrt_ps(b);
  return _mm_and_ps(a, b);
}


x86 assembly (clang, -O0):
<t1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <_mm_sqrt_ps@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <_mm_sqrt_ps@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_and_ps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1040 <_mm_sqrt_ps@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <_mm_sqrt_ps@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_mm_and_ps@plt>

LLVM IR (-O0):
define i32 @t1(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 = call i32 @_mm_sqrt_ps(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @_mm_sqrt_ps(i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @_mm_and_ps(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @t1(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_sqrt_ps(i32 %0)
%4 = tail call i32 @_mm_sqrt_ps(i32 %1)
%5 = tail call i32 @_mm_and_ps(i32 %3, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
void get_rate(double *rate) {
  printf("Interest rate: ");
  scanf(" %lf", rate);
}


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

x86 assembly (clang, -O2):
<get_rate>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <scanf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Interest rate: \00"
@.str.1 = [5 x i8] c" %lf\00"
define void @get_rate(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = load double*, double** %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %4)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Interest rate: \00"
@.str.1 = [5 x i8] c" %lf\00"
define void @get_rate(double* %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %0)
ret void
}
void ff_hevc_put_hevc_uni_epel_hv32_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv32_8_avx2() {
ret void
}
int test_imm_A7int64_highword_reg(long long val) {
  return ((val >> 32) & (0xA7 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_A7int64_highword_reg>:
movabs $0xa700000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A7int64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 167
%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_A7int64_highword_reg(i64 %0) {
%2 = and i64 %0, 717259538432
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void gtk_tree_store_iter_is_valid() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ write_msr_single_core(int, int /*<<< orphan*/,
                                         int /*<<< orphan*/,
                                         int /*<<< orphan*/);
void write_msr(int socket, off_t msr, uint64_t val) {
  write_msr_single_core(socket, 0, msr, val);
}


x86 assembly (clang, -O0):
<write_msr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %esi,%esi
call   1030 <write_msr_single_core@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_msr>:
mov    %edx,%ecx
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <write_msr_single_core@plt>

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

LLVM IR (-O2):
define void @write_msr(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @write_msr_single_core(i32 %0, i32 0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
float tempConverter(float);
int main(void) {
  float fahrenheit, celsius;
  int lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  printf("Celsius - Fahrenheit Table\n\n");
  while (fahrenheit <= upper) {
    celsius = tempConverter(fahrenheit);
    printf("%6.1f\t%8.0f\n", celsius, fahrenheit);
    fahrenheit += step;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x12c,-0x14(%rbp)
movl   $0x14,-0x18(%rbp)
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm1
cvtsi2ssl -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11a8 <main+0x88>
movss  -0x8(%rbp),%xmm0
call   1040 <tempConverter@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe90(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cvtsi2ssl -0x18(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1152 <main+0x32>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [29 x i8] c"Celsius - Fahrenheit Table\0A\0A\00"
@.str.1 = [13 x i8] c"%6.1f\09%8.0f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 300, i32* %5
store i32 20, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %13, %0
%9 = load float, float* %2
%10 = load i32, i32* %5
%11 = sitofp i32 %10 to float
%12 = fcmp ole float %9, %11
br i1 %12, label %13, label %25
13: ; preds = %8
%14 = load float, float* %2
%15 = call float @tempConverter(float %14)
store float %15, float* %3
%16 = load float, float* %3
%17 = fpext float %16 to double
%18 = load float, float* %2
%19 = fpext float %18 to double
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %17, double %19)
%21 = load i32, i32* %6
%22 = sitofp i32 %21 to float
%23 = load float, float* %2
%24 = fadd float %23, %22
store float %24, float* %2
br label %8
25: ; preds = %8
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@str = [28 x i8] c"Celsius - Fahrenheit Table\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dummy_function();
int main(int argc, char *argv[]) {
  dummy_function();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @dummy_function()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("*%d*\n", 959);
  printf("*%2d*\n", 959);
  printf("*%10d*\n", 959);
  printf("*%-10d*\n", 959);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x3bf,%esi
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
mov    $0x3bf,%esi
call   1030 <printf@plt>
lea    0xeb5(%rip),%rdi
mov    $0x3bf,%esi
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
mov    $0x3bf,%esi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x3bf,%esi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x3bf,%esi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x3bf,%esi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
mov    $0x3bf,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"*%d*\0A\00"
@.str.1 = [7 x i8] c"*%2d*\0A\00"
@.str.2 = [8 x i8] c"*%10d*\0A\00"
@.str.3 = [9 x i8] c"*%-10d*\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 959)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 959)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 959)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 959)
%5 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getcns(int);
int cmd_info(int argc, char **argv) {
  getcns(0x000A);
  getcns(0x1000);
  getcns(0x0001);
  getcns(0x0002);
  getcns(0x0003);
  getcns(0x0004);
  return 0;
}


x86 assembly (clang, -O0):
<cmd_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xa,%edi
call   1030 <getcns@plt>
mov    $0x1000,%edi
call   1030 <getcns@plt>
mov    $0x1,%edi
call   1030 <getcns@plt>
mov    $0x2,%edi
call   1030 <getcns@plt>
mov    $0x3,%edi
call   1030 <getcns@plt>
mov    $0x4,%edi
call   1030 <getcns@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_info>:
push   %rax
mov    $0xa,%edi
call   1030 <getcns@plt>
mov    $0x1000,%edi
call   1030 <getcns@plt>
mov    $0x1,%edi
call   1030 <getcns@plt>
mov    $0x2,%edi
call   1030 <getcns@plt>
mov    $0x3,%edi
call   1030 <getcns@plt>
mov    $0x4,%edi
call   1030 <getcns@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cmd_info(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @getcns(i32 10)
%6 = call i32 @getcns(i32 4096)
%7 = call i32 @getcns(i32 1)
%8 = call i32 @getcns(i32 2)
%9 = call i32 @getcns(i32 3)
%10 = call i32 @getcns(i32 4)
ret i32 0
}

LLVM IR (-O2):
define i32 @cmd_info(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @getcns(i32 10)
%4 = tail call i32 @getcns(i32 4096)
%5 = tail call i32 @getcns(i32 1)
%6 = tail call i32 @getcns(i32 2)
%7 = tail call i32 @getcns(i32 3)
%8 = tail call i32 @getcns(i32 4)
ret i32 0
}
void f6(void) {
  goto a;
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
a:
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f6() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void ICOutput_int(int parameter) {
  printf("Parameter = "
         "%d"
         "\n",
         parameter);
}


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"Parameter = %d\0A\00"
define void @ICOutput_int(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ by_two(int *, int);
int /*<<< orphan*/ printf(char *, int);
void main() {
  int arr[11] = {5, 5, 5, 5, 5, 5, 5, 5, 5, 5};
  by_two(arr, 11);
  printf("%d", arr[5]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x2c,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xb,%esi
call   1040 <by_two@plt>
mov    -0x1c(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movups 0xef1(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xb,%esi
call   1040 <by_two@plt>
mov    0x14(%rsp),%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [11 x i32] [i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 0]
@.str = [3 x i8] c"%d\00"
define void @main() {
%1 = alloca [11 x i32]
%2 = bitcast [11 x i32]* %1 to i8*
%3 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 0
%4 = call i32 @by_two(i32* %3, i32 11)
%5 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 5
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@__const.main.arr = [11 x i32] [i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 0]
@.str = [3 x i8] c"%d\00"
define void @main() {
%1 = alloca [11 x i32]
%2 = bitcast [11 x i32]* %1 to i8*
%3 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 0
%4 = call i32 @by_two(i32* %3, i32 11)
%5 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 5
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int qsort_compare_uint32(const void *a, const void *b) {
  return (*(uint32_t *)a - *(uint32_t *)b);
}


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

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

LLVM IR (-O0):
define i32 @qsort_compare_uint32(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @qsort_compare_uint32(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 = sub nsw i32 %4, %6
ret i32 %7
}
void WWDG_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @WWDG_IRQHandler() {
ret void
}
/* Variables and functions */
int find_pos(int *, int, int);
void quick_sort(int *arr, int low, int high) {
  int pos;
  if (low < high) {
    pos = find_pos(arr, low, high);
    quick_sort(arr, low, pos - 1);
    quick_sort(arr, pos + 1, high);
  }
}


x86 assembly (clang, -O0):
<quick_sort>:
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    1174 <quick_sort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <find_pos@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1030 <quick_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <quick_sort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick_sort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quick_sort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <find_pos@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <quick_sort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quick_sort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @quick_sort(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* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %3
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @find_pos(i32* %12, i32 %13, i32 %14)
store i32 %15, i32* %7
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = sub nsw i32 %18, 1
%20 = load i32*, i32** %4
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
%23 = load i32, i32* %6
br label %24
24: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
define void @quick_sort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @find_pos(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quick_sort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int strlen(char *s) {
  int i = 0;
  for (;; i++) {
    if (s[i] == 0) {
      break;
    }
  }
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1129 <strlen+0x29>
jmp    113c <strlen+0x3c>
jmp    112e <strlen+0x2e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

LLVM IR (-O0):
define i32 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %4
br label %17
13: ; preds = %4
br label %14
14: ; preds = %13
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %12
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ subset(int *, int, int);
int main(int argc, char *argv[]) {
  int s[] = {1, 2, 3, 4, 5};
  subset(s, 5, 2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x20(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
mov    $0x2,%edx
call   1030 <subset@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xef6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
mov    $0x2,%edx
call   1030 <subset@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.s = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [5 x i32]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = bitcast [5 x i32]* %5 to i8*
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%8 = call i32 @subset(i32* %7, i32 5, i32 2)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i32]
%4 = bitcast [5 x i32]* %3 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%6 = call i32 @subset(i32* %5, i32 5, i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_java_comments() {
  test_parser_verify_parse(test_parser_sourcefile("java", " //comment"), "java",
                           "", "//comment", 0);
}


x86 assembly (clang, -O0):
<test_java_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xebd(%rip),%rdx
lea    0xeb8(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_java_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xec6(%rip),%rdx
lea    0xec1(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"java\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_java_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"java\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_java_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cubic(float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float a;
  scanf("%f", &a);
  cubic(a);
  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
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
call   1030 <cubic@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
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
call   1030 <cubic@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%4 = load float, float* %2
%5 = call i32 @cubic(float %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = call i32 @cubic(float %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ le64toh(int /*<<< orphan*/);
void unaligned_write_le64(void *_u, uint64_t a) {
  struct __attribute__((__packed__, __may_alias__)) {
    uint64_t x;
  } *u = _u;
  u->x = le64toh(a);
}


x86 assembly (clang, -O0):
<unaligned_write_le64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <le64toh@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unaligned_write_le64>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <le64toh@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.anon = type { i32 }
define void @unaligned_write_le64(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %struct.anon*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.anon*
store %struct.anon* %7, %struct.anon** %5
%8 = load i32, i32* %4
%9 = call i32 @le64toh(i32 %8)
%10 = load %struct.anon*, %struct.anon** %5
%11 = getelementptr inbounds %struct.anon, %struct.anon* %10, i32 0, i32 0
store i32 %9, i32* %11
ret void
}

LLVM IR (-O2):
define void @unaligned_write_le64(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @le64toh(i32 %1)
%4 = bitcast i8* %0 to i32*
store i32 %3, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _efree(int /*<<< orphan*/);
int /*<<< orphan*/ free(int /*<<< orphan*/);
void _php_stream_free3() { (1 ? free(0) : _efree(0)); }


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

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

LLVM IR (-O0):
define void @_php_stream_free3() {
%1 = call i32 @free(i32 0)
ret void
}

LLVM IR (-O2):
define void @_php_stream_free3() {
%1 = tail call i32 @free(i32 0)
ret void
}
void av_content_light_metadata_create_side_data() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void base_private_function(struct base *obj) {
  printf("base_private_function!!\n");
}


x86 assembly (clang, -O0):
<base_private_function>:
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):
<base_private_function>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

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


x86 assembly (clang, -O0):
<ProgramExit>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<ProgramExit>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @ProgramExit() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @ProgramExit() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, int, int /*<<< orphan*/ *, size_t);
ssize_t sendfile(int out_fd, int in_fd, off_t *ofs, size_t count) {
  return syscall(187, out_fd, in_fd, ofs, count);
}


x86 assembly (clang, -O0):
<sendfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    $0xbb,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendfile>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    $0xbb,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @sendfile(i32 %0, i32 %1, i32* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i64 %3, i64* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load i64, i64* %8
%13 = call i32 @syscall(i32 187, i32 %9, i32 %10, i32* %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @sendfile(i32 %0, i32 %1, i32* %2, i64 %3) {
%5 = tail call i32 @syscall(i32 187, i32 %0, i32 %1, i32* %2, i64 %3)
ret i32 %5
}
int FLOOR(double var) {
  int integer = (int)var;
  return integer;
}


x86 assembly (clang, -O0):
<FLOOR>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FLOOR>:
cvttsd2si %xmm0,%eax
ret

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

LLVM IR (-O2):
define i32 @FLOOR(double %0) {
%2 = fptosi double %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello, Chelsy!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Hello, Chelsy!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"Hello, Chelsy!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fail(char *);
void *malloc(long);
void *safe_malloc(long inSize) {
  void *outMemory;
  outMemory = malloc(inSize);
  if (!outMemory)
    fail("Out of memory");
  return outMemory;
}


x86 assembly (clang, -O0):
<safe_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <safe_malloc+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <fail@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_malloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <safe_malloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <fail@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"Out of memory\00"
define noalias i8* @safe_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fail(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void b_file_write(void *data, unsigned char *name, unsigned int size) {
  asm volatile("call 0x00100198" : : "S"(data), "D"(name), "c"(size));
}


x86 assembly (clang, -O0):
<b_file_write>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%ecx
call   100198 <completed.0+0xfc178>
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_file_write>:
mov    %edx,%ecx
mov    %rsi,%rax
mov    %rdi,%rsi
mov    %rax,%rdi
call   100198 <completed.0+0xfc178>
ret

LLVM IR (-O0):
define void @b_file_write(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
ret void
}

LLVM IR (-O2):
define void @b_file_write(i8* %0, i8* %1, i32 %2) {
tail call void asm sideeffect "call 0x00100198", "{si},{di},{cx},~{dirflag},~{fpsr},~{flags}"(i8* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FLEXCOMM2_DriverIRQHandler();
__attribute__((weak)) void FLEXCOMM2_IRQHandler(void) {
  FLEXCOMM2_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @FLEXCOMM2_IRQHandler() {
%1 = call i32 (...) @FLEXCOMM2_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @FLEXCOMM2_IRQHandler() {
%1 = tail call i32 (...) @FLEXCOMM2_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gpio_output(int /*<<< orphan*/, int, int /*<<< orphan*/);
void status_off(void) { gpio_output(0, 15, 0); }


x86 assembly (clang, -O0):
<status_off>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0xf,%esi
mov    %edx,%edi
call   1030 <gpio_output@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<status_off>:
xor    %edi,%edi
mov    $0xf,%esi
xor    %edx,%edx
jmp    1030 <gpio_output@plt>

LLVM IR (-O0):
define void @status_off() {
%1 = call i32 @gpio_output(i32 0, i32 15, i32 0)
ret void
}

LLVM IR (-O2):
define void @status_off() {
%1 = tail call i32 @gpio_output(i32 0, i32 15, i32 0)
ret void
}
void subtract_big_ints_same_sign(struct BigInt *restrict result,
                                 const struct BigInt *restrict big1,
                                 const struct BigInt *restrict big2) {}


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

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

LLVM IR (-O0):
%struct.BigInt = type opaque
define void @subtract_big_ints_same_sign(%struct.BigInt* noalias %0, %struct.BigInt* noalias %1, %struct.BigInt* noalias %2) {
%4 = alloca %struct.BigInt*
%5 = alloca %struct.BigInt*
%6 = alloca %struct.BigInt*
store %struct.BigInt* %0, %struct.BigInt** %4
store %struct.BigInt* %1, %struct.BigInt** %5
store %struct.BigInt* %2, %struct.BigInt** %6
ret void
}

LLVM IR (-O2):
%struct.BigInt = type opaque
define void @subtract_big_ints_same_sign(%struct.BigInt* noalias nocapture %0, %struct.BigInt* noalias nocapture %1, %struct.BigInt* noalias nocapture %2) {
ret void
}
char *hash_plugin_summary(void) {
  return ("androidpin \tAnrdoid PIN lock plugin");
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"androidpin \09Anrdoid PIN lock plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [36 x i8] c"androidpin \09Anrdoid PIN lock plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int fn_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_68_ch_111_ch_109_ch_97_ch_105_ch_110(
    char const *);
int fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_68_ch_111_ch_109_ch_97_ch_105_ch_110(
    const char *text) {
  int pos = 0;
  pos =
      fn_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_68_ch_111_ch_109_ch_97_ch_105_ch_110(
          text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_68_ch_111_ch_109_ch_97_ch_105_ch_110>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_68_ch_111_ch_109_ch_97_ch_105_ch_110@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_68_ch_111_ch_109_ch_97_ch_105_ch_110+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_68_ch_111_ch_109_ch_97_ch_105_ch_110+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_68_ch_111_ch_109_ch_97_ch_105_ch_110>:
jmp    1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_68_ch_111_ch_109_ch_97_ch_105_ch_110@plt>

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

LLVM IR (-O2):
define i32 @fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_68_ch_111_ch_109_ch_97_ch_105_ch_110(i8* %0) {
%2 = tail call i32 @fn_sq_ch_68_ch_97_ch_116_ch_97_ch_80_ch_114_ch_111_ch_112_ch_101_ch_114_ch_116_ch_121_ch_68_ch_111_ch_109_ch_97_ch_105_ch_110(i8* %0)
ret i32 %2
}
void SysCtl_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<SysCtl_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <SysCtl_Handler+0x9>
jmp    1109 <SysCtl_Handler+0x9>

x86 assembly (clang, -O2):
<SysCtl_Handler>:
jmp    1100 <SysCtl_Handler>

LLVM IR (-O0):
define void @SysCtl_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @SysCtl_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ window;
};
struct TYPE_4__ {
  TYPE_1__ xclient;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xclient_window(void *_p) {
  return (unsigned long)((XEvent *)_p)->xclient.window;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xclient_window>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xclient_window(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xclient_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}