xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
uint16_t mem_read16(uint8_t *mem, uint16_t addr) {
  if (addr >= 0xFFFF - 1) {
    puts("OOB RAM READ 16\n");
    exit(0);
  }
  return mem[addr] | mem[addr + 1] << 8;
}


x86 assembly (clang, -O0):
<mem_read16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0xfffe,-0xc(%rbp)
jl     114f <mem_read16+0x2f>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,4),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_read16>:
push   %rax
cmp    $0xfffe,%esi
jge    1138 <mem_read16+0x18>
movslq %esi,%rcx
mov    0x4(%rdi,%rcx,4),%eax
shl    $0x8,%eax
or     (%rdi,%rcx,4),%eax
pop    %rcx
ret
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"OOB RAM READ 16\0A\00"
define i32 @mem_read16(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sge i32 %5, 65534
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %2
%11 = load i32*, i32** %3
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = load i32*, i32** %3
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %16, i64 %19
%21 = load i32, i32* %20
%22 = shl i32 %21, 8
%23 = or i32 %15, %22
ret i32 %23
}

LLVM IR (-O2):
@.str = [17 x i8] c"OOB RAM READ 16\0A\00"
define i32 @mem_read16(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 65533
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = add nsw i32 %1, 1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %0, i64 %12
%14 = load i32, i32* %13
%15 = shl i32 %14, 8
%16 = or i32 %15, %10
ret i32 %16
}
/* Variables and functions */
int getEmailTo(int);
int /*<<< orphan*/ incoming(int, int);
int /*<<< orphan*/ puts(char *);
void mail(int client, int msg) {
  int tmp;
  {
    {
      puts("mail sent");
      tmp = getEmailTo(msg);
      incoming(tmp, msg);
    }
    return;
  }
}


x86 assembly (clang, -O0):
<mail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%edi
call   1050 <getEmailTo@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <incoming@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mail>:
push   %rbx
mov    %esi,%ebx
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1050 <getEmailTo@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <incoming@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"mail sent\00"
define void @mail(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %4
%8 = call i32 @getEmailTo(i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @incoming(i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"mail sent\00"
define void @mail(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @getEmailTo(i32 %1)
%5 = tail call i32 @incoming(i32 %4, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int licz1;
  printf("Podaj liczbe: ");
  scanf("%d", &licz1);
  if (licz1 > 0)
    printf("\n\n\t\t\tLiczba jest dodatnia\n\n\n\n");
  else
    printf("\n\n\t\t\tLiczba jest ujemna\n\n\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    1166 <main+0x46>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
jmp    1172 <main+0x52>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
lea    0xed3(%rip),%rax
lea    0xeb1(%rip),%rdi
cmovg  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Podaj liczbe: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [30 x i8] c"\0A\0A\09\09\09Liczba jest dodatnia\0A\0A\0A\0A\00"
@.str.3 = [28 x i8] c"\0A\0A\09\09\09Liczba jest ujemna\0A\0A\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Podaj liczbe: \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [27 x i8] c"\0A\0A\09\09\09Liczba jest ujemna\0A\0A\0A\00"
@str.4 = [29 x i8] c"\0A\0A\09\09\09Liczba jest dodatnia\0A\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0)
%8 = call i32 @puts(i8* dereferenceable(1) %7)
ret i32 0
}
void dummy_newpage(void) { ; }


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

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

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

LLVM IR (-O2):
define void @dummy_newpage() {
ret void
}
const char *scene_getname(void *unused) {
  (void)unused;
  return "Scene";
}


x86 assembly (clang, -O0):
<scene_getname>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"Scene\00"
define i8* @scene_getname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"Scene\00"
define i8* @scene_getname(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
int simulated_nested_loop_cond_in_goto(int p) {
  int k = 0;
  int t = 5;
  int j = 0;
  for (int i = 0; i < 5; i++) {
  B:
    if (i > 2) {
      t = 3;
    } else {
      t = 4;
    }
    j++;
    if (j >= 100)
      j = 0;
    else {
      goto B;
    }
  }
  return k;
}


x86 assembly (clang, -O0):
<simulated_nested_loop_cond_in_goto>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    1186 <simulated_nested_loop_cond_in_goto+0x86>
jmp    1132 <simulated_nested_loop_cond_in_goto+0x32>
cmpl   $0x2,-0x14(%rbp)
jle    1148 <simulated_nested_loop_cond_in_goto+0x48>
movl   $0x3,-0xc(%rbp)
jmp    114f <simulated_nested_loop_cond_in_goto+0x4f>
movl   $0x4,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x64,-0x10(%rbp)
jl     116e <simulated_nested_loop_cond_in_goto+0x6e>
movl   $0x0,-0x10(%rbp)
jmp    1173 <simulated_nested_loop_cond_in_goto+0x73>
jmp    1132 <simulated_nested_loop_cond_in_goto+0x32>
jmp    1178 <simulated_nested_loop_cond_in_goto+0x78>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <simulated_nested_loop_cond_in_goto+0x23>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @simulated_nested_loop_cond_in_goto(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 5, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %24, %1
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 5
br i1 %9, label %10, label %27
10: ; preds = %7
br label %11
11: ; preds = %22, %10
%12 = load i32, i32* %6
%13 = icmp sgt i32 %12, 2
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 3, i32* %4
br label %16
15: ; preds = %11
store i32 4, i32* %4
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
%19 = load i32, i32* %5
%20 = icmp sge i32 %19, 100
br i1 %20, label %21, label %22
21: ; preds = %16
store i32 0, i32* %5
br label %23
22: ; preds = %16
br label %11
23: ; preds = %21
br label %24
24: ; preds = %23
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
store i32 %26, i32* %6
br label %7
27: ; preds = %7
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @simulated_nested_loop_cond_in_goto(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, char const *);
void _msgout(const char *msg) { syslog(LOG_ERR, "%s", msg); }


x86 assembly (clang, -O0):
<_msgout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <syslog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_msgout>:
mov    %rdi,%rdx
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <syslog@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [3 x i8] c"%s\00"
define void @_msgout(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @LOG_ERR
%4 = load i8*, i8** %2
%5 = call i32 @syslog(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [3 x i8] c"%s\00"
define void @_msgout(i8* %0) {
%2 = load i32, i32* @LOG_ERR
%3 = tail call i32 @syslog(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int struct_exist(char *);
int can_add_struct_member(char *member) {
  if (struct_exist(member) == (1)) {
    return (1);
  }
  printf("member's type  %s does not exist\n", member);
  return (0);
}


x86 assembly (clang, -O0):
<can_add_struct_member>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <struct_exist@plt>
cmp    $0x1,%eax
jne    114a <can_add_struct_member+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1161 <can_add_struct_member+0x41>
mov    -0x10(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_add_struct_member>:
push   %rbx
mov    %rdi,%rbx
call   1040 <struct_exist@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x1,%ecx
je     1146 <can_add_struct_member+0x26>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"member's type %s does not exist\0A\00"
define i32 @can_add_struct_member(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @struct_exist(i8* %4)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %9)
store i32 0, i32* %2
br label %11
11: ; preds = %8, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [34 x i8] c"member's type %s does not exist\0A\00"
define i32 @can_add_struct_member(i8* %0) {
%2 = tail call i32 @struct_exist(i8* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ 1, %1 ]
ret i32 %7
}
/* Variables and functions */
int u8issigni(int /*<<< orphan*/);
int /*<<< orphan*/ u8tointc(char *);
int u8issignc(char *c) { return u8issigni(u8tointc(c)); }


x86 assembly (clang, -O0):
<u8issignc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <u8tointc@plt>
mov    %eax,%edi
call   1040 <u8issigni@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8issignc>:
push   %rax
call   1030 <u8tointc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <u8issigni@plt>

LLVM IR (-O0):
define i32 @u8issignc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @u8tointc(i8* %3)
%5 = call i32 @u8issigni(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @u8issignc(i8* %0) {
%2 = tail call i32 @u8tointc(i8* %0)
%3 = tail call i32 @u8issigni(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(size_t);
int /*<<< orphan*/ printf(char *);
void *getseg(size_t s) {
  void *p = malloc(s);
  if (p == NULL) {
    printf("PANIC: no memory!\n");
    exit(1);
  }
  return p;
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"PANIC: no memory!\0A\00"
define i8* @getseg(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %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 @printf(i8* getelementptr inbounds ([19 x i8], [19 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 = [18 x i8] c"PANIC: no memory!\00"
define noalias i8* @getseg(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i8* %2
}
char *skipbl(p)
char *p;
{
  while ((*p != '\0') && (*p == ' ' || *p == '\t'))
    ++p;
  return (p);
}


x86 assembly (clang, -O0):
<skipbl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1148 <skipbl+0x48>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0xa(%rbp)
je     1142 <skipbl+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <skipbl+0x58>
jmp    1169 <skipbl+0x69>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skipbl+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipbl>:
mov    %rdi,%rax
jmp    1114 <skipbl+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <skipbl+0x10>
cmp    $0x9,%cl
je     1110 <skipbl+0x10>
ret

LLVM IR (-O0):
define i8* @skipbl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %22, %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 %20
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 32
br i1 %12, label %18, label %13
13: ; preds = %8
%14 = load i8*, i8** %2
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 9
br label %18
18: ; preds = %13, %8
%19 = phi i1 [ true, %8 ], [ %17, %13 ]
br label %20
20: ; preds = %18, %3
%21 = phi i1 [ false, %3 ], [ %19, %18 ]
br i1 %21, label %22, label %25
22: ; preds = %20
%23 = load i8*, i8** %2
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %2
br label %3
25: ; preds = %20
%26 = load i8*, i8** %2
ret i8* %26
}

LLVM IR (-O2):
define i8* @skipbl(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 9, label %5
i8 32, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
scalar_t__ pow(float, float);
float powf(float x, float y) { return (float)pow(x, y); }


x86 assembly (clang, -O0):
<powf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <pow@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<powf>:
push   %rax
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @powf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call i64 @pow(float %5, float %6)
%8 = sitofp i64 %7 to float
ret float %8
}

LLVM IR (-O2):
define float @powf(float %0, float %1) {
%3 = tail call i64 @pow(float %0, float %1)
%4 = sitofp i64 %3 to float
ret float %4
}
void foo100(int p) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @foo100(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  double sum, atof(char[]);
  char line[100];
  int my_getline(char line[], int max);
  sum = 0;
  while (my_getline(line, 100) > 0)
    printf("\t%g\n", sum += atof(line));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
mov    $0x64,%esi
call   1050 <my_getline@plt>
cmp    $0x0,%eax
jle    1185 <main+0x55>
lea    -0x80(%rbp),%rdi
call   1030 <atof@plt>
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
jmp    114a <main+0x1a>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x78,%rsp
lea    0x10(%rsp),%rdi
mov    $0x64,%esi
call   1050 <my_getline@plt>
test   %eax,%eax
jle    1195 <main+0x65>
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x10(%rsp),%rbx
lea    0xea0(%rip),%r14
mov    %rbx,%rdi
call   1030 <atof@plt>
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
mov    %r14,%rdi
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
call   1050 <my_getline@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"\09%g\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca [100 x i8]
store i32 0, i32* %1
store double 0.000000e+00, double* %2
br label %4
4: ; preds = %8, %0
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%6 = call i32 @my_getline(i8* %5, i32 100)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%10 = call double @atof(i8* %9)
%11 = load double, double* %2
%12 = fadd double %11, %10
store double %12, double* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %12)
br label %4
14: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"\09%g\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @my_getline(i8* %2, i32 100)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %0, %5
%6 = phi double [ %8, %5 ], [ 0.000000e+00, %0 ]
%7 = call double @atof(i8* %2)
%8 = fadd double %6, %7
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %8)
%10 = call i32 @my_getline(i8* %2, i32 100)
%11 = icmp sgt i32 %10, 0
br i1 %11, label %5, label %12
12: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_query();
int /*<<< orphan*/ printf(char *);
void print_footer() {
  printf("<!-- ");
  print_query();
  printf(" -->\n");
  printf("</body>\n</html>\n");
}


x86 assembly (clang, -O0):
<print_footer>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <print_query@plt>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_footer>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <print_query@plt>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"<!-- \00"
@.str.1 = [6 x i8] c" -->\0A\00"
@.str.2 = [17 x i8] c"</body>\0A</html>\0A\00"
define void @print_footer() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @print_query()
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"<!-- \00"
@str = [5 x i8] c" -->\00"
@str.3 = [16 x i8] c"</body>\0A</html>\00"
define void @print_footer() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @print_query()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.3, i64 0, i64 0))
ret void
}
unsigned char __inb(int port) {
  return *((volatile unsigned char *)(0x80000000 + port));
}


x86 assembly (clang, -O0):
<__inb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80000000,%eax
mov    %eax,%eax
mov    (%rax),%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__inb>:
mov    %edi,%eax
mov    $0x80000000,%ecx
xor    %rax,%rcx
mov    (%rcx),%al
ret

LLVM IR (-O0):
define zeroext i8 @__inb(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 -2147483648, %3
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = load volatile i8, i8* %6
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @__inb(i32 %0) {
%2 = xor i32 %0, -2147483648
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
%5 = load volatile i8, i8* %4
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ rand();
void main() {
  unsigned int uInt = (unsigned int)(rand());
  if (uInt >= 0) {
    printf("Always prints\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <rand@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jb     1148 <main+0x28>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Always prints\0A\00"
define void @main() {
%1 = alloca i32
%2 = call i64 (...) @rand()
%3 = trunc i64 %2 to i32
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp uge i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"Always prints\00"
define void @main() {
%1 = tail call i64 (...) @rand()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
void test20_Blink1_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test20_Blink1_targetInit__I() {
ret void
}
int x32_process_synack(struct mypacket *packet) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.mypacket = type opaque
define i32 @x32_process_synack(%struct.mypacket* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CALC_appendString(char *);
void CALC_add6() { CALC_appendString("6"); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"6\00"
define void @CALC_add6() {
%1 = tail call i32 @CALC_appendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int isgraph(int /*<<< orphan*/);
int iswgraph(wint_t c) { return isgraph(c); }


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

x86 assembly (clang, -O2):
<iswgraph>:
jmp    1030 <isgraph@plt>

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

LLVM IR (-O2):
define i32 @iswgraph(i32 %0) {
%2 = tail call i32 @isgraph(i32 %0)
ret i32 %2
}
void __attribute__((weak)) vApplicationTickHook() {}


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

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

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

LLVM IR (-O2):
define weak void @vApplicationTickHook() {
ret void
}
/* Variables and functions */
scalar_t__ av_isdigit(int);
int av_tolower(int);
int av_isxdigit(int c) {
  c = av_tolower(c);
  return av_isdigit(c) || (c >= 'a' && c <= 'f');
}


x86 assembly (clang, -O0):
<av_isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <av_tolower@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <av_isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    116f <av_isxdigit+0x4f>
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1169 <av_isxdigit+0x49>
cmpl   $0x66,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_isxdigit>:
push   %rbx
call   1040 <av_tolower@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <av_isdigit@plt>
test   %rax,%rax
setne  %al
add    $0xffffff9f,%ebx
cmp    $0x6,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @av_isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @av_tolower(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i64 @av_isdigit(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 97
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 102
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br label %16
16: ; preds = %14, %1
%17 = phi i1 [ true, %1 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @av_isxdigit(i32 %0) {
%2 = tail call i32 @av_tolower(i32 %0)
%3 = tail call i64 @av_isdigit(i32 %2)
%4 = icmp ne i64 %3, 0
%5 = add i32 %2, -97
%6 = icmp ult i32 %5, 6
%7 = or i1 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ _set_heaptop(char *);
char *sbrk(long adj) {
  extern char end;
  static char *heap = &end;
  char *rv = heap;
  heap += adj;
  _set_heaptop(heap);
  return rv;
}


x86 assembly (clang, -O0):
<sbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2f05(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    0x2ef6(%rip),%rax
mov    %rax,0x2eef(%rip)
mov    0x2ee8(%rip),%rdi
call   1030 <_set_heaptop@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbrk>:
push   %rbx
mov    0x2f10(%rip),%rbx
add    %rbx,%rdi
mov    %rdi,0x2f06(%rip)
call   1030 <_set_heaptop@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@sbrk.heap = internal global i8* @end
@end = external global i8
define i8* @sbrk(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i8*, i8** @sbrk.heap
store i8* %4, i8** %3
%5 = load i64, i64* %2
%6 = load i8*, i8** @sbrk.heap
%7 = getelementptr inbounds i8, i8* %6, i64 %5
store i8* %7, i8** @sbrk.heap
%8 = load i8*, i8** @sbrk.heap
%9 = call i32 @_set_heaptop(i8* %8)
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@sbrk.heap = internal unnamed_addr global i8* @end
@end = external global i8
define i8* @sbrk(i64 %0) {
%2 = load i8*, i8** @sbrk.heap
%3 = getelementptr inbounds i8, i8* %2, i64 %0
store i8* %3, i8** @sbrk.heap
%4 = tail call i32 @_set_heaptop(i8* %3)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ _HCI_cmd(int /*<<< orphan*/, int, int, int);
void HCI_API_cmdReset() { _HCI_cmd(0, 0x03, 0x03, 3); }


x86 assembly (clang, -O0):
<HCI_API_cmdReset>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x3,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <_HCI_cmd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HCI_API_cmdReset>:
xor    %edi,%edi
mov    $0x3,%esi
mov    $0x3,%edx
mov    $0x3,%ecx
jmp    1030 <_HCI_cmd@plt>

LLVM IR (-O0):
define void @HCI_API_cmdReset() {
%1 = call i32 @_HCI_cmd(i32 0, i32 3, i32 3, i32 3)
ret void
}

LLVM IR (-O2):
define void @HCI_API_cmdReset() {
%1 = tail call i32 @_HCI_cmd(i32 0, i32 3, i32 3, i32 3)
ret void
}
AX0I1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((((double *)10000000)[x0]) <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AX0I1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
movslq -0x1c(%rbp),%rcx
movsd  0xed8(%rip),%xmm0
mov    $0x989680,%eax
ucomisd (%rax,%rcx,8),%xmm0
jb     1144 <AX0I1+0x44>
movl   $0x1,-0x4(%rbp)
jmp    114b <AX0I1+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AX0I1>:
movslq %edi,%rcx
movsd  0xef5(%rip),%xmm0
xor    %eax,%eax
ucomisd 0x989680(,%rcx,8),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @AX0I1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load i32, i32* %10
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double, double* inttoptr (i64 10000000 to double*), i64 %15
%17 = load double, double* %16
%18 = fcmp ole double %17, 3.300000e+01
br i1 %18, label %19, label %20
19: ; preds = %6
store i32 1, i32* %7
br label %21
20: ; preds = %6
store i32 0, i32* %7
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
define i32 @AX0I1(double %0, double %1, i32 %2, i32 %3, double* nocapture readnone %4, double* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds double, double* inttoptr (i64 10000000 to double*), i64 %7
%9 = load double, double* %8
%10 = fcmp ole double %9, 3.300000e+01
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdout;
int posix_reader() {
  int number;
  printf("Enter a number: ");
  fflush(stdout);
  scanf("%d", &number);
  return number;
}


x86 assembly (clang, -O0):
<posix_reader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    0xeb8(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_reader>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    0xebf(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a number: \00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%d\00"
define i32 @posix_reader() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%d\00"
define i32 @posix_reader() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void printUsage() {
  printf("Convert .IBK instruments to OPL registers\n"
         "Usage: <IBK file> <OP3 file> [-header]\n");
  exit(EXIT_SUCCESS);
}


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

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

LLVM IR (-O0):
@.str = [82 x i8] c"Convert .IBK instruments to OPL registers\0AUsage: <IBK file> <OP3 file> [-header]\0A\00"
@EXIT_SUCCESS = global i32 0
define void @printUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [81 x i8] c"Convert .IBK instruments to OPL registers\0AUsage: <IBK file> <OP3 file> [-header]\00"
define void @printUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Type definitions */
struct cpu {
  int dummy;
};

/* Variables and functions */
unsigned char cpu_get_r8(struct cpu *, int);
unsigned char cpu_get_d(struct cpu *cpu) { return cpu_get_r8(cpu, (5)); }


x86 assembly (clang, -O0):
<cpu_get_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x5,%esi
call   1030 <cpu_get_r8@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.cpu = type { i32 }
define zeroext i8 @cpu_get_d(%struct.cpu* %0) {
%2 = alloca %struct.cpu*
store %struct.cpu* %0, %struct.cpu** %2
%3 = load %struct.cpu*, %struct.cpu** %2
%4 = call zeroext i8 @cpu_get_r8(%struct.cpu* %3, i32 5)
ret i8 %4
}

LLVM IR (-O2):
%struct.cpu = type { i32 }
define zeroext i8 @cpu_get_d(%struct.cpu* %0) {
%2 = tail call zeroext i8 @cpu_get_r8(%struct.cpu* %0, i32 5)
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ bwlzh_compress_gen(unsigned int *, int const,
                                      unsigned char *, int *,
                                      int /*<<< orphan*/, int /*<<< orphan*/);
void bwlzh_compress_no_lz77(unsigned int *vals, const int nvals,
                            unsigned char *output, int *output_len) {
  bwlzh_compress_gen(vals, nvals, output, output_len, 0, 0);
}


x86 assembly (clang, -O0):
<bwlzh_compress_no_lz77>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r9d,%r9d
mov    %r9d,%r8d
call   1030 <bwlzh_compress_gen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bwlzh_compress_no_lz77>:
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <bwlzh_compress_gen@plt>

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

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


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

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

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

LLVM IR (-O2):
@str = [50 x i8] c"NOT IMPLEMENTED:pa_format_info_set_prop_int_range\00"
define i32 @pa_format_info_set_prop_int_range() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int XGetTextProperty() {}


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

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

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

LLVM IR (-O2):
define i32 @XGetTextProperty() {
ret i32 undef
}
/* Variables and functions */
scalar_t__ RAND_MAX;
unsigned long Random(unsigned long *next) {
  return (*next = *next * 1103515245 + 12345) % ((unsigned long)RAND_MAX + 1);
}


x86 assembly (clang, -O0):
<Random>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x41c64e6d,(%rax),%rax
add    $0x3039,%rax
mov    -0x8(%rbp),%rcx
mov    %rax,(%rcx)
mov    0x2ec1(%rip),%rcx
mov    (%rcx),%rcx
add    $0x1,%rcx
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Random>:
imul   $0x41c64e6d,(%rdi),%rax
add    $0x3039,%rax
mov    %rax,(%rdi)
mov    0x2ed1(%rip),%rcx
mov    (%rcx),%rcx
add    $0x1,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     1133 <Random+0x33>
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define i64 @Random(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = mul i64 %4, 1103515245
%6 = add i64 %5, 12345
%7 = load i64*, i64** %2
store i64 %6, i64* %7
%8 = load i64, i64* @RAND_MAX
%9 = add i64 %8, 1
%10 = urem i64 %6, %9
ret i64 %10
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define i64 @Random(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = mul i64 %2, 1103515245
%4 = add i64 %3, 12345
store i64 %4, i64* %0
%5 = load i64, i64* @RAND_MAX
%6 = add i64 %5, 1
%7 = urem i64 %4, %6
ret i64 %7
}
double jd2epb(dj)
double dj;
{ return (1900.0 + (dj - 2415020.31352) / 365.242198781); }


x86 assembly (clang, -O0):
<jd2epb>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xefa(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xed2(%rip),%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @jd2epb(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 0x41426CD628216C61
%5 = fdiv double %4, 0x4076D3E00BD4386B
%6 = fadd double 1.900000e+03, %5
ret double %6
}

LLVM IR (-O2):
define double @jd2epb(double %0) {
%2 = fadd double %0, 0xC1426CD628216C61
%3 = fdiv double %2, 0x4076D3E00BD4386B
%4 = fadd double %3, 1.900000e+03
ret double %4
}
int b6b_isspace(const char c) {
  return ((c == ' ') || (c == '\t') || (c == '\n') || (c == '\r'));
}


x86 assembly (clang, -O0):
<b6b_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <b6b_isspace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     114d <b6b_isspace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     114d <b6b_isspace+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b6b_isspace>:
cmp    $0x20,%dil
ja     1120 <b6b_isspace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <b6b_isspace+0x20>
ret
xor    %eax,%eax
cmp    $0xd,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @b6b_isspace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 10, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 13
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
int check_level(int v, int level, char *name) {
  int result = 0;
  if (v & level) {
    printf("\t\t%s (%d) matches;\n", name, level);
    result = 1;
  }
  return result;
}


x86 assembly (clang, -O0):
<check_level>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
je     1152 <check_level+0x42>
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_level>:
test   %edi,%esi
je     1132 <check_level+0x22>
push   %rax
mov    %esi,%eax
lea    0xee2(%rip),%rdi
mov    %rdx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@.str = [20 x i8] c"\09\09%s (%d) matches;\0A\00"
define i32 @check_level(i32 %0, i32 %1, i8* %2) {
%4 = and i32 %1, %0
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %1)
br label %8
8: ; preds = %6, %3
%9 = phi i32 [ 1, %6 ], [ 0, %3 ]
ret i32 %9
}