xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int readlink(const char *path, char xpath[], int xplen) {
  errno = EINVAL;
  return -1;
}


x86 assembly (clang, -O0):
<readlink>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<readlink>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @readlink(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @EINVAL
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @readlink(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @EINVAL
store i32 %4, i32* @errno
ret i32 -1
}
/* Variables and functions */
int add_opt_common(char **, char const *, int /*<<< orphan*/);
int fuse_opt_add_opt(char **opts, const char *opt) {
  return add_opt_common(opts, opt, 0);
}


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

x86 assembly (clang, -O2):
<fuse_opt_add_opt>:
xor    %edx,%edx
jmp    1030 <add_opt_common@plt>

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

LLVM IR (-O2):
define i32 @fuse_opt_add_opt(i8** %0, i8* %1) {
%3 = tail call i32 @add_opt_common(i8** %0, i8* %1, i32 0)
ret i32 %3
}
int main() {
  int *ptr = (int *)0;
  *ptr = 100;
  return 0;
}


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

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

LLVM IR (-O2):
void reverse_string(char *str, int from, int to) {
  char tmp;
  while (from < to) {
    tmp = str[from];
    str[from++] = str[to];
    str[to--] = tmp;
  }
}


x86 assembly (clang, -O0):
<reverse_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1165 <reverse_string+0x65>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0xc(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%esi
add    $0xffffffff,%esi
mov    %esi,-0x10(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    110e <reverse_string+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_string>:
cmp    %edx,%esi
jge    1131 <reverse_string+0x31>
movslq %esi,%rax
movslq %edx,%rcx
add    $0x1,%rax
xchg   %ax,%ax
movzbl -0x1(%rdi,%rax,1),%esi
movzbl (%rdi,%rcx,1),%edx
mov    %dl,-0x1(%rdi,%rax,1)
mov    %sil,(%rdi,%rcx,1)
add    $0xffffffffffffffff,%rcx
lea    0x1(%rax),%rdx
cmp    %rcx,%rax
mov    %rdx,%rax
jl     1110 <reverse_string+0x10>
ret

LLVM IR (-O0):
define void @reverse_string(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
br label %8
8: ; preds = %12, %3
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %34
12: ; preds = %8
%13 = load i8*, i8** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
store i8 %17, i8* %7
%18 = load i8*, i8** %4
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = load i8*, i8** %4
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 1
store i32 %25, i32* %5
%26 = sext i32 %24 to i64
%27 = getelementptr inbounds i8, i8* %23, i64 %26
store i8 %22, i8* %27
%28 = load i8, i8* %7
%29 = load i8*, i8** %4
%30 = load i32, i32* %6
%31 = add nsw i32 %30, -1
store i32 %31, i32* %6
%32 = sext i32 %30 to i64
%33 = getelementptr inbounds i8, i8* %29, i64 %32
store i8 %28, i8* %33
br label %8
34: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @reverse_string(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = sext i32 %2 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %7, %5 ], [ %16, %8 ]
%10 = phi i64 [ %6, %5 ], [ %15, %8 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %0, i64 %9
%14 = load i8, i8* %13
%15 = add nsw i64 %10, 1
store i8 %14, i8* %11
%16 = add nsw i64 %9, -1
store i8 %12, i8* %13
%17 = icmp slt i64 %15, %16
br i1 %17, label %8, label %18
18: ; preds = %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printInvalid() {
  printf("    ERROR: Invalid command. Please use `help` for a list of all "
         "commands.\n");
}


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

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

LLVM IR (-O0):
@.str = [75 x i8] c" ERROR: Invalid command. Please use `help` for a list of all commands.\0A\00"
define void @printInvalid() {
%1 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [74 x i8] c" ERROR: Invalid command. Please use `help` for a list of all commands.\00"
define void @printInvalid() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned int id3_unsync32(unsigned char *c, int start) {
  return c[start + 3] + (c[start + 2] << 7) + (c[start + 1] << 14) +
         (c[start] << 21);
}


x86 assembly (clang, -O0):
<id3_unsync32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x7,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0xe,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x15,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<id3_unsync32>:
movslq %esi,%rax
movzbl 0x3(%rdi,%rax,1),%ecx
movzbl 0x2(%rdi,%rax,1),%edx
shl    $0x7,%edx
add    %ecx,%edx
movzbl 0x1(%rdi,%rax,1),%ecx
shl    $0xe,%ecx
add    %edx,%ecx
movzbl (%rdi,%rax,1),%eax
shl    $0x15,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @id3_unsync32(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 2
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %12, i64 %15
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 7
%20 = add nsw i32 %11, %19
%21 = load i8*, i8** %3
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %21, i64 %24
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = shl i32 %27, 14
%29 = add nsw i32 %20, %28
%30 = load i8*, i8** %3
%31 = load i32, i32* %4
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i8, i8* %30, i64 %32
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = shl i32 %35, 21
%37 = add nsw i32 %29, %36
ret i32 %37
}

LLVM IR (-O2):
define i32 @id3_unsync32(i8* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, 3
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = add nsw i32 %1, 2
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 7
%14 = add nuw nsw i32 %13, %7
%15 = add nsw i32 %1, 1
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %0, i64 %16
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = shl nuw nsw i32 %19, 14
%21 = add nuw nsw i32 %14, %20
%22 = sext i32 %1 to i64
%23 = getelementptr inbounds i8, i8* %0, i64 %22
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = shl nuw nsw i32 %25, 21
%27 = add nuw nsw i32 %21, %26
ret i32 %27
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, void *);
int strlen(char const *);
scalar_t__ write(int, char const *, int);
int sendcmd(int fd, const char *cmd) {
  int len = strlen(cmd);
  if (write(fd, cmd, len) < 0)
    die("write failed: ", ((void *)-1));
  return 0;
}


x86 assembly (clang, -O0):
<sendcmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
cmp    $0x0,%rax
jge    1177 <sendcmd+0x47>
lea    0xe95(%rip),%rdi
mov    $0xffffffffffffffff,%rsi
call   1050 <die@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendcmd>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
test   %rax,%rax
jns    1164 <sendcmd+0x34>
lea    0xea8(%rip),%rdi
mov    $0xffffffffffffffff,%rsi
call   1050 <die@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"write failed: \00"
define i32 @sendcmd(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = call i64 @write(i32 %8, i8* %9, i32 %10)
%12 = icmp slt i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @die(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* inttoptr (i64 -1 to i8*))
br label %15
15: ; preds = %13, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"write failed: \00"
define i32 @sendcmd(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @write(i32 %0, i8* %1, i32 %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @die(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* inttoptr (i64 -1 to i8*))
br label %8
8: ; preds = %6, %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int benchmark_barrier(int, int /*<<< orphan*/);
int /*<<< orphan*/ benchmark_begin();
int benchmark_end(int /*<<< orphan*/);
int /*<<< orphan*/ nqueens(int);
int benchmark_main(void) {
  uint64_t state = benchmark_begin();
  int count = 8;
  for (int i = 0; i < 10000; i++)
    count = benchmark_barrier(count, nqueens(count));
  return benchmark_end(state);
}


x86 assembly (clang, -O0):
<benchmark_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <benchmark_begin@plt>
mov    %eax,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2710,-0xc(%rbp)
jge    1196 <benchmark_main+0x56>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <nqueens@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1030 <benchmark_barrier@plt>
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1160 <benchmark_main+0x20>
mov    -0x4(%rbp),%edi
call   1060 <benchmark_end@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<benchmark_main>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <benchmark_begin@plt>
mov    %eax,%r14d
mov    $0x8,%ebp
mov    $0x2710,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1050 <nqueens@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <benchmark_barrier@plt>
mov    %eax,%ebp
add    $0xffffffff,%ebx
jne    1160 <benchmark_main+0x20>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1060 <benchmark_end@plt>

LLVM IR (-O0):
define i32 @benchmark_main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @benchmark_begin()
store i32 %4, i32* %1
store i32 8, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 10000
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = call i32 @nqueens(i32 %10)
%12 = call i32 @benchmark_barrier(i32 %9, i32 %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %8
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %5
16: ; preds = %5
%17 = load i32, i32* %1
%18 = call i32 @benchmark_end(i32 %17)
ret i32 %18
}

LLVM IR (-O2):
define i32 @benchmark_main() {
%1 = tail call i32 (...) @benchmark_begin()
br label %4
2: ; preds = %4
%3 = tail call i32 @benchmark_end(i32 %1)
ret i32 %3
4: ; preds = %0, %4
%5 = phi i32 [ 0, %0 ], [ %9, %4 ]
%6 = phi i32 [ 8, %0 ], [ %8, %4 ]
%7 = tail call i32 @nqueens(i32 %6)
%8 = tail call i32 @benchmark_barrier(i32 %6, i32 %7)
%9 = add nuw nsw i32 %5, 1
%10 = icmp eq i32 %9, 10000
br i1 %10, label %2, label %4
}
/* Type definitions */
struct RBTree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ RBDeleteNode(struct RBTree *, void *);
void *RBSearchNode(struct RBTree *, void *);
void RBDelete(struct RBTree *Tree, void *Data) {
  void *Node = RBSearchNode(Tree, Data);
  ;
  RBDeleteNode(Tree, Node);
}


x86 assembly (clang, -O0):
<RBDelete>:
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 <RBSearchNode@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <RBDeleteNode@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RBDelete>:
push   %rbx
mov    %rdi,%rbx
call   1040 <RBSearchNode@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <RBDeleteNode@plt>

LLVM IR (-O0):
%struct.RBTree = type { i32 }
define void @RBDelete(%struct.RBTree* %0, i8* %1) {
%3 = alloca %struct.RBTree*
%4 = alloca i8*
%5 = alloca i8*
store %struct.RBTree* %0, %struct.RBTree** %3
store i8* %1, i8** %4
%6 = load %struct.RBTree*, %struct.RBTree** %3
%7 = load i8*, i8** %4
%8 = call i8* @RBSearchNode(%struct.RBTree* %6, i8* %7)
store i8* %8, i8** %5
%9 = load %struct.RBTree*, %struct.RBTree** %3
%10 = load i8*, i8** %5
%11 = call i32 @RBDeleteNode(%struct.RBTree* %9, i8* %10)
ret void
}

LLVM IR (-O2):
%struct.RBTree = type { i32 }
define void @RBDelete(%struct.RBTree* %0, i8* %1) {
%3 = tail call i8* @RBSearchNode(%struct.RBTree* %0, i8* %1)
%4 = tail call i32 @RBDeleteNode(%struct.RBTree* %0, i8* %3)
ret void
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzBinaryFuncConstR_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_REQDOWN(int);
void BrzBinaryFuncConstR_reqdown(struct comp *comp, int port) {
  struct BrzBinaryFuncConstR_ *c = (struct BrzBinaryFuncConstR_ *)comp;
  SEND_REQDOWN(1);
}


x86 assembly (clang, -O0):
<BrzBinaryFuncConstR_reqdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
call   1030 <SEND_REQDOWN@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzBinaryFuncConstR_ = type { i32 }
define void @BrzBinaryFuncConstR_reqdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzBinaryFuncConstR_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzBinaryFuncConstR_*
store %struct.BrzBinaryFuncConstR_* %7, %struct.BrzBinaryFuncConstR_** %5
%8 = call i32 @SEND_REQDOWN(i32 1)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzBinaryFuncConstR_reqdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_REQDOWN(i32 1)
ret void
}
void gtk_tree_view_column_focus_cell() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_focus_cell() {
ret void
}
/* Variables and functions */
float pow(float const, float);
float LinearToGamma(const float linear) { return pow(linear, 1.0f / 2.2f); }


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

x86 assembly (clang, -O2):
<LinearToGamma>:
movss  0xee8(%rip),%xmm1
jmp    1030 <pow@plt>

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

LLVM IR (-O2):
define float @LinearToGamma(float %0) {
%2 = tail call float @pow(float %0, float 0x3FDD1745C0000000)
ret float %2
}
/* Type definitions */
struct str {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ str_append_string(struct str *, char *);
int /*<<< orphan*/ str_clear(struct str *);
extern void str_assign(struct str *str, char *s) {
  str_clear(str);
  str_append_string(str, s);
}


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

x86 assembly (clang, -O2):
<str_assign>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <str_clear@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <str_append_string@plt>

LLVM IR (-O0):
%struct.str = type { i32 }
define void @str_assign(%struct.str* %0, i8* %1) {
%3 = alloca %struct.str*
%4 = alloca i8*
store %struct.str* %0, %struct.str** %3
store i8* %1, i8** %4
%5 = load %struct.str*, %struct.str** %3
%6 = call i32 @str_clear(%struct.str* %5)
%7 = load %struct.str*, %struct.str** %3
%8 = load i8*, i8** %4
%9 = call i32 @str_append_string(%struct.str* %7, i8* %8)
ret void
}

LLVM IR (-O2):
%struct.str = type { i32 }
define void @str_assign(%struct.str* %0, i8* %1) {
%3 = tail call i32 @str_clear(%struct.str* %0)
%4 = tail call i32 @str_append_string(%struct.str* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void platform_intr_ack_irq(unsigned irq) {
  if (!((irq) < 8))
    outb(0xA0, 0x20);
  outb(0x20, 0x20);
}


x86 assembly (clang, -O0):
<platform_intr_ack_irq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x8,-0x4(%rbp)
jb     1134 <platform_intr_ack_irq+0x24>
mov    $0xa0,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0x20,%esi
mov    %esi,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<platform_intr_ack_irq>:
cmp    $0x8,%edi
jb     1129 <platform_intr_ack_irq+0x19>
push   %rax
mov    $0xa0,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
add    $0x8,%rsp
mov    $0x20,%edi
mov    $0x20,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @platform_intr_ack_irq(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 8
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @outb(i32 160, i32 32)
br label %7
7: ; preds = %5, %1
%8 = call i32 @outb(i32 32, i32 32)
ret void
}

LLVM IR (-O2):
define void @platform_intr_ack_irq(i32 %0) {
%2 = icmp ult i32 %0, 8
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @outb(i32 160, i32 32)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @outb(i32 32, i32 32)
ret void
}
int do_532() { return 532; }


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

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

LLVM IR (-O0):
define i32 @do_532() {
ret i32 532
}

LLVM IR (-O2):
define i32 @do_532() {
ret i32 532
}
/* Variables and functions */
void strncpy(char *str1, char *str2, unsigned int num) {
  while (*str2 != '\0' && num-- > 0)
    *(str1++) = *(str2++);
}


x86 assembly (clang, -O0):
<strncpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
je     1138 <strncpy+0x38>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
seta   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1148 <strncpy+0x48>
jmp    116f <strncpy+0x6f>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    110f <strncpy+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy>:
mov    (%rsi),%al
test   %al,%al
je     1127 <strncpy+0x27>
test   %edx,%edx
je     1127 <strncpy+0x27>
add    $0xffffffff,%edx
xor    %ecx,%ecx
nop
mov    %al,(%rdi,%rcx,1)
movzbl 0x1(%rsi,%rcx,1),%eax
test   %al,%al
je     1127 <strncpy+0x27>
lea    0x1(%rcx),%r8
cmp    %ecx,%edx
mov    %r8,%rcx
jne    1110 <strncpy+0x10>
ret

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

LLVM IR (-O2):
define void @strncpy(i8* nocapture writeonly %0, i8* nocapture %1, i32 %2) {
%4 = load i8, i8* %1
%5 = icmp eq i8 %4, 0
%6 = icmp eq i32 %2, 0
%7 = or i1 %5, %6
br i1 %7, label %20, label %8
8: ; preds = %3, %8
%9 = phi i8 [ %16, %8 ], [ %4, %3 ]
%10 = phi i32 [ %13, %8 ], [ %2, %3 ]
%11 = phi i8* [ %14, %8 ], [ %1, %3 ]
%12 = phi i8* [ %15, %8 ], [ %0, %3 ]
%13 = add i32 %10, -1
%14 = getelementptr inbounds i8, i8* %11, i64 1
%15 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %9, i8* %12
%16 = load i8, i8* %14
%17 = icmp eq i8 %16, 0
%18 = icmp eq i32 %13, 0
%19 = select i1 %17, i1 true, i1 %18
br i1 %19, label %20, label %8
20: ; preds = %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void Handler(int dummy) {
  printf("Handler (^c) entered - exiting\n");
  exit(1);
}


x86 assembly (clang, -O0):
<Handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [32 x i8] c"Handler (^c) entered - exiting\0A\00"
define void @Handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [31 x i8] c"Handler (^c) entered - exiting\00"
define void @Handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ matriz(int);
int main(int argc, const char *argv[]) {
  int n;
  matriz(n);
  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)
mov    -0x14(%rbp),%edi
call   1030 <matriz@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @matriz(i32 undef)
ret i32 0
}
void handler(int sig) { ; }


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

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

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

LLVM IR (-O2):
define void @handler(i32 %0) {
ret void
}
/* Type definitions */
struct netent {
  int dummy;
};
typedef enum nss_status { ____Placeholder_nss_status } nss_status;

/* Variables and functions */
int internal_getnetent_r(struct netent *, char *, size_t, int *, int *);
int /*<<< orphan*/ sss_nss_lock();
int /*<<< orphan*/ sss_nss_unlock();
enum nss_status _nss_sss_getnetent_r(struct netent *result, char *buffer,
                                     size_t buflen, int *errnop,
                                     int *h_errnop) {
  enum nss_status nret;
  sss_nss_lock();
  nret = internal_getnetent_r(result, buffer, buflen, errnop, h_errnop);
  sss_nss_unlock();
  return nret;
}


x86 assembly (clang, -O0):
<_nss_sss_getnetent_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    $0x0,%al
call   1030 <sss_nss_lock@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <internal_getnetent_r@plt>
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   1050 <sss_nss_unlock@plt>
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_sss_getnetent_r>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <sss_nss_lock@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   1040 <internal_getnetent_r@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <sss_nss_unlock@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.netent = type { i32 }
define i32 @_nss_sss_getnetent_r(%struct.netent* %0, i8* %1, i64 %2, i32* %3, i32* %4) {
%6 = alloca %struct.netent*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32
store %struct.netent* %0, %struct.netent** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%12 = call i32 (...) @sss_nss_lock()
%13 = load %struct.netent*, %struct.netent** %6
%14 = load i8*, i8** %7
%15 = load i64, i64* %8
%16 = load i32*, i32** %9
%17 = load i32*, i32** %10
%18 = call i32 @internal_getnetent_r(%struct.netent* %13, i8* %14, i64 %15, i32* %16, i32* %17)
store i32 %18, i32* %11
%19 = call i32 (...) @sss_nss_unlock()
%20 = load i32, i32* %11
ret i32 %20
}

LLVM IR (-O2):
%struct.netent = type { i32 }
define i32 @_nss_sss_getnetent_r(%struct.netent* %0, i8* %1, i64 %2, i32* %3, i32* %4) {
%6 = tail call i32 (...) @sss_nss_lock()
%7 = tail call i32 @internal_getnetent_r(%struct.netent* %0, i8* %1, i64 %2, i32* %3, i32* %4)
%8 = tail call i32 (...) @sss_nss_unlock()
ret i32 %7
}
void _start(void) {
  extern void _ExitProcess(int);
  extern int main(int, char **);
  _ExitProcess(main(0, (void *)0));
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <main@plt>
mov    %eax,%edi
call   1040 <_ExitProcess@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <main@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <_ExitProcess@plt>

LLVM IR (-O0):
define void @_start() {
%1 = call i32 @main(i32 0, i8** null)
ret void
}

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 @main(i32 0, i8** null)
tail call void @_ExitProcess(i32 %1)
ret void
}
int subtract(int a, int b) { return (a - b); }


x86 assembly (clang, -O0):
<subtract>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<subtract>:
mov    %edi,%eax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @subtract(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @subtract(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sys_deinit();
int sys_setnframes(size_t);
int sys_setnpages(size_t);
int sys_init(size_t mem, size_t ptable) {
  if (sys_setnpages(ptable) == -1) {
    sys_deinit();
    return -1;
  } else if (sys_setnframes(mem) == -1) {
    sys_deinit();
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<sys_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <sys_setnpages@plt>
cmp    $0xffffffff,%eax
jne    1165 <sys_init+0x35>
mov    $0x0,%al
call   1040 <sys_deinit@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1196 <sys_init+0x66>
mov    -0x10(%rbp),%rdi
call   1030 <sys_setnframes@plt>
cmp    $0xffffffff,%eax
jne    118a <sys_init+0x5a>
mov    $0x0,%al
call   1040 <sys_deinit@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1196 <sys_init+0x66>
jmp    118f <sys_init+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_init>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1050 <sys_setnpages@plt>
cmp    $0xffffffff,%eax
je     1154 <sys_init+0x24>
mov    %rbx,%rdi
call   1030 <sys_setnframes@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     1154 <sys_init+0x24>
pop    %rbx
ret
xor    %eax,%eax
call   1040 <sys_deinit@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sys_init(i64 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %5
%7 = call i32 @sys_setnpages(i64 %6)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @sys_deinit()
store i32 -1, i32* %3
br label %19
11: ; preds = %2
%12 = load i64, i64* %4
%13 = call i32 @sys_setnframes(i64 %12)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 (...) @sys_deinit()
store i32 -1, i32* %3
br label %19
17: ; preds = %11
br label %18
18: ; preds = %17
store i32 0, i32* %3
br label %19
19: ; preds = %18, %15, %9
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @sys_init(i64 %0, i64 %1) {
%3 = tail call i32 @sys_setnpages(i64 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @sys_setnframes(i64 %0)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %5, %2
%9 = tail call i32 (...) @sys_deinit()
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ 0, %5 ], [ -1, %8 ]
ret i32 %11
}
/* Type definitions */
struct exp {
  int dummy;
};

/* Variables and functions */
struct exp *parser(char **, unsigned int *);
char **split_exp(int /*<<< orphan*/ *, unsigned int *, char const **);
struct exp *make_exp(const char **exp_string) {
  unsigned int tokens_num = 0;
  char **exp_tokens = split_exp(NULL, &tokens_num, exp_string);
  unsigned int exp_index = 0;
  struct exp *exp = parser(exp_tokens, &exp_index);
  return exp;
}


x86 assembly (clang, -O0):
<make_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%edi
lea    -0xc(%rbp),%rsi
call   1040 <split_exp@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1030 <parser@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_exp>:
push   %rax
mov    %rdi,%rdx
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
xor    %edi,%edi
call   1040 <split_exp@plt>
movl   $0x0,(%rsp)
mov    %rsp,%rsi
mov    %rax,%rdi
call   1030 <parser@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.exp = type { i32 }
define %struct.exp* @make_exp(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca %struct.exp*
store i8** %0, i8*** %2
store i32 0, i32* %3
%7 = load i8**, i8*** %2
%8 = call i8** @split_exp(i32* null, i32* %3, i8** %7)
store i8** %8, i8*** %4
store i32 0, i32* %5
%9 = load i8**, i8*** %4
%10 = call %struct.exp* @parser(i8** %9, i32* %5)
store %struct.exp* %10, %struct.exp** %6
%11 = load %struct.exp*, %struct.exp** %6
ret %struct.exp* %11
}

LLVM IR (-O2):
%struct.exp = type { i32 }
define %struct.exp* @make_exp(i8** %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i8** @split_exp(i32* null, i32* %2, i8** %0)
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%7 = call %struct.exp* @parser(i8** %5, i32* %3)
ret %struct.exp* %7
}
/* Variables and functions */
int down();
int left();
int right();
int up();
int one_step(char command) {
  int ret;
  switch (command) {
  case 'd':
    ret = down();
    break;
  case 'u':
    ret = up();
    break;
  case 'l':
    ret = left();
    break;
  case 'r':
    ret = right();
    break;
  default:
    ret = -1;
    break;
  }
  return ret;
}


x86 assembly (clang, -O0):
<one_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0xffffff9c,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x11,%eax
ja     11b4 <one_step+0x74>
mov    -0x10(%rbp),%rax
lea    0xe91(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1050 <down@plt>
mov    %eax,-0x8(%rbp)
jmp    11bb <one_step+0x7b>
mov    $0x0,%al
call   1060 <up@plt>
mov    %eax,-0x8(%rbp)
jmp    11bb <one_step+0x7b>
mov    $0x0,%al
call   1030 <left@plt>
mov    %eax,-0x8(%rbp)
jmp    11bb <one_step+0x7b>
mov    $0x0,%al
call   1040 <right@plt>
mov    %eax,-0x8(%rbp)
jmp    11bb <one_step+0x7b>
movl   $0xffffffff,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<one_step>:
add    $0xffffff9c,%edi
cmp    $0x11,%edi
ja     115f <one_step+0x1f>
lea    0xeb1(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
xor    %eax,%eax
jmp    1050 <down@plt>
mov    $0xffffffff,%eax
ret
xor    %eax,%eax
jmp    1030 <left@plt>
xor    %eax,%eax
jmp    1040 <right@plt>
xor    %eax,%eax
jmp    1060 <up@plt>

LLVM IR (-O0):
define i32 @one_step(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %14 [
i32 100, label %6
i32 117, label %8
i32 108, label %10
i32 114, label %12
]
6: ; preds = %1
%7 = call i32 (...) @down()
store i32 %7, i32* %3
br label %15
8: ; preds = %1
%9 = call i32 (...) @up()
store i32 %9, i32* %3
br label %15
10: ; preds = %1
%11 = call i32 (...) @left()
store i32 %11, i32* %3
br label %15
12: ; preds = %1
%13 = call i32 (...) @right()
store i32 %13, i32* %3
br label %15
14: ; preds = %1
store i32 -1, i32* %3
br label %15
15: ; preds = %14, %12, %10, %8, %6
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @one_step(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %11 [
i32 100, label %3
i32 117, label %5
i32 108, label %7
i32 114, label %9
]
3: ; preds = %1
%4 = tail call i32 (...) @down()
br label %11
5: ; preds = %1
%6 = tail call i32 (...) @up()
br label %11
7: ; preds = %1
%8 = tail call i32 (...) @left()
br label %11
9: ; preds = %1
%10 = tail call i32 (...) @right()
br label %11
11: ; preds = %1, %9, %7, %5, %3
%12 = phi i32 [ %10, %9 ], [ %8, %7 ], [ %6, %5 ], [ %4, %3 ], [ -1, %1 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vtab;
typedef int /*<<< orphan*/ sqlite3_index_info;

/* Variables and functions */
int SQLITE_OK;
int vstattabBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo) {
  return SQLITE_OK;
}


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

x86 assembly (clang, -O2):
<vstattabBestIndex>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@SQLITE_OK = global i32 0
define i32 @vstattabBestIndex(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @SQLITE_OK
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_CIPHER_CTX;

/* Variables and functions */
int EVP_CIPHER_CTX_cleanup(int /*<<< orphan*/ *);
int sb_aes_deinit(EVP_CIPHER_CTX *ctx) { return EVP_CIPHER_CTX_cleanup(ctx); }


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

x86 assembly (clang, -O2):
<sb_aes_deinit>:
jmp    1030 <EVP_CIPHER_CTX_cleanup@plt>

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

LLVM IR (-O2):
define i32 @sb_aes_deinit(i32* %0) {
%2 = tail call i32 @EVP_CIPHER_CTX_cleanup(i32* %0)
ret i32 %2
}
/* Variables and functions */
int readlinkat(int, char const *, char *, size_t);
__attribute__((__weak__, __always___)) int
softboundmpx_readlinkat(int dirfd, const char *pathname, char *buf,
                        size_t bufsiz) {
  return readlinkat(dirfd, pathname, buf, bufsiz);
}


x86 assembly (clang, -O0):
<softboundmpx_readlinkat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <readlinkat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_readlinkat>:
jmp    1030 <readlinkat@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_readlinkat(i32 %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 @readlinkat(i32 %0, i8* %1, i8* %2, i64 %3)
ret i32 %5
}
/* Variables and functions */
scalar_t__ EINTR;
int /*<<< orphan*/ LOCK_UN;
scalar_t__ errno;
int flock(int, int /*<<< orphan*/);
int zfunlock(int fd) {
  int ret;
  do {
    ret = flock(fd, LOCK_UN);
  } while ((ret < 0) && (errno == EINTR));
  return ret;
  ;
}


x86 assembly (clang, -O0):
<zfunlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
call   1030 <flock@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jge    1158 <zfunlock+0x48>
mov    0x2e9b(%rip),%rax
mov    (%rax),%rax
mov    0x2e89(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    111b <zfunlock+0xb>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zfunlock>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2eaf(%rip),%r14
mov    0x2eb8(%rip),%r15
mov    0x2ea9(%rip),%r12
nop
mov    (%r14),%esi
mov    %ebx,%edi
call   1030 <flock@plt>
test   %eax,%eax
jns    1147 <zfunlock+0x37>
mov    (%r12),%rcx
cmp    %rcx,(%r15)
je     1130 <zfunlock+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@LOCK_UN = global i32 0
@errno = global i64 0
@EINTR = global i64 0
define i32 @zfunlock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %15, %1
%5 = load i32, i32* %2
%6 = load i32, i32* @LOCK_UN
%7 = call i32 @flock(i32 %5, i32 %6)
store i32 %7, i32* %3
br label %8
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = load i64, i64* @errno
%13 = load i64, i64* @EINTR
%14 = icmp eq i64 %12, %13
br label %15
15: ; preds = %11, %8
%16 = phi i1 [ false, %8 ], [ %14, %11 ]
br i1 %16, label %4, label %17
17: ; preds = %15
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@LOCK_UN = global i32 0
@errno = global i64 0
@EINTR = global i64 0
define i32 @zfunlock(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* @LOCK_UN
%4 = tail call i32 @flock(i32 %0, i32 %3)
%5 = icmp slt i32 %4, 0
%6 = load i64, i64* @errno
%7 = load i64, i64* @EINTR
%8 = icmp eq i64 %6, %7
%9 = select i1 %5, i1 %8, i1 false
br i1 %9, label %2, label %10
10: ; preds = %2
ret i32 %4
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
int main(void) {
  char chr = '1';
  while (1)
    write(STDOUT_FILENO, &chr, 1);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x31,-0x5(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
jmp    1123 <main+0x13>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movb   $0x31,0x7(%rsp)
mov    0x2ed0(%rip),%r14
lea    0x7(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14),%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
jmp    1130 <main+0x20>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 49, i8* %2
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* @STDOUT_FILENO
%5 = call i32 @write(i32 %4, i8* %2, i32 1)
br label %3
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i8
store i8 49, i8* %1
br label %2
2: ; preds = %2, %0
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @write(i32 %3, i8* %1, i32 1)
br label %2
}
int ivc(char c) {
  int i;
  for (i = 33; i < 123; i++) {
    if (c == i) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<ivc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movl   $0x21,-0xc(%rbp)
cmpl   $0x7b,-0xc(%rbp)
jge    1147 <ivc+0x47>
movsbl -0x5(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1134 <ivc+0x34>
movl   $0x1,-0x4(%rbp)
jmp    114e <ivc+0x4e>
jmp    1139 <ivc+0x39>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <ivc+0x11>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivc>:
lea    -0x21(%rdi),%eax
cmp    $0x59,%eax
mov    $0x59,%ecx
cmovb  %eax,%ecx
mov    $0x21,%eax
cmp    $0x10,%ecx
jb     1150 <ivc+0x50>
add    $0x1,%ecx
mov    %ecx,%eax
and    $0xf,%eax
mov    $0x10,%esi
cmovne %eax,%esi
mov    %ecx,%edx
sub    %esi,%edx
neg    %esi
lea    (%rcx,%rsi,1),%eax
add    $0x21,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0xfffffff0,%edx
jne    1140 <ivc+0x40>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %eax,%edi
je     115f <ivc+0x5f>
add    $0x1,%eax
cmp    $0x7b,%eax
jne    1150 <ivc+0x50>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ivc(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -33
%4 = call i32 @llvm.umin.i32(i32 %3, i32 89)
%5 = add nuw nsw i32 %4, 1
%6 = icmp ult i32 %4, 16
br i1 %6, label %17, label %7
7: ; preds = %1
%8 = and i32 %5, 15
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 16, i32 %8
%11 = sub nsw i32 %5, %10
%12 = add nsw i32 %11, 33
br label %13
13: ; preds = %13, %7
%14 = phi i32 [ 0, %7 ], [ %15, %13 ]
%15 = add nuw i32 %14, 16
%16 = icmp eq i32 %15, %11
br i1 %16, label %17, label %13
17: ; preds = %13, %1
%18 = phi i32 [ 33, %1 ], [ %12, %13 ]
br label %22
19: ; preds = %22
%20 = add nuw nsw i32 %23, 1
%21 = icmp eq i32 %20, 123
br i1 %21, label %25, label %22
22: ; preds = %17, %19
%23 = phi i32 [ %20, %19 ], [ %18, %17 ]
%24 = icmp eq i32 %23, %2
br i1 %24, label %25, label %19
25: ; preds = %19, %22
%26 = phi i32 [ 1, %22 ], [ 0, %19 ]
ret i32 %26
}
/* Variables and functions */
int /*<<< orphan*/ errnoThrow(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(void *);
void Sys_FileFlush(void *handle) { errnoThrow(fflush(handle)); }


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

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

LLVM IR (-O0):
define void @Sys_FileFlush(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @fflush(i8* %3)
%5 = call i32 @errnoThrow(i32 %4)
ret void
}

LLVM IR (-O2):
define void @Sys_FileFlush(i8* nocapture %0) {
%2 = tail call i32 @fflush(i8* %0)
%3 = tail call i32 @errnoThrow(i32 %2)
ret void
}