xunge/DecIR huggingface dataset:
int s3c_pm_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @s3c_pm_init() {
ret i32 0
}
/* Type definitions */
struct uwsgi_fsmon {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ uwsgi_log(char *);
int fsmon_add(struct uwsgi_fsmon *fs) {
  uwsgi_log("[uwsgi-fsmon] filesystem monitoring interface not available in "
            "this platform !!!\n");
  return 1;
}


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

x86 assembly (clang, -O2):
<fsmon_add>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <uwsgi_log@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.uwsgi_fsmon = type { i32 }
@.str = [82 x i8] c"[uwsgi-fsmon] filesystem monitoring interface not available in this platform !!!\0A\00"
define i32 @fsmon_add(%struct.uwsgi_fsmon* %0) {
%2 = alloca %struct.uwsgi_fsmon*
store %struct.uwsgi_fsmon* %0, %struct.uwsgi_fsmon** %2
%3 = call i32 @uwsgi_log(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
%struct.uwsgi_fsmon = type { i32 }
@.str = [82 x i8] c"[uwsgi-fsmon] filesystem monitoring interface not available in this platform !!!\0A\00"
define i32 @fsmon_add(%struct.uwsgi_fsmon* nocapture readnone %0) {
%2 = tail call i32 @uwsgi_log(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() {
  printf("\n");
  printf("-r		print raw values instead of radians\n");
  printf("-d		print gyro in degrees/s instead of radians\n");
  printf("-h		print this help message\n");
  printf("\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xf59(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf29(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
call   1040 <puts@plt>
lea    0xeea(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0d(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [41 x i8] c"-r\09\09print raw values instead of radians\0A\00"
@.str.2 = [48 x i8] c"-d\09\09print gyro in degrees/s instead of radians\0A\00"
@.str.3 = [29 x i8] c"-h\09\09print this help message\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [40 x i8] c"-r\09\09print raw values instead of radians\00"
@str.4 = [47 x i8] c"-d\09\09print gyro in degrees/s instead of radians\00"
@str.5 = [28 x i8] c"-h\09\09print this help message\00"
define void @print_usage() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.5, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ code;

/* Variables and functions */
int /*<<< orphan*/ __console_write(char const *, int);
void console_darkblue() {
  static const char code[] = {0x1b, '[', '3', '4', ';', '0', '6', 'm'};
  __console_write(code, sizeof(code));
}


x86 assembly (clang, -O0):
<console_darkblue>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x8,%esi
call   1030 <__console_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_darkblue>:
lea    0xee9(%rip),%rdi
mov    $0x8,%esi
jmp    1030 <__console_write@plt>

LLVM IR (-O0):
@console_darkblue.code = internal constant [8 x i8] c"\1B[34;06m"
define void @console_darkblue() {
%1 = call i32 @__console_write(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @console_darkblue.code, i64 0, i64 0), i32 8)
ret void
}

LLVM IR (-O2):
@console_darkblue.code = internal constant [8 x i8] c"\1B[34;06m"
define void @console_darkblue() {
%1 = tail call i32 @__console_write(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @console_darkblue.code, i64 0, i64 0), i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void do_end(void) { puts("\tjmpl _exit"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"\09jmpl _exit\00"
define void @do_end() {
%1 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"\09jmpl _exit\00"
define void @do_end() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double eval_A(int, int);
int main() { return (int)(eval_A(3, 2) * 120.3); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x2,%esi
call   1030 <eval_A@plt>
movsd  0xeca(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x2,%esi
call   1030 <eval_A@plt>
mulsd  0xed8(%rip),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double @eval_A(i32 3, i32 2)
%3 = fmul double %2, 1.203000e+02
%4 = fptosi double %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double @eval_A(i32 3, i32 2)
%2 = fmul double %1, 1.203000e+02
%3 = fptosi double %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ASL8(int /*<<< orphan*/);
int /*<<< orphan*/ SA1Absolute(int);
void Op0EM1(void) { ASL8(SA1Absolute(3)); }


x86 assembly (clang, -O0):
<Op0EM1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <SA1Absolute@plt>
mov    %eax,%edi
call   1030 <ASL8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op0EM1>:
push   %rax
mov    $0x3,%edi
call   1040 <SA1Absolute@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ASL8@plt>

LLVM IR (-O0):
define void @Op0EM1() {
%1 = call i32 @SA1Absolute(i32 3)
%2 = call i32 @ASL8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op0EM1() {
%1 = tail call i32 @SA1Absolute(i32 3)
%2 = tail call i32 @ASL8(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ is_hex(char *);
char *is_hex_02c() {
  char phrase[] =
      "0xB300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2AZ";
  do {
    if (!(!is_hex(phrase)))
      return "return false even if the only non-hex character is the last one";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<is_hex_02c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x43,%edx
call   1040 <memcpy@plt>
lea    -0x50(%rbp),%rdi
call   1030 <is_hex@plt>
cmp    $0x0,%eax
je     115f <is_hex_02c+0x3f>
lea    0xeed(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116c <is_hex_02c+0x4c>
jmp    1164 <is_hex_02c+0x44>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hex_02c>:
sub    $0x48,%rsp
movaps 0xf15(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x5a4132,0x3f(%rsp)
mov    %rsp,%rdi
call   1030 <is_hex@plt>
xor    %ecx,%ecx
test   %eax,%eax
lea    0xee5(%rip),%rax
cmovne %rax,%rcx
mov    %rcx,%rax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.is_hex_02c.phrase = [67 x i8] c"0xB300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2AZ\00"
@.str = [64 x i8] c"return false even if the only non-hex character is the last one\00"
define i8* @is_hex_02c() {
%1 = alloca i8*
%2 = alloca [67 x i8]
%3 = bitcast [67 x i8]* %2 to i8*
br label %4
4: ; preds = %0
%5 = getelementptr inbounds [67 x i8], [67 x i8]* %2, i64 0, i64 0
%6 = call i32 @is_hex(i8* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4
store i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i8** %1
br label %11
9: ; preds = %4
br label %10
10: ; preds = %9
store i8* null, i8** %1
br label %11
11: ; preds = %10, %8
%12 = load i8*, i8** %1
ret i8* %12
}

LLVM IR (-O2):
@__const.is_hex_02c.phrase = [67 x i8] c"0xB300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2AZ\00"
@.str = [64 x i8] c"return false even if the only non-hex character is the last one\00"
define i8* @is_hex_02c() {
%1 = alloca [67 x i8]
%2 = getelementptr inbounds [67 x i8], [67 x i8]* %1, i64 0, i64 0
%3 = call i32 @is_hex(i8* %2)
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i8* null, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0)
ret i8* %5
}
void foo_2_1_1_1_2_2_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_1_2_2_2_2_2() {
ret void
}
/* Variables and functions */
int u8charlencc(char const *);
int u8charlenc(char *str) { return u8charlencc((const char *)str); }


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

x86 assembly (clang, -O2):
<u8charlenc>:
jmp    1030 <u8charlencc@plt>

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

LLVM IR (-O2):
define i32 @u8charlenc(i8* %0) {
%2 = tail call i32 @u8charlencc(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void MPURegionDisable(uint32_t ui32Region) {
  ;
  (*((volatile unsigned long *)(0xE000ED98))) = ui32Region;
  (*((volatile unsigned long *)(0xE000EDA0))) &= ~0x00000001;
}


x86 assembly (clang, -O0):
<MPURegionDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0xe000ed98,%eax
mov    %rcx,(%rax)
mov    $0xe000eda0,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    $0xe000eda0,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPURegionDisable>:
mov    $0xe000eda0,%eax
mov    %rdi,-0x8(%rax)
andq   $0xfffffffffffffffe,(%rax)
ret

LLVM IR (-O0):
define void @MPURegionDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 3758157208 to i64*)
%4 = load volatile i64, i64* inttoptr (i64 3758157216 to i64*)
%5 = and i64 %4, -2
store volatile i64 %5, i64* inttoptr (i64 3758157216 to i64*)
ret void
}

LLVM IR (-O2):
define void @MPURegionDisable(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 3758157208 to i64*)
%2 = load volatile i64, i64* inttoptr (i64 3758157216 to i64*)
%3 = and i64 %2, -2
store volatile i64 %3, i64* inttoptr (i64 3758157216 to i64*)
ret void
}
/* Variables and functions */
int strlen(char *);
void add_one_to_string(char *input) {
  int ii = 0;
  for (; ii < strlen(input); ii++) {
    input[ii]++;
  }
}


x86 assembly (clang, -O0):
<add_one_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    115e <add_one_to_string+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
add    $0x1,%dl
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <add_one_to_string+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_one_to_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    1148 <add_one_to_string+0x38>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
addb   $0x1,(%r14,%rbx,1)
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1130 <add_one_to_string+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @add_one_to_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = add i8 %7, 1
store i8 %8, i8* %6
%9 = add nuw nsw i64 %5, 1
%10 = tail call i32 @strlen(i8* %0)
%11 = sext i32 %10 to i64
%12 = icmp slt i64 %9, %11
br i1 %12, label %4, label %13
13: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kprintf_put(char);
int kprintf_putUint(int, unsigned int);
int kprintf_putInt(int n, unsigned int base) {
  int printed = 0;
  if (n < 0) {
    kprintf_put('-');
    printed++;
    n = -n;
  }
  return printed + kprintf_putUint(n, base);
}


x86 assembly (clang, -O0):
<kprintf_putInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    115a <kprintf_putInt+0x3a>
mov    $0x2d,%edi
call   1030 <kprintf_put@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <kprintf_putUint@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kprintf_putInt>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %ebx,%ebx
test   %edi,%edi
jns    1140 <kprintf_putInt+0x20>
mov    $0x2d,%edi
call   1030 <kprintf_put@plt>
neg    %ebp
mov    $0x1,%ebx
mov    %ebp,%edi
mov    %r14d,%esi
call   1040 <kprintf_putUint@plt>
add    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @kprintf_putInt(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @kprintf_put(i8 signext 45)
%6 = sub nsw i32 0, %0
br label %7
7: ; preds = %4, %2
%8 = phi i32 [ %6, %4 ], [ %0, %2 ]
%9 = phi i32 [ 1, %4 ], [ 0, %2 ]
%10 = tail call i32 @kprintf_putUint(i32 %8, i32 %1)
%11 = add nsw i32 %10, %9
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_61() {
  Assert_real((isqrt(61) == 7),
              "/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",
              310, ("Integer square root of 61 should be 7"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_61>:
push   %rax
mov    $0x3d,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x7,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x136,%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 = [38 x i8] c"Integer square root of 61 should be 7\00"
define void @t_sqrt_61() {
%1 = call i32 @isqrt(i32 61)
%2 = icmp eq i32 %1, 7
%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 310, i8* getelementptr inbounds ([38 x i8], [38 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 = [38 x i8] c"Integer square root of 61 should be 7\00"
define void @t_sqrt_61() {
%1 = tail call i32 @isqrt(i32 61)
%2 = icmp eq i32 %1, 7
%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 310, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void troca(float *a, float *b) {
  float x;
  x = *a;
  *a = *b;
  *b = x;
}


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

x86 assembly (clang, -O2):
<troca>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movss  %xmm1,(%rdi)
movss  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @troca(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca float
store float* %0, float** %3
store float* %1, float** %4
%6 = load float*, float** %3
%7 = load float, float* %6
store float %7, float* %5
%8 = load float*, float** %4
%9 = load float, float* %8
%10 = load float*, float** %3
store float %9, float* %10
%11 = load float, float* %5
%12 = load float*, float** %4
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @troca(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
store float %4, float* %0
store float %3, float* %1
ret void
}
double f4_sum_pre_double_double_double_double_double(double v0, double v1,
                                                     double v2, double v3,
                                                     double v) {
  return v0 + v1 + v2 + v3 + ((double)(v));
}


x86 assembly (clang, -O0):
<f4_sum_pre_double_double_double_double_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_sum_pre_double_double_double_double_double>:
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
addsd  %xmm4,%xmm0
ret

LLVM IR (-O0):
define double @f4_sum_pre_double_double_double_double_double(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load double, double* %6
%12 = load double, double* %7
%13 = fadd double %11, %12
%14 = load double, double* %8
%15 = fadd double %13, %14
%16 = load double, double* %9
%17 = fadd double %15, %16
%18 = load double, double* %10
%19 = fadd double %17, %18
ret double %19
}

LLVM IR (-O2):
define double @f4_sum_pre_double_double_double_double_double(double %0, double %1, double %2, double %3, double %4) {
%6 = fadd double %0, %1
%7 = fadd double %6, %2
%8 = fadd double %7, %3
%9 = fadd double %8, %4
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ FCEU_QSimpleCommand(int);
int FCEUI_FDSInsert(int oride) {
  FCEU_QSimpleCommand(0x18);
  return (1);
}


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

x86 assembly (clang, -O2):
<FCEUI_FDSInsert>:
push   %rax
mov    $0x18,%edi
call   1030 <FCEU_QSimpleCommand@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @FCEUI_FDSInsert(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @FCEU_QSimpleCommand(i32 24)
ret i32 1
}

LLVM IR (-O2):
define i32 @FCEUI_FDSInsert(i32 %0) {
%2 = tail call i32 @FCEU_QSimpleCommand(i32 24)
ret i32 1
}
/* Type definitions */
struct dynref__obj {
  int dummy;
};

/* Variables and functions */
bool dynref__surjective(const struct dynref__obj *p) {}


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

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

LLVM IR (-O0):
%struct.dynref__obj = type { i32 }
define i32 @dynref__surjective(%struct.dynref__obj* %0) {
%2 = alloca i32
%3 = alloca %struct.dynref__obj*
store %struct.dynref__obj* %0, %struct.dynref__obj** %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
%struct.dynref__obj = type { i32 }
define i32 @dynref__surjective(%struct.dynref__obj* nocapture readnone %0) {
ret i32 undef
}
int child_init(int rank) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @child_init(i32 %0) {
ret i32 0
}
int areaOfCircle(int radius) { return (3.14 * radius * radius); }


x86 assembly (clang, -O0):
<areaOfCircle>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xeec(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<areaOfCircle>:
cvtsi2sd %edi,%xmm0
movsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @areaOfCircle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fmul double 3.140000e+00, %4
%6 = load i32, i32* %2
%7 = sitofp i32 %6 to double
%8 = fmul double %5, %7
%9 = fptosi double %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @areaOfCircle(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 3.140000e+00
%4 = fmul double %3, %2
%5 = fptosi double %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ mp_limb_t;

/* Variables and functions */
char *gmp_version;
int /*<<< orphan*/ printf(char *, ...);
int main() {
  if (sizeof(mp_limb_t) == sizeof(long *))
    printf("%s\n", gmp_version);
  else
    printf("unsupported\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"unsupported\0A\00"
@gmp_version = global i8* null
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@gmp_version = global i8* null
@str = [12 x i8] c"unsupported\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 */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *str_dup(char *str) {
  char *ret;
  ret = (char *)malloc(strlen(str) + 1);
  strcpy(ret, str);
  return ret;
}


x86 assembly (clang, -O0):
<str_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_dup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @str_dup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %2
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @str_dup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int bpf_rand_mask(int);
uint64_t bpf_rand_u40(int shift) {
  return bpf_rand_mask((0xffffffffffULL)) << shift;
}


x86 assembly (clang, -O0):
<bpf_rand_u40>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1030 <bpf_rand_mask@plt>
mov    -0x4(%rbp),%ecx
shl    %cl,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_rand_u40>:
push   %rbx
mov    %edi,%ebx
mov    $0xffffffff,%edi
call   1030 <bpf_rand_mask@plt>
mov    %ebx,%ecx
shl    %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @bpf_rand_u40(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @bpf_rand_mask(i32 -1)
%4 = load i32, i32* %2
%5 = shl i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @bpf_rand_u40(i32 %0) {
%2 = tail call i32 @bpf_rand_mask(i32 -1)
%3 = shl i32 %2, %0
ret i32 %3
}
struct internal_ibv_srq *ibv_srq_to_internal(struct ibv_srq *srq) {
  return (struct internal_ibv_srq *)srq;
}


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

x86 assembly (clang, -O2):
<ibv_srq_to_internal>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.internal_ibv_srq = type opaque
%struct.ibv_srq = type opaque
define %struct.internal_ibv_srq* @ibv_srq_to_internal(%struct.ibv_srq* %0) {
%2 = alloca %struct.ibv_srq*
store %struct.ibv_srq* %0, %struct.ibv_srq** %2
%3 = load %struct.ibv_srq*, %struct.ibv_srq** %2
%4 = bitcast %struct.ibv_srq* %3 to %struct.internal_ibv_srq*
ret %struct.internal_ibv_srq* %4
}

LLVM IR (-O2):
%struct.internal_ibv_srq = type opaque
%struct.ibv_srq = type opaque
define %struct.internal_ibv_srq* @ibv_srq_to_internal(%struct.ibv_srq* readnone %0) {
%2 = bitcast %struct.ibv_srq* %0 to %struct.internal_ibv_srq*
ret %struct.internal_ibv_srq* %2
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_trip_load(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ roadmap_trip_save(char const *);
void roadmap_trip_file_dialog_ok(const char *filename, const char *mode) {
  if (mode[0] == 'w') {
    roadmap_trip_save(filename);
  } else {
    roadmap_trip_load(filename, 0);
  }
}


x86 assembly (clang, -O0):
<roadmap_trip_file_dialog_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x77,%eax
jne    114e <roadmap_trip_file_dialog_ok+0x2e>
mov    -0x8(%rbp),%rdi
call   1040 <roadmap_trip_save@plt>
jmp    1159 <roadmap_trip_file_dialog_ok+0x39>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <roadmap_trip_load@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_trip_file_dialog_ok>:
cmpb   $0x77,(%rsi)
jne    112a <roadmap_trip_file_dialog_ok+0xa>
jmp    1040 <roadmap_trip_save@plt>
xor    %esi,%esi
jmp    1030 <roadmap_trip_load@plt>

LLVM IR (-O0):
define void @roadmap_trip_file_dialog_ok(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 119
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = call i32 @roadmap_trip_save(i8* %11)
br label %16
13: ; preds = %2
%14 = load i8*, i8** %3
%15 = call i32 @roadmap_trip_load(i8* %14, i32 0)
br label %16
16: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
define void @roadmap_trip_file_dialog_ok(i8* %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 119
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @roadmap_trip_save(i8* %0)
br label %9
7: ; preds = %2
%8 = tail call i32 @roadmap_trip_load(i8* %0, i32 0)
br label %9
9: ; preds = %7, %5
ret void
}
void iassert_setmsg(char *msg) {}


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

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

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

LLVM IR (-O2):
define void @iassert_setmsg(i8* nocapture %0) {
ret void
}
int cmp_int(const void *pa, const void *pb) {
  const int *a = pa;
  const int *b = pb;
  if (*a == *b)
    return 0;
  else if (*a < *b)
    return 1;
  else
    return -1;
}


x86 assembly (clang, -O0):
<cmp_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jne    113a <cmp_int+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    115f <cmp_int+0x5f>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    1158 <cmp_int+0x58>
movl   $0x1,-0x4(%rbp)
jmp    115f <cmp_int+0x5f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_int>:
mov    (%rdi),%eax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%eax
setl   %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_int(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
%8 = icmp slt i32 %5, %6
%9 = select i1 %8, i32 1, i32 -1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_separator() {
  printf("============================================================\n");
}


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

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

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

LLVM IR (-O2):
@str = [61 x i8] c"============================================================\00"
define void @print_separator() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
ret void
}
void sg_status_msg_handler(void *msg, unsigned short msglen) {
  printf("got server group status response msg: %.*s\n\n", msglen, (char *)msg);
}


x86 assembly (clang, -O0):
<sg_status_msg_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%esi
mov    -0x8(%rbp),%rdx
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sg_status_msg_handler>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"got server group status response msg: %.*s\0A\0A\00"
define void @sg_status_msg_handler(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = load i8*, i8** %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"got server group status response msg: %.*s\0A\0A\00"
define void @sg_status_msg_handler(i8* %0, i16 zeroext %1) {
%3 = zext i16 %1 to i32
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %0)
ret void
}
char CtrlSymbol(char c) {
  char ctrlVal = 0;
  switch (c) {
  case '/':
    ctrlVal = 1;
    break;
  case '*':
    ctrlVal = 2;
    break;
  case '\n':
    ctrlVal = 3;
    break;
  case '\"':
  case '\'':
    ctrlVal = 4;
    break;
  case '\\':
    ctrlVal = 5;
    break;
  }
  return ctrlVal;
}


x86 assembly (clang, -O0):
<CtrlSymbol>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0xa,%eax
je     118a <CtrlSymbol+0x8a>
jmp    1123 <CtrlSymbol+0x23>
mov    -0x8(%rbp),%eax
sub    $0x22,%eax
je     1193 <CtrlSymbol+0x93>
jmp    1134 <CtrlSymbol+0x34>
mov    -0x8(%rbp),%eax
sub    $0x27,%eax
je     1193 <CtrlSymbol+0x93>
jmp    1145 <CtrlSymbol+0x45>
mov    -0x8(%rbp),%eax
sub    $0x2a,%eax
je     1181 <CtrlSymbol+0x81>
jmp    1156 <CtrlSymbol+0x56>
mov    -0x8(%rbp),%eax
sub    $0x2f,%eax
je     1178 <CtrlSymbol+0x78>
jmp    1167 <CtrlSymbol+0x67>
mov    -0x8(%rbp),%eax
sub    $0x5c,%eax
je     119c <CtrlSymbol+0x9c>
jmp    11a0 <CtrlSymbol+0xa0>
movb   $0x1,-0x2(%rbp)
jmp    11a0 <CtrlSymbol+0xa0>
movb   $0x2,-0x2(%rbp)
jmp    11a0 <CtrlSymbol+0xa0>
movb   $0x3,-0x2(%rbp)
jmp    11a0 <CtrlSymbol+0xa0>
movb   $0x4,-0x2(%rbp)
jmp    11a0 <CtrlSymbol+0xa0>
movb   $0x5,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CtrlSymbol>:
xor    %eax,%eax
lea    -0xa(%rdi),%ecx
cmp    $0x25,%ecx
ja     111d <CtrlSymbol+0x1d>
lea    0xeef(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x4,%al
ret
cmp    $0x5c,%edi
jne    111c <CtrlSymbol+0x1c>
mov    $0x5,%al
ret
mov    $0x3,%al
ret
mov    $0x2,%al
ret
mov    $0x1,%al
ret

LLVM IR (-O0):
define signext i8 @CtrlSymbol(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
store i8 0, i8* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %11 [
i32 47, label %6
i32 42, label %7
i32 10, label %8
i32 34, label %9
i32 39, label %9
i32 92, label %10
]
6: ; preds = %1
store i8 1, i8* %3
br label %11
7: ; preds = %1
store i8 2, i8* %3
br label %11
8: ; preds = %1
store i8 3, i8* %3
br label %11
9: ; preds = %1, %1
store i8 4, i8* %3
br label %11
10: ; preds = %1
store i8 5, i8* %3
br label %11
11: ; preds = %1, %10, %9, %8, %7, %6
%12 = load i8, i8* %3
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @CtrlSymbol(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %8 [
i32 47, label %3
i32 42, label %4
i32 10, label %5
i32 34, label %6
i32 39, label %6
i32 92, label %7
]
3: ; preds = %1
br label %8
4: ; preds = %1
br label %8
5: ; preds = %1
br label %8
6: ; preds = %1, %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %6, %5, %4, %3
%9 = phi i8 [ 0, %1 ], [ 5, %7 ], [ 4, %6 ], [ 3, %5 ], [ 2, %4 ], [ 1, %3 ]
ret i8 %9
}
/* Variables and functions */
int /*<<< orphan*/ test_linked_lists_2();
int main(int argc, char const *argv[]) {
  test_linked_lists_2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_linked_lists_2()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_OCTET_STRING;

/* Variables and functions */
int M_ASN1_OCTET_STRING_cmp(int /*<<< orphan*/ const *,
                            int /*<<< orphan*/ const *);
int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
                          const ASN1_OCTET_STRING *b) {
  return M_ASN1_OCTET_STRING_cmp(a, b);
}


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

x86 assembly (clang, -O2):
<ASN1_OCTET_STRING_cmp>:
jmp    1030 <M_ASN1_OCTET_STRING_cmp@plt>

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

LLVM IR (-O2):
define i32 @ASN1_OCTET_STRING_cmp(i32* %0, i32* %1) {
%3 = tail call i32 @M_ASN1_OCTET_STRING_cmp(i32* %0, i32* %1)
ret i32 %3
}
void f154(void) {
a:
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    goto a;
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f154>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
jmp    1104 <f154+0x4>

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

LLVM IR (-O0):
define void @f154() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
store i32 0, i32* %1
%8 = load i32, i32* %1
store i32 0, i32* %2
%9 = load i32, i32* %2
store i32 0, i32* %3
%10 = load i32, i32* %3
store i32 0, i32* %4
%11 = load i32, i32* %4
store i32 0, i32* %5
%12 = load i32, i32* %5
br label %7
}

LLVM IR (-O2):
define void @f154() {
br label %1
1: ; preds = %1, %0
br label %1
}
int count_arg(const char *format) {
  int result = 0;
  const char *p = format;
  while (*p != '\0') {
    if (*p == '%')
      result += 1;
    ++p;
  }
  return result;
}


x86 assembly (clang, -O0):
<count_arg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1151 <count_arg+0x51>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    1140 <count_arg+0x40>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1117 <count_arg+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_arg>:
xor    %eax,%eax
jmp    1117 <count_arg+0x17>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x25,%cl
je     1110 <count_arg+0x10>
test   %cl,%cl
jne    1113 <count_arg+0x13>
ret

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

LLVM IR (-O2):
define i32 @count_arg(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i32 [ 0, %1 ], [ %9, %8 ]
%4 = phi i8* [ %0, %1 ], [ %10, %8 ]
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 0, label %11
i8 37, label %6
]
6: ; preds = %2
%7 = add nsw i32 %3, 1
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ %3, %2 ]
%10 = getelementptr inbounds i8, i8* %4, i64 1
br label %2
11: ; preds = %2
ret i32 %3
}
/* Variables and functions */
unsigned long rint(double);
unsigned long C_to_mkelvin(double c) { return rint(c * 1000 + 273150); }


x86 assembly (clang, -O0):
<C_to_mkelvin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <rint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_to_mkelvin>:
mulsd  0xee8(%rip),%xmm0
addsd  0xee8(%rip),%xmm0
jmp    1030 <rint@plt>

LLVM IR (-O0):
define i64 @C_to_mkelvin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fmuladd.f64(double %3, double 1.000000e+03, double 2.731500e+05)
%5 = call i64 @rint(double %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @C_to_mkelvin(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 1.000000e+03, double 2.731500e+05)
%3 = tail call i64 @rint(double %2)
ret i64 %3
}
_Bool QuietLess(double f1, double f2) { return __builtin_isless(f1, f2); }


x86 assembly (clang, -O0):
<QuietLess>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuietLess>:
ucomisd %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define zeroext i1 @QuietLess(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @QuietLess(double %0, double %1) {
%3 = fcmp olt double %0, %1
ret i1 %3
}
int WRITE2(char *a, int b) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @WRITE2(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void neg_reg32(unsigned int reg32) {
  put8(0xF7);
  put8(0xD8 + reg32);
}


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

x86 assembly (clang, -O2):
<neg_reg32>:
push   %rbx
mov    %edi,%ebx
mov    $0xf7,%edi
call   1030 <put8@plt>
add    $0xd8,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @neg_reg32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 247)
%4 = load i32, i32* %2
%5 = add i32 216, %4
%6 = call i32 @put8(i32 %5)
ret void
}

LLVM IR (-O2):
define void @neg_reg32(i32 %0) {
%2 = tail call i32 @put8(i32 247)
%3 = add i32 %0, 216
%4 = tail call i32 @put8(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
f(char *s) { printf("f(\"%s\")\n", s); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"f(\22%s\22)\0A\00"
define i32 @f(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}