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

/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int waitpid(int, int *, int);
pid_t r_waitpid(pid_t pid, int *stat_loc, int options) {
  int retval;
  while (((retval = waitpid(pid, stat_loc, options)) == -1) && (errno == EINTR))
    ;
  return retval;
}


x86 assembly (clang, -O0):
<r_waitpid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <waitpid@plt>
mov    %eax,%ecx
mov    %ecx,-0x18(%rbp)
xor    %eax,%eax
cmp    $0xffffffff,%ecx
mov    %al,-0x19(%rbp)
jne    115e <r_waitpid+0x4e>
mov    0x2e95(%rip),%rax
mov    (%rax),%rax
mov    0x2e83(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    116e <r_waitpid+0x5e>
jmp    1173 <r_waitpid+0x63>
jmp    1122 <r_waitpid+0x12>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_waitpid>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb9(%rip),%r15
mov    0x2eaa(%rip),%r12
xchg   %ax,%ax
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <waitpid@plt>
cmp    $0xffffffff,%eax
jne    114b <r_waitpid+0x3b>
mov    (%r12),%rcx
cmp    %rcx,(%r15)
je     1130 <r_waitpid+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @r_waitpid(i32 %0, i32* %1, i32 %2) {
br label %4
4: ; preds = %4, %3
%5 = tail call i32 @waitpid(i32 %0, i32* %1, i32 %2)
%6 = icmp eq i32 %5, -1
%7 = load i64, i64* @errno
%8 = load i64, i64* @EINTR
%9 = icmp eq i64 %7, %8
%10 = select i1 %6, i1 %9, i1 false
br i1 %10, label %4, label %11
11: ; preds = %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
int /*<<< orphan*/ abort();
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
void test_2(int i) {
  if (i)
    foo();
  else
    bar();
  foo();
  if (i)
    foo();
  else
    abort();
  __analyzer_eval(i != 0);
}


x86 assembly (clang, -O0):
<test_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1161 <test_2+0x21>
mov    $0x0,%al
call   1060 <foo@plt>
jmp    1168 <test_2+0x28>
mov    $0x0,%al
call   1050 <bar@plt>
mov    $0x0,%al
call   1060 <foo@plt>
cmpl   $0x0,-0x4(%rbp)
je     1185 <test_2+0x45>
mov    $0x0,%al
call   1060 <foo@plt>
jmp    118c <test_2+0x4c>
mov    $0x0,%al
call   1030 <abort@plt>
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_2>:
push   %rax
xor    %eax,%eax
test   %edi,%edi
je     1165 <test_2+0x25>
call   1060 <foo@plt>
xor    %eax,%eax
call   1060 <foo@plt>
xor    %eax,%eax
call   1060 <foo@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <__analyzer_eval@plt>
call   1050 <bar@plt>
xor    %eax,%eax
call   1060 <foo@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @test_2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @foo()
br label %9
7: ; preds = %1
%8 = call i32 (...) @bar()
br label %9
9: ; preds = %7, %5
%10 = call i32 (...) @foo()
%11 = load i32, i32* %2
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 (...) @foo()
br label %17
15: ; preds = %9
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %13
%18 = load i32, i32* %2
%19 = icmp ne i32 %18, 0
%20 = zext i1 %19 to i32
%21 = call i32 @__analyzer_eval(i32 %20)
ret void
}

LLVM IR (-O2):
define void @test_2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 (...) @foo()
%5 = tail call i32 (...) @foo()
%6 = tail call i32 (...) @foo()
%7 = tail call i32 @__analyzer_eval(i32 1)
ret void
8: ; preds = %1
%9 = tail call i32 (...) @bar()
%10 = tail call i32 (...) @foo()
%11 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ sun_normalize_delta(long *, long *, double *);
void sun_subsec2delta(double subsec, long *delta_day, long *delta_sec,
                      double *delta_subsec) {
  *delta_day = 0;
  *delta_sec = 0;
  *delta_subsec = subsec;
  sun_normalize_delta(delta_day, delta_sec, delta_subsec);
}


x86 assembly (clang, -O0):
<sun_subsec2delta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
movsd  -0x8(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <sun_normalize_delta@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sun_subsec2delta>:
movq   $0x0,(%rdi)
movq   $0x0,(%rsi)
movsd  %xmm0,(%rdx)
jmp    1030 <sun_normalize_delta@plt>

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

LLVM IR (-O2):
define void @sun_subsec2delta(double %0, i64* %1, i64* %2, double* %3) {
store i64 0, i64* %1
store i64 0, i64* %2
store double %0, double* %3
%5 = tail call i32 @sun_normalize_delta(i64* %1, i64* %2, double* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, size_t, int /*<<< orphan*/);
size_t ftell(int /*<<< orphan*/ *);
size_t _filelength(FILE *f) {
  size_t pos = ftell(f);
  size_t length;
  fseek(f, 0, SEEK_END);
  length = ftell(f);
  fseek(f, pos, SEEK_SET);
  return length;
}


x86 assembly (clang, -O0):
<_filelength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e6d(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_filelength>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r15
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @_filelength(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @ftell(i32* %5)
store i64 %6, i64* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i64 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %4
%12 = load i32*, i32** %2
%13 = load i64, i64* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i64 %13, i32 %14)
%16 = load i64, i64* %4
ret i64 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @_filelength(i32* nocapture %0) {
%2 = tail call i64 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i64 %2, i32 %6)
ret i64 %5
}
/* Variables and functions */
double dlapy3_(double *, double *, double *);
double aa_cla_dlapy3(double x, double y, double z) {
  return dlapy3_(&x, &y, &z);
}


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

x86 assembly (clang, -O2):
<aa_cla_dlapy3>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm2,(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <dlapy3_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @aa_cla_dlapy3(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = call double @dlapy3_(double* %4, double* %5, double* %6)
ret double %7
}

LLVM IR (-O2):
define double @aa_cla_dlapy3(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = call double @dlapy3_(double* %4, double* %5, double* %6)
ret double %7
}
/* Variables and functions */
char const *rrd_strerror(int);
int rrd_update_r(char const *, char const *, int, char const **);
const char *rrdUpdate(const char *filename, const char *template, int argc,
                      const char **argv) {
  int ret;
  ret = rrd_update_r(filename, template, argc, argv);
  return rrd_strerror(ret);
}


x86 assembly (clang, -O0):
<rrdUpdate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <rrd_update_r@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
call   1040 <rrd_strerror@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @rrdUpdate(i8* %0, i8* %1, i32 %2, i8** %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i8**, i8*** %8
%14 = call i32 @rrd_update_r(i8* %10, i8* %11, i32 %12, i8** %13)
store i32 %14, i32* %9
%15 = load i32, i32* %9
%16 = call i8* @rrd_strerror(i32 %15)
ret i8* %16
}

LLVM IR (-O2):
define i8* @rrdUpdate(i8* %0, i8* %1, i32 %2, i8** %3) {
%5 = tail call i32 @rrd_update_r(i8* %0, i8* %1, i32 %2, i8** %3)
%6 = tail call i8* @rrd_strerror(i32 %5)
ret i8* %6
}
/* Variables and functions */
int Index_KMP(char *, char *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char *source_str = "BBC ABCDAB ABCDABCDABDE";
  char *t_str = "ABCDAB";
  printf("%d\n", Index_KMP(source_str, t_str, 8));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   1040 <Index_KMP@plt>
mov    %eax,%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee9(%rip),%rsi
mov    $0x8,%edx
call   1040 <Index_KMP@plt>
lea    0xedf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"BBC ABCDAB ABCDABCDABDE\00"
@.str.1 = [7 x i8] c"ABCDAB\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %2
%5 = load i8*, i8** %3
%6 = call i32 @Index_KMP(i8* %4, i8* %5, i32 8)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"BBC ABCDAB ABCDABCDABDE\00"
@.str.1 = [7 x i8] c"ABCDAB\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @Index_KMP(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
char peek_2_char();
char peek_char();
bool single_line_comment_detected(void) {
  bool result = false;
  if ((peek_char() == '/') && (peek_2_char() == '/')) {
    result = true;
  }
  return result;
}


x86 assembly (clang, -O0):
<single_line_comment_detected>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <peek_char@plt>
movsbl %al,%eax
cmp    $0x2f,%eax
jne    115c <single_line_comment_detected+0x3c>
mov    $0x0,%al
call   1030 <peek_2_char@plt>
movsbl %al,%eax
cmp    $0x2f,%eax
jne    115c <single_line_comment_detected+0x3c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<single_line_comment_detected>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <peek_char@plt>
cmp    $0x2f,%al
jne    113c <single_line_comment_detected+0x1c>
xor    %eax,%eax
call   1030 <peek_2_char@plt>
xor    %ebx,%ebx
cmp    $0x2f,%al
sete   %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @single_line_comment_detected() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call signext i8 (...) @peek_char()
%3 = sext i8 %2 to i32
%4 = icmp eq i32 %3, 47
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = call signext i8 (...) @peek_2_char()
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 47
br i1 %8, label %9, label %10
9: ; preds = %5
store i32 1, i32* %1
br label %10
10: ; preds = %9, %5, %0
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @single_line_comment_detected() {
%1 = tail call signext i8 (...) @peek_char()
%2 = icmp eq i8 %1, 47
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call signext i8 (...) @peek_2_char()
%5 = icmp eq i8 %4, 47
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
void polf2_(n, parray) int *n;
float parray[][2];
{ polf2((long)*n, parray); }


x86 assembly (clang, -O0):
<polf2_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <polf2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<polf2_>:
movslq (%rdi),%rdi
xor    %eax,%eax
jmp    1030 <polf2@plt>

LLVM IR (-O0):
define void @polf2_(i32* %0, [2 x float]* %1) {
%3 = alloca i32*
%4 = alloca [2 x float]*
store i32* %0, i32** %3
store [2 x float]* %1, [2 x float]** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = sext i32 %6 to i64
%8 = load [2 x float]*, [2 x float]** %4
%9 = call i32 (i64, [2 x float]*, ...) bitcast (i32 (...)* @polf2 to i32 (i64, [2 x float]*, ...)*)(i64 %7, [2 x float]* %8)
ret void
}

LLVM IR (-O2):
define void @polf2_(i32* nocapture %0, [2 x float]* %1) {
%3 = load i32, i32* %0
%4 = sext i32 %3 to i64
%5 = tail call i32 (i64, [2 x float]*, ...) bitcast (i32 (...)* @polf2 to i32 (i64, [2 x float]*, ...)*)(i64 %4, [2 x float]* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strend(char *, char *);
int main() {
  printf("%d\n", strend("hello world", "world"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    0xecd(%rip),%rsi
call   1040 <strend@plt>
mov    %eax,%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
lea    0xedb(%rip),%rsi
call   1040 <strend@plt>
lea    0xec5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [12 x i8] c"hello world\00"
@.str.2 = [6 x i8] c"world\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @strend(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [12 x i8] c"hello world\00"
@.str.2 = [6 x i8] c"world\00"
define i32 @main() {
%1 = tail call i32 @strend(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
char *__progname(nargv0)
char *nargv0;
{
  char *tmp = strrchr(nargv0, '/');
  if (tmp)
    tmp++;
  else
    tmp = nargv0;
  return (tmp);
}


x86 assembly (clang, -O0):
<__progname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <__progname+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1152 <__progname+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__progname>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @__progname(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i32 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
void TrimAfterColdReset(void) {}


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

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

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

LLVM IR (-O2):
define void @TrimAfterColdReset() {
ret void
}
void ssi_fips_fini(struct ssi_drvdata *drvdata) {}


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

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

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

LLVM IR (-O2):
%struct.ssi_drvdata = type opaque
define void @ssi_fips_fini(%struct.ssi_drvdata* nocapture %0) {
ret void
}
float resolve(float a, float b, char op) {
  if (op == '+')
    return a + b;
  else if (op == '-')
    return a - b;
  else if (op == '*')
    return a * b;
  else
    return a / b;
}


x86 assembly (clang, -O0):
<resolve>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
mov    %al,-0xd(%rbp)
movsbl -0xd(%rbp),%eax
cmp    $0x2b,%eax
jne    1135 <resolve+0x35>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1186 <resolve+0x86>
movsbl -0xd(%rbp),%eax
cmp    $0x2d,%eax
jne    1156 <resolve+0x56>
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1186 <resolve+0x86>
movsbl -0xd(%rbp),%eax
cmp    $0x2a,%eax
jne    1177 <resolve+0x77>
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1186 <resolve+0x86>
movss  -0x8(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<resolve>:
cmp    $0x2a,%dil
je     1117 <resolve+0x17>
cmp    $0x2d,%dil
je     111c <resolve+0x1c>
cmp    $0x2b,%dil
jne    1121 <resolve+0x21>
addss  %xmm1,%xmm0
ret
mulss  %xmm1,%xmm0
ret
subss  %xmm1,%xmm0
ret
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @resolve(float %0, float %1, i8 signext %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca i8
store float %0, float* %5
store float %1, float* %6
store i8 %2, i8* %7
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 43
br i1 %10, label %11, label %15
11: ; preds = %3
%12 = load float, float* %5
%13 = load float, float* %6
%14 = fadd float %12, %13
store float %14, float* %4
br label %35
15: ; preds = %3
%16 = load i8, i8* %7
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 45
br i1 %18, label %19, label %23
19: ; preds = %15
%20 = load float, float* %5
%21 = load float, float* %6
%22 = fsub float %20, %21
store float %22, float* %4
br label %35
23: ; preds = %15
%24 = load i8, i8* %7
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 42
br i1 %26, label %27, label %31
27: ; preds = %23
%28 = load float, float* %5
%29 = load float, float* %6
%30 = fmul float %28, %29
store float %30, float* %4
br label %35
31: ; preds = %23
%32 = load float, float* %5
%33 = load float, float* %6
%34 = fdiv float %32, %33
store float %34, float* %4
br label %35
35: ; preds = %31, %27, %19, %11
%36 = load float, float* %4
ret float %36
}

LLVM IR (-O2):
define float @resolve(float %0, float %1, i8 signext %2) {
switch i8 %2, label %10 [
i8 43, label %4
i8 45, label %6
i8 42, label %8
]
4: ; preds = %3
%5 = fadd float %0, %1
br label %12
6: ; preds = %3
%7 = fsub float %0, %1
br label %12
8: ; preds = %3
%9 = fmul float %0, %1
br label %12
10: ; preds = %3
%11 = fdiv float %0, %1
br label %12
12: ; preds = %10, %8, %6, %4
%13 = phi float [ %5, %4 ], [ %7, %6 ], [ %9, %8 ], [ %11, %10 ]
ret float %13
}
/* Variables and functions */
int *f();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int *i;
  i = f();
  printf("%d", ++(*i));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
add    $0x1,%esi
mov    %esi,(%rax)
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
mov    (%rax),%esi
add    $0x1,%esi
mov    %esi,(%rax)
lea    0xeca(%rip),%rdi
call   1040 <printf@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
%3 = call i32* (...) @f()
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 1
store i32 %6, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32* (...) @f()
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 1
store i32 %3, i32* %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ mmio_readb(void const *);
uint8_t mmio_le_readb(const void *addr) { return (mmio_readb(addr)); }


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

x86 assembly (clang, -O2):
<mmio_le_readb>:
jmp    1030 <mmio_readb@plt>

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

LLVM IR (-O2):
define i32 @mmio_le_readb(i8* %0) {
%2 = tail call i32 @mmio_readb(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void exitA11() { printf("A11\n"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"A11\0A\00"
define void @exitA11() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [4 x i8] c"A11\00"
define void @exitA11() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ genraw(char *);
int /*<<< orphan*/ ngen(char *, char *, int);
void cgbss(char *s, int z) {
  genraw(s);
  genraw(":");
  ngen("%s\t0 dup %d", "db", z);
}


x86 assembly (clang, -O0):
<cgbss>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <genraw@plt>
lea    0xec1(%rip),%rdi
call   1040 <genraw@plt>
mov    -0xc(%rbp),%edx
lea    0xeb4(%rip),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <ngen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgbss>:
push   %rbx
mov    %esi,%ebx
call   1040 <genraw@plt>
lea    0xed1(%rip),%rdi
call   1040 <genraw@plt>
lea    0xec7(%rip),%rdi
lea    0xecc(%rip),%rsi
mov    %ebx,%edx
pop    %rbx
jmp    1030 <ngen@plt>

LLVM IR (-O0):
@.str = [2 x i8] c":\00"
@.str.1 = [12 x i8] c"%s\090 dup %d\00"
@.str.2 = [3 x i8] c"db\00"
define void @cgbss(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @genraw(i8* %5)
%7 = call i32 @genraw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %4
%9 = call i32 @ngen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c":\00"
@.str.1 = [12 x i8] c"%s\090 dup %d\00"
@.str.2 = [3 x i8] c"db\00"
define void @cgbss(i8* %0, i32 %1) {
%3 = tail call i32 @genraw(i8* %0)
%4 = tail call i32 @genraw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @ngen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
struct set {
  int dummy;
};

/* Variables and functions */
int set_remove(struct set *, void *, size_t);
int set_remove_bytes(struct set *t, void *y, size_t n) {
  return set_remove(t, y, n);
}


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

x86 assembly (clang, -O2):
<set_remove_bytes>:
jmp    1030 <set_remove@plt>

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

LLVM IR (-O2):
%struct.set = type { i32 }
define i32 @set_remove_bytes(%struct.set* %0, i8* %1, i64 %2) {
%4 = tail call i32 @set_remove(%struct.set* %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ cpc_key_press(int);
int /*<<< orphan*/ cpc_key_unpress(int);
void Joy_Beta_Fire1(int value) {
  if (value) {
    cpc_key_press(0x64);
  } else {
    cpc_key_unpress(0x64);
  };
}


x86 assembly (clang, -O0):
<Joy_Beta_Fire1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1144 <Joy_Beta_Fire1+0x24>
mov    $0x64,%edi
call   1030 <cpc_key_press@plt>
jmp    114e <Joy_Beta_Fire1+0x2e>
mov    $0x64,%edi
call   1040 <cpc_key_unpress@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Joy_Beta_Fire1>:
test   %edi,%edi
je     112e <Joy_Beta_Fire1+0xe>
mov    $0x64,%edi
jmp    1030 <cpc_key_press@plt>
mov    $0x64,%edi
jmp    1040 <cpc_key_unpress@plt>

LLVM IR (-O0):
define void @Joy_Beta_Fire1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @cpc_key_press(i32 100)
br label %9
7: ; preds = %1
%8 = call i32 @cpc_key_unpress(i32 100)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @Joy_Beta_Fire1(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @cpc_key_press(i32 100)
br label %7
5: ; preds = %1
%6 = tail call i32 @cpc_key_unpress(i32 100)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: bct_dump bctfile\n");
  printf("  bctfile   BCT filename to read and display\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Usage: bct_dump bctfile\0A\00"
@.str.1 = [46 x i8] c" bctfile BCT filename to read and display\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"Usage: bct_dump bctfile\00"
@str.2 = [45 x i8] c" bctfile BCT filename to read and display\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int partition(int *, int, int);
void quick_sort(int *array, int from, int to) {
  if (from < to) {
    int idx = partition(array, from, to);
    quick_sort(array, from, idx - 1);
    quick_sort(array, idx + 1, to);
  }
}


x86 assembly (clang, -O0):
<quick_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <quick_sort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quick_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quick_sort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick_sort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quick_sort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quick_sort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quick_sort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @quick_sort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quick_sort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ config_to_upper(char *, size_t);
size_t strlen(char const *);
scalar_t__ strncmp(char *, char const *, size_t);
int pop3_test_cmd(char *line, const char *expected) {
  size_t len = strlen(expected);
  config_to_upper(line, len);
  if (0 == strncmp(line, expected, len))
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<pop3_test_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <config_to_upper@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1185 <pop3_test_cmd+0x55>
movl   $0x0,-0x4(%rbp)
jmp    118c <pop3_test_cmd+0x5c>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop3_test_cmd>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %rax,%rsi
call   1050 <config_to_upper@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <strncmp@plt>
neg    %rax
sbb    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @pop3_test_cmd(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i32 @config_to_upper(i8* %0, i64 %3)
%5 = tail call i64 @strncmp(i8* %0, i8* %1, i64 %3)
%6 = icmp ne i64 %5, 0
%7 = sext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ listObjects();
int /*<<< orphan*/ showObject(int /*<<< orphan*/);
char *strtok(int /*<<< orphan*/ *, char *);
void handleObjectsCommand() {
  char *parameter = strtok(NULL, "");
  if (parameter == NULL)
    listObjects();
  else
    showObject(atoi(parameter));
}


x86 assembly (clang, -O0):
<handleObjectsCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
lea    0xead(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1173 <handleObjectsCommand+0x33>
mov    $0x0,%al
call   1040 <listObjects@plt>
jmp    1183 <handleObjectsCommand+0x43>
mov    -0x8(%rbp),%rdi
call   1060 <atoi@plt>
mov    %eax,%edi
call   1030 <showObject@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handleObjectsCommand>:
push   %rax
lea    0xeb8(%rip),%rsi
xor    %edi,%edi
call   1050 <strtok@plt>
test   %rax,%rax
je     1164 <handleObjectsCommand+0x24>
mov    %rax,%rdi
call   1060 <atoi@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <showObject@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <listObjects@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @handleObjectsCommand() {
%1 = alloca i8*
%2 = call i8* @strtok(i32* null, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @listObjects()
br label %11
7: ; preds = %0
%8 = load i8*, i8** %1
%9 = call i32 @atoi(i8* %8)
%10 = call i32 @showObject(i32 %9)
br label %11
11: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @handleObjectsCommand() {
%1 = tail call i8* @strtok(i32* null, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @listObjects()
br label %8
5: ; preds = %0
%6 = tail call i32 @atoi(i8* %1)
%7 = tail call i32 @showObject(i32 %6)
br label %8
8: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t sigma0(uint32_t x) {
  return (x >> 7 | x << 25) ^ (x >> 18 | x << 14) ^ (x >> 3);
}


x86 assembly (clang, -O0):
<sigma0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x7,%eax
mov    -0x4(%rbp),%ecx
shl    $0x19,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x12,%ecx
mov    -0x4(%rbp),%edx
shl    $0xe,%edx
or     %edx,%ecx
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x3,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigma0>:
mov    %edi,%eax
sar    $0x7,%eax
mov    %edi,%ecx
shl    $0x19,%ecx
or     %eax,%ecx
mov    %edi,%edx
sar    $0x12,%edx
mov    %edi,%eax
shl    $0xe,%eax
or     %edx,%eax
sar    $0x3,%edi
xor    %edi,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @sigma0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 7
%5 = load i32, i32* %2
%6 = shl i32 %5, 25
%7 = or i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 18
%10 = load i32, i32* %2
%11 = shl i32 %10, 14
%12 = or i32 %9, %11
%13 = xor i32 %7, %12
%14 = load i32, i32* %2
%15 = ashr i32 %14, 3
%16 = xor i32 %13, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @sigma0(i32 %0) {
%2 = ashr i32 %0, 7
%3 = shl i32 %0, 25
%4 = or i32 %2, %3
%5 = ashr i32 %0, 18
%6 = shl i32 %0, 14
%7 = or i32 %5, %6
%8 = ashr i32 %0, 3
%9 = xor i32 %7, %8
%10 = xor i32 %9, %4
ret i32 %10
}
int fnSearchChar(char str[], char c, int pos) {
  if (pos < 0)
    return -1;
  else if (str[pos] == c)
    return pos;
  else
    return fnSearchChar(str, c, pos - 1);
}


x86 assembly (clang, -O0):
<fnSearchChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %edx,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    113b <fnSearchChar+0x2b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1176 <fnSearchChar+0x66>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    115e <fnSearchChar+0x4e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1176 <fnSearchChar+0x66>
mov    -0x10(%rbp),%rdi
mov    -0x11(%rbp),%al
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
movsbl %al,%esi
call   1030 <fnSearchChar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnSearchChar>:
mov    $0xffffffff,%eax
test   %edx,%edx
js     1122 <fnSearchChar+0x22>
mov    %edx,%ecx
add    %rcx,%rdi
xchg   %ax,%ax
cmp    %sil,(%rdi)
je     1123 <fnSearchChar+0x23>
lea    -0x1(%rdx),%ecx
add    $0xffffffffffffffff,%rdi
test   %edx,%edx
mov    %ecx,%edx
jg     1110 <fnSearchChar+0x10>
ret
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @fnSearchChar(i8* nocapture %0, i8 signext %1, i32 %2) {
%4 = icmp slt i32 %2, 0
br i1 %4, label %14, label %5
5: ; preds = %3, %11
%6 = phi i32 [ %12, %11 ], [ %2, %3 ]
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, %1
br i1 %10, label %14, label %11
11: ; preds = %5
%12 = add nsw i32 %6, -1
%13 = icmp slt i32 %6, 1
br i1 %13, label %14, label %5
14: ; preds = %11, %5, %3
%15 = phi i32 [ -1, %3 ], [ %6, %5 ], [ -1, %11 ]
ret i32 %15
}
void g_io_add_watch_full() {}


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

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

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

LLVM IR (-O2):
define void @g_io_add_watch_full() {
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void *memdup(const void *src, size_t len) {
  void *dest = malloc(len);
  if (dest)
    memcpy(dest, src, len);
  return dest;
}


x86 assembly (clang, -O0):
<memdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1159 <memdup+0x39>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memdup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1149 <memdup+0x29>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @memdup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8*, i8** %5
%12 = load i8*, i8** %3
%13 = load i64, i64* %4
%14 = call i32 @memcpy(i8* %11, i8* %12, i64 %13)
br label %15
15: ; preds = %10, %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @memdup(i8* %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @memcpy(i8* %3, i8* %0, i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Type definitions */
struct pathnames {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct pathnames *);
void free_subdir(struct pathnames *paths) { free(paths); }


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

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

LLVM IR (-O0):
%struct.pathnames = type { i32 }
define void @free_subdir(%struct.pathnames* %0) {
%2 = alloca %struct.pathnames*
store %struct.pathnames* %0, %struct.pathnames** %2
%3 = load %struct.pathnames*, %struct.pathnames** %2
%4 = call i32 @free(%struct.pathnames* %3)
ret void
}

LLVM IR (-O2):
%struct.pathnames = type { i32 }
define void @free_subdir(%struct.pathnames* nocapture %0) {
%2 = tail call i32 @free(%struct.pathnames* %0)
ret void
}
/* Type definitions */
struct Tree {
  int dummy;
};

/* Variables and functions */
scalar_t__ malloc(int);
struct Tree **createQueue(int *front, int *rear) {
  struct Tree **queue = (struct Tree **)malloc(sizeof(struct Tree *) * 500);
  *front = *rear = 0;
  return queue;
}


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

x86 assembly (clang, -O2):
<createQueue>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    $0xfa0,%edi
call   1030 <malloc@plt>
movl   $0x0,(%rbx)
movl   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.Tree = type { i32 }
define %struct.Tree** @createQueue(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca %struct.Tree**
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = call i64 @malloc(i32 4000)
%7 = inttoptr i64 %6 to %struct.Tree**
store %struct.Tree** %7, %struct.Tree*** %5
%8 = load i32*, i32** %4
store i32 0, i32* %8
%9 = load i32*, i32** %3
store i32 0, i32* %9
%10 = load %struct.Tree**, %struct.Tree*** %5
ret %struct.Tree** %10
}

LLVM IR (-O2):
%struct.Tree = type { i32 }
define %struct.Tree** @createQueue(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
%3 = tail call i64 @malloc(i32 4000)
%4 = inttoptr i64 %3 to %struct.Tree**
store i32 0, i32* %1
store i32 0, i32* %0
ret %struct.Tree** %4
}
/* Variables and functions */
int /*<<< orphan*/ dt_set_rlimits_stack();
void dt_set_rlimits() { dt_set_rlimits_stack(); }


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

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

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

LLVM IR (-O2):
define void @dt_set_rlimits() {
%1 = tail call i32 (...) @dt_set_rlimits_stack()
ret void
}