xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ e(int);
int /*<<< orphan*/ printf(char *, int);
void d(int x) {
  printf("d(%d)\n", x);
  if (x > 1)
    e(x - 1);
}


x86 assembly (clang, -O0):
<d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1,-0x4(%rbp)
jle    114f <d+0x2f>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1040 <e@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    $0x2,%ebx
jl     1141 <d+0x21>
add    $0xffffffff,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <e@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"d(%d)\0A\00"
define void @d(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 1
%10 = call i32 @e(i32 %9)
br label %11
11: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"d(%d)\0A\00"
define void @d(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = add nsw i32 %0, -1
%6 = tail call i32 @e(i32 %5)
br label %7
7: ; preds = %4, %1
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
long ztimeout_left(long timeout) {
  long r;
  struct timeval tv;
  gettimeofday(&tv, 0);
  r = timeout + 1 - (tv.tv_sec * 1000 + tv.tv_usec / 1000);
  return r;
}


x86 assembly (clang, -O0):
<ztimeout_left>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
imul   $0x3e8,-0x18(%rbp),%ecx
mov    -0x14(%rbp),%eax
mov    $0x3e8,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x20(%rbp),%rax
add    %edx,%ecx
movslq %ecx,%rcx
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ztimeout_left>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq 0x8(%rsp),%rax
imul   $0x3e8,%rax,%rax
movslq 0xc(%rsp),%rcx
imul   $0x10624dd3,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
movslq %ecx,%rcx
add    %rax,%rcx
sub    %rcx,%rbx
add    $0x1,%rbx
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i64 @ztimeout_left(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca %struct.timeval
store i64 %0, i64* %2
%5 = call i32 @gettimeofday(%struct.timeval* %4, i32 0)
%6 = load i64, i64* %2
%7 = add nsw i64 %6, 1
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 1000
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 1
%12 = load i32, i32* %11
%13 = sdiv i32 %12, 1000
%14 = add nsw i32 %10, %13
%15 = sext i32 %14 to i64
%16 = sub nsw i64 %7, %15
store i64 %16, i64* %3
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i64 @ztimeout_left(i64 %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = call i32 @gettimeofday(%struct.timeval* %2, i32 0)
%5 = add nsw i64 %0, 1
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 1
%10 = load i32, i32* %9
%11 = sdiv i32 %10, 1000
%12 = add nsw i32 %11, %8
%13 = sext i32 %12 to i64
%14 = sub i64 %5, %13
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
int main(void) {
  char ch;
  ch = 'A';
  printf("The code for %c is %i.\n", ch, ch);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
mov    -0x5(%rbp),%al
lea    0xed3(%rip),%rdi
movsbl %al,%esi
movsbl -0x5(%rbp),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"The code for %c is %i.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 65, i8* %2
%3 = load i8, i8* %2
%4 = load i8, i8* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 signext %3, i8 signext %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"The code for %c is %i.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 signext 65, i8 signext 65)
ret i32 0
}
void INT_Excep_LVD_LVD2(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_LVD_LVD2() {
ret void
}
/* Variables and functions */
double __infer_nondet_double();
double acos(double x) { return __infer_nondet_double(); }


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

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

LLVM IR (-O0):
define double @acos(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double (...) @__infer_nondet_double()
ret double %3
}

LLVM IR (-O2):
define double @acos(double %0) {
%2 = tail call double (...) @__infer_nondet_double()
ret double %2
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ printf(char *, char);
int main(void) {
  char *p = malloc(1);
  *p = 'a';
  char c = *p;
  printf("\n [%c]\n", c);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"\0A [%c]\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext 97)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void ADD_HOST_REG_L(int dst_reg, int src_reg) {
  addbyte(0x01);
  addbyte(0xc0 | dst_reg | (src_reg << 3));
}


x86 assembly (clang, -O0):
<ADD_HOST_REG_L>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
or     $0xc0,%edi
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
or     %eax,%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADD_HOST_REG_L>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x1,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0xc0,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @ADD_HOST_REG_L(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 1)
%6 = load i32, i32* %3
%7 = or i32 192, %6
%8 = load i32, i32* %4
%9 = shl i32 %8, 3
%10 = or i32 %7, %9
%11 = call i32 @addbyte(i32 %10)
ret void
}

LLVM IR (-O2):
define void @ADD_HOST_REG_L(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 1)
%4 = shl i32 %1, 3
%5 = or i32 %4, %0
%6 = or i32 %5, 192
%7 = tail call i32 @addbyte(i32 %6)
ret void
}
int main(void) {
  int *dptr;
  dptr = malloc(1024 * 1024 * 1024);
  printf(" memory alocate = %x", dptr);
  free(dptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x40000000,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x40000000,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xebb(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c" memory alocate = %x\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i8* @malloc(i64 1073741824)
%4 = bitcast i8* %3 to i32*
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32* %5)
%7 = load i32*, i32** %2
%8 = bitcast i32* %7 to i8*
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c" memory alocate = %x\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(1073741824) i8* @malloc(i64 1073741824)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %1)
tail call void @free(i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ good_echo();
int main(int argc, char *argv[]) {
  good_echo();
  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   1030 <good_echo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @good_echo()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printer_on();
void op_pron() { printer_on(); }


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

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

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

LLVM IR (-O2):
define void @op_pron() {
%1 = tail call i32 (...) @printer_on()
ret void
}
/* Type definitions */
typedef scalar_t__ u_int16_t;

/* Variables and functions */
u_int16_t swap16(u_int16_t x) {
  u_int16_t y = x;
  ((char *)&y)[0] = ((char *)&x)[1];
  ((char *)&y)[1] = ((char *)&x)[0];
  return y;
}


x86 assembly (clang, -O0):
<swap16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x7(%rbp),%al
mov    %al,-0x10(%rbp)
mov    -0x8(%rbp),%al
mov    %al,-0xf(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap16>:
mov    %rdi,%rax
movzbl %ah,%ecx
mov    %rdi,%rdx
and    $0xffffffffffff0000,%rdx
shl    $0x8,%eax
movzwl %ax,%eax
or     %rdx,%rax
or     %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @swap16(i64 %0) {
%2 = lshr i64 %0, 8
%3 = and i64 %2, 255
%4 = and i64 %0, -65536
%5 = shl i64 %0, 8
%6 = and i64 %5, 65280
%7 = or i64 %6, %4
%8 = or i64 %7, %3
ret i64 %8
}
void outop3str(s) char *s;
{
  ;
  outstr(s);
  bumplc3();
}


x86 assembly (clang, -O0):
<outop3str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <outstr@plt>
mov    $0x0,%al
call   1040 <bumplc3@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @outop3str(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @outstr to i32 (i8*, ...)*)(i8* %3)
%5 = call i32 (...) @bumplc3()
ret void
}

LLVM IR (-O2):
define void @outop3str(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @outstr to i32 (i8*, ...)*)(i8* %0)
%3 = tail call i32 (...) @bumplc3()
ret void
}
/* Variables and functions */
int fn_sq_ch_68_ch_97_ch_116_ch_97_ch_73_ch_110_ch_116_ch_101_ch_114_ch_115_ch_101_ch_99_ch_116_ch_105_ch_111_ch_110_ch_79_ch_102(
    char const *);
int fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_73_ch_110_ch_116_ch_101_ch_114_ch_115_ch_101_ch_99_ch_116_ch_105_ch_111_ch_110_ch_79_ch_102(
    const char *text) {
  int pos = 0;
  pos =
      fn_sq_ch_68_ch_97_ch_116_ch_97_ch_73_ch_110_ch_116_ch_101_ch_114_ch_115_ch_101_ch_99_ch_116_ch_105_ch_111_ch_110_ch_79_ch_102(
          text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_73_ch_110_ch_116_ch_101_ch_114_ch_115_ch_101_ch_99_ch_116_ch_105_ch_111_ch_110_ch_79_ch_102>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_73_ch_110_ch_116_ch_101_ch_114_ch_115_ch_101_ch_99_ch_116_ch_105_ch_111_ch_110_ch_79_ch_102@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_73_ch_110_ch_116_ch_101_ch_114_ch_115_ch_101_ch_99_ch_116_ch_105_ch_111_ch_110_ch_79_ch_102+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_73_ch_110_ch_116_ch_101_ch_114_ch_115_ch_101_ch_99_ch_116_ch_105_ch_111_ch_110_ch_79_ch_102+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_73_ch_110_ch_116_ch_101_ch_114_ch_115_ch_101_ch_99_ch_116_ch_105_ch_111_ch_110_ch_79_ch_102>:
jmp    1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_73_ch_110_ch_116_ch_101_ch_114_ch_115_ch_101_ch_99_ch_116_ch_105_ch_111_ch_110_ch_79_ch_102@plt>

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

LLVM IR (-O2):
define i32 @fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_73_ch_110_ch_116_ch_101_ch_114_ch_115_ch_101_ch_99_ch_116_ch_105_ch_111_ch_110_ch_79_ch_102(i8* %0) {
%2 = tail call i32 @fn_sq_ch_68_ch_97_ch_116_ch_97_ch_73_ch_110_ch_116_ch_101_ch_114_ch_115_ch_101_ch_99_ch_116_ch_105_ch_111_ch_110_ch_79_ch_102(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ smb_panic(char *);
char *strdup(char const *);
char *smb_xstrdup(const char *s) {
  char *s1 = strdup(s);
  if (!s1)
    smb_panic("smb_xstrdup: malloc fail\n");
  return s1;
}


x86 assembly (clang, -O0):
<smb_xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <smb_xstrdup+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <smb_panic@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smb_xstrdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <smb_xstrdup+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <smb_panic@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"smb_xstrdup: malloc fail\0A\00"
define i8* @smb_xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @smb_panic(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [26 x i8] c"smb_xstrdup: malloc fail\0A\00"
define noalias i8* @smb_xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @smb_panic(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
scalar_t__ RAND_MAX;
int rand();
double rand_uniform(double a, double b) {
  double x;
  int r;
  r = rand();
  x = (double)r / ((double)RAND_MAX + 1.0);
  return (b * x) + ((1.0 - x) * a);
}


x86 assembly (clang, -O0):
<rand_uniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x1c(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm0
mov    0x2eb0(%rip),%rax
cvtsi2sdq (%rax),%xmm1
movsd  0xebb(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xe9c(%rip),%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_uniform>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    0x2eb3(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2sdq (%rax),%xmm1
movsd  0xebb(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
subsd  %xmm0,%xmm2
mulsd  0x8(%rsp),%xmm2
mulsd  0x10(%rsp),%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @rand_uniform(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca i32
store double %0, double* %3
store double %1, double* %4
%7 = call i32 (...) @rand()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = sitofp i32 %8 to double
%10 = load i64, i64* @RAND_MAX
%11 = sitofp i64 %10 to double
%12 = fadd double %11, 1.000000e+00
%13 = fdiv double %9, %12
store double %13, double* %5
%14 = load double, double* %4
%15 = load double, double* %5
%16 = load double, double* %5
%17 = fsub double 1.000000e+00, %16
%18 = load double, double* %3
%19 = fmul double %17, %18
%20 = call double @llvm.fmuladd.f64(double %14, double %15, double %19)
ret double %20
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @rand_uniform(double %0, double %1) {
%3 = tail call i32 (...) @rand()
%4 = sitofp i32 %3 to double
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to double
%7 = fadd double %6, 1.000000e+00
%8 = fdiv double %4, %7
%9 = fsub double 1.000000e+00, %8
%10 = fmul double %9, %0
%11 = tail call double @llvm.fmuladd.f64(double %1, double %8, double %10)
ret double %11
}
void caller() {}


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

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

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

LLVM IR (-O2):
define void @caller() {
ret void
}
/* Variables and functions */
scalar_t__ _nos_run_next_task();
int /*<<< orphan*/ _nos_wait();
int /*<<< orphan*/ nos_sleep();
void nos_run_task(void) {
  while (_nos_run_next_task()) {
  };
  nos_sleep();
  _nos_wait();
}


x86 assembly (clang, -O0):
<nos_run_task>:
push   %rbp
mov    %rsp,%rbp
jmp    1139 <nos_run_task+0x9>
mov    $0x0,%al
call   1050 <_nos_run_next_task@plt>
cmp    $0x0,%rax
je     114f <nos_run_task+0x1f>
jmp    1139 <nos_run_task+0x9>
mov    $0x0,%al
call   1040 <nos_sleep@plt>
mov    $0x0,%al
call   1030 <_nos_wait@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nos_run_task>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <_nos_run_next_task@plt>
test   %rax,%rax
jne    1140 <nos_run_task+0x10>
xor    %eax,%eax
call   1040 <nos_sleep@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <_nos_wait@plt>

LLVM IR (-O0):
define void @nos_run_task() {
br label %1
1: ; preds = %4, %0
%2 = call i64 (...) @_nos_run_next_task()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
br label %1
5: ; preds = %1
%6 = call i32 (...) @nos_sleep()
%7 = call i32 (...) @_nos_wait()
ret void
}

LLVM IR (-O2):
define void @nos_run_task() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @_nos_run_next_task()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
%5 = tail call i32 (...) @nos_sleep()
%6 = tail call i32 (...) @_nos_wait()
ret void
}
/* Type definitions */
struct tsm_screen {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ inc_age(struct tsm_screen *);
int /*<<< orphan*/ screen_scroll_down(struct tsm_screen *, unsigned int);
__attribute__((visibility("default"))) void
tsm_screen_scroll_down(struct tsm_screen *con, unsigned int num) {
  if (!con || !num)
    return;
  inc_age(con);
  screen_scroll_down(con, num);
}


x86 assembly (clang, -O0):
<tsm_screen_scroll_down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1144 <tsm_screen_scroll_down+0x24>
cmpl   $0x0,-0xc(%rbp)
jne    1149 <tsm_screen_scroll_down+0x29>
jmp    115e <tsm_screen_scroll_down+0x3e>
mov    -0x8(%rbp),%rdi
call   1030 <inc_age@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <screen_scroll_down@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tsm_screen_scroll_down>:
push   %rbp
push   %rbx
push   %rax
test   %rdi,%rdi
je     1146 <tsm_screen_scroll_down+0x26>
mov    %esi,%ebp
test   %esi,%esi
je     1146 <tsm_screen_scroll_down+0x26>
mov    %rdi,%rbx
call   1030 <inc_age@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <screen_scroll_down@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.tsm_screen = type { i32 }
define void @tsm_screen_scroll_down(%struct.tsm_screen* %0, i32 %1) {
%3 = alloca %struct.tsm_screen*
%4 = alloca i32
store %struct.tsm_screen* %0, %struct.tsm_screen** %3
store i32 %1, i32* %4
%5 = load %struct.tsm_screen*, %struct.tsm_screen** %3
%6 = icmp ne %struct.tsm_screen* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %7, %2
br label %17
11: ; preds = %7
%12 = load %struct.tsm_screen*, %struct.tsm_screen** %3
%13 = call i32 @inc_age(%struct.tsm_screen* %12)
%14 = load %struct.tsm_screen*, %struct.tsm_screen** %3
%15 = load i32, i32* %4
%16 = call i32 @screen_scroll_down(%struct.tsm_screen* %14, i32 %15)
br label %17
17: ; preds = %11, %10
ret void
}

LLVM IR (-O2):
%struct.tsm_screen = type { i32 }
define void @tsm_screen_scroll_down(%struct.tsm_screen* %0, i32 %1) {
%3 = icmp ne %struct.tsm_screen* %0, null
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @inc_age(%struct.tsm_screen* %0)
%8 = tail call i32 @screen_scroll_down(%struct.tsm_screen* %0, i32 %1)
br label %9
9: ; preds = %2, %6
ret void
}
__attribute__((always_)) int zone_movable_is_highmem(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @zone_movable_is_highmem() {
ret i32 0
}
int is_whitespace(char c) {
  return (c == '\n' || c == '\r' || c == '\t' || c == ' ');
}


x86 assembly (clang, -O0):
<is_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_whitespace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_whitespace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_whitespace+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_whitespace>:
cmp    $0xd,%dil
ja     111b <is_whitespace+0x1b>
mov    $0x1,%eax
movzbl %dil,%ecx
mov    $0x2600,%edx
bt     %rcx,%rdx
jae    111b <is_whitespace+0x1b>
ret
xor    %eax,%eax
cmp    $0x20,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_whitespace(i8 signext %0) {
switch i8 %0, label %2 [
i8 13, label %5
i8 10, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 32
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
scalar_t__ isdigit(char);
char tolower(char);
uint8_t hex_nibble(uint8_t hex) {
  return isdigit(hex) ? hex - '0' : tolower(hex) - 'a' + 10;
}


x86 assembly (clang, -O0):
<hex_nibble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1150 <hex_nibble+0x30>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1165 <hex_nibble+0x45>
movsbl -0x1(%rbp),%edi
call   1040 <tolower@plt>
movsbl %al,%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_nibble>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
je     1132 <hex_nibble+0x12>
lea    -0x30(%rbx),%eax
pop    %rbx
ret
movsbl %bl,%edi
call   1040 <tolower@plt>
add    $0xa9,%al
pop    %rbx
ret

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

LLVM IR (-O2):
define signext i8 @hex_nibble(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = add i8 %0, -48
br label %9
6: ; preds = %1
%7 = tail call signext i8 @tolower(i8 signext %0)
%8 = add i8 %7, -87
br label %9
9: ; preds = %6, %4
%10 = phi i8 [ %5, %4 ], [ %8, %6 ]
ret i8 %10
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBLPMIntDisable(uint32_t ui32Base, uint32_t ui32Ints) {
  ASSERT(ui32Base == 0x40050000);
  (*((volatile uint8_t *)(ui32Base + 0x00000363))) &= ~ui32Ints;
}


x86 assembly (clang, -O0):
<USBLPMIntDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%edx
xor    $0xffffffff,%edx
mov    -0x4(%rbp),%eax
add    $0x363,%eax
cltq
mov    (%rax),%ecx
and    %edx,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBLPMIntDisable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x40050000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
not    %ebx
movslq %ebp,%rax
and    %ebx,0x363(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @USBLPMIntDisable(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 = icmp eq i32 %5, 1074069504
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = xor i32 %9, -1
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 867
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
%15 = load volatile i32, i32* %14
%16 = and i32 %15, %10
store volatile i32 %16, i32* %14
ret void
}

LLVM IR (-O2):
define void @USBLPMIntDisable(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1074069504
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = xor i32 %1, -1
%7 = add nsw i32 %0, 867
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = and i32 %10, %6
store volatile i32 %11, i32* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int num;
  num = 1;
  printf("I am a simple ");
  printf("computer.\n");
  printf("My favorite number is %d because it is always first.\n", num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xece(%rip),%rdi
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
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"I am a simple \00"
@.str.1 = [11 x i8] c"computer.\0A\00"
@.str.2 = [54 x i8] c"My favorite number is %d because it is always first.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"I am a simple \00"
@.str.2 = [54 x i8] c"My favorite number is %d because it is always first.\0A\00"
@str = [10 x i8] c"computer.\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret i32 0
}
void S_StopSound(int entnum, int entchannel) {}


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

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

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

LLVM IR (-O2):
define void @S_StopSound(i32 %0, i32 %1) {
ret void
}
void xen_init_mtrr(void) {}


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

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

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

LLVM IR (-O2):
define void @xen_init_mtrr() {
ret void
}
void f6() {
  int x;
  long ids[] = {(long)&x};
}


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f6() {
%1 = alloca i32
%2 = alloca [1 x i64]
%3 = getelementptr inbounds [1 x i64], [1 x i64]* %2, i64 0, i64 0
%4 = ptrtoint i32* %1 to i64
store i64 %4, i64* %3
ret void
}

LLVM IR (-O2):
define void @f6() {
ret void
}
int pr_b(int x) { return x - 1; }


x86 assembly (clang, -O0):
<pr_b>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_b>:
lea    -0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @pr_b(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @pr_b(i32 %0) {
%2 = add nsw i32 %0, -1
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int testaPID(pid_t *pid) {
  if (*pid < 0) {
    printf("Erro ao criar processo\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<testaPID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jge    1150 <testaPID+0x30>
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testaPID>:
push   %rax
cmpq   $0x0,(%rdi)
js     1129 <testaPID+0x9>
pop    %rcx
ret
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Erro ao criar processo\0A\00"
define i32 @testaPID(i64* %0) {
%2 = alloca i32
%3 = alloca i64*
store i64* %0, i64** %3
%4 = load i64*, i64** %3
%5 = load i64, i64* %4
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %1
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@str = [23 x i8] c"Erro ao criar processo\00"
define i32 @testaPID(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i32 undef
}
void XBEE_UART_RestoreConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @XBEE_UART_RestoreConfig() {
ret void
}
char *langDbgDevKorean128() { return "Korean 128"; }


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"Korean 128\00"
define i8* @langDbgDevKorean128() {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct pcmcia_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bar();
int config(struct pcmcia_device *link) {
  bar();
  return 0;
}


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

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

LLVM IR (-O0):
%struct.pcmcia_device = type { i32 }
define i32 @config(%struct.pcmcia_device* %0) {
%2 = alloca %struct.pcmcia_device*
store %struct.pcmcia_device* %0, %struct.pcmcia_device** %2
%3 = call i32 (...) @bar()
ret i32 0
}

LLVM IR (-O2):
%struct.pcmcia_device = type { i32 }
define i32 @config(%struct.pcmcia_device* nocapture readnone %0) {
%2 = tail call i32 (...) @bar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int usage(char const *prog_name) {
  fprintf(stderr, "Usage: %s /path/to/optical/device\n", prog_name);
  return 0;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: %s /path/to/optical/device\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: %s /path/to/optical/device\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ core6_swap(char *, int);
void U_EMRPOLYBEZIER16_swap(char *record, int torev) {
  core6_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_EMRPOLYBEZIER16_swap>:
jmp    1030 <core6_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRPOLYBEZIER16_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core6_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
int dy_foo(char *str, int i) {
  printf("dy_foo (\"%s\", %d)\n", str, i);
  return i + 1;
}


x86 assembly (clang, -O0):
<dy_foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dy_foo>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"dy_foo (\22%s\22, %d)\0A\00"
define i32 @dy_foo(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
ret i32 %9
}

LLVM IR (-O2):
@.str = [19 x i8] c"dy_foo (\22%s\22, %d)\0A\00"
define i32 @dy_foo(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%4 = add nsw i32 %1, 1
ret i32 %4
}
/* Variables and functions */
int inb(unsigned int);
int serial_is_transmit_fifo_empty(unsigned int com) {
  return inb((com + 5)) & 0x20;
}


x86 assembly (clang, -O0):
<serial_is_transmit_fifo_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x5,%edi
call   1030 <inb@plt>
and    $0x20,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_is_transmit_fifo_empty>:
push   %rax
add    $0x5,%edi
call   1030 <inb@plt>
and    $0x20,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @serial_is_transmit_fifo_empty(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 5
%5 = call i32 @inb(i32 %4)
%6 = and i32 %5, 32
ret i32 %6
}

LLVM IR (-O2):
define i32 @serial_is_transmit_fifo_empty(i32 %0) {
%2 = add i32 %0, 5
%3 = tail call i32 @inb(i32 %2)
%4 = and i32 %3, 32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x73() {
  Assert_real((isbdigit(115) == 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_isbdigit.c",
              580, ("isbdigit should be 0 for s"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x73>:
push   %rax
mov    $0x73,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x244,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for s\00"
define void @t_isbdigit_0x73() {
%1 = call i64 @isbdigit(i32 115)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 580, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for s\00"
define void @t_isbdigit_0x73() {
%1 = tail call i64 @isbdigit(i32 115)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 580, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
struct tree_t *_bst_sort(struct tree_t *bst, struct tree_node_t *node) {}


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

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

LLVM IR (-O0):
%struct.tree_t = type opaque
%struct.tree_node_t = type opaque
define %struct.tree_t* @_bst_sort(%struct.tree_t* %0, %struct.tree_node_t* %1) {
%3 = alloca %struct.tree_t*
%4 = alloca %struct.tree_t*
%5 = alloca %struct.tree_node_t*
store %struct.tree_t* %0, %struct.tree_t** %4
store %struct.tree_node_t* %1, %struct.tree_node_t** %5
%6 = load %struct.tree_t*, %struct.tree_t** %3
ret %struct.tree_t* %6
}

LLVM IR (-O2):
%struct.tree_t = type opaque
%struct.tree_node_t = type opaque
define noalias %struct.tree_t* @_bst_sort(%struct.tree_t* nocapture readnone %0, %struct.tree_node_t* nocapture readnone %1) {
ret %struct.tree_t* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ nextFibonacciUntil_(int /*<<< orphan*/, int /*<<< orphan*/,
                                       int /*<<< orphan*/, int /*<<< orphan*/,
                                       int);
void startFibonacci(int type, uint64_t until) {
  nextFibonacciUntil_(0, 0, 0, until, type);
}


x86 assembly (clang, -O0):
<startFibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%r8d
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1030 <nextFibonacciUntil_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startFibonacci>:
mov    %esi,%ecx
mov    %edi,%r8d
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <nextFibonacciUntil_@plt>

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

LLVM IR (-O2):
define void @startFibonacci(i32 %0, i32 %1) {
%3 = tail call i32 @nextFibonacciUntil_(i32 0, i32 0, i32 0, i32 %1, i32 %0)
ret void
}
/* Variables and functions */
unsigned short inw(int);
int /*<<< orphan*/ outw(int, unsigned short);
unsigned short BgaReadRegister(unsigned short IndexValue) {
  outw(0x01CE, IndexValue);
  return inw(0x01CF);
}


x86 assembly (clang, -O0):
<BgaReadRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x1ce,%edi
movzwl -0x2(%rbp),%esi
call   1040 <outw@plt>
mov    $0x1cf,%edi
call   1030 <inw@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BgaReadRegister>:
push   %rax
mov    %edi,%esi
mov    $0x1ce,%edi
call   1040 <outw@plt>
mov    $0x1cf,%edi
pop    %rax
jmp    1030 <inw@plt>

LLVM IR (-O0):
define zeroext i16 @BgaReadRegister(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @outw(i32 462, i16 zeroext %3)
%5 = call zeroext i16 @inw(i32 463)
ret i16 %5
}

LLVM IR (-O2):
define zeroext i16 @BgaReadRegister(i16 zeroext %0) {
%2 = tail call i32 @outw(i32 462, i16 zeroext %0)
%3 = tail call zeroext i16 @inw(i32 463)
ret i16 %3
}