xunge/DecIR huggingface dataset:
/* Variables and functions */
double pow(double, double);
int main(int argc, char const *argv[]) {
  if (pow(1.0, 2.0) == 1.0) {
    return 0;
  }
  return 1;
}


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)
movsd  0xed2(%rip),%xmm0
movsd  0xed2(%rip),%xmm1
call   1030 <pow@plt>
movsd  0xebd(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    115f <main+0x4f>
jp     115f <main+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    1166 <main+0x56>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
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 double @pow(double 1.000000e+00, double 2.000000e+00)
%7 = fcmp oeq double %6, 1.000000e+00
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %10
9: ; preds = %2
store i32 1, i32* %3
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ lab_putsn(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void lab_puts(const char *str) { lab_putsn(str, strlen(str)); }


x86 assembly (clang, -O0):
<lab_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <lab_putsn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lab_puts>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <lab_putsn@plt>

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

LLVM IR (-O2):
define void @lab_puts(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @lab_putsn(i8* %0, i32 %2)
ret void
}
void Cyc_Tcpat_dummy_fn(int i, struct Cyc_Tcpat_Rhs *rhs) { return; }


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

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

LLVM IR (-O0):
%struct.Cyc_Tcpat_Rhs = type opaque
define void @Cyc_Tcpat_dummy_fn(i32 %0, %struct.Cyc_Tcpat_Rhs* %1) {
%3 = alloca i32
%4 = alloca %struct.Cyc_Tcpat_Rhs*
store i32 %0, i32* %3
store %struct.Cyc_Tcpat_Rhs* %1, %struct.Cyc_Tcpat_Rhs** %4
ret void
}

LLVM IR (-O2):
%struct.Cyc_Tcpat_Rhs = type opaque
define void @Cyc_Tcpat_dummy_fn(i32 %0, %struct.Cyc_Tcpat_Rhs* nocapture %1) {
ret void
}
int f(int *arr) { return arr[5]; }


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

x86 assembly (clang, -O2):
<f>:
mov    0x14(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 5
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef int gid_t;

/* Variables and functions */
int cmp_gid(const void *x, const void *y) {
  return *((gid_t *)x) - *((gid_t *)y);
}


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

x86 assembly (clang, -O2):
<cmp_gid>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @cmp_gid(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmp_gid(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int getRightShooterPower(int speed) { return 40; }


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

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

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

LLVM IR (-O2):
define i32 @getRightShooterPower(i32 %0) {
ret i32 40
}
int has_https_cap() { return 0x2; }


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

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

LLVM IR (-O0):
define i32 @has_https_cap() {
ret i32 2
}

LLVM IR (-O2):
define i32 @has_https_cap() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(size_t, size_t);
int /*<<< orphan*/ warn(char *);
void *xcalloc(size_t nmemb, size_t size) {
  void *p;
  if ((p = calloc(nmemb, size)) == NULL) {
    warn("calloc");
    abort();
  }
  return p;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    116e <xcalloc+0x3e>
lea    0xe9e(%rip),%rdi
call   1040 <warn@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %rax
call   1050 <calloc@plt>
test   %rax,%rax
je     113d <xcalloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <warn@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"calloc\00"
define i8* @xcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [7 x i8] c"calloc\00"
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
ret i8* %3
}
void gtk_notebook_prepend_page() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_prepend_page() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr, "Usage: %s [options] n1 n2\n", name);
  fprintf(stderr, "For more information type: %s -h \n\n", name);
}


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>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xee1(%rip),%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Usage: %s [options] n1 n2\0A\00"
@.str.1 = [36 x i8] c"For more information type: %s -h \0A\0A\00"
define void @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 ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Usage: %s [options] n1 n2\0A\00"
@.str.1 = [36 x i8] c"For more information type: %s -h \0A\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mb();
extern void outw(unsigned char b, unsigned long addr) {
  *(volatile unsigned int *)((addr << 5) +
                             ((0xfffffc0000000000UL) + 0x1c0000000UL) + 0x08) =
      b * 0x00010001;
  mb();
}


x86 assembly (clang, -O0):
<outw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
imul   $0x10001,%eax,%ecx
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
movabs $0xfffffc01c0000000,%rdx
fc ff ff
add    %rdx,%rax
mov    %ecx,0x8(%rax)
mov    $0x0,%al
call   1030 <mb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outw>:
mov    %edi,%eax
shl    $0x10,%eax
or     %edi,%eax
shl    $0x5,%rsi
movabs $0xfffffc01c0000008,%rcx
fc ff ff
mov    %eax,(%rsi,%rcx,1)
xor    %eax,%eax
jmp    1030 <mb@plt>

LLVM IR (-O0):
define void @outw(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = mul nsw i32 %6, 65537
%8 = load i64, i64* %4
%9 = shl i64 %8, 5
%10 = add i64 %9, -4390530318336
%11 = add i64 %10, 8
%12 = inttoptr i64 %11 to i32*
store volatile i32 %7, i32* %12
%13 = call i32 (...) @mb()
ret void
}

LLVM IR (-O2):
define void @outw(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 65537
%5 = shl i64 %1, 5
%6 = add i64 %5, -4390530318328
%7 = inttoptr i64 %6 to i32*
store volatile i32 %4, i32* %7
%8 = tail call i32 (...) @mb()
ret void
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
void AESDMAEnable(uint32_t ui32Base, uint32_t ui32Flags) {
  ;

  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000084))) |= ui32Flags;
}


x86 assembly (clang, -O0):
<AESDMAEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    0x84(%rax),%rcx
or     %rdx,%rcx
mov    %rcx,0x84(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESDMAEnable>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    -0x10(%rsp),%rax
mov    -0x8(%rsp),%rcx
or     %rax,0x84(%rcx)
ret

LLVM IR (-O0):
define void @AESDMAEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* %3
%7 = add nsw i64 %6, 132
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = or i64 %9, %5
store volatile i64 %10, i64* %8
ret void
}

LLVM IR (-O2):
define void @AESDMAEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* %3
%7 = add nsw i64 %6, 132
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = or i64 %9, %5
store volatile i64 %10, i64* %8
ret void
}
int rec_sum(int a, int b) {
  if (a == b) {
    return 0;
  } else if (a > b) {
    return b + rec_sum(a, b + 1);
  } else {
    return b + rec_sum(a, b - 1);
  }
}


x86 assembly (clang, -O0):
<rec_sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1136 <rec_sum+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1183 <rec_sum+0x73>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1165 <rec_sum+0x55>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
call   1030 <rec_sum@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1183 <rec_sum+0x73>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <rec_sum@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rec_sum>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
cmp    %esi,%edi
je     1150 <rec_sum+0x40>
mov    %edi,%r14d
cmovl  %esi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    %esi,%r14d
je     1142 <rec_sum+0x32>
add    %esi,%ebx
lea    0x1(%rsi),%eax
mov    %eax,%esi
cmp    %eax,%edi
jne    1130 <rec_sum+0x20>
jmp    1150 <rec_sum+0x40>
lea    -0x1(%r14),%esi
call   1030 <rec_sum@plt>
add    %r14d,%ebx
add    %eax,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @rec_sum(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = call i32 @llvm.smax.i32(i32 %1, i32 %0)
br label %6
6: ; preds = %4, %10
%7 = phi i32 [ %11, %10 ], [ %1, %4 ]
%8 = phi i32 [ %12, %10 ], [ 0, %4 ]
%9 = icmp eq i32 %7, %5
br i1 %9, label %16, label %10
10: ; preds = %6
%11 = add i32 %7, 1
%12 = add nsw i32 %7, %8
%13 = icmp eq i32 %11, %0
br i1 %13, label %14, label %6
14: ; preds = %10, %2, %16
%15 = phi i32 [ %20, %16 ], [ 0, %2 ], [ %12, %10 ]
ret i32 %15
16: ; preds = %6
%17 = add nsw i32 %5, -1
%18 = tail call i32 @rec_sum(i32 %0, i32 %17)
%19 = add i32 %5, %8
%20 = add i32 %19, %18
br label %14
}
/* Variables and functions */
int mus_read_any_1(int, int, int, int, int **, int **, int /*<<< orphan*/ *);
int mus_file_read_any(int tfd, int beg, int chans, int nints, int **bufs,
                      int **cm) {
  return (mus_read_any_1(tfd, beg, chans, nints, bufs, cm, NULL));
}


x86 assembly (clang, -O0):
<mus_file_read_any>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1030 <mus_read_any_1@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_file_read_any>:
push   %rax
movq   $0x0,(%rsp)
call   1030 <mus_read_any_1@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mus_file_read_any(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 @mus_read_any_1(i32 %13, i32 %14, i32 %15, i32 %16, i32** %17, i32** %18, i32* null)
ret i32 %19
}

LLVM IR (-O2):
define i32 @mus_file_read_any(i32 %0, i32 %1, i32 %2, i32 %3, i32** %4, i32** %5) {
%7 = tail call i32 @mus_read_any_1(i32 %0, i32 %1, i32 %2, i32 %3, i32** %4, i32** %5, i32* null)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
void localVal(int i) {
  int local = i;
  printf("Address of local is %p\n", &local);
}


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

x86 assembly (clang, -O2):
<localVal>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0xee4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Address of local is %p\0A\00"
define void @localVal(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32* %3)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Address of local is %p\0A\00"
define void @localVal(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 %0, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32* %2)
ret void
}
__attribute__((always_)) void file_release_write(struct file *filp) {}


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

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

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

LLVM IR (-O2):
%struct.file = type opaque
define void @file_release_write(%struct.file* nocapture %0) {
ret void
}
int get_node_set(int num) {
  static int nextnum = 0x10000000;
  int ret;
  if ((unsigned int)(nextnum) + (unsigned int)(num) >
      (unsigned int)(0xFFFFFFFF))
    return -1;
  ret = nextnum;
  nextnum += num;
  return ret;
}


x86 assembly (clang, -O0):
<get_node_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    0x2f13(%rip),%eax
add    -0x8(%rbp),%eax
cmp    $0xffffffff,%eax
jbe    1125 <get_node_set+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    1143 <get_node_set+0x43>
mov    0x2ef5(%rip),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    0x2ee9(%rip),%eax
mov    %eax,0x2ee3(%rip)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_node_set>:
mov    0x2f1a(%rip),%eax
add    %eax,%edi
mov    %edi,0x2f12(%rip)
ret

LLVM IR (-O0):
@get_node_set.nextnum = internal global i32 268435456
define i32 @get_node_set(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* @get_node_set.nextnum
%6 = load i32, i32* %3
%7 = add i32 %5, %6
%8 = icmp ugt i32 %7, -1
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %16
10: ; preds = %1
%11 = load i32, i32* @get_node_set.nextnum
store i32 %11, i32* %4
%12 = load i32, i32* %3
%13 = load i32, i32* @get_node_set.nextnum
%14 = add nsw i32 %13, %12
store i32 %14, i32* @get_node_set.nextnum
%15 = load i32, i32* %4
store i32 %15, i32* %2
br label %16
16: ; preds = %10, %9
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@get_node_set.nextnum = internal unnamed_addr global i32 268435456
define i32 @get_node_set(i32 %0) {
%2 = load i32, i32* @get_node_set.nextnum
%3 = add i32 %2, %0
store i32 %3, i32* @get_node_set.nextnum
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ leave(int /*<<< orphan*/);
void crash() { leave(0); }


x86 assembly (clang, -O0):
<crash>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <leave@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<crash>:
xor    %edi,%edi
jmp    1030 <leave@plt>

LLVM IR (-O0):
define void @crash() {
%1 = call i32 @leave(i32 0)
ret void
}

LLVM IR (-O2):
define void @crash() {
%1 = tail call i32 @leave(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ volatile *mem_get_reg32(int);
volatile uint32_t *flash_get_PRGKEYR() {
  return mem_get_reg32(0x40023C00 + 0x10);
}


x86 assembly (clang, -O0):
<flash_get_PRGKEYR>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40023c10,%edi
call   1030 <mem_get_reg32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flash_get_PRGKEYR>:
mov    $0x40023c10,%edi
jmp    1030 <mem_get_reg32@plt>

LLVM IR (-O0):
define i32* @flash_get_PRGKEYR() {
%1 = call i32* @mem_get_reg32(i32 1073888272)
ret i32* %1
}

LLVM IR (-O2):
define i32* @flash_get_PRGKEYR() {
%1 = tail call i32* @mem_get_reg32(i32 1073888272)
ret i32* %1
}
/* Variables and functions */
int /*<<< orphan*/ invalid_phase(char *);
void phase_4(char *input) { invalid_phase("4a"); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"4a\00"
define void @phase_4(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @invalid_phase(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"4a\00"
define void @phase_4(i8* nocapture readnone %0) {
%2 = tail call i32 @invalid_phase(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
long long cpucycles_zero(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @cpucycles_zero() {
ret i64 0
}

LLVM IR (-O2):
define i64 @cpucycles_zero() {
ret i64 0
}
/* Variables and functions */
int memcmp(void *, void *, int);
int xCmp(void *p1, int n1, void *p2, int n2) {
  int res;
  res = memcmp(p1, p2, ((n1) > (n2) ? (n2) : (n1)));
  if (res == 0)
    res = (n1 - n2);
  return res;
}


x86 assembly (clang, -O0):
<xCmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    114d <xCmp+0x3d>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    1153 <xCmp+0x43>
mov    -0xc(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%edx
call   1030 <memcmp@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    1179 <xCmp+0x69>
mov    -0xc(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xCmp>:
push   %rbx
mov    %esi,%eax
mov    %esi,%ebx
sub    %ecx,%ebx
cmovg  %ecx,%eax
mov    %rdx,%rsi
mov    %eax,%edx
call   1030 <memcmp@plt>
test   %eax,%eax
cmove  %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @xCmp(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = icmp sgt i32 %1, %3
%6 = select i1 %5, i32 %3, i32 %1
%7 = tail call i32 @memcmp(i8* %0, i8* %2, i32 %6)
%8 = icmp eq i32 %7, 0
%9 = sub nsw i32 %1, %3
%10 = select i1 %8, i32 %9, i32 %7
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ readUInt8(int /*<<< orphan*/ *);
int readSInt8(FILE *f) { return (signed char)readUInt8(f); }


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

x86 assembly (clang, -O2):
<readSInt8>:
push   %rax
call   1030 <readUInt8@plt>
movsbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @readSInt8(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @readUInt8(i32* %3)
%5 = trunc i64 %4 to i8
%6 = sext i8 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @readSInt8(i32* %0) {
%2 = tail call i64 @readUInt8(i32* %0)
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 24
%5 = ashr exact i32 %4, 24
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_cvector(char *v, long int nl, long int nh) {
  free((char *)(v + nl - 1));
}


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

x86 assembly (clang, -O2):
<free_cvector>:
add    %rsi,%rdi
add    $0xffffffffffffffff,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_cvector(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds i8, i8* %7, i64 %8
%10 = getelementptr inbounds i8, i8* %9, i64 -1
%11 = call i32 @free(i8* %10)
ret void
}

LLVM IR (-O2):
define void @free_cvector(i8* nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 %1
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = tail call i32 @free(i8* %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
void volatile_store_u64(volatile uint64_t *dest, uint64_t val) { *dest = val; }


x86 assembly (clang, -O0):
<volatile_store_u64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<volatile_store_u64>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @volatile_store_u64(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
store volatile i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @volatile_store_u64(i32* %0, i32 %1) {
store volatile i32 %1, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x6e() {
  Assert_real((isbdigit(110) == 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",
              555, ("isbdigit should be 0 for n"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x6e>:
push   %rax
mov    $0x6e,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x22b,%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 n\00"
define void @t_isbdigit_0x6e() {
%1 = call i64 @isbdigit(i32 110)
%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 555, 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 n\00"
define void @t_isbdigit_0x6e() {
%1 = tail call i64 @isbdigit(i32 110)
%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 555, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Teste de upload git.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Teste de upload git.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [21 x i8] c"Teste de upload git.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void identity(void *ptr) { return; }


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

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

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

LLVM IR (-O2):
define void @identity(i8* nocapture %0) {
ret void
}
int GetSocketLinger(const int fd __attribute__((__unused__)),
                    int *const lingertime __attribute__((__unused__))) {
  ;
  ;
  return (-1);
}


x86 assembly (clang, -O0):
<GetSocketLinger>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @GetSocketLinger(i32 %0, i32* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void f3(void) { printf("in f3()\n"); }


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"in f3()\00"
define void @f3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ print_ru();
int /*<<< orphan*/ print_total_error();
int /*<<< orphan*/ printf(char *);
void sigint_handler(int sig) {
  printf("Tests interrupted!\n\n");
  print_total_error();
  print_ru();
  exit(0);
}


x86 assembly (clang, -O0):
<sigint_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xeae(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <print_total_error@plt>
mov    $0x0,%al
call   1040 <print_ru@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<sigint_handler>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <print_total_error@plt>
xor    %eax,%eax
call   1050 <print_ru@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Tests interrupted!\0A\0A\00"
define void @sigint_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @print_total_error()
%5 = call i32 (...) @print_ru()
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [20 x i8] c"Tests interrupted!\0A\00"
define void @sigint_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @print_total_error()
%4 = tail call i32 (...) @print_ru()
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char *UTIL_appendStr(char *, char *);
char *OC_mkCVarName(char *name) { return UTIL_appendStr(name, "Constant"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"Constant\00"
define i8* @OC_mkCVarName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @UTIL_appendStr(i8* %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [9 x i8] c"Constant\00"
define i8* @OC_mkCVarName(i8* %0) {
%2 = tail call i8* @UTIL_appendStr(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
void glDisable(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glDisable() {
ret void
}
int f(int x) {
  if (x == 0) {
    return x;
  } else {
    int a[3];
    a[0] = -x;
    return a[0];
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111c <f+0x1c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112a <f+0x2a>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
neg    %eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [3 x i32]
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %3
store i32 %8, i32* %2
br label %15
9: ; preds = %1
%10 = load i32, i32* %3
%11 = sub nsw i32 0, %10
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
store i32 %11, i32* %12
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%14 = load i32, i32* %13
store i32 %14, i32* %2
br label %15
15: ; preds = %9, %7
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = sub nsw i32 0, %0
ret i32 %2
}
void error_handler() {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @error_handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int strlen(char const *);
char *xmalloc(int);
char *xstrdup(const char *s) {
  size_t len;
  char *copy;
  len = strlen(s) + 1;
  copy = xmalloc(sizeof(char) * len);
  memcpy(copy, s, len);
  return copy;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1050 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15d,%edi
call   1040 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = mul i64 1, %9
%11 = trunc i64 %10 to i32
%12 = call i8* @xmalloc(i32 %11)
store i8* %12, i8** %4
%13 = load i8*, i8** %4
%14 = load i8*, i8** %2
%15 = load i64, i64* %3
%16 = call i32 @memcpy(i8* %13, i8* %14, i64 %15)
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @xmalloc(i32 %3)
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ dir();
int /*<<< orphan*/ pushStringCopy(int /*<<< orphan*/);
void basDir() { pushStringCopy(dir()); }


x86 assembly (clang, -O0):
<basDir>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dir@plt>
mov    %eax,%edi
call   1040 <pushStringCopy@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basDir>:
push   %rax
xor    %eax,%eax
call   1030 <dir@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushStringCopy@plt>

LLVM IR (-O0):
define void @basDir() {
%1 = call i32 (...) @dir()
%2 = call i32 @pushStringCopy(i32 %1)
ret void
}

LLVM IR (-O2):
define void @basDir() {
%1 = tail call i32 (...) @dir()
%2 = tail call i32 @pushStringCopy(i32 %1)
ret void
}
double bvhr(double value) {
  int pot = 0;
  while (value > 1500 && ++pot <= 4)
    value /= 1000;
  return value;
}


x86 assembly (clang, -O0):
<bvhr>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
movsd  0xee1(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xd(%rbp)
jbe    113e <bvhr+0x3e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x4,%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    114e <bvhr+0x4e>
jmp    1169 <bvhr+0x69>
movsd  -0x8(%rbp),%xmm0
movsd  0xead(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1110 <bvhr+0x10>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bvhr>:
ucomisd 0xef8(%rip),%xmm0
jbe    1148 <bvhr+0x48>
divsd  0xef6(%rip),%xmm0
ucomisd 0xee6(%rip),%xmm0
jbe    1148 <bvhr+0x48>
divsd  0xee4(%rip),%xmm0
ucomisd 0xed4(%rip),%xmm0
jbe    1148 <bvhr+0x48>
divsd  0xed2(%rip),%xmm0
ucomisd 0xec2(%rip),%xmm0
jbe    1148 <bvhr+0x48>
divsd  0xec0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @bvhr(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load double, double* %2
%6 = fcmp ogt double %5, 1.500000e+03
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
%10 = icmp sle i32 %9, 4
br label %11
11: ; preds = %7, %4
%12 = phi i1 [ false, %4 ], [ %10, %7 ]
br i1 %12, label %13, label %16
13: ; preds = %11
%14 = load double, double* %2
%15 = fdiv double %14, 1.000000e+03
store double %15, double* %2
br label %4
16: ; preds = %11
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @bvhr(double %0) {
%2 = fcmp ogt double %0, 1.500000e+03
br i1 %2, label %3, label %14
3: ; preds = %1
%4 = fdiv double %0, 1.000000e+03
%5 = fcmp ogt double %4, 1.500000e+03
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = fdiv double %4, 1.000000e+03
%8 = fcmp ogt double %7, 1.500000e+03
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = fdiv double %7, 1.000000e+03
%11 = fcmp ogt double %10, 1.500000e+03
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = fdiv double %10, 1.000000e+03
br label %14
14: ; preds = %3, %6, %9, %12, %1
%15 = phi double [ %0, %1 ], [ %4, %3 ], [ %7, %6 ], [ %10, %9 ], [ %13, %12 ]
ret double %15
}
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int c) {
  int ret = c;
  if (isupper(c))
    ret = c - 0x20;
  return ret;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113c <tolower+0x2c>
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printUsage(char const *);
void usage(const char *cmd) {
  printUsage(cmd);
  exit(255);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <printUsage@plt>
mov    $0xff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
call   1030 <printUsage@plt>
mov    $0xff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printUsage(i8* %3)
%5 = call i32 @exit(i32 255)
unreachable
}

LLVM IR (-O2):
define void @usage(i8* %0) {
%2 = tail call i32 @printUsage(i8* %0)
%3 = tail call i32 @exit(i32 255)
unreachable
}
int test_imm_4Cint32_reg(int val) { return ((val) & (0x4C << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_4Cint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x4c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Cint32_reg>:
test   $0x4c,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Cint32_reg(i32 %0) {
%2 = and i32 %0, 76
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int read_cop0_status();
int is_interruptible(void) {
  return (read_cop0_status() & (0x00000001 | 0x00000002 | 0x00000004)) ==
         0x00000001;
}


x86 assembly (clang, -O0):
<is_interruptible>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <read_cop0_status@plt>
and    $0x7,%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_interruptible>:
push   %rax
xor    %eax,%eax
call   1030 <read_cop0_status@plt>
and    $0x7,%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_interruptible() {
%1 = call i32 (...) @read_cop0_status()
%2 = and i32 %1, 7
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @is_interruptible() {
%1 = tail call i32 (...) @read_cop0_status()
%2 = and i32 %1, 7
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, unsigned char const *, int);
void GLUE_SET_PX_FROM_WTP(void *b, int wv) {
  static const unsigned char tab[3][3] = {
      {0x48, 0x89, 0xF0},
      {0x48, 0x89, 0xF7},
      {0x48, 0x89, 0xF1},
  };
  memcpy(b, tab[wv], 3);
}


x86 assembly (clang, -O0):
<GLUE_SET_PX_FROM_WTP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
lea    0xed2(%rip),%rsi
imul   $0x3,%rax,%rax
add    %rax,%rsi
mov    $0x3,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLUE_SET_PX_FROM_WTP>:
movslq %esi,%rax
lea    (%rax,%rax,2),%rax
lea    0xee2(%rip),%rsi
add    %rax,%rsi
mov    $0x3,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
@GLUE_SET_PX_FROM_WTP.tab = internal constant [3 x [3 x i8]] [[3 x i8] c"H\89\F0", [3 x i8] c"H\89\F7", [3 x i8] c"H\89\F1"]
define void @GLUE_SET_PX_FROM_WTP(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 = sext i32 %6 to i64
%8 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* @GLUE_SET_PX_FROM_WTP.tab, i64 0, i64 %7
%9 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
%10 = call i32 @memcpy(i8* %5, i8* %9, i32 3)
ret void
}

LLVM IR (-O2):
@GLUE_SET_PX_FROM_WTP.tab = internal constant [3 x [3 x i8]] [[3 x i8] c"H\89\F0", [3 x i8] c"H\89\F7", [3 x i8] c"H\89\F1"]
define void @GLUE_SET_PX_FROM_WTP(i8* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* @GLUE_SET_PX_FROM_WTP.tab, i64 0, i64 %3, i64 0
%5 = tail call i32 @memcpy(i8* %0, i8* %4, i32 3)
ret void
}