xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int t = 0;
  scanf("%d", &t);
  int square = t * t;
  int squareTwo = t * t * t;
  printf("%d\n", square);
  printf("%d", squareTwo);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xece(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebp
mov    %ebp,%esi
imul   %ebp,%esi
imul   %esi,%ebp
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long);
void STEST905(long long v) {
  printf("sub  (test15f - C905): Call by value long long literal: "
         "(%13lld=1234567890123)\n",
         v);
  v = v - 3;
  printf("sub  (test15f - C905): Call by value long long literal: "
         "(%13lld=1234567890120)\n",
         v);
}


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

x86 assembly (clang, -O2):
<STEST905>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0xfffffffffffffffd,%rbx
lea    0xf22(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [80 x i8] c"sub (test15f - C905): Call by value long long literal: (%13lld=1234567890123)\0A\00"
@.str.1 = [80 x i8] c"sub (test15f - C905): Call by value long long literal: (%13lld=1234567890120)\0A\00"
define void @STEST905(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i64 %3)
%5 = load i64, i64* %2
%6 = sub nsw i64 %5, 3
store i64 %6, i64* %2
%7 = load i64, i64* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0), i64 %7)
ret void
}

LLVM IR (-O2):
@.str = [80 x i8] c"sub (test15f - C905): Call by value long long literal: (%13lld=1234567890123)\0A\00"
@.str.1 = [80 x i8] c"sub (test15f - C905): Call by value long long literal: (%13lld=1234567890120)\0A\00"
define void @STEST905(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i64 %0)
%3 = add nsw i64 %0, -3
%4 = tail call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0), i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atexit(void (*)());
void PfmMarshallerRegisterAtExit(void (*func)(void)) { atexit(func); }


x86 assembly (clang, -O0):
<PfmMarshallerRegisterAtExit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1130 <atexit>
add    $0x10,%rsp
pop    %rbp
ret
nopl   0x0(%rax,%rax,1)

x86 assembly (clang, -O2):
<PfmMarshallerRegisterAtExit>:
jmp    1120 <atexit>
cs nopw 0x0(%rax,%rax,1)
nop

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

LLVM IR (-O2):
define void @PfmMarshallerRegisterAtExit(void ()* %0) {
%2 = bitcast void ()* %0 to void (...)*
%3 = tail call i32 @atexit(void (...)* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ kill(int /*<<< orphan*/, int);
void c_kill_(pid_t *pid, int *sig) { kill(*pid, *sig); }


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

x86 assembly (clang, -O2):
<c_kill_>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <kill@plt>

LLVM IR (-O0):
define void @c_kill_(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = call i32 @kill(i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @c_kill_(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = tail call i32 @kill(i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int any_decrqss(char const *, char *);
int rpt_DECSCPP(const char *the_title) { return any_decrqss(the_title, "$|"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"$|\00"
define i32 @rpt_DECSCPP(i8* %0) {
%2 = tail call i32 @any_decrqss(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ TESTNAME();
int main(void) {
  TESTNAME();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @TESTNAME()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @TESTNAME()
ret i32 0
}
float kmDegreesToRadians(float degrees) {
  return degrees * (3.14159265358979323846f / 180.0f);
}


x86 assembly (clang, -O0):
<kmDegreesToRadians>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmDegreesToRadians>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @kmDegreesToRadians(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x3F91DF46A0000000
ret float %4
}

LLVM IR (-O2):
define float @kmDegreesToRadians(float %0) {
%2 = fmul float %0, 0x3F91DF46A0000000
ret float %2
}
/* Variables and functions */
char *iupStrGetSmallMem();
int /*<<< orphan*/ sprintf(char *, char *, int, int, int);
char *iupStrReturnRGB(unsigned char r, unsigned char g, unsigned char b) {
  char *str = iupStrGetSmallMem();
  sprintf(str, "%d %d %d", (int)r, (int)g, (int)b);
  return str;
}


x86 assembly (clang, -O0):
<iupStrReturnRGB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    $0x0,%al
call   1030 <iupStrGetSmallMem@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movzbl -0x1(%rbp),%edx
movzbl -0x2(%rbp),%ecx
movzbl -0x3(%rbp),%r8d
lea    0xea4(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupStrReturnRGB>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <iupStrGetSmallMem@plt>
mov    %rax,%rbp
lea    0xec0(%rip),%rsi
mov    %rax,%rdi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <sprintf@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d %d\00"
define i8* @iupStrReturnRGB(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8*
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = call i8* (...) @iupStrGetSmallMem()
store i8* %8, i8** %7
%9 = load i8*, i8** %7
%10 = load i8, i8* %4
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = load i8, i8* %6
%15 = zext i8 %14 to i32
%16 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %13, i32 %15)
%17 = load i8*, i8** %7
ret i8* %17
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
define i8* @iupStrReturnRGB(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call i8* (...) @iupStrGetSmallMem()
%5 = zext i8 %0 to i32
%6 = zext i8 %1 to i32
%7 = zext i8 %2 to i32
%8 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i32 %7)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ flash_unlock();
void flash_init(void) { flash_unlock(); }


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

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

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

LLVM IR (-O2):
define void @flash_init() {
%1 = tail call i32 (...) @flash_unlock()
ret void
}
unsigned short inw(unsigned short port) {
  unsigned short data;
  asm volatile("in"
               "w"
               " %1,%0"
               : "=a"(data)
               : "d"(port));
  return (data);
}


x86 assembly (clang, -O0):
<inw>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%ax
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inw>:
mov    %edi,%edx
in     (%dx),%ax
ret

LLVM IR (-O0):
define zeroext i16 @inw(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i16 asm sideeffect "inw $1,$0", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i16 %5, i16* %3
%6 = load i16, i16* %3
ret i16 %6
}

LLVM IR (-O2):
define zeroext i16 @inw(i16 zeroext %0) {
%2 = tail call i16 asm sideeffect "inw $1,$0", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ write_imm(int);
int /*<<< orphan*/ write_instr(int);
int f1_handler(char **save) {
  write_instr(0x00);
  write_imm(0x3A);
  write_instr(0x28);
  return 0;
}


x86 assembly (clang, -O0):
<f1_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x3a,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1_handler>:
push   %rax
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x3a,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f1_handler(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @write_instr(i32 0)
%4 = call i32 @write_imm(i32 58)
%5 = call i32 @write_instr(i32 40)
ret i32 0
}

LLVM IR (-O2):
define i32 @f1_handler(i8** nocapture readnone %0) {
%2 = tail call i32 @write_instr(i32 0)
%3 = tail call i32 @write_imm(i32 58)
%4 = tail call i32 @write_instr(i32 40)
ret i32 0
}
/* Variables and functions */
short CiSetLom(unsigned char, int);
short int CiSJA1000SetLom(unsigned char chan) { return CiSetLom(chan, 1); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%esi
movzbl -0x1(%rbp),%edi
call   1030 <CiSetLom@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @CiSJA1000SetLom(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call signext i16 @CiSetLom(i8 zeroext %3, i32 1)
ret i16 %4
}

LLVM IR (-O2):
define signext i16 @CiSJA1000SetLom(i8 zeroext %0) {
%2 = tail call signext i16 @CiSetLom(i8 zeroext %0, i32 1)
ret i16 %2
}
/* Variables and functions */
int errno;
int main() {
  int i = errno;
  (void)i;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0x2ece(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @main() {
ret i32 0
}
int test_imm_7Dint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x7D << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_7Dint64_highword_mem>:
testb  $0x7d,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_7Dint64_highword_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, 32
%6 = and i64 %5, 125
%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_7Dint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 536870912000
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ api_end();
int /*<<< orphan*/ putc(char);
void HariMain(void) {
  char a[100];
  a[10] = 'A';
  putc(a[10]);
  a[100] = 'B';
  putc(a[100]);
  a[123] = 'C';
  putc(a[123]);
  api_end();
}


x86 assembly (clang, -O0):
<HariMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movb   $0x41,-0x66(%rbp)
movsbl -0x66(%rbp),%edi
call   1040 <putc@plt>
movb   $0x42,-0xc(%rbp)
movsbl -0xc(%rbp),%edi
call   1040 <putc@plt>
movb   $0x43,0xb(%rbp)
movsbl 0xb(%rbp),%edi
call   1040 <putc@plt>
mov    $0x0,%al
call   1030 <api_end@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HariMain>:
push   %rax
mov    $0x41,%edi
call   1040 <putc@plt>
xor    %edi,%edi
call   1040 <putc@plt>
xor    %edi,%edi
call   1040 <putc@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <api_end@plt>

LLVM IR (-O0):
define void @HariMain() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 10
store i8 65, i8* %2
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 10
%4 = load i8, i8* %3
%5 = call i32 @putc(i8 signext %4)
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 100
store i8 66, i8* %6
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 100
%8 = load i8, i8* %7
%9 = call i32 @putc(i8 signext %8)
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 123
store i8 67, i8* %10
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 123
%12 = load i8, i8* %11
%13 = call i32 @putc(i8 signext %12)
%14 = call i32 (...) @api_end()
ret void
}

LLVM IR (-O2):
define void @HariMain() {
%1 = tail call i32 @putc(i8 signext 65)
%2 = tail call i32 @putc(i8 signext poison)
%3 = tail call i32 @putc(i8 signext poison)
%4 = tail call i32 (...) @api_end()
ret void
}
void *arg1(void *a1, void *a2) { return a1; }


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

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

LLVM IR (-O0):
define i8* @arg1(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
ret i8* %5
}

LLVM IR (-O2):
define i8* @arg1(i8* readnone returned %0, i8* nocapture readnone %1) {
ret i8* %0
}
/* Variables and functions */
char *calloc(unsigned int, unsigned int);
int /*<<< orphan*/ no_space();
char *allocate(unsigned n) {
  register char *p;
  p = NULL;
  if (n) {
    p = (calloc((unsigned)(1), (unsigned)(n + 10)));
    if (!p)
      no_space();
  }
  return (p);
}


x86 assembly (clang, -O0):
<allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1168 <allocate+0x48>
mov    -0x4(%rbp),%esi
add    $0xa,%esi
mov    $0x1,%edi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1163 <allocate+0x43>
mov    $0x0,%al
call   1030 <no_space@plt>
jmp    1168 <allocate+0x48>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocate>:
push   %rbx
test   %edi,%edi
je     1147 <allocate+0x27>
mov    %edi,%esi
add    $0xa,%esi
mov    $0x1,%edi
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1149 <allocate+0x29>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <no_space@plt>
jmp    1149 <allocate+0x29>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @allocate(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = add i32 %0, 10
%5 = tail call i8* @calloc(i32 1, i32 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 (...) @no_space()
br label %9
9: ; preds = %3, %7, %1
%10 = phi i8* [ %5, %3 ], [ null, %7 ], [ null, %1 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ empty_log(char *);
void pa_context_disconnect(int *c) {
  empty_log("pa_context_disconnec: nothing to do\n");
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"pa_context_disconnec: nothing to do\0A\00"
define void @pa_context_disconnect(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @empty_log(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"pa_context_disconnec: nothing to do\0A\00"
define void @pa_context_disconnect(i32* nocapture readnone %0) {
%2 = tail call i32 @empty_log(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int test_span_id_compare(int, char const *, char const *);
int test_span_id_less(const char *sa, const char *sb) {
  return test_span_id_compare(1, sa, sb);
}


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

x86 assembly (clang, -O2):
<test_span_id_less>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <test_span_id_compare@plt>

LLVM IR (-O0):
define i32 @test_span_id_less(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 @test_span_id_compare(i32 1, i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_span_id_less(i8* %0, i8* %1) {
%3 = tail call i32 @test_span_id_compare(i32 1, i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_DotVec2_init(void) {
  _hmt_register_covercase("HMM_DotVec2", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_DotVec2_init>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"HMM_DotVec2\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_DotVec2_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"HMM_DotVec2\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_DotVec2_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int ti_exp_start(double const *options) {
  (void)options;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ti_exp_start(double* nocapture readnone %0) {
ret i32 0
}
int max(int X, int Y) { return ((X) > (Y)) ? (X) : (Y); }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @max(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ xlFmtAbort(char *);
void xlStkOver(void) { xlFmtAbort("value stack overflow"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"value stack overflow\00"
define void @xlStkOver() {
%1 = call i32 @xlFmtAbort(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"value stack overflow\00"
define void @xlStkOver() {
%1 = tail call i32 @xlFmtAbort(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int f171(int *);
int f172(int *p) { return f171(p); }


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

x86 assembly (clang, -O2):
<f172>:
jmp    1030 <f171@plt>

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

LLVM IR (-O2):
define i32 @f172(i32* %0) {
%2 = tail call i32 @f171(i32* %0)
ret i32 %2
}
void init_object_memory() {}


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

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

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

LLVM IR (-O2):
define void @init_object_memory() {
ret void
}
__attribute__((visibility("hidden"))) int is_extendable(const int symbology) {
  switch (symbology) {
  case 13:
  case 14:
  case 34:
  case 35:
  case 37:
  case 38:
  case 69:
  case 130:
  case 135:
  case 136:
    return 1;
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_extendable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff3,%eax
sub    $0x2,%eax
jb     1180 <is_extendable+0x80>
jmp    111e <is_extendable+0x1e>
mov    -0xc(%rbp),%eax
add    $0xffffffde,%eax
sub    $0x2,%eax
jb     1180 <is_extendable+0x80>
jmp    1132 <is_extendable+0x32>
mov    -0xc(%rbp),%eax
add    $0xffffffdb,%eax
sub    $0x2,%eax
jb     1180 <is_extendable+0x80>
jmp    1146 <is_extendable+0x46>
mov    -0xc(%rbp),%eax
sub    $0x45,%eax
je     1180 <is_extendable+0x80>
jmp    1157 <is_extendable+0x57>
mov    -0xc(%rbp),%eax
sub    $0x82,%eax
je     1180 <is_extendable+0x80>
jmp    116a <is_extendable+0x6a>
mov    -0xc(%rbp),%eax
add    $0xffffff79,%eax
sub    $0x1,%eax
ja     118c <is_extendable+0x8c>
jmp    1180 <is_extendable+0x80>
movl   $0x1,-0x4(%rbp)
jmp    1193 <is_extendable+0x93>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_extendable>:
mov    $0x1,%eax
lea    -0xd(%rdi),%ecx
cmp    $0x38,%ecx
ja     111d <is_extendable+0x1d>
movabs $0x100000003600003,%rdx
bt     %rcx,%rdx
jb     1132 <is_extendable+0x32>
add    $0xffffff7e,%edi
cmp    $0x6,%edi
ja     1133 <is_extendable+0x33>
mov    $0x61,%ecx
bt     %edi,%ecx
jae    1133 <is_extendable+0x33>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define hidden i32 @is_extendable(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 13, label %5
i32 14, label %5
i32 34, label %5
i32 35, label %5
i32 37, label %5
i32 38, label %5
i32 69, label %5
i32 130, label %5
i32 135, label %5
i32 136, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define hidden i32 @is_extendable(i32 %0) {
switch i32 %0, label %2 [
i32 13, label %3
i32 14, label %3
i32 34, label %3
i32 35, label %3
i32 37, label %3
i32 38, label %3
i32 69, label %3
i32 130, label %3
i32 135, label %3
i32 136, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
int fun1075() { return 1075; }


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

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

LLVM IR (-O0):
define i32 @fun1075() {
ret i32 1075
}

LLVM IR (-O2):
define i32 @fun1075() {
ret i32 1075
}
int ghw_read_eoh(struct ghw_handler *h) {
  (void)h;
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.ghw_handler = type opaque
define i32 @ghw_read_eoh(%struct.ghw_handler* nocapture readnone %0) {
ret i32 0
}
void msm_cpr_pm_resume(void) {}


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

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

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

LLVM IR (-O2):
define void @msm_cpr_pm_resume() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ err_msg(int, char *);
int main(int argc, char *argv[]) {
  if (argc != 2) {
    err_msg(1, "Error Message.");
  }
  return (EXIT_SUCCESS);
}


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   $0x2,-0x8(%rbp)
je     1141 <main+0x31>
mov    $0x1,%edi
lea    0xec4(%rip),%rsi
call   1030 <err_msg@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
je     1127 <main+0x17>
lea    0xee3(%rip),%rsi
mov    $0x1,%edi
call   1030 <err_msg@plt>
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Error Message.\00"
@EXIT_SUCCESS = global i32 0
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 ne i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @err_msg(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@.str = [15 x i8] c"Error Message.\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @err_msg(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void _dasm_error_file_nonexistant(char *filename) {
  printf("DASM | Error: The file \"%s\" does not seem to exist. Are you sure "
         "the path is correct?\n",
         filename);
  exit(0);
}


x86 assembly (clang, -O0):
<_dasm_error_file_nonexistant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_dasm_error_file_nonexistant>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [87 x i8] c"DASM | Error: The file \22%s\22 does not seem to exist. Are you sure the path is correct?\0A\00"
define void @_dasm_error_file_nonexistant(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [87 x i8] c"DASM | Error: The file \22%s\22 does not seem to exist. Are you sure the path is correct?\0A\00"
define void @_dasm_error_file_nonexistant(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int fun_stub_base_12_stub(long long, long long);
int /*<<< orphan*/ printf(char *, int, ...);
int fun_stub_base_12_call(long long a, long long b) {
  printf("fun_stub_base_12_call:a = %lld, b = %lld\n", a, b);
  int x = fun_stub_base_12_stub(a, b);
  printf("fun_stub_base_12_stub return %d\n", x);
  return x;
}


x86 assembly (clang, -O0):
<fun_stub_base_12_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fun_stub_base_12_stub@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_stub_base_12_call>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
mov    %ebx,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fun_stub_base_12_stub@plt>
mov    %eax,%ebx
lea    0xed9(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [42 x i8] c"fun_stub_base_12_call:a = %lld, b = %lld\0A\00"
@.str.1 = [33 x i8] c"fun_stub_base_12_stub return %d\0A\00"
define i32 @fun_stub_base_12_call(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = trunc i64 %6 to i32
%8 = load i64, i64* %4
%9 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %7, i64 %8)
%10 = load i64, i64* %3
%11 = load i64, i64* %4
%12 = call i32 @fun_stub_base_12_stub(i64 %10, i64 %11)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
@.str = [42 x i8] c"fun_stub_base_12_call:a = %lld, b = %lld\0A\00"
@.str.1 = [33 x i8] c"fun_stub_base_12_stub return %d\0A\00"
define i32 @fun_stub_base_12_call(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %3, i64 %1)
%5 = tail call i32 @fun_stub_base_12_stub(i64 %0, i64 %1)
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf(
      "OpenCL compiler and syntax checker\n"
      "----------------------------------\n"
      "Options:\n"
      "  -c <IN FILENAME> : File to compile.\n"
      "  -o <OUT FILENAME>: Rename out file (default: '<IN FILENAME>.clo').\n"
      "  -a <ARCH NAME>   : Architecture to compile for, string of format\n"
      "                     '<PLATFORM>/<DEVICE>'. The default is first "
      "platform and\n"
      "                     the default device is the first device ordered by "
      "class\n"
      "                     in priority of DEFAULT, GPU, ACCELERATOR, CPU.\n"
      "  -l               : List all platforms and devices on the system.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [544 x i8] c"OpenCL compiler and syntax checker\0A----------------------------------\0AOptions:\0A -c <IN FILENAME> : File to compile.\0A -o <OUT FILENAME>: Rename out file (default: '<IN FILENAME>.clo').\0A -a <ARCH NAME> : Architecture to compile for, string of format\0A '<PLATFORM>/<DEVICE>'. The default is first platform and\0A the default device is the first device ordered by class\0A in priority of DEFAULT, GPU, ACCELERATOR, CPU.\0A -l : List all platforms and devices on the system.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([544 x i8], [544 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [543 x i8] c"OpenCL compiler and syntax checker\0A----------------------------------\0AOptions:\0A -c <IN FILENAME> : File to compile.\0A -o <OUT FILENAME>: Rename out file (default: '<IN FILENAME>.clo').\0A -a <ARCH NAME> : Architecture to compile for, string of format\0A '<PLATFORM>/<DEVICE>'. The default is first platform and\0A the default device is the first device ordered by class\0A in priority of DEFAULT, GPU, ACCELERATOR, CPU.\0A -l : List all platforms and devices on the system.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([543 x i8], [543 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void *fw_calloc(size_t count, size_t size) {
  void *p;
  if ((p = calloc(count, size)) == NULL) {
    perror("ipchains: calloc failed");
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<fw_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1171 <fw_calloc+0x41>
lea    0xe9e(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fw_calloc>:
push   %rax
call   1030 <calloc@plt>
test   %rax,%rax
je     113d <fw_calloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"ipchains: calloc failed\00"
define i8* @fw_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [24 x i8] c"ipchains: calloc failed\00"
define noalias i8* @fw_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ execv(char *, char **);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ setuid(int);
int main(int argc, char *argv[]) {
  setuid(1);
  execv(argv[1], &argv[1]);
  perror(argv[0]);
  exit(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)
mov    $0x1,%edi
call   1050 <setuid@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1060 <execv@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    $0x1,%edi
call   1050 <setuid@plt>
lea    0x8(%rbx),%rsi
mov    0x8(%rbx),%rdi
call   1060 <execv@plt>
mov    (%rbx),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @setuid(i32 1)
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = call i32 @execv(i8* %9, i8** %11)
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = call i32 @perror(i8* %15)
%17 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @setuid(i32 1)
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @execv(i8* %5, i8** %4)
%7 = load i8*, i8** %1
%8 = tail call i32 @perror(i8* %7)
%9 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ OpticalFlowSettingsHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void OpticalFlowSettingsRequestUpdate() {
  UAVObjRequestUpdate(OpticalFlowSettingsHandle());
}


x86 assembly (clang, -O0):
<OpticalFlowSettingsRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <OpticalFlowSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpticalFlowSettingsRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <OpticalFlowSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @OpticalFlowSettingsRequestUpdate() {
%1 = call i32 (...) @OpticalFlowSettingsHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OpticalFlowSettingsRequestUpdate() {
%1 = tail call i32 (...) @OpticalFlowSettingsHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
char *hash_plugin_summary(void) {
  return ("keyring \tGNOME Keyring passphrase plugin");
}


x86 assembly (clang, -O0):
<hash_plugin_summary>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_summary>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [41 x i8] c"keyring \09GNOME Keyring passphrase plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [41 x i8] c"keyring \09GNOME Keyring passphrase plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0)
}
double dabs(double x) { return ((x) < 0) ? -(x) : (x); }


x86 assembly (clang, -O0):
<dabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    113d <dabs+0x3d>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1147 <dabs+0x47>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dabs>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dabs(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fneg double %6
br label %10
8: ; preds = %1
%9 = load double, double* %2
br label %10
10: ; preds = %8, %5
%11 = phi double [ %7, %5 ], [ %9, %8 ]
ret double %11
}

LLVM IR (-O2):
define double @dabs(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__2__GeneralIO__clr();
void LedsP__Led2__clr(void) { Msp430GpioC__2__GeneralIO__clr(); }


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

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

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

LLVM IR (-O2):
define void @LedsP__Led2__clr() {
%1 = tail call i32 (...) @Msp430GpioC__2__GeneralIO__clr()
ret void
}
int getOption(int num, char **str) {
  short i, o = -1;
  return (int)o;
}


x86 assembly (clang, -O0):
<getOption>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movw   $0xffff,-0x14(%rbp)
movswl -0x14(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @getOption(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i16
%6 = alloca i16
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i16 -1, i16* %6
%7 = load i16, i16* %6
%8 = sext i16 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @getOption(i32 %0, i8** nocapture readnone %1) {
ret i32 -1
}
void BIO_set_ex_data(void) {}


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

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

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

LLVM IR (-O2):
define void @BIO_set_ex_data() {
ret void
}