xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *);
void Fail_Ret(void) {
  Inst_Printf("test", "%%rax,%%rax");
  Inst_Printf("je", "fail");
}


x86 assembly (clang, -O0):
<Fail_Ret>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee3(%rip),%rsi
call   1030 <Inst_Printf@plt>
lea    0xee3(%rip),%rdi
lea    0xedf(%rip),%rsi
call   1030 <Inst_Printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fail_Ret>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee6(%rip),%rsi
call   1030 <Inst_Printf@plt>
lea    0xee6(%rip),%rdi
lea    0xee2(%rip),%rsi
pop    %rax
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"test\00"
@.str.1 = [12 x i8] c"%%rax,%%rax\00"
@.str.2 = [3 x i8] c"je\00"
@.str.3 = [5 x i8] c"fail\00"
define void @Fail_Ret() {
%1 = call i32 @Inst_Printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"test\00"
@.str.1 = [12 x i8] c"%%rax,%%rax\00"
@.str.2 = [3 x i8] c"je\00"
@.str.3 = [5 x i8] c"fail\00"
define void @Fail_Ret() {
%1 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
void write_uint16(void *dst, uint16_t data) {
  uint8_t *p = (uint8_t *)dst;
  p[0] = (uint8_t)((data >> 8) & 0xff);
  p[1] = (uint8_t)(data & 0xff);
}


x86 assembly (clang, -O0):
<write_uint16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_uint16>:
mov    %esi,%eax
movzbl %ah,%ecx
mov    %rcx,(%rdi)
movzbl %al,%eax
mov    %rax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @write_uint16(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i64*
store i64* %7, i64** %5
%8 = load i32, i32* %4
%9 = ashr i32 %8, 8
%10 = and i32 %9, 255
%11 = sext i32 %10 to i64
%12 = load i64*, i64** %5
%13 = getelementptr inbounds i64, i64* %12, i64 0
store i64 %11, i64* %13
%14 = load i32, i32* %4
%15 = and i32 %14, 255
%16 = sext i32 %15 to i64
%17 = load i64*, i64** %5
%18 = getelementptr inbounds i64, i64* %17, i64 1
store i64 %16, i64* %18
ret void
}

LLVM IR (-O2):
define void @write_uint16(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i64*
%4 = lshr i32 %1, 8
%5 = and i32 %4, 255
%6 = zext i32 %5 to i64
store i64 %6, i64* %3
%7 = and i32 %1, 255
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 8
%10 = bitcast i8* %9 to i64*
store i64 %8, i64* %10
ret void
}
int test_imm_FFint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xFF << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_FFint64_midword_mem>:
cmpb   $0x0,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FFint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 16711680
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
__attribute__((always_)) void tu_addch(int c) { putchar(c); }


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

x86 assembly (clang, -O2):
<tu_addch>:
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @tu_addch(i32 %0) {
%2 = tail call i32 @putchar(i32 %0)
ret void
}
/* Variables and functions */
char *capture(char const *, char *);
char *get_name(const char *rawString, int sym_link) {
  char *res;
  char *regexString;
  if (!sym_link)
    regexString = "/([^/]*)[\r\n]$";
  else
    regexString = "/([^/]* -> [^\r\n]*)";
  res = capture(rawString, regexString);
  return res;
}


x86 assembly (clang, -O0):
<get_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1139 <get_name+0x29>
lea    0xed0(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    1144 <get_name+0x34>
lea    0xece(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <capture@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_name>:
test   %esi,%esi
lea    0xee7(%rip),%rax
lea    0xeee(%rip),%rsi
cmove  %rax,%rsi
jmp    1030 <capture@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"/([^/]*)[\0D\0A]$\00"
@.str.1 = [19 x i8] c"/([^/]* -> [^\0D\0A]*)\00"
define i8* @get_name(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %2
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %6
br label %11
10: ; preds = %2
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8** %6
br label %11
11: ; preds = %10, %9
%12 = load i8*, i8** %3
%13 = load i8*, i8** %6
%14 = call i8* @capture(i8* %12, i8* %13)
store i8* %14, i8** %5
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [14 x i8] c"/([^/]*)[\0D\0A]$\00"
@.str.1 = [19 x i8] c"/([^/]* -> [^\0D\0A]*)\00"
define i8* @get_name(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i8* @capture(i8* %0, i8* %4)
ret i8* %5
}
R0RX1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if (r0 <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<R0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movzwl -0x6(%rbp),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movzwl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     1143 <R0RX1+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <R0RX1+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<R0RX1>:
movzwl %di,%edx
movslq %ecx,%rax
movzwl (%r9,%rax,2),%ecx
xor    %eax,%eax
cmp    %ecx,%edx
setbe  %al
ret

LLVM IR (-O0):
define i32 @R0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16, i16* %8
%17 = zext i16 %16 to i32
%18 = load i16*, i16** %13
%19 = load i32, i32* %11
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i16, i16* %18, i64 %20
%22 = load i16, i16* %21
%23 = zext i16 %22 to i32
%24 = icmp sle i32 %17, %23
br i1 %24, label %25, label %26
25: ; preds = %6
store i32 1, i32* %7
br label %27
26: ; preds = %6
store i32 0, i32* %7
br label %27
27: ; preds = %26, %25
%28 = load i32, i32* %7
ret i32 %28
}

LLVM IR (-O2):
define i32 @R0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = and i32 %0, 65535
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i16, i16* %5, i64 %8
%10 = load i16, i16* %9
%11 = zext i16 %10 to i32
%12 = icmp ule i32 %7, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_panic__();
void clar__fail(const char *file, int line, const char *error,
                const char *description, int should_abort) {
  if (should_abort)
    __coverity_panic__();
}


x86 assembly (clang, -O0):
<clar__fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     113c <clar__fail+0x2c>
mov    $0x0,%al
call   1030 <__coverity_panic__@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clar__fail>:
test   %r8d,%r8d
je     111c <clar__fail+0xc>
xor    %eax,%eax
jmp    1030 <__coverity_panic__@plt>
ret

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

LLVM IR (-O2):
define void @clar__fail(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i32 %4) {
%6 = icmp eq i32 %4, 0
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = tail call i32 (...) @__coverity_panic__()
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int pow(int, int);
float param(int x) { return (4 * pow(x, 3)) / 3 * 3.14159265358979323846; }


x86 assembly (clang, -O0):
<param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   1030 <pow@plt>
shl    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  0xec1(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<param>:
push   %rax
mov    $0x3,%esi
call   1030 <pow@plt>
shl    $0x2,%eax
cltq
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
mulsd  0xec0(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @param(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @pow(i32 %3, i32 3)
%5 = mul nsw i32 4, %4
%6 = sdiv i32 %5, 3
%7 = sitofp i32 %6 to double
%8 = fmul double %7, 0x400921FB54442D18
%9 = fptrunc double %8 to float
ret float %9
}

LLVM IR (-O2):
define float @param(i32 %0) {
%2 = tail call i32 @pow(i32 %0, i32 3)
%3 = shl nsw i32 %2, 2
%4 = sdiv i32 %3, 3
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 0x400921FB54442D18
%7 = fptrunc double %6 to float
ret float %7
}
int css_is_space(int ch) {
  return (ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t');
}


x86 assembly (clang, -O0):
<css_is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <css_is_space+0x3e>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <css_is_space+0x3e>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <css_is_space+0x3e>
cmpl   $0x9,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<css_is_space>:
cmp    $0x20,%edi
ja     111d <css_is_space+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100002400,%rdx
bt     %rcx,%rdx
jae    111d <css_is_space+0x1d>
ret
xor    %eax,%eax
cmp    $0x9,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @css_is_space(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 10, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 9
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *strdp(char *s) {
  char *p;
  p = (char *)malloc(strlen(s) + 1);
  if (p != NULL)
    strcpy(p, s);
  return p;
}


x86 assembly (clang, -O0):
<strdp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116d <strdp+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdp>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <strdp+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdp(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = load i8*, i8** %2
%14 = call i32 @strcpy(i8* %12, i8* %13)
br label %15
15: ; preds = %11, %1
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define i8* @strdp(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @strcpy(i8* %5, i8* %0)
br label %9
9: ; preds = %7, %1
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void print_error_info(const char *msg) {
  fprintf(stderr, "%s\n", msg);
  fprintf(stderr, "ERROR INFO: %s\n", strerror(errno));
}


x86 assembly (clang, -O0):
<print_error_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_error_info>:
push   %rbx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rbx
mov    (%rbx),%edi
lea    0xed8(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%ebx
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xeb0(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [16 x i8] c"ERROR INFO: %s\0A\00"
@errno = global i32 0
define void @print_error_info(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = load i32, i32* @errno
%8 = call i8* @strerror(i32 %7)
%9 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [16 x i8] c"ERROR INFO: %s\0A\00"
@errno = global i32 0
define void @print_error_info(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = load i32, i32* @errno
%6 = tail call i8* @strerror(i32 %5)
%7 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret void
}
int f4_Skel(int *argTypes, void **args) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @f4_Skel(i32* nocapture readnone %0, i8** nocapture readnone %1) {
ret i32 -1
}
long long test(int *A, int *B) { return A - B; }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
mov    %rdi,%rax
sub    %rsi,%rax
sar    $0x2,%rax
ret

LLVM IR (-O0):
define i64 @test(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = ptrtoint i32* %5 to i64
%8 = ptrtoint i32* %6 to i64
%9 = sub i64 %7, %8
%10 = sdiv exact i64 %9, 4
ret i64 %10
}

LLVM IR (-O2):
define i64 @test(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = sub i64 %3, %4
%6 = ashr exact i64 %5, 2
ret i64 %6
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int create_quaddobl_homotopy(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(182, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<create_quaddobl_homotopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xb6,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_quaddobl_homotopy>:
mov    $0xb6,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @create_quaddobl_homotopy() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 182, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @create_quaddobl_homotopy() {
%1 = tail call i32 @_ada_use_c2phc(i32 182, i32* undef, i32* undef, double* undef)
ret i32 %1
}
int mobilitycheck_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mobilitycheck_shutdown() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ notify_pvcall(char *);
int pvSetYBinning(char byBoardNum, short wPixelsBinned) {
  notify_pvcall("f");
  return (0);
}


x86 assembly (clang, -O0):
<pvSetYBinning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
lea    0xed4(%rip),%rdi
call   1030 <notify_pvcall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"f\00"
define i32 @pvSetYBinning(i8 signext %0, i16 signext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"f\00"
define i32 @pvSetYBinning(i8 signext %0, i16 signext %1) {
%3 = tail call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  if (argc > 1) {
    printf("Hello %s\n", argv[1]);
  } else {
    printf("Hello Cleveland\n");
  }
  return argc - 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    114b <main+0x3b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1159 <main+0x49>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
cmp    $0x2,%edi
jl     113c <main+0x1c>
mov    0x8(%rsi),%rsi
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1148 <main+0x28>
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
add    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"Hello %s\0A\00"
@str = [16 x i8] c"Hello Cleveland\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %10
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %4
%11 = add nsw i32 %0, -1
ret i32 %11
}
/* Variables and functions */
scalar_t__ strncmp(char const *, char const *, size_t);
bool strneq(const char *s1, const char *s2, size_t len) {
  return strncmp(s1, s2, len) == 0;
}


x86 assembly (clang, -O0):
<strneq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strneq>:
push   %rax
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @strneq(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i64 @strncmp(i8* %7, i8* %8, i64 %9)
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @strneq(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i64 %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
void __pthread_unwind_next_2(struct __ptcb *__cb) {
  __asm__ __volatile__("call __pthread_unwind_next"
                       :
                       : "a"(__cb)
                       : "ecx", "edx", "memory");
}


x86 assembly (clang, -O0):
<__pthread_unwind_next_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
call   1030 <__pthread_unwind_next@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__pthread_unwind_next_2>:
mov    %rdi,%rax
call   1030 <__pthread_unwind_next@plt>
ret

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

LLVM IR (-O2):
%struct.__ptcb = type opaque
define void @__pthread_unwind_next_2(%struct.__ptcb* %0) {
tail call void asm sideeffect "call __pthread_unwind_next", "{ax},~{ecx},~{edx},~{memory},~{dirflag},~{fpsr},~{flags}"(%struct.__ptcb* %0)
ret void
}
int main(int argc, char **argv) {
  int r = argc + 1;
  return r;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = add nsw i32 %0, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ xa();
int /*<<< orphan*/ xb();
int main2() {
  xa();
  xb();
}


x86 assembly (clang, -O0):
<main2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <xa@plt>
mov    $0x0,%al
call   1030 <xb@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main2() {
%1 = tail call i32 (...) @xa()
%2 = tail call i32 (...) @xb()
ret i32 undef
}
int function_int(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @function_int() {
ret i32 0
}
unsigned isSorted(int *array, unsigned length) {
  for (unsigned i = 0; i < length - 1; ++i)
    if (array[i] > array[i + 1])
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isSorted>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jae    1161 <isSorted+0x61>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%edx
add    $0x1,%edx
mov    %edx,%edx
cmp    (%rcx,%rdx,4),%eax
jle    114e <isSorted+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1168 <isSorted+0x68>
jmp    1153 <isSorted+0x53>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <isSorted+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSorted>:
add    $0xffffffff,%esi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,%rcx
cmp    %rax,%rsi
je     1125 <isSorted+0x25>
mov    (%rdi,%rcx,4),%edx
lea    0x1(%rcx),%rax
cmp    0x4(%rdi,%rcx,4),%edx
jle    1110 <isSorted+0x10>
xor    %eax,%eax
cmp    %rsi,%rcx
setae  %al
ret

LLVM IR (-O0):
define i32 @isSorted(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %27, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = sub i32 %9, 1
%11 = icmp ult i32 %8, %10
br i1 %11, label %12, label %30
12: ; preds = %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %6
%20 = add i32 %19, 1
%21 = zext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %18, i64 %21
%23 = load i32, i32* %22
%24 = icmp sgt i32 %17, %23
br i1 %24, label %25, label %26
25: ; preds = %12
store i32 0, i32* %3
br label %31
26: ; preds = %12
br label %27
27: ; preds = %26
%28 = load i32, i32* %6
%29 = add i32 %28, 1
store i32 %29, i32* %6
br label %7
30: ; preds = %7
store i32 1, i32* %3
br label %31
31: ; preds = %30, %25
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
define i32 @isSorted(i32* nocapture %0, i32 %1) {
%3 = add i32 %1, -1
%4 = zext i32 %3 to i64
br label %5
5: ; preds = %8, %2
%6 = phi i64 [ %11, %8 ], [ 0, %2 ]
%7 = icmp eq i64 %6, %4
br i1 %7, label %15, label %8
8: ; preds = %5
%9 = getelementptr inbounds i32, i32* %0, i64 %6
%10 = load i32, i32* %9
%11 = add nuw nsw i64 %6, 1
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = icmp sgt i32 %10, %13
br i1 %14, label %15, label %5
15: ; preds = %8, %5
%16 = icmp uge i64 %6, %4
%17 = zext i1 %16 to i32
ret i32 %17
}
void register_fpe_functions() {}


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

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

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

LLVM IR (-O2):
define void @register_fpe_functions() {
ret void
}
/* Type definitions */
struct vmfile {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vmfile_alloc(struct vmfile *, size_t);
void *vmfile_data_ofs(struct vmfile *, int /*<<< orphan*/);
void *vmfile_allocptr(struct vmfile *vmb, size_t n) {
  return vmfile_data_ofs(vmb, vmfile_alloc(vmb, n));
}


x86 assembly (clang, -O0):
<vmfile_allocptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <vmfile_alloc@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <vmfile_data_ofs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vmfile_allocptr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vmfile_alloc@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <vmfile_data_ofs@plt>

LLVM IR (-O0):
%struct.vmfile = type { i32 }
define i8* @vmfile_allocptr(%struct.vmfile* %0, i64 %1) {
%3 = alloca %struct.vmfile*
%4 = alloca i64
store %struct.vmfile* %0, %struct.vmfile** %3
store i64 %1, i64* %4
%5 = load %struct.vmfile*, %struct.vmfile** %3
%6 = load %struct.vmfile*, %struct.vmfile** %3
%7 = load i64, i64* %4
%8 = call i32 @vmfile_alloc(%struct.vmfile* %6, i64 %7)
%9 = call i8* @vmfile_data_ofs(%struct.vmfile* %5, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
%struct.vmfile = type { i32 }
define i8* @vmfile_allocptr(%struct.vmfile* %0, i64 %1) {
%3 = tail call i32 @vmfile_alloc(%struct.vmfile* %0, i64 %1)
%4 = tail call i8* @vmfile_data_ofs(%struct.vmfile* %0, i32 %3)
ret i8* %4
}
/* Variables and functions */
int l_getCoords(char *, int, int, long, int);
scalar_t__ tt_chktop(int *, long *);
int tt_getCoords(char *buf, int maxLen, int table, long top, int n) {
  *buf = '\0';
  if (tt_chktop(&table, &top))
    return -5;
  return l_getCoords(buf, maxLen, table, top, n);
}


x86 assembly (clang, -O0):
<tt_getCoords>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <tt_chktop@plt>
cmp    $0x0,%rax
je     1164 <tt_getCoords+0x44>
movl   $0xfffffffb,-0x4(%rbp)
jmp    117e <tt_getCoords+0x5e>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1040 <l_getCoords@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tt_getCoords>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %r8d,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %edx,0x4(%rsp)
mov    %rcx,0x8(%rsp)
movb   $0x0,(%rdi)
lea    0x4(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <tt_chktop@plt>
mov    %rax,%rcx
mov    $0xfffffffb,%eax
test   %rcx,%rcx
jne    116e <tt_getCoords+0x4e>
mov    0x4(%rsp),%edx
mov    0x8(%rsp),%rcx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%r8d
call   1040 <l_getCoords@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @tt_getCoords(i8* %0, i32 %1, i32 %2, i64 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i64
store i32 %2, i32* %6
store i64 %3, i64* %7
store i8 0, i8* %0
%8 = call i64 @tt_chktop(i32* %6, i64* %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = load i32, i32* %6
%12 = load i64, i64* %7
%13 = call i32 @l_getCoords(i8* %0, i32 %1, i32 %11, i64 %12, i32 %4)
br label %14
14: ; preds = %5, %10
%15 = phi i32 [ %13, %10 ], [ -5, %5 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
double cputime(void) {
  double current_time;
  fprintf(stderr, "\nERROR: Timing routines not available\n\n");
  current_time = 0.0;
  return (current_time);
}


x86 assembly (clang, -O0):
<cputime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
call   1030 <fprintf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cputime>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"\0AERROR: Timing routines not available\0A\0A\00"
define double @cputime() {
%1 = alloca double
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
store double 0.000000e+00, double* %1
%4 = load double, double* %1
ret double %4
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"\0AERROR: Timing routines not available\0A\0A\00"
define double @cputime() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char const *,
                           char *);
int /*<<< orphan*/ stderr;
int _servid_error(char const *message, int ret) {
  fprintf(stderr, "%s: %s: %s\n", "servid", message, "Service not found");
  return ret;
}


x86 assembly (clang, -O0):
<_servid_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rcx
lea    0xecd(%rip),%rsi
lea    0xed2(%rip),%rdx
lea    0xed2(%rip),%r8
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_servid_error>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rcx
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
lea    0xedf(%rip),%rdx
lea    0xedf(%rip),%r8
call   1030 <fprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"%s: %s: %s\0A\00"
@.str.1 = [7 x i8] c"servid\00"
@.str.2 = [18 x i8] c"Service not found\00"
define i32 @_servid_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"%s: %s: %s\0A\00"
@.str.1 = [7 x i8] c"servid\00"
@.str.2 = [18 x i8] c"Service not found\00"
define i32 @_servid_error(i8* %0, i32 returned %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
ret i32 %1
}
int lib1t32(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @lib1t32() {
ret i32 2
}

LLVM IR (-O2):
define i32 @lib1t32() {
ret i32 2
}
/* Variables and functions */
float RAND_MAX;
scalar_t__ rand();
int bcnn_rand_between(int min, int max) {
  if (min > max) {
    return 0.f;
  }
  return (int)(((float)rand() / RAND_MAX * (max - min)) + min + 0.5f);
}


x86 assembly (clang, -O0):
<bcnn_rand_between>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1136 <bcnn_rand_between+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1177 <bcnn_rand_between+0x67>
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2e9f(%rip),%rax
divss  (%rax),%xmm0
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm2
cvtsi2ssl -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xe94(%rip),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcnn_rand_between>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
xor    %eax,%eax
sub    %edi,%ebp
jl     1153 <bcnn_rand_between+0x43>
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2eb8(%rip),%rax
divss  (%rax),%xmm0
cvtsi2ss %ebp,%xmm1
mulss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
addss  %xmm1,%xmm0
addss  0xeb1(%rip),%xmm0
cvttss2si %xmm0,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@RAND_MAX = global float 0.000000e+00
define i32 @bcnn_rand_between(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 0, i32* %3
br label %24
10: ; preds = %2
%11 = call i64 (...) @rand()
%12 = sitofp i64 %11 to float
%13 = load float, float* @RAND_MAX
%14 = fdiv float %12, %13
%15 = load i32, i32* %5
%16 = load i32, i32* %4
%17 = sub nsw i32 %15, %16
%18 = sitofp i32 %17 to float
%19 = load i32, i32* %4
%20 = sitofp i32 %19 to float
%21 = call float @llvm.fmuladd.f32(float %14, float %18, float %20)
%22 = fadd float %21, 5.000000e-01
%23 = fptosi float %22 to i32
store i32 %23, i32* %3
br label %24
24: ; preds = %10, %9
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@RAND_MAX = global float 0.000000e+00
define i32 @bcnn_rand_between(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
br i1 %3, label %15, label %4
4: ; preds = %2
%5 = tail call i64 (...) @rand()
%6 = sitofp i64 %5 to float
%7 = load float, float* @RAND_MAX
%8 = fdiv float %6, %7
%9 = sub nsw i32 %1, %0
%10 = sitofp i32 %9 to float
%11 = sitofp i32 %0 to float
%12 = tail call float @llvm.fmuladd.f32(float %8, float %10, float %11)
%13 = fadd float %12, 5.000000e-01
%14 = fptosi float %13 to i32
br label %15
15: ; preds = %2, %4
%16 = phi i32 [ %14, %4 ], [ 0, %2 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int islower(int);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int ls_islower(int c) {
  int ret;
  setlocale(LC_ALL, "");
  ret = islower(c);
  setlocale(LC_ALL, "C");
  return ret;
}


x86 assembly (clang, -O0):
<ls_islower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1040 <setlocale@plt>
mov    -0x4(%rbp),%edi
call   1030 <islower@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
call   1040 <setlocale@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_islower>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2eb3(%rip),%r14
mov    (%r14),%edi
lea    0xeca(%rip),%rsi
call   1040 <setlocale@plt>
mov    %ebx,%edi
call   1030 <islower@plt>
mov    %eax,%ebx
mov    (%r14),%edi
lea    0xeb1(%rip),%rsi
call   1040 <setlocale@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"C\00"
define i32 @ls_islower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @LC_ALL
%5 = call i32 @setlocale(i32 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 @islower(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* @LC_ALL
%9 = call i32 @setlocale(i32 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"C\00"
define i32 @ls_islower(i32 %0) {
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @islower(i32 %0)
%5 = load i32, i32* @LC_ALL
%6 = tail call i32 @setlocale(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 %4
}
int xdiv(int n, int x) {
  if (x == 0)
    return n;
  return n / x;
}


x86 assembly (clang, -O0):
<xdiv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    111f <xdiv+0x1f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1129 <xdiv+0x29>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdiv>:
mov    %edi,%eax
test   %esi,%esi
je     1109 <xdiv+0x9>
cltd
idiv   %esi
ret

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

LLVM IR (-O2):
define i32 @xdiv(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = sdiv i32 %0, %1
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ %0, %2 ]
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __builtin_wrctl(int, int);
void _Nios2_Set_ctlreg_tlbmisc(uint32_t value) {
  __builtin_wrctl(10, (int)value);
}


x86 assembly (clang, -O0):
<_Nios2_Set_ctlreg_tlbmisc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%esi
mov    $0xa,%edi
call   1030 <__builtin_wrctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Nios2_Set_ctlreg_tlbmisc>:
mov    %rdi,%rsi
mov    $0xa,%edi
jmp    1030 <__builtin_wrctl@plt>

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

LLVM IR (-O2):
define void @_Nios2_Set_ctlreg_tlbmisc(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @__builtin_wrctl(i32 10, i32 %2)
ret void
}
void foo448(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo448(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
int /*<<< orphan*/ remove(char const *);
void pickle_delete(const char *filename) {
  assert(filename);
  remove(filename);
}


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

x86 assembly (clang, -O2):
<pickle_delete>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <remove@plt>

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

LLVM IR (-O2):
define void @pickle_delete(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i32 @remove(i8* %0)
ret void
}