xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ write_instr(int);
void eval_log_neg(void) { write_instr(0x1D); }


x86 assembly (clang, -O0):
<eval_log_neg>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1d,%edi
call   1030 <write_instr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_log_neg>:
mov    $0x1d,%edi
jmp    1030 <write_instr@plt>

LLVM IR (-O0):
define void @eval_log_neg() {
%1 = call i32 @write_instr(i32 29)
ret void
}

LLVM IR (-O2):
define void @eval_log_neg() {
%1 = tail call i32 @write_instr(i32 29)
ret void
}
/* Variables and functions */
int get_p(char);
int next_p(char p) {
  switch (p) {
  case '+':
  case '-':
  case '*':
  case '/':
    return get_p(p) + 1;
  case '^':
    return get_p(p);
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<next_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffffd6,%eax
sub    $0x2,%eax
jb     1169 <next_p+0x59>
jmp    1136 <next_p+0x26>
mov    -0xc(%rbp),%eax
sub    $0x2d,%eax
je     1169 <next_p+0x59>
jmp    1147 <next_p+0x37>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     1169 <next_p+0x59>
jmp    1158 <next_p+0x48>
mov    -0xc(%rbp),%eax
sub    $0x5e,%eax
je     117d <next_p+0x6d>
jmp    118e <next_p+0x7e>
movsbl -0x5(%rbp),%edi
call   1030 <get_p@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1195 <next_p+0x85>
movsbl -0x5(%rbp),%edi
call   1030 <get_p@plt>
mov    %eax,-0x4(%rbp)
jmp    1195 <next_p+0x85>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_p>:
xor    %eax,%eax
lea    -0x2a(%rdi),%ecx
cmp    $0x34,%ecx
ja     1136 <next_p+0x26>
mov    $0x2b,%edx
bt     %rcx,%rdx
jae    1137 <next_p+0x27>
push   %rax
movsbl %dil,%edi
call   1030 <get_p@plt>
add    $0x1,%eax
add    $0x8,%rsp
ret
cmp    $0x34,%rcx
jne    1136 <next_p+0x26>
movsbl %dil,%edi
jmp    1030 <get_p@plt>

LLVM IR (-O0):
define i32 @next_p(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 %13 [
i32 43, label %6
i32 45, label %6
i32 42, label %6
i32 47, label %6
i32 94, label %10
]
6: ; preds = %1, %1, %1, %1
%7 = load i8, i8* %3
%8 = call i32 @get_p(i8 signext %7)
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %14
10: ; preds = %1
%11 = load i8, i8* %3
%12 = call i32 @get_p(i8 signext %11)
store i32 %12, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %10, %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @next_p(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %8 [
i32 43, label %3
i32 45, label %3
i32 42, label %3
i32 47, label %3
i32 94, label %6
]
3: ; preds = %1, %1, %1, %1
%4 = tail call i32 @get_p(i8 signext %0)
%5 = add nsw i32 %4, 1
br label %8
6: ; preds = %1
%7 = tail call i32 @get_p(i8 signext %0)
br label %8
8: ; preds = %1, %6, %3
%9 = phi i32 [ %7, %6 ], [ %5, %3 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello, Bender! \n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Hello, Bender! \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))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"Hello, Bender! \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))
ret i32 0
}
/* Variables and functions */
float fabs(float x) { return (float)fabs((double)x); }


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <fabs@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @fabs(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fptrunc double %4 to float
%6 = call float @fabs(float %5)
ret float %6
}

LLVM IR (-O2):
define float @fabs(float %0) {
ret float undef
}
int test_15(unsigned char *x, int y, int z) { return ((x[0] >> 2) & 16) == 0; }


x86 assembly (clang, -O0):
<test_15>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
sar    $0x2,%eax
and    $0x10,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_15>:
movzbl (%rdi),%ecx
xor    %eax,%eax
test   $0x40,%cl
sete   %al
ret

LLVM IR (-O0):
define i32 @test_15(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = ashr i32 %10, 2
%12 = and i32 %11, 16
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @test_15(i8* nocapture %0, i32 %1, i32 %2) {
%4 = load i8, i8* %0
%5 = lshr i8 %4, 6
%6 = and i8 %5, 1
%7 = xor i8 %6, 1
%8 = zext i8 %7 to i32
ret i32 %8
}
/* Variables and functions */
char *getenv(char *);
char *gogetenv(char *varname) {
  char *result;
  if ((result = getenv(varname)) == NULL) {
    result = "(NULL)";
  }
  return result;
}


x86 assembly (clang, -O0):
<gogetenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    113e <gogetenv+0x2e>
lea    0xec6(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gogetenv>:
push   %rax
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xee0(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"(NULL)\00"
define i8* @gogetenv(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @getenv(i8* %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %3
br label %8
8: ; preds = %7, %1
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
@.str = [7 x i8] c"(NULL)\00"
define i8* @gogetenv(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
%3 = icmp eq i8* %2, null
%4 = select i1 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ emit_token(char *);
int /*<<< orphan*/ resolve_backward(int);
void emit_again(void) {
  emit_token("bbranch");
  resolve_backward(0xC57be916);
}


x86 assembly (clang, -O0):
<emit_again>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <emit_token@plt>
mov    $0xc57be916,%edi
call   1030 <resolve_backward@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_again>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <emit_token@plt>
mov    $0xc57be916,%edi
pop    %rax
jmp    1030 <resolve_backward@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"bbranch\00"
define void @emit_again() {
%1 = call i32 @emit_token(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @resolve_backward(i32 -981735146)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"bbranch\00"
define void @emit_again() {
%1 = tail call i32 @emit_token(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @resolve_backward(i32 -981735146)
ret void
}
void init_default(struct Ability *self, struct Hero *H) {}


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

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

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

LLVM IR (-O2):
%struct.Ability = type opaque
%struct.Hero = type opaque
define void @init_default(%struct.Ability* nocapture %0, %struct.Hero* nocapture %1) {
ret void
}
float power(b, ex)
float b;
long int ex;
{
  float res;
  for (res = b; ex > 1; res *= b, ex--)
    ;
  return (res);
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
cmpq   $0x1,-0x10(%rbp)
jle    114b <power+0x4b>
jmp    112b <power+0x2b>
movss  -0x4(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    111b <power+0x1b>
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
cvtsd2ss %xmm0,%xmm1
cmp    $0x2,%rdi
jl     112f <power+0x2f>
add    $0x1,%rdi
movaps %xmm1,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mulss  %xmm1,%xmm0
add    $0xffffffffffffffff,%rdi
cmp    $0x2,%rdi
ja     1120 <power+0x20>
ret
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @power(double %0, i64 %1) {
%3 = alloca float
%4 = alloca i64
%5 = alloca float
%6 = fptrunc double %0 to float
store float %6, float* %3
store i64 %1, i64* %4
%7 = load float, float* %3
store float %7, float* %5
br label %8
8: ; preds = %12, %2
%9 = load i64, i64* %4
%10 = icmp sgt i64 %9, 1
br i1 %10, label %11, label %18
11: ; preds = %8
br label %12
12: ; preds = %11
%13 = load float, float* %3
%14 = load float, float* %5
%15 = fmul float %14, %13
store float %15, float* %5
%16 = load i64, i64* %4
%17 = add nsw i64 %16, -1
store i64 %17, i64* %4
br label %8
18: ; preds = %8
%19 = load float, float* %5
ret float %19
}

LLVM IR (-O2):
define float @power(double %0, i64 %1) {
%3 = fptrunc double %0 to float
%4 = icmp sgt i64 %1, 1
br i1 %4, label %5, label %11
5: ; preds = %2, %5
%6 = phi float [ %8, %5 ], [ %3, %2 ]
%7 = phi i64 [ %9, %5 ], [ %1, %2 ]
%8 = fmul float %6, %3
%9 = add nsw i64 %7, -1
%10 = icmp ugt i64 %7, 2
br i1 %10, label %5, label %11
11: ; preds = %5, %2
%12 = phi float [ %3, %2 ], [ %8, %5 ]
ret float %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void error_handling(char *message) {
  fputs(message, stderr);
  fputc('\n', stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<error_handling>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<error_handling>:
push   %rbx
mov    0x2ea8(%rip),%rbx
mov    (%rbx),%esi
call   1030 <fputs@plt>
mov    (%rbx),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @error_handling(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fputs(i8* %3, i32 %4)
%6 = load i32, i32* @stderr
%7 = call i32 @fputc(i8 signext 10, i32 %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @error_handling(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputc(i8 signext 10, i32 %4)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ CAN0_DriverIRQHandler();
__attribute__((weak)) void CAN0_Rx_Warning_IRQHandler(void) {
  CAN0_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @CAN0_Rx_Warning_IRQHandler() {
%1 = call i32 (...) @CAN0_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @CAN0_Rx_Warning_IRQHandler() {
%1 = tail call i32 (...) @CAN0_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello,world!\c");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"hello,world!c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void test_isunordered(double x, double y, int true) {
  if (__builtin_isunordered(x, y)) {
    if (!true)
      abort();
  } else {
    if (true)
      abort();
  }
}


x86 assembly (clang, -O0):
<test_isunordered>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jnp    1149 <test_isunordered+0x39>
cmpl   $0x0,-0x14(%rbp)
jne    1144 <test_isunordered+0x34>
call   1030 <abort@plt>
jmp    115d <test_isunordered+0x4d>
cmpl   $0x0,-0x14(%rbp)
je     1158 <test_isunordered+0x48>
call   1030 <abort@plt>
jmp    115d <test_isunordered+0x4d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_isunordered>:
push   %rax
ucomisd %xmm1,%xmm0
jp     111d <test_isunordered+0xd>
test   %edi,%edi
jne    1121 <test_isunordered+0x11>
pop    %rax
ret
test   %edi,%edi
jne    111b <test_isunordered+0xb>
call   1030 <abort@plt>

LLVM IR (-O0):
define void @test_isunordered(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 uno 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_isunordered(double %0, double %1, i32 %2) {
%4 = fcmp uno 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
}
struct node *ret_and_set(struct node **n, void *v) {
  struct node *r = *n;
  *n = v;
  return r;
}


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

x86 assembly (clang, -O2):
<ret_and_set>:
mov    (%rdi),%rax
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.node = type opaque
define %struct.node* @ret_and_set(%struct.node** %0, i8* %1) {
%3 = alloca %struct.node**
%4 = alloca i8*
%5 = alloca %struct.node*
store %struct.node** %0, %struct.node*** %3
store i8* %1, i8** %4
%6 = load %struct.node**, %struct.node*** %3
%7 = load %struct.node*, %struct.node** %6
store %struct.node* %7, %struct.node** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to %struct.node*
%10 = load %struct.node**, %struct.node*** %3
store %struct.node* %9, %struct.node** %10
%11 = load %struct.node*, %struct.node** %5
ret %struct.node* %11
}

LLVM IR (-O2):
%struct.node = type opaque
define %struct.node* @ret_and_set(%struct.node** nocapture %0, i8* %1) {
%3 = load %struct.node*, %struct.node** %0
%4 = bitcast %struct.node** %0 to i8**
store i8* %1, i8** %4
ret %struct.node* %3
}
/* Variables and functions */
int /*<<< orphan*/ e_absx();
int /*<<< orphan*/ e_ldy();
void e_ldy_absx() {
  e_absx();
  e_ldy();
}


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

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

LLVM IR (-O0):
define void @e_ldy_absx() {
%1 = call i32 (...) @e_absx()
%2 = call i32 (...) @e_ldy()
ret void
}

LLVM IR (-O2):
define void @e_ldy_absx() {
%1 = tail call i32 (...) @e_absx()
%2 = tail call i32 (...) @e_ldy()
ret void
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_nsec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ mysleep(struct timespec *);
int main(int ac, char *av[]) {
  struct timespec timeout;
  timeout.tv_sec = atoi(av[1]);
  timeout.tv_nsec = 0;
  mysleep(&timeout);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <mysleep@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <mysleep@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i32 }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca %struct.timespec
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @atoi(i8* %8)
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 1
store i32 %9, i32* %10
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 0
store i64 0, i64* %11
%12 = call i32 @mysleep(%struct.timespec* %5)
ret i32 0
}

LLVM IR (-O2):
%struct.timespec = type { i64, i32 }
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %3 to i8*
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 1
store i32 %7, i32* %8
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 0
store i64 0, i64* %9
%10 = call i32 @mysleep(%struct.timespec* %3)
ret i32 0
}
void reverse(char (*arr)[4]) {
  int tmp = (*arr)[0];
  (*arr)[0] = (*arr)[3];
  (*arr)[3] = tmp;
  tmp = (*arr)[1];
  (*arr)[1] = (*arr)[2];
  (*arr)[2] = tmp;
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
mov    (%rdi),%al
mov    0x3(%rdi),%cl
mov    %cl,(%rdi)
mov    %al,0x3(%rdi)
rolw   $0x8,0x1(%rdi)
ret

LLVM IR (-O0):
define void @reverse([4 x i8]* %0) {
%2 = alloca [4 x i8]*
%3 = alloca i32
store [4 x i8]* %0, [4 x i8]** %2
%4 = load [4 x i8]*, [4 x i8]** %2
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
store i32 %7, i32* %3
%8 = load [4 x i8]*, [4 x i8]** %2
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %8, i64 0, i64 3
%10 = load i8, i8* %9
%11 = load [4 x i8]*, [4 x i8]** %2
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %11, i64 0, i64 0
store i8 %10, i8* %12
%13 = load i32, i32* %3
%14 = trunc i32 %13 to i8
%15 = load [4 x i8]*, [4 x i8]** %2
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %15, i64 0, i64 3
store i8 %14, i8* %16
%17 = load [4 x i8]*, [4 x i8]** %2
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %17, i64 0, i64 1
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
store i32 %20, i32* %3
%21 = load [4 x i8]*, [4 x i8]** %2
%22 = getelementptr inbounds [4 x i8], [4 x i8]* %21, i64 0, i64 2
%23 = load i8, i8* %22
%24 = load [4 x i8]*, [4 x i8]** %2
%25 = getelementptr inbounds [4 x i8], [4 x i8]* %24, i64 0, i64 1
store i8 %23, i8* %25
%26 = load i32, i32* %3
%27 = trunc i32 %26 to i8
%28 = load [4 x i8]*, [4 x i8]** %2
%29 = getelementptr inbounds [4 x i8], [4 x i8]* %28, i64 0, i64 2
store i8 %27, i8* %29
ret void
}

LLVM IR (-O2):
define void @reverse([4 x i8]* nocapture %0) {
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %0, i64 0, i64 0
%3 = load i8, i8* %2
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %0, i64 0, i64 3
%5 = load i8, i8* %4
store i8 %5, i8* %2
store i8 %3, i8* %4
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %0, i64 0, i64 1
%7 = load i8, i8* %6
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %0, i64 0, i64 2
%9 = load i8, i8* %8
store i8 %9, i8* %6
store i8 %7, i8* %8
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool is_local(uint32_t addr) { return ((addr) >> 20) == 0; }


x86 assembly (clang, -O0):
<is_local>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x14,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_local>:
xor    %eax,%eax
cmp    $0x100000,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @is_local(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 20
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_local(i32 %0) {
%2 = icmp ult i32 %0, 1048576
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int strcmp(char *, char *);
int strListCompareAlphaCaseReverse(const void *arg1, const void *arg2) {
  return strcmp(*(char **)arg2, *(char **)arg1);
}


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

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

LLVM IR (-O0):
define i32 @strListCompareAlphaCaseReverse(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @strListCompareAlphaCaseReverse(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %0 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ process_exit(int);
int sys_exit(int status) {
  process_exit(status);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @sys_exit(i32 %0) {
%2 = tail call i32 @process_exit(i32 %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
uint32_t EEPROMBlockProtectGet(uint32_t ui32Block) {
  ;
  (*((volatile uint32_t *)(0x400AF004))) = ui32Block;
  return ((*((volatile uint32_t *)(0x400AF030))));
}


x86 assembly (clang, -O0):
<EEPROMBlockProtectGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x400af004,%eax
mov    %ecx,(%rax)
mov    $0x400af030,%eax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EEPROMBlockProtectGet>:
mov    %edi,-0x4(%rsp)
mov    -0x4(%rsp),%eax
mov    %eax,0x400af004
mov    0x400af030,%eax
ret

LLVM IR (-O0):
define i32 @EEPROMBlockProtectGet(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
store volatile i32 %3, i32* inttoptr (i64 1074458628 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1074458672 to i32*)
ret i32 %4
}

LLVM IR (-O2):
define i32 @EEPROMBlockProtectGet(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
store volatile i32 %3, i32* inttoptr (i64 1074458628 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1074458672 to i32*)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ SA_NOCLDSTOP;
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ cleanup();
int /*<<< orphan*/ raise(int);
int /*<<< orphan*/ signal(int, int /*<<< orphan*/);
void sighandler(int sig) {
  if (!SA_NOCLDSTOP)
    signal(sig, SIG_IGN);
  cleanup();
  signal(sig, SIG_DFL);
  raise(sig);
}


x86 assembly (clang, -O0):
<sighandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
cmpl   $0x0,(%rax)
jne    115c <sighandler+0x2c>
mov    -0x4(%rbp),%edi
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    $0x0,%al
call   1050 <cleanup@plt>
mov    -0x4(%rbp),%edi
mov    0x2e63(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    -0x4(%rbp),%edi
call   1030 <raise@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighandler>:
push   %rbx
mov    %edi,%ebx
mov    0x2ea6(%rip),%rax
cmpl   $0x0,(%rax)
jne    114f <sighandler+0x1f>
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1040 <signal@plt>
xor    %eax,%eax
call   1050 <cleanup@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1040 <signal@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <raise@plt>

LLVM IR (-O0):
@SA_NOCLDSTOP = global i32 0
@SIG_IGN = global i32 0
@SIG_DFL = global i32 0
define void @sighandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SA_NOCLDSTOP
%4 = icmp ne i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = load i32, i32* @SIG_IGN
%8 = call i32 @signal(i32 %6, i32 %7)
br label %9
9: ; preds = %5, %1
%10 = call i32 (...) @cleanup()
%11 = load i32, i32* %2
%12 = load i32, i32* @SIG_DFL
%13 = call i32 @signal(i32 %11, i32 %12)
%14 = load i32, i32* %2
%15 = call i32 @raise(i32 %14)
ret void
}

LLVM IR (-O2):
@SA_NOCLDSTOP = global i32 0
@SIG_IGN = global i32 0
@SIG_DFL = global i32 0
define void @sighandler(i32 %0) {
%2 = load i32, i32* @SA_NOCLDSTOP
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @SIG_IGN
%6 = tail call i32 @signal(i32 %0, i32 %5)
br label %7
7: ; preds = %4, %1
%8 = tail call i32 (...) @cleanup()
%9 = load i32, i32* @SIG_DFL
%10 = tail call i32 @signal(i32 %0, i32 %9)
%11 = tail call i32 @raise(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int /*<<< orphan*/);
void print_line_uint64_t(uint32_t i, uint32_t j, uint64_t v, int magma) {
  if (magma)
    printf("A[%u,%u]:=%ld;\n", i, j, v);
  else
    printf("%u %u %ld\n", i, j, v);
}


x86 assembly (clang, -O0):
<print_line_uint64_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1148 <print_line_uint64_t+0x38>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
jmp    115d <print_line_uint64_t+0x4d>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_line_uint64_t>:
mov    %edx,%eax
mov    %esi,%edx
mov    %edi,%esi
test   %ecx,%ecx
lea    0xef1(%rip),%rcx
lea    0xeda(%rip),%rdi
cmove  %rcx,%rdi
mov    %eax,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"A[%u,%u]:=%ld;\0A\00"
@.str.1 = [11 x i8] c"%u %u %ld\0A\00"
define void @print_line_uint64_t(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* %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %4
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i32 %14)
br label %21
16: ; preds = %4
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = load i32, i32* %7
%20 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32 %18, i32 %19)
br label %21
21: ; preds = %16, %11
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"A[%u,%u]:=%ld;\0A\00"
@.str.1 = [11 x i8] c"%u %u %ld\0A\00"
define void @print_line_uint64_t(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %3, 0
%6 = select i1 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
%7 = tail call i32 @printf(i8* %6, i32 %0, i32 %1, i32 %2)
ret void
}
unsigned long gamma(a, i)
unsigned char *a;
int i;
{
  unsigned long h[5];
  (void)g(a, i / 5, h);
  return h[i % 5];
}


x86 assembly (clang, -O0):
<gamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    -0x40(%rbp),%rdx
mov    $0x0,%al
call   1030 <g@plt>
mov    -0xc(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    -0x40(%rbp,%rax,8),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gamma>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movslq %esi,%r14
imul   $0x66666667,%r14,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x21,%rbx
add    %eax,%ebx
mov    %rsp,%rdx
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <g@plt>
lea    (%rbx,%rbx,4),%eax
sub    %eax,%r14d
movslq %r14d,%rax
mov    (%rsp,%rax,8),%rax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @gamma(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [5 x i64]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sdiv i32 %7, 5
%9 = getelementptr inbounds [5 x i64], [5 x i64]* %5, i64 0, i64 0
%10 = call i32 (i8*, i32, i64*, ...) bitcast (i32 (...)* @g to i32 (i8*, i32, i64*, ...)*)(i8* %6, i32 %8, i64* %9)
%11 = load i32, i32* %4
%12 = srem i32 %11, 5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [5 x i64], [5 x i64]* %5, i64 0, i64 %13
%15 = load i64, i64* %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @gamma(i8* %0, i32 %1) {
%3 = alloca [5 x i64]
%4 = bitcast [5 x i64]* %3 to i8*
%5 = sdiv i32 %1, 5
%6 = getelementptr inbounds [5 x i64], [5 x i64]* %3, i64 0, i64 0
%7 = call i32 (i8*, i32, i64*, ...) bitcast (i32 (...)* @g to i32 (i8*, i32, i64*, ...)*)(i8* %0, i32 %5, i64* %6)
%8 = srem i32 %1, 5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [5 x i64], [5 x i64]* %3, i64 0, i64 %9
%11 = load i64, i64* %10
ret i64 %11
}
/* Variables and functions */
int dbar(double, double);
int sb(double, double);
int ubar(double, double);
int uv(double, double);
double F2_cc_anu_p(double xx, double Q2) {
  return 2 * (uv(xx, Q2) + sb(xx, Q2) + ubar(xx, Q2) + dbar(xx, Q2));
}


x86 assembly (clang, -O0):
<F2_cc_anu_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <uv@plt>
mov    %eax,-0x1c(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <sb@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1050 <ubar@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1060 <dbar@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F2_cc_anu_p>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1040 <uv@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <sb@plt>
mov    %eax,%ebp
add    %ebx,%ebp
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1050 <ubar@plt>
mov    %eax,%ebx
add    %ebp,%ebx
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1060 <dbar@plt>
add    %ebx,%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @F2_cc_anu_p(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i32 @uv(double %5, double %6)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call i32 @sb(double %8, double %9)
%11 = add nsw i32 %7, %10
%12 = load double, double* %3
%13 = load double, double* %4
%14 = call i32 @ubar(double %12, double %13)
%15 = add nsw i32 %11, %14
%16 = load double, double* %3
%17 = load double, double* %4
%18 = call i32 @dbar(double %16, double %17)
%19 = add nsw i32 %15, %18
%20 = mul nsw i32 2, %19
%21 = sitofp i32 %20 to double
ret double %21
}

LLVM IR (-O2):
define double @F2_cc_anu_p(double %0, double %1) {
%3 = tail call i32 @uv(double %0, double %1)
%4 = tail call i32 @sb(double %0, double %1)
%5 = add nsw i32 %4, %3
%6 = tail call i32 @ubar(double %0, double %1)
%7 = add nsw i32 %5, %6
%8 = tail call i32 @dbar(double %0, double %1)
%9 = add nsw i32 %7, %8
%10 = shl nsw i32 %9, 1
%11 = sitofp i32 %10 to double
ret double %11
}
delim(c) char c;
{
  if (any(c, " \t\n"))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<delim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
lea    0xed7(%rip),%rsi
mov    $0x0,%al
call   1030 <any@plt>
cmp    $0x0,%eax
je     1145 <delim+0x35>
movl   $0x1,-0x4(%rbp)
jmp    114c <delim+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delim>:
push   %rax
movsbl %dil,%edi
lea    0xee4(%rip),%rsi
xor    %eax,%eax
call   1030 <any@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c" \09\0A\00"
define i32 @delim(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @any to i32 (i32, i8*, ...)*)(i32 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [4 x i8] c" \09\0A\00"
define i32 @delim(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @any to i32 (i32, i8*, ...)*)(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
char computerIMEIChecksum(char *);
int isValidIMEI(char *digit) {
  if (computerIMEIChecksum(digit) == (digit[14] - '0'))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isValidIMEI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <computerIMEIChecksum@plt>
movsbl %al,%eax
mov    -0x10(%rbp),%rcx
movsbl 0xe(%rcx),%ecx
sub    $0x30,%ecx
cmp    %ecx,%eax
jne    1147 <isValidIMEI+0x37>
movl   $0x1,-0x4(%rbp)
jmp    114e <isValidIMEI+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValidIMEI>:
push   %rbx
mov    %rdi,%rbx
call   1030 <computerIMEIChecksum@plt>
movsbl %al,%ecx
movsbl 0xe(%rbx),%edx
add    $0xffffffd0,%edx
xor    %eax,%eax
cmp    %ecx,%edx
sete   %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isValidIMEI(i8* %0) {
%2 = tail call signext i8 @computerIMEIChecksum(i8* %0)
%3 = sext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 14
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = add nsw i32 %6, -48
%8 = icmp eq i32 %7, %3
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
void set_thread_name(pthread_t thread, const char *name) {}


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

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

LLVM IR (-O0):
define void @set_thread_name(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 @set_thread_name(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("main\n");
  foo();
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"main\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @foo()
ret i32 0
}
/* Variables and functions */
int anetTcpGenericConnect(char *, char const *, int, char const *, int);
int anetTcpNonBlockBestEffortBindConnect(char *err, const char *addr, int port,
                                         const char *source_addr) {
  return anetTcpGenericConnect(err, addr, port, source_addr, 1 | 2);
}


x86 assembly (clang, -O0):
<anetTcpNonBlockBestEffortBindConnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    $0x3,%r8d
call   1030 <anetTcpGenericConnect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<anetTcpNonBlockBestEffortBindConnect>:
mov    $0x3,%r8d
jmp    1030 <anetTcpGenericConnect@plt>

LLVM IR (-O0):
define i32 @anetTcpNonBlockBestEffortBindConnect(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @anetTcpGenericConnect(i8* %9, i8* %10, i32 %11, i8* %12, i32 3)
ret i32 %13
}

LLVM IR (-O2):
define i32 @anetTcpNonBlockBestEffortBindConnect(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @anetTcpGenericConnect(i8* %0, i8* %1, i32 %2, i8* %3, i32 3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_sndfile_init_proplist() {
  printf("NOT IMPLEMENTED:"
         "pa_sndfile_init_proplist"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"NOT IMPLEMENTED:pa_sndfile_init_proplist\0A\00"
define i32 @pa_sndfile_init_proplist() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [41 x i8] c"NOT IMPLEMENTED:pa_sndfile_init_proplist\00"
define i32 @pa_sndfile_init_proplist() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int d_blg_cr2(double a1) { return !(__builtin_islessgreater(100, a1)); }


x86 assembly (clang, -O0):
<d_blg_cr2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_blg_cr2>:
xor    %eax,%eax
ucomisd 0xef6(%rip),%xmm0
sete   %al
ret

LLVM IR (-O0):
define i32 @d_blg_cr2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp one double 1.000000e+02, %3
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @d_blg_cr2(double %0) {
%2 = fcmp ueq double %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct nlmsg {
  int dummy;
};

/* Variables and functions */
int nla_put(struct nlmsg *, int, char const *, scalar_t__);
scalar_t__ strlen(char const *);
int nla_put_str(struct nlmsg *msg, int type, const char *str) {
  return nla_put(msg, type, str, strlen(str) + 1);
}


x86 assembly (clang, -O0):
<nla_put_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    %rax,%rcx
add    $0x1,%rcx
call   1040 <nla_put@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nla_put_str>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    %rdx,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rcx
mov    %rbp,%rdi
mov    %r14d,%esi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <nla_put@plt>

LLVM IR (-O0):
%struct.nlmsg = type { i32 }
define i32 @nla_put_str(%struct.nlmsg* %0, i32 %1, i8* %2) {
%4 = alloca %struct.nlmsg*
%5 = alloca i32
%6 = alloca i8*
store %struct.nlmsg* %0, %struct.nlmsg** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load %struct.nlmsg*, %struct.nlmsg** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = load i8*, i8** %6
%11 = call i64 @strlen(i8* %10)
%12 = add nsw i64 %11, 1
%13 = call i32 @nla_put(%struct.nlmsg* %7, i32 %8, i8* %9, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.nlmsg = type { i32 }
define i32 @nla_put_str(%struct.nlmsg* %0, i32 %1, i8* %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%5 = add nsw i64 %4, 1
%6 = tail call i32 @nla_put(%struct.nlmsg* %0, i32 %1, i8* %2, i64 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ debug_board_write_str(char *);
void kolibri_browser_quit(void) {
  debug_board_write_str("Netsurf is shutting down Normally..GoodBye.");
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"Netsurf is shutting down Normally..GoodBye.\00"
define void @kolibri_browser_quit() {
%1 = call i32 @debug_board_write_str(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"Netsurf is shutting down Normally..GoodBye.\00"
define void @kolibri_browser_quit() {
%1 = tail call i32 @debug_board_write_str(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}
double baz(double a) {
  return __builtin_pow(a, -1.25) + __builtin_pow(a, 5.75) -
         __builtin_pow(a, 3.375);
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xee6(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec7(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe9c(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  0xede(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xed3(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
call   1030 <pow@plt>
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xebc(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
call   1030 <pow@plt>
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @baz(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, double -1.250000e+00)
%5 = load double, double* %2
%6 = call double @pow(double %5, double 5.750000e+00)
%7 = fadd double %4, %6
%8 = load double, double* %2
%9 = call double @pow(double %8, double 3.375000e+00)
%10 = fsub double %7, %9
ret double %10
}

LLVM IR (-O2):
define double @baz(double %0) {
%2 = tail call double @pow(double %0, double -1.250000e+00)
%3 = tail call double @pow(double %0, double 5.750000e+00)
%4 = fadd double %2, %3
%5 = tail call double @pow(double %0, double 3.375000e+00)
%6 = fsub double %4, %5
ret double %6
}