xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x9f() {
  Assert_real((isalpha(159) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              800, ("isalpha should be 0 for 0x9f"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x9f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9f,%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x320,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x9f>:
push   %rax
mov    $0x9f,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x320,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x9f\00"
define void @t_isalpha_0x9f() {
%1 = call i64 @isalpha(i32 159)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 800, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x9f\00"
define void @t_isalpha_0x9f() {
%1 = tail call i64 @isalpha(i32 159)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 800, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct copy_args_info {
  int dummy;
};

/* Variables and functions */
int copy_cmdline_parser2(int, char **, struct copy_args_info *,
                         int /*<<< orphan*/, int, int);
int copy_cmdline_parser(int argc, char **argv,
                        struct copy_args_info *args_info) {
  return copy_cmdline_parser2(argc, argv, args_info, 0, 1, 1);
}


x86 assembly (clang, -O0):
<copy_cmdline_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1030 <copy_cmdline_parser2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_cmdline_parser>:
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <copy_cmdline_parser2@plt>

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

LLVM IR (-O2):
%struct.copy_args_info = type { i32 }
define i32 @copy_cmdline_parser(i32 %0, i8** %1, %struct.copy_args_info* %2) {
%4 = tail call i32 @copy_cmdline_parser2(i32 %0, i8** %1, %struct.copy_args_info* %2, i32 0, i32 1, i32 1)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ socklen_t;
typedef int /*<<< orphan*/ __SOCKADDR_ARG;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int accept(int fd, __SOCKADDR_ARG addr, socklen_t *addr_len) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accept>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @accept(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @accept(i32 %0, i32 %1, i32* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret i32 -1
}
unsigned insert_zc(insn, value, errmsg)
unsigned insn;
int value __attribute__((unused));
const char **errmsg __attribute__((unused));
{ return insn | 31; }


x86 assembly (clang, -O0):
<insert_zc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
or     $0x1f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_zc>:
mov    %edi,%eax
or     $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @insert_zc(i32 %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load i32, i32* %4
%8 = or i32 %7, 31
ret i32 %8
}

LLVM IR (-O2):
define i32 @insert_zc(i32 %0, i32 %1, i8** nocapture readnone %2) {
%4 = or i32 %0, 31
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int com2(char **para) {
  printf("this is com2\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"this is com2\0A\00"
define i32 @com2(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"this is com2\00"
define i32 @com2(i8** nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  printf("%s\n", "hi"
                 "ho");
  printf("%s\n", "Hello");
  printf("hello: ");
  printf("%s\n", "to you");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
lea    0xec7(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea2(%rip),%rdi
lea    0xeb2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xecb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c"hiho\00"
@.str.2 = [6 x i8] c"Hello\00"
@.str.3 = [8 x i8] c"hello: \00"
@.str.4 = [7 x i8] c"to you\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"hiho\00"
@.str.2 = [6 x i8] c"Hello\00"
@.str.3 = [8 x i8] c"hello: \00"
@.str.4 = [7 x i8] c"to you\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
void *lwork(void const *, void const *, size_t *, size_t,
            int (*)(void const *, void const *), int /*<<< orphan*/);
void *lfind(const void *key, const void *base, size_t *nelp, size_t width,
            int (*compar)(const void *, const void *)) {
  return (lwork(key, base, nelp, width, compar, 0));
}


x86 assembly (clang, -O0):
<lfind>:
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    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
xor    %r9d,%r9d
call   1030 <lwork@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lfind>:
xor    %r9d,%r9d
jmp    1030 <lwork@plt>

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

LLVM IR (-O2):
define i8* @lfind(i8* %0, i8* %1, i64* %2, i64 %3, i32 (i8*, i8*)* %4) {
%6 = tail call i8* @lwork(i8* %0, i8* %1, i64* %2, i64 %3, i32 (i8*, i8*)* %4, i32 0)
ret i8* %6
}
/* Variables and functions */
double erfc(double);
double sqrt(double);
double normal2(double a) { return (1.0 - 0.5 * erfc(a / sqrt(2.0))); }


x86 assembly (clang, -O0):
<normal2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xed1(%rip),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
call   1040 <erfc@plt>
movsd  0xea3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9f(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normal2>:
push   %rax
divsd  0xee7(%rip),%xmm0
call   1030 <erfc@plt>
mulsd  0xee2(%rip),%xmm0
addsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @normal2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sqrt(double 2.000000e+00)
%5 = fdiv double %3, %4
%6 = call double @erfc(double %5)
%7 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %6, double 1.000000e+00)
ret double %7
}

LLVM IR (-O2):
define double @normal2(double %0) {
%2 = fdiv double %0, 0x3FF6A09E667F3BCD
%3 = tail call double @erfc(double %2)
%4 = tail call double @llvm.fmuladd.f64(double %3, double -5.000000e-01, double 1.000000e+00)
ret double %4
}
void signed_char_div_signed_char_unsigned_int(signed char *LHS,
                                              unsigned int RHS) {
  (*LHS) /= RHS;
}


x86 assembly (clang, -O0):
<signed_char_div_signed_char_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movsbl (%rax),%eax
xor    %edx,%edx
div    %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_char_div_signed_char_unsigned_int>:
movsbl (%rdi),%eax
xor    %edx,%edx
div    %esi
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @signed_char_div_signed_char_unsigned_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = udiv i32 %8, %5
%10 = trunc i32 %9 to i8
store i8 %10, i8* %6
ret void
}

LLVM IR (-O2):
define void @signed_char_div_signed_char_unsigned_int(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = udiv i32 %4, %1
%6 = trunc i32 %5 to i8
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GETVAL;
int semctl(int, int, int /*<<< orphan*/, int /*<<< orphan*/);
int getval(int sid, int member) {
  int semval;
  semval = semctl(sid, member, GETVAL, 0);
  return (semval);
}


x86 assembly (clang, -O0):
<getval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edx
xor    %ecx,%ecx
call   1030 <semctl@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getval>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
xor    %ecx,%ecx
jmp    1030 <semctl@plt>

LLVM IR (-O0):
@GETVAL = global i32 0
define i32 @getval(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = load i32, i32* @GETVAL
%9 = call i32 @semctl(i32 %6, i32 %7, i32 %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
@GETVAL = global i32 0
define i32 @getval(i32 %0, i32 %1) {
%3 = load i32, i32* @GETVAL
%4 = tail call i32 @semctl(i32 %0, i32 %1, i32 %3, i32 0)
ret i32 %4
}
int f(int x, int y, int b) {
  return 0;
  return b ? x : y;
}


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

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

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int errno;
char *realpath(char const *const, int /*<<< orphan*/ *);
char *strdup(char const *const);
char *xrealpath(const char *const p) {
  char *rp = NULL;
  int tmp_errno = errno;
  if (!(rp = realpath(p, NULL)))
    rp = strdup(p);
  errno = tmp_errno;
  return rp;
}


x86 assembly (clang, -O0):
<xrealpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <realpath@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1168 <xrealpath+0x48>
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%ecx
mov    0x2e6e(%rip),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealpath>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%ebp
xor    %esi,%esi
call   1030 <realpath@plt>
test   %rax,%rax
jne    1145 <xrealpath+0x25>
mov    %rbx,%rdi
call   1040 <strdup@plt>
mov    %ebp,(%r14)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i8* @xrealpath(i8* nocapture %0) {
%2 = load i32, i32* @errno
%3 = tail call i8* @realpath(i8* %0, i32* null)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i8* @strdup(i8* %0)
br label %7
7: ; preds = %5, %1
%8 = phi i8* [ %3, %1 ], [ %6, %5 ]
store i32 %2, i32* @errno
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ rosn_boot_args_manage(int, char **);
int /*<<< orphan*/ rosn_boot_header_show();
int main(int argc, char *argv[]) {
  rosn_boot_header_show();
  rosn_boot_args_manage(argc, argv);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <rosn_boot_header_show@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <rosn_boot_args_manage@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @rosn_boot_header_show()
%4 = tail call i32 @rosn_boot_args_manage(i32 %0, i8** %1)
ret i32 0
}
int vde_chain_nm7_init(int *n_in, int *n_out, int *n_int, int *n_real) {
  if (n_in)
    *n_in = 4;
  if (n_out)
    *n_out = 3;
  if (n_int)
    *n_int = 0;
  if (n_real)
    *n_real = 0;
  return 0;
}


x86 assembly (clang, -O0):
<vde_chain_nm7_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <vde_chain_nm7_init+0x29>
mov    -0x8(%rbp),%rax
movl   $0x4,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <vde_chain_nm7_init+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x3,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <vde_chain_nm7_init+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <vde_chain_nm7_init+0x68>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm7_init>:
test   %rdi,%rdi
je     110b <vde_chain_nm7_init+0xb>
movl   $0x4,(%rdi)
test   %rsi,%rsi
je     1116 <vde_chain_nm7_init+0x16>
movl   $0x3,(%rsi)
test   %rdx,%rdx
je     1121 <vde_chain_nm7_init+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <vde_chain_nm7_init+0x2c>
movl   $0x0,(%rcx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @vde_chain_nm7_init(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 4, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 3, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 0, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
/* Variables and functions */
int raytype(char *);
int isshadowray() { return raytype("shadow"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"shadow\00"
define i32 @isshadowray() {
%1 = call i32 @raytype(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [7 x i8] c"shadow\00"
define i32 @isshadowray() {
%1 = tail call i32 @raytype(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
void *malloc(size_t);
void *ckalloc(size_t size) {
  void *ptr;
  do {
    ptr = malloc(size);
  } while (!ptr);
  return ptr;
}


x86 assembly (clang, -O0):
<ckalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    111c <ckalloc+0xc>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ckalloc>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <malloc@plt>
test   %rax,%rax
je     1120 <ckalloc+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @ckalloc(i64 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %2, label %5
5: ; preds = %2
ret i8* %3
}
void *f4(int *ptr) { return ptr + 5; }


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x14,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
lea    0x14(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @f4(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 5
%5 = bitcast i32* %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @f4(i32* readnone %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 5
%3 = bitcast i32* %2 to i8*
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mktime(struct tm *);
int /*<<< orphan*/ strptime(char *, char *, struct tm *);
time_t ConvertDBDate(char *date) {
  struct tm t;
  strptime(date, "%d-%b-%Y ", &t);
  return mktime(&t);
}


x86 assembly (clang, -O0):
<ConvertDBDate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <strptime@plt>
lea    -0x10(%rbp),%rdi
call   1030 <mktime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvertDBDate>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rsi
lea    0x8(%rsp),%rbx
mov    %rbx,%rdx
call   1040 <strptime@plt>
mov    %rbx,%rdi
call   1030 <mktime@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [10 x i8] c"%d-%b-%Y \00"
define i32 @ConvertDBDate(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.tm
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strptime(i8* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %struct.tm* %3)
%6 = call i32 @mktime(%struct.tm* %3)
ret i32 %6
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [10 x i8] c"%d-%b-%Y \00"
define i32 @ConvertDBDate(i8* %0) {
%2 = alloca %struct.tm
%3 = bitcast %struct.tm* %2 to i8*
%4 = call i32 @strptime(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %struct.tm* %2)
%5 = call i32 @mktime(%struct.tm* %2)
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ pthread_t;

/* Variables and functions */
int buscaHiloLibre(pthread_t *hilos, int maxHilos) {
  int i;
  for (i = 0; i < maxHilos; i++) {
    if (hilos[i] == 0)
      return i;
  }
  return -1;
}


x86 assembly (clang, -O0):
<buscaHiloLibre>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    114f <buscaHiloLibre+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jne    113c <buscaHiloLibre+0x3c>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1156 <buscaHiloLibre+0x56>
jmp    1141 <buscaHiloLibre+0x41>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <buscaHiloLibre+0x12>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<buscaHiloLibre>:
mov    $0xffffffff,%eax
test   %esi,%esi
jle    1120 <buscaHiloLibre+0x20>
mov    %esi,%edx
xor    %ecx,%ecx
nopl   (%rax)
cmpq   $0x0,(%rdi,%rcx,8)
je     1121 <buscaHiloLibre+0x21>
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1110 <buscaHiloLibre+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @buscaHiloLibre(i64* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %11
%7 = phi i64 [ 0, %4 ], [ %12, %11 ]
%8 = getelementptr inbounds i64, i64* %0, i64 %7
%9 = load i64, i64* %8
%10 = icmp eq i64 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %6
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %16, label %6
14: ; preds = %6
%15 = trunc i64 %7 to i32
br label %16
16: ; preds = %11, %14, %2
%17 = phi i32 [ -1, %2 ], [ %15, %14 ], [ -1, %11 ]
ret i32 %17
}
unsigned long long lift(unsigned long long t, unsigned int p, unsigned int m) {
  return p * (t + 1) + m * (p - 1) - 1;
}


x86 assembly (clang, -O0):
<lift>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
add    $0x1,%rcx
imul   %rcx,%rax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
imul   %edx,%ecx
mov    %ecx,%ecx
add    %rcx,%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lift>:
mov    %esi,%eax
add    $0x1,%rdi
imul   %rax,%rdi
add    $0xffffffff,%esi
imul   %edx,%esi
lea    (%rdi,%rsi,1),%rax
add    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @lift(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = zext i32 %7 to i64
%9 = load i64, i64* %4
%10 = add i64 %9, 1
%11 = mul i64 %8, %10
%12 = load i32, i32* %6
%13 = load i32, i32* %5
%14 = sub i32 %13, 1
%15 = mul i32 %12, %14
%16 = zext i32 %15 to i64
%17 = add i64 %11, %16
%18 = sub i64 %17, 1
ret i64 %18
}

LLVM IR (-O2):
define i64 @lift(i64 %0, i32 %1, i32 %2) {
%4 = zext i32 %1 to i64
%5 = add i64 %0, 1
%6 = mul i64 %5, %4
%7 = add i32 %1, -1
%8 = mul i32 %7, %2
%9 = zext i32 %8 to i64
%10 = add i64 %6, -1
%11 = add i64 %10, %9
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int devid_get_minor_name(int fd, char **retminor_name) { abort(); }


x86 assembly (clang, -O0):
<devid_get_minor_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<devid_get_minor_name>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @devid_get_minor_name(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @devid_get_minor_name(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @abort()
unreachable
}
int main() {
  unsigned int arg = 0x80000000;
  unsigned int out = 0;
  __asm__("roll $1, %%eax;" : "=a"(out) : "a"(arg));
  return (out == 0x1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x80000000,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
rol    %eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x80000000,%eax
rol    %eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 -2147483648, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 asm "roll $$1, %eax;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm "roll $$1, %eax;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 -2147483648)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
void copy_tlatch_to_do32(void *ao, void *ai) {
  unsigned *dox = (unsigned *)ao;
  unsigned *tlx = (unsigned *)ai;
  dox[(16)] = tlx[((6 * 32) * sizeof(short) / sizeof(unsigned))];
}


x86 assembly (clang, -O0):
<copy_tlatch_to_do32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x180(%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x40(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_tlatch_to_do32>:
mov    0x180(%rsi),%eax
mov    %eax,0x40(%rdi)
ret

LLVM IR (-O0):
define void @copy_tlatch_to_do32(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %6
%12 = getelementptr inbounds i32, i32* %11, i64 96
%13 = load i32, i32* %12
%14 = load i32*, i32** %5
%15 = getelementptr inbounds i32, i32* %14, i64 16
store i32 %13, i32* %15
ret void
}

LLVM IR (-O2):
define void @copy_tlatch_to_do32(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 384
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = getelementptr inbounds i8, i8* %0, i64 64
%7 = bitcast i8* %6 to i32*
store i32 %5, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_op_jmp_T0(int);
int /*<<< orphan*/ gen_op_set_T0_nz32(int);
void gen_op_jmp_nz32(int val, int label) {
  gen_op_set_T0_nz32(val);
  gen_op_jmp_T0(label);
}


x86 assembly (clang, -O0):
<gen_op_jmp_nz32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <gen_op_set_T0_nz32@plt>
mov    -0x8(%rbp),%edi
call   1040 <gen_op_jmp_T0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_op_jmp_nz32>:
push   %rbx
mov    %esi,%ebx
call   1030 <gen_op_set_T0_nz32@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <gen_op_jmp_T0@plt>

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

LLVM IR (-O2):
define void @gen_op_jmp_nz32(i32 %0, i32 %1) {
%3 = tail call i32 @gen_op_set_T0_nz32(i32 %0)
%4 = tail call i32 @gen_op_jmp_T0(i32 %1)
ret void
}
/* Variables and functions */
int yaffsfs_do_write(int, void const *, unsigned int, int /*<<< orphan*/,
                     int /*<<< orphan*/);
int yaffs_write(int fd, const void *buf, unsigned int nbyte) {
  return yaffsfs_do_write(fd, buf, nbyte, 0, 0);
}


x86 assembly (clang, -O0):
<yaffs_write>:
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
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1030 <yaffsfs_do_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yaffs_write>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <yaffsfs_do_write@plt>

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

LLVM IR (-O2):
define i32 @yaffs_write(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @yaffsfs_do_write(i32 %0, i8* %1, i32 %2, i32 0, i32 0)
ret i32 %4
}
/* Type definitions */
struct histogram {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ hist_add(struct histogram *, unsigned long, int);
void hist_inc(struct histogram *hist, unsigned long idx) {
  hist_add(hist, idx, 1);
}


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

x86 assembly (clang, -O2):
<hist_inc>:
mov    $0x1,%edx
jmp    1030 <hist_add@plt>

LLVM IR (-O0):
%struct.histogram = type { i32 }
define void @hist_inc(%struct.histogram* %0, i64 %1) {
%3 = alloca %struct.histogram*
%4 = alloca i64
store %struct.histogram* %0, %struct.histogram** %3
store i64 %1, i64* %4
%5 = load %struct.histogram*, %struct.histogram** %3
%6 = load i64, i64* %4
%7 = call i32 @hist_add(%struct.histogram* %5, i64 %6, i32 1)
ret void
}

LLVM IR (-O2):
%struct.histogram = type { i32 }
define void @hist_inc(%struct.histogram* %0, i64 %1) {
%3 = tail call i32 @hist_add(%struct.histogram* %0, i64 %1, i32 1)
ret void
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int cpu_to_le16(int);
__le16 ieee802154_saddr_mode(__le16 fc) { return fc & cpu_to_le16(0xc000); }


x86 assembly (clang, -O0):
<ieee802154_saddr_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xc000,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
and    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee802154_saddr_mode>:
push   %rbx
mov    %edi,%ebx
mov    $0xc000,%edi
call   1030 <cpu_to_le16@plt>
and    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ieee802154_saddr_mode(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cpu_to_le16(i32 49152)
%5 = and i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @ieee802154_saddr_mode(i32 %0) {
%2 = tail call i32 @cpu_to_le16(i32 49152)
%3 = and i32 %2, %0
ret i32 %3
}
int picked1() { return 0; }


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

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

LLVM IR (-O0):
define i32 @picked1() {
ret i32 0
}

LLVM IR (-O2):
define i32 @picked1() {
ret i32 0
}
void CONFIG_delete(void) {}


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

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

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

LLVM IR (-O2):
define void @CONFIG_delete() {
ret void
}
/* Variables and functions */
int t_all();
int main(int argc, char **argv) { return t_all(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <t_all@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @t_all()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ latch_byte(unsigned long, unsigned char, unsigned char);
void latch_output(unsigned long when, unsigned char addr, unsigned char value) {
  latch_byte(when, addr * 2 + 1, value);
}


x86 assembly (clang, -O0):
<latch_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
movzbl %al,%esi
movzbl -0xa(%rbp),%edx
call   1030 <latch_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<latch_output>:
add    %sil,%sil
or     $0x1,%sil
movzbl %sil,%esi
jmp    1030 <latch_byte@plt>

LLVM IR (-O0):
define void @latch_output(i64 %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i64
%5 = alloca i8
%6 = alloca i8
store i64 %0, i64* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i64, i64* %4
%8 = load i8, i8* %5
%9 = zext i8 %8 to i32
%10 = mul nsw i32 %9, 2
%11 = add nsw i32 %10, 1
%12 = trunc i32 %11 to i8
%13 = load i8, i8* %6
%14 = call i32 @latch_byte(i64 %7, i8 zeroext %12, i8 zeroext %13)
ret void
}

LLVM IR (-O2):
define void @latch_output(i64 %0, i8 zeroext %1, i8 zeroext %2) {
%4 = shl i8 %1, 1
%5 = or i8 %4, 1
%6 = tail call i32 @latch_byte(i64 %0, i8 zeroext %5, i8 zeroext %2)
ret void
}
void bigint_invmod(unsigned char *r, const unsigned char *x, unsigned long xlen,
                   const unsigned char *m, unsigned long mlen) {}


x86 assembly (clang, -O0):
<bigint_invmod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @bigint_invmod(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
ret void
}

LLVM IR (-O2):
define void @bigint_invmod(i8* nocapture %0, i8* nocapture %1, i64 %2, i8* nocapture %3, i64 %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_rod_material_tab();
int /*<<< orphan*/ init_staff_material_tab();
int /*<<< orphan*/ init_wand_material_tab();
int /*<<< orphan*/ reset_rod_material();
int /*<<< orphan*/ reset_rod_tab();
int /*<<< orphan*/ reset_staff_material();
int /*<<< orphan*/ reset_staff_tab();
int /*<<< orphan*/ reset_wand_material();
int /*<<< orphan*/ reset_wand_tab();
void init_stick(void) {
  init_wand_material_tab();
  init_rod_material_tab();
  init_staff_material_tab();
  reset_wand_tab();
  reset_rod_tab();
  reset_staff_tab();
  reset_wand_material();
  reset_rod_material();
  reset_staff_material();
}


x86 assembly (clang, -O0):
<init_stick>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <init_wand_material_tab@plt>
mov    $0x0,%al
call   1070 <init_rod_material_tab@plt>
mov    $0x0,%al
call   1030 <init_staff_material_tab@plt>
mov    $0x0,%al
call   1050 <reset_wand_tab@plt>
mov    $0x0,%al
call   1080 <reset_rod_tab@plt>
mov    $0x0,%al
call   1090 <reset_staff_tab@plt>
mov    $0x0,%al
call   10a0 <reset_wand_material@plt>
mov    $0x0,%al
call   10b0 <reset_rod_material@plt>
mov    $0x0,%al
call   1060 <reset_staff_material@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_stick>:
push   %rax
xor    %eax,%eax
call   1040 <init_wand_material_tab@plt>
xor    %eax,%eax
call   1070 <init_rod_material_tab@plt>
xor    %eax,%eax
call   1030 <init_staff_material_tab@plt>
xor    %eax,%eax
call   1050 <reset_wand_tab@plt>
xor    %eax,%eax
call   1080 <reset_rod_tab@plt>
xor    %eax,%eax
call   1090 <reset_staff_tab@plt>
xor    %eax,%eax
call   10a0 <reset_wand_material@plt>
xor    %eax,%eax
call   10b0 <reset_rod_material@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <reset_staff_material@plt>

LLVM IR (-O0):
define void @init_stick() {
%1 = call i32 (...) @init_wand_material_tab()
%2 = call i32 (...) @init_rod_material_tab()
%3 = call i32 (...) @init_staff_material_tab()
%4 = call i32 (...) @reset_wand_tab()
%5 = call i32 (...) @reset_rod_tab()
%6 = call i32 (...) @reset_staff_tab()
%7 = call i32 (...) @reset_wand_material()
%8 = call i32 (...) @reset_rod_material()
%9 = call i32 (...) @reset_staff_material()
ret void
}

LLVM IR (-O2):
define void @init_stick() {
%1 = tail call i32 (...) @init_wand_material_tab()
%2 = tail call i32 (...) @init_rod_material_tab()
%3 = tail call i32 (...) @init_staff_material_tab()
%4 = tail call i32 (...) @reset_wand_tab()
%5 = tail call i32 (...) @reset_rod_tab()
%6 = tail call i32 (...) @reset_staff_tab()
%7 = tail call i32 (...) @reset_wand_material()
%8 = tail call i32 (...) @reset_rod_material()
%9 = tail call i32 (...) @reset_staff_material()
ret void
}
int test_imm_0Euint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x0E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Euint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0xe,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Euint64_highword_mem>:
testb  $0xe,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_0Euint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 60129542144
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void javacall_os_dispose() { return; }


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

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

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

LLVM IR (-O2):
define void @javacall_os_dispose() {
ret void
}
int zptr_check(void *pointer) {
  (void)pointer;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @zptr_check(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __setCHRBank3Low(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ m22_SetChrROMBank3();
void m22_setParamsCXX2(uint16_t addr, uint8_t val) {
  __setCHRBank3Low(addr, val);
  m22_SetChrROMBank3();
}


x86 assembly (clang, -O0):
<m22_setParamsCXX2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <__setCHRBank3Low@plt>
mov    $0x0,%al
call   1040 <m22_SetChrROMBank3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m22_setParamsCXX2>:
push   %rax
call   1030 <__setCHRBank3Low@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <m22_SetChrROMBank3@plt>

LLVM IR (-O0):
define void @m22_setParamsCXX2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @__setCHRBank3Low(i32 %5, i32 %6)
%8 = call i32 (...) @m22_SetChrROMBank3()
ret void
}

LLVM IR (-O2):
define void @m22_setParamsCXX2(i32 %0, i32 %1) {
%3 = tail call i32 @__setCHRBank3Low(i32 %0, i32 %1)
%4 = tail call i32 (...) @m22_SetChrROMBank3()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ all_off();
int /*<<< orphan*/ mcp_init();
int /*<<< orphan*/ send_bytes(int, int, int, int);
int /*<<< orphan*/ sleep(int);
void main(void) {
  int byte0, byte1, byte2, byte3;
  byte0 = 0x11;
  byte1 = 0177;
  byte2 = 51;
  byte3 = 0b11001100;
  mcp_init();
  send_bytes(byte0, byte1, byte2, byte3);
  sleep(5);
  all_off();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x11,-0x4(%rbp)
movl   $0x7f,-0x8(%rbp)
movl   $0x33,-0xc(%rbp)
movl   $0xcc,-0x10(%rbp)
mov    $0x0,%al
call   1030 <mcp_init@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1050 <send_bytes@plt>
mov    $0x5,%edi
call   1060 <sleep@plt>
mov    $0x0,%al
call   1040 <all_off@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <mcp_init@plt>
mov    $0x11,%edi
mov    $0x7f,%esi
mov    $0x33,%edx
mov    $0xcc,%ecx
call   1050 <send_bytes@plt>
mov    $0x5,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <all_off@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 17, i32* %1
store i32 127, i32* %2
store i32 51, i32* %3
store i32 204, i32* %4
%5 = call i32 (...) @mcp_init()
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @send_bytes(i32 %6, i32 %7, i32 %8, i32 %9)
%11 = call i32 @sleep(i32 5)
%12 = call i32 (...) @all_off()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @mcp_init()
%2 = tail call i32 @send_bytes(i32 17, i32 127, i32 51, i32 204)
%3 = tail call i32 @sleep(i32 5)
%4 = tail call i32 (...) @all_off()
ret void
}
int main() { return 2 != 3; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}