xunge/DecIR huggingface dataset:
/* Variables and functions */
long cxRound(int);
int gregorian_calendar_to_jd(int, int, int, int, int, int);
long date2es(int yyyy, int mm, int dd, int hh, int mm2, int ss) {
  return cxRound(
      (gregorian_calendar_to_jd(yyyy, mm, dd, hh, mm2, ss) - 2451545) * 86400);
}


x86 assembly (clang, -O0):
<date2es>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
call   1040 <gregorian_calendar_to_jd@plt>
sub    $0x256859,%eax
imul   $0x15180,%eax,%edi
call   1030 <cxRound@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<date2es>:
push   %rax
call   1040 <gregorian_calendar_to_jd@plt>
imul   $0x15180,%eax,%edi
add    $0xaeeeaa80,%edi
pop    %rax
jmp    1030 <cxRound@plt>

LLVM IR (-O0):
define i64 @date2es(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @gregorian_calendar_to_jd(i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18)
%20 = sub nsw i32 %19, 2451545
%21 = mul nsw i32 %20, 86400
%22 = call i64 @cxRound(i32 %21)
ret i64 %22
}

LLVM IR (-O2):
define i64 @date2es(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @gregorian_calendar_to_jd(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5)
%8 = mul i32 %7, 86400
%9 = add i32 %8, -1360090496
%10 = tail call i64 @cxRound(i32 %9)
ret i64 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ Bytef;

/* Variables and functions */
int uncompress(int /*<<< orphan*/ *, unsigned long *,
               int /*<<< orphan*/ const *, unsigned long);
int decode_zip(void *dest, unsigned long *destLen, const void *source,
               unsigned long sourceLen) {
  return uncompress((Bytef *)dest, destLen, (const Bytef *)source, sourceLen);
}


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

x86 assembly (clang, -O2):
<decode_zip>:
jmp    1030 <uncompress@plt>

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

LLVM IR (-O2):
define i32 @decode_zip(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = bitcast i8* %0 to i32*
%6 = bitcast i8* %2 to i32*
%7 = tail call i32 @uncompress(i32* %5, i64* %1, i32* %6, i64 %3)
ret i32 %7
}
int main(void) {
  int x = 5;
  *(char *)(&x);
  char a[5] = {1, 2, 3, 4, 5};
  *(char *)(&a[4]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    0xee8(%rip),%eax
mov    %eax,-0xd(%rbp)
mov    0xee3(%rip),%al
mov    %al,-0x9(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.a = [5 x i8] c"\01\02\03\04\05"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [5 x i8]
store i32 0, i32* %1
store i32 5, i32* %2
%4 = bitcast i32* %2 to i8*
%5 = load i8, i8* %4
%6 = bitcast [5 x i8]* %3 to i8*
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 4
%8 = load i8, i8* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float BerechneKugelVolumen(float radius) {
  float volumen;
  volumen = 1.333 * 3.141 * radius * radius * radius;
  radius = radius * 2;
  printf(
      "Der Radius wurde innerhalb der Funktion verändert und ist jetzt: %f\n",
      radius);
  return volumen;
}


x86 assembly (clang, -O0):
<BerechneKugelVolumen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xea3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BerechneKugelVolumen>:
push   %rax
cvtss2sd %xmm0,%xmm1
movsd  0xee3(%rip),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtsd2ss %xmm2,%xmm1
movss  %xmm1,0x4(%rsp)
addss  %xmm0,%xmm0
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [70 x i8] c"Der Radius wurde innerhalb der Funktion ver\C3\A4ndert und ist jetzt: %f\0A\00"
define float @BerechneKugelVolumen(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fmul double 0x4010BF709B738E6D, %5
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fmul double %6, %8
%10 = load float, float* %2
%11 = fpext float %10 to double
%12 = fmul double %9, %11
%13 = fptrunc double %12 to float
store float %13, float* %3
%14 = load float, float* %2
%15 = fmul float %14, 2.000000e+00
store float %15, float* %2
%16 = load float, float* %2
%17 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), float %16)
%18 = load float, float* %3
ret float %18
}

LLVM IR (-O2):
@.str = [70 x i8] c"Der Radius wurde innerhalb der Funktion ver\C3\A4ndert und ist jetzt: %f\0A\00"
define float @BerechneKugelVolumen(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 0x4010BF709B738E6D
%4 = fmul double %3, %2
%5 = fmul double %4, %2
%6 = fptrunc double %5 to float
%7 = fmul float %0, 2.000000e+00
%8 = tail call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), float %7)
ret float %6
}
/* Type definitions */
struct t_gui_completion {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gui_completion_list_add(struct t_gui_completion *,
                                           char const *, int, char const *);
void hook_completion_list_add(struct t_gui_completion *completion,
                              const char *word, int nick_completion,
                              const char *where) {
  gui_completion_list_add(completion, word, nick_completion, where);
}


x86 assembly (clang, -O0):
<hook_completion_list_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <gui_completion_list_add@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hook_completion_list_add>:
jmp    1030 <gui_completion_list_add@plt>

LLVM IR (-O0):
%struct.t_gui_completion = type { i32 }
define void @hook_completion_list_add(%struct.t_gui_completion* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca %struct.t_gui_completion*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store %struct.t_gui_completion* %0, %struct.t_gui_completion** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load %struct.t_gui_completion*, %struct.t_gui_completion** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @gui_completion_list_add(%struct.t_gui_completion* %9, i8* %10, i32 %11, i8* %12)
ret void
}

LLVM IR (-O2):
%struct.t_gui_completion = type { i32 }
define void @hook_completion_list_add(%struct.t_gui_completion* %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @gui_completion_list_add(%struct.t_gui_completion* %0, i8* %1, i32 %2, i8* %3)
ret void
}
float inita() { return 3.0; }


x86 assembly (clang, -O0):
<inita>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<inita>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @inita() {
ret float 3.000000e+00
}

LLVM IR (-O2):
define float @inita() {
ret float 3.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ load8(void const *);
int /*<<< orphan*/ store8(void *, int /*<<< orphan*/);
__attribute__((__always___)) void copy8(void *dst, const void *src) {
  store8(dst, load8(src));
}


x86 assembly (clang, -O0):
<copy8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <load8@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <store8@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy8>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <load8@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <store8@plt>

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

LLVM IR (-O2):
define void @copy8(i8* %0, i8* %1) {
%3 = tail call i32 @load8(i8* %1)
%4 = tail call i32 @store8(i8* %0, i32 %3)
ret void
}
void XtSetKeyTranslator() {}


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

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

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

LLVM IR (-O2):
define void @XtSetKeyTranslator() {
ret void
}
int fib(int x) {
  if (x == 0)
    return 0;
  if (x == 1)
    return 1;
  return fib(x - 1) + fib(x - 2);
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <fib+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116a <fib+0x5a>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <fib+0x37>
movl   $0x1,-0x4(%rbp)
jmp    116a <fib+0x5a>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%ebx
jb     1132 <fib+0x22>
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x2,%ebx
jae    1120 <fib+0x10>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i32 [ 0, %1 ], [ %10, %6 ]
%4 = phi i32 [ %0, %1 ], [ %9, %6 ]
%5 = icmp ult i32 %4, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = add nsw i32 %4, -1
%8 = tail call i32 @fib(i32 %7)
%9 = add nsw i32 %4, -2
%10 = add nsw i32 %8, %3
br label %2
11: ; preds = %2
%12 = add nsw i32 %4, %3
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *, int);
void *Prims____Cons___tl(void *_) {
  do {
    printf("Unimplemented function at %s:%d\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/briangmilnes/vale/refs/heads/master/"
           "tools/Kremlin/kremlib/kremlib.c",
           32);
    exit(254);
  } while (0);
}


x86 assembly (clang, -O0):
<Prims____Cons___tl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xecd(%rip),%rdi
lea    0xee7(%rip),%rsi
mov    $0x20,%edx
call   1030 <printf@plt>
mov    $0xfe,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Prims____Cons___tl>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xef2(%rip),%rsi
mov    $0x20,%edx
call   1030 <printf@plt>
mov    $0xfe,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Unimplemented function at %s:%d\0A\00"
@.str.1 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/briangmilnes/vale/refs/heads/master/tools/Kremlin/kremlib/kremlib.c\00"
define i8* @Prims____Cons___tl(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %1
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.1, i64 0, i64 0), i32 32)
%6 = call i32 @exit(i32 254)
unreachable
7: ; No predecessors!
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [33 x i8] c"Unimplemented function at %s:%d\0A\00"
@.str.1 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/briangmilnes/vale/refs/heads/master/tools/Kremlin/kremlib/kremlib.c\00"
define noalias i8* @Prims____Cons___tl(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.1, i64 0, i64 0), i32 32)
%3 = tail call i32 @exit(i32 254)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ append_text_files();
int main(int argc, char **argv) {
  append_text_files();
  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 <append_text_files@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <append_text_files@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 (...) @append_text_files()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @append_text_files()
ret i32 0
}
/* Variables and functions */
int strlen(char *);
char *chomp(char *str) {
  if (*str && str[strlen(str) - 1] == '\n') {
    str[strlen(str) - 1] = '\0';
  }
  return str;
}


x86 assembly (clang, -O0):
<chomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1177 <chomp+0x67>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1177 <chomp+0x67>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chomp>:
push   %rbx
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     1139 <chomp+0x29>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    1139 <chomp+0x29>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @chomp(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 10
br i1 %10, label %11, label %16
11: ; preds = %4
%12 = tail call i32 @strlen(i8* %0)
%13 = add nsw i32 %12, -1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %0, i64 %14
store i8 0, i8* %15
br label %16
16: ; preds = %11, %4, %1
ret i8* %0
}
double bc_pow3(double x) { return (x <= 0) ? 0 : x * x * x; }


x86 assembly (clang, -O0):
<bc_pow3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     1124 <bc_pow3+0x24>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1138 <bc_pow3+0x38>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bc_pow3>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmpnlesd %xmm2,%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @bc_pow3(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ole double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %12
6: ; preds = %1
%7 = load double, double* %2
%8 = load double, double* %2
%9 = fmul double %7, %8
%10 = load double, double* %2
%11 = fmul double %9, %10
br label %12
12: ; preds = %6, %5
%13 = phi double [ 0.000000e+00, %5 ], [ %11, %6 ]
ret double %13
}

LLVM IR (-O2):
define double @bc_pow3(double %0) {
%2 = fcmp ugt double %0, 0.000000e+00
%3 = fmul double %0, %0
%4 = fmul double %3, %0
%5 = select i1 %2, double %4, double 0.000000e+00
ret double %5
}
/* Variables and functions */
int open_netlink();
int /*<<< orphan*/ read_event(int);
int main(int argc, char *argv[]) {
  int nls;
  nls = open_netlink();
  if (nls < 0)
    return nls;
  while (1)
    read_event(nls);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <open_netlink@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1153 <main+0x33>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    1158 <main+0x38>
mov    -0x14(%rbp),%edi
call   1040 <read_event@plt>
jmp    1158 <main+0x38>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <open_netlink@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1139 <main+0x19>
xchg   %ax,%ax
mov    %ebx,%edi
call   1040 <read_event@plt>
jmp    1130 <main+0x10>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @open_netlink()
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
ret i32 %3
6: ; preds = %2, %6
%7 = tail call i32 @read_event(i32 %3)
br label %6
}
/* Variables and functions */
int /*<<< orphan*/ testDriveAndCycle();
int /*<<< orphan*/ testRobotsCollision();
int /*<<< orphan*/ testScanAndShoot();
int main() {
  testScanAndShoot();
  testDriveAndCycle();
  testRobotsCollision();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <testScanAndShoot@plt>
mov    $0x0,%al
call   1030 <testDriveAndCycle@plt>
mov    $0x0,%al
call   1050 <testRobotsCollision@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @testScanAndShoot()
%2 = call i32 (...) @testDriveAndCycle()
%3 = call i32 (...) @testRobotsCollision()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testScanAndShoot()
%2 = tail call i32 (...) @testDriveAndCycle()
%3 = tail call i32 (...) @testRobotsCollision()
ret i32 0
}
int ld_bge_mm2(long double *a1, long double *a2) {
  return !(__builtin_isgreaterequal(*a1, *a2));
}


x86 assembly (clang, -O0):
<ld_bge_mm2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    -0x10(%rbp),%rax
fldt   (%rax)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_bge_mm2>:
fldt   (%rdi)
fldt   (%rsi)
xor    %eax,%eax
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setb   %al
ret

LLVM IR (-O0):
define i32 @ld_bge_mm2(x86_fp80* %0, x86_fp80* %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80*, x86_fp80** %4
%8 = load x86_fp80, x86_fp80* %7
%9 = fcmp oge x86_fp80 %6, %8
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @ld_bge_mm2(x86_fp80* nocapture %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = load x86_fp80, x86_fp80* %1
%5 = fcmp ult x86_fp80 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
int access(char *, int /*<<< orphan*/);
int ModemStarted(char *atdevice) { return access(atdevice, F_OK); }


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

x86 assembly (clang, -O2):
<ModemStarted>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <access@plt>

LLVM IR (-O0):
@F_OK = global i32 0
define i32 @ModemStarted(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @F_OK
%5 = call i32 @access(i8* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@F_OK = global i32 0
define i32 @ModemStarted(i8* nocapture %0) {
%2 = load i32, i32* @F_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
ret i32 %3
}
const char *td_ntfs_version(void) { return "none"; }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"none\00"
define i8* @td_ntfs_version() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *, ...);
void out_of_mem(int size) {
  if (size > 0)
    fatal("out of memory allocating %d bytes.", size);
  fatal("out of memory.");
}


x86 assembly (clang, -O0):
<out_of_mem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1136 <out_of_mem+0x26>
mov    -0x4(%rbp),%esi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <fatal@plt>
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out_of_mem>:
test   %edi,%edi
jle    1129 <out_of_mem+0x19>
push   %rax
mov    %edi,%esi
lea    0xee2(%rip),%rdi
xor    %eax,%eax
call   1030 <fatal@plt>
add    $0x8,%rsp
lea    0xef3(%rip),%rdi
xor    %eax,%eax
jmp    1030 <fatal@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"out of memory allocating %d bytes.\00"
@.str.1 = [15 x i8] c"out of memory.\00"
define void @out_of_mem(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @fatal(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %1
%9 = call i32 (i8*, ...) @fatal(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"out of memory allocating %d bytes.\00"
@.str.1 = [15 x i8] c"out of memory.\00"
define void @out_of_mem(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @fatal(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 (i8*, ...) @fatal(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned long long __t1mskc_u64(unsigned long long);
unsigned long long func_t1mskc64(unsigned long long X) {
  return __t1mskc_u64(X);
}


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

x86 assembly (clang, -O2):
<func_t1mskc64>:
jmp    1030 <__t1mskc_u64@plt>

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

LLVM IR (-O2):
define i64 @func_t1mskc64(i64 %0) {
%2 = tail call i64 @__t1mskc_u64(i64 %0)
ret i64 %2
}
void g_value_unset() {}


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

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

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

LLVM IR (-O2):
define void @g_value_unset() {
ret void
}
/* Variables and functions */
char *diminuto_string_copy(char *, char const *, size_t);
char *diminuto_strscpy(char *dest, const char *src, size_t n) {
  return diminuto_string_copy(dest, src, n);
}


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

x86 assembly (clang, -O2):
<diminuto_strscpy>:
jmp    1030 <diminuto_string_copy@plt>

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

LLVM IR (-O2):
define i8* @diminuto_strscpy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @diminuto_string_copy(i8* %0, i8* %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void peasoup(int *green) {
  while ((*green)--)
    puts("Bleah!");
  *green = 13 * 51 + 3;
}


x86 assembly (clang, -O0):
<peasoup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%eax
mov    %eax,%edx
add    $0xffffffff,%edx
mov    %edx,(%rcx)
cmp    $0x0,%eax
je     1143 <peasoup+0x33>
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
jmp    111c <peasoup+0xc>
mov    -0x8(%rbp),%rax
movl   $0x29a,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peasoup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
subl   $0x1,(%rdi)
jb     113d <peasoup+0x2d>
lea    0xedd(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
subl   $0x1,(%rbx)
jae    1130 <peasoup+0x20>
movl   $0x29a,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"Bleah!\00"
define void @peasoup(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, -1
store i32 %3, i32* %0
%4 = icmp eq i32 %2, 0
br i1 %4, label %10, label %5
5: ; preds = %1, %5
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %0
%8 = add nsw i32 %7, -1
store i32 %8, i32* %0
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %1
store i32 666, i32* %0
ret void
}
long int fact(long int x) {
  if (x > 1)
    return x * fact(x - 1);
  else
    return 1;
}


x86 assembly (clang, -O0):
<fact>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x1,-0x10(%rbp)
jle    1150 <fact+0x40>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
sub    $0x1,%rdi
call   1030 <fact@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
imul   %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1158 <fact+0x48>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fact>:
mov    $0x1,%eax
cmp    $0x2,%rdi
jl     1121 <fact+0x21>
mov    $0x1,%eax
imul   %rdi,%rax
lea    -0x1(%rdi),%rcx
cmp    $0x2,%rdi
mov    %rcx,%rdi
ja     1110 <fact+0x10>
ret

LLVM IR (-O0):
define i64 @fact(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp sgt i64 %4, 1
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i64, i64* %3
%8 = load i64, i64* %3
%9 = sub nsw i64 %8, 1
%10 = call i64 @fact(i64 %9)
%11 = mul nsw i64 %7, %10
store i64 %11, i64* %2
br label %13
12: ; preds = %1
store i64 1, i64* %2
br label %13
13: ; preds = %12, %6
%14 = load i64, i64* %2
ret i64 %14
}

LLVM IR (-O2):
define i64 @fact(i64 %0) {
%2 = icmp sgt i64 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i64 [ %6, %3 ], [ %0, %1 ]
%5 = phi i64 [ %7, %3 ], [ 1, %1 ]
%6 = add nsw i64 %4, -1
%7 = mul nsw i64 %4, %5
%8 = icmp ugt i64 %4, 2
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i64 [ 1, %1 ], [ %7, %3 ]
ret i64 %10
}
float sinf(float x) { return __builtin_sinf(x); }


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

x86 assembly (clang, -O2):
<sinf>:
ucomiss 0xef9(%rip),%xmm0
jae    1120 <sinf+0x20>
movss  0xef3(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1120 <sinf+0x20>
ret
nopw   0x0(%rax,%rax,1)
jmp    1120 <sinf+0x20>

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

LLVM IR (-O2):
define float @sinf(float %0) {
%2 = fcmp oeq float %0, 0xFFF0000000000000
%3 = fcmp oeq float %0, 0x7FF0000000000000
%4 = or i1 %3, %2
br i1 %4, label %5, label %6
5: ; preds = %1, %5
br label %5
6: ; preds = %1
ret float undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void sigalrm_handler(int sig) {
  fprintf(stderr, "Program timed out after %d seconds\n", 0);
  exit(1);
}


x86 assembly (clang, -O0):
<sigalrm_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
xor    %edx,%edx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigalrm_handler>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
xor    %edx,%edx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"Program timed out after %d seconds\0A\00"
define void @sigalrm_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 0)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"Program timed out after %d seconds\0A\00"
define void @sigalrm_handler(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
void Reserved_Handler17(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Reserved_Handler17>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Reserved_Handler17+0x9>
jmp    1109 <Reserved_Handler17+0x9>

x86 assembly (clang, -O2):
<Reserved_Handler17>:
jmp    1100 <Reserved_Handler17>

LLVM IR (-O0):
define void @Reserved_Handler17() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Reserved_Handler17() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
struct session {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ write_line_mud(char *, struct session *);
struct session *do_cr(struct session *ses, char *arg) {
  write_line_mud("\r\n", ses);
  return ses;
}


x86 assembly (clang, -O0):
<do_cr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed5(%rip),%rdi
call   1030 <write_line_mud@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_cr>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <write_line_mud@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.session = type { i32 }
@.str = [3 x i8] c"\0D\0A\00"
define %struct.session* @do_cr(%struct.session* %0, i8* %1) {
%3 = alloca %struct.session*
%4 = alloca i8*
store %struct.session* %0, %struct.session** %3
store i8* %1, i8** %4
%5 = load %struct.session*, %struct.session** %3
%6 = call i32 @write_line_mud(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %struct.session* %5)
%7 = load %struct.session*, %struct.session** %3
ret %struct.session* %7
}

LLVM IR (-O2):
%struct.session = type { i32 }
@.str = [3 x i8] c"\0D\0A\00"
define %struct.session* @do_cr(%struct.session* returned %0, i8* nocapture readnone %1) {
%3 = tail call i32 @write_line_mud(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %struct.session* %0)
ret %struct.session* %0
}
/* Type definitions */
struct _Locale_time {
  int dummy;
};

/* Variables and functions */
const char *_Locale_t_fmt(struct _Locale_time *ltime) { return "%H:%M:%S"; }


x86 assembly (clang, -O0):
<_Locale_t_fmt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._Locale_time = type { i32 }
@.str = [9 x i8] c"%H:%M:%S\00"
define i8* @_Locale_t_fmt(%struct._Locale_time* %0) {
%2 = alloca %struct._Locale_time*
store %struct._Locale_time* %0, %struct._Locale_time** %2
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct._Locale_time = type { i32 }
@.str = [9 x i8] c"%H:%M:%S\00"
define i8* @_Locale_t_fmt(%struct._Locale_time* nocapture readnone %0) {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
void pci_restore_msi_state(struct pci_dev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pci_restore_msi_state(%struct.pci_dev* nocapture %0) {
ret void
}
int Operand_immt_encode(unsigned int *valp) {
  unsigned t_0, immt_0;
  immt_0 = *valp;
  t_0 = immt_0 & 0xf;
  *valp = t_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_immt_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_immt_encode>:
andl   $0xf,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_immt_encode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = and i32 %7, 15
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = load i32*, i32** %2
store i32 %9, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_immt_encode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 15
store i32 %3, i32* %0
ret i32 0
}
int ioctl(d, r)
int d;
unsigned int r;
{ return (0); }


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

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

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

LLVM IR (-O2):
define i32 @ioctl(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ PUTFIELD_B();
void PUTFIELD_C() { PUTFIELD_B(); }


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

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

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

LLVM IR (-O2):
define void @PUTFIELD_C() {
%1 = tail call i32 (...) @PUTFIELD_B()
ret void
}
const char *getSpec(void) { return "typ_spec { name=typ_StringType; }"; }


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"typ_spec { name=typ_StringType; }\00"
define i8* @getSpec() {
ret i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [34 x i8] c"typ_spec { name=typ_StringType; }\00"
define i8* @getSpec() {
ret i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ nondet_bool();
void main() {
  int i = 2;
  if (nondet_bool())
    i++;
  i /= 2;
  assert(i == 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
mov    $0x0,%al
call   1040 <nondet_bool@plt>
cmp    $0x0,%rax
je     1149 <main+0x29>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <nondet_bool@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 2, i32* %1
%2 = call i64 (...) @nondet_bool()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 1
store i32 %6, i32* %1
br label %7
7: ; preds = %4, %0
%8 = load i32, i32* %1
%9 = sdiv i32 %8, 2
store i32 %9, i32* %1
%10 = load i32, i32* %1
%11 = icmp eq i32 %10, 1
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i64 (...) @nondet_bool()
%2 = tail call i32 @assert(i32 1)
ret void
}
/* Type definitions */
struct generator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ w(struct generator *, char *);
void write_block_start(struct generator *g) { w(g, "~M{~+~N"); }


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

x86 assembly (clang, -O2):
<write_block_start>:
lea    0xee9(%rip),%rsi
jmp    1030 <w@plt>

LLVM IR (-O0):
%struct.generator = type { i32 }
@.str = [8 x i8] c"~M{~+~N\00"
define void @write_block_start(%struct.generator* %0) {
%2 = alloca %struct.generator*
store %struct.generator* %0, %struct.generator** %2
%3 = load %struct.generator*, %struct.generator** %2
%4 = call i32 @w(%struct.generator* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.generator = type { i32 }
@.str = [8 x i8] c"~M{~+~N\00"
define void @write_block_start(%struct.generator* %0) {
%2 = tail call i32 @w(%struct.generator* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *gmtime_r(int /*<<< orphan*/ const *, struct tm *);
struct tm *__wrap_gmtime(const time_t *t) {
  static struct tm utim;
  return gmtime_r(t, &utim);
}


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

x86 assembly (clang, -O2):
<__wrap_gmtime>:
lea    0x2f15(%rip),%rsi
jmp    1030 <gmtime_r@plt>

LLVM IR (-O0):
%struct.tm = type { i32 }
@__wrap_gmtime.utim = internal global %struct.tm zeroinitializer
define %struct.tm* @__wrap_gmtime(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call %struct.tm* @gmtime_r(i32* %3, %struct.tm* @__wrap_gmtime.utim)
ret %struct.tm* %4
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@__wrap_gmtime.utim = internal global %struct.tm zeroinitializer
define %struct.tm* @__wrap_gmtime(i32* %0) {
%2 = tail call %struct.tm* @gmtime_r(i32* %0, %struct.tm* @__wrap_gmtime.utim)
ret %struct.tm* %2
}
int fun1031() { return 1031; }


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

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

LLVM IR (-O0):
define i32 @fun1031() {
ret i32 1031
}

LLVM IR (-O2):
define i32 @fun1031() {
ret i32 1031
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutexattr_t;

/* Variables and functions */
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @pthread_mutexattr_destroy(i32* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x73() {
  Assert_real((ispunct(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_ispunct.c",
              580, ("ispunct should be 0 for s"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x73>:
push   %rax
mov    $0x73,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x244,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for s\00"
define void @t_ispunct_0x73() {
%1 = call i64 @ispunct(i32 115)
%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 580, i8* getelementptr inbounds ([26 x i8], [26 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for s\00"
define void @t_ispunct_0x73() {
%1 = tail call i64 @ispunct(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 ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 580, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}