xunge/DecIR huggingface dataset:
void test_isless(double x, double y, int true) {
  if (__builtin_isless(x, y)) {
    if (!true)
      abort();
  } else {
    if (true)
      abort();
  }
}


x86 assembly (clang, -O0):
<test_isless>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    114d <test_isless+0x3d>
cmpl   $0x0,-0x14(%rbp)
jne    1148 <test_isless+0x38>
call   1030 <abort@plt>
jmp    1161 <test_isless+0x51>
cmpl   $0x0,-0x14(%rbp)
je     115c <test_isless+0x4c>
call   1030 <abort@plt>
jmp    1161 <test_isless+0x51>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_isless>:
push   %rax
ucomisd %xmm0,%xmm1
jbe    1120 <test_isless+0x10>
test   %edi,%edi
jne    1124 <test_isless+0x14>
call   1030 <abort@plt>
test   %edi,%edi
jne    111b <test_isless+0xb>
pop    %rax
ret

LLVM IR (-O0):
define void @test_isless(double %0, double %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
store double %0, double* %4
store double %1, double* %5
store i32 %2, i32* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fcmp olt double %7, %8
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i32, i32* %6
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %10
unreachable
14: ; preds = %10
br label %20
15: ; preds = %3
%16 = load i32, i32* %6
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %15
unreachable
19: ; preds = %15
br label %20
20: ; preds = %19, %14
ret void
}

LLVM IR (-O2):
define void @test_isless(double %0, double %1, i32 %2) {
%4 = fcmp olt double %0, %1
%5 = icmp eq i32 %2, 0
br i1 %4, label %6, label %8
6: ; preds = %3
br i1 %5, label %7, label %10
7: ; preds = %6
tail call void @abort()
unreachable
8: ; preds = %3
br i1 %5, label %10, label %9
9: ; preds = %8
tail call void @abort()
unreachable
10: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xe4() {
  Assert_real((iscntrl(228) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              1145, ("iscntrl should be 0 for 0xe4"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0xe4>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe4,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x479,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0xe4>:
push   %rax
mov    $0xe4,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x479,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xe4\00"
define void @t_iscntrl_0xe4() {
%1 = call i64 @iscntrl(i32 228)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1145, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xe4\00"
define void @t_iscntrl_0xe4() {
%1 = tail call i64 @iscntrl(i32 228)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1145, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ignr_rd_deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @ignr_rd_deinit() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void QEIVelocityEnable(uint32_t ui32Base) {
  ASSERT((ui32Base == 0x4002C000) || (ui32Base == 0x4002D000));
  (*((volatile uint32_t *)(ui32Base + 0x00000000))) |= 0x00000020;
}


x86 assembly (clang, -O0):
<QEIVelocityEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x4002c000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113a <QEIVelocityEnable+0x2a>
cmpl   $0x4002d000,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    (%rax),%ecx
or     $0x20,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QEIVelocityEnable>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x4002c000,%eax
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
orl    $0x20,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @QEIVelocityEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1073922048
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 1073926144
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @ASSERT(i32 %10)
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 0
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
%16 = load volatile i32, i32* %15
%17 = or i32 %16, 32
store volatile i32 %17, i32* %15
ret void
}

LLVM IR (-O2):
define void @QEIVelocityEnable(i32 %0) {
%2 = and i32 %0, -4097
%3 = icmp eq i32 %2, 1073922048
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = sext i32 %0 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = or i32 %8, 32
store volatile i32 %9, i32* %7
ret void
}
/* Variables and functions */
int Knapsack(int, int, int *, int *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int val[] = {60, 100, 120};
  int wt[] = {10, 20, 30};
  int n = 3, W = 50;
  printf("%d\n", Knapsack(n, W, val, wt));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xecf(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    0xec9(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec7(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x3,-0x1c(%rbp)
movl   $0x32,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
lea    -0xc(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <Knapsack@plt>
mov    %eax,%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x20(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x18(%rsp)
mov    0xed4(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xec1(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x18(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    $0x3,%edi
mov    $0x32,%esi
call   1040 <Knapsack@plt>
lea    0xea8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.val = [3 x i32] [i32 60, i32 100, i32 120]
@__const.main.wt = [3 x i32] [i32 10, i32 20, i32 30]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca [3 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = bitcast [3 x i32]* %1 to i8*
%6 = bitcast [3 x i32]* %2 to i8*
store i32 3, i32* %3
store i32 50, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%11 = call i32 @Knapsack(i32 %7, i32 %8, i32* %9, i32* %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.val = [3 x i32] [i32 60, i32 100, i32 120]
@__const.main.wt = [3 x i32] [i32 10, i32 20, i32 30]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca [3 x i32]
%3 = bitcast [3 x i32]* %1 to i8*
%4 = bitcast [3 x i32]* %2 to i8*
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%7 = call i32 @Knapsack(i32 3, i32 50, i32* %5, i32* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Menus_Close(int /*<<< orphan*/);
int /*<<< orphan*/ Menus_FindByName(char const *);
void Menus_CloseByName(const char *p) { Menus_Close(Menus_FindByName(p)); }


x86 assembly (clang, -O0):
<Menus_CloseByName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <Menus_FindByName@plt>
mov    %eax,%edi
call   1030 <Menus_Close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Menus_CloseByName>:
push   %rax
call   1040 <Menus_FindByName@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <Menus_Close@plt>

LLVM IR (-O0):
define void @Menus_CloseByName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @Menus_FindByName(i8* %3)
%5 = call i32 @Menus_Close(i32 %4)
ret void
}

LLVM IR (-O2):
define void @Menus_CloseByName(i8* %0) {
%2 = tail call i32 @Menus_FindByName(i8* %0)
%3 = tail call i32 @Menus_Close(i32 %2)
ret void
}
/* Variables and functions */
char *GetDoubleToStringFormat_m(int);
char *SafeInitialiseString_m(int);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, double);
char *DoubleToString_m(double input, int maxDecimals) {
  int size = 300;
  char *output = SafeInitialiseString_m(size);
  char *format = GetDoubleToStringFormat_m(maxDecimals);
  snprintf(output, size, format, input);
  free(format);
  return output;
}


x86 assembly (clang, -O0):
<DoubleToString_m>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movl   $0x12c,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1050 <SafeInitialiseString_m@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1060 <GetDoubleToStringFormat_m@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x20(%rbp),%rdx
movsd  -0x8(%rbp),%xmm0
call   1040 <snprintf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoubleToString_m>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
movsd  %xmm0,(%rsp)
mov    $0x12c,%edi
call   1050 <SafeInitialiseString_m@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1060 <GetDoubleToStringFormat_m@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    $0x12c,%esi
mov    %rax,%rdx
movsd  (%rsp),%xmm0
call   1040 <snprintf@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @DoubleToString_m(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
store double %0, double* %3
store i32 %1, i32* %4
store i32 300, i32* %5
%8 = load i32, i32* %5
%9 = call i8* @SafeInitialiseString_m(i32 %8)
store i8* %9, i8** %6
%10 = load i32, i32* %4
%11 = call i8* @GetDoubleToStringFormat_m(i32 %10)
store i8* %11, i8** %7
%12 = load i8*, i8** %6
%13 = load i32, i32* %5
%14 = load i8*, i8** %7
%15 = load double, double* %3
%16 = call i32 @snprintf(i8* %12, i32 %13, i8* %14, double %15)
%17 = load i8*, i8** %7
%18 = call i32 @free(i8* %17)
%19 = load i8*, i8** %6
ret i8* %19
}

LLVM IR (-O2):
define i8* @DoubleToString_m(double %0, i32 %1) {
%3 = tail call i8* @SafeInitialiseString_m(i32 300)
%4 = tail call i8* @GetDoubleToStringFormat_m(i32 %1)
%5 = tail call i32 @snprintf(i8* %3, i32 300, i8* %4, double %0)
%6 = tail call i32 @free(i8* %4)
ret i8* %3
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ test_each(int);
int /*<<< orphan*/ test_single(int, int, int);
int main(int argc, char **argv) {
  int max = atoi(argv[1]);
  if (argc == 2)
    test_each(max);
  else
    test_single(max, atoi(argv[2]), 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    116d <main+0x3d>
mov    -0x14(%rbp),%edi
call   1030 <test_each@plt>
jmp    118f <main+0x5f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atoi@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
mov    $0x1,%edx
call   1050 <test_single@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%r14d
cmp    $0x2,%ebp
jne    1154 <main+0x24>
mov    %r14d,%edi
call   1030 <test_each@plt>
jmp    116c <main+0x3c>
mov    0x10(%rbx),%rdi
call   1040 <atoi@plt>
mov    %r14d,%edi
mov    %eax,%esi
mov    $0x1,%edx
call   1050 <test_single@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = icmp eq i32 %0, 2
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @test_each(i32 %5)
br label %14
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
%13 = tail call i32 @test_single(i32 %5, i32 %12, i32 1)
br label %14
14: ; preds = %9, %7
ret i32 0
}
/* Variables and functions */
int japi_getaction();
int j_getaction() { return (japi_getaction()); }


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

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

LLVM IR (-O0):
define i32 @j_getaction() {
%1 = call i32 (...) @japi_getaction()
ret i32 %1
}

LLVM IR (-O2):
define i32 @j_getaction() {
%1 = tail call i32 (...) @japi_getaction()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
int /*<<< orphan*/ malloc(int);
void lib_do_backtrace(void) { free(malloc(456)); }


x86 assembly (clang, -O0):
<lib_do_backtrace>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1c8,%edi
call   1040 <malloc@plt>
mov    %eax,%edi
call   1030 <free@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lib_do_backtrace>:
push   %rax
mov    $0x1c8,%edi
call   1040 <malloc@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @lib_do_backtrace() {
%1 = call i32 @malloc(i32 456)
%2 = call i32 @free(i32 %1)
ret void
}

LLVM IR (-O2):
define void @lib_do_backtrace() {
%1 = tail call i32 @malloc(i32 456)
%2 = tail call i32 @free(i32 %1)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void EMACTimestampTargetIntEnable(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x400EC000);
  (*((volatile uint32_t *)(ui32Base + 0x00000700))) |= 0x00000010;
}


x86 assembly (clang, -O0):
<EMACTimestampTargetIntEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x400ec000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x700,%eax
cltq
mov    (%rax),%ecx
or     $0x10,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACTimestampTargetIntEnable>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x400ec000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
orl    $0x10,0x700(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @EMACTimestampTargetIntEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074708480
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1792
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = or i32 %11, 16
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @EMACTimestampTargetIntEnable(i32 %0) {
%2 = icmp eq i32 %0, 1074708480
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 1792
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = or i32 %8, 16
store volatile i32 %9, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned long);
void usleep_(unsigned long *microsec) { usleep(*microsec); }


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

x86 assembly (clang, -O2):
<usleep_>:
mov    (%rdi),%rdi
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @usleep_(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = tail call i32 @usleep(i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
void sprint_addc_atRi(char *str, unsigned char i) {
  sprintf(str, "ADDC  A, @R%X                    ", i);
}


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

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

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

LLVM IR (-O2):
@.str = [34 x i8] c"ADDC A, @R%X \00"
define void @sprint_addc_atRi(i8* nocapture writeonly %0, i8 zeroext %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Variables and functions */
int foo(int);
int main(int argc, char **argv) {
  int val;
  val = foo(13);
  return val;
}


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

x86 assembly (clang, -O2):
<main>:
mov    $0xd,%edi
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @foo(i32 13)
ret i32 %3
}
/* Type definitions */
typedef char u_char;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ putc(char, int /*<<< orphan*/ *);
int do_notsup(FILE *sfp, FILE *tfp, int c) {
  (void)putc((u_char)255, sfp);
  (void)putc((u_char)254, sfp);
  (void)putc((char)c, sfp);
  return 0;
}


x86 assembly (clang, -O0):
<do_notsup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0xffffffff,%edi
call   1030 <putc@plt>
mov    -0x8(%rbp),%rsi
mov    $0xfffffffe,%edi
call   1030 <putc@plt>
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1030 <putc@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_notsup>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1030 <putc@plt>
mov    $0xfffffffe,%edi
mov    %rbx,%rsi
call   1030 <putc@plt>
movsbl %bpl,%edi
mov    %rbx,%rsi
call   1030 <putc@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @do_notsup(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 = call i32 @putc(i8 signext -1, i32* %7)
%9 = load i32*, i32** %4
%10 = call i32 @putc(i8 signext -2, i32* %9)
%11 = load i32, i32* %6
%12 = trunc i32 %11 to i8
%13 = load i32*, i32** %4
%14 = call i32 @putc(i8 signext %12, i32* %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @do_notsup(i32* nocapture %0, i32* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @putc(i8 signext -1, i32* %0)
%5 = tail call i32 @putc(i8 signext -2, i32* %0)
%6 = trunc i32 %2 to i8
%7 = tail call i32 @putc(i8 signext %6, i32* %0)
ret i32 0
}
void INT_Excep_MTU10_TGIA10(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU10_TGIA10() {
ret void
}
double math_nandelta(double x) { return (x == 0) ? (1.0 / 0.0) : 0; }


x86 assembly (clang, -O0):
<math_nandelta>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm3
xorps  %xmm2,%xmm2
cmpeqsd %xmm2,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_nandelta>:
xorpd  %xmm1,%xmm1
cmpeqsd %xmm1,%xmm0
movsd  0xeef(%rip),%xmm1
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @math_nandelta(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double %3, 0.000000e+00
%5 = zext i1 %4 to i64
%6 = select i1 %4, double 0x7FF0000000000000, double 0.000000e+00
ret double %6
}

LLVM IR (-O2):
define double @math_nandelta(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
%3 = select i1 %2, double 0x7FF0000000000000, double 0.000000e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(unsigned long);
void ft_putnbr_p(unsigned long n) {
  if (n > 15)
    ft_putnbr_p(n / 16);
  if ((n % 16) + 48 > '9')
    ft_putchar((n % 16) + 87);
  else
    ft_putchar((n % 16) + 48);
}


x86 assembly (clang, -O0):
<ft_putnbr_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0xf,-0x8(%rbp)
jbe    1144 <ft_putnbr_p+0x24>
mov    -0x8(%rbp),%rdi
shr    $0x4,%rdi
call   1040 <ft_putnbr_p@plt>
mov    -0x8(%rbp),%rax
and    $0xf,%rax
add    $0x30,%rax
cmp    $0x39,%rax
jbe    1170 <ft_putnbr_p+0x50>
mov    -0x8(%rbp),%rdi
and    $0xf,%rdi
add    $0x57,%rdi
call   1030 <ft_putchar@plt>
jmp    1181 <ft_putnbr_p+0x61>
mov    -0x8(%rbp),%rdi
and    $0xf,%rdi
add    $0x30,%rdi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putnbr_p>:
push   %rbx
mov    %rdi,%rbx
cmp    $0x10,%rdi
jb     1136 <ft_putnbr_p+0x16>
mov    %rbx,%rdi
shr    $0x4,%rdi
call   1040 <ft_putnbr_p@plt>
and    $0xf,%ebx
lea    0x30(%rbx),%rax
add    $0x57,%rbx
cmp    $0x3a,%rax
cmovb  %rax,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_putnbr_p(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ugt i64 %3, 15
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = udiv i64 %6, 16
br label %8
8: ; preds = %5, %1
%9 = load i64, i64* %2
%10 = urem i64 %9, 16
%11 = add i64 %10, 48
%12 = icmp ugt i64 %11, 57
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = load i64, i64* %2
%15 = urem i64 %14, 16
%16 = add i64 %15, 87
%17 = call i32 @ft_putchar(i64 %16)
br label %23
18: ; preds = %8
%19 = load i64, i64* %2
%20 = urem i64 %19, 16
%21 = add i64 %20, 48
%22 = call i32 @ft_putchar(i64 %21)
br label %23
23: ; preds = %18, %13
ret void
}

LLVM IR (-O2):
define void @ft_putnbr_p(i64 %0) {
%2 = icmp ugt i64 %0, 15
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = lshr i64 %0, 4
tail call void @ft_putnbr_p(i64 %4)
br label %5
5: ; preds = %3, %1
%6 = and i64 %0, 15
%7 = or i64 %6, 48
%8 = icmp ugt i64 %7, 57
%9 = add nuw nsw i64 %6, 87
%10 = select i1 %8, i64 %9, i64 %7
%11 = tail call i32 @ft_putchar(i64 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, unsigned short);
scalar_t__ try_outb(unsigned short);
void expect_gp(unsigned short port) {
  if (try_outb(port)) {
    printf("[FAIL]\toutb to 0x%02hx worked\n", port);
    exit(1);
  }
  printf("[OK]\toutb to 0x%02hx failed\n", port);
}


x86 assembly (clang, -O0):
<expect_gp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <try_outb@plt>
cmp    $0x0,%rax
je     116c <expect_gp+0x3c>
lea    0xea7(%rip),%rdi
movzwl -0x2(%rbp),%esi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
lea    0xeac(%rip),%rdi
movzwl -0x2(%rbp),%esi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expect_gp>:
push   %rbx
mov    %edi,%ebx
call   1030 <try_outb@plt>
movzwl %bx,%esi
test   %rax,%rax
jne    114d <expect_gp+0x1d>
lea    0xed8(%rip),%rdi
pop    %rbx
jmp    1040 <printf@plt>
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"[FAIL]\09outb to 0x%02hx worked\0A\00"
@.str.1 = [29 x i8] c"[OK]\09outb to 0x%02hx failed\0A\00"
define void @expect_gp(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i64 @try_outb(i16 zeroext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i16, i16* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i16 zeroext %7)
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %1
%11 = load i16, i16* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i16 zeroext %11)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"[FAIL]\09outb to 0x%02hx worked\0A\00"
@.str.1 = [29 x i8] c"[OK]\09outb to 0x%02hx failed\0A\00"
define void @expect_gp(i16 zeroext %0) {
%2 = tail call i64 @try_outb(i16 zeroext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i16 zeroext %0)
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i16 zeroext %0)
ret void
}
double convertFToCDegree(double fDegree) {
  return 5.0 * (fDegree - 32.0) / 9.0;
}


x86 assembly (clang, -O0):
<convertFToCDegree>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xefa(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertFToCDegree>:
addsd  0xef8(%rip),%xmm0
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @convertFToCDegree(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 3.200000e+01
%5 = fmul double 5.000000e+00, %4
%6 = fdiv double %5, 9.000000e+00
ret double %6
}

LLVM IR (-O2):
define double @convertFToCDegree(double %0) {
%2 = fadd double %0, -3.200000e+01
%3 = fmul double %2, 5.000000e+00
%4 = fdiv double %3, 9.000000e+00
ret double %4
}
void ff_hevc_put_hevc_bi_w_epel_v12_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_v12_8_sse4() {
ret void
}
void (*posix_signal3(int sig_num, void (*action)()))() { return 0; }


x86 assembly (clang, -O0):
<posix_signal3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias void (...)* @posix_signal3(i32 %0, void (...)* nocapture readnone %1) {
ret void (...)* null
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/);
void vwarnx(const char *fmt, va_list ap) {
  if (fmt != NULL)
    vfprintf(stderr, fmt, ap);
  fputc('\n', stderr);
}


x86 assembly (clang, -O0):
<vwarnx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114f <vwarnx+0x2f>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <vfprintf@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vwarnx>:
push   %rax
test   %rdi,%rdi
je     1139 <vwarnx+0x19>
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
call   1040 <vfprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
pop    %rax
jmp    1030 <fputc@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @vwarnx(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 @vfprintf(i32 %8, i8* %9, i32 %10)
br label %12
12: ; preds = %7, %2
%13 = load i32, i32* @stderr
%14 = call i32 @fputc(i8 signext 10, i32 %13)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @vwarnx(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @vfprintf(i32 %5, i8* %0, i32 %1)
br label %7
7: ; preds = %4, %2
%8 = load i32, i32* @stderr
%9 = tail call i32 @fputc(i8 signext 10, i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char *arg[]) {
  puts("Hello world.");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <puts@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 = [13 x i8] c"Hello world.\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 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int fsh_exit(char **args) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fsh_exit(i8** nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
bool nrf53_errata_57(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_57() {
ret i32 0
}
/* Variables and functions */
scalar_t__ realloc(void *, int);
int double_it(void **toResize, int *size) {
  (*size) *= 2;
  (*toResize) = (void *)realloc(*toResize, *size);
  return 1;
}


x86 assembly (clang, -O0):
<double_it>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
shl    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1030 <realloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_it>:
push   %rbx
mov    %rdi,%rbx
mov    (%rsi),%eax
add    %eax,%eax
mov    %eax,(%rsi)
mov    (%rdi),%rdi
mov    %eax,%esi
call   1030 <realloc@plt>
mov    %rax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @double_it(i8** %0, i32* %1) {
%3 = alloca i8**
%4 = alloca i32*
store i8** %0, i8*** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, 2
store i32 %7, i32* %5
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = call i64 @realloc(i8* %9, i32 %11)
%13 = inttoptr i64 %12 to i8*
%14 = load i8**, i8*** %3
store i8* %13, i8** %14
ret i32 1
}

LLVM IR (-O2):
define i32 @double_it(i8** nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl nsw i32 %3, 1
store i32 %4, i32* %1
%5 = load i8*, i8** %0
%6 = tail call i64 @realloc(i8* %5, i32 %4)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %0
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ f(int *);
main() {
  if (f((int *)0xffffffff) != 0)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1040 <f@plt>
cmp    $0x0,%rax
je     115a <main+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffffff,%edi
call   1040 <f@plt>
test   %rax,%rax
jne    1147 <main+0x17>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @f(i32* inttoptr (i64 4294967295 to i32*))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @f(i32* inttoptr (i64 4294967295 to i32*))
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
unsigned int SDBMHash(char *str) {
  unsigned int hash = 0;
  while (*str)
    hash = (*str++) + (hash << 6) + (hash << 16) - hash;
  return (hash & 0x7FFFFFFF);
}


x86 assembly (clang, -O0):
<SDBMHash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1149 <SDBMHash+0x49>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    -0xc(%rbp),%ecx
shl    $0x6,%ecx
add    %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <SDBMHash+0xf>
mov    -0xc(%rbp),%eax
and    $0x7fffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SDBMHash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <SDBMHash+0x2c>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
imul   $0x1003f,%eax,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <SDBMHash+0x10>
and    $0x7fffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @SDBMHash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %5 to i32
%10 = mul i32 %6, 65599
%11 = add i32 %10, %9
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = and i32 %11, 2147483647
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
int recursive_obeb(int, int, int);
int obeb(int x, int y) { return recursive_obeb(x, y, x > y ? y : x); }


x86 assembly (clang, -O0):
<obeb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1141 <obeb+0x31>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1147 <obeb+0x37>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%edx
call   1030 <recursive_obeb@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<obeb>:
cmp    %esi,%edi
mov    %edi,%edx
cmovg  %esi,%edx
jmp    1030 <recursive_obeb@plt>

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

LLVM IR (-O2):
define i32 @obeb(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
%5 = tail call i32 @recursive_obeb(i32 %0, i32 %1, i32 %4)
ret i32 %5
}
void glutSetWindow(int win) {}


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

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

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

LLVM IR (-O2):
define void @glutSetWindow(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ A_BOLD;
int /*<<< orphan*/ attron(int /*<<< orphan*/);
void attribute_on_bold_c() { attron(A_BOLD); }


x86 assembly (clang, -O0):
<attribute_on_bold_c>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <attron@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<attribute_on_bold_c>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <attron@plt>

LLVM IR (-O0):
@A_BOLD = global i32 0
define void @attribute_on_bold_c() {
%1 = load i32, i32* @A_BOLD
%2 = call i32 @attron(i32 %1)
ret void
}

LLVM IR (-O2):
@A_BOLD = global i32 0
define void @attribute_on_bold_c() {
%1 = load i32, i32* @A_BOLD
%2 = tail call i32 @attron(i32 %1)
ret void
}
void Port_NormalCursor(void) { return; }


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

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

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

LLVM IR (-O2):
define void @Port_NormalCursor() {
ret void
}
int benchmark_initbatch(void *tsd) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @benchmark_initbatch(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
bool is_interesting(char c) {
  switch (c) {
  case 'a':
    return false;
  case 'b':
    return true;
  default:
    return 1;
  }
}


x86 assembly (clang, -O0):
<is_interesting>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x61,%eax
je     1130 <is_interesting+0x30>
jmp    111f <is_interesting+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x62,%eax
je     113c <is_interesting+0x3c>
jmp    1148 <is_interesting+0x48>
movl   $0x0,-0x4(%rbp)
jmp    114f <is_interesting+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    114f <is_interesting+0x4f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_interesting>:
xor    %eax,%eax
cmp    $0x61,%dil
setne  %al
ret

LLVM IR (-O0):
define i32 @is_interesting(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 97, label %6
i32 98, label %7
]
6: ; preds = %1
store i32 0, i32* %2
br label %9
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 1, i32* %2
br label %9
9: ; preds = %8, %7, %6
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_interesting(i8 signext %0) {
%2 = icmp ne i8 %0, 97
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ CTEST_ERR(char *, char const *, int);
void assert_false(int real, const char *caller, int line) {
  if ((real) != 0) {
    CTEST_ERR("%s:%d  should be false", caller, line);
  }
}


x86 assembly (clang, -O0):
<assert_false>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113f <assert_false+0x2f>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xec6(%rip),%rdi
call   1030 <CTEST_ERR@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_false>:
test   %edi,%edi
je     1120 <assert_false+0x10>
lea    0xee5(%rip),%rdi
jmp    1030 <CTEST_ERR@plt>
ret

LLVM IR (-O0):
@.str = [23 x i8] c"%s:%d should be false\00"
define void @assert_false(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @CTEST_ERR(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %11)
br label %13
13: ; preds = %9, %3
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"%s:%d should be false\00"
define void @assert_false(i32 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @CTEST_ERR(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
__attribute__((no)) void gen_rtx_CONST_INT(long long x) {
  if (-x > 10)
    abort();
}


x86 assembly (clang, -O0):
<gen_rtx_CONST_INT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%rax
cmp    $0xa,%rax
jle    1133 <gen_rtx_CONST_INT+0x23>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_rtx_CONST_INT>:
cmp    $0xfffffffffffffff5,%rdi
jle    1117 <gen_rtx_CONST_INT+0x7>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @gen_rtx_CONST_INT(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 0, %3
%5 = icmp sgt i64 %4, 10
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @gen_rtx_CONST_INT(i64 %0) {
%2 = icmp slt i64 %0, -10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret void
}
int find_gcd(int a, int b) {
  int tmp;
  while (a) {
    tmp = a;
    a = b % a;
    b = tmp;
  }
  return b;
}


x86 assembly (clang, -O0):
<find_gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <find_gcd+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <find_gcd+0xa>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

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