xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int __setxid(int, int, int /*<<< orphan*/, int);
int seteuid(uid_t euid) { return __setxid(208, -1, euid, -1); }


x86 assembly (clang, -O0):
<seteuid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0xd0,%edi
mov    $0xffffffff,%ecx
mov    %ecx,%esi
call   1030 <__setxid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seteuid>:
mov    %edi,%edx
mov    $0xd0,%edi
mov    $0xffffffff,%esi
mov    $0xffffffff,%ecx
jmp    1030 <__setxid@plt>

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

LLVM IR (-O2):
define i32 @seteuid(i32 %0) {
%2 = tail call i32 @__setxid(i32 208, i32 -1, i32 %0, i32 -1)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int __serialize_uint8(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int __serialize_uint16(uint8_t *out, int out_sz, uint16_t n) {
  out_sz = __serialize_uint8(out, out_sz, (uint8_t)(n & 0xFF));
  out_sz = __serialize_uint8(out + 1, out_sz, (uint8_t)((n >> 8) & 0xFF));
  return (out_sz);
}


x86 assembly (clang, -O0):
<__serialize_uint16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
and    $0xff,%edx
call   1030 <__serialize_uint8@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
sar    $0x8,%edx
and    $0xff,%edx
call   1030 <__serialize_uint8@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__serialize_uint16>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%eax
mov    %rdi,%rbx
movzbl %al,%edx
mov    %eax,%ebp
call   1030 <__serialize_uint8@plt>
add    $0x4,%rbx
mov    %ebp,%ecx
movzbl %ch,%edx
mov    %rbx,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <__serialize_uint8@plt>

LLVM IR (-O0):
define i32 @__serialize_uint16(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = and i32 %9, 255
%11 = call i32 @__serialize_uint8(i32* %7, i32 %8, i32 %10)
store i32 %11, i32* %5
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = ashr i32 %15, 8
%17 = and i32 %16, 255
%18 = call i32 @__serialize_uint8(i32* %13, i32 %14, i32 %17)
store i32 %18, i32* %5
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
define i32 @__serialize_uint16(i32* %0, i32 %1, i32 %2) {
%4 = and i32 %2, 255
%5 = tail call i32 @__serialize_uint8(i32* %0, i32 %1, i32 %4)
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = lshr i32 %2, 8
%8 = and i32 %7, 255
%9 = tail call i32 @__serialize_uint8(i32* %6, i32 %5, i32 %8)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float);
int main(void) {
  float fahr, celsius;
  for (fahr = 0; fahr <= 300; fahr += 20) {
    celsius = (5.0 / 9.0) * (fahr - 32.0);
    printf("%3.0f %6.1f\n", fahr, celsius);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xed1(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1190 <main+0x80>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xec6(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeb2(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
movss  0xe83(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1127 <main+0x17>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0xffffffec,%ebp
lea    0xef1(%rip),%rbx
nop
add    $0x14,%ebp
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
addsd  0xec7(%rip),%xmm1
mulsd  0xec7(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
cmp    $0x119,%ebp
jb     1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%3.0f %6.1f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %2
br label %4
4: ; preds = %16, %0
%5 = load float, float* %2
%6 = fcmp ole float %5, 3.000000e+02
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = fsub double %9, 3.200000e+01
%11 = fmul double 0x3FE1C71C71C71C72, %10
%12 = fptrunc double %11 to float
store float %12, float* %3
%13 = load float, float* %2
%14 = load float, float* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %13, float %14)
br label %16
16: ; preds = %7
%17 = load float, float* %2
%18 = fadd float %17, 2.000000e+01
store float %18, float* %2
br label %4
19: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%3.0f %6.1f\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %9, %1 ]
%3 = sitofp i32 %2 to float
%4 = fpext float %3 to double
%5 = fadd double %4, -3.200000e+01
%6 = fmul double %5, 0x3FE1C71C71C71C72
%7 = fptrunc double %6 to float
%8 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %3, float %7)
%9 = add nuw nsw i32 %2, 20
%10 = icmp ugt i32 %2, 280
br i1 %10, label %11, label %1
11: ; preds = %1
ret i32 0
}
unsigned int bit_scan_forward(unsigned int i) {
  unsigned int j;
  for (j = 0; j < 32; j++) {
    if (i & (1 << j)) {
      return j;
    }
  }
  return -1;
}


x86 assembly (clang, -O0):
<bit_scan_forward>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jae    1150 <bit_scan_forward+0x50>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     113d <bit_scan_forward+0x3d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <bit_scan_forward+0x57>
jmp    1142 <bit_scan_forward+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <bit_scan_forward+0xe>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_scan_forward>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
bt     %eax,%edi
jb     114b <bit_scan_forward+0x4b>
lea    0x1(%rax),%ecx
movzbl %cl,%ecx
bt     %ecx,%edi
jb     1144 <bit_scan_forward+0x44>
lea    0x2(%rax),%ecx
movzbl %cl,%ecx
bt     %ecx,%edi
jb     1148 <bit_scan_forward+0x48>
lea    0x3(%rax),%ecx
movzbl %cl,%ecx
bt     %ecx,%edi
jb     114c <bit_scan_forward+0x4c>
add    $0x4,%eax
cmp    $0x20,%eax
jne    1110 <bit_scan_forward+0x10>
mov    $0xffffffff,%eax
ret
add    $0x1,%eax
ret
add    $0x2,%eax
ret
add    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @bit_scan_forward(i32 %0) {
br label %2
2: ; preds = %22, %1
%3 = phi i32 [ 0, %1 ], [ %23, %22 ]
%4 = shl nuw i32 1, %3
%5 = and i32 %4, %0
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %25
7: ; preds = %2
%8 = or i32 %3, 1
%9 = shl nuw i32 1, %8
%10 = and i32 %9, %0
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %25
12: ; preds = %7
%13 = or i32 %3, 2
%14 = shl nuw i32 1, %13
%15 = and i32 %14, %0
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %25
17: ; preds = %12
%18 = or i32 %3, 3
%19 = shl nuw i32 1, %18
%20 = and i32 %19, %0
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %17
%23 = add nuw nsw i32 %3, 4
%24 = icmp eq i32 %23, 32
br i1 %24, label %25, label %2
25: ; preds = %22, %17, %12, %7, %2
%26 = phi i32 [ %3, %2 ], [ %8, %7 ], [ %13, %12 ], [ %18, %17 ], [ -1, %22 ]
ret i32 %26
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void access() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


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

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

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

LLVM IR (-O2):
define void @access() {
%1 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_write_long_literal();
int main(void) {
  test_write_long_literal();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_write_long_literal()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *, int);
void my_print(int value) { printk("In my_print(): Value = %d\n", value); }


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

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

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

LLVM IR (-O2):
@.str = [27 x i8] c"In my_print(): Value = %d\0A\00"
define void @my_print(i32 %0) {
%2 = tail call i32 @printk(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int hextochar(int h) {
  int c = h & 0xF;
  return (c < 10) ? c + '0' : c - 10 + 'A';
}


x86 assembly (clang, -O0):
<hextochar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1128 <hextochar+0x28>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <hextochar+0x34>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hextochar>:
and    $0xf,%edi
lea    0x30(%rdi),%ecx
lea    0x37(%rdi),%eax
cmp    $0xa,%edi
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hextochar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 15
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 48
br label %15
11: ; preds = %1
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 10
%14 = add nsw i32 %13, 65
br label %15
15: ; preds = %11, %8
%16 = phi i32 [ %10, %8 ], [ %14, %11 ]
ret i32 %16
}

LLVM IR (-O2):
define i32 @hextochar(i32 %0) {
%2 = and i32 %0, 15
%3 = icmp ult i32 %2, 10
%4 = or i32 %2, 48
%5 = add nuw nsw i32 %2, 55
%6 = select i1 %3, i32 %4, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double sinh(double);
double SenoHiperbolico(double x) {
  printf("Enter a number: ");
  scanf("%lf", &x);
  return (sinh(x));
}


x86 assembly (clang, -O0):
<SenoHiperbolico>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xebc(%rip),%rdi
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
call   1030 <sinh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SenoHiperbolico>:
push   %rax
movsd  %xmm0,(%rsp)
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
call   1030 <sinh@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @SenoHiperbolico(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = call double @sinh(double %5)
ret double %6
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @SenoHiperbolico(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = call double @sinh(double %5)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ handle_extension(char **, char *);
char *TeX_search_replacement_file(char **name) {
  handle_extension(name, ".rpl");
  return *name;
}


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

x86 assembly (clang, -O2):
<TeX_search_replacement_file>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <handle_extension@plt>
mov    (%rbx),%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c".rpl\00"
define i8* @TeX_search_replacement_file(i8** %0) {
%2 = tail call i32 @handle_extension(i8** %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = load i8*, i8** %0
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int __infer_nondet_int();
int iswspace(wint_t wc) { return __infer_nondet_int(); }


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

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

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

LLVM IR (-O2):
define i32 @iswspace(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void iface_temporary_exit() { endwin(); }


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

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

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

LLVM IR (-O2):
define void @iface_temporary_exit() {
%1 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unresolved_detected_at_runtime_not_at_linktime();
void foo_in_so(void) { unresolved_detected_at_runtime_not_at_linktime(); }


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

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

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

LLVM IR (-O2):
define void @foo_in_so() {
%1 = tail call i32 (...) @unresolved_detected_at_runtime_not_at_linktime()
ret void
}
void foo706(int p) {}


x86 assembly (clang, -O0):
<foo706>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo706(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo706(i32 %0) {
ret void
}
/* Variables and functions */
int strlen(char *);
void remove_trailing_newline(char *line) {
  int len;
  len = strlen(line);
  if (line[len - 1] == '\n')
    line[len - 1] = 0;
}


x86 assembly (clang, -O0):
<remove_trailing_newline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1153 <remove_trailing_newline+0x43>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_trailing_newline>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    1127 <remove_trailing_newline+0x17>
movb   $0x0,-0x1(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @remove_trailing_newline(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 10
br i1 %7, label %8, label %9
8: ; preds = %1
store i8 0, i8* %5
br label %9
9: ; preds = %8, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ run();
void _start(void) { run(); }


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

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

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

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 (...) @run()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
size_t fskipline(FILE *file) {
  int c;
  size_t skipped_bytes = 0;
  while ((c = fgetc(file)) != -1) {
    skipped_bytes++;
    if (c == '\n')
      break;
  }
  return skipped_bytes;
}


x86 assembly (clang, -O0):
<fskipline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xffffffff,%eax
je     1159 <fskipline+0x49>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
cmpl   $0xa,-0xc(%rbp)
jne    1154 <fskipline+0x44>
jmp    1159 <fskipline+0x49>
jmp    1124 <fskipline+0x14>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fskipline>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <fgetc@plt>
cmp    $0xffffffff,%eax
je     1136 <fskipline+0x26>
add    $0x1,%rbx
cmp    $0xa,%eax
jne    1120 <fskipline+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @fskipline(i32* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ 0, %1 ], [ %7, %6 ]
%4 = tail call i32 @fgetc(i32* %0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = add i64 %3, 1
%8 = icmp eq i32 %4, 10
br i1 %8, label %9, label %2
9: ; preds = %6, %2
%10 = phi i64 [ %7, %6 ], [ %3, %2 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void specialup(int key, int x, int y) {
  printf("sUP: %d @ (%d,%d)\n", key, x, y);
}


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

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

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

LLVM IR (-O2):
@.str = [19 x i8] c"sUP: %d @ (%d,%d)\0A\00"
define void @specialup(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
char *make_scalar(char *, char *);
char *lower(char *field) { return make_scalar("LOWER", field); }


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

x86 assembly (clang, -O2):
<lower>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <make_scalar@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"LOWER\00"
define i8* @lower(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @make_scalar(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i8* %4
}

LLVM IR (-O2):
@.str = [6 x i8] c"LOWER\00"
define i8* @lower(i8* %0) {
%2 = tail call i8* @make_scalar(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %2
}
long lceil(long a, long b) { return a / b + (a % b != 0); }


x86 assembly (clang, -O0):
<lceil>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    -0x18(%rbp),%rax
cmp    $0x0,%rdx
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lceil>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1116 <lceil+0x16>
cqto
idiv   %rsi
jmp    111a <lceil+0x1a>
xor    %edx,%edx
div    %esi
cmp    $0x1,%rdx
sbb    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @lceil(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sdiv i64 %5, %6
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = srem i64 %8, %9
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
%13 = sext i32 %12 to i64
%14 = add nsw i64 %7, %13
ret i64 %14
}

LLVM IR (-O2):
define i64 @lceil(i64 %0, i64 %1) {
%3 = sdiv i64 %0, %1
%4 = srem i64 %0, %1
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = add nsw i64 %3, %6
ret i64 %7
}
/* Variables and functions */
int __nv_isinfd(double);
int __isinf(double __a) { return __nv_isinfd(__a); }


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

x86 assembly (clang, -O2):
<__isinf>:
jmp    1030 <__nv_isinfd@plt>

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

LLVM IR (-O2):
define i32 @__isinf(double %0) {
%2 = tail call i32 @__nv_isinfd(double %0)
ret i32 %2
}
void ARGBBlur() {}


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

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

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

LLVM IR (-O2):
define void @ARGBBlur() {
ret void
}
char const *_Locale_monetary_name(const void *__DUMMY_PAR1, char *__DUMMY_PAR) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @_Locale_monetary_name(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb) {}


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

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

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

LLVM IR (-O2):
%struct.ath_softc = type opaque
%struct.sk_buff = type opaque
define void @ath_debug_stat_rc(%struct.ath_softc* nocapture %0, %struct.sk_buff* nocapture %1) {
ret void
}
void ls_costN_nm7_decref(void) {}


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

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

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

LLVM IR (-O2):
define void @ls_costN_nm7_decref() {
ret void
}
/* Variables and functions */
unsigned long mpl_greatest_common_denom(unsigned long, unsigned long);
unsigned long mpl_least_common_multiple(unsigned long a, unsigned long b) {
  return (a * b) / mpl_greatest_common_denom(a, b);
}


x86 assembly (clang, -O0):
<mpl_least_common_multiple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <mpl_greatest_common_denom@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
xor    %edx,%edx
div    %rcx
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpl_least_common_multiple>:
push   %rbx
mov    %rsi,%rbx
imul   %rdi,%rbx
call   1030 <mpl_greatest_common_denom@plt>
mov    %rax,%rcx
or     %rbx,%rax
shr    $0x20,%rax
je     1133 <mpl_least_common_multiple+0x23>
mov    %rbx,%rax
xor    %edx,%edx
div    %rcx
pop    %rbx
ret
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i64 @mpl_least_common_multiple(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = mul i64 %5, %6
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = call i64 @mpl_greatest_common_denom(i64 %8, i64 %9)
%11 = udiv i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @mpl_least_common_multiple(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i64 @mpl_greatest_common_denom(i64 %0, i64 %1)
%5 = udiv i64 %3, %4
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello from file2.c\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"Hello from file2.c\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_smeanpn(int, float *, int);
int main() {
  float x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  float v = stdlib_strided_smeanpn(N, x, stride);
  printf("mean: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
call   1040 <stdlib_strided_smeanpn@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_smeanpn@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [10 x i8] c"mean: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_smeanpn(i32 %6, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [10 x i8] c"mean: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_smeanpn(i32 4, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
int mixed_explicit_ints(signed int *a, unsigned int *b) {
  *a = 2;
  *b = 5;
  return *a;
}


x86 assembly (clang, -O0):
<mixed_explicit_ints>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixed_explicit_ints>:
movl   $0x2,(%rdi)
movl   $0x5,(%rsi)
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @mixed_explicit_ints(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
store i32 2, i32* %5
%6 = load i32*, i32** %4
store i32 5, i32* %6
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @mixed_explicit_ints(i32* nocapture %0, i32* nocapture writeonly %1) {
store i32 2, i32* %0
store i32 5, i32* %1
%3 = load i32, i32* %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void buserr(int dummy) {
  printf("#define MUST_ALIGN\n");
  exit(0);
}


x86 assembly (clang, -O0):
<buserr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<buserr>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"#define MUST_ALIGN\0A\00"
define void @buserr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [19 x i8] c"#define MUST_ALIGN\00"
define void @buserr(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
void sspop(void *userp) { (*((char **)userp))++; }


x86 assembly (clang, -O0):
<sspop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sspop>:
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @sspop(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i8**
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %4
ret void
}

LLVM IR (-O2):
define void @sspop(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %4, i8** %2
ret void
}
int test_imm_1Euint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x1E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_1Euint64_midword_reg(i64 %0) {
%2 = and i64 %0, 1966080
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int fpu_control_t;

/* Variables and functions */
int /*<<< orphan*/ _FPU_GETROUND(int);
int get_rounding_mode(void) {
  fpu_control_t fpcr;
  _FPU_GETROUND(fpcr);
  return fpcr;
}


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

x86 assembly (clang, -O2):
<get_rounding_mode>:
jmp    1030 <_FPU_GETROUND@plt>

LLVM IR (-O0):
define i32 @get_rounding_mode() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = call i32 @_FPU_GETROUND(i32 %2)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @get_rounding_mode() {
%1 = tail call i32 @_FPU_GETROUND(i32 undef)
ret i32 undef
}
double fsign(double num, double sign) {
  if ((sign > 0.0f && num < 0.0f) || (sign < 0.0f && num > 0.0f))
    return -num;
  else
    return num;
}


x86 assembly (clang, -O0):
<fsign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    112e <fsign+0x2e>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
ja     114e <fsign+0x4e>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1174 <fsign+0x74>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1174 <fsign+0x74>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117e <fsign+0x7e>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsign>:
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
jbe    1110 <fsign+0x10>
ucomisd %xmm2,%xmm1
ja     1120 <fsign+0x20>
ucomisd %xmm2,%xmm0
jbe    1128 <fsign+0x28>
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
jbe    1128 <fsign+0x28>
xorpd  0xed8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @fsign(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %5
%7 = fcmp ogt double %6, 0.000000e+00
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load double, double* %4
%10 = fcmp olt double %9, 0.000000e+00
br i1 %10, label %17, label %11
11: ; preds = %8, %2
%12 = load double, double* %5
%13 = fcmp olt double %12, 0.000000e+00
br i1 %13, label %14, label %20
14: ; preds = %11
%15 = load double, double* %4
%16 = fcmp ogt double %15, 0.000000e+00
br i1 %16, label %17, label %20
17: ; preds = %14, %8
%18 = load double, double* %4
%19 = fneg double %18
store double %19, double* %3
br label %22
20: ; preds = %14, %11
%21 = load double, double* %4
store double %21, double* %3
br label %22
22: ; preds = %20, %17
%23 = load double, double* %3
ret double %23
}

LLVM IR (-O2):
define double @fsign(double %0, double %1) {
%3 = fcmp ogt double %1, 0.000000e+00
%4 = fcmp olt double %0, 0.000000e+00
%5 = and i1 %4, %3
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = fcmp olt double %1, 0.000000e+00
%8 = fcmp ogt double %0, 0.000000e+00
%9 = and i1 %8, %7
br i1 %9, label %10, label %12
10: ; preds = %6, %2
%11 = fneg double %0
br label %12
12: ; preds = %6, %10
%13 = phi double [ %11, %10 ], [ %0, %6 ]
ret double %13
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t read32(uint8_t *buf) {
  uint32_t v = 0;
  for (int i = 0; i < 4; i++) {
    v <<= 8;
    v |= buf[i];
  }
  return v;
}


x86 assembly (clang, -O0):
<read32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    1148 <read32+0x48>
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <read32+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read32>:
mov    (%rdi),%ecx
mov    0x4(%rdi),%eax
shl    $0x10,%ecx
shl    $0x8,%eax
or     %ecx,%eax
or     0x8(%rdi),%eax
shl    $0x8,%eax
or     0xc(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @read32(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = shl i32 %2, 16
%6 = shl i32 %4, 8
%7 = or i32 %5, %6
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = or i32 %9, %7
%11 = shl i32 %10, 8
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = or i32 %13, %11
ret i32 %14
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_bpchargenfunc(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_bpchargenfunc() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_bpchargenfunc() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
void yy_1_TooManyTildesWarning(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_TooManyTildesWarning(i8* nocapture %0, i32 %1) {
ret void
}
void glDepthFunc(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glDepthFunc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal_error(char *);
int /*<<< orphan*/ is_castable(void *);
void *up_cast(void *ptr) {
  if (!is_castable(ptr))
    fatal_error("Target for up-cast was not castable.");
  return ptr;
}


x86 assembly (clang, -O0):
<up_cast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <is_castable@plt>
cmp    $0x0,%eax
jne    114a <up_cast+0x2a>
lea    0xebb(%rip),%rdi
call   1030 <fatal_error@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<up_cast>:
push   %rbx
mov    %rdi,%rbx
call   1040 <is_castable@plt>
test   %eax,%eax
jne    1139 <up_cast+0x19>
lea    0xecc(%rip),%rdi
call   1030 <fatal_error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Target for up-cast was not castable.\00"
define i8* @up_cast(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @is_castable(i8* %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @fatal_error(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [37 x i8] c"Target for up-cast was not castable.\00"
define i8* @up_cast(i8* returned %0) {
%2 = tail call i32 @is_castable(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal_error(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %0
}
void c_pomp_for_exit_(struct ompregdescr *r) { (void)0; }


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

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

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

LLVM IR (-O2):
%struct.ompregdescr = type opaque
define void @c_pomp_for_exit_(%struct.ompregdescr* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *message) {
  fprintf(stderr, "%s\n", message);
  exit(-1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
double idfUniform(double a, double b, double u) { return (a + (b - a) * u); }


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

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

LLVM IR (-O0):
define double @idfUniform(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 = load double, double* %4
%10 = fsub double %8, %9
%11 = load double, double* %6
%12 = call double @llvm.fmuladd.f64(double %10, double %11, double %7)
ret double %12
}

LLVM IR (-O2):
define double @idfUniform(double %0, double %1, double %2) {
%4 = fsub double %1, %0
%5 = tail call double @llvm.fmuladd.f64(double %4, double %2, double %0)
ret double %5
}