xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_80() {
  Assert_real((isqrt(80) == 8),
              "/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",
              405, ("Integer square root of 80 should be 8"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_80>:
push   %rax
mov    $0x50,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x8,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x195,%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 80 should be 8\00"
define void @t_sqrt_80() {
%1 = call i32 @isqrt(i32 80)
%2 = icmp eq i32 %1, 8
%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 405, 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 80 should be 8\00"
define void @t_sqrt_80() {
%1 = tail call i32 @isqrt(i32 80)
%2 = icmp eq i32 %1, 8
%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 405, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_ContainerSyntaxArgumentMustBindToInParameter(long p_position) {
  _Error(p_position, "'container' syntax argument must bind to in parameter");
}


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

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

LLVM IR (-O0):
@.str = [54 x i8] c"'container' syntax argument must bind to in parameter\00"
define void @Error_ContainerSyntaxArgumentMustBindToInParameter(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [54 x i8] c"'container' syntax argument must bind to in parameter\00"
define void @Error_ContainerSyntaxArgumentMustBindToInParameter(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *msg) {
  fprintf(stderr, "Error: %s\n", msg);
  fflush(stderr);
  exit(2);
}


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

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %rdi,%rdx
mov    0x2ea5(%rip),%rbx
mov    (%rbx),%edi
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %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 ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 @fflush(i32 %6)
%8 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fflush(i32 %4)
%6 = tail call i32 @exit(i32 2)
unreachable
}
void writeb(unsigned char val, void *addr) {
  *(volatile unsigned char *)addr = val;
}


x86 assembly (clang, -O0):
<writeb>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeb>:
mov    %dil,(%rsi)
ret

LLVM IR (-O0):
define void @writeb(i8 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8, i8* %3
%6 = load i8*, i8** %4
store volatile i8 %5, i8* %6
ret void
}

LLVM IR (-O2):
define void @writeb(i8 zeroext %0, i8* %1) {
store volatile i8 %0, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/, ...);
int main() {
  if (0xff == 0xff) {
    printf("gc%d.%d", 7, 0);
  } else {
    printf("gc%d.%dalpha%d", 7, 0, 0xff);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x7,%esi
xor    %edx,%edx
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
mov    $0x7,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"gc%d.%d\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7, i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"gc%d.%d\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7, i32 0)
ret i32 0
}
/* Type definitions */
typedef int volatile uint16_t;

/* Variables and functions */
uint16_t volatile_fetch_and_u16(volatile uint16_t *dest, uint16_t val) {
  uint16_t result = *dest;
  *dest = result & val;
  return result;
}


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

x86 assembly (clang, -O2):
<volatile_fetch_and_u16>:
mov    %esi,-0x4(%rsp)
mov    (%rdi),%eax
mov    %eax,-0x8(%rsp)
mov    -0x8(%rsp),%eax
and    -0x4(%rsp),%eax
mov    %eax,(%rdi)
mov    -0x8(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @volatile_fetch_and_u16(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store volatile i32 %1, i32* %3
%5 = bitcast i32* %4 to i8*
%6 = load volatile i32, i32* %0
store volatile i32 %6, i32* %4
%7 = load volatile i32, i32* %4
%8 = load volatile i32, i32* %3
%9 = and i32 %8, %7
store volatile i32 %9, i32* %0
%10 = load volatile i32, i32* %4
ret i32 %10
}
/* Variables and functions */
int absd(double);
double nnz(double x) {
  if (absd(x) < 1e-16) {
    return 1e-16;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<nnz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <absd@plt>
cvtsi2sd %eax,%xmm1
movsd  0xecd(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    114f <nnz+0x3f>
movsd  0xebb(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1159 <nnz+0x49>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nnz>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <absd@plt>
test   %eax,%eax
jle    1126 <nnz+0x16>
movsd  (%rsp),%xmm0
pop    %rax
ret
movsd  0xed2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @nnz(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = call i32 @absd(double %4)
%6 = sitofp i32 %5 to double
%7 = fcmp olt double %6, 0x3C9CD2B297D889BC
br i1 %7, label %8, label %9
8: ; preds = %1
store double 0x3C9CD2B297D889BC, double* %2
br label %11
9: ; preds = %1
%10 = load double, double* %3
store double %10, double* %2
br label %11
11: ; preds = %9, %8
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @nnz(double %0) {
%2 = tail call i32 @absd(double %0)
%3 = icmp slt i32 %2, 1
%4 = select i1 %3, double 0x3C9CD2B297D889BC, double %0
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ f0(int /*<<< orphan*/ *);
void f1(long unsigned int a) {
  if (a <= 10) {
    uint32_t x[a];
    f0(x);
  }
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0xa,-0x8(%rbp)
ja     1157 <f1+0x47>
mov    -0x8(%rbp),%rax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
call   1030 <f0@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
cmp    $0xa,%rdi
ja     1145 <f1+0x35>
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    %rsp,%rbx
mov    %rsp,%rax
lea    0xf(,%rdi,4),%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%rax
mov    %rax,%rsp
mov    %rax,%rdi
call   1030 <f0@plt>
mov    %rbx,%rsp
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @f1(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = icmp ule i64 %5, 10
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i64, i64* %2
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %3
%10 = alloca i32, i64 %8
store i64 %8, i64* %4
%11 = call i32 @f0(i32* %10)
%12 = load i8*, i8** %3
br label %13
13: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @f1(i64 %0) {
%2 = icmp ult i64 %0, 11
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i8* @llvm.stacksave()
%5 = alloca i32, i64 %0
%6 = call i32 @f0(i32* %5)
br label %7
7: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void uart_init_boot_phase(void) {
  *(volatile uint32_t *)0xA0210320 = 0x100000;
  *(volatile uint32_t *)0xA00C0058 = 0x016C;
  *(volatile uint32_t *)0xA00C0008 = 0x0001;
  *(volatile uint32_t *)0xA00C0014 = 0x901;
}


x86 assembly (clang, -O0):
<uart_init_boot_phase>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa0210320,%eax
movl   $0x100000,(%rax)
mov    $0xa00c0058,%eax
movl   $0x16c,(%rax)
mov    $0xa00c0008,%eax
movl   $0x1,(%rax)
mov    $0xa00c0014,%eax
movl   $0x901,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_init_boot_phase>:
mov    $0xa00c0008,%eax
movl   $0x100000,0x150318(%rax)
movl   $0x16c,0x50(%rax)
movl   $0x1,(%rax)
movl   $0x901,0xc(%rax)
ret

LLVM IR (-O0):
define void @uart_init_boot_phase() {
store volatile i32 1048576, i32* inttoptr (i64 2686518048 to i32*)
store volatile i32 364, i32* inttoptr (i64 2685141080 to i32*)
store volatile i32 1, i32* inttoptr (i64 2685141000 to i32*)
store volatile i32 2305, i32* inttoptr (i64 2685141012 to i32*)
ret void
}

LLVM IR (-O2):
define void @uart_init_boot_phase() {
store volatile i32 1048576, i32* inttoptr (i64 2686518048 to i32*)
store volatile i32 364, i32* inttoptr (i64 2685141080 to i32*)
store volatile i32 1, i32* inttoptr (i64 2685141000 to i32*)
store volatile i32 2305, i32* inttoptr (i64 2685141012 to i32*)
ret void
}
void ff_hevc_put_hevc_uni_epel_hv16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv16_12_sse4() {
ret void
}
char const *_Locale_extract_numeric_name(const char *__DUMMY_PAR1,
                                         char *__DUMMY_PAR,
                                         struct _Locale_name_hint *hint) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct._Locale_name_hint = type opaque
define i8* @_Locale_extract_numeric_name(i8* %0, i8* %1, %struct._Locale_name_hint* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct._Locale_name_hint*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct._Locale_name_hint* %2, %struct._Locale_name_hint** %6
ret i8* null
}

LLVM IR (-O2):
%struct._Locale_name_hint = type opaque
define noalias i8* @_Locale_extract_numeric_name(i8* nocapture readnone %0, i8* nocapture readnone %1, %struct._Locale_name_hint* nocapture readnone %2) {
ret i8* null
}
long plpar_set_ciabr(unsigned long ciabr) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @plpar_set_ciabr(i64 %0) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
void usage(char *program) {
  fprintf(stderr,
          "usage : %s [options]\nwhere options can be :"
          "\n\t[-d : wait 1 sec before write]"
          "\n\t[-b <buf_count : max/default %d>]"
          "\n\t[-l <loop_count : min 1, default : 100>]"
          "\n\t[-v : verbose]"
          "\n",
          program, 23);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
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
mov    $0x17,%ecx
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [170 x i8] c"usage : %s [options]\0Awhere options can be :\0A\09[-d : wait 1 sec before write]\0A\09[-b <buf_count : max/default %d>]\0A\09[-l <loop_count : min 1, default : 100>]\0A\09[-v : verbose]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i8* %4, i32 23)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [170 x i8] c"usage : %s [options]\0Awhere options can be :\0A\09[-d : wait 1 sec before write]\0A\09[-b <buf_count : max/default %d>]\0A\09[-l <loop_count : min 1, default : 100>]\0A\09[-v : verbose]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i8* %0, i32 23)
%4 = tail call i32 @exit(i32 0)
unreachable
}
int is_perfect_number_lookup(int number) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @is_perfect_number_lookup(i32 %0) {
ret i32 0
}
int xmlUCSIsCatPi(int code) {
  return ((code == 0xab) || (code == 0x2018) ||
          ((code >= 0x201b) && (code <= 0x201c)) || (code == 0x201f) ||
          (code == 0x2039));
}


x86 assembly (clang, -O0):
<xmlUCSIsCatPi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0xab,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1169 <xmlUCSIsCatPi+0x69>
mov    $0x1,%al
cmpl   $0x2018,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1169 <xmlUCSIsCatPi+0x69>
cmpl   $0x201b,-0x4(%rbp)
jl     114a <xmlUCSIsCatPi+0x4a>
mov    $0x1,%al
cmpl   $0x201c,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1169 <xmlUCSIsCatPi+0x69>
mov    $0x1,%al
cmpl   $0x201f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1169 <xmlUCSIsCatPi+0x69>
cmpl   $0x2039,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsCatPi>:
mov    $0x1,%eax
lea    -0x2018(%rdi),%ecx
cmp    $0x7,%ecx
ja     111a <xmlUCSIsCatPi+0x1a>
mov    $0x99,%edx
bt     %ecx,%edx
jb     1122 <xmlUCSIsCatPi+0x22>
cmp    $0xab,%edi
jne    1123 <xmlUCSIsCatPi+0x23>
ret
xor    %eax,%eax
cmp    $0x2039,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsCatPi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 171
br i1 %4, label %20, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 8216
br i1 %7, label %20, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 8219
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 8220
br i1 %13, label %20, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 8223
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 8249
br label %20
20: ; preds = %17, %14, %11, %5, %1
%21 = phi i1 [ true, %14 ], [ true, %11 ], [ true, %5 ], [ true, %1 ], [ %19, %17 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @xmlUCSIsCatPi(i32 %0) {
switch i32 %0, label %2 [
i32 8216, label %5
i32 171, label %5
i32 8223, label %5
i32 8220, label %5
i32 8219, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 8249
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
double coef(int n) {
  if (n == 0)
    return 0;
  double t = 1.0 / n;
  if (n % 2 == 0)
    t = -t;
  return t;
}


x86 assembly (clang, -O0):
<coef>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    111e <coef+0x1e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1173 <coef+0x73>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xed5(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1169 <coef+0x69>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<coef>:
test   %edi,%edi
je     1123 <coef+0x23>
cvtsi2sd %edi,%xmm1
movsd  0xef0(%rip),%xmm0
divsd  %xmm1,%xmm0
test   $0x1,%dil
jne    1122 <coef+0x22>
xorpd  0xeee(%rip),%xmm0
ret
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @coef(i32 %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store double 0.000000e+00, double* %2
br label %20
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sitofp i32 %9 to double
%11 = fdiv double 1.000000e+00, %10
store double %11, double* %4
%12 = load i32, i32* %3
%13 = srem i32 %12, 2
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %8
%16 = load double, double* %4
%17 = fneg double %16
store double %17, double* %4
br label %18
18: ; preds = %15, %8
%19 = load double, double* %4
store double %19, double* %2
br label %20
20: ; preds = %18, %7
%21 = load double, double* %2
ret double %21
}

LLVM IR (-O2):
define double @coef(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = sitofp i32 %0 to double
%5 = fdiv double 1.000000e+00, %4
%6 = and i32 %0, 1
%7 = icmp eq i32 %6, 0
%8 = fneg double %5
%9 = select i1 %7, double %8, double %5
br label %10
10: ; preds = %1, %3
%11 = phi double [ %9, %3 ], [ 0.000000e+00, %1 ]
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ redisplay();
int rl_refresh_line(int ignore1 __attribute__((unused)),
                    int ignore2 __attribute__((unused))) {
  redisplay();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @rl_refresh_line(i32 %0, i32 %1) {
%3 = tail call i32 (...) @redisplay()
ret i32 0
}
int packedSize(int unpackedSize) { return ((unpackedSize + 3) >> 2); }


x86 assembly (clang, -O0):
<packedSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3,%eax
sar    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<packedSize>:
lea    0x3(%rdi),%eax
sar    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @packedSize(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 3
%5 = ashr i32 %4, 2
ret i32 %5
}

LLVM IR (-O2):
define i32 @packedSize(i32 %0) {
%2 = add nsw i32 %0, 3
%3 = ashr i32 %2, 2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ rtc_action(int /*<<< orphan*/);
void rtc_init(void) { rtc_action(0); }


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

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

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

LLVM IR (-O2):
define void @rtc_init() {
%1 = tail call i32 @rtc_action(i32 0)
ret void
}
int cmp(const double *a, const double *b) {
  if (*a < *b)
    return -1;
  if (*a == *b)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1132 <cmp+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    1161 <cmp+0x61>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jne    115a <cmp+0x5a>
jp     115a <cmp+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    1161 <cmp+0x61>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
movapd %xmm0,%xmm2
cmpneqsd %xmm1,%xmm2
movq   %xmm2,%rcx
and    $0x1,%ecx
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmp(double* %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
%6 = load double*, double** %4
%7 = load double, double* %6
%8 = load double*, double** %5
%9 = load double, double* %8
%10 = fcmp olt double %7, %9
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %20
12: ; preds = %2
%13 = load double*, double** %4
%14 = load double, double* %13
%15 = load double*, double** %5
%16 = load double, double* %15
%17 = fcmp oeq double %14, %16
br i1 %17, label %18, label %19
18: ; preds = %12
store i32 0, i32* %3
br label %20
19: ; preds = %12
store i32 1, i32* %3
br label %20
20: ; preds = %19, %18, %11
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @cmp(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fcmp olt double %3, %4
%6 = fcmp une double %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ SIGSEGV;
int raise(int /*<<< orphan*/);
int debugdata_function(void) { return raise(SIGSEGV) + 1; }


x86 assembly (clang, -O0):
<debugdata_function>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<debugdata_function>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGSEGV = global i32 0
define i32 @debugdata_function() {
%1 = load i32, i32* @SIGSEGV
%2 = call i32 @raise(i32 %1)
%3 = add nsw i32 %2, 1
ret i32 %3
}

LLVM IR (-O2):
@SIGSEGV = global i32 0
define i32 @debugdata_function() {
%1 = load i32, i32* @SIGSEGV
%2 = tail call i32 @raise(i32 %1)
%3 = add nsw i32 %2, 1
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
clock_t clock(void) { return (clock_t)-1; }


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

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

LLVM IR (-O0):
define i32 @clock() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @clock() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("usage: \n");
  printf("    mugc ip port\n");
  exit(0);
}


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"usage: \00"
@str.2 = [17 x i8] c" mugc ip port\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ serial_put_dec(unsigned int);
int /*<<< orphan*/ serial_puts(char *);
void print_ddr_size(unsigned int size) {
  unsigned int mem_size = size >> 20;
  (mem_size) >= 1024 ? serial_put_dec(mem_size >> 10)
                     : serial_put_dec(mem_size);
  (mem_size) >= 1024 ? serial_puts("GB") : serial_puts("MB");
}


x86 assembly (clang, -O0):
<print_ddr_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x14,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x400,-0x8(%rbp)
jb     1151 <print_ddr_size+0x31>
mov    -0x8(%rbp),%edi
shr    $0xa,%edi
call   1040 <serial_put_dec@plt>
jmp    1159 <print_ddr_size+0x39>
mov    -0x8(%rbp),%edi
call   1040 <serial_put_dec@plt>
cmpl   $0x400,-0x8(%rbp)
jb     1177 <print_ddr_size+0x57>
lea    0xe93(%rip),%rdi
call   1030 <serial_puts@plt>
jmp    1183 <print_ddr_size+0x63>
lea    0xe85(%rip),%rdi
call   1030 <serial_puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_ddr_size>:
push   %rbx
cmp    $0x40000000,%edi
lea    0xed2(%rip),%rax
lea    0xece(%rip),%rbx
cmovae %rax,%rbx
mov    $0x1e,%eax
mov    $0x14,%ecx
cmovae %eax,%ecx
shr    %cl,%edi
call   1040 <serial_put_dec@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <serial_puts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"GB\00"
@.str.1 = [3 x i8] c"MB\00"
define void @print_ddr_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = lshr i32 %4, 20
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp uge i32 %6, 1024
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = lshr i32 %9, 10
%11 = call i32 @serial_put_dec(i32 %10)
br label %15
12: ; preds = %1
%13 = load i32, i32* %3
%14 = call i32 @serial_put_dec(i32 %13)
br label %15
15: ; preds = %12, %8
%16 = phi i32 [ %11, %8 ], [ %14, %12 ]
%17 = load i32, i32* %3
%18 = icmp uge i32 %17, 1024
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 @serial_puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %23
21: ; preds = %15
%22 = call i32 @serial_puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %21, %19
%24 = phi i32 [ %20, %19 ], [ %22, %21 ]
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"GB\00"
@.str.1 = [3 x i8] c"MB\00"
define void @print_ddr_size(i32 %0) {
%2 = icmp ugt i32 %0, 1073741823
%3 = select i1 %2, i32 30, i32 20
%4 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%5 = lshr i32 %0, %3
%6 = tail call i32 @serial_put_dec(i32 %5)
%7 = tail call i32 @serial_puts(i8* %4)
ret void
}
/* Type definitions */
struct wl_proxy {
  int dummy;
};
struct wl_keyboard_listener {
  int dummy;
};
struct wl_keyboard {
  int dummy;
};

/* Variables and functions */
int wl_proxy_add_listener(struct wl_proxy *, void (*)(), void *);
int wl_keyboard_add_listener(struct wl_keyboard *wl_keyboard,
                             const struct wl_keyboard_listener *listener,
                             void *data) {
  return wl_proxy_add_listener((struct wl_proxy *)wl_keyboard,
                               (void (**)(void))listener, data);
}


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

x86 assembly (clang, -O2):
<wl_keyboard_add_listener>:
jmp    1030 <wl_proxy_add_listener@plt>

LLVM IR (-O0):
%struct.wl_keyboard = type { i32 }
%struct.wl_keyboard_listener = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_keyboard_add_listener(%struct.wl_keyboard* %0, %struct.wl_keyboard_listener* %1, i8* %2) {
%4 = alloca %struct.wl_keyboard*
%5 = alloca %struct.wl_keyboard_listener*
%6 = alloca i8*
store %struct.wl_keyboard* %0, %struct.wl_keyboard** %4
store %struct.wl_keyboard_listener* %1, %struct.wl_keyboard_listener** %5
store i8* %2, i8** %6
%7 = load %struct.wl_keyboard*, %struct.wl_keyboard** %4
%8 = bitcast %struct.wl_keyboard* %7 to %struct.wl_proxy*
%9 = load %struct.wl_keyboard_listener*, %struct.wl_keyboard_listener** %5
%10 = bitcast %struct.wl_keyboard_listener* %9 to void ()**
%11 = bitcast void ()** %10 to void (...)*
%12 = load i8*, i8** %6
%13 = call i32 @wl_proxy_add_listener(%struct.wl_proxy* %8, void (...)* %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.wl_keyboard = type { i32 }
%struct.wl_keyboard_listener = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_keyboard_add_listener(%struct.wl_keyboard* %0, %struct.wl_keyboard_listener* %1, i8* %2) {
%4 = bitcast %struct.wl_keyboard* %0 to %struct.wl_proxy*
%5 = bitcast %struct.wl_keyboard_listener* %1 to void (...)*
%6 = tail call i32 @wl_proxy_add_listener(%struct.wl_proxy* %4, void (...)* %5, i8* %2)
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ green_mask;
};
typedef TYPE_1__ Visual;

/* Variables and functions */
unsigned long get_Visual_green_mask(void *_p) {
  return (unsigned long)((Visual *)_p)->green_mask;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_Visual_green_mask(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_Visual_green_mask(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ countPrimes(int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  for (int i = 1; i < 10000; i++) {
    countPrimes(i);
  }
  printf("done\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x2710,-0x8(%rbp)
jge    1159 <main+0x39>
mov    -0x8(%rbp),%edi
call   1040 <countPrimes@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1040 <countPrimes@plt>
add    $0x1,%ebx
cmp    $0x2710,%ebx
jne    1130 <main+0x10>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@str = [5 x i8] c"done\00"
define i32 @main() {
br label %3
1: ; preds = %3
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
3: ; preds = %0, %3
%4 = phi i32 [ 1, %0 ], [ %6, %3 ]
%5 = tail call i32 @countPrimes(i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 10000
br i1 %7, label %1, label %3
}
/* Variables and functions */
int /*<<< orphan*/ cat();
int /*<<< orphan*/ hog();
int /*<<< orphan*/ waitall();
int main() {
  hog();
  hog();
  hog();
  cat();
  waitall();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <hog@plt>
mov    $0x0,%al
call   1040 <hog@plt>
mov    $0x0,%al
call   1040 <hog@plt>
mov    $0x0,%al
call   1050 <cat@plt>
mov    $0x0,%al
call   1030 <waitall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @hog()
%2 = tail call i32 (...) @hog()
%3 = tail call i32 (...) @hog()
%4 = tail call i32 (...) @cat()
%5 = tail call i32 (...) @waitall()
ret i32 0
}
void XQueryColor() {}


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

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

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

LLVM IR (-O2):
define void @XQueryColor() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gdt_init();
int /*<<< orphan*/ idt_init();
int /*<<< orphan*/ tss_init();
void cpu_init(void) {
  gdt_init();
  tss_init();
  idt_init();
}


x86 assembly (clang, -O0):
<cpu_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <gdt_init@plt>
mov    $0x0,%al
call   1030 <tss_init@plt>
mov    $0x0,%al
call   1040 <idt_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_init>:
push   %rax
xor    %eax,%eax
call   1050 <gdt_init@plt>
xor    %eax,%eax
call   1030 <tss_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <idt_init@plt>

LLVM IR (-O0):
define void @cpu_init() {
%1 = call i32 (...) @gdt_init()
%2 = call i32 (...) @tss_init()
%3 = call i32 (...) @idt_init()
ret void
}

LLVM IR (-O2):
define void @cpu_init() {
%1 = tail call i32 (...) @gdt_init()
%2 = tail call i32 (...) @tss_init()
%3 = tail call i32 (...) @idt_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  char test = argv[1][0];
  if ('T' == test)
    printf("done!");
  else
    printf("nope!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%ecx
mov    $0x54,%eax
cmp    %ecx,%eax
jne    1155 <main+0x45>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
jmp    1161 <main+0x51>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rax
cmpb   $0x54,(%rax)
lea    0xee1(%rip),%rax
lea    0xee0(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"done!\00"
@.str.1 = [6 x i8] c"nope!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
store i8 %11, i8* %6
%12 = load i8, i8* %6
%13 = sext i8 %12 to i32
%14 = icmp eq i32 84, %13
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %19
17: ; preds = %2
%18 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"done!\00"
@.str.1 = [6 x i8] c"nope!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 84
%7 = select i1 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%8 = tail call i32 @printf(i8* dereferenceable(1) %7)
ret i32 0
}
/* Variables and functions */
int sqrt(int);
int getLevelForXP(int xp) { return sqrt(xp) / 2 + 1; }


x86 assembly (clang, -O0):
<getLevelForXP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sqrt@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLevelForXP>:
push   %rax
call   1030 <sqrt@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %ecx,%eax
sar    %eax
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getLevelForXP(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sqrt(i32 %3)
%5 = sdiv i32 %4, 2
%6 = add nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @getLevelForXP(i32 %0) {
%2 = tail call i32 @sqrt(i32 %0)
%3 = sdiv i32 %2, 2
%4 = add nsw i32 %3, 1
ret i32 %4
}
void g_type_check_is_value_type() {}


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

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

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

LLVM IR (-O2):
define void @g_type_check_is_value_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _assert_int_equal(unsigned long long, unsigned long long,
                                     char *, int);
scalar_t__ find_operator_function_by_string(int /*<<< orphan*/,
                                            int /*<<< orphan*/ *, char *);
void test_find_operator_function_by_string_valid_null_functions(void **state) {
  (void)state;
  _assert_int_equal(
      ((unsigned long long)((
          size_t)(find_operator_function_by_string(0, NULL, "test")))),
      ((unsigned long long)((size_t)(NULL))),
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/Odie/cmocka/refs/heads/master/example/"
      "calculator_test.c",
      162);
}


x86 assembly (clang, -O0):
<test_find_operator_function_by_string_valid_null_functions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%esi
lea    0xec7(%rip),%rdx
call   1030 <find_operator_function_by_string@plt>
mov    %rax,%rdi
xor    %eax,%eax
mov    %eax,%esi
lea    0xeb9(%rip),%rdx
mov    $0xa2,%ecx
call   1040 <_assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_find_operator_function_by_string_valid_null_functions>:
push   %rax
lea    0xed8(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <find_operator_function_by_string@plt>
lea    0xecd(%rip),%rdx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0xa2,%ecx
pop    %rax
jmp    1040 <_assert_int_equal@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"test\00"
@.str.1 = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Odie/cmocka/refs/heads/master/example/calculator_test.c\00"
define void @test_find_operator_function_by_string_valid_null_functions(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i64 @find_operator_function_by_string(i32 0, i32* null, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @_assert_int_equal(i64 %4, i64 0, i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str.1, i64 0, i64 0), i32 162)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"test\00"
@.str.1 = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Odie/cmocka/refs/heads/master/example/calculator_test.c\00"
define void @test_find_operator_function_by_string_valid_null_functions(i8** nocapture readnone %0) {
%2 = tail call i64 @find_operator_function_by_string(i32 0, i32* null, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @_assert_int_equal(i64 %2, i64 0, i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str.1, i64 0, i64 0), i32 162)
ret void
}
void XDestroySubwindows() {}


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

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

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

LLVM IR (-O2):
define void @XDestroySubwindows() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void caml_js_dom_of_xml() { exit(1); }


x86 assembly (clang, -O0):
<caml_js_dom_of_xml>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<caml_js_dom_of_xml>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @caml_js_dom_of_xml() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @caml_js_dom_of_xml() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int strings_cmp(char *, char *);
int drivers_pesels_cmp(const void *first, const void *second) {
  return strings_cmp((char *)first, (char *)second);
}


x86 assembly (clang, -O0):
<drivers_pesels_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 <strings_cmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drivers_pesels_cmp>:
jmp    1030 <strings_cmp@plt>

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

LLVM IR (-O2):
define i32 @drivers_pesels_cmp(i8* %0, i8* %1) {
%3 = tail call i32 @strings_cmp(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int usage() {
  fprintf(stderr, "Usage: bfi append <file> <value> [<value> ...]\n");
  fprintf(stderr, "       bfi append <file> (read from stdin)\n");
  fprintf(stderr, "       bfi lookup <file> <value> [<value> ...]\n");
  return -255;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xef7(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xf0e(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffff01,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf01(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf1f(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffff01,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [48 x i8] c"Usage: bfi append <file> <value> [<value> ...]\0A\00"
@.str.1 = [44 x i8] c" bfi append <file> (read from stdin)\0A\00"
@.str.2 = [48 x i8] c" bfi lookup <file> <value> [<value> ...]\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
ret i32 -255
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [48 x i8] c"Usage: bfi append <file> <value> [<value> ...]\0A\00"
@.str.1 = [44 x i8] c" bfi append <file> (read from stdin)\0A\00"
@.str.2 = [48 x i8] c" bfi lookup <file> <value> [<value> ...]\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
ret i32 -255
}