xunge/DecIR huggingface dataset:
int ularith_gt_2ul_2ul(const unsigned long a1, const unsigned long a2,
                       const unsigned long b1, const unsigned long b2) {
  return a2 > b2 || (a2 == b2 && a1 > b1);
}


x86 assembly (clang, -O0):
<ularith_gt_2ul_2ul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x1,%al
cmp    -0x20(%rbp),%rcx
mov    %al,-0x21(%rbp)
ja     114e <ularith_gt_2ul_2ul+0x4e>
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    -0x20(%rbp),%rcx
mov    %al,-0x22(%rbp)
jne    1148 <ularith_gt_2ul_2ul+0x48>
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
seta   %al
mov    %al,-0x22(%rbp)
mov    -0x22(%rbp),%al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ularith_gt_2ul_2ul>:
cmp    %rcx,%rsi
seta   %al
sete   %cl
cmp    %rdx,%rdi
seta   %dl
and    %cl,%dl
or     %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @ularith_gt_2ul_2ul(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %6
%10 = load i64, i64* %8
%11 = icmp ugt i64 %9, %10
br i1 %11, label %22, label %12
12: ; preds = %4
%13 = load i64, i64* %6
%14 = load i64, i64* %8
%15 = icmp eq i64 %13, %14
br i1 %15, label %16, label %20
16: ; preds = %12
%17 = load i64, i64* %5
%18 = load i64, i64* %7
%19 = icmp ugt i64 %17, %18
br label %20
20: ; preds = %16, %12
%21 = phi i1 [ false, %12 ], [ %19, %16 ]
br label %22
22: ; preds = %20, %4
%23 = phi i1 [ true, %4 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @ularith_gt_2ul_2ul(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = icmp ugt i64 %1, %3
%6 = icmp eq i64 %1, %3
%7 = icmp ugt i64 %0, %2
%8 = and i1 %7, %6
%9 = or i1 %5, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Move(int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
Erase_Prompt() {
  Move(0, 14);
  printf("           ");
  Move(0, 14);
}


x86 assembly (clang, -O0):
<Erase_Prompt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
mov    $0xe,%esi
call   1030 <Move@plt>
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
mov    $0xe,%esi
call   1030 <Move@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Erase_Prompt>:
push   %rax
xor    %edi,%edi
mov    $0xe,%esi
call   1030 <Move@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
mov    $0xe,%esi
pop    %rax
jmp    1030 <Move@plt>

LLVM IR (-O0):
@.str = [12 x i8] c" \00"
define i32 @Erase_Prompt() {
%1 = alloca i32
%2 = call i32 @Move(i32 0, i32 14)
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @Move(i32 0, i32 14)
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [12 x i8] c" \00"
define i32 @Erase_Prompt() {
%1 = tail call i32 @Move(i32 0, i32 14)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @Move(i32 0, i32 14)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int factorial(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[]) {
  int n;
  scanf("%d\n", &n);
  printf("[FACTORIAL]\n%d\n\n", factorial(n));
  exit(EXIT_SUCCESS);
}


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)
lea    0xea3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x14(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,%esi
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <factorial@plt>
lea    0xea2(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [17 x i8] c"[FACTORIAL]\0A%d\0A\0A\00"
@EXIT_SUCCESS = global i32 0
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
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %6)
%8 = load i32, i32* %6
%9 = call i32 @factorial(i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @EXIT_SUCCESS
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [17 x i8] c"[FACTORIAL]\0A%d\0A\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @factorial(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @EXIT_SUCCESS
%10 = call i32 @exit(i32 %9)
unreachable
}
void g_markup_parse_context_end_parse() {}


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

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

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

LLVM IR (-O2):
define void @g_markup_parse_context_end_parse() {
ret void
}
double compute_actual_reduction(double fnorm, double fnorm1) {
  double actred;
  if (fnorm1 < fnorm) {
    double u = fnorm1 / fnorm;
    actred = 1 - u * u;
  } else {
    actred = -1;
  }
  return actred;
}


x86 assembly (clang, -O0):
<compute_actual_reduction>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    116c <compute_actual_reduction+0x6c>
movsd  -0x10(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xeaa(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1179 <compute_actual_reduction+0x79>
movsd  0xe8c(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_actual_reduction>:
ucomisd %xmm1,%xmm0
jbe    111b <compute_actual_reduction+0x1b>
divsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm1
movsd  0xef2(%rip),%xmm0
subsd  %xmm1,%xmm0
ret
movsd  0xedd(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @compute_actual_reduction(double %0, double %1) {
%3 = fcmp olt double %1, %0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = fdiv double %1, %0
%6 = fneg double %5
%7 = tail call double @llvm.fmuladd.f64(double %6, double %5, double 1.000000e+00)
br label %8
8: ; preds = %2, %4
%9 = phi double [ %7, %4 ], [ -1.000000e+00, %2 ]
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ wait(int /*<<< orphan*/ *);
void sigchld_handler(int signal) {
  wait(NULL);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<sigchld_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <wait@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<sigchld_handler>:
push   %rax
xor    %edi,%edi
call   1040 <wait@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @sigchld_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @wait(i32* null)
%4 = load i32, i32* @EXIT_FAILURE
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @sigchld_handler(i32 %0) {
%2 = tail call i32 @wait(i32* null)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int lace_compat_fd_spawnlp_wait(int, int, int, int /*<<< orphan*/ *,
                                char const *, int /*<<< orphan*/ *);
void run_void_lace_tool_pipem_callback(int in_fd, int out_fd,
                                       const char *void_exe) {
  int istat;
  istat = lace_compat_fd_spawnlp_wait(in_fd, out_fd, 2, NULL, void_exe, NULL);
  assert(istat == 0);
}


x86 assembly (clang, -O0):
<run_void_lace_tool_pipem_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%r8
mov    $0x2,%edx
xor    %eax,%eax
mov    %eax,%r9d
mov    %r9,%rcx
call   1030 <lace_compat_fd_spawnlp_wait@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_void_lace_tool_pipem_callback>:
push   %rax
mov    %rdx,%r8
mov    $0x2,%edx
xor    %ecx,%ecx
xor    %r9d,%r9d
call   1030 <lace_compat_fd_spawnlp_wait@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @run_void_lace_tool_pipem_callback(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = call i32 @lace_compat_fd_spawnlp_wait(i32 %8, i32 %9, i32 2, i32* null, i8* %10, i32* null)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret void
}

LLVM IR (-O2):
define void @run_void_lace_tool_pipem_callback(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @lace_compat_fd_spawnlp_wait(i32 %0, i32 %1, i32 2, i32* null, i8* %2, i32* null)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ op_to_ea(char *, int /*<<< orphan*/);
void i_sub_ea(void) { op_to_ea("sub", 0); }


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

x86 assembly (clang, -O2):
<i_sub_ea>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <op_to_ea@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"sub\00"
define void @i_sub_ea() {
%1 = call i32 @op_to_ea(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"sub\00"
define void @i_sub_ea() {
%1 = tail call i32 @op_to_ea(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
int ddsGetBitCount(unsigned const char *buffer) {
  return (buffer[88] & 0xFF) | (buffer[89] & 0xFF) << 8 |
         (buffer[90] & 0xFF) << 16 | (buffer[91] & 0xFF) << 24;
}


x86 assembly (clang, -O0):
<ddsGetBitCount>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x58(%rax),%eax
and    $0xff,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x59(%rcx),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x5a(%rcx),%ecx
and    $0xff,%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x5b(%rcx),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ddsGetBitCount(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 88
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = and i32 %6, 255
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 89
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = and i32 %11, 255
%13 = shl i32 %12, 8
%14 = or i32 %7, %13
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 90
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = and i32 %18, 255
%20 = shl i32 %19, 16
%21 = or i32 %14, %20
%22 = load i8*, i8** %2
%23 = getelementptr inbounds i8, i8* %22, i64 91
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = and i32 %25, 255
%27 = shl i32 %26, 24
%28 = or i32 %21, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @ddsGetBitCount(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 88
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 89
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 90
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 16
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 91
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl nuw i32 %17, 24
%19 = or i32 %14, %18
ret i32 %19
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_multprec_target_system_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(281, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_multprec_target_system_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x119,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_multprec_target_system_to_container>:
mov    $0x119,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @copy_multprec_target_system_to_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 281, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_multprec_target_system_to_container() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 281, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
struct myproc {
  int dummy;
};

/* Variables and functions */
struct myproc *proc_find_n_child(char const *, int /*<<< orphan*/, int *);
int /*<<< orphan*/ proc_first(struct myproc **);
struct myproc *proc_find_n(const char *str, struct myproc **ps, int n) {
  return proc_find_n_child(str, proc_first(ps), &n);
}


x86 assembly (clang, -O0):
<proc_find_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <proc_first@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
lea    -0x14(%rbp),%rdx
call   1030 <proc_find_n_child@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_find_n>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %edx,0xc(%rsp)
mov    %rsi,%rdi
call   1040 <proc_first@plt>
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <proc_find_n_child@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.myproc = type { i32 }
define %struct.myproc* @proc_find_n(i8* %0, %struct.myproc** %1, i32 %2) {
%4 = alloca i8*
%5 = alloca %struct.myproc**
%6 = alloca i32
store i8* %0, i8** %4
store %struct.myproc** %1, %struct.myproc*** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load %struct.myproc**, %struct.myproc*** %5
%9 = call i32 @proc_first(%struct.myproc** %8)
%10 = call %struct.myproc* @proc_find_n_child(i8* %7, i32 %9, i32* %6)
ret %struct.myproc* %10
}

LLVM IR (-O2):
%struct.myproc = type { i32 }
define %struct.myproc* @proc_find_n(i8* %0, %struct.myproc** %1, i32 %2) {
%4 = alloca i32
store i32 %2, i32* %4
%5 = tail call i32 @proc_first(%struct.myproc** %1)
%6 = call %struct.myproc* @proc_find_n_child(i8* %0, i32 %5, i32* %4)
ret %struct.myproc* %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ focus;
};
typedef TYPE_1__ XCrossingEvent;

/* Variables and functions */
int get_XCrossingEvent_focus(void *_p) {
  return (int)((XCrossingEvent *)_p)->focus;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XCrossingEvent_focus(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void pmu_reset_solar_short() {}


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

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

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

LLVM IR (-O2):
define void @pmu_reset_solar_short() {
ret void
}
/* Variables and functions */
char *crypt(char const *, char const *);
int strcmp(char const *, char const *);
int pwcmp_check(const char *plain, const char *encod) {
  plain = crypt(plain, encod);
  return strcmp(plain, encod);
}


x86 assembly (clang, -O0):
<pwcmp_check>:
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 <crypt@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwcmp_check>:
push   %rbx
mov    %rsi,%rbx
call   1030 <crypt@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <strcmp@plt>

LLVM IR (-O0):
define i32 @pwcmp_check(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @crypt(i8* %5, i8* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 @strcmp(i8* %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @pwcmp_check(i8* %0, i8* %1) {
%3 = tail call i8* @crypt(i8* %0, i8* %1)
%4 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(1) %1)
ret i32 %4
}
/* Variables and functions */
scalar_t__ strcmp(void *, void *);
int less_then(void *a, void *b) { return strcmp(a, b) < 0; }


x86 assembly (clang, -O0):
<less_then>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<less_then>:
push   %rax
call   1030 <strcmp@plt>
shr    $0x3f,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @less_then(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = lshr i64 %3, 63
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void dump_unknown(void *data, uint32_t type, uint16_t misc, uint16_t size) {}


x86 assembly (clang, -O0):
<dump_unknown>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @dump_unknown(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @dump_unknown(i8* nocapture %0, i32 %1, i32 %2, i32 %3) {
ret void
}
void d2i_PKCS7_DIGEST(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_PKCS7_DIGEST() {
ret void
}
void test_nowait() {
#pragma omp parallel
#pragma omp sections nowait nowait
  { ; }
}


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

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

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

LLVM IR (-O2):
define void @test_nowait() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ sleep(int);
void *thread2(void *vargp) {
  char *a = (char *)malloc(40);
  char *b = (char *)malloc(40);
  char *c = (char *)malloc(40);
  free(a);
  free(b);
  free(c);
  sleep(100);
  return NULL;
}


x86 assembly (clang, -O0):
<thread2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x28,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x28,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x28,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    $0x64,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread2>:
push   %r15
push   %r14
push   %rbx
mov    $0x28,%edi
call   1040 <malloc@plt>
mov    %rax,%r14
mov    $0x28,%edi
call   1040 <malloc@plt>
mov    %rax,%r15
mov    $0x28,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    $0x64,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @thread2(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %2
%6 = call i64 @malloc(i32 40)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = call i64 @malloc(i32 40)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %4
%10 = call i64 @malloc(i32 40)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %5
%12 = load i8*, i8** %3
%13 = call i32 @free(i8* %12)
%14 = load i8*, i8** %4
%15 = call i32 @free(i8* %14)
%16 = load i8*, i8** %5
%17 = call i32 @free(i8* %16)
%18 = call i32 @sleep(i32 100)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @thread2(i8* nocapture readnone %0) {
%2 = tail call i64 @malloc(i32 40)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i64 @malloc(i32 40)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i64 @malloc(i32 40)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @free(i8* %3)
%9 = tail call i32 @free(i8* %5)
%10 = tail call i32 @free(i8* %7)
%11 = tail call i32 @sleep(i32 100)
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fread(double *, size_t, size_t, int /*<<< orphan*/ *);
int c_fread_double_(double *f, int *nf, FILE **fp) {
  return fread(f, (size_t)sizeof(double), (size_t)*nf, *fp);
}


x86 assembly (clang, -O0):
<c_fread_double_>:
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
movslq (%rax),%rdx
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
mov    $0x8,%esi
call   1030 <fread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_fread_double_>:
movslq (%rsi),%rax
mov    (%rdx),%rcx
mov    $0x8,%esi
mov    %rax,%rdx
jmp    1030 <fread@plt>

LLVM IR (-O0):
define i32 @c_fread_double_(double* %0, i32* %1, i32** %2) {
%4 = alloca double*
%5 = alloca i32*
%6 = alloca i32**
store double* %0, double** %4
store i32* %1, i32** %5
store i32** %2, i32*** %6
%7 = load double*, double** %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = sext i32 %9 to i64
%11 = load i32**, i32*** %6
%12 = load i32*, i32** %11
%13 = call i32 @fread(double* %7, i64 8, i64 %10, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @c_fread_double_(double* nocapture %0, i32* nocapture %1, i32** nocapture %2) {
%4 = load i32, i32* %1
%5 = sext i32 %4 to i64
%6 = load i32*, i32** %2
%7 = tail call i32 @fread(double* %0, i64 8, i64 %5, i32* %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ tty_putc(int);
void putchar(int c, void *arg) { tty_putc(c); }


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

x86 assembly (clang, -O2):
<putchar>:
jmp    1030 <tty_putc@plt>

LLVM IR (-O0):
define void @putchar(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = call i32 @tty_putc(i32 %5)
ret void
}

LLVM IR (-O2):
define void @putchar(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 @tty_putc(i32 %0)
ret void
}
void srand(int n) {
  extern int random_seed;
  random_seed = n;
}


x86 assembly (clang, -O0):
<srand>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    0x2edf(%rip),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<srand>:
mov    0x2ee9(%rip),%rax
mov    %edi,(%rax)
ret

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

LLVM IR (-O2):
@random_seed = external global i32
define void @srand(i32 %0) {
store i32 %0, i32* @random_seed
ret void
}
/* Variables and functions */
int rrnx_enumerate_label(char *);
int /*<<< orphan*/ rrnx_substr_trimmed(char *, char const *, int, int);
int rrnx_enumerate_linetype(const char *line) {
  int id = -1;
  if (line == NULL) {
    return id;
  }
  char label[32];
  rrnx_substr_trimmed(label, line, 60, 20);
  id = rrnx_enumerate_label(label);
  return id;
}


x86 assembly (clang, -O0):
<rrnx_enumerate_linetype>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1149 <rrnx_enumerate_linetype+0x29>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1172 <rrnx_enumerate_linetype+0x52>
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3c,%edx
mov    $0x14,%ecx
call   1040 <rrnx_substr_trimmed@plt>
lea    -0x40(%rbp),%rdi
call   1030 <rrnx_enumerate_label@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rrnx_enumerate_linetype>:
test   %rdi,%rdi
je     1150 <rrnx_enumerate_linetype+0x30>
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3c,%edx
mov    $0x14,%ecx
call   1040 <rrnx_substr_trimmed@plt>
mov    %rbx,%rdi
call   1030 <rrnx_enumerate_label@plt>
add    $0x20,%rsp
pop    %rbx
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @rrnx_enumerate_linetype(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [32 x i8]
store i8* %0, i8** %3
store i32 -1, i32* %4
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %4
store i32 %9, i32* %2
br label %17
10: ; preds = %1
%11 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%12 = load i8*, i8** %3
%13 = call i32 @rrnx_substr_trimmed(i8* %11, i8* %12, i32 60, i32 20)
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%15 = call i32 @rrnx_enumerate_label(i8* %14)
store i32 %15, i32* %4
%16 = load i32, i32* %4
store i32 %16, i32* %2
br label %17
17: ; preds = %10, %8
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @rrnx_enumerate_linetype(i8* %0) {
%2 = alloca [32 x i8]
%3 = icmp eq i8* %0, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%6 = call i32 @rrnx_substr_trimmed(i8* %5, i8* %0, i32 60, i32 20)
%7 = call i32 @rrnx_enumerate_label(i8* %5)
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
scalar_t__ __VERIFIER_nondet_int();
void main() {
  int x = 1;
  int y = 0;
  while (y < 1000 && __VERIFIER_nondet_int()) {
    x = x + y;
    y = y + 1;
  }
  __VERIFIER_assert(x >= y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x3e8,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jge    1159 <main+0x39>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1169 <main+0x49>
jmp    1180 <main+0x60>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %rax,%rax
je     1153 <main+0x33>
add    %ebp,%ebx
add    $0x1,%ebp
cmp    $0x3e8,%ebp
jne    1130 <main+0x10>
mov    $0x3e8,%ebp
mov    $0x79f2d,%ebx
xor    %edi,%edi
cmp    %ebp,%ebx
setae  %dil
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <__VERIFIER_assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %11, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 1000
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = call i64 (...) @__VERIFIER_nondet_int()
%8 = icmp ne i64 %7, 0
br label %9
9: ; preds = %6, %3
%10 = phi i1 [ false, %3 ], [ %8, %6 ]
br i1 %10, label %11, label %17
11: ; preds = %9
%12 = load i32, i32* %1
%13 = load i32, i32* %2
%14 = add nsw i32 %12, %13
store i32 %14, i32* %1
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %3
17: ; preds = %9
%18 = load i32, i32* %1
%19 = load i32, i32* %2
%20 = icmp sge i32 %18, %19
%21 = zext i1 %20 to i32
%22 = call i32 @__VERIFIER_assert(i32 %21)
ret void
}

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %0, %6
%2 = phi i32 [ 0, %0 ], [ %8, %6 ]
%3 = phi i32 [ 1, %0 ], [ %7, %6 ]
%4 = tail call i64 (...) @__VERIFIER_nondet_int()
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = add nuw nsw i32 %2, %3
%8 = add nuw nsw i32 %2, 1
%9 = icmp eq i32 %8, 1000
br i1 %9, label %10, label %1
10: ; preds = %6, %1
%11 = phi i32 [ 499501, %6 ], [ %3, %1 ]
%12 = phi i32 [ 1000, %6 ], [ %2, %1 ]
%13 = icmp uge i32 %11, %12
%14 = zext i1 %13 to i32
%15 = tail call i32 @__VERIFIER_assert(i32 %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *tc(int, char *, char *);
int main() {
  printf("Hello, %s\n", tc((!1 && 0), "World!", "Mars!"));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee3(%rip),%rsi
lea    0xee3(%rip),%rdx
xor    %edi,%edi
call   1040 <tc@plt>
lea    0xec3(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"Hello, %s\0A\00"
@.str.1 = [7 x i8] c"World!\00"
@.str.2 = [6 x i8] c"Mars!\00"
define i32 @main() {
%1 = tail call i8* @tc(i32 0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Variables and functions */
long long *malloc(size_t);
int /*<<< orphan*/ memcpy(long long *, long long const *, size_t);
long long *zlldup(long long const *src, size_t len) {
  long long *p = malloc(len * sizeof(long long));
  memcpy(p, src, len * sizeof(long long));
  return p;
}


x86 assembly (clang, -O0):
<zlldup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
shl    $0x3,%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zlldup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
lea    0x0(,%rsi,8),%r15
mov    %r15,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64* @zlldup(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64*
store i64* %0, i64** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = mul i64 %6, 8
%8 = call i64* @malloc(i64 %7)
store i64* %8, i64** %5
%9 = load i64*, i64** %5
%10 = load i64*, i64** %3
%11 = load i64, i64* %4
%12 = mul i64 %11, 8
%13 = call i32 @memcpy(i64* %9, i64* %10, i64 %12)
%14 = load i64*, i64** %5
ret i64* %14
}

LLVM IR (-O2):
define i64* @zlldup(i64* %0, i64 %1) {
%3 = shl i64 %1, 3
%4 = tail call i64* @malloc(i64 %3)
%5 = tail call i32 @memcpy(i64* %4, i64* %0, i64 %3)
ret i64* %4
}
void zoo() {}


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

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

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

LLVM IR (-O2):
define void @zoo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NetlinkDeInit();
void JapModemDeInit(void) { NetlinkDeInit(); }


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

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

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

LLVM IR (-O2):
define void @JapModemDeInit() {
%1 = tail call i32 (...) @NetlinkDeInit()
ret void
}
int validate_argc(int argc) {
  int is_valid = 0;
  if (argc >= 2)
    is_valid = 1;
  return is_valid;
}


x86 assembly (clang, -O0):
<validate_argc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x4(%rbp)
jl     111f <validate_argc+0x1f>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_argc>:
xor    %eax,%eax
cmp    $0x2,%edi
setge  %al
ret

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

LLVM IR (-O2):
define i32 @validate_argc(i32 %0) {
%2 = icmp sgt i32 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
float logf(float);
float __glsl_log(float x) { return logf(x); }


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

x86 assembly (clang, -O2):
<__glsl_log>:
jmp    1030 <logf@plt>

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

LLVM IR (-O2):
define float @__glsl_log(float %0) {
%2 = tail call float @logf(float %0)
ret float %2
}
/* Variables and functions */
int abs(int);
int gcd(int, int);
int least_common_multiple(int a, int b) {
  return (abs(a) * abs(b) / gcd(a, b));
}


x86 assembly (clang, -O0):
<least_common_multiple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <gcd@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<least_common_multiple>:
push   %rbx
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
mov    %esi,%ebx
neg    %ebx
cmovs  %esi,%ebx
imul   %eax,%ebx
call   1030 <gcd@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i32 @least_common_multiple(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 @abs(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @abs(i32 %7)
%9 = mul nsw i32 %6, %8
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 @gcd(i32 %10, i32 %11)
%13 = sdiv i32 %9, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @least_common_multiple(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%4 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
%5 = mul nsw i32 %4, %3
%6 = tail call i32 @gcd(i32 %0, i32 %1)
%7 = sdiv i32 %5, %6
ret i32 %7
}
int qlz_get_setting(int setting) {
  switch (setting) {
  case 0:
    return 0;
  case 1:
    return (1 + 1) * 4096 * sizeof(unsigned char *) + 0 + 16;
  case 2:
    return 4096 * sizeof(unsigned char *) + 16 + 0;
  case 3:
    return 0;
  case 4:
    return 1;
  case 5:
    return 1;
  case 6:
    return 0;
  case 7:
    return 1;
  case 8:
    return 3;
  case 9:
    return 1;
  }
  return -1;
}


x86 assembly (clang, -O0):
<qlz_get_setting>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x9,%rax
ja     11a4 <qlz_get_setting+0xa4>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    11ab <qlz_get_setting+0xab>
movl   $0x10010,-0x4(%rbp)
jmp    11ab <qlz_get_setting+0xab>
movl   $0x8010,-0x4(%rbp)
jmp    11ab <qlz_get_setting+0xab>
movl   $0x0,-0x4(%rbp)
jmp    11ab <qlz_get_setting+0xab>
movl   $0x1,-0x4(%rbp)
jmp    11ab <qlz_get_setting+0xab>
movl   $0x1,-0x4(%rbp)
jmp    11ab <qlz_get_setting+0xab>
movl   $0x0,-0x4(%rbp)
jmp    11ab <qlz_get_setting+0xab>
movl   $0x1,-0x4(%rbp)
jmp    11ab <qlz_get_setting+0xab>
movl   $0x3,-0x4(%rbp)
jmp    11ab <qlz_get_setting+0xab>
movl   $0x1,-0x4(%rbp)
jmp    11ab <qlz_get_setting+0xab>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qlz_get_setting>:
mov    $0xffffffff,%eax
cmp    $0x9,%edi
ja     1117 <qlz_get_setting+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @qlz_get_setting(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %15 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 5, label %10
i32 6, label %11
i32 7, label %12
i32 8, label %13
i32 9, label %14
]
5: ; preds = %1
store i32 0, i32* %2
br label %16
6: ; preds = %1
store i32 65552, i32* %2
br label %16
7: ; preds = %1
store i32 32784, i32* %2
br label %16
8: ; preds = %1
store i32 0, i32* %2
br label %16
9: ; preds = %1
store i32 1, i32* %2
br label %16
10: ; preds = %1
store i32 1, i32* %2
br label %16
11: ; preds = %1
store i32 0, i32* %2
br label %16
12: ; preds = %1
store i32 1, i32* %2
br label %16
13: ; preds = %1
store i32 3, i32* %2
br label %16
14: ; preds = %1
store i32 1, i32* %2
br label %16
15: ; preds = %1
store i32 -1, i32* %2
br label %16
16: ; preds = %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@switch.table.qlz_get_setting = [10 x i32] [i32 0, i32 65552, i32 32784, i32 0, i32 1, i32 1, i32 0, i32 1, i32 3, i32 1]
define i32 @qlz_get_setting(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [10 x i32], [10 x i32]* @switch.table.qlz_get_setting, i64 0, i64 %4
%6 = load i32, i32* %5
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ -1, %1 ]
ret i32 %8
}
void delayInit(void) {}


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

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

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

LLVM IR (-O2):
define void @delayInit() {
ret void
}
/* 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__ xgravity;
};
typedef TYPE_2__ XEvent;

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


x86 assembly (clang, -O0):
<get_XEvent_xgravity_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_xgravity_window>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xgravity_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_xgravity_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ *create_win(int, int, int, int);
WINDOW *create_winstr() { return create_win(15, 25 + 5, 3, 50 + 32); }


x86 assembly (clang, -O0):
<create_winstr>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf,%edi
mov    $0x1e,%esi
mov    $0x3,%edx
mov    $0x52,%ecx
call   1030 <create_win@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_winstr>:
mov    $0xf,%edi
mov    $0x1e,%esi
mov    $0x3,%edx
mov    $0x52,%ecx
jmp    1030 <create_win@plt>

LLVM IR (-O0):
define i32* @create_winstr() {
%1 = call i32* @create_win(i32 15, i32 30, i32 3, i32 82)
ret i32* %1
}

LLVM IR (-O2):
define i32* @create_winstr() {
%1 = tail call i32* @create_win(i32 15, i32 30, i32 3, i32 82)
ret i32* %1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int isupper(char);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", isupper('A'));
  printf("%d\n", isupper('a'));
  assert(!isupper('b'));
  assert(isupper('B'));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x41,%edi
call   1050 <isupper@plt>
mov    %eax,%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    $0x61,%edi
call   1050 <isupper@plt>
mov    %eax,%esi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
mov    $0x62,%edi
call   1050 <isupper@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x42,%edi
call   1050 <isupper@plt>
mov    %eax,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x41,%edi
call   1050 <isupper@plt>
lea    0xebe(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x61,%edi
call   1050 <isupper@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x62,%edi
call   1050 <isupper@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x42,%edi
call   1050 <isupper@plt>
mov    %eax,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @isupper(i8 signext 65)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @isupper(i8 signext 97)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @isupper(i8 signext 98)
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = call i32 @isupper(i8 signext 66)
%12 = call i32 @assert(i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @isupper(i8 signext 65)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @isupper(i8 signext 97)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @isupper(i8 signext 98)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @isupper(i8 signext 66)
%10 = tail call i32 @assert(i32 %9)
ret i32 0
}