xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int remove(char const *);
void delete_processes_on_waiting() {
  const char *filepath = "/tmp/mmapped_pro_on_waiting.bin";
  int ret;
  ret = remove(filepath);
  if (ret == 0) {
    printf("File deleted successfully");
  } else {
    printf("Error: unable to delete the file");
  }
}


x86 assembly (clang, -O0):
<delete_processes_on_waiting>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <remove@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    115a <delete_processes_on_waiting+0x3a>
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
jmp    1166 <delete_processes_on_waiting+0x46>
lea    0xed9(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_processes_on_waiting>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <remove@plt>
test   %eax,%eax
lea    0xeea(%rip),%rax
lea    0xefd(%rip),%rdi
cmove  %rax,%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"/tmp/mmapped_pro_on_waiting.bin\00"
@.str.1 = [26 x i8] c"File deleted successfully\00"
@.str.2 = [33 x i8] c"Error: unable to delete the file\00"
define void @delete_processes_on_waiting() {
%1 = alloca i8*
%2 = alloca i32
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @remove(i8* %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"/tmp/mmapped_pro_on_waiting.bin\00"
@.str.1 = [26 x i8] c"File deleted successfully\00"
@.str.2 = [33 x i8] c"Error: unable to delete the file\00"
define void @delete_processes_on_waiting() {
%1 = tail call i32 @remove(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0)
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
ret void
}
int test_imm_40uint8_reg(unsigned char val) {
  return ((val) & (0x40 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_40uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 64
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *strpbrk(char *, char *);
void _trunc(char *string, char *delimit) {
  char *p = strpbrk(string, delimit);
  if (p) {
    *p = 0;
  }
}


x86 assembly (clang, -O0):
<_trunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strpbrk@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1143 <_trunc+0x33>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_trunc>:
push   %rax
call   1030 <strpbrk@plt>
test   %rax,%rax
je     111e <_trunc+0xe>
movb   $0x0,(%rax)
pop    %rax
ret

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

LLVM IR (-O2):
define void @_trunc(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strpbrk(i8* %0, i8* %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %2
store i8 0, i8* %3
br label %6
6: ; preds = %5, %2
ret void
}
/* Type definitions */
struct rte_json {
  int dummy;
};

/* Variables and functions */
int persist_value(char *, struct rte_json *, int /*<<< orphan*/, int);
int rte_persist_json(char *buf, struct rte_json *json, int fmt) {
  return persist_value(buf, json, 0, fmt);
}


x86 assembly (clang, -O0):
<rte_persist_json>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
xor    %edx,%edx
call   1030 <persist_value@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rte_persist_json>:
mov    %edx,%ecx
xor    %edx,%edx
jmp    1030 <persist_value@plt>

LLVM IR (-O0):
%struct.rte_json = type { i32 }
define i32 @rte_persist_json(i8* %0, %struct.rte_json* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca %struct.rte_json*
%6 = alloca i32
store i8* %0, i8** %4
store %struct.rte_json* %1, %struct.rte_json** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load %struct.rte_json*, %struct.rte_json** %5
%9 = load i32, i32* %6
%10 = call i32 @persist_value(i8* %7, %struct.rte_json* %8, i32 0, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.rte_json = type { i32 }
define i32 @rte_persist_json(i8* %0, %struct.rte_json* %1, i32 %2) {
%4 = tail call i32 @persist_value(i8* %0, %struct.rte_json* %1, i32 0, i32 %2)
ret i32 %4
}
int prestopno(int leto) {
  if ((leto % 4 == 0) && (!(leto % 100 == 0) || (leto % 400 == 0))) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<prestopno>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114f <prestopno+0x4f>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1143 <prestopno+0x43>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114f <prestopno+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <prestopno+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prestopno>:
test   $0x3,%dil
jne    1143 <prestopno+0x43>
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
ror    $0x2,%ecx
mov    $0x1,%eax
cmp    $0x28f5c28,%ecx
ja     1145 <prestopno+0x45>
movslq %edi,%rcx
imul   $0x51eb851f,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x27,%rcx
add    %edx,%ecx
imul   $0x190,%ecx,%ecx
sub    %ecx,%edi
je     1145 <prestopno+0x45>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @prestopno(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = srem i32 %0, 100
%6 = icmp ne i32 %5, 0
%7 = srem i32 %0, 400
%8 = icmp eq i32 %7, 0
%9 = or i1 %6, %8
br i1 %9, label %11, label %10
10: ; preds = %4, %1
br label %11
11: ; preds = %4, %10
%12 = phi i32 [ 0, %10 ], [ 1, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *parse_cifs_url(char *unc_name) {
  printf("\nMounting cifs URL not implemented yet. Attempt to mount %s\n",
         unc_name);
  return NULL;
}


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

x86 assembly (clang, -O2):
<parse_cifs_url>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [61 x i8] c"\0AMounting cifs URL not implemented yet. Attempt to mount %s\0A\00"
define i8* @parse_cifs_url(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i8* null
}

LLVM IR (-O2):
@.str = [61 x i8] c"\0AMounting cifs URL not implemented yet. Attempt to mount %s\0A\00"
define noalias i8* @parse_cifs_url(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* null
}
int generic_phy_power_on(struct phy *phy) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.phy = type opaque
define i32 @generic_phy_power_on(%struct.phy* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int erasestr(int);
int findKey(char *);
void eraseentry(char *id) {
  int entry = findKey(id);
  if (entry >= 0)
    erasestr(erasestr(entry));
}


x86 assembly (clang, -O0):
<eraseentry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <findKey@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1151 <eraseentry+0x31>
mov    -0xc(%rbp),%edi
call   1040 <erasestr@plt>
mov    %eax,%edi
call   1040 <erasestr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eraseentry>:
push   %rax
call   1030 <findKey@plt>
test   %eax,%eax
js     1139 <eraseentry+0x19>
mov    %eax,%edi
call   1040 <erasestr@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <erasestr@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @eraseentry(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @findKey(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i32 @erasestr(i32 %9)
%11 = call i32 @erasestr(i32 %10)
br label %12
12: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @eraseentry(i8* %0) {
%2 = tail call i32 @findKey(i8* %0)
%3 = icmp sgt i32 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @erasestr(i32 %2)
%6 = tail call i32 @erasestr(i32 %5)
br label %7
7: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ deinit_uinput_device();
int /*<<< orphan*/ die(char *, int);
int /*<<< orphan*/ tty_restore();
void sighandler(int sig) {
  tty_restore();
  deinit_uinput_device();
  die("got signal %d", sig);
}


x86 assembly (clang, -O0):
<sighandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <tty_restore@plt>
mov    $0x0,%al
call   1040 <deinit_uinput_device@plt>
mov    -0x4(%rbp),%esi
lea    0xead(%rip),%rdi
call   1050 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighandler>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <tty_restore@plt>
xor    %eax,%eax
call   1040 <deinit_uinput_device@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1050 <die@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"got signal %d\00"
define void @sighandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @tty_restore()
%4 = call i32 (...) @deinit_uinput_device()
%5 = load i32, i32* %2
%6 = call i32 @die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"got signal %d\00"
define void @sighandler(i32 %0) {
%2 = tail call i32 (...) @tty_restore()
%3 = tail call i32 (...) @deinit_uinput_device()
%4 = tail call i32 @die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
signed int stat(const char *__path, struct stat *__statbuf) {
  signed int return_value___xstat$1;
  return_value___xstat$1 = __xstat(1, __path, __statbuf);
  return return_value___xstat$1;
}


x86 assembly (clang, -O0):
<stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <__xstat@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.stat = type opaque
define i32 @stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
%5 = alloca i32
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%6 = load i8*, i8** %3
%7 = load %struct.stat*, %struct.stat** %4
%8 = call i32 (i32, i8*, %struct.stat*, ...) bitcast (i32 (...)* @__xstat to i32 (i32, i8*, %struct.stat*, ...)*)(i32 1, i8* %6, %struct.stat* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @stat(i8* %0, %struct.stat* %1) {
%3 = tail call i32 (i32, i8*, %struct.stat*, ...) bitcast (i32 (...)* @__xstat to i32 (i32, i8*, %struct.stat*, ...)*)(i32 1, i8* %0, %struct.stat* %1)
ret i32 %3
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void err(const char *s) {
  fprintf(stderr, "%d:", errno);
  fprintf(stderr, "%s\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
lea    0xebb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
mov    0x2ea0(%rip),%rax
mov    (%rax),%edx
lea    0xebf(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%d:\00"
@errno = global i32 0
@.str.1 = [4 x i8] c"%s\0A\00"
define void @err(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%7 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void nrerror(char *message) {
  fprintf(stderr, "\n%s\n", message);
  exit(0);
}


x86 assembly (clang, -O0):
<nrerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<nrerror>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c"\0A%s\0A\00"
define void @nrerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"\0A%s\0A\00"
define void @nrerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int strlen(char *);
int is_valid_nickname(char *nickname) {
  int len;
  if (nickname == NULL) {
    return 0;
  }
  len = strlen(nickname);
  if (len == 0 || len > 31) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_valid_nickname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <is_valid_nickname+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1166 <is_valid_nickname+0x56>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1153 <is_valid_nickname+0x43>
cmpl   $0x1f,-0x14(%rbp)
jle    115f <is_valid_nickname+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    1166 <is_valid_nickname+0x56>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_nickname>:
test   %rdi,%rdi
je     1130 <is_valid_nickname+0x20>
push   %rax
call   1030 <strlen@plt>
test   %eax,%eax
setne  %cl
cmp    $0x20,%eax
setl   %al
and    %cl,%al
movzbl %al,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_valid_nickname(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %18
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @strlen(i8* %9)
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %8
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 31
br i1 %15, label %16, label %17
16: ; preds = %13, %8
store i32 0, i32* %2
br label %18
17: ; preds = %13
store i32 1, i32* %2
br label %18
18: ; preds = %17, %16, %7
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @is_valid_nickname(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp ne i32 %4, 0
%6 = icmp slt i32 %4, 32
%7 = and i1 %5, %6
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %10
}
void set_A1_A2(int A1[2], int A2[2], int M, int N) {
  A1[0] = M / 2;
  A1[1] = N / 2;
  A2[0] = M / 2 + 1;
  A2[1] = N / 2 + 1;
}


x86 assembly (clang, -O0):
<set_A1_A2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_A1_A2>:
mov    %edx,%eax
shr    $0x1f,%eax
add    %edx,%eax
sar    %eax
mov    %eax,(%rdi)
mov    %ecx,%edx
shr    $0x1f,%edx
add    %ecx,%edx
sar    %edx
mov    %edx,0x4(%rdi)
add    $0x1,%eax
mov    %eax,(%rsi)
add    $0x1,%edx
mov    %edx,0x4(%rsi)
ret

LLVM IR (-O0):
define void @set_A1_A2(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = sdiv i32 %9, 2
%11 = load i32*, i32** %5
%12 = getelementptr inbounds i32, i32* %11, i64 0
store i32 %10, i32* %12
%13 = load i32, i32* %8
%14 = sdiv i32 %13, 2
%15 = load i32*, i32** %5
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %14, i32* %16
%17 = load i32, i32* %7
%18 = sdiv i32 %17, 2
%19 = add nsw i32 %18, 1
%20 = load i32*, i32** %6
%21 = getelementptr inbounds i32, i32* %20, i64 0
store i32 %19, i32* %21
%22 = load i32, i32* %8
%23 = sdiv i32 %22, 2
%24 = add nsw i32 %23, 1
%25 = load i32*, i32** %6
%26 = getelementptr inbounds i32, i32* %25, i64 1
store i32 %24, i32* %26
ret void
}

LLVM IR (-O2):
define void @set_A1_A2(i32* nocapture writeonly %0, i32* nocapture writeonly %1, i32 %2, i32 %3) {
%5 = sdiv i32 %2, 2
store i32 %5, i32* %0
%6 = sdiv i32 %3, 2
%7 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %6, i32* %7
%8 = add nsw i32 %5, 1
store i32 %8, i32* %1
%9 = add nsw i32 %6, 1
%10 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %9, i32* %10
ret void
}
void rt_chk_robin(void) { ; }


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

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

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

LLVM IR (-O2):
define void @rt_chk_robin() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ecleq_aux(int, double, double, double, double *, double *);
void eq_ecl(double mj, double ra, double dec, double *lt, double *lg) {
  ecleq_aux(1, mj, ra, dec, lg, lt);
}


x86 assembly (clang, -O0):
<eq_ecl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    $0x1,%edi
call   1030 <ecleq_aux@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @eq_ecl(double %0, double %1, double %2, double* %3, double* %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double*
%10 = alloca double*
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double* %3, double** %9
store double* %4, double** %10
%11 = load double, double* %6
%12 = load double, double* %7
%13 = load double, double* %8
%14 = load double*, double** %10
%15 = load double*, double** %9
%16 = call i32 @ecleq_aux(i32 1, double %11, double %12, double %13, double* %14, double* %15)
ret void
}

LLVM IR (-O2):
define void @eq_ecl(double %0, double %1, double %2, double* %3, double* %4) {
%6 = tail call i32 @ecleq_aux(i32 1, double %0, double %1, double %2, double* %4, double* %3)
ret void
}
int main() {
  int i;
  i = 0;
  while (i < 10) {
    i = i + 1;
  }
  i = 0;
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    112a <main+0x2a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
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
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
br label %3
9: ; preds = %3
store i32 0, i32* %2
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ lightabbr_high(double);
scalar_t__ nutation(double);
double vsop(double);
double apparentsun(double jd, int ignorenutation) {
  double geolon;
  geolon = vsop(jd) + 3.14159265358979323846;
  if (!ignorenutation)
    geolon += nutation(jd);
  geolon += lightabbr_high(jd);
  return geolon;
}


x86 assembly (clang, -O0):
<apparentsun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <vsop@plt>
movsd  0xeae(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    117e <apparentsun+0x4e>
movsd  -0x8(%rbp),%xmm0
call   1030 <nutation@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <lightabbr_high@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apparentsun>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movsd  %xmm0,0x8(%rsp)
call   1040 <vsop@plt>
addsd  0xeb6(%rip),%xmm0
test   %ebx,%ebx
movsd  %xmm0,(%rsp)
jne    1174 <apparentsun+0x44>
movsd  0x8(%rsp),%xmm0
call   1030 <nutation@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <lightabbr_high@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @apparentsun(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
%6 = load double, double* %3
%7 = call double @vsop(double %6)
%8 = fadd double %7, 0x400921FB54442D18
store double %8, double* %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %17, label %11
11: ; preds = %2
%12 = load double, double* %3
%13 = call i64 @nutation(double %12)
%14 = sitofp i64 %13 to double
%15 = load double, double* %5
%16 = fadd double %15, %14
store double %16, double* %5
br label %17
17: ; preds = %11, %2
%18 = load double, double* %3
%19 = call i64 @lightabbr_high(double %18)
%20 = sitofp i64 %19 to double
%21 = load double, double* %5
%22 = fadd double %21, %20
store double %22, double* %5
%23 = load double, double* %5
ret double %23
}

LLVM IR (-O2):
define double @apparentsun(double %0, i32 %1) {
%3 = tail call double @vsop(double %0)
%4 = fadd double %3, 0x400921FB54442D18
%5 = icmp eq i32 %1, 0
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i64 @nutation(double %0)
%8 = sitofp i64 %7 to double
%9 = fadd double %4, %8
br label %10
10: ; preds = %6, %2
%11 = phi double [ %4, %2 ], [ %9, %6 ]
%12 = tail call i64 @lightabbr_high(double %0)
%13 = sitofp i64 %12 to double
%14 = fadd double %11, %13
ret double %14
}
/* Variables and functions */
double song_enable_cmd(double, double, double, int /*<<< orphan*/, int);
double modipulategml_song_enable_volume(double songid, double ch, double cmd) {
  return song_enable_cmd(songid, ch, cmd, 0, 1);
}


x86 assembly (clang, -O0):
<modipulategml_song_enable_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <song_enable_cmd@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @modipulategml_song_enable_volume(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call double @song_enable_cmd(double %7, double %8, double %9, i32 0, i32 1)
ret double %10
}

LLVM IR (-O2):
define double @modipulategml_song_enable_volume(double %0, double %1, double %2) {
%4 = tail call double @song_enable_cmd(double %0, double %1, double %2, i32 0, i32 1)
ret double %4
}
void gtk_separator_menu_item_get_type() {}


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

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

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

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

/* Variables and functions */
struct memorycontainer *createExpression(int, struct memorycontainer *,
                                         struct memorycontainer *);
struct memorycontainer *
createPowExpression(struct memorycontainer *expression1,
                    struct memorycontainer *expression2) {
  return createExpression(0x19, expression1, expression2);
}


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

x86 assembly (clang, -O2):
<createPowExpression>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x19,%edi
jmp    1030 <createExpression@plt>

LLVM IR (-O0):
%struct.memorycontainer = type { i32 }
define %struct.memorycontainer* @createPowExpression(%struct.memorycontainer* %0, %struct.memorycontainer* %1) {
%3 = alloca %struct.memorycontainer*
%4 = alloca %struct.memorycontainer*
store %struct.memorycontainer* %0, %struct.memorycontainer** %3
store %struct.memorycontainer* %1, %struct.memorycontainer** %4
%5 = load %struct.memorycontainer*, %struct.memorycontainer** %3
%6 = load %struct.memorycontainer*, %struct.memorycontainer** %4
%7 = call %struct.memorycontainer* @createExpression(i32 25, %struct.memorycontainer* %5, %struct.memorycontainer* %6)
ret %struct.memorycontainer* %7
}

LLVM IR (-O2):
%struct.memorycontainer = type { i32 }
define %struct.memorycontainer* @createPowExpression(%struct.memorycontainer* %0, %struct.memorycontainer* %1) {
%3 = tail call %struct.memorycontainer* @createExpression(i32 25, %struct.memorycontainer* %0, %struct.memorycontainer* %1)
ret %struct.memorycontainer* %3
}
/* Variables and functions */
int /*<<< orphan*/ handle_60(int /*<<< orphan*/);
int gen_60(void) {
  handle_60(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_60>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_60@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gen_60() {
%1 = call i32 @handle_60(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_60() {
%1 = tail call i32 @handle_60(i32 0)
ret i32 0
}
/* Variables and functions */
scalar_t__ isdigit(char);
int getfld(char **p) {
  int fld;
  fld = 0;
  while (isdigit(**p))
    fld = (fld * 10) + ((*((*p)++)) - '0');
  return fld;
}


x86 assembly (clang, -O0):
<getfld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1161 <getfld+0x51>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <getfld+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getfld>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1154 <getfld+0x44>
nopl   0x0(%rax)
lea    (%rbx,%rbx,4),%eax
mov    (%r14),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%r14)
movsbl (%rcx),%edx
lea    (%rdx,%rax,2),%ebx
add    $0xffffffd0,%ebx
movsbl 0x1(%rcx),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
jne    1130 <getfld+0x20>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @getfld(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = tail call i64 @isdigit(i8 signext %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %1, %6
%7 = phi i32 [ %14, %6 ], [ 0, %1 ]
%8 = mul nsw i32 %7, 10
%9 = load i8*, i8** %0
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %10, i8** %0
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = add i32 %8, -48
%14 = add i32 %13, %12
%15 = load i8, i8* %10
%16 = tail call i64 @isdigit(i8 signext %15)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %6
18: ; preds = %6, %1
%19 = phi i32 [ 0, %1 ], [ %14, %6 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int __VERIFIER_nondet_int();
int fibonacci(int);
int main() {
  int x = __VERIFIER_nondet_int();
  if (x < 1)
    return 0;
  int result = fibonacci(x);
  if (result >= 1) {
    return 0;
  } else {
  ERROR:
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    115f <main+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    118c <main+0x5c>
mov    -0x8(%rbp),%edi
call   1040 <fibonacci@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jl     1180 <main+0x50>
movl   $0x0,-0x4(%rbp)
jmp    118c <main+0x5c>
jmp    1185 <main+0x55>
mov    $0x0,%al
call   1050 <__VERIFIER_error@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jle    114e <main+0x1e>
mov    %eax,%edi
call   1040 <fibonacci@plt>
test   %eax,%eax
jg     114e <main+0x1e>
xor    %eax,%eax
call   1050 <__VERIFIER_error@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 0, i32* %1
br label %17
8: ; preds = %0
%9 = load i32, i32* %2
%10 = call i32 @fibonacci(i32 %9)
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = icmp sge i32 %11, 1
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 0, i32* %1
br label %17
14: ; preds = %8
br label %15
15: ; preds = %14
%16 = call i32 (...) @__VERIFIER_error()
br label %17
17: ; preds = %7, %13, %15
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp slt i32 %1, 1
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 @fibonacci(i32 %1)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (...) @__VERIFIER_error()
br label %8
8: ; preds = %6, %3, %0
ret i32 0
}
/* Variables and functions */
double map(int, int, int);
int split_map(int dim_in, int dim_out, int pos, float *rest) {
  double smp;
  int smp_i;
  smp = map(dim_in, dim_out, pos);
  smp_i = smp < 0 ? -1 : smp;
  *rest = smp - smp_i;
  return smp_i;
}


x86 assembly (clang, -O0):
<split_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <map@plt>
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1158 <split_map+0x48>
movsd  0xeb2(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1162 <split_map+0x52>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x24(%rbp)
movsd  -0x20(%rbp),%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<split_map>:
push   %rbx
mov    %rcx,%rbx
call   1030 <map@plt>
xorpd  %xmm1,%xmm1
movapd %xmm0,%xmm2
cmpltsd %xmm1,%xmm2
movsd  0xed2(%rip),%xmm1
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm2,%xmm1
cvttsd2si %xmm1,%eax
cvttpd2dq %xmm1,%xmm1
cvtdq2pd %xmm1,%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @split_map(i32 %0, i32 %1, i32 %2, float* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca float*
%9 = alloca double
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store float* %3, float** %8
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = call double @map(i32 %11, i32 %12, i32 %13)
store double %14, double* %9
%15 = load double, double* %9
%16 = fcmp olt double %15, 0.000000e+00
br i1 %16, label %17, label %18
17: ; preds = %4
br label %20
18: ; preds = %4
%19 = load double, double* %9
br label %20
20: ; preds = %18, %17
%21 = phi double [ -1.000000e+00, %17 ], [ %19, %18 ]
%22 = fptosi double %21 to i32
store i32 %22, i32* %10
%23 = load double, double* %9
%24 = load i32, i32* %10
%25 = sitofp i32 %24 to double
%26 = fsub double %23, %25
%27 = fptrunc double %26 to float
%28 = load float*, float** %8
store float %27, float* %28
%29 = load i32, i32* %10
ret i32 %29
}

LLVM IR (-O2):
define i32 @split_map(i32 %0, i32 %1, i32 %2, float* nocapture writeonly %3) {
%5 = tail call double @map(i32 %0, i32 %1, i32 %2)
%6 = fcmp olt double %5, 0.000000e+00
%7 = select i1 %6, double -1.000000e+00, double %5
%8 = fptosi double %7 to i32
%9 = sitofp i32 %8 to double
%10 = fsub double %5, %9
%11 = fptrunc double %10 to float
store float %11, float* %3
ret i32 %8
}
void input_update(void *data) {}


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

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

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

LLVM IR (-O2):
define void @input_update(i8* nocapture %0) {
ret void
}
/* Variables and functions */
long map(float, float, float, int /*<<< orphan*/, int);
long ind_map10(float val, float val_min, float val_max) {
  return map(val * 10.0, val_min * 10.0, val_max * 10.0, 0, 255);
}


x86 assembly (clang, -O0):
<ind_map10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec8(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xeaf(%rip),%xmm2
mulsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movsd  0xe96(%rip),%xmm3
mulsd  %xmm3,%xmm2
cvtsd2ss %xmm2,%xmm2
xor    %edi,%edi
mov    $0xff,%esi
call   1030 <map@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ind_map10>:
movss  0xee8(%rip),%xmm3
mulss  %xmm3,%xmm0
mulss  %xmm3,%xmm1
mulss  %xmm3,%xmm2
xor    %edi,%edi
mov    $0xff,%esi
jmp    1030 <map@plt>

LLVM IR (-O0):
define i64 @ind_map10(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = fmul double %8, 1.000000e+01
%10 = fptrunc double %9 to float
%11 = load float, float* %5
%12 = fpext float %11 to double
%13 = fmul double %12, 1.000000e+01
%14 = fptrunc double %13 to float
%15 = load float, float* %6
%16 = fpext float %15 to double
%17 = fmul double %16, 1.000000e+01
%18 = fptrunc double %17 to float
%19 = call i64 @map(float %10, float %14, float %18, i32 0, i32 255)
ret i64 %19
}

LLVM IR (-O2):
define i64 @ind_map10(float %0, float %1, float %2) {
%4 = fmul float %0, 1.000000e+01
%5 = fmul float %1, 1.000000e+01
%6 = fmul float %2, 1.000000e+01
%7 = tail call i64 @map(float %4, float %5, float %6, i32 0, i32 255)
ret i64 %7
}
/* Variables and functions */
double cbrt(double);
double cbrtf(double s) { return cbrt((double)s); }


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

x86 assembly (clang, -O2):
<cbrtf>:
jmp    1030 <cbrt@plt>

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

LLVM IR (-O2):
define double @cbrtf(double %0) {
%2 = tail call double @cbrt(double %0)
ret double %2
}
int CycleLength(int number) {
  int cycleLength = 0;
  while (number != 1) {
    if (number & 0x01)
      number = number * 3 + 1;
    else
      number = number / 2;
    cycleLength++;
  }
  return (number == 1) ? cycleLength + 1 : cycleLength;
}


x86 assembly (clang, -O0):
<CycleLength>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
je     1152 <CycleLength+0x52>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1136 <CycleLength+0x36>
imul   $0x3,-0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1144 <CycleLength+0x44>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <CycleLength+0xe>
cmpl   $0x1,-0x4(%rbp)
jne    116a <CycleLength+0x6a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1170 <CycleLength+0x70>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CycleLength>:
mov    $0x1,%eax
cmp    $0x1,%edi
jne    110b <CycleLength+0xb>
ret
mov    $0x1,%eax
jmp    1133 <CycleLength+0x33>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edi,%ecx
shr    $0x1f,%ecx
add    %edi,%ecx
sar    %ecx
mov    %ecx,%edi
add    $0x1,%eax
cmp    $0x1,%edi
je     110a <CycleLength+0xa>
test   $0x1,%dil
je     1120 <CycleLength+0x20>
lea    (%rdi,%rdi,2),%edi
add    $0x1,%edi
jmp    112b <CycleLength+0x2b>

LLVM IR (-O0):
define i32 @CycleLength(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 1
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load i32, i32* %2
%9 = and i32 %8, 1
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i32, i32* %2
%13 = mul nsw i32 %12, 3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %18
15: ; preds = %7
%16 = load i32, i32* %2
%17 = sdiv i32 %16, 2
store i32 %17, i32* %2
br label %18
18: ; preds = %15, %11
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
%22 = load i32, i32* %2
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
br label %29
27: ; preds = %21
%28 = load i32, i32* %3
br label %29
29: ; preds = %27, %24
%30 = phi i32 [ %26, %24 ], [ %28, %27 ]
ret i32 %30
}

LLVM IR (-O2):
define i32 @CycleLength(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %17, label %3
3: ; preds = %1, %13
%4 = phi i32 [ %15, %13 ], [ 1, %1 ]
%5 = phi i32 [ %14, %13 ], [ %0, %1 ]
%6 = and i32 %5, 1
%7 = icmp eq i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = mul nsw i32 %5, 3
%10 = add nsw i32 %9, 1
br label %13
11: ; preds = %3
%12 = sdiv i32 %5, 2
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ %10, %8 ], [ %12, %11 ]
%15 = add i32 %4, 1
%16 = icmp eq i32 %14, 1
br i1 %16, label %17, label %3
17: ; preds = %13, %1
%18 = phi i32 [ 1, %1 ], [ %15, %13 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ settingsRead();
long SIOopen(unsigned long *gpuDisp) {
  settingsRead();
  return 0;
}


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

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

LLVM IR (-O0):
define i64 @SIOopen(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i32 (...) @settingsRead()
ret i64 0
}

LLVM IR (-O2):
define i64 @SIOopen(i64* nocapture readnone %0) {
%2 = tail call i32 (...) @settingsRead()
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *, char const *, int, char const *);
void NOT_IMPLEMENTED(const char *filename, int line, const char *function) {
  printf("%s:%d:%s(): NOT IMPLEMENTED\n", filename, line, function);
  abort();
}


x86 assembly (clang, -O0):
<NOT_IMPLEMENTED>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<NOT_IMPLEMENTED>:
push   %rax
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"%s:%d:%s(): NOT IMPLEMENTED\0A\00"
define void @NOT_IMPLEMENTED(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9)
%11 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [29 x i8] c"%s:%d:%s(): NOT IMPLEMENTED\0A\00"
define void @NOT_IMPLEMENTED(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2)
%5 = tail call i32 (...) @abort()
unreachable
}