xunge/DecIR huggingface dataset:
/* Variables and functions */
int createEmail(int /*<<< orphan*/, int);
int /*<<< orphan*/ outgoing(int, int);
void sendEmail(int sender, int receiver) {
  int email;
  int tmp;
  {
    {
      tmp = createEmail(0, receiver);
      email = tmp;
      outgoing(sender, email);
    }
    return;
  }
}


x86 assembly (clang, -O0):
<sendEmail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
xor    %edi,%edi
call   1030 <createEmail@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <outgoing@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendEmail>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <createEmail@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <outgoing@plt>

LLVM IR (-O0):
define void @sendEmail(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = call i32 @createEmail(i32 0, i32 %7)
store i32 %8, i32* %6
%9 = load i32, i32* %6
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %5
%12 = call i32 @outgoing(i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @sendEmail(i32 %0, i32 %1) {
%3 = tail call i32 @createEmail(i32 0, i32 %1)
%4 = tail call i32 @outgoing(i32 %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pubrealloc(int, void *, int /*<<< orphan*/, char *);
void dfree(int devnum, void *ptr) {
  pubrealloc(devnum, ptr, 0, " in dfree():");
}


x86 assembly (clang, -O0):
<dfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
lea    0xed1(%rip),%rcx
call   1030 <pubrealloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dfree>:
lea    0xee9(%rip),%rcx
xor    %edx,%edx
jmp    1030 <pubrealloc@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c" in dfree():\00"
define void @dfree(i32 %0, i8* %1) {
%3 = tail call i32 @pubrealloc(i32 %0, i8* %1, i32 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void my_free(void *p, int len) { free(p); }


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

x86 assembly (clang, -O2):
<my_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @my_free(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
int _cmp_error(char const *message, int ret) {
  fputs("cmp"
        ": ",
        stderr);
  perror(message);
  return ret;
}


x86 assembly (clang, -O0):
<_cmp_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cmp_error>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"cmp: \00"
@stderr = global i32 0
define i32 @_cmp_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 = call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @perror(i8* %7)
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
@.str = [6 x i8] c"cmp: \00"
@stderr = global i32 0
define i32 @_cmp_error(i8* nocapture %0, i32 returned %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @perror(i8* %0)
ret i32 %1
}
/* Variables and functions */
int _sqo_strverscmp(char *, char *);
int _sqo_versioncmp(const void *a, const void *b) {
  char *left = *((char **)a);
  char *right = *((char **)b);
  return _sqo_strverscmp(right, left);
}


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

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

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

LLVM IR (-O2):
define i32 @_sqo_versioncmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @_sqo_strverscmp(i8* %6, i8* %4)
ret i32 %7
}
/* Variables and functions */
int __nv_isinff(float);
int __isinff(float __a) { return __nv_isinff(__a); }


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

x86 assembly (clang, -O2):
<__isinff>:
jmp    1030 <__nv_isinff@plt>

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

LLVM IR (-O2):
define i32 @__isinff(float %0) {
%2 = tail call i32 @__nv_isinff(float %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xbc() {
  Assert_real((isspace(188) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              945, ("isspace should be 0 for 0xbc"));
}


x86 assembly (clang, -O0):
<t_isspace_0xbc>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbc,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3b1,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0xbc>:
push   %rax
mov    $0xbc,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3b1,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xbc\00"
define void @t_isspace_0xbc() {
%1 = call i64 @isspace(i32 188)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 945, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xbc\00"
define void @t_isspace_0xbc() {
%1 = tail call i64 @isspace(i32 188)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 945, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int ruby_require_internal(char *, unsigned int);
void Init_enc(void) {
  if (ruby_require_internal("enc/encdb.so",
                            (unsigned int)sizeof("enc/encdb.so") - 1) == 1) {
    ruby_require_internal("enc/trans/transdb.so",
                          (unsigned int)sizeof("enc/trans/transdb.so") - 1);
  }
}


x86 assembly (clang, -O0):
<Init_enc>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0xc,%esi
call   1030 <ruby_require_internal@plt>
cmp    $0x1,%eax
jne    113f <Init_enc+0x2f>
lea    0xed8(%rip),%rdi
mov    $0x14,%esi
call   1030 <ruby_require_internal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init_enc>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xc,%esi
call   1030 <ruby_require_internal@plt>
cmp    $0x1,%eax
jne    1139 <Init_enc+0x29>
lea    0xedf(%rip),%rdi
mov    $0x14,%esi
pop    %rax
jmp    1030 <ruby_require_internal@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"enc/encdb.so\00"
@.str.1 = [21 x i8] c"enc/trans/transdb.so\00"
define void @Init_enc() {
%1 = call i32 @ruby_require_internal(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 12)
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @ruby_require_internal(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 20)
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"enc/encdb.so\00"
@.str.1 = [21 x i8] c"enc/trans/transdb.so\00"
define void @Init_enc() {
%1 = tail call i32 @ruby_require_internal(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 12)
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @ruby_require_internal(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 20)
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ passThrough(int *);
void testChainedCalls() {
  int *ptr = 0;
  passThrough(ptr);
}


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

x86 assembly (clang, -O2):
<testChainedCalls>:
xor    %edi,%edi
jmp    1030 <passThrough@plt>

LLVM IR (-O0):
define void @testChainedCalls() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = load i32*, i32** %1
%3 = call i32 @passThrough(i32* %2)
ret void
}

LLVM IR (-O2):
define void @testChainedCalls() {
%1 = tail call i32 @passThrough(i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serial_putc(int /*<<< orphan*/);
void f_serial_puts(const char *s) {
  while (*s != '\0') {
    serial_putc(*s++);
  }
}


x86 assembly (clang, -O0):
<f_serial_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1148 <f_serial_puts+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <serial_putc@plt>
jmp    111c <f_serial_puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_serial_puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <f_serial_puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <serial_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <f_serial_puts+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @f_serial_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = tail call i32 @serial_putc(i32 %7)
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
char rshft_b(char *, char *);
signed char intr_wrap_562(signed char p1, signed char p2) {
  return rshft_b(&p1, &p2);
}


x86 assembly (clang, -O0):
<intr_wrap_562>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
lea    -0x1(%rbp),%rdi
lea    -0x2(%rbp),%rsi
call   1030 <rshft_b@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_562>:
push   %rax
mov    %dil,0x7(%rsp)
mov    %sil,0x6(%rsp)
lea    0x7(%rsp),%rdi
lea    0x6(%rsp),%rsi
call   1030 <rshft_b@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @intr_wrap_562(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call signext i8 @rshft_b(i8* %3, i8* %4)
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @intr_wrap_562(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call signext i8 @rshft_b(i8* %3, i8* %4)
ret i8 %5
}
void gtk_action_group_get_sensitive() {}


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

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

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

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

/* Variables and functions */
void *read_byte(void *, int *);
void *read_oid_part(void *src, u_int64_t *part) {
  int v;
  u_int64_t val = 0LL;
  do {
    src = read_byte(src, &v);
    val = (val << 7) + (u_int64_t)(v & 0x7F);
  } while (v > 127);
  *part = val;
  return src;
}


x86 assembly (clang, -O0):
<read_oid_part>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <read_byte@plt>
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%eax
shl    $0x7,%eax
mov    -0x14(%rbp),%ecx
and    $0x7f,%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x7f,-0x14(%rbp)
jg     1127 <read_oid_part+0x17>
mov    -0x18(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_oid_part>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rax
xor    %ebp,%ebp
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <read_byte@plt>
mov    %ebp,%ecx
shl    $0x7,%ecx
mov    0xc(%rsp),%edx
mov    %edx,%ebp
and    $0x7f,%ebp
or     %ecx,%ebp
cmp    $0x7f,%edx
jg     1130 <read_oid_part+0x20>
mov    %ebp,(%r14)
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @read_oid_part(i8* %0, i32* nocapture writeonly %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
br label %5
5: ; preds = %5, %2
%6 = phi i8* [ %0, %2 ], [ %8, %5 ]
%7 = phi i32 [ 0, %2 ], [ %12, %5 ]
%8 = call i8* @read_byte(i8* %6, i32* %3)
%9 = shl i32 %7, 7
%10 = load i32, i32* %3
%11 = and i32 %10, 127
%12 = or i32 %11, %9
%13 = icmp sgt i32 %10, 127
br i1 %13, label %5, label %14
14: ; preds = %5
store i32 %12, i32* %1
ret i8* %8
}
/* Variables and functions */
scalar_t__ strtod(char const *, char **);
double parseDouble(const char *astring) {
  double returnval;
  char *endptr;
  if (astring == NULL) {
    returnval = 0;
  } else {
    returnval = (double)strtod(astring, &endptr);
  }
  return returnval;
}


x86 assembly (clang, -O0):
<parseDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1134 <parseDouble+0x24>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    114b <parseDouble+0x3b>
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <strtod@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseDouble>:
test   %rdi,%rdi
je     1128 <parseDouble+0x18>
push   %rax
mov    %rsp,%rsi
call   1030 <strtod@plt>
cvtsi2sd %rax,%xmm0
add    $0x8,%rsp
ret
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @parseDouble(i8* %0) {
%2 = alloca i8*
%3 = alloca double
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store double 0.000000e+00, double* %3
br label %12
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i64 @strtod(i8* %9, i8** %4)
%11 = sitofp i64 %10 to double
store double %11, double* %3
br label %12
12: ; preds = %8, %7
%13 = load double, double* %3
ret double %13
}

LLVM IR (-O2):
define double @parseDouble(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = icmp eq i8* %0, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = call i64 @strtod(i8* %0, i8** %2)
%7 = sitofp i64 %6 to double
br label %8
8: ; preds = %1, %5
%9 = phi double [ %7, %5 ], [ 0.000000e+00, %1 ]
ret double %9
}
void gdk_pixbuf_render_pixmap_and_mask_for_colormap() {}


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

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

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

LLVM IR (-O2):
define void @gdk_pixbuf_render_pixmap_and_mask_for_colormap() {
ret void
}
double addimmdf3(double a) { return a + 50; }


x86 assembly (clang, -O0):
<addimmdf3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @addimmdf3(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 5.000000e+01
ret double %4
}

LLVM IR (-O2):
define double @addimmdf3(double %0) {
%2 = fadd double %0, 5.000000e+01
ret double %2
}
int do_868() { return 868; }


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

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

LLVM IR (-O0):
define i32 @do_868() {
ret i32 868
}

LLVM IR (-O2):
define i32 @do_868() {
ret i32 868
}
/* Variables and functions */
int check_path(char *);
int check_pipe(char *);
int /*<<< orphan*/ *strstr(char *, char *);
int check_bin(char path[100]) {
  if (strstr(path, "/") != NULL) {
    if ((check_path(path) == 1) || (check_pipe(path) == 1))
      return 0;
    else
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<check_bin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <strstr@plt>
cmp    $0x0,%rax
je     1192 <check_bin+0x62>
mov    -0x10(%rbp),%rdi
call   1030 <check_path@plt>
cmp    $0x1,%eax
je     117a <check_bin+0x4a>
mov    -0x10(%rbp),%rdi
call   1040 <check_pipe@plt>
cmp    $0x1,%eax
jne    1186 <check_bin+0x56>
movl   $0x0,-0x4(%rbp)
jmp    1199 <check_bin+0x69>
movl   $0x1,-0x4(%rbp)
jmp    1199 <check_bin+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_bin>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strchr@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     1165 <check_bin+0x35>
mov    %rbx,%rdi
call   1040 <check_path@plt>
cmp    $0x1,%eax
je     1165 <check_bin+0x35>
mov    %rbx,%rdi
call   1050 <check_pipe@plt>
xor    %ebp,%ebp
cmp    $0x1,%eax
setne  %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define i32 @check_bin(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32* @strstr(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i32 @check_path(i8* %8)
%10 = icmp eq i32 %9, 1
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = call i32 @check_pipe(i8* %12)
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %16
15: ; preds = %11, %7
store i32 0, i32* %2
br label %18
16: ; preds = %11
store i32 1, i32* %2
br label %18
17: ; preds = %1
store i32 0, i32* %2
br label %18
18: ; preds = %17, %16, %15
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @check_bin(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 47)
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i32 @check_path(i8* %0)
%6 = icmp eq i32 %5, 1
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i32 @check_pipe(i8* %0)
%9 = icmp ne i32 %8, 1
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %1, %4
%12 = phi i32 [ 0, %4 ], [ 0, %1 ], [ %10, %7 ]
ret i32 %12
}
int main(void) {
  int a = 0;
  return a;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  (void)argc;
  (void)argv;
  printf("hello world\n");
  return 0;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"hello world\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 = load i8**, i8*** %5
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ GPSPositionSensorHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void GPSPositionSensorRequestUpdate() {
  UAVObjRequestUpdate(GPSPositionSensorHandle());
}


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

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

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

LLVM IR (-O2):
define void @GPSPositionSensorRequestUpdate() {
%1 = tail call i32 (...) @GPSPositionSensorHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int rand();
long random_numberA() {
  long number = rand() % 32;
  return number;
}


x86 assembly (clang, -O0):
<random_numberA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x20,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_numberA>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
lea    0x1f(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffffe0,%ecx
sub    %ecx,%eax
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @random_numberA() {
%1 = alloca i64
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 32
%4 = sext i32 %3 to i64
store i64 %4, i64* %1
%5 = load i64, i64* %1
ret i64 %5
}

LLVM IR (-O2):
define i64 @random_numberA() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 32
%3 = sext i32 %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void array_print_indent(int depth) {
  int i;
  for (i = 0; i < depth; i++) {
    fprintf(stdout, "    ");
  }
}


x86 assembly (clang, -O0):
<array_print_indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1151 <array_print_indent+0x41>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <array_print_indent+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_print_indent>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    1140 <array_print_indent+0x30>
mov    %edi,%ebx
mov    0x2ebe(%rip),%r15
lea    0xed7(%rip),%r14
nopl   0x0(%rax)
mov    (%r15),%edi
mov    %r14,%rsi
call   1030 <fprintf@plt>
add    $0xffffffff,%ebx
jne    1130 <array_print_indent+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [5 x i8] c" \00"
define void @array_print_indent(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = add nuw nsw i32 %4, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %3
9: ; preds = %3, %1
ret void
}
int main() {
  unsigned long t1 = 3;
  return t1 << 3;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x3,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 3, i64* %2
%3 = load i64, i64* %2
%4 = shl i64 %3, 3
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
ret i32 24
}
int lw_sock_close(int *sock) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @lw_sock_close(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("!!!Hello World!!!");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [18 x i8] c"!!!Hello World!!!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ nondet();
void main() {
  int i;
  i = 0;
  while (nondet()) {
    i++;
  }
  assert(i < 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <nondet@plt>
cmp    $0x0,%rax
je     114e <main+0x2e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <main+0xf>
cmpl   $0x0,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <nondet@plt>
test   %rax,%rax
jne    1130 <main+0x10>
xor    %edi,%edi
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %5, %0
%3 = call i64 (...) @nondet()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
br label %2
8: ; preds = %2
%9 = load i32, i32* %1
%10 = icmp slt i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret void
}

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @nondet()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
%5 = tail call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
int fabs(double);
double sin(double);
double my_j0(double x) {
  if (fabs(x) < 1e-9) {
    x = 1. - x * x / 6.;
  } else {
    x = sin(x) / x;
  }
  return x;
}


x86 assembly (clang, -O0):
<my_j0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xebd(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1179 <my_j0+0x59>
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xeb1(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe9d(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    118d <my_j0+0x6d>
movsd  -0x8(%rbp),%xmm0
call   1040 <sin@plt>
divsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_j0>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <fabs@plt>
test   %eax,%eax
jle    1140 <my_j0+0x20>
movsd  (%rsp),%xmm0
call   1040 <sin@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret
movsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm0
divsd  0xeaf(%rip),%xmm0
addsd  0xeaf(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @my_j0(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @fabs(double %3)
%5 = sitofp i32 %4 to double
%6 = fcmp olt double %5, 1.000000e-09
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load double, double* %2
%9 = load double, double* %2
%10 = fmul double %8, %9
%11 = fdiv double %10, 6.000000e+00
%12 = fsub double 1.000000e+00, %11
store double %12, double* %2
br label %18
13: ; preds = %1
%14 = load double, double* %2
%15 = call double @sin(double %14)
%16 = load double, double* %2
%17 = fdiv double %15, %16
store double %17, double* %2
br label %18
18: ; preds = %13, %7
%19 = load double, double* %2
ret double %19
}

LLVM IR (-O2):
define double @my_j0(double %0) {
%2 = tail call i32 @fabs(double %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = fmul double %0, %0
%6 = fdiv double %5, 6.000000e+00
%7 = fsub double 1.000000e+00, %6
br label %11
8: ; preds = %1
%9 = tail call double @sin(double %0)
%10 = fdiv double %9, %0
br label %11
11: ; preds = %8, %4
%12 = phi double [ %7, %4 ], [ %10, %8 ]
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("hi there\n");
  return 0;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"hi there\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 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"hi there\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int inb(int);
int uart_hasData() { return inb(0x3fd) & 1; }


x86 assembly (clang, -O0):
<uart_hasData>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3fd,%edi
call   1030 <inb@plt>
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_hasData>:
push   %rax
mov    $0x3fd,%edi
call   1030 <inb@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @uart_hasData() {
%1 = call i32 @inb(i32 1021)
%2 = and i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @uart_hasData() {
%1 = tail call i32 @inb(i32 1021)
%2 = and i32 %1, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_ulvector(unsigned long *v, int nl, int nh) { free((void *)(v + nl)); }


x86 assembly (clang, -O0):
<free_ulvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_ulvector>:
movslq %esi,%rax
lea    (%rdi,%rax,8),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_ulvector(i64* %0, i32 %1, i32 %2) {
%4 = alloca i64*
%5 = alloca i32
%6 = alloca i32
store i64* %0, i64** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i64*, i64** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i64, i64* %7, i64 %9
%11 = bitcast i64* %10 to i8*
%12 = call i32 @free(i8* %11)
ret void
}

LLVM IR (-O2):
define void @free_ulvector(i64* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i64, i64* %0, i64 %4
%6 = bitcast i64* %5 to i8*
%7 = tail call i32 @free(i8* %6)
ret void
}
int fun1151() { return 1151; }


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

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

LLVM IR (-O0):
define i32 @fun1151() {
ret i32 1151
}

LLVM IR (-O2):
define i32 @fun1151() {
ret i32 1151
}
void kol_board_putc(char c) { asm("int $0x40" ::"a"(63), "b"(1), "c"(c)); }


x86 assembly (clang, -O0):
<kol_board_putc>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %dil,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    $0x3f,%eax
mov    $0x1,%ebx
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_board_putc>:
push   %rbx
mov    %edi,%ecx
mov    $0x3f,%eax
mov    $0x1,%ebx
int    $0x40
pop    %rbx
ret

LLVM IR (-O0):
define void @kol_board_putc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
ret void
}

LLVM IR (-O2):
define void @kol_board_putc(i8 signext %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 63, i32 1, i8 %0)
ret void
}
int cairo_code_draw_envScope_get_width() { return 600; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_envScope_get_width() {
ret i32 600
}

LLVM IR (-O2):
define i32 @cairo_code_draw_envScope_get_width() {
ret i32 600
}
char charAt(char *string, int i) { return string[i]; }


x86 assembly (clang, -O0):
<charAt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charAt>:
movslq %esi,%rax
mov    (%rdi,%rax,1),%al
ret

LLVM IR (-O0):
define signext i8 @charAt(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @charAt(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
char *strdup(char const *);
char *JLI_StringDup(const char *s1) {
  char *s = strdup(s1);
  if (s == NULL) {
    perror("strdup");
    exit(1);
  }
  return s;
}


x86 assembly (clang, -O0):
<JLI_StringDup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116a <JLI_StringDup+0x3a>
lea    0xea5(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"strdup\00"
define noalias i8* @JLI_StringDup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __setCHRBank6Low(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ m22_SetChrROMBank6();
void m22_setParamsEXX0(uint16_t addr, uint8_t val) {
  __setCHRBank6Low(addr, val);
  m22_SetChrROMBank6();
}


x86 assembly (clang, -O0):
<m22_setParamsEXX0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <__setCHRBank6Low@plt>
mov    $0x0,%al
call   1030 <m22_SetChrROMBank6@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @m22_setParamsEXX0(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 = call i32 @__setCHRBank6Low(i32 %5, i32 %6)
%8 = call i32 (...) @m22_SetChrROMBank6()
ret void
}

LLVM IR (-O2):
define void @m22_setParamsEXX0(i32 %0, i32 %1) {
%3 = tail call i32 @__setCHRBank6Low(i32 %0, i32 %1)
%4 = tail call i32 (...) @m22_SetChrROMBank6()
ret void
}
int main() { ; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cfwpminmx2(float *, float, float *, float *, int, int, int,
                              int);
void cfwpminmx2_(float *qe, float *qbme, float *wpmax, float *wpmin, int *nx,
                 int *ny, int *nxe, int *nye) {
  cfwpminmx2(qe, *qbme, wpmax, wpmin, *nx, *ny, *nxe, *nye);
  return;
}


x86 assembly (clang, -O0):
<cfwpminmx2_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
mov    -0x30(%rbp),%rax
mov    (%rax),%r8d
mov    0x10(%rbp),%rax
mov    (%rax),%r9d
mov    0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
call   1030 <cfwpminmx2@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfwpminmx2_>:
push   %rax
mov    0x18(%rsp),%r10
mov    0x10(%rsp),%r11
movss  (%rsi),%xmm0
mov    (%r8),%eax
mov    (%r9),%r8d
mov    (%r11),%r9d
mov    (%r10),%esi
mov    %esi,(%rsp)
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %eax,%ecx
call   1030 <cfwpminmx2@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @cfwpminmx2_(float* %0, float* %1, float* %2, float* %3, i32* %4, i32* %5, i32* %6, i32* %7) {
%9 = alloca float*
%10 = alloca float*
%11 = alloca float*
%12 = alloca float*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
store float* %0, float** %9
store float* %1, float** %10
store float* %2, float** %11
store float* %3, float** %12
store i32* %4, i32** %13
store i32* %5, i32** %14
store i32* %6, i32** %15
store i32* %7, i32** %16
%17 = load float*, float** %9
%18 = load float*, float** %10
%19 = load float, float* %18
%20 = load float*, float** %11
%21 = load float*, float** %12
%22 = load i32*, i32** %13
%23 = load i32, i32* %22
%24 = load i32*, i32** %14
%25 = load i32, i32* %24
%26 = load i32*, i32** %15
%27 = load i32, i32* %26
%28 = load i32*, i32** %16
%29 = load i32, i32* %28
%30 = call i32 @cfwpminmx2(float* %17, float %19, float* %20, float* %21, i32 %23, i32 %25, i32 %27, i32 %29)
ret void
}

LLVM IR (-O2):
define void @cfwpminmx2_(float* %0, float* nocapture %1, float* %2, float* %3, i32* nocapture %4, i32* nocapture %5, i32* nocapture %6, i32* nocapture %7) {
%9 = load float, float* %1
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = tail call i32 @cfwpminmx2(float* %0, float %9, float* %2, float* %3, i32 %10, i32 %11, i32 %12, i32 %13)
ret void
}
unsigned float_neg(unsigned uf) {
  unsigned sign_mask = 0x80000000;
  unsigned nan = 0x7FC00000;
  unsigned infi = 0xFFC00000;
  if (uf == nan || uf == infi) {
    return uf;
  }
  return sign_mask ^ uf;
}


x86 assembly (clang, -O0):
<float_neg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x80000000,-0xc(%rbp)
movl   $0x7fc00000,-0x10(%rbp)
movl   $0xffc00000,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1134 <float_neg+0x34>
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    113f <float_neg+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <float_neg+0x48>
mov    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_neg>:
mov    %edi,%eax
mov    %edi,%ecx
or     $0x80000000,%ecx
cmp    $0xffc00000,%ecx
jne    1113 <float_neg+0x13>
ret
xor    $0x80000000,%eax
ret

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

LLVM IR (-O2):
define i32 @float_neg(i32 %0) {
switch i32 %0, label %2 [
i32 2143289344, label %4
i32 -4194304, label %4
]
2: ; preds = %1
%3 = xor i32 %0, -2147483648
br label %4
4: ; preds = %1, %1, %2
%5 = phi i32 [ %3, %2 ], [ %0, %1 ], [ %0, %1 ]
ret i32 %5
}
/* Variables and functions */
long long asin(long long);
long long internal_asin_l(long long value) { return asin(value); }


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

x86 assembly (clang, -O2):
<internal_asin_l>:
jmp    1030 <asin@plt>

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

LLVM IR (-O2):
define i64 @internal_asin_l(i64 %0) {
%2 = tail call i64 @asin(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void OUTCH(char c) { putchar(c); }


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

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

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

LLVM IR (-O2):
define void @OUTCH(i8 signext %0) {
%2 = tail call i32 @putchar(i8 signext %0)
ret void
}