xunge/DecIR huggingface dataset:
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn53() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn53");
  return result;
}


x86 assembly (clang, -O0):
<fn53>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn53>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn53\00"
define i8* @fn53() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn53\00"
define i8* @fn53() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ explicit_bzero(char *, int);
int main(void) {
  char blah[4];
  explicit_bzero(blah, 4);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <explicit_bzero@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i32 @explicit_bzero(i8* %3, i32 4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @explicit_bzero(i8* %2, i32 4)
ret i32 0
}
int test_imm_8Cuint16_reg(unsigned short val) {
  return ((val) & (0x8C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_8Cuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 140
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
float sqrtf(float);
float rbezier2_norm_w1(float w0, float w1, float w2) {
  return sqrtf((w1 * w1) / (w0 * w2));
}


x86 assembly (clang, -O0):
<rbezier2_norm_w1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
call   1030 <sqrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rbezier2_norm_w1>:
mulss  %xmm1,%xmm1
mulss  %xmm2,%xmm0
divss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jb     112c <rbezier2_norm_w1+0x1c>
xorps  %xmm0,%xmm0
sqrtss %xmm1,%xmm0
ret
movaps %xmm1,%xmm0
jmp    1030 <sqrtf@plt>

LLVM IR (-O0):
define float @rbezier2_norm_w1(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %5
%8 = load float, float* %5
%9 = fmul float %7, %8
%10 = load float, float* %4
%11 = load float, float* %6
%12 = fmul float %10, %11
%13 = fdiv float %9, %12
%14 = call float @sqrtf(float %13)
ret float %14
}

LLVM IR (-O2):
define float @rbezier2_norm_w1(float %0, float %1, float %2) {
%4 = fmul float %1, %1
%5 = fmul float %0, %2
%6 = fdiv float %4, %5
%7 = tail call float @sqrtf(float %6)
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ teardown_parser();
void teardown_awl(void) { teardown_parser(); }


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

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

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

LLVM IR (-O2):
define void @teardown_awl() {
%1 = tail call i32 (...) @teardown_parser()
ret void
}
void gdk_subwindow_mode_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_subwindow_mode_get_type() {
ret void
}
int test03(unsigned short *a, unsigned short *b, int c, int d) {
  if (*a & *b)
    return c;
  return d;
}


x86 assembly (clang, -O0):
<test03>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movzwl (%rax),%eax
mov    -0x18(%rbp),%rcx
movzwl (%rcx),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1136 <test03+0x36>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113c <test03+0x3c>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test03>:
mov    %edx,%eax
movzwl (%rsi),%edx
test   %dx,(%rdi)
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test03(i16* nocapture %0, i16* nocapture %1, i32 %2, i32 %3) {
%5 = load i16, i16* %0
%6 = load i16, i16* %1
%7 = and i16 %6, %5
%8 = icmp eq i16 %7, 0
%9 = select i1 %8, i32 %3, i32 %2
ret i32 %9
}
int kala(int x, ...) { return x; }


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

x86 assembly (clang, -O2):
<kala>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @kala(i32 returned %0, ...) {
ret i32 %0
}
void XGetClassHint() {}


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

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

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

LLVM IR (-O2):
define void @XGetClassHint() {
ret void
}
float sqrtf(float x) {
  __asm__ __volatile__("sqrtss %1, %0" : "=x"(x) : "x"(x));
  return x;
}


x86 assembly (clang, -O0):
<sqrtf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
sqrtss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrtf>:
sqrtss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @sqrtf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float asm sideeffect "sqrtss $1, $0", "=x,x,~{dirflag},~{fpsr},~{flags}"(float %3)
store float %4, float* %2
%5 = load float, float* %2
ret float %5
}

LLVM IR (-O2):
define float @sqrtf(float %0) {
%2 = tail call float asm sideeffect "sqrtss $1, $0", "=x,x,~{dirflag},~{fpsr},~{flags}"(float %0)
ret float %2
}
void VMR3Teleport(void) {}


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

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

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

LLVM IR (-O2):
define void @VMR3Teleport() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR8C_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR8C_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR8C_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int gdt_compare(void const *, void const *);
int gdt_compare_void(const void *p1, const void *p2) {
  return gdt_compare(p1, p2);
}


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

x86 assembly (clang, -O2):
<gdt_compare_void>:
jmp    1030 <gdt_compare@plt>

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

LLVM IR (-O2):
define i32 @gdt_compare_void(i8* %0, i8* %1) {
%3 = tail call i32 @gdt_compare(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ printf(char *);
int main(void) {
  int letra;
  printf("Ingrese un caracter: \n");
  letra = getchar();
  if ((((letra) >= '0') && ((letra) <= '9')) ? 1 : 0)
    printf("Es un dígito.\n");
  else
    printf("No es un dígito.\n");
}


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 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1168 <main+0x48>
cmpl   $0x39,-0x8(%rbp)
jg     1168 <main+0x48>
mov    $0x1,%al
test   $0x1,%al
jne    1177 <main+0x57>
jmp    1188 <main+0x68>
xor    %eax,%eax
test   $0x1,%al
jne    1177 <main+0x57>
jmp    1188 <main+0x68>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    1194 <main+0x74>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%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 <getchar@plt>
add    $0xffffffd0,%eax
cmp    $0xa,%eax
lea    0xee7(%rip),%rax
lea    0xece(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Ingrese un caracter: \0A\00"
@.str.1 = [16 x i8] c"Es un d\C3\ADgito.\0A\00"
@.str.2 = [19 x i8] c"No es un d\C3\ADgito.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 57
br i1 %9, label %10, label %11
10: ; preds = %7
br i1 true, label %12, label %14
11: ; preds = %7, %0
br i1 false, label %12, label %14
12: ; preds = %11, %10
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %16
14: ; preds = %11, %10
%15 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@str = [22 x i8] c"Ingrese un caracter: \00"
@str.3 = [18 x i8] c"No es un d\C3\ADgito.\00"
@str.4 = [15 x i8] c"Es un d\C3\ADgito.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
%3 = add i32 %2, -48
%4 = icmp ult i32 %3, 10
%5 = select i1 %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.3, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret i32 0
}
void g_signal_handler_block() {}


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

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

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

LLVM IR (-O2):
define void @g_signal_handler_block() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ f(int, double, double, double);
int /*<<< orphan*/ g(char *, char *, double, double, int /*<<< orphan*/,
                     int /*<<< orphan*/);
main() {
  g("", "", 1.0, 2.0, f(3, 0.0, 0.0, 0.0), f(4, 0.0, 0.0, 0.0));
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
mov    $0x4,%edi
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <f@plt>
mov    -0x8(%rbp),%edx
mov    %eax,%ecx
lea    0xe9c(%rip),%rsi
movsd  0xe84(%rip),%xmm0
movsd  0xe84(%rip),%xmm1
mov    %rsi,%rdi
call   1040 <g@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
mov    $0x3,%edi
call   1030 <f@plt>
mov    %eax,%ebx
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
mov    $0x4,%edi
call   1030 <f@plt>
lea    0xeb0(%rip),%rdi
movsd  0xe98(%rip),%xmm0
movsd  0xe98(%rip),%xmm1
mov    %rdi,%rsi
mov    %ebx,%edx
mov    %eax,%ecx
call   1040 <g@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 3, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%3 = call i32 @f(i32 4, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%4 = call i32 @g(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double 2.000000e+00, i32 %2, i32 %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = tail call i32 @f(i32 3, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = tail call i32 @f(i32 4, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%3 = tail call i32 @g(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double 2.000000e+00, i32 %1, i32 %2)
%4 = tail call i32 @exit(i32 0)
unreachable
}
SSBREAK(endsds) long *endsds;
{ return (ssbreak(*endsds)); }


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

x86 assembly (clang, -O2):
<SSBREAK>:
mov    (%rdi),%rdi
xor    %eax,%eax
jmp    1030 <ssbreak@plt>

LLVM IR (-O0):
define i32 @SSBREAK(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = call i32 (i64, ...) bitcast (i32 (...)* @ssbreak to i32 (i64, ...)*)(i64 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @SSBREAK(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = tail call i32 (i64, ...) bitcast (i32 (...)* @ssbreak to i32 (i64, ...)*)(i64 %2)
ret i32 %3
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ iso_msg_submit(int, int, int /*<<< orphan*/, char *);
void *iso_alloc_mem(size_t size, size_t count, int flag) {
  void *pt;
  pt = calloc(size, count);
  if (pt == NULL)
    iso_msg_submit(-1, 0xF030FFFA, 0, "Out of virtual memory");
  return pt;
}


x86 assembly (clang, -O0):
<iso_alloc_mem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1167 <iso_alloc_mem+0x47>
mov    $0xffffffff,%edi
mov    $0xf030fffa,%esi
xor    %edx,%edx
lea    0xe9e(%rip),%rcx
call   1040 <iso_msg_submit@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iso_alloc_mem>:
push   %rbx
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <iso_alloc_mem+0x26>
lea    0xecb(%rip),%rcx
mov    $0xffffffff,%edi
mov    $0xf030fffa,%esi
xor    %edx,%edx
call   1040 <iso_msg_submit@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Out of virtual memory\00"
define i8* @iso_alloc_mem(i64 %0, i64 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
%7 = alloca i8*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = call i8* @calloc(i64 %8, i64 %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 @iso_msg_submit(i32 -1, i32 -265224198, i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %3
%16 = load i8*, i8** %7
ret i8* %16
}

LLVM IR (-O2):
@.str = [22 x i8] c"Out of virtual memory\00"
define noalias i8* @iso_alloc_mem(i64 %0, i64 %1, i32 %2) {
%4 = tail call i8* @calloc(i64 %0, i64 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @iso_msg_submit(i32 -1, i32 -265224198, i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i8* %4
}
int test_imm_25uint8_reg(unsigned char val) {
  return ((val) & (-0x25 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_25uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffffdb,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_25uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -37
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ GPIO_map();
int /*<<< orphan*/ GPIO_setInput(int);
int /*<<< orphan*/ GPIO_setOutput(int);
int /*<<< orphan*/ GPIO_unmap();
void setupGPIO() {
  GPIO_unmap();
  GPIO_map();
  GPIO_setInput(17);
  GPIO_setInput(27);
  GPIO_setInput(22);
  GPIO_setInput(5);
  GPIO_setInput(6);
  GPIO_setInput(4);
  GPIO_setOutput(18);
  GPIO_setInput(13);
}


x86 assembly (clang, -O0):
<setupGPIO>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <GPIO_unmap@plt>
mov    $0x0,%al
call   1050 <GPIO_map@plt>
mov    $0x11,%edi
call   1030 <GPIO_setInput@plt>
mov    $0x1b,%edi
call   1030 <GPIO_setInput@plt>
mov    $0x16,%edi
call   1030 <GPIO_setInput@plt>
mov    $0x5,%edi
call   1030 <GPIO_setInput@plt>
mov    $0x6,%edi
call   1030 <GPIO_setInput@plt>
mov    $0x4,%edi
call   1030 <GPIO_setInput@plt>
mov    $0x12,%edi
call   1060 <GPIO_setOutput@plt>
mov    $0xd,%edi
call   1030 <GPIO_setInput@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setupGPIO>:
push   %rax
xor    %eax,%eax
call   1040 <GPIO_unmap@plt>
xor    %eax,%eax
call   1050 <GPIO_map@plt>
mov    $0x11,%edi
call   1030 <GPIO_setInput@plt>
mov    $0x1b,%edi
call   1030 <GPIO_setInput@plt>
mov    $0x16,%edi
call   1030 <GPIO_setInput@plt>
mov    $0x5,%edi
call   1030 <GPIO_setInput@plt>
mov    $0x6,%edi
call   1030 <GPIO_setInput@plt>
mov    $0x4,%edi
call   1030 <GPIO_setInput@plt>
mov    $0x12,%edi
call   1060 <GPIO_setOutput@plt>
mov    $0xd,%edi
pop    %rax
jmp    1030 <GPIO_setInput@plt>

LLVM IR (-O0):
define void @setupGPIO() {
%1 = call i32 (...) @GPIO_unmap()
%2 = call i32 (...) @GPIO_map()
%3 = call i32 @GPIO_setInput(i32 17)
%4 = call i32 @GPIO_setInput(i32 27)
%5 = call i32 @GPIO_setInput(i32 22)
%6 = call i32 @GPIO_setInput(i32 5)
%7 = call i32 @GPIO_setInput(i32 6)
%8 = call i32 @GPIO_setInput(i32 4)
%9 = call i32 @GPIO_setOutput(i32 18)
%10 = call i32 @GPIO_setInput(i32 13)
ret void
}

LLVM IR (-O2):
define void @setupGPIO() {
%1 = tail call i32 (...) @GPIO_unmap()
%2 = tail call i32 (...) @GPIO_map()
%3 = tail call i32 @GPIO_setInput(i32 17)
%4 = tail call i32 @GPIO_setInput(i32 27)
%5 = tail call i32 @GPIO_setInput(i32 22)
%6 = tail call i32 @GPIO_setInput(i32 5)
%7 = tail call i32 @GPIO_setInput(i32 6)
%8 = tail call i32 @GPIO_setInput(i32 4)
%9 = tail call i32 @GPIO_setOutput(i32 18)
%10 = tail call i32 @GPIO_setInput(i32 13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int main(void) {
  kill(getpid(), SIGTERM);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1040 <kill@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1040 <kill@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGTERM = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpid()
%3 = load i32, i32* @SIGTERM
%4 = call i32 @kill(i32 %2, i32 %3)
ret i32 0
}

LLVM IR (-O2):
@SIGTERM = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = load i32, i32* @SIGTERM
%3 = tail call i32 @kill(i32 %1, i32 %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int _spi_transfer(int, int, int /*<<< orphan*/, int /*<<< orphan*/ *, size_t);
int spi_read_regs(int fd, uint8_t addr, uint8_t *data, size_t len) {
  return _spi_transfer(fd, false, addr, data, len);
}


x86 assembly (clang, -O0):
<spi_read_regs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
xor    %esi,%esi
call   1030 <_spi_transfer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_read_regs>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <_spi_transfer@plt>

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

LLVM IR (-O2):
define i32 @spi_read_regs(i32 %0, i32 %1, i32* %2, i64 %3) {
%5 = tail call i32 @_spi_transfer(i32 %0, i32 0, i32 %1, i32* %2, i64 %3)
ret i32 %5
}
void INT_Excep_SRC_ODFI(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SRC_ODFI() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void endDescribeFunHeader() {
  printf(" * \n");
  printf(" ********************************************************/\n");
  printf("\n\n");
}


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

x86 assembly (clang, -O2):
<endDescribeFunHeader>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0f(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [5 x i8] c" * \0A\00"
@.str.1 = [60 x i8] c" ********************************************************/\0A\00"
@.str.2 = [3 x i8] c"\0A\0A\00"
define void @endDescribeFunHeader() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [4 x i8] c" * \00"
@str.3 = [59 x i8] c" ********************************************************/\00"
@str.4 = [2 x i8] c"\0A\00"
define void @endDescribeFunHeader() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int main(int argc, char **buffer) {
  char buf[10] = "hello";
  int cmp;
  if ((cmp = strcmp(buf, "hello")))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x1a(%rbp)
mov    0xed0(%rip),%ax
mov    %ax,-0x12(%rbp)
lea    -0x1a(%rbp),%rdi
lea    0xec3(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x20(%rbp)
cmp    $0x0,%eax
je     1164 <main+0x54>
movl   $0x1,-0x4(%rbp)
jmp    116b <main+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void foo465(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo465(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
void quz() { va_list y; }


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

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

LLVM IR (-O0):
define void @quz() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @quz() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a, b;
  a = 10;
  b = 20;
  printf("The first value is %d and the second is %d\n", a, b);
  a = a + b;
  b = a - b;
  a = a - b;
  printf("The first value is %d and the second is %d", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec5(%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
mov    $0xa,%esi
mov    $0x14,%edx
call   1030 <printf@plt>
lea    0xefe(%rip),%rdi
mov    $0x14,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"The first value is %d and the second is %d\0A\00"
@.str.1 = [43 x i8] c"The first value is %d and the second is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 20, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = sub nsw i32 %13, %14
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"The first value is %d and the second is %d\0A\00"
@.str.1 = [43 x i8] c"The first value is %d and the second is %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 10, i32 20)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 20, i32 10)
ret i32 0
}
void XdbeDeallocateBackBufferName() {}


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

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

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

LLVM IR (-O2):
define void @XdbeDeallocateBackBufferName() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
int main(void) {
  char *s = "hello world\n";
  write(1, s, strlen(s));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"hello world\0A\00"
define i32 @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int io_arch_puts(char *data, int size) {
  int i = 0;
  for (; i < size; i++) {
    putchar(data[i]);
  }
  return i;
}


x86 assembly (clang, -O0):
<io_arch_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <io_arch_puts+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <io_arch_puts+0x16>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_arch_puts>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <io_arch_puts+0x35>
mov    %esi,%r14d
mov    %rdi,%r15
mov    %esi,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl (%r15,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1130 <io_arch_puts+0x20>
jmp    1148 <io_arch_puts+0x38>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @io_arch_puts(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @putchar(i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = phi i32 [ 0, %2 ], [ %1, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ omap_enable_layer(int);
int /*<<< orphan*/ xenv_minimize();
void plat_minimize(void) {
  omap_enable_layer(0);
  xenv_minimize();
  omap_enable_layer(1);
}


x86 assembly (clang, -O0):
<plat_minimize>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <omap_enable_layer@plt>
mov    $0x0,%al
call   1030 <xenv_minimize@plt>
mov    $0x1,%edi
call   1040 <omap_enable_layer@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<plat_minimize>:
push   %rax
xor    %edi,%edi
call   1040 <omap_enable_layer@plt>
xor    %eax,%eax
call   1030 <xenv_minimize@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <omap_enable_layer@plt>

LLVM IR (-O0):
define void @plat_minimize() {
%1 = call i32 @omap_enable_layer(i32 0)
%2 = call i32 (...) @xenv_minimize()
%3 = call i32 @omap_enable_layer(i32 1)
ret void
}

LLVM IR (-O2):
define void @plat_minimize() {
%1 = tail call i32 @omap_enable_layer(i32 0)
%2 = tail call i32 (...) @xenv_minimize()
%3 = tail call i32 @omap_enable_layer(i32 1)
ret void
}
void ps_bead(x, y) int x, y;
{}


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

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

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

LLVM IR (-O2):
define void @ps_bead(i32 %0, i32 %1) {
ret void
}
unsigned short ntob16(char *data) {
  unsigned short val;
  unsigned char *c = (unsigned char *)data;
  val = (c[0] << 8) | (c[1]);
  return val;
}


x86 assembly (clang, -O0):
<ntob16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x18(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntob16>:
movzwl (%rdi),%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @ntob16(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 8
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = or i32 %10, %14
%16 = trunc i32 %15 to i16
store i16 %16, i16* %3
%17 = load i16, i16* %3
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @ntob16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = shl nuw i16 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = or i16 %4, %7
ret i16 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ be16toh(int /*<<< orphan*/);
uint16_t _be16toh(uint16_t value) { return be16toh(value); }


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

x86 assembly (clang, -O2):
<_be16toh>:
jmp    1030 <be16toh@plt>

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

LLVM IR (-O2):
define i32 @_be16toh(i32 %0) {
%2 = tail call i32 @be16toh(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ mysql_library_end();
void storage_close() { mysql_library_end(); }


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

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

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

LLVM IR (-O2):
define void @storage_close() {
%1 = tail call i32 (...) @mysql_library_end()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_fib(int n) {
  int a = 0;
  int b = 1;
  while (a < n) {
    int old_a = a;
    printf("%d ", a);
    a = b;
    b = old_a + b;
  }
}


x86 assembly (clang, -O0):
<print_fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115e <print_fib+0x4e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <print_fib+0x19>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_fib>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <print_fib+0x37>
mov    %edi,%r15d
mov    $0x1,%ebp
xor    %ebx,%ebx
lea    0xed4(%rip),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
add    %ebp,%eax
mov    %ebp,%ebx
cmp    %r15d,%ebp
mov    %eax,%ebp
jl     1130 <print_fib+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_fib(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ 1, %1 ]
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%7 = add nsw i32 %4, %5
%8 = icmp slt i32 %5, %0
br i1 %8, label %3, label %9
9: ; preds = %3, %1
ret void
}
/* Variables and functions */
int sinh(double);
double csch(double n) {
  if (sinh(n) == 0) {
    return 0. / 0.;
  }
  return 1 / sinh(n);
}


x86 assembly (clang, -O0):
<csch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sinh@plt>
cmp    $0x0,%eax
jne    1142 <csch+0x32>
movsd  0xec8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115f <csch+0x4f>
movsd  -0x10(%rbp),%xmm0
call   1030 <sinh@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csch>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <sinh@plt>
test   %eax,%eax
je     113d <csch+0x2d>
movsd  (%rsp),%xmm0
call   1030 <sinh@plt>
lea    0x1(%rax),%ecx
xor    %edx,%edx
cmp    $0x3,%ecx
cmovb  %eax,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
pop    %rax
ret
movsd  0xebb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @csch(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = call i32 @sinh(double %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store double 0x7FF8000000000000, double* %2
br label %13
8: ; preds = %1
%9 = load double, double* %3
%10 = call i32 @sinh(double %9)
%11 = sdiv i32 1, %10
%12 = sitofp i32 %11 to double
store double %12, double* %2
br label %13
13: ; preds = %8, %7
%14 = load double, double* %2
ret double %14
}

LLVM IR (-O2):
define double @csch(double %0) {
%2 = tail call i32 @sinh(double %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = tail call i32 @sinh(double %0)
%6 = add i32 %5, 1
%7 = icmp ult i32 %6, 3
%8 = select i1 %7, i32 %5, i32 0
%9 = sitofp i32 %8 to double
br label %10
10: ; preds = %1, %4
%11 = phi double [ %9, %4 ], [ 0x7FF8000000000000, %1 ]
ret double %11
}
void z2dtostr(buf, val) char buf[];
int val;
{ sprintf(buf, "%02d", val); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%02d\00"
define void @z2dtostr(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int __simc(int, int, int, int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ wmb();
int simc_open(const char *file, int flags, int mode) {
  wmb();
  return __simc(5, (int)file, flags, mode, 0, 0);
}


x86 assembly (clang, -O0):
<simc_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0x0,%al
call   1030 <wmb@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0x5,%edi
xor    %r9d,%r9d
mov    %r9d,%r8d
call   1040 <__simc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simc_open>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <wmb@plt>
mov    $0x5,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <__simc@plt>

LLVM IR (-O0):
define i32 @simc_open(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 = call i32 (...) @wmb()
%8 = load i8*, i8** %4
%9 = ptrtoint i8* %8 to i32
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 @__simc(i32 5, i32 %9, i32 %10, i32 %11, i32 0, i32 0)
ret i32 %12
}

LLVM IR (-O2):
define i32 @simc_open(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @wmb()
%5 = ptrtoint i8* %0 to i64
%6 = trunc i64 %5 to i32
%7 = tail call i32 @__simc(i32 5, i32 %6, i32 %1, i32 %2, i32 0, i32 0)
ret i32 %7
}