xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned long long read_u32(unsigned char *);
unsigned long long read_u64(unsigned char *src) {
  return read_u32(src) + (((unsigned long long)read_u32(src + 4)) << 32);
}


x86 assembly (clang, -O0):
<read_u64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <read_u32@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
call   1030 <read_u32@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
shl    $0x20,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_u64>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <read_u32@plt>
mov    %rax,%r14
add    $0x4,%rbx
mov    %rbx,%rdi
call   1030 <read_u32@plt>
shl    $0x20,%rax
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @read_u64(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @read_u32(i8* %3)
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 4
%7 = call i64 @read_u32(i8* %6)
%8 = shl i64 %7, 32
%9 = add i64 %4, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @read_u64(i8* %0) {
%2 = tail call i64 @read_u32(i8* %0)
%3 = getelementptr inbounds i8, i8* %0, i64 4
%4 = tail call i64 @read_u32(i8* %3)
%5 = shl i64 %4, 32
%6 = add i64 %5, %2
ret i64 %6
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
scalar_t__ clock();
int largest_prime_factor(long);
int /*<<< orphan*/ printf(char *, int, double);
int main() {
  long NUMBER = 600851475143;
  clock_t begin = clock();
  int result = largest_prime_factor(NUMBER);
  clock_t end = clock();
  double time = (double)(end - begin) / CLOCKS_PER_SEC;
  printf("%d [in %f seconds]", result, time);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movabs $0x8be589eac7,%rax
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <largest_prime_factor@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
sub    -0x10(%rbp),%rax
cvtsi2sd %rax,%xmm0
mov    0x2e6c(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x14(%rbp),%esi
movsd  -0x28(%rbp),%xmm0
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <clock@plt>
mov    %rax,%rbx
movabs $0x8be589eac7,%rdi
call   1050 <largest_prime_factor@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <clock@plt>
sub    %rbx,%rax
cvtsi2sd %rax,%xmm0
mov    0x2e84(%rip),%rax
divsd  (%rax),%xmm0
lea    0xe91(%rip),%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
@.str = [19 x i8] c"%d [in %f seconds]\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i32
%4 = alloca i64
%5 = alloca double
store i64 600851475143, i64* %1
%6 = call i64 (...) @clock()
store i64 %6, i64* %2
%7 = load i64, i64* %1
%8 = call i32 @largest_prime_factor(i64 %7)
store i32 %8, i32* %3
%9 = call i64 (...) @clock()
store i64 %9, i64* %4
%10 = load i64, i64* %4
%11 = load i64, i64* %2
%12 = sub nsw i64 %10, %11
%13 = sitofp i64 %12 to double
%14 = load double, double* @CLOCKS_PER_SEC
%15 = fdiv double %13, %14
store double %15, double* %5
%16 = load i32, i32* %3
%17 = load double, double* %5
%18 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %16, double %17)
ret i32 0
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
@.str = [19 x i8] c"%d [in %f seconds]\00"
define i32 @main() {
%1 = tail call i64 (...) @clock()
%2 = tail call i32 @largest_prime_factor(i64 600851475143)
%3 = tail call i64 (...) @clock()
%4 = sub nsw i64 %3, %1
%5 = sitofp i64 %4 to double
%6 = load double, double* @CLOCKS_PER_SEC
%7 = fdiv double %5, %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2, double %7)
ret i32 0
}
int op_and(int a, int b) { return a & b; }


x86 assembly (clang, -O0):
<op_and>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_and>:
mov    %edi,%eax
and    %esi,%eax
ret

LLVM IR (-O0):
define i32 @op_and(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = and i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @op_and(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
int test_imm_17uint32_reg(unsigned int val) {
  return ((val) & (0x17 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_17uint32_reg(i32 %0) {
%2 = and i32 %0, 23
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int ext3level2pct(unsigned char level) {
  static unsigned char table[64] = {
      0,  12, 13, 15, 15, 17, 18, 20, 21, 22, 23, 25, 26, 28, 29,  31,
      32, 34, 35, 37, 38, 40, 41, 43, 44, 46, 48, 50, 51, 53, 54,  56,
      58, 60, 61, 63, 64, 66, 67, 69, 71, 73, 74, 76, 77, 79, 80,  82,
      83, 85, 86, 88, 88, 90, 91, 92, 93, 95, 96, 97, 98, 99, 100, 100};
  return (int)table[((63u) < (level) ? (63u) : (level))];
}


x86 assembly (clang, -O0):
<ext3level2pct>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
mov    $0x3f,%eax
cmp    %ecx,%eax
jae    1128 <ext3level2pct+0x28>
mov    $0x3f,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <ext3level2pct+0x2f>
movzbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%eax
mov    %eax,%ecx
lea    0x2ef3(%rip),%rax
movzbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext3level2pct>:
cmp    $0x3f,%dil
mov    $0x3f,%eax
cmovb  %edi,%eax
lea    0xeed(%rip),%rcx
movzbl (%rax,%rcx,1),%eax
ret

LLVM IR (-O0):
@ext3level2pct.table = internal global [64 x i8] c"\00\0C\0D\0F\0F\11\12\14\15\16\17\19\1A\1C\1D\1F \22#%&()+,.023568:<=?@BCEGIJLMOPRSUVXXZ[\\]_`abcdd"
define i32 @ext3level2pct(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp ult i32 63, %4
br i1 %5, label %6, label %7
6: ; preds = %1
br label %10
7: ; preds = %1
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
br label %10
10: ; preds = %7, %6
%11 = phi i32 [ 63, %6 ], [ %9, %7 ]
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds [64 x i8], [64 x i8]* @ext3level2pct.table, i64 0, i64 %12
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
@ext3level2pct.table = internal unnamed_addr constant [64 x i8] c"\00\0C\0D\0F\0F\11\12\14\15\16\17\19\1A\1C\1D\1F \22#%&()+,.023568:<=?@BCEGIJLMOPRSUVXXZ[\\]_`abcdd"
define i32 @ext3level2pct(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = icmp ult i32 %2, 63
%4 = select i1 %3, i32 %2, i32 63
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds [64 x i8], [64 x i8]* @ext3level2pct.table, i64 0, i64 %5
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
ret i32 %8
}
struct gomp_task *atomic_load_n_gomp_task(struct gomp_task **ptr,
                                          int memorder) {
  return __atomic_load_n(ptr, memorder);
}


x86 assembly (clang, -O0):
<atomic_load_n_gomp_task>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
lea    -0x18(%rbp),%rcx
mov    %rcx,-0x20(%rbp)
add    $0xffffffff,%eax
sub    $0x2,%eax
jb     1156 <atomic_load_n_gomp_task+0x56>
jmp    1132 <atomic_load_n_gomp_task+0x32>
mov    -0x24(%rbp),%eax
sub    $0x5,%eax
je     1169 <atomic_load_n_gomp_task+0x69>
jmp    1143 <atomic_load_n_gomp_task+0x43>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rcx),%rcx
mov    %rcx,(%rax)
jmp    1177 <atomic_load_n_gomp_task+0x77>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rcx),%rcx
mov    %rcx,(%rax)
jmp    1177 <atomic_load_n_gomp_task+0x77>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rcx),%rcx
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_load_n_gomp_task>:
lea    -0x1(%rsi),%eax
cmp    $0x2,%eax
jb     110b <atomic_load_n_gomp_task+0xb>
cmp    $0x5,%esi
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.gomp_task = type opaque
define %struct.gomp_task* @atomic_load_n_gomp_task(%struct.gomp_task** %0, i32 %1) {
%3 = alloca %struct.gomp_task**
%4 = alloca i32
%5 = alloca %struct.gomp_task*
store %struct.gomp_task** %0, %struct.gomp_task*** %3
store i32 %1, i32* %4
%6 = load %struct.gomp_task**, %struct.gomp_task*** %3
%7 = load i32, i32* %4
%8 = bitcast %struct.gomp_task** %6 to i64*
%9 = bitcast %struct.gomp_task** %5 to i64*
switch i32 %7, label %10 [
i32 1, label %12
i32 2, label %12
i32 5, label %14
]
10: ; preds = %2
%11 = load atomic i64, i64* %8 monotonic
store i64 %11, i64* %9
br label %16
12: ; preds = %2, %2
%13 = load atomic i64, i64* %8 acquire
store i64 %13, i64* %9
br label %16
14: ; preds = %2
%15 = load atomic i64, i64* %8 seq_cst
store i64 %15, i64* %9
br label %16
16: ; preds = %14, %12, %10
%17 = bitcast i64* %9 to %struct.gomp_task**
%18 = load %struct.gomp_task*, %struct.gomp_task** %17
ret %struct.gomp_task* %18
}

LLVM IR (-O2):
%struct.gomp_task = type opaque
define %struct.gomp_task* @atomic_load_n_gomp_task(%struct.gomp_task** nocapture %0, i32 %1) {
%3 = bitcast %struct.gomp_task** %0 to i64*
switch i32 %1, label %4 [
i32 1, label %6
i32 2, label %6
i32 5, label %8
]
4: ; preds = %2
%5 = load atomic i64, i64* %3 monotonic
br label %10
6: ; preds = %2, %2
%7 = load atomic i64, i64* %3 acquire
br label %10
8: ; preds = %2
%9 = load atomic i64, i64* %3 seq_cst
br label %10
10: ; preds = %8, %6, %4
%11 = phi i64 [ %5, %4 ], [ %9, %8 ], [ %7, %6 ]
%12 = inttoptr i64 %11 to %struct.gomp_task*
ret %struct.gomp_task* %12
}
/* Variables and functions */
int one();
int three();
int two(void *);
int main(void) { return one() + two(((void *)0)) + three(); }


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

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <one@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1030 <two@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1050 <three@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @one()
%3 = call i32 @two(i8* null)
%4 = add nsw i32 %2, %3
%5 = call i32 (...) @three()
%6 = add nsw i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @one()
%2 = tail call i32 @two(i8* null)
%3 = add nsw i32 %2, %1
%4 = tail call i32 (...) @three()
%5 = add nsw i32 %3, %4
ret i32 %5
}
/* Type definitions */
struct fix_tag_classifier {
  int dummy;
};

/* Variables and functions */
const struct fix_tag_classifier *
get_group_classifier_in_UnderlyingStipulations(size_t __tag) {
  (void)__tag;
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.fix_tag_classifier = type { i32 }
define %struct.fix_tag_classifier* @get_group_classifier_in_UnderlyingStipulations(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret %struct.fix_tag_classifier* null
}

LLVM IR (-O2):
%struct.fix_tag_classifier = type { i32 }
define noalias %struct.fix_tag_classifier* @get_group_classifier_in_UnderlyingStipulations(i64 %0) {
ret %struct.fix_tag_classifier* null
}
/* Type definitions */
struct expression {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ expression_error(struct expression *, char *, char const *);
void verify_input_constraint(struct expression *expr, const char *constraint) {
  switch (*constraint) {
  case '=':
  case '+':
    expression_error(expr, "input constraint with assignment (\"%s\")",
                     constraint);
  }
}


x86 assembly (clang, -O0):
<verify_input_constraint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x2b,%eax
je     1149 <verify_input_constraint+0x39>
jmp    1138 <verify_input_constraint+0x28>
mov    -0x14(%rbp),%eax
sub    $0x3d,%eax
jne    115d <verify_input_constraint+0x4d>
jmp    1149 <verify_input_constraint+0x39>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xea8(%rip),%rsi
call   1030 <expression_error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_input_constraint>:
mov    %rsi,%rdx
movsbl (%rsi),%eax
cmp    $0x3d,%eax
je     1120 <verify_input_constraint+0x10>
cmp    $0x2b,%eax
jne    112c <verify_input_constraint+0x1c>
lea    0xed9(%rip),%rsi
jmp    1030 <expression_error@plt>
ret

LLVM IR (-O0):
%struct.expression = type { i32 }
@.str = [40 x i8] c"input constraint with assignment (\22%s\22)\00"
define void @verify_input_constraint(%struct.expression* %0, i8* %1) {
%3 = alloca %struct.expression*
%4 = alloca i8*
store %struct.expression* %0, %struct.expression** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
switch i32 %7, label %12 [
i32 61, label %8
i32 43, label %8
]
8: ; preds = %2, %2
%9 = load %struct.expression*, %struct.expression** %3
%10 = load i8*, i8** %4
%11 = call i32 @expression_error(%struct.expression* %9, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
%struct.expression = type { i32 }
@.str = [40 x i8] c"input constraint with assignment (\22%s\22)\00"
define void @verify_input_constraint(%struct.expression* %0, i8* %1) {
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
switch i32 %4, label %7 [
i32 61, label %5
i32 43, label %5
]
5: ; preds = %2, %2
%6 = tail call i32 @expression_error(%struct.expression* %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int);
void isleep(unsigned int milliseconds) { usleep(milliseconds * 1000); }


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

x86 assembly (clang, -O2):
<isleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @isleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @isleep(i32 %0) {
%2 = mul i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
void sprint_mov_atRi(char *str, unsigned char i) {
  sprintf(str, "MOV   A, @R%X                    ", i);
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"MOV A, @R%X \00"
define void @sprint_mov_atRi(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %4
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"MOV A, @R%X \00"
define void @sprint_mov_atRi(i8* nocapture writeonly %0, i8 zeroext %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int a;
  scanf("%d", &a);
  printf("%d\n", 2 * 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>
mov    -0x8(%rbp),%esi
shl    $0x1,%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = shl nsw i32 %4, 1
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
struct queue {
  int dummy;
};
struct context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ lost(struct context *, struct queue *, int);
void queue_flush(struct context *context, struct queue *queue) {
  lost(context, queue, false);
}


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

x86 assembly (clang, -O2):
<queue_flush>:
xor    %edx,%edx
jmp    1030 <lost@plt>

LLVM IR (-O0):
%struct.context = type { i32 }
%struct.queue = type { i32 }
define void @queue_flush(%struct.context* %0, %struct.queue* %1) {
%3 = alloca %struct.context*
%4 = alloca %struct.queue*
store %struct.context* %0, %struct.context** %3
store %struct.queue* %1, %struct.queue** %4
%5 = load %struct.context*, %struct.context** %3
%6 = load %struct.queue*, %struct.queue** %4
%7 = call i32 @lost(%struct.context* %5, %struct.queue* %6, i32 0)
ret void
}

LLVM IR (-O2):
%struct.context = type { i32 }
%struct.queue = type { i32 }
define void @queue_flush(%struct.context* %0, %struct.queue* %1) {
%3 = tail call i32 @lost(%struct.context* %0, %struct.queue* %1, i32 0)
ret void
}
void CLObject_destruct(struct CLObject *self) {}


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

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

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

LLVM IR (-O2):
%struct.CLObject = type opaque
define void @CLObject_destruct(%struct.CLObject* nocapture %0) {
ret void
}
void ff_hevc_put_hevc_uni_w_epel_hv8_8_sse4() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
scalar_t__ stat(char const *, struct stat *);
void safe_stat(const char *filename, struct stat *buf) {
  if (stat(filename, buf) != 0) {
    perror("stat()");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<safe_stat>:
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 <stat@plt>
cmp    $0x0,%rax
je     116d <safe_stat+0x3d>
lea    0xea2(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_stat>:
push   %rax
call   1030 <stat@plt>
test   %rax,%rax
jne    113d <safe_stat+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [7 x i8] c"stat()\00"
define void @safe_stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i64 @stat(i8* %5, %struct.stat* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 -1)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [7 x i8] c"stat()\00"
define void @safe_stat(i8* %0, %struct.stat* %1) {
%3 = tail call i64 @stat(i8* %0, %struct.stat* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int getc(int /*<<< orphan*/ *);
int getchar();
int megetc(FILE *fdev) { return fdev != NULL ? getc(fdev) : getchar(); }


x86 assembly (clang, -O0):
<megetc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1148 <megetc+0x28>
mov    -0x8(%rbp),%rdi
call   1040 <getc@plt>
mov    %eax,-0xc(%rbp)
jmp    1152 <megetc+0x32>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<megetc>:
test   %rdi,%rdi
je     112a <megetc+0xa>
jmp    1040 <getc@plt>
xor    %eax,%eax
jmp    1030 <getchar@plt>

LLVM IR (-O0):
define i32 @megetc(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32*, i32** %2
%7 = call i32 @getc(i32* %6)
br label %10
8: ; preds = %1
%9 = call i32 (...) @getchar()
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @megetc(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @getc(i32* %0)
br label %7
5: ; preds = %1
%6 = tail call i32 (...) @getchar()
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ %4, %3 ], [ %6, %5 ]
ret i32 %8
}
/* Variables and functions */
char tolower(char const);
void naive_tolower(char *dst, const char *src, size_t len) {
  size_t i;
  for (i = 0; i < len; ++i) {
    dst[i] = tolower(src[i]);
  };
  return;
}


x86 assembly (clang, -O0):
<naive_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1169 <naive_tolower+0x59>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <tolower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <naive_tolower+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<naive_tolower>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdx,%rdx
je     1147 <naive_tolower+0x37>
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1030 <tolower@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <naive_tolower+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @naive_tolower(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
store i64 0, i64* %7
br label %8
8: ; preds = %21, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %6
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %24
12: ; preds = %8
%13 = load i8*, i8** %5
%14 = load i64, i64* %7
%15 = getelementptr inbounds i8, i8* %13, i64 %14
%16 = load i8, i8* %15
%17 = call signext i8 @tolower(i8 signext %16)
%18 = load i8*, i8** %4
%19 = load i64, i64* %7
%20 = getelementptr inbounds i8, i8* %18, i64 %19
store i8 %17, i8* %20
br label %21
21: ; preds = %12
%22 = load i64, i64* %7
%23 = add i64 %22, 1
store i64 %23, i64* %7
br label %8
24: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @naive_tolower(i8* nocapture writeonly %0, i8* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %13, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %11, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds i8, i8* %1, i64 %6
%8 = load i8, i8* %7
%9 = tail call signext i8 @tolower(i8 signext %8)
%10 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %9, i8* %10
%11 = add nuw i64 %6, 1
%12 = icmp eq i64 %11, %2
br i1 %12, label %13, label %5
13: ; preds = %5, %3
ret void
}
int getI32_2(unsigned char *buf1, unsigned char *buf2) {
  return (buf1[0] + (buf1[1] << 8) + (buf2[0] << 16) + (buf2[1] << 24));
}


x86 assembly (clang, -O0):
<getI32_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getI32_2>:
movzwl (%rdi),%eax
movzbl (%rsi),%ecx
shl    $0x10,%ecx
or     %eax,%ecx
movzbl 0x1(%rsi),%eax
shl    $0x18,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @getI32_2(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 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = add nsw i32 %8, %13
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 0
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 16
%20 = add nsw i32 %14, %19
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i64 1
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = shl i32 %24, 24
%26 = add nsw i32 %20, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @getI32_2(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = or i32 %8, %4
%10 = load i8, i8* %1
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %9, %12
%14 = getelementptr inbounds i8, i8* %1, i64 1
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
void zeroBuffer() {
  extern char BUFFER[];
  int i;
  for (i = 0; i < 1000; ++i) {
    BUFFER[i] = '\0';
  }
}


x86 assembly (clang, -O0):
<zeroBuffer>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3e8,-0x4(%rbp)
jge    1135 <zeroBuffer+0x35>
movslq -0x4(%rbp),%rcx
mov    0x2ec5(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <zeroBuffer+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zeroBuffer>:
push   %rax
mov    0x2ed0(%rip),%rdi
mov    $0x3e8,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

LLVM IR (-O0):
@BUFFER = external global [0 x i8]
define void @zeroBuffer() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %9, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 1000
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = load i32, i32* %1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [0 x i8], [0 x i8]* @BUFFER, i64 0, i64 %7
store i8 0, i8* %8
br label %9
9: ; preds = %5
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %2
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@BUFFER = external global [0 x i8]
define void @zeroBuffer() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
void p9_get_tag(uint16_t *ptag, uint8_t *data) {
  memcpy(ptag, data + sizeof(uint32_t) + sizeof(uint8_t), sizeof(uint16_t));
}


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

x86 assembly (clang, -O2):
<p9_get_tag>:
add    $0x20,%rsi
mov    $0x4,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @p9_get_tag(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = getelementptr inbounds i32, i32* %6, i64 4
%8 = getelementptr inbounds i32, i32* %7, i64 4
%9 = call i32 @memcpy(i32* %5, i32* %8, i32 4)
ret void
}

LLVM IR (-O2):
define void @p9_get_tag(i32* %0, i32* %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 8
%4 = tail call i32 @memcpy(i32* %0, i32* %3, i32 4)
ret void
}
void nl() { int value; }


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

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

LLVM IR (-O0):
define void @nl() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @nl() {
ret void
}
/* Type definitions */
struct timeval {
  double tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double fTime() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return ((double)(tv.tv_sec)) + ((double)(tv.tv_usec / 1000000.0));
}


x86 assembly (clang, -O0):
<fTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xec8(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fTime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
divsd  0xecb(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
define double @fTime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %5, %8
ret double %9
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
define double @fTime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load double, double* %7
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %9, %6
ret double %10
}
/* Variables and functions */
int __ctype_tolower(int);
int tolower(int c) { return __ctype_tolower(c); }


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

x86 assembly (clang, -O2):
<tolower>:
jmp    1030 <__ctype_tolower@plt>

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

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i32 @__ctype_tolower(i32 %0)
ret i32 %2
}
int hash(int key) { return key * 29; }


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

x86 assembly (clang, -O2):
<hash>:
lea    (%rdi,%rdi,8),%eax
lea    (%rax,%rax,2),%eax
add    %edi,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @hash(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 29
ret i32 %4
}

LLVM IR (-O2):
define i32 @hash(i32 %0) {
%2 = mul nsw i32 %0, 29
ret i32 %2
}
/* Variables and functions */
scalar_t__ calloc(unsigned int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
double *vector(int nl, int nh) {
  double *v;
  v = (double *)calloc((unsigned)(nh - nl + 1), sizeof(double));
  if (!v)
    fprintf(stderr, "allocation failure in vector()");
  return v - nl;
}


x86 assembly (clang, -O0):
<vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x4(%rbp),%edi
add    $0x1,%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1165 <vector+0x45>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
sub    %edi,%esi
lea    0x1(%rsi),%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1151 <vector+0x31>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xeb4(%rip),%rsi
call   1040 <fprintf@plt>
movslq %ebp,%rax
shl    $0x3,%rax
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"allocation failure in vector()\00"
define double* @vector(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = call i64 @calloc(i32 %9, i32 8)
%11 = inttoptr i64 %10 to double*
store double* %11, double** %5
%12 = load double*, double** %5
%13 = icmp ne double* %12, null
br i1 %13, label %17, label %14
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %14, %2
%18 = load double*, double** %5
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = sub i64 0, %20
%22 = getelementptr inbounds double, double* %18, i64 %21
ret double* %22
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"allocation failure in vector()\00"
define double* @vector(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = tail call i64 @calloc(i32 %4, i32 8)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %7, %2
%11 = inttoptr i64 %5 to double*
%12 = sext i32 %0 to i64
%13 = sub nsw i64 0, %12
%14 = getelementptr inbounds double, double* %11, i64 %13
ret double* %14
}
/* Variables and functions */
int OK;
int PDC_cursor_off() { return (OK); }


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

x86 assembly (clang, -O2):
<PDC_cursor_off>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@OK = global i32 0
define i32 @PDC_cursor_off() {
%1 = load i32, i32* @OK
ret i32 %1
}

LLVM IR (-O2):
@OK = global i32 0
define i32 @PDC_cursor_off() {
%1 = load i32, i32* @OK
ret i32 %1
}
int _gcd(int u, int v) { return (v != 0) ? _gcd(v, u % v) : u; }


x86 assembly (clang, -O0):
<_gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1141 <_gcd+0x31>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%esi
call   1030 <_gcd@plt>
mov    %eax,-0xc(%rbp)
jmp    1147 <_gcd+0x37>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <_gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <_gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @_gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %5, %4 ]
ret i32 %10
}
void dummy(void (*foo)(void)) {
  if (foo)
    (*foo)();
}


x86 assembly (clang, -O0):
<dummy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     111a <dummy+0x1a>
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummy>:
test   %rdi,%rdi
je     1107 <dummy+0x7>
jmp    *%rdi
ret

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

LLVM IR (-O2):
define void @dummy(void ()* %0) {
%2 = icmp eq void ()* %0, null
br i1 %2, label %4, label %3
3: ; preds = %1
tail call void %0()
br label %4
4: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BsiGenerateTables();
int /*<<< orphan*/ Sinc4GenerateTables();
int main(void) {
  BsiGenerateTables();
  Sinc4GenerateTables();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @BsiGenerateTables()
%2 = tail call i32 (...) @Sinc4GenerateTables()
ret i32 0
}
void RTVfsLockRetain(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsLockRetain() {
ret void
}
void fa41(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        a:
          goto a;
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa41>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa41+0x4>

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

LLVM IR (-O0):
define void @fa41() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; preds = %13
br label %13
14: ; No predecessors!
br label %15
15: ; preds = %15, %14
br label %15
16: ; preds = %16
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
br label %19
19: ; preds = %19, %18
br label %19
20: ; No predecessors!
br label %21
21: ; preds = %21, %20
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
br label %24
24: ; preds = %24, %23
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
27: ; preds = %27
br label %27
}

LLVM IR (-O2):
define void @fa41() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ ClearWinSock();
int /*<<< orphan*/ close(int);
void closeConnection(int socket) {
  close(socket);
  ClearWinSock();
  return;
}


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

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

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

LLVM IR (-O2):
define void @closeConnection(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = tail call i32 (...) @ClearWinSock()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clr_scrn() { printf("\033[2J"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
define void @clr_scrn() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
define void @clr_scrn() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
void foo_2_1_1_1_1_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_1_1_1_1_1_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dpush(int /*<<< orphan*/);
int /*<<< orphan*/ next_object();
void primitive_next_object(void) { dpush(next_object()); }


x86 assembly (clang, -O0):
<primitive_next_object>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <next_object@plt>
mov    %eax,%edi
call   1030 <dpush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_next_object>:
push   %rax
xor    %eax,%eax
call   1040 <next_object@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <dpush@plt>

LLVM IR (-O0):
define void @primitive_next_object() {
%1 = call i32 (...) @next_object()
%2 = call i32 @dpush(i32 %1)
ret void
}

LLVM IR (-O2):
define void @primitive_next_object() {
%1 = tail call i32 (...) @next_object()
%2 = tail call i32 @dpush(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ superlu_free(int *);
void finalize_disjoint_sets(int *pp) { superlu_free(pp); }


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

x86 assembly (clang, -O2):
<finalize_disjoint_sets>:
jmp    1030 <superlu_free@plt>

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

LLVM IR (-O2):
define void @finalize_disjoint_sets(i32* %0) {
%2 = tail call i32 @superlu_free(i32* %0)
ret void
}
void tdefault_thread_events(struct target_ops *self, int arg1) {}


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

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

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

LLVM IR (-O2):
%struct.target_ops = type opaque
define void @tdefault_thread_events(%struct.target_ops* nocapture %0, i32 %1) {
ret void
}