xunge/DecIR huggingface dataset:
/* Variables and functions */
int exp(double);
double fermi_dirac(double E, double mu, double T) {
  return 1. / (exp((E - mu) / T) + 1);
}


x86 assembly (clang, -O0):
<fermi_dirac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1030 <exp@plt>
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xeb6(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fermi_dirac>:
push   %rax
subsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
call   1030 <exp@plt>
add    $0x1,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xed0(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @fermi_dirac(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fsub double %7, %8
%10 = load double, double* %6
%11 = fdiv double %9, %10
%12 = call i32 @exp(double %11)
%13 = add nsw i32 %12, 1
%14 = sitofp i32 %13 to double
%15 = fdiv double 1.000000e+00, %14
ret double %15
}

LLVM IR (-O2):
define double @fermi_dirac(double %0, double %1, double %2) {
%4 = fsub double %0, %1
%5 = fdiv double %4, %2
%6 = tail call i32 @exp(double %5)
%7 = add nsw i32 %6, 1
%8 = sitofp i32 %7 to double
%9 = fdiv double 1.000000e+00, %8
ret double %9
}
unsigned char *__get_member(void *generation, int i, int size) {
  return ((unsigned char *)generation) + i * size;
}


x86 assembly (clang, -O0):
<__get_member>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
movslq %ecx,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_member>:
imul   %edx,%esi
movslq %esi,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @__get_member(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = mul nsw i32 %8, %9
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %7, i64 %11
ret i8* %12
}

LLVM IR (-O2):
define i8* @__get_member(i8* readnone %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
ret i8* %6
}
int test_imm_50uint32_reg(unsigned int val) {
  return ((val) & (0x50 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_50uint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 80
%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_50uint32_reg(i32 %0) {
%2 = and i32 %0, 80
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void version(void) {
  fprintf(stderr, "createtable version 1.00 (11 Nov 2001)\n");
  fprintf(stderr, "\n");
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xeed(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef7(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"createtable version 1.00 (11 Nov 2001)\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @version() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"createtable version 1.00 (11 Nov 2001)\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ moo();
int main() {
  moo();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @moo()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(int array[], int size) {
  for (int i = 0; i < size; ++i) {
    printf(" %d", array[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print_array+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_array+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c" %d\00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void voidp_swap(void *block_a, void *block_b, size_t buf_size) {
  void *buf = malloc(buf_size);
  memcpy(buf, block_a, buf_size);
  memcpy(block_a, block_b, buf_size);
  memcpy(block_b, buf, buf_size);
}


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

x86 assembly (clang, -O2):
<voidp_swap>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r12
mov    %rax,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @voidp_swap(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = load i8*, i8** %4
%12 = load i64, i64* %6
%13 = call i32 @memcpy(i8* %10, i8* %11, i64 %12)
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = load i64, i64* %6
%17 = call i32 @memcpy(i8* %14, i8* %15, i64 %16)
%18 = load i8*, i8** %5
%19 = load i8*, i8** %7
%20 = load i64, i64* %6
%21 = call i32 @memcpy(i8* %18, i8* %19, i64 %20)
ret void
}

LLVM IR (-O2):
define void @voidp_swap(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @malloc(i64 %2)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %2)
%6 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
%7 = tail call i32 @memcpy(i8* %1, i8* %4, i64 %2)
ret void
}
int test_imm_B7int16_reg(short val) {
  return ((val) & (-0xB7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B7int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff49,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_B7int16_reg(i16 signext %0) {
%2 = and i16 %0, -183
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
char *hash_plugin_summary(void) {
  return ("ipb2 \t\tmd5(md5(salt).md5(pass)) plugin (IPB > 2.x)");
}


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

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

LLVM IR (-O0):
@.str = [51 x i8] c"ipb2 \09\09md5(md5(salt).md5(pass)) plugin (IPB > 2.x)\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [51 x i8] c"ipb2 \09\09md5(md5(salt).md5(pass)) plugin (IPB > 2.x)\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0)
}
void swap_without_temp(int *a, int *b) {
  *a ^= *b;
  *b ^= *a;
  *a ^= *b;
}


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

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

LLVM IR (-O0):
define void @swap_without_temp(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 = load i32, i32* %5
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = xor i32 %8, %6
store i32 %9, i32* %7
%10 = load i32*, i32** %3
%11 = load i32, i32* %10
%12 = load i32*, i32** %4
%13 = load i32, i32* %12
%14 = xor i32 %13, %11
store i32 %14, i32* %12
%15 = load i32*, i32** %4
%16 = load i32, i32* %15
%17 = load i32*, i32** %3
%18 = load i32, i32* %17
%19 = xor i32 %18, %16
store i32 %19, i32* %17
ret void
}

LLVM IR (-O2):
define void @swap_without_temp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
%5 = xor i32 %4, %3
store i32 %5, i32* %0
%6 = load i32, i32* %1
%7 = xor i32 %6, %5
store i32 %7, i32* %1
%8 = load i32, i32* %0
%9 = xor i32 %8, %7
store i32 %9, i32* %0
ret void
}
/* Variables and functions */
double f();
int main(void) {
  double x;
  x = f();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double (...) @f()
ret i32 0
}
int longbytes(void) { return sizeof(long); }


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

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

LLVM IR (-O0):
define i32 @longbytes() {
ret i32 8
}

LLVM IR (-O2):
define i32 @longbytes() {
ret i32 8
}
void __a3(void) {}


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

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

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

LLVM IR (-O2):
define void @__a3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _gets(char *);
void bang(void) {
  char buf[20];
  _gets(buf);
  return;
}


x86 assembly (clang, -O0):
<bang>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rdi
call   1030 <_gets@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bang>:
sub    $0x18,%rsp
mov    %rsp,%rdi
call   1030 <_gets@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @bang() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @_gets(i8* %2)
ret void
}

LLVM IR (-O2):
define void @bang() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @_gets(i8* %2)
ret void
}
/* Variables and functions */
int resources_set_defaults();
int cmdline_default(const char *param, void *extra_param) {
  return resources_set_defaults();
}


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

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

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

LLVM IR (-O2):
define i32 @cmdline_default(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @resources_set_defaults()
ret i32 %3
}
double solveDiscriminant(double a, double b, double c) {
  return b * b - 4 * a * c;
}


x86 assembly (clang, -O0):
<solveDiscriminant>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  0xedb(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<solveDiscriminant>:
mulsd  0xef8(%rip),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @solveDiscriminant(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = load double, double* %5
%9 = load double, double* %4
%10 = fmul double 4.000000e+00, %9
%11 = load double, double* %6
%12 = fmul double %10, %11
%13 = fneg double %12
%14 = call double @llvm.fmuladd.f64(double %7, double %8, double %13)
ret double %14
}

LLVM IR (-O2):
define double @solveDiscriminant(double %0, double %1, double %2) {
%4 = fmul double %0, -4.000000e+00
%5 = fmul double %4, %2
%6 = tail call double @llvm.fmuladd.f64(double %1, double %1, double %5)
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
void *MAP_FAILED;
int /*<<< orphan*/ MAP_SHARED;
int PROT_READ;
int PROT_WRITE;
void *mmap(int /*<<< orphan*/, int /*<<< orphan*/, int, int /*<<< orphan*/, int,
           int /*<<< orphan*/);
void *vhost_user_map_guest_memory(int fd, uint64_t size) {
  void *ptr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
  return ptr == MAP_FAILED ? 0 : ptr;
}


x86 assembly (clang, -O0):
<vhost_user_map_guest_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    0x2ed0(%rip),%rax
mov    (%rax),%edx
mov    0x2e9f(%rip),%rax
or     (%rax),%edx
mov    0x2eae(%rip),%rax
mov    (%rax),%ecx
mov    -0x4(%rbp),%r8d
xor    %r9d,%r9d
mov    %r9d,%edi
call   1030 <mmap@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2e6e(%rip),%rcx
cmp    (%rcx),%rax
jne    116e <vhost_user_map_guest_memory+0x5e>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1176 <vhost_user_map_guest_memory+0x66>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vhost_user_map_guest_memory>:
push   %rbx
mov    %edi,%r8d
mov    0x2edd(%rip),%rax
mov    0x2eae(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
mov    0x2ebb(%rip),%rax
mov    (%rax),%ecx
xor    %ebx,%ebx
xor    %edi,%edi
xor    %r9d,%r9d
call   1030 <mmap@plt>
mov    0x2e86(%rip),%rcx
cmp    (%rcx),%rax
cmove  %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
define i8* @vhost_user_map_guest_memory(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* @PROT_READ
%8 = load i32, i32* @PROT_WRITE
%9 = or i32 %7, %8
%10 = load i32, i32* @MAP_SHARED
%11 = load i32, i32* %3
%12 = call i8* @mmap(i32 0, i32 %6, i32 %9, i32 %10, i32 %11, i32 0)
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = load i8*, i8** @MAP_FAILED
%15 = icmp eq i8* %13, %14
br i1 %15, label %16, label %17
16: ; preds = %2
br label %19
17: ; preds = %2
%18 = load i8*, i8** %5
br label %19
19: ; preds = %17, %16
%20 = phi i8* [ null, %16 ], [ %18, %17 ]
ret i8* %20
}

LLVM IR (-O2):
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
define i8* @vhost_user_map_guest_memory(i32 %0, i32 %1) {
%3 = load i32, i32* @PROT_READ
%4 = load i32, i32* @PROT_WRITE
%5 = or i32 %4, %3
%6 = load i32, i32* @MAP_SHARED
%7 = tail call i8* @mmap(i32 0, i32 %1, i32 %5, i32 %6, i32 %0, i32 0)
%8 = load i8*, i8** @MAP_FAILED
%9 = icmp eq i8* %7, %8
%10 = select i1 %9, i8* null, i8* %7
ret i8* %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ int8_t;
typedef int /*<<< orphan*/ int64_t;
typedef int /*<<< orphan*/ int32_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  if (sizeof(uint8_t) != 1) {
    printf("Sizeof(uint8_t) is %d should be 1\n", (int)sizeof(uint8_t));
    exit(1);
  }
  if (sizeof(int8_t) != 1) {
    printf("Sizeof(int8_t) is %d should be 1\n", (int)sizeof(int8_t));
    exit(1);
  }
  if (sizeof(uint16_t) != 2) {
    printf("Sizeof(uint16_t) is %d should be 2\n", (int)sizeof(uint16_t));
    exit(1);
  }
  if (sizeof(int16_t) != 2) {
    printf("Sizeof(int16_t) is %d should be 2\n", (int)sizeof(int16_t));
    exit(1);
  }
  if (sizeof(uint32_t) != 4) {
    printf("Sizeof(uint32_t) is %d should be 4\n", (int)sizeof(uint32_t));
    exit(1);
  }
  if (sizeof(int32_t) != 4) {
    printf("Sizeof(int32_t) is %d should be 4\n", (int)sizeof(int32_t));
    exit(1);
  }
  if (sizeof(uint64_t) != 8) {
    printf("Sizeof(uint64_t) is %d should be 8\n", (int)sizeof(uint64_t));
    exit(1);
  }
  if (sizeof(int64_t) != 8) {
    printf("Sizeof(int64_t) is %d should be 8\n", (int)sizeof(int64_t));
    exit(1);
  }
  printf("The stdint.h types are correct.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Sizeof(uint8_t) is %d should be 1\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 4)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [35 x i8] c"Sizeof(uint8_t) is %d should be 1\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 4)
%4 = tail call i32 @exit(i32 1)
unreachable
}
char *Sys_FindNext(unsigned musthave, unsigned canthave) { return ((void *)0); }


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

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

LLVM IR (-O0):
define i8* @Sys_FindNext(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @Sys_FindNext(i32 %0, i32 %1) {
ret i8* null
}
/* Type definitions */
struct passwd {
  int /*<<< orphan*/ pw_name;
};

/* Variables and functions */
int strcmp(int /*<<< orphan*/, int /*<<< orphan*/);
int pwd_cmp_byname(const void *ap, const void *bp) {
  const struct passwd *a = ap;
  const struct passwd *b = bp;
  return (strcmp(a->pw_name, b->pw_name));
}


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

x86 assembly (clang, -O2):
<pwd_cmp_byname>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
%struct.passwd = type { i32 }
define i32 @pwd_cmp_byname(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.passwd*
%6 = alloca %struct.passwd*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.passwd*
store %struct.passwd* %8, %struct.passwd** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to %struct.passwd*
store %struct.passwd* %10, %struct.passwd** %6
%11 = load %struct.passwd*, %struct.passwd** %5
%12 = getelementptr inbounds %struct.passwd, %struct.passwd* %11, i32 0, i32 0
%13 = load i32, i32* %12
%14 = load %struct.passwd*, %struct.passwd** %6
%15 = getelementptr inbounds %struct.passwd, %struct.passwd* %14, i32 0, i32 0
%16 = load i32, i32* %15
%17 = call i32 @strcmp(i32 %13, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @pwd_cmp_byname(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = tail call i32 @strcmp(i32 %4, i32 %6)
ret i32 %7
}
float f3(void) { return 0; }


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

x86 assembly (clang, -O2):
<f3>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @f3() {
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @f3() {
ret float 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void handler(int sig) { printf("Handle the signal %d\n", sig); }


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

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

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

LLVM IR (-O2):
@.str = [22 x i8] c"Handle the signal %d\0A\00"
define void @handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
double initanticausal(float *c, int step, int n, double z) {
  return (z / (z * z - 1)) * (z * c[step * (n - 2)] + c[step * (n - 1)]);
}


x86 assembly (clang, -O0):
<initanticausal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%edx
sub    $0x2,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm2
cvtss2sd %xmm2,%xmm3
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%edx
sub    $0x1,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<initanticausal>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef0(%rip),%xmm1
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
lea    -0x2(%rdx),%eax
imul   %esi,%eax
cltq
movss  (%rdi,%rax,4),%xmm1
cvtss2sd %xmm1,%xmm1
add    $0xffffffff,%edx
imul   %esi,%edx
movslq %edx,%rax
movss  (%rdi,%rax,4),%xmm3
cvtss2sd %xmm3,%xmm3
mulsd  %xmm1,%xmm0
addsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @initanticausal(float* %0, i32 %1, i32 %2, double %3) {
%5 = alloca float*
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
store float* %0, float** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store double %3, double* %8
%9 = load double, double* %8
%10 = load double, double* %8
%11 = load double, double* %8
%12 = call double @llvm.fmuladd.f64(double %10, double %11, double -1.000000e+00)
%13 = fdiv double %9, %12
%14 = load double, double* %8
%15 = load float*, float** %5
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = sub nsw i32 %17, 2
%19 = mul nsw i32 %16, %18
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds float, float* %15, i64 %20
%22 = load float, float* %21
%23 = fpext float %22 to double
%24 = load float*, float** %5
%25 = load i32, i32* %6
%26 = load i32, i32* %7
%27 = sub nsw i32 %26, 1
%28 = mul nsw i32 %25, %27
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds float, float* %24, i64 %29
%31 = load float, float* %30
%32 = fpext float %31 to double
%33 = call double @llvm.fmuladd.f64(double %14, double %23, double %32)
%34 = fmul double %13, %33
ret double %34
}

LLVM IR (-O2):
define double @initanticausal(float* nocapture %0, i32 %1, i32 %2, double %3) {
%5 = tail call double @llvm.fmuladd.f64(double %3, double %3, double -1.000000e+00)
%6 = fdiv double %3, %5
%7 = add nsw i32 %2, -2
%8 = mul nsw i32 %7, %1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds float, float* %0, i64 %9
%11 = load float, float* %10
%12 = fpext float %11 to double
%13 = add nsw i32 %2, -1
%14 = mul nsw i32 %13, %1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds float, float* %0, i64 %15
%17 = load float, float* %16
%18 = fpext float %17 to double
%19 = tail call double @llvm.fmuladd.f64(double %3, double %12, double %18)
%20 = fmul double %6, %19
ret double %20
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t encode(uint8_t v) {
  return (v & 0x80) ? (~(v << 1) & 0xE0) | (v & 0x0F)
                    : (v << 1 & 0xE0) | 0x10 | (v & 0x0F);
}


x86 assembly (clang, -O0):
<encode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1136 <encode+0x36>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
xor    $0xffffffff,%eax
and    $0xe0,%eax
mov    -0x4(%rbp),%ecx
and    $0xf,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    114f <encode+0x4f>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
and    $0xe0,%eax
or     $0x10,%eax
mov    -0x4(%rbp),%ecx
and    $0xf,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode>:
mov    %edi,%eax
and    $0x70,%eax
mov    %edi,%ecx
and    $0xf,%ecx
lea    (%rcx,%rax,2),%edx
xor    $0xe0,%edx
test   $0x80,%dil
lea    0x10(%rcx,%rax,2),%eax
cmovne %edx,%eax
ret

LLVM IR (-O0):
define i32 @encode(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 128
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i32, i32* %2
%8 = shl i32 %7, 1
%9 = xor i32 %8, -1
%10 = and i32 %9, 224
%11 = load i32, i32* %2
%12 = and i32 %11, 15
%13 = or i32 %10, %12
br label %22
14: ; preds = %1
%15 = load i32, i32* %2
%16 = shl i32 %15, 1
%17 = and i32 %16, 224
%18 = or i32 %17, 16
%19 = load i32, i32* %2
%20 = and i32 %19, 15
%21 = or i32 %18, %20
br label %22
22: ; preds = %14, %6
%23 = phi i32 [ %13, %6 ], [ %21, %14 ]
ret i32 %23
}

LLVM IR (-O2):
define i32 @encode(i32 %0) {
%2 = and i32 %0, 128
%3 = icmp eq i32 %2, 0
%4 = shl i32 %0, 1
%5 = and i32 %4, 224
%6 = and i32 %0, 15
%7 = or i32 %5, %6
%8 = xor i32 %7, 224
%9 = or i32 %6, %5
%10 = or i32 %9, 16
%11 = select i1 %3, i32 %10, i32 %8
ret i32 %11
}
void ff_hevc_put_hevc_uni_w_epel_hv64_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_hv64_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ifhead(int osvers, int osrel, int ossub) {
  printf("interf busy ipack/s opack/s iKbyte/s oKbyte/s "
         "imbps ombps maxmbps_if_");
}


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

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

LLVM IR (-O0):
@.str = [70 x i8] c"interf busy ipack/s opack/s iKbyte/s oKbyte/s imbps ombps maxmbps_if_\00"
define void @ifhead(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [70 x i8] c"interf busy ipack/s opack/s iKbyte/s oKbyte/s imbps ombps maxmbps_if_\00"
define void @ifhead(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}
void sk_push(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int kpatch_openat_file(int /*<<< orphan*/, char const *, struct kp_file *);
int kpatch_open_file(const char *fname, struct kp_file *kpatch) {
  return kpatch_openat_file(AT_FDCWD, fname, kpatch);
}


x86 assembly (clang, -O0):
<kpatch_open_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <kpatch_openat_file@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kpatch_open_file>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
jmp    1030 <kpatch_openat_file@plt>

LLVM IR (-O0):
%struct.kp_file = type { i32 }
@AT_FDCWD = global i32 0
define i32 @kpatch_open_file(i8* %0, %struct.kp_file* %1) {
%3 = alloca i8*
%4 = alloca %struct.kp_file*
store i8* %0, i8** %3
store %struct.kp_file* %1, %struct.kp_file** %4
%5 = load i32, i32* @AT_FDCWD
%6 = load i8*, i8** %3
%7 = load %struct.kp_file*, %struct.kp_file** %4
%8 = call i32 @kpatch_openat_file(i32 %5, i8* %6, %struct.kp_file* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.kp_file = type { i32 }
@AT_FDCWD = global i32 0
define i32 @kpatch_open_file(i8* %0, %struct.kp_file* %1) {
%3 = load i32, i32* @AT_FDCWD
%4 = tail call i32 @kpatch_openat_file(i32 %3, i8* %0, %struct.kp_file* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_xml_comments() {
  test_parser_verify_parse(test_parser_sourcefile("xml", " <!--comment-->"),
                           "xml", "", "<!--comment-->", 0);
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"xml\00"
@.str.1 = [16 x i8] c" <!--comment-->\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [15 x i8] c"<!--comment-->\00"
define void @test_xml_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"xml\00"
@.str.1 = [16 x i8] c" <!--comment-->\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [15 x i8] c"<!--comment-->\00"
define void @test_xml_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
void set_bit(int *number, int position, int bit_value) {
  if (bit_value == 1) {
    *number |= (bit_value << position);
  } else {
    *number &= (~(1U << position));
  }
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    112f <set_bit+0x2f>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
jmp    1146 <set_bit+0x46>
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cmp    $0x1,%edx
jne    1113 <set_bit+0x13>
or     (%rdi),%eax
mov    %eax,(%rdi)
ret
not    %eax
and    (%rdi),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @set_bit(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %16
9: ; preds = %3
%10 = load i32, i32* %6
%11 = load i32, i32* %5
%12 = shl i32 %10, %11
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = or i32 %14, %12
store i32 %15, i32* %13
br label %23
16: ; preds = %3
%17 = load i32, i32* %5
%18 = shl i32 1, %17
%19 = xor i32 %18, -1
%20 = load i32*, i32** %4
%21 = load i32, i32* %20
%22 = and i32 %21, %19
store i32 %22, i32* %20
br label %23
23: ; preds = %16, %9
ret void
}

LLVM IR (-O2):
define void @set_bit(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 1
%5 = shl nuw i32 1, %1
br i1 %4, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %0
%8 = or i32 %7, %5
br label %13
9: ; preds = %3
%10 = xor i32 %5, -1
%11 = load i32, i32* %0
%12 = and i32 %11, %10
br label %13
13: ; preds = %9, %6
%14 = phi i32 [ %12, %9 ], [ %8, %6 ]
store i32 %14, i32* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *getcurrenttime() {
  time_t curtime;
  char *buffer;
  time(&curtime);
  buffer = ctime(&curtime);
  buffer[strlen(buffer) - 1] = ';';
  return buffer;
}


x86 assembly (clang, -O0):
<getcurrenttime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x4(%rbp),%rdi
call   1050 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x3b,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getcurrenttime>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    %rbx,%rdi
call   1030 <ctime@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
cltq
movb   $0x3b,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @getcurrenttime() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i32 @time(i32* %1)
%4 = call i8* @ctime(i32* %1)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @strlen(i8* %6)
%8 = sub nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %5, i64 %9
store i8 59, i8* %10
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
define i8* @getcurrenttime() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call i8* @ctime(i32* %1)
%5 = call i32 @strlen(i8* %4)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
store i8 59, i8* %8
ret i8* %4
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int mapcon_coefficients_and_exponents_of_map(int dim, int ind, int nvr,
                                             double *cff, int *exp) {
  int a[3], fail;
  a[0] = dim;
  a[1] = ind;
  a[2] = nvr;
  fail = _ada_use_c2phc4c(438, a, exp, cff, 0);
  return fail;
}


x86 assembly (clang, -O0):
<mapcon_coefficients_and_exponents_of_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
lea    -0x2c(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1b6,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mapcon_coefficients_and_exponents_of_map(i32 %0, i32 %1, i32 %2, double* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double*
%10 = alloca i32*
%11 = alloca [3 x i32]
%12 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store double* %3, double** %9
store i32* %4, i32** %10
%13 = load i32, i32* %6
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
store i32 %13, i32* %14
%15 = load i32, i32* %7
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 1
store i32 %15, i32* %16
%17 = load i32, i32* %8
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 2
store i32 %17, i32* %18
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
%20 = load i32*, i32** %10
%21 = load double*, double** %9
%22 = call i32 @_ada_use_c2phc4c(i32 438, i32* %19, i32* %20, double* %21, i32 0)
store i32 %22, i32* %12
%23 = load i32, i32* %12
ret i32 %23
}

LLVM IR (-O2):
define i32 @mapcon_coefficients_and_exponents_of_map(i32 %0, i32 %1, i32 %2, double* %3, i32* %4) {
%6 = alloca [3 x i32]
%7 = bitcast [3 x i32]* %6 to i8*
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 %0, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
store i32 %1, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
store i32 %2, i32* %10
%11 = call i32 @_ada_use_c2phc4c(i32 438, i32* %8, i32* %4, double* %3, i32 0)
ret i32 %11
}
/* Type definitions */
typedef int ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
ssize_t getline(char **lineptr __attribute__((unused)),
                size_t *n __attribute__((unused)),
                FILE *stream __attribute__((unused))) {
  printf("getline\n");
  errno = ENOSYS;
  return (-1);
}


x86 assembly (clang, -O0):
<getline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%ecx
mov    0x2e98(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getline>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ec4(%rip),%rax
mov    (%rax),%eax
mov    0x2eab(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
@str = [8 x i8] c"getline\00"
define i32 @getline(i8** nocapture readnone %0, i64* nocapture readnone %1, i32* nocapture readnone %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_hour;
  int tm_min;
};

/* Variables and functions */
struct tm *gmtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void getUTC() {
  time_t rawtime;
  struct tm *ptm;
  time(&rawtime);
  ptm = gmtime(&rawtime);
  printf("UTC Time\t %2d:%02d\n", (ptm->tm_hour) % 24, ptm->tm_min);
}


x86 assembly (clang, -O0):
<getUTC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <time@plt>
lea    -0x4(%rbp),%rdi
call   1050 <gmtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    $0x18,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edx
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getUTC>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <time@plt>
mov    %rbx,%rdi
call   1050 <gmtime@plt>
movslq (%rax),%rsi
imul   $0x2aaaaaab,%rsi,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x22,%rcx
add    %edx,%ecx
shl    $0x3,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%esi
mov    0x4(%rax),%edx
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32 }
@.str = [20 x i8] c"UTC Time\09 %2d:%02d\0A\00"
define void @getUTC() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @gmtime(i32* %1)
store %struct.tm* %4, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = srem i32 %7, 24
%9 = load %struct.tm*, %struct.tm** %2
%10 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 1
%11 = load i32, i32* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32 }
@.str = [20 x i8] c"UTC Time\09 %2d:%02d\0A\00"
define void @getUTC() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @gmtime(i32* %1)
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 0
%6 = load i32, i32* %5
%7 = srem i32 %6, 24
%8 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 1
%9 = load i32, i32* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9)
ret void
}