xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ amaret_local_A1_clear__E();
int /*<<< orphan*/ amaret_local_A1_makeOutput__E();
int /*<<< orphan*/ amaret_local_Mcu_reset__E();
void test33_Blink1_pollen__reset__E() {
  amaret_local_Mcu_reset__E();
  amaret_local_A1_clear__E();
  amaret_local_A1_makeOutput__E();
}


x86 assembly (clang, -O0):
<test33_Blink1_pollen__reset__E>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <amaret_local_Mcu_reset__E@plt>
mov    $0x0,%al
call   1030 <amaret_local_A1_clear__E@plt>
mov    $0x0,%al
call   1050 <amaret_local_A1_makeOutput__E@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test33_Blink1_pollen__reset__E>:
push   %rax
xor    %eax,%eax
call   1040 <amaret_local_Mcu_reset__E@plt>
xor    %eax,%eax
call   1030 <amaret_local_A1_clear__E@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <amaret_local_A1_makeOutput__E@plt>

LLVM IR (-O0):
define void @test33_Blink1_pollen__reset__E() {
%1 = call i32 (...) @amaret_local_Mcu_reset__E()
%2 = call i32 (...) @amaret_local_A1_clear__E()
%3 = call i32 (...) @amaret_local_A1_makeOutput__E()
ret void
}

LLVM IR (-O2):
define void @test33_Blink1_pollen__reset__E() {
%1 = tail call i32 (...) @amaret_local_Mcu_reset__E()
%2 = tail call i32 (...) @amaret_local_A1_clear__E()
%3 = tail call i32 (...) @amaret_local_A1_makeOutput__E()
ret void
}
int xfuse_add_clip_dir_item(const char *filename, int flags, int size,
                            int lindex) {
  return 0;
}


x86 assembly (clang, -O0):
<xfuse_add_clip_dir_item>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xfuse_add_clip_dir_item(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @xfuse_add_clip_dir_item(i8* nocapture readnone %0, i32 %1, i32 %2, i32 %3) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ itc_net_fcntl_p_dupfd();
int /*<<< orphan*/ itc_net_fcntl_p_dupfd_nonblock();
int itc_net_fcntl_main(void) {
  itc_net_fcntl_p_dupfd();
  itc_net_fcntl_p_dupfd_nonblock();
  return 0;
}


x86 assembly (clang, -O0):
<itc_net_fcntl_main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <itc_net_fcntl_p_dupfd@plt>
mov    $0x0,%al
call   1030 <itc_net_fcntl_p_dupfd_nonblock@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<itc_net_fcntl_main>:
push   %rax
xor    %eax,%eax
call   1040 <itc_net_fcntl_p_dupfd@plt>
xor    %eax,%eax
call   1030 <itc_net_fcntl_p_dupfd_nonblock@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @itc_net_fcntl_main() {
%1 = call i32 (...) @itc_net_fcntl_p_dupfd()
%2 = call i32 (...) @itc_net_fcntl_p_dupfd_nonblock()
ret i32 0
}

LLVM IR (-O2):
define i32 @itc_net_fcntl_main() {
%1 = tail call i32 (...) @itc_net_fcntl_p_dupfd()
%2 = tail call i32 (...) @itc_net_fcntl_p_dupfd_nonblock()
ret i32 0
}
void bfq_update_budget(struct bfq_entity *next_in_service) {}


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

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

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

LLVM IR (-O2):
%struct.bfq_entity = type opaque
define void @bfq_update_budget(%struct.bfq_entity* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printdir(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc != 2) {
    fprintf(stderr, "Usage: %s <path>\n", argv[0]);
    exit(EXIT_FAILURE);
  }
  printdir(argv[1], 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     117a <main+0x4a>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe99(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %esi,%esi
call   1040 <printdir@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1145 <main+0x15>
mov    0x8(%rsi),%rdi
xor    %esi,%esi
call   1040 <printdir@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xea8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"Usage: %s <path>\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @printdir(i8* %19, i32 0)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"Usage: %s <path>\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = tail call i32 @printdir(i8* %12, i32 0)
ret i32 0
}
unsigned int vsetne4(unsigned int a, unsigned int b) {
  unsigned int r, c;
  r = a ^ b;
  c = r | 0x80808080;
  c = c - 0x01010101;
  c = r | c;
  c = c & 0x80808080;
  r = c >> 7;
  return r;
}


x86 assembly (clang, -O0):
<vsetne4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
or     $0x80808080,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1010101,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x80808080,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shr    $0x7,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsetne4>:
xor    %esi,%edi
mov    %edi,%eax
or     $0x80808080,%eax
add    $0xfefefeff,%eax
or     %edi,%eax
shr    $0x7,%eax
and    $0x1010101,%eax
ret

LLVM IR (-O0):
define i32 @vsetne4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = xor i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = or i32 %10, -2139062144
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = sub i32 %12, 16843009
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = or i32 %14, %15
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = and i32 %17, -2139062144
store i32 %18, i32* %6
%19 = load i32, i32* %6
%20 = lshr i32 %19, 7
store i32 %20, i32* %5
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
define i32 @vsetne4(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = or i32 %3, -2139062144
%5 = add i32 %4, -16843009
%6 = or i32 %5, %3
%7 = lshr i32 %6, 7
%8 = and i32 %7, 16843009
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char const *, char const *);
int /*<<< orphan*/ getc(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
FILE *apriFile(const char *nome, const char *modo) {
  FILE *fp;
  if ((fp = fopen(nome, modo)) == NULL) {
    printf("Impossibile aprire il file \"%s\"\n", "hab.txt");
    getc(stdin);
    exit(1);
  }
  return fp;
}


x86 assembly (clang, -O0):
<apriFile>:
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   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1196 <apriFile+0x56>
lea    0xe8e(%rip),%rdi
lea    0xea8(%rip),%rsi
call   1030 <printf@plt>
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
call   1060 <getc@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apriFile>:
push   %rax
call   1040 <fopen@plt>
test   %rax,%rax
je     114d <apriFile+0xd>
pop    %rcx
ret
lea    0xeac(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1030 <printf@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1060 <getc@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Impossibile aprire il file \22%s\22\0A\00"
@.str.1 = [8 x i8] c"hab.txt\00"
@stdin = global i32 0
define i32* @apriFile(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @stdin
%13 = call i32 @getc(i32 %12)
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = load i32*, i32** %5
ret i32* %16
}

LLVM IR (-O2):
@.str = [33 x i8] c"Impossibile aprire il file \22%s\22\0A\00"
@.str.1 = [8 x i8] c"hab.txt\00"
@stdin = global i32 0
define noalias i32* @apriFile(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stdin
%8 = tail call i32 @getc(i32 %7)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %2
ret i32* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ check_waitpid(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ kill(int /*<<< orphan*/, int);
void rw_socket_close(FILE *res, pid_t pid) {
  fclose(res);
  kill(pid, 9);
  check_waitpid(pid);
}


x86 assembly (clang, -O0):
<rw_socket_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0xc(%rbp),%edi
mov    $0x9,%esi
call   1050 <kill@plt>
mov    -0xc(%rbp),%edi
call   1030 <check_waitpid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rw_socket_close>:
push   %rbx
mov    %esi,%ebx
call   1040 <fclose@plt>
mov    %ebx,%edi
mov    $0x9,%esi
call   1050 <kill@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <check_waitpid@plt>

LLVM IR (-O0):
define void @rw_socket_close(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = call i32 @fclose(i32* %5)
%7 = load i32, i32* %4
%8 = call i32 @kill(i32 %7, i32 9)
%9 = load i32, i32* %4
%10 = call i32 @check_waitpid(i32 %9)
ret void
}

LLVM IR (-O2):
define void @rw_socket_close(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @fclose(i32* %0)
%4 = tail call i32 @kill(i32 %1, i32 9)
%5 = tail call i32 @check_waitpid(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ skip(char *);
int main(int argc, char const *argv[]) {
  char *msg_from_amy = "Don't call me";
  skip(msg_from_amy);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <skip@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Don't call me\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @skip(i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Don't call me\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @skip(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
const char *Iter_Brief(void) { return "Iterable"; }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"Iterable\00"
define i8* @Iter_Brief() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"Iterable\00"
define i8* @Iter_Brief() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *, char *, int /*<<< orphan*/);
void int_03(void) { panic("Breakpoint", "#BP", 0); }


x86 assembly (clang, -O0):
<int_03>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee9(%rip),%rsi
xor    %edx,%edx
call   1030 <panic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_03>:
lea    0xee9(%rip),%rdi
lea    0xeed(%rip),%rsi
xor    %edx,%edx
jmp    1030 <panic@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Breakpoint\00"
@.str.1 = [4 x i8] c"#BP\00"
define void @int_03() {
%1 = call i32 @panic(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Breakpoint\00"
@.str.1 = [4 x i8] c"#BP\00"
define void @int_03() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int compareStrFunc(void *p, void *q) { return strcmp((char *)p, (char *)q); }


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

x86 assembly (clang, -O2):
<compareStrFunc>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compareStrFunc(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ pci_dummy_read(int /*<<< orphan*/, void *);
uint32_t pci_dummy_readl(uint16_t Port, void *p) {
  return pci_dummy_read(Port, p);
}


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

x86 assembly (clang, -O2):
<pci_dummy_readl>:
jmp    1030 <pci_dummy_read@plt>

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

LLVM IR (-O2):
define i32 @pci_dummy_readl(i32 %0, i8* %1) {
%3 = tail call i32 @pci_dummy_read(i32 %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ find(char *);
void find_noindex_large_test() {
  find("benchmarks"
       ".single.large");
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"benchmarks.single.large\00"
define void @find_noindex_large_test() {
%1 = call i32 @find(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"benchmarks.single.large\00"
define void @find_noindex_large_test() {
%1 = tail call i32 @find(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
int ct_pieces(char *input) {
  int nl;
  int ct;
  nl = 0;
  ct = 0;
  while (input++) {
    if (*input == '\n')
      nl++;
    if (nl == 5) {
      ct++;
      nl = 0;
    }
  }
  return (ct);
}


x86 assembly (clang, -O0):
<ct_pieces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmp    $0x0,%rax
je     1167 <ct_pieces+0x67>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1148 <ct_pieces+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jne    1162 <ct_pieces+0x62>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
jmp    1116 <ct_pieces+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ct_pieces(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %23, %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %2
%8 = icmp ne i8* %6, null
br i1 %8, label %9, label %24
9: ; preds = %5
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %17
17: ; preds = %14, %9
%18 = load i32, i32* %3
%19 = icmp eq i32 %18, 5
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
store i32 0, i32* %3
br label %23
23: ; preds = %20, %17
br label %5
24: ; preds = %5
%25 = load i32, i32* %4
ret i32 %25
}

LLVM IR (-O2):
define i32 @ct_pieces(i8* %0) {
%2 = icmp eq i8* %0, null
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ bugger();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  if (bugger() != 0)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <bugger@plt>
cmp    $0x0,%rax
je     1157 <main+0x27>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <bugger@plt>
test   %rax,%rax
jne    1144 <main+0x14>
xor    %edi,%edi
call   1040 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @bugger()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @bugger()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
adr0imm1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if ((*((signed char *)10000000)) <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adr0imm1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0x989680,%eax
movsbl (%rax),%eax
cmp    $0x21,%eax
jg     113b <adr0imm1+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <adr0imm1+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adr0imm1>:
xor    %eax,%eax
cmpb   $0x22,0x989680
22
setl   %al
ret

LLVM IR (-O0):
define i32 @adr0imm1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i8, i8* inttoptr (i64 10000000 to i8*)
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 33
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 @adr0imm1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5) {
%7 = load i8, i8* inttoptr (i64 10000000 to i8*)
%8 = icmp slt i8 %7, 34
%9 = zext i1 %8 to i32
ret i32 %9
}
void ignoreReturnValue(int x) {}


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

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

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

LLVM IR (-O2):
define void @ignoreReturnValue(i32 %0) {
ret void
}
/* Type definitions */
typedef int uint64_t;
struct pcg_state_setseq_128 {
  int dummy;
};

/* Variables and functions */
int pcg_setseq_128_xsh_rr_64_random_r(struct pcg_state_setseq_128 *);
uint64_t
pcg_setseq_128_xsh_rr_64_boundedrand_r(struct pcg_state_setseq_128 *rng,
                                       uint64_t bound) {
  uint64_t threshold = -bound % bound;
  for (;;) {
    uint64_t r = pcg_setseq_128_xsh_rr_64_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_setseq_128_xsh_rr_64_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_setseq_128_xsh_rr_64_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_setseq_128_xsh_rr_64_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_setseq_128_xsh_rr_64_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_setseq_128_xsh_rr_64_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_setseq_128_xsh_rr_64_random_r@plt>
test   %eax,%eax
js     1120 <pcg_setseq_128_xsh_rr_64_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_setseq_128 = type { i32 }
define i32 @pcg_setseq_128_xsh_rr_64_boundedrand_r(%struct.pcg_state_setseq_128* %0, i32 %1) {
%3 = alloca %struct.pcg_state_setseq_128*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_setseq_128* %0, %struct.pcg_state_setseq_128** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_setseq_128*, %struct.pcg_state_setseq_128** %3
%13 = call i32 @pcg_setseq_128_xsh_rr_64_random_r(%struct.pcg_state_setseq_128* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_setseq_128 = type { i32 }
define i32 @pcg_setseq_128_xsh_rr_64_boundedrand_r(%struct.pcg_state_setseq_128* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_setseq_128_xsh_rr_64_random_r(%struct.pcg_state_setseq_128* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
/* Variables and functions */
int is_valid_in_TrdgSesGrp(size_t __tag) {
  switch (__tag) {
  case 336:
  case 625:
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_valid_in_TrdgSesGrp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
sub    $0x150,%rax
je     1136 <is_valid_in_TrdgSesGrp+0x36>
jmp    1121 <is_valid_in_TrdgSesGrp+0x21>
mov    -0x18(%rbp),%rax
sub    $0x271,%rax
jne    1142 <is_valid_in_TrdgSesGrp+0x42>
jmp    1136 <is_valid_in_TrdgSesGrp+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1149 <is_valid_in_TrdgSesGrp+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_in_TrdgSesGrp>:
cmp    $0x150,%rdi
sete   %al
cmp    $0x271,%rdi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_valid_in_TrdgSesGrp(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
switch i64 %4, label %6 [
i64 336, label %5
i64 625, label %5
]
5: ; preds = %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_valid_in_TrdgSesGrp(i64 %0) {
%2 = icmp eq i64 %0, 336
%3 = icmp eq i64 %0, 625
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void moveForward(double distance) {}


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

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

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

LLVM IR (-O2):
define void @moveForward(double %0) {
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ O_RDONLY;
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int main(void) {
  int fd = open("/proc/cpuinfo", O_RDONLY);
  if (fd < 0) {
    perror("open failed");
    return EXIT_FAILURE;
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <open@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    116e <main+0x4e>
lea    0xeb6(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117a <main+0x5a>
mov    0x2e5b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <open@plt>
test   %eax,%eax
js     1145 <main+0x25>
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
lea    0xec2(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e80(%rip),%rax
jmp    1141 <main+0x21>

LLVM IR (-O0):
@.str = [14 x i8] c"/proc/cpuinfo\00"
@O_RDONLY = global i32 0
@.str.1 = [12 x i8] c"open failed\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @O_RDONLY
%4 = call i32 @open(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
store i32 %9, i32* %1
br label %12
10: ; preds = %0
%11 = load i32, i32* @EXIT_SUCCESS
store i32 %11, i32* %1
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [14 x i8] c"/proc/cpuinfo\00"
@O_RDONLY = global i32 0
@.str.1 = [12 x i8] c"open failed\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @O_RDONLY
%2 = tail call i32 @open(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %0, %4
%7 = phi i32* [ @EXIT_FAILURE, %4 ], [ @EXIT_SUCCESS, %0 ]
%8 = load i32, i32* %7
ret i32 %8
}
int fun1226() { return 1226; }


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

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

LLVM IR (-O0):
define i32 @fun1226() {
ret i32 1226
}

LLVM IR (-O2):
define i32 @fun1226() {
ret i32 1226
}
/* Variables and functions */
bool birch_character_is_letter(char c) {
  return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z');
}


x86 assembly (clang, -O0):
<birch_character_is_letter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1129 <birch_character_is_letter+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    114e <birch_character_is_letter+0x4e>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x3(%rbp)
jl     1148 <birch_character_is_letter+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<birch_character_is_letter>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @birch_character_is_letter(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
void *calloc(int, size_t);
int /*<<< orphan*/ ssh_set_error(char *);
void *ssh_alloc(size_t size) {
  void *ret = calloc(1, size);
  if (ret == NULL)
    ssh_set_error("out of memory");
  return ret;
}


x86 assembly (clang, -O0):
<ssh_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1155 <ssh_alloc+0x35>
lea    0xeb0(%rip),%rdi
call   1040 <ssh_set_error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssh_alloc>:
push   %rbx
mov    %rdi,%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1142 <ssh_alloc+0x22>
lea    0xec3(%rip),%rdi
call   1040 <ssh_set_error@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define i8* @ssh_alloc(i64 %0) {
%2 = tail call i8* @calloc(i32 1, i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @ssh_set_error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ nrf_802154_swi_hfclk_stop_terminate();
void nrf_802154_priority_drop_hfclk_stop_terminate(void) {
  nrf_802154_swi_hfclk_stop_terminate();
}


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

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

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

LLVM IR (-O2):
define void @nrf_802154_priority_drop_hfclk_stop_terminate() {
%1 = tail call i32 (...) @nrf_802154_swi_hfclk_stop_terminate()
ret void
}
void vrt_group_rebuild_thread_cleanup(struct vrt_group *group) {}


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

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

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

LLVM IR (-O2):
%struct.vrt_group = type opaque
define void @vrt_group_rebuild_thread_cleanup(%struct.vrt_group* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exact_square(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n = 0;
  scanf("%d", &n);
  exact_square(n);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <exact_square@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @exact_square(i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @exact_square(i32 %4)
ret i32 0
}
/* Variables and functions */
char ask();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char key;
  printf("Would you like me to send you to the menu?");
  key = ask();
  if (key == 'Y') {
    printf("\n\n\tWell.. Someday a menu will appear here... %c", 1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <ask@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x59,%eax
jne    1167 <main+0x47>
lea    0xed0(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <ask@plt>
cmp    $0x59,%al
jne    114d <main+0x2d>
lea    0xeea(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [43 x i8] c"Would you like me to send you to the menu?\00"
@.str.1 = [48 x i8] c"\0A\0A\09Well.. Someday a menu will appear here... %c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%4 = call signext i8 (...) @ask()
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 89
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %10
10: ; preds = %8, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [43 x i8] c"Would you like me to send you to the menu?\00"
@.str.1 = [48 x i8] c"\0A\0A\09Well.. Someday a menu will appear here... %c\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @ask()
%3 = icmp eq i8 %2, 89
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %6
6: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ put64(unsigned long long);
int /*<<< orphan*/ put8(int);
void mov_eax_memoffs32(unsigned int *memoffs32) {
  put8(0xA1);
  put64((unsigned long long)memoffs32);
}


x86 assembly (clang, -O0):
<mov_eax_memoffs32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xa1,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rdi
call   1040 <put64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_eax_memoffs32>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa1,%edi
call   1030 <put8@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <put64@plt>

LLVM IR (-O0):
define void @mov_eax_memoffs32(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @put8(i32 161)
%4 = load i32*, i32** %2
%5 = ptrtoint i32* %4 to i64
%6 = call i32 @put64(i64 %5)
ret void
}

LLVM IR (-O2):
define void @mov_eax_memoffs32(i32* %0) {
%2 = tail call i32 @put8(i32 161)
%3 = ptrtoint i32* %0 to i64
%4 = tail call i32 @put64(i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void **);
void free_2dim_contig(void **a) {
  free(a[0]);
  free(a);
  return;
}


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

x86 assembly (clang, -O2):
<free_2dim_contig>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_2dim_contig(i8** nocapture %0) {
%2 = bitcast i8** %0 to i8***
%3 = load i8**, i8*** %2
%4 = tail call i32 @free(i8** %3)
%5 = tail call i32 @free(i8** %0)
ret void
}
int append_history(nelements, filename)
int nelements;
const char *filename;
{ return (history_do_write(filename, nelements, 0)); }


x86 assembly (clang, -O0):
<append_history>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <history_do_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<append_history>:
mov    %edi,%eax
mov    %rsi,%rdi
mov    %eax,%esi
xor    %edx,%edx
xor    %eax,%eax
jmp    1030 <history_do_write@plt>

LLVM IR (-O0):
define i32 @append_history(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i32, i32* %3
%7 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @history_do_write to i32 (i8*, i32, i32, ...)*)(i8* %5, i32 %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @append_history(i32 %0, i8* %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @history_do_write to i32 (i8*, i32, i32, ...)*)(i8* %1, i32 %0, i32 0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ xcb_window_t;
typedef int /*<<< orphan*/ xcb_connection_t;

/* Variables and functions */
int /*<<< orphan*/ xembed_message_send(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                       int, int /*<<< orphan*/,
                                       int /*<<< orphan*/, int /*<<< orphan*/);
void xembed_window_deactivate(xcb_connection_t *c, xcb_window_t client) {
  xembed_message_send(c, client, 2, 0, 0, 0);
}


x86 assembly (clang, -O0):
<xembed_window_deactivate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x2,%edx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <xembed_message_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xembed_window_deactivate>:
mov    $0x2,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <xembed_message_send@plt>

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

LLVM IR (-O2):
define void @xembed_window_deactivate(i32* %0, i32 %1) {
%3 = tail call i32 @xembed_message_send(i32* %0, i32 %1, i32 2, i32 0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BOARD_InitPeripherals();
void BOARD_InitBootPeripherals(void) { BOARD_InitPeripherals(); }


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

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

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

LLVM IR (-O2):
define void @BOARD_InitBootPeripherals() {
%1 = tail call i32 (...) @BOARD_InitPeripherals()
ret void
}
void TimerIC2PrescalerSet(unsigned long ulBase, unsigned long ulPrescaler) {

  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x00000018))) &= ~0x00000C00;
  (*((volatile unsigned long *)(ulBase + 0x00000018))) |= (ulPrescaler << 8);
}


x86 assembly (clang, -O0):
<TimerIC2PrescalerSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rcx
and    $0xfffffffffffff3ff,%rcx
mov    %rcx,0x18(%rax)
mov    -0x10(%rbp),%rdx
shl    $0x8,%rdx
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rcx
or     %rdx,%rcx
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerIC2PrescalerSet>:
andq   $0xfffffffffffff3ff,0x18(%rdi)
ff
shl    $0x8,%rsi
or     %rsi,0x18(%rdi)
ret

LLVM IR (-O0):
define void @TimerIC2PrescalerSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = add i64 %5, 24
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = and i64 %8, -3073
store volatile i64 %9, i64* %7
%10 = load i64, i64* %4
%11 = shl i64 %10, 8
%12 = load i64, i64* %3
%13 = add i64 %12, 24
%14 = inttoptr i64 %13 to i64*
%15 = load volatile i64, i64* %14
%16 = or i64 %15, %11
store volatile i64 %16, i64* %14
ret void
}

LLVM IR (-O2):
define void @TimerIC2PrescalerSet(i64 %0, i64 %1) {
%3 = add i64 %0, 24
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -3073
store volatile i64 %6, i64* %4
%7 = shl i64 %1, 8
%8 = load volatile i64, i64* %4
%9 = or i64 %8, %7
store volatile i64 %9, i64* %4
ret void
}
int drm_iommu_attach_device_if_possible(struct exynos_drm_crtc *exynos_crtc,
                                        struct drm_device *drm_dev,
                                        struct device *subdrv_dev) {
  return 0;
}


x86 assembly (clang, -O0):
<drm_iommu_attach_device_if_possible>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.exynos_drm_crtc = type opaque
%struct.drm_device = type opaque
%struct.device = type opaque
define i32 @drm_iommu_attach_device_if_possible(%struct.exynos_drm_crtc* %0, %struct.drm_device* %1, %struct.device* %2) {
%4 = alloca %struct.exynos_drm_crtc*
%5 = alloca %struct.drm_device*
%6 = alloca %struct.device*
store %struct.exynos_drm_crtc* %0, %struct.exynos_drm_crtc** %4
store %struct.drm_device* %1, %struct.drm_device** %5
store %struct.device* %2, %struct.device** %6
ret i32 0
}

LLVM IR (-O2):
%struct.exynos_drm_crtc = type opaque
%struct.drm_device = type opaque
%struct.device = type opaque
define i32 @drm_iommu_attach_device_if_possible(%struct.exynos_drm_crtc* nocapture readnone %0, %struct.drm_device* nocapture readnone %1, %struct.device* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main(void) {
  char s[10] = "ABCDE", *p = s + 3;
  printf("%d", p[1] - p[-1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xed7(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0xe(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl -0x1(%rcx),%ecx
sub    %ecx,%eax
lea    0xeb0(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 2)
ret i32 0
}