xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ func1();
int /*<<< orphan*/ func2();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("\n Inside main()\n");
  int i = 0;
  for (; i < 0xffffff; i++)
    ;
  func1();
  func2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xffffff,-0x8(%rbp)
jge    1172 <main+0x42>
jmp    1164 <main+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1152 <main+0x22>
mov    $0x0,%al
call   1030 <func1@plt>
mov    $0x0,%al
call   1050 <func2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"\0A Inside main()\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %4
4: ; preds = %8, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 16777215
br i1 %6, label %7, label %11
7: ; preds = %4
br label %8
8: ; preds = %7
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %4
11: ; preds = %4
%12 = call i32 (...) @func1()
%13 = call i32 (...) @func2()
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"\0A Inside main()\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @func1()
%3 = tail call i32 (...) @func2()
ret i32 0
}
void expr(char string[], int count, int rule) {}


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

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

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

LLVM IR (-O2):
define void @expr(i8* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
scalar_t__ calloc(int, int);
float *mallocf(int a) {
  float *ptr = (float *)calloc(a, sizeof(float));
  return ptr;
}


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

x86 assembly (clang, -O2):
<mallocf>:
mov    $0x4,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define float* @mallocf(i32 %0) {
%2 = alloca i32
%3 = alloca float*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @calloc(i32 %4, i32 4)
%6 = inttoptr i64 %5 to float*
store float* %6, float** %3
%7 = load float*, float** %3
ret float* %7
}

LLVM IR (-O2):
define float* @mallocf(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 4)
%3 = inttoptr i64 %2 to float*
ret float* %3
}
/* Variables and functions */
bool estoyEnBorde(int i, int j) {
  return ((i == 0) || (i == 10 - 1) || (j == 0) || (j == 10 - 1));
}


x86 assembly (clang, -O0):
<estoyEnBorde>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     1141 <estoyEnBorde+0x41>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     1141 <estoyEnBorde+0x41>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1141 <estoyEnBorde+0x41>
cmpl   $0x9,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<estoyEnBorde>:
mov    $0x1,%eax
test   %esi,%esi
je     1112 <estoyEnBorde+0x12>
test   %edi,%edi
je     1112 <estoyEnBorde+0x12>
cmp    $0x9,%edi
jne    1113 <estoyEnBorde+0x13>
ret
xor    %eax,%eax
cmp    $0x9,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @estoyEnBorde(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 = icmp eq i32 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 9
br i1 %9, label %16, label %10
10: ; preds = %7
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 9
br label %16
16: ; preds = %13, %10, %7, %2
%17 = phi i1 [ true, %10 ], [ true, %7 ], [ true, %2 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @estoyEnBorde(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %2
switch i32 %0, label %5 [
i32 9, label %8
i32 0, label %8
]
5: ; preds = %4
%6 = icmp eq i32 %1, 9
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %4, %2, %5
%9 = phi i32 [ 1, %4 ], [ %7, %5 ], [ 1, %2 ], [ 1, %4 ]
ret i32 %9
}
int compare_int(const int *p1, const int *p2) {
  if (*p1 > *p2)
    return 1;
  if (*p1 < *p2)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<compare_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    112a <compare_int+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    114f <compare_int+0x4f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    1148 <compare_int+0x48>
movl   $0xffffffff,-0x4(%rbp)
jmp    114f <compare_int+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_int>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setl   %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_int(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp sgt i32 %3, %4
%6 = icmp slt i32 %3, %4
%7 = sext i1 %6 to i32
%8 = select i1 %5, i32 1, i32 %7
ret i32 %8
}
/* Variables and functions */
int lcm(int, int);
int calculate_slab_size(int slice_size) { return lcm(slice_size, 4096); }


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

x86 assembly (clang, -O2):
<calculate_slab_size>:
mov    $0x1000,%esi
jmp    1030 <lcm@plt>

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

LLVM IR (-O2):
define i32 @calculate_slab_size(i32 %0) {
%2 = tail call i32 @lcm(i32 %0, i32 4096)
ret i32 %2
}
void caller_2_1_2_2_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_1_2_2_1_1_2() {
ret void
}
long construct_R(int opcode, int rd, int rs1, int rs2) {
  return ((opcode << 24) | (rd << 20) | (rs1 << 16) | (rs2 << 12));
}


x86 assembly (clang, -O0):
<construct_R>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%ecx
shl    $0x14,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
shl    $0xc,%ecx
or     %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<construct_R>:
shl    $0x18,%edi
shl    $0x14,%esi
or     %edi,%esi
shl    $0x10,%edx
shl    $0xc,%ecx
or     %edx,%ecx
or     %esi,%ecx
movslq %ecx,%rax
ret

LLVM IR (-O0):
define i64 @construct_R(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = shl i32 %9, 24
%11 = load i32, i32* %6
%12 = shl i32 %11, 20
%13 = or i32 %10, %12
%14 = load i32, i32* %7
%15 = shl i32 %14, 16
%16 = or i32 %13, %15
%17 = load i32, i32* %8
%18 = shl i32 %17, 12
%19 = or i32 %16, %18
%20 = sext i32 %19 to i64
ret i64 %20
}

LLVM IR (-O2):
define i64 @construct_R(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %0, 24
%6 = shl i32 %1, 20
%7 = or i32 %6, %5
%8 = shl i32 %2, 16
%9 = or i32 %7, %8
%10 = shl i32 %3, 12
%11 = or i32 %9, %10
%12 = sext i32 %11 to i64
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ I_Error(char *, char *);
int W_CheckNumForName(char *);
int W_GetNumForName(char *name) {
  int i;
  i = W_CheckNumForName(name);
  if (i == -1)
    I_Error("W_GetNumForName: %s not found!", name);
  return i;
}


x86 assembly (clang, -O0):
<W_GetNumForName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <W_CheckNumForName@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1152 <W_GetNumForName+0x32>
mov    -0x8(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1040 <I_Error@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<W_GetNumForName>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <W_CheckNumForName@plt>
mov    %eax,%ebp
cmp    $0xffffffff,%eax
jne    1141 <W_GetNumForName+0x21>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
call   1040 <I_Error@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"W_GetNumForName: %s not found!\00"
define i32 @W_GetNumForName(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @W_CheckNumForName(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @I_Error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %1
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@.str = [31 x i8] c"W_GetNumForName: %s not found!\00"
define i32 @W_GetNumForName(i8* %0) {
%2 = tail call i32 @W_CheckNumForName(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @I_Error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret i32 %2
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int);
int main(void) {
  unsigned int val = (1 << 8) - 1;
  printf("%#x (hex), %d (dec)\n", val, val);
  return (EXIT_SUCCESS);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xff,%esi
mov    $0xff,%edx
call   1030 <printf@plt>
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"%#x (hex), %d (dec)\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 255, i32 255)
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
void ADC_IRQ_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @ADC_IRQ_Interrupt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void main() {
  signed char b = 0;
  if (b) {
    printf("in if %d\n", b);
  } else {
    printf("not if\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     113d <main+0x2d>
movsbl -0x1(%rbp),%esi
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    114b <main+0x3b>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"in if %d\0A\00"
@.str.1 = [8 x i8] c"not if\0A\00"
define void @main() {
%1 = alloca i8
store i8 0, i8* %1
%2 = load i8, i8* %1
%3 = icmp ne i8 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %10
8: ; preds = %0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %4
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"not if\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
void syslog(int priority, const char *message, ...) {}


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

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

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

LLVM IR (-O2):
define void @syslog(i32 %0, i8* nocapture %1, ...) {
ret void
}
/* Variables and functions */
double fabs(double);
double euclidean_dist(double x, double y) { return fabs(y - x); }


x86 assembly (clang, -O0):
<euclidean_dist>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movaps 0xee1(%rip),%xmm1
pand   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<euclidean_dist>:
subsd  %xmm0,%xmm1
andpd  0xef4(%rip),%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @euclidean_dist(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = fsub double %5, %6
%8 = call double @llvm.fabs.f64(double %7)
ret double %8
}

LLVM IR (-O2):
define double @euclidean_dist(double %0, double %1) {
%3 = fsub double %1, %0
%4 = tail call double @llvm.fabs.f64(double %3)
ret double %4
}
void halt() {
  asm("cli");
  asm("hlt");
}


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

x86 assembly (clang, -O2):
<halt>:
cli
hlt
ret

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

LLVM IR (-O2):
define void @halt() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGABRT;
int /*<<< orphan*/ derror(int);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
void abt_intr(int sig_num) {
  signal(SIGABRT, abt_intr);
  derror(113);
}


x86 assembly (clang, -O0):
<abt_intr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    0x2ea5(%rip),%rsi
call   1040 <signal@plt>
mov    $0x71,%edi
call   1030 <derror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<abt_intr>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rsi
call   1040 <signal@plt>
mov    $0x71,%edi
pop    %rax
jmp    1030 <derror@plt>

LLVM IR (-O0):
@SIGABRT = global i32 0
define void @abt_intr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SIGABRT
%4 = call i32 @signal(i32 %3, void (i32)* @abt_intr)
%5 = call i32 @derror(i32 113)
ret void
}

LLVM IR (-O2):
@SIGABRT = global i32 0
define void @abt_intr(i32 %0) {
%2 = load i32, i32* @SIGABRT
%3 = tail call i32 @signal(i32 %2, void (i32)* @abt_intr)
%4 = tail call i32 @derror(i32 113)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mvprintw(int, int, char *);
void rumble_show(bool on) { mvprintw(1, 21, on ? "RUMBLE" : "      "); }


x86 assembly (clang, -O0):
<rumble_show>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xee2(%rip),%rdx
lea    0xed4(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    $0x1,%edi
mov    $0x15,%esi
call   1030 <mvprintw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rumble_show>:
test   %edi,%edi
lea    0xeee(%rip),%rax
lea    0xee0(%rip),%rdx
cmove  %rax,%rdx
mov    $0x1,%edi
mov    $0x15,%esi
jmp    1030 <mvprintw@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"RUMBLE\00"
@.str.1 = [7 x i8] c" \00"
define void @rumble_show(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0)
%7 = call i32 @mvprintw(i32 1, i32 21, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"RUMBLE\00"
@.str.1 = [7 x i8] c" \00"
define void @rumble_show(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @mvprintw(i32 1, i32 21, i8* %3)
ret void
}
void __attribute__((
    warning("curl_easy_getinfo expects a pointer to double for this info")))
__attribute__((unused)) __attribute__((no))
_curl_easy_getinfo_err_double(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_getinfo_err_double() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ hash_keccak(int, int /*<<< orphan*/ const *,
                               int /*<<< orphan*/, int, int /*<<< orphan*/ *,
                               int, int);
int hash_sha3_224(uint8_t *h, const uint8_t *m, uint64_t n) {
  hash_keccak(18 * 8, m, n, 0x06, h, 28, 28);
  return 1;
}


x86 assembly (clang, -O0):
<hash_sha3_224>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%r8
mov    $0x90,%edi
mov    $0x6,%ecx
mov    $0x1c,%r9d
movl   $0x1c,(%rsp)
call   1030 <hash_keccak@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_sha3_224>:
push   %rax
mov    %rdi,%r8
movl   $0x1c,(%rsp)
mov    $0x90,%edi
mov    $0x6,%ecx
mov    $0x1c,%r9d
call   1030 <hash_keccak@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @hash_sha3_224(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** %5
%8 = load i32, i32* %6
%9 = load i32*, i32** %4
%10 = call i32 @hash_keccak(i32 144, i32* %7, i32 %8, i32 6, i32* %9, i32 28, i32 28)
ret i32 1
}

LLVM IR (-O2):
define i32 @hash_sha3_224(i32* %0, i32* %1, i32 %2) {
%4 = tail call i32 @hash_keccak(i32 144, i32* %1, i32 %2, i32 6, i32* %0, i32 28, i32 28)
ret i32 1
}
unsigned long long rotateR_fun_ullong(unsigned long long x, int i) {
  if ((i %= 64) == 0)
    return x;
  return (x << (64 - i)) | (x >> i);
}


x86 assembly (clang, -O0):
<rotateR_fun_ullong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
cmp    $0x0,%edx
jne    112f <rotateR_fun_ullong+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1154 <rotateR_fun_ullong+0x54>
mov    -0x10(%rbp),%rax
mov    $0x40,%ecx
sub    -0x14(%rbp),%ecx
mov    %ecx,%ecx
shl    %cl,%rax
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
shr    %cl,%rdx
mov    %rdx,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateR_fun_ullong>:
mov    %esi,%ecx
mov    %rdi,%rax
ror    %cl,%rax
ret

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

LLVM IR (-O2):
define i64 @rotateR_fun_ullong(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = tail call i64 @llvm.fshr.i64(i64 %0, i64 %0, i64 %3)
ret i64 %4
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local1;
  {
    state[0UL] = input[0UL] + 0xffffffffff660b45UL;
    local1 = 0UL;
    while (local1 < 0UL) {
      if (!(state[0UL] > local1)) {
        state[0UL] += state[0UL];
      }
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] - 792422477UL) - 0xfffffffff7856444UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0xffffffffff660b45,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jae    115b <RandomFunc+0x5b>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
ja     114a <RandomFunc+0x4a>
mov    -0x18(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
jmp    1125 <RandomFunc+0x25>
mov    -0x18(%rbp),%rcx
sub    $0x2f3b684d,%rcx
sub    $0xfffffffff7856444,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0xffffffffd8a53eb4,%rax
add    (%rdi),%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = add i64 %9, -10089659
%11 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %10, i64* %11
store i64 0, i64* %6
br label %12
12: ; preds = %26, %2
%13 = load i64, i64* %6
%14 = icmp ult i64 %13, 0
br i1 %14, label %15, label %29
15: ; preds = %12
%16 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%17 = load i64, i64* %16
%18 = load i64, i64* %6
%19 = icmp ugt i64 %17, %18
br i1 %19, label %26, label %20
20: ; preds = %15
%21 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%22 = load i64, i64* %21
%23 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%24 = load i64, i64* %23
%25 = add i64 %24, %22
store i64 %25, i64* %23
br label %26
26: ; preds = %20, %15
%27 = load i64, i64* %6
%28 = add i64 %27, 2
store i64 %28, i64* %6
br label %12
29: ; preds = %12
%30 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%31 = load i64, i64* %30
%32 = sub i64 %31, 792422477
%33 = sub i64 %32, -142252988
%34 = load i64*, i64** %4
%35 = getelementptr inbounds i64, i64* %34, i64 0
store i64 %33, i64* %35
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = add i64 %3, -660259148
store i64 %4, i64* %1
ret void
}
/* Type definitions */
struct sysinfo {
  int uptime;
};

/* Variables and functions */
char const *bprintf(char *, int, int);
int /*<<< orphan*/ sysinfo(struct sysinfo *);
const char *uptime(void) {
  int h;
  int m;
  int uptime = 0;
  struct sysinfo info;
  sysinfo(&info);
  uptime = info.uptime;
  h = uptime / 3600;
  m = (uptime - h * 3600) / 60;
  return bprintf("%dh %dm", h, m);
}


x86 assembly (clang, -O0):
<uptime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
call   1040 <sysinfo@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
imul   $0xe10,-0x4(%rbp),%ecx
sub    %ecx,%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe90(%rip),%rdi
call   1030 <bprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uptime>:
push   %rax
mov    %rsp,%rdi
call   1040 <sysinfo@plt>
movslq (%rsp),%rax
imul   $0xffffffff91a2b3c5,%rax,%rsi
shr    $0x20,%rsi
add    %eax,%esi
mov    %esi,%ecx
shr    $0x1f,%ecx
sar    $0xb,%esi
add    %ecx,%esi
imul   $0xfffff1f0,%esi,%ecx
add    %eax,%ecx
movslq %ecx,%rdx
imul   $0xffffffff88888889,%rdx,%rax
shr    $0x20,%rax
add    %eax,%edx
mov    %edx,%eax
shr    $0x1f,%eax
sar    $0x5,%edx
add    %eax,%edx
lea    0xe93(%rip),%rdi
call   1030 <bprintf@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.sysinfo = type { i32 }
@.str = [8 x i8] c"%dh %dm\00"
define i8* @uptime() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.sysinfo
store i32 0, i32* %3
%5 = call i32 @sysinfo(%struct.sysinfo* %4)
%6 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %4, i32 0, i32 0
%7 = load i32, i32* %6
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = sdiv i32 %8, 3600
store i32 %9, i32* %1
%10 = load i32, i32* %3
%11 = load i32, i32* %1
%12 = mul nsw i32 %11, 3600
%13 = sub nsw i32 %10, %12
%14 = sdiv i32 %13, 60
store i32 %14, i32* %2
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = call i8* @bprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16)
ret i8* %17
}

LLVM IR (-O2):
%struct.sysinfo = type { i32 }
@.str = [8 x i8] c"%dh %dm\00"
define i8* @uptime() {
%1 = alloca %struct.sysinfo
%2 = bitcast %struct.sysinfo* %1 to i8*
%3 = call i32 @sysinfo(%struct.sysinfo* %1)
%4 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = sdiv i32 %5, 3600
%7 = mul nsw i32 %6, -3600
%8 = add i32 %7, %5
%9 = sdiv i32 %8, 60
%10 = call i8* @bprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %9)
ret i8* %10
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
scalar_t__ _hurd_get_host_config(char *, char *, size_t);
int __gethostname(char *name, size_t len) {
  ssize_t n = _hurd_get_host_config("/etc/hostname", name, len);
  return n < 0 ? -1 : 0;
}


x86 assembly (clang, -O0):
<__gethostname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rdi
call   1030 <_hurd_get_host_config@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gethostname>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee2(%rip),%rdi
call   1030 <_hurd_get_host_config@plt>
sar    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/etc/hostname\00"
define i32 @__gethostname(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i64 @_hurd_get_host_config(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %6, i64 %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = icmp slt i64 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 -1, i32 0
ret i32 %12
}

LLVM IR (-O2):
@.str = [14 x i8] c"/etc/hostname\00"
define i32 @__gethostname(i8* %0, i64 %1) {
%3 = tail call i64 @_hurd_get_host_config(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %1)
%4 = ashr i64 %3, 63
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ stacktrace_pop();
signed char stacktrace_ypop(signed char val) {
  stacktrace_pop();
  return val;
}


x86 assembly (clang, -O0):
<stacktrace_ypop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <stacktrace_pop@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stacktrace_ypop>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <stacktrace_pop@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @stacktrace_ypop(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 (...) @stacktrace_pop()
%4 = load i8, i8* %2
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @stacktrace_ypop(i8 returned signext %0) {
%2 = tail call i32 (...) @stacktrace_pop()
ret i8 %0
}
void test35_ATmega328_targetInit__I() {}


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

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

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

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

/* Variables and functions */
uint16_t u16_to_be(uint16_t value, int is_be) {
  uint16_t res = 0;
  if (is_be)
    res = value;
  else
    res = (value >> 8) | (value << 8);
  return res;
}


x86 assembly (clang, -O0):
<u16_to_be>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1126 <u16_to_be+0x26>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <u16_to_be+0x37>
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<u16_to_be>:
mov    %edi,%ecx
sar    $0x8,%ecx
mov    %edi,%eax
shl    $0x8,%eax
or     %ecx,%eax
test   %esi,%esi
cmovne %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @u16_to_be(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = ashr i32 %0, 8
%5 = shl i32 %0, 8
%6 = or i32 %4, %5
%7 = select i1 %3, i32 %6, i32 %0
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int raw_clz64(int /*<<< orphan*/);
int log_2_floor(uint64_t n) { return 63 - raw_clz64(n); }


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

x86 assembly (clang, -O2):
<log_2_floor>:
push   %rax
call   1030 <raw_clz64@plt>
mov    $0x3f,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @log_2_floor(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @raw_clz64(i32 %3)
%5 = sub nsw i32 63, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @log_2_floor(i32 %0) {
%2 = tail call i32 @raw_clz64(i32 %0)
%3 = sub nsw i32 63, %2
ret i32 %3
}
int get_aac_min_bitrate() { return 8000; }


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

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

LLVM IR (-O0):
define i32 @get_aac_min_bitrate() {
ret i32 8000
}

LLVM IR (-O2):
define i32 @get_aac_min_bitrate() {
ret i32 8000
}
/* Type definitions */
struct PKplex_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ PKplex_cmdline_parser_release(struct PKplex_args_info *);
void PKplex_cmdline_parser_free(struct PKplex_args_info *args_info) {
  PKplex_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<PKplex_cmdline_parser_free>:
jmp    1030 <PKplex_cmdline_parser_release@plt>

LLVM IR (-O0):
%struct.PKplex_args_info = type { i32 }
define void @PKplex_cmdline_parser_free(%struct.PKplex_args_info* %0) {
%2 = alloca %struct.PKplex_args_info*
store %struct.PKplex_args_info* %0, %struct.PKplex_args_info** %2
%3 = load %struct.PKplex_args_info*, %struct.PKplex_args_info** %2
%4 = call i32 @PKplex_cmdline_parser_release(%struct.PKplex_args_info* %3)
ret void
}

LLVM IR (-O2):
%struct.PKplex_args_info = type { i32 }
define void @PKplex_cmdline_parser_free(%struct.PKplex_args_info* %0) {
%2 = tail call i32 @PKplex_cmdline_parser_release(%struct.PKplex_args_info* %0)
ret void
}
/* Type definitions */
struct minipmi_context {
  int dummy;
};

/* Variables and functions */
int minipmi_parse(struct minipmi_context *, char);
int minipmi_version1_parse(struct minipmi_context *ctx) {
  return minipmi_parse(ctx, ' ');
}


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

x86 assembly (clang, -O2):
<minipmi_version1_parse>:
mov    $0x20,%esi
jmp    1030 <minipmi_parse@plt>

LLVM IR (-O0):
%struct.minipmi_context = type { i32 }
define i32 @minipmi_version1_parse(%struct.minipmi_context* %0) {
%2 = alloca %struct.minipmi_context*
store %struct.minipmi_context* %0, %struct.minipmi_context** %2
%3 = load %struct.minipmi_context*, %struct.minipmi_context** %2
%4 = call i32 @minipmi_parse(%struct.minipmi_context* %3, i8 signext 32)
ret i32 %4
}

LLVM IR (-O2):
%struct.minipmi_context = type { i32 }
define i32 @minipmi_version1_parse(%struct.minipmi_context* %0) {
%2 = tail call i32 @minipmi_parse(%struct.minipmi_context* %0, i8 signext 32)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Calling abort()\n");
  abort();
  printf("after abort...\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
@.str = [17 x i8] c"Calling abort()\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@str = [16 x i8] c"Calling abort()\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @abort()
unreachable
}
void ares_win32_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @ares_win32_cleanup() {
ret void
}
void sys_bashfilename(const char *from, char *to) {
  char c;
  while (c = *from++) {
    *to++ = c;
  }
  *to = 0;
}


x86 assembly (clang, -O0):
<sys_bashfilename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
cmp    $0x0,%al
je     1141 <sys_bashfilename+0x41>
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
jmp    110c <sys_bashfilename+0xc>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_bashfilename>:
mov    (%rdi),%al
test   %al,%al
je     1121 <sys_bashfilename+0x21>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
mov    %al,(%rsi)
add    $0x1,%rsi
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <sys_bashfilename+0x10>
movb   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define void @sys_bashfilename(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = phi i8* [ %10, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %6, i8* %8
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %1, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_buttons();
int /*<<< orphan*/ init_slide();
int /*<<< orphan*/ init_sound();
void init_input() {
  init_buttons();
  init_slide();
  init_sound();
}


x86 assembly (clang, -O0):
<init_input>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <init_buttons@plt>
mov    $0x0,%al
call   1040 <init_slide@plt>
mov    $0x0,%al
call   1030 <init_sound@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_input>:
push   %rax
xor    %eax,%eax
call   1050 <init_buttons@plt>
xor    %eax,%eax
call   1040 <init_slide@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <init_sound@plt>

LLVM IR (-O0):
define void @init_input() {
%1 = call i32 (...) @init_buttons()
%2 = call i32 (...) @init_slide()
%3 = call i32 (...) @init_sound()
ret void
}

LLVM IR (-O2):
define void @init_input() {
%1 = tail call i32 (...) @init_buttons()
%2 = tail call i32 (...) @init_slide()
%3 = tail call i32 (...) @init_sound()
ret void
}
/* Variables and functions */
int htmly_detect_tag(char *, char *);
int htmly_detect_image(char *line) { return htmly_detect_tag(line, "image"); }


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

x86 assembly (clang, -O2):
<htmly_detect_image>:
lea    0xee9(%rip),%rsi
jmp    1030 <htmly_detect_tag@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"image\00"
define i32 @htmly_detect_image(i8* %0) {
%2 = tail call i32 @htmly_detect_tag(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
double floor(float);
int /*<<< orphan*/ printf(char *, double);
int main() {
  float a = 3.2;
  printf("floor 3.2 = %f", floor(a));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xed7(%rip),%xmm0
call   1040 <floor@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"floor 3.2 = %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
store float 0x40099999A0000000, float* %2
%3 = load float, float* %2
%4 = call double @floor(float %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"floor 3.2 = %f\00"
define i32 @main() {
%1 = tail call double @floor(float 0x40099999A0000000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
void foo583() {}


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

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

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

LLVM IR (-O2):
define void @foo583() {
ret void
}
__attribute__((no, noclone)) signed __int128 t107_5mul(unsigned __int128 x) {
  signed __int128 r;
  if (__builtin_mul_overflow(x, (unsigned __int128)(31), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t107_5mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
mov    $0x1f,%ecx
mul    %rcx
mov    %rax,%rsi
mov    -0x50(%rbp),%rax
seto   %dl
mov    %dl,-0x41(%rbp)
mul    %rcx
mov    %rax,%rcx
mov    -0x41(%rbp),%al
add    %rsi,%rdx
setb   %sil
or     %sil,%al
test   %rdx,%rdx
sets   %sil
or     %sil,%al
mov    %rcx,-0x40(%rbp)
mov    %rdx,-0x38(%rbp)
test   $0x1,%al
jne    1183 <t107_5mul+0x73>
jmp    118a <t107_5mul+0x7a>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t107_5mul>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rax
mov    $0x1f,%esi
mul    %rsi
mov    %rax,%rcx
mov    %rdi,%rax
seto   %dil
mul    %rsi
mov    %rax,%r14
mov    %rdx,%rbx
add    %rcx,%rbx
setb   %al
or     %dil,%al
jne    1142 <t107_5mul+0x32>
test   %rbx,%rbx
jns    1149 <t107_5mul+0x39>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t107_5mul(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.umul.with.overflow.i128(i128 %11, i128 31)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
%15 = icmp ugt i128 %14, 170141183460469231731687303715884105727
%16 = or i1 %13, %15
store i128 %14, i128* %6
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = call i32 (...) @bar()
br label %19
19: ; preds = %17, %2
%20 = load i128, i128* %6
store i128 %20, i128* %3
%21 = bitcast i128* %3 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @t107_5mul(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.umul.with.overflow.i128(i128 %6, i128 31)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
%10 = icmp slt i128 %9, 0
%11 = or i1 %8, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = tail call i32 (...) @bar()
br label %14
14: ; preds = %12, %2
%15 = trunc i128 %9 to i64
%16 = lshr i128 %9, 64
%17 = trunc i128 %16 to i64
%18 = insertvalue { i64, i64 } poison, i64 %15, 0
%19 = insertvalue { i64, i64 } %18, i64 %17, 1
ret { i64, i64 } %19
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct trace_seq {
  int dummy;
};

/* Variables and functions */
scalar_t__ le16toh(int /*<<< orphan*/);
unsigned long long process___le16_to_cpup(struct trace_seq *s,
                                          unsigned long long *args) {
  uint16_t *val = (uint16_t *)args[0];
  return (long long)le16toh(*val);
}


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

x86 assembly (clang, -O2):
<process___le16_to_cpup>:
mov    (%rsi),%rax
mov    (%rax),%edi
jmp    1030 <le16toh@plt>

LLVM IR (-O0):
%struct.trace_seq = type { i32 }
define i64 @process___le16_to_cpup(%struct.trace_seq* %0, i64* %1) {
%3 = alloca %struct.trace_seq*
%4 = alloca i64*
%5 = alloca i32*
store %struct.trace_seq* %0, %struct.trace_seq** %3
store i64* %1, i64** %4
%6 = load i64*, i64** %4
%7 = getelementptr inbounds i64, i64* %6, i64 0
%8 = load i64, i64* %7
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
%12 = call i64 @le16toh(i32 %11)
ret i64 %12
}

LLVM IR (-O2):
%struct.trace_seq = type { i32 }
define i64 @process___le16_to_cpup(%struct.trace_seq* nocapture readnone %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = inttoptr i64 %3 to i32*
%5 = load i32, i32* %4
%6 = tail call i64 @le16toh(i32 %5)
ret i64 %6
}
void ice_dcbnl_set_all(struct ice_vsi *vsi) {}


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

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

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

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