xunge/DecIR huggingface dataset:
/* Variables and functions */
int overlap_labels(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int old_main(int argc, char *argv[]) {
  char *tree2 = "(((a,b),(c,d)),e);";
  char *subtree2 = "(e,(c,d));";
  int overlap = overlap_labels(tree2, subtree2);
  printf("\nOverlap = %d \n", overlap);
  return 0;
}


x86 assembly (clang, -O0):
<old_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xed2(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <overlap_labels@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<old_main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee4(%rip),%rsi
call   1040 <overlap_labels@plt>
lea    0xee3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"(((a,b),(c,d)),e);\00"
@.str.1 = [11 x i8] c"(e,(c,d));\00"
@.str.2 = [16 x i8] c"\0AOverlap = %d \0A\00"
define i32 @old_main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8** %5
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %6
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @overlap_labels(i8* %8, i8* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"(((a,b),(c,d)),e);\00"
@.str.1 = [11 x i8] c"(e,(c,d));\00"
@.str.2 = [16 x i8] c"\0AOverlap = %d \0A\00"
define i32 @old_main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @overlap_labels(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void vn_free(void *p) { free(p); }


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

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

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

LLVM IR (-O2):
define void @vn_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void print_char(c) char c;
{
  if (c == '\n')
    bios_putchar('\r');
  bios_putchar(c);
}


x86 assembly (clang, -O0):
<print_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    1137 <print_char+0x27>
mov    $0xd,%edi
mov    $0x0,%al
call   1030 <bios_putchar@plt>
movsbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1030 <bios_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_char>:
push   %rbx
mov    %edi,%ebx
shl    $0x18,%ebx
cmp    $0xa000000,%ebx
jne    112a <print_char+0x1a>
mov    $0xd,%edi
xor    %eax,%eax
call   1030 <bios_putchar@plt>
sar    $0x18,%ebx
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <bios_putchar@plt>

LLVM IR (-O0):
define void @print_char(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 10
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (i32, ...) bitcast (i32 (...)* @bios_putchar to i32 (i32, ...)*)(i32 13)
br label %9
9: ; preds = %7, %1
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = call i32 (i32, ...) bitcast (i32 (...)* @bios_putchar to i32 (i32, ...)*)(i32 %11)
ret void
}

LLVM IR (-O2):
define void @print_char(i32 %0) {
%2 = shl i32 %0, 24
%3 = icmp eq i32 %2, 167772160
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @bios_putchar to i32 (i32, ...)*)(i32 13)
br label %6
6: ; preds = %4, %1
%7 = ashr exact i32 %2, 24
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @bios_putchar to i32 (i32, ...)*)(i32 %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int64_t doubleToRawLongBits(double d) {
  union {
    double f;
    int64_t i;
  } tmp;
  tmp.f = d;
  return tmp.i;
}


x86 assembly (clang, -O0):
<doubleToRawLongBits>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubleToRawLongBits>:
movq   %xmm0,%rax
ret

LLVM IR (-O0):
%union.anon = type { double }
define i32 @doubleToRawLongBits(double %0) {
%2 = alloca double
%3 = alloca %union.anon
store double %0, double* %2
%4 = load double, double* %2
%5 = bitcast %union.anon* %3 to double*
store double %4, double* %5
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @doubleToRawLongBits(double %0) {
%2 = bitcast double %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
void setuprand(void) { srand((unsigned)time(NULL)); }


x86 assembly (clang, -O0):
<setuprand>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @setuprand() {
%1 = call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = call i32 @srand(i32 %2)
ret void
}

LLVM IR (-O2):
define void @setuprand() {
%1 = tail call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @srand(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FIONREAD;
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ ioctl(int /*<<< orphan*/, int /*<<< orphan*/, int *);
void nmstermio_clear_input(void) {
  int i;
  ioctl(STDIN_FILENO, FIONREAD, &i);
  while (i-- > 0) {
    getchar();
  }
}


x86 assembly (clang, -O0):
<nmstermio_clear_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdx
call   1030 <ioctl@plt>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    1163 <nmstermio_clear_input+0x43>
mov    $0x0,%al
call   1040 <getchar@plt>
jmp    1143 <nmstermio_clear_input+0x23>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nmstermio_clear_input>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
nopl   (%rax)
mov    0x4(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0x4(%rsp)
test   %eax,%eax
jle    1158 <nmstermio_clear_input+0x38>
xor    %eax,%eax
call   1040 <getchar@plt>
jmp    1140 <nmstermio_clear_input+0x20>
pop    %rax
ret

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
@FIONREAD = global i32 0
define void @nmstermio_clear_input() {
%1 = alloca i32
%2 = load i32, i32* @STDIN_FILENO
%3 = load i32, i32* @FIONREAD
%4 = call i32 @ioctl(i32 %2, i32 %3, i32* %1)
br label %5
5: ; preds = %9, %0
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = icmp sgt i32 %6, 0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = call i32 (...) @getchar()
br label %5
11: ; preds = %5
ret void
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
@FIONREAD = global i32 0
define void @nmstermio_clear_input() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @STDIN_FILENO
%4 = load i32, i32* @FIONREAD
%5 = call i32 @ioctl(i32 %3, i32 %4, i32* %1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = icmp sgt i32 %6, 0
br i1 %8, label %9, label %14
9: ; preds = %0, %9
%10 = call i32 (...) @getchar()
%11 = load i32, i32* %1
%12 = add nsw i32 %11, -1
store i32 %12, i32* %1
%13 = icmp sgt i32 %11, 0
br i1 %13, label %9, label %14
14: ; preds = %9, %0
ret void
}
unsigned long hash(char *str) {
  unsigned long hash = 5381;
  int c;
  while ((c = *str++))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <hash+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
ret
mov    $0x1505,%eax
ret

LLVM IR (-O0):
define i64 @hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i32
store i8* %0, i8** %2
store i64 5381, i64* %3
br label %5
5: ; preds = %11, %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %2
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
store i32 %9, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %5
%12 = load i64, i64* %3
%13 = shl i64 %12, 5
%14 = load i64, i64* %3
%15 = add i64 %13, %14
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = add i64 %15, %17
store i64 %18, i64* %3
br label %5
19: ; preds = %5
%20 = load i64, i64* %3
ret i64 %20
}

LLVM IR (-O2):
define i64 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ baddext2_(float *, float *, float *, float *, int *, int *,
                             int *, int *);
void cbaddext2(float bxy[], float omx, float omy, float omz, int nx, int ny,
               int nxe, int nye) {
  baddext2_(bxy, &omx, &omy, &omz, &nx, &ny, &nxe, &nye);
  return;
}


x86 assembly (clang, -O0):
<cbaddext2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
lea    -0x18(%rbp),%r8
lea    -0x1c(%rbp),%r9
lea    -0x20(%rbp),%r10
lea    -0x24(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <baddext2_@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbaddext2>:
sub    $0x28,%rsp
movss  %xmm0,0x24(%rsp)
movss  %xmm1,0x20(%rsp)
movss  %xmm2,0x1c(%rsp)
mov    %esi,0x18(%rsp)
mov    %edx,0x14(%rsp)
mov    %ecx,0x10(%rsp)
mov    %r8d,0xc(%rsp)
lea    0xc(%rsp),%rax
lea    0x10(%rsp),%r10
lea    0x24(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x1c(%rsp),%rcx
lea    0x18(%rsp),%r8
lea    0x14(%rsp),%r9
push   %rax
push   %r10
call   1030 <baddext2_@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
define void @cbaddext2(float* %0, float %1, float %2, float %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca float*
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store float* %0, float** %9
store float %1, float* %10
store float %2, float* %11
store float %3, float* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%17 = load float*, float** %9
%18 = call i32 @baddext2_(float* %17, float* %10, float* %11, float* %12, i32* %13, i32* %14, i32* %15, i32* %16)
ret void
}

LLVM IR (-O2):
define void @cbaddext2(float* %0, float %1, float %2, float %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store float %1, float* %9
store float %2, float* %10
store float %3, float* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
store i32 %7, i32* %15
%16 = call i32 @baddext2_(float* %0, float* %9, float* %10, float* %11, i32* %12, i32* %13, i32* %14, i32* %15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x31() {
  Assert_real((iscntrl(49) == 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_iscntrl.c",
              250, ("iscntrl should be 0 for 1"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x31>:
push   %rax
mov    $0x31,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xfa,%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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for 1\00"
define void @t_iscntrl_0x31() {
%1 = call i64 @iscntrl(i32 49)
%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 250, 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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for 1\00"
define void @t_iscntrl_0x31() {
%1 = tail call i64 @iscntrl(i32 49)
%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 250, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _lv1_deconfigure_virtual_uart_irq();
int lv1_deconfigure_virtual_uart_irq(void) {
  return _lv1_deconfigure_virtual_uart_irq();
}


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

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

LLVM IR (-O0):
define i32 @lv1_deconfigure_virtual_uart_irq() {
%1 = call i32 (...) @_lv1_deconfigure_virtual_uart_irq()
ret i32 %1
}

LLVM IR (-O2):
define i32 @lv1_deconfigure_virtual_uart_irq() {
%1 = tail call i32 (...) @_lv1_deconfigure_virtual_uart_irq()
ret i32 %1
}
void render_errorbox(char *title, char *message) {}


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

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

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

LLVM IR (-O2):
define void @render_errorbox(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void push(int *a, int *x, int val) {
  *x = *x + 1;
  *(a + *x) = val;
}


x86 assembly (clang, -O0):
<push>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<push>:
movslq (%rsi),%rax
lea    0x1(%rax),%rcx
mov    %ecx,(%rsi)
mov    %edx,0x4(%rdi,%rax,4)
ret

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

LLVM IR (-O2):
define void @push(i32* nocapture writeonly %0, i32* nocapture %1, i32 %2) {
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
store i32 %2, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_217() {
  Assert_real((isqrt(217) == 14),
              "/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/stdlib/isqrt.c",
              1090, ("Integer square root of 217 should be 14"));
}


x86 assembly (clang, -O0):
<t_sqrt_217>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <isqrt@plt>
cmp    $0xe,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x442,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_217>:
push   %rax
mov    $0xd9,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xe,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x442,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 217 should be 14\00"
define void @t_sqrt_217() {
%1 = call i32 @isqrt(i32 217)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1090, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 217 should be 14\00"
define void @t_sqrt_217() {
%1 = tail call i32 @isqrt(i32 217)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1090, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: 3700send host:port\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Usage: 3700send host:port\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [26 x i8] c"Usage: 3700send host:port\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
long double cgDiffuseIntensity(long double dot_product,
                               long double diffuse_factor,
                               long double light_intensity) {
  return dot_product * diffuse_factor * light_intensity;
}


x86 assembly (clang, -O0):
<cgDiffuseIntensity>:
push   %rbp
mov    %rsp,%rbp
fldt   0x30(%rbp)
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fmulp  %st,%st(1)
fldt   -0x30(%rbp)
fmulp  %st,%st(1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgDiffuseIntensity>:
fldt   0x28(%rsp)
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fmulp  %st,%st(1)
fmulp  %st,%st(1)
ret

LLVM IR (-O0):
define x86_fp80 @cgDiffuseIntensity(x86_fp80 %0, x86_fp80 %1, x86_fp80 %2) {
%4 = alloca x86_fp80
%5 = alloca x86_fp80
%6 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
store x86_fp80 %1, x86_fp80* %5
store x86_fp80 %2, x86_fp80* %6
%7 = load x86_fp80, x86_fp80* %4
%8 = load x86_fp80, x86_fp80* %5
%9 = fmul x86_fp80 %7, %8
%10 = load x86_fp80, x86_fp80* %6
%11 = fmul x86_fp80 %9, %10
ret x86_fp80 %11
}

LLVM IR (-O2):
define x86_fp80 @cgDiffuseIntensity(x86_fp80 %0, x86_fp80 %1, x86_fp80 %2) {
%4 = fmul x86_fp80 %0, %1
%5 = fmul x86_fp80 %4, %2
ret x86_fp80 %5
}
int isoperator(char op) {
  return (('*' == op) || ('/' == op) || ('+' == op) || ('-' == op) ||
          ('%' == op));
}


x86 assembly (clang, -O0):
<isoperator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x2a,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     1173 <isoperator+0x73>
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x2f,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     1173 <isoperator+0x73>
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x2b,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     1173 <isoperator+0x73>
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x2d,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     1173 <isoperator+0x73>
movsbl -0x1(%rbp),%ecx
mov    $0x25,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isoperator>:
lea    -0x2a(%rdi),%eax
cmp    $0x6,%al
jae    1119 <isoperator+0x19>
movzbl %al,%ecx
mov    $0x1,%eax
mov    $0x2b,%edx
bt     %ecx,%edx
jb     1122 <isoperator+0x22>
xor    %eax,%eax
cmp    $0x25,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isoperator(i8 signext %0) {
%2 = add i8 %0, -42
%3 = icmp ult i8 %2, 6
br i1 %3, label %7, label %4
4: ; preds = %7, %1
%5 = icmp eq i8 %0, 37
%6 = zext i1 %5 to i32
br label %11
7: ; preds = %1
%8 = lshr i8 43, %2
%9 = and i8 %8, 1
%10 = icmp eq i8 %9, 0
br i1 %10, label %4, label %11
11: ; preds = %7, %4
%12 = phi i32 [ %6, %4 ], [ 1, %7 ]
ret i32 %12
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t create_compressed_int(uint32_t A, uint32_t B, uint32_t C, uint32_t D) {
  uint32_t integer;
  (A << 12);
  (B << 8);
  (C << 4);
  integer = (A < 24) | (B << 16) | (C << 8) | D;
  return integer;
}


x86 assembly (clang, -O0):
<create_compressed_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0x18,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x8(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_compressed_int>:
xor    %eax,%eax
cmp    $0x18,%edi
setl   %al
shl    $0x10,%esi
or     %esi,%eax
shl    $0x8,%edx
or     %ecx,%edx
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @create_compressed_int(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = shl i32 %10, 12
%12 = load i32, i32* %6
%13 = shl i32 %12, 8
%14 = load i32, i32* %7
%15 = shl i32 %14, 4
%16 = load i32, i32* %5
%17 = icmp slt i32 %16, 24
%18 = zext i1 %17 to i32
%19 = load i32, i32* %6
%20 = shl i32 %19, 16
%21 = or i32 %18, %20
%22 = load i32, i32* %7
%23 = shl i32 %22, 8
%24 = or i32 %21, %23
%25 = load i32, i32* %8
%26 = or i32 %24, %25
store i32 %26, i32* %9
%27 = load i32, i32* %9
ret i32 %27
}

LLVM IR (-O2):
define i32 @create_compressed_int(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %0, 24
%6 = zext i1 %5 to i32
%7 = shl i32 %1, 16
%8 = or i32 %7, %6
%9 = shl i32 %2, 8
%10 = or i32 %8, %9
%11 = or i32 %10, %3
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *program_name) {
  printf("USAGE: %s PARAMETERS\n"
         "where PARAMERTERS are,\n"
         "\t-D <dir_path>       Path name of the directory\n"
         "\t-N <num_files>      Number of file ops per thread (default: 1)\n"
         "\t-T <num_threads>    Number of threads (default: 1)\n"
         "\t-W <workload_type>  Directory workload (default: create)\n"
         "\n",
         program_name);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [268 x i8] c"USAGE: %s PARAMETERS\0Awhere PARAMERTERS are,\0A\09-D <dir_path> Path name of the directory\0A\09-N <num_files> Number of file ops per thread (default: 1)\0A\09-T <num_threads> Number of threads (default: 1)\0A\09-W <workload_type> Directory workload (default: create)\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([268 x i8], [268 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [268 x i8] c"USAGE: %s PARAMETERS\0Awhere PARAMERTERS are,\0A\09-D <dir_path> Path name of the directory\0A\09-N <num_files> Number of file ops per thread (default: 1)\0A\09-T <num_threads> Number of threads (default: 1)\0A\09-W <workload_type> Directory workload (default: create)\0A\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([268 x i8], [268 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int libc_fetestexcept_vfp(int);
int fetestexcept(int excepts) {
  if (!1)
    return 0;
  return libc_fetestexcept_vfp(excepts);
}


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

x86 assembly (clang, -O2):
<fetestexcept>:
jmp    1030 <libc_fetestexcept_vfp@plt>

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

LLVM IR (-O2):
define i32 @fetestexcept(i32 %0) {
%2 = tail call i32 @libc_fetestexcept_vfp(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 0;
  int b = 24252;
  unsigned int c = 0xdeadbeef;
  int d = ~b;
  printf("%d\n", ~a);
  printf("%d\n", ~b);
  printf("%d\n", ~c);
  printf("%d\n", d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5ebc,-0x8(%rbp)
movl   $0xdeadbeef,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
xor    $0xffffffff,%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
xor    $0xffffffff,%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
xor    $0xffffffff,%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 24252, i32* %2
store i32 -559038737, i32* %3
%5 = load i32, i32* %2
%6 = xor i32 %5, -1
store i32 %6, i32* %4
%7 = load i32, i32* %1
%8 = xor i32 %7, -1
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = xor i32 %10, -1
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %3
%14 = xor i32 %13, -1
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %4
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -24253)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 559038736)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -24253)
ret i32 0
}
bigloo_abort() {}


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

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

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

LLVM IR (-O2):
define i32 @bigloo_abort() {
ret i32 undef
}
/* Variables and functions */
char *strrchr(char const *, char const);
const char *lookup(const char *path) {
  if (path == NULL) {
    return NULL;
  }
  const char dot = '.';
  char *extension;
  extension = strrchr(path, dot);
  return extension;
}


x86 assembly (clang, -O0):
<lookup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <lookup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1152 <lookup+0x42>
movb   $0x2e,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookup>:
test   %rdi,%rdi
je     111f <lookup+0xf>
mov    $0x2e,%esi
jmp    1030 <strrchr@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @lookup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @strrchr(i8* %0, i8 signext 46)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
/* Variables and functions */
char const *ttyname(int);
const char *xttyname(int fd) { return ttyname(fd); }


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

x86 assembly (clang, -O2):
<xttyname>:
jmp    1030 <ttyname@plt>

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

LLVM IR (-O2):
define i8* @xttyname(i32 %0) {
%2 = tail call i8* @ttyname(i32 %0)
ret i8* %2
}
/* Type definitions */
struct re {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct re *);
int /*<<< orphan*/ re_release(struct re *);
void re_free(struct re *re) {
  re_release(re);
  free(re);
}


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

x86 assembly (clang, -O2):
<re_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <re_release@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.re = type { i32 }
define void @re_free(%struct.re* %0) {
%2 = tail call i32 @re_release(%struct.re* %0)
%3 = tail call i32 @free(%struct.re* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void error(const char *error_message) {
  fprintf(stderr, "%s\n", error_message);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
bool is_end_of_str(char c) { return !c; }


x86 assembly (clang, -O0):
<is_end_of_str>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_end_of_str>:
xor    %eax,%eax
test   %dil,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_end_of_str(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_end_of_str(i8 signext %0) {
%2 = icmp eq i8 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void XcmsTekHVCClipV() {}


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

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

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

LLVM IR (-O2):
define void @XcmsTekHVCClipV() {
ret void
}
void __arch_atomic_inc(long int *p) { (*p)++; }


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

x86 assembly (clang, -O2):
<__arch_atomic_inc>:
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @__arch_atomic_inc(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = add nsw i64 %4, 1
store i64 %5, i64* %3
ret void
}

LLVM IR (-O2):
define void @__arch_atomic_inc(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = add nsw i64 %2, 1
store i64 %3, i64* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hola Mundo.\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 = [13 x i8] c"Hola Mundo.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hola Mundo.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ opt_number(void *);
int /*<<< orphan*/ optchar_n(int /*<<< orphan*/, char);
void optchar(void *v, char name) { optchar_n(opt_number(v), name); }


x86 assembly (clang, -O0):
<optchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <opt_number@plt>
mov    %eax,%edi
movsbl -0x9(%rbp),%esi
call   1030 <optchar_n@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<optchar>:
push   %rbx
mov    %esi,%ebx
call   1040 <opt_number@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <optchar_n@plt>

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

LLVM IR (-O2):
define void @optchar(i8* %0, i8 signext %1) {
%3 = tail call i32 @opt_number(i8* %0)
%4 = tail call i32 @optchar_n(i32 %3, i8 signext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ avr_end();
int /*<<< orphan*/ stack_bigint_mul256();
int /*<<< orphan*/ stack_curve25519();
int /*<<< orphan*/ stack_ed25519();
int /*<<< orphan*/ stack_poly1305();
int /*<<< orphan*/ stack_salsa20();
int /*<<< orphan*/ stack_sha512();
int main() {
  stack_bigint_mul256();
  stack_salsa20();
  stack_poly1305();
  stack_sha512();
  stack_curve25519();
  stack_ed25519();
  avr_end();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <stack_bigint_mul256@plt>
mov    $0x0,%al
call   1040 <stack_salsa20@plt>
mov    $0x0,%al
call   1080 <stack_poly1305@plt>
mov    $0x0,%al
call   1030 <stack_sha512@plt>
mov    $0x0,%al
call   1090 <stack_curve25519@plt>
mov    $0x0,%al
call   1060 <stack_ed25519@plt>
mov    $0x0,%al
call   1070 <avr_end@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <stack_bigint_mul256@plt>
xor    %eax,%eax
call   1040 <stack_salsa20@plt>
xor    %eax,%eax
call   1080 <stack_poly1305@plt>
xor    %eax,%eax
call   1030 <stack_sha512@plt>
xor    %eax,%eax
call   1090 <stack_curve25519@plt>
xor    %eax,%eax
call   1060 <stack_ed25519@plt>
xor    %eax,%eax
call   1070 <avr_end@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @stack_bigint_mul256()
%3 = call i32 (...) @stack_salsa20()
%4 = call i32 (...) @stack_poly1305()
%5 = call i32 (...) @stack_sha512()
%6 = call i32 (...) @stack_curve25519()
%7 = call i32 (...) @stack_ed25519()
%8 = call i32 (...) @avr_end()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @stack_bigint_mul256()
%2 = tail call i32 (...) @stack_salsa20()
%3 = tail call i32 (...) @stack_poly1305()
%4 = tail call i32 (...) @stack_sha512()
%5 = tail call i32 (...) @stack_curve25519()
%6 = tail call i32 (...) @stack_ed25519()
%7 = tail call i32 (...) @avr_end()
ret i32 0
}
void gtk_color_button_get_alpha() {}


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

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

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

LLVM IR (-O2):
define void @gtk_color_button_get_alpha() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FP_COMPARE_MEM();
int /*<<< orphan*/ addbyte(int);
void FP_COMPARE_IL() {
  addbyte(0xf2);
  addbyte(0x0f);
  addbyte(0x2a);
  addbyte(0xc8);
  FP_COMPARE_MEM();
}


x86 assembly (clang, -O0):
<FP_COMPARE_IL>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf2,%edi
call   1040 <addbyte@plt>
mov    $0xf,%edi
call   1040 <addbyte@plt>
mov    $0x2a,%edi
call   1040 <addbyte@plt>
mov    $0xc8,%edi
call   1040 <addbyte@plt>
mov    $0x0,%al
call   1030 <FP_COMPARE_MEM@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FP_COMPARE_IL>:
push   %rax
mov    $0xf2,%edi
call   1040 <addbyte@plt>
mov    $0xf,%edi
call   1040 <addbyte@plt>
mov    $0x2a,%edi
call   1040 <addbyte@plt>
mov    $0xc8,%edi
call   1040 <addbyte@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <FP_COMPARE_MEM@plt>

LLVM IR (-O0):
define void @FP_COMPARE_IL() {
%1 = call i32 @addbyte(i32 242)
%2 = call i32 @addbyte(i32 15)
%3 = call i32 @addbyte(i32 42)
%4 = call i32 @addbyte(i32 200)
%5 = call i32 (...) @FP_COMPARE_MEM()
ret void
}

LLVM IR (-O2):
define void @FP_COMPARE_IL() {
%1 = tail call i32 @addbyte(i32 242)
%2 = tail call i32 @addbyte(i32 15)
%3 = tail call i32 @addbyte(i32 42)
%4 = tail call i32 @addbyte(i32 200)
%5 = tail call i32 (...) @FP_COMPARE_MEM()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("usage:  adjustVolume <ulaw (or linear) audio file> "
         "<volume factor adjustment>\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [79 x i8] c"usage: adjustVolume <ulaw (or linear) audio file> <volume factor adjustment>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [78 x i8] c"usage: adjustVolume <ulaw (or linear) audio file> <volume factor adjustment>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char const *msp_strerror_internal(int);
const char *msp_strerror(int err) { return msp_strerror_internal(err); }


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

x86 assembly (clang, -O2):
<msp_strerror>:
jmp    1030 <msp_strerror_internal@plt>

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

LLVM IR (-O2):
define i8* @msp_strerror(i32 %0) {
%2 = tail call i8* @msp_strerror_internal(i32 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void bar(float a, float b) {
  if (a != b)
    foo();
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jne    113c <bar+0x2c>
jp     113c <bar+0x2c>
jmp    1143 <bar+0x33>
mov    $0x0,%al
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
ucomiss %xmm1,%xmm0
jne    1117 <bar+0x7>
jnp    111e <bar+0xe>
xor    %eax,%eax
jmp    1030 <foo@plt>
ret

LLVM IR (-O0):
define void @bar(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp une float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @foo()
br label %10
10: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
define void @bar(float %0, float %1) {
%3 = fcmp une float %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @foo()
br label %6
6: ; preds = %4, %2
ret void
}
void parseDevCmd(char cmd[1024]) {}


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

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

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

LLVM IR (-O2):
define void @parseDevCmd(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char const *strchr(char const *, char);
const char *_nextline(const char *c) { return strchr(c, '\n') + 1; }


x86 assembly (clang, -O0):
<_nextline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
add    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nextline>:
push   %rax
mov    $0xa,%esi
call   1030 <strchr@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @_nextline(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strchr(i8* %3, i8 signext 10)
%5 = getelementptr inbounds i8, i8* %4, i64 1
ret i8* %5
}

LLVM IR (-O2):
define i8* @_nextline(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%3 = getelementptr inbounds i8, i8* %2, i64 1
ret i8* %3
}