xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void hello_message(const char *name) { printf("Hello %s!\n", name); }


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"Hello %s!\0A\00"
define void @hello_message(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ umfpack_zi_free_symbolic(void **);
void umf4zfsym_(void **Symbolic) { umfpack_zi_free_symbolic(Symbolic); }


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

x86 assembly (clang, -O2):
<umf4zfsym_>:
jmp    1030 <umfpack_zi_free_symbolic@plt>

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

LLVM IR (-O2):
define void @umf4zfsym_(i8** %0) {
%2 = tail call i32 @umfpack_zi_free_symbolic(i8** %0)
ret void
}
/* Type definitions */
struct utimbuf {
  int /*<<< orphan*/ modtime;
  int /*<<< orphan*/ actime;
};
struct timeval {
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int utime(char const *, struct utimbuf *);
int utimes(const char *filename, const struct timeval times[2]) {
  struct utimbuf buf;
  buf.actime = times[0].tv_sec;
  buf.modtime = times[1].tv_sec;
  return utime(filename, &buf);
}


x86 assembly (clang, -O0):
<utimes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <utime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utimes>:
push   %rax
mov    (%rsi),%eax
mov    %eax,0x4(%rsp)
mov    0x4(%rsi),%eax
mov    %eax,(%rsp)
mov    %rsp,%rsi
call   1030 <utime@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.utimbuf = type { i32, i32 }
define i32 @utimes(i8* %0, %struct.timeval* %1) {
%3 = alloca i8*
%4 = alloca %struct.timeval*
%5 = alloca %struct.utimbuf
store i8* %0, i8** %3
store %struct.timeval* %1, %struct.timeval** %4
%6 = load %struct.timeval*, %struct.timeval** %4
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i64 0
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %5, i32 0, i32 1
store i32 %9, i32* %10
%11 = load %struct.timeval*, %struct.timeval** %4
%12 = getelementptr inbounds %struct.timeval, %struct.timeval* %11, i64 1
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 0
%14 = load i32, i32* %13
%15 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %5, i32 0, i32 0
store i32 %14, i32* %15
%16 = load i8*, i8** %3
%17 = call i32 @utime(i8* %16, %struct.utimbuf* %5)
ret i32 %17
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.utimbuf = type { i32, i32 }
define i32 @utimes(i8* nocapture %0, %struct.timeval* nocapture %1) {
%3 = alloca %struct.utimbuf
%4 = bitcast %struct.utimbuf* %3 to i8*
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %3, i64 0, i32 1
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 1, i32 0
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.utimbuf, %struct.utimbuf* %3, i64 0, i32 0
store i32 %9, i32* %10
%11 = call i32 @utime(i8* %0, %struct.utimbuf* %3)
ret i32 %11
}
int test_imm_5Auint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x5A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Auint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x5a,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Auint64_highword_mem>:
testb  $0x5a,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_5Auint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 386547056640
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *download_page(char *, char *, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *page_content =
      download_page("159.16.237.60", "http",
                    "numeracion.exe/info_tel?cld=462&telefono=6266452");
  printf("page_content:\n%s\n", page_content);
  free(page_content);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xec1(%rip),%rsi
lea    0xebf(%rip),%rdx
call   1040 <download_page@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xedc(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xecf(%rip),%rsi
lea    0xecd(%rip),%rdx
call   1040 <download_page@plt>
mov    %rax,%rbx
lea    0xeef(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"159.16.237.60\00"
@.str.1 = [5 x i8] c"http\00"
@.str.2 = [49 x i8] c"numeracion.exe/info_tel?cld=462&telefono=6266452\00"
@.str.3 = [18 x i8] c"page_content:\0A%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @download_page(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"159.16.237.60\00"
@.str.1 = [5 x i8] c"http\00"
@.str.2 = [49 x i8] c"numeracion.exe/info_tel?cld=462&telefono=6266452\00"
@.str.3 = [18 x i8] c"page_content:\0A%s\0A\00"
define i32 @main() {
%1 = tail call i8* @download_page(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* %1)
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
/* Type definitions */
typedef double time_t;
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
void double_to_timeval(const double val, struct timeval *const tv) {
  tv->tv_sec = val;
  tv->tv_usec = (val - (time_t)val) * 1000000.0;
}


x86 assembly (clang, -O0):
<double_to_timeval>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xed4(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_to_timeval>:
movsd  %xmm0,(%rdi)
subsd  %xmm0,%xmm0
mulsd  0xef0(%rip),%xmm0
movsd  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define void @double_to_timeval(double %0, %struct.timeval* %1) {
%3 = alloca double
%4 = alloca %struct.timeval*
store double %0, double* %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load double, double* %3
%6 = load %struct.timeval*, %struct.timeval** %4
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
store double %5, double* %7
%8 = load double, double* %3
%9 = load double, double* %3
%10 = fsub double %8, %9
%11 = fmul double %10, 1.000000e+06
%12 = load %struct.timeval*, %struct.timeval** %4
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 1
store double %11, double* %13
ret void
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define void @double_to_timeval(double %0, %struct.timeval* nocapture writeonly %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
store double %0, double* %3
%4 = fsub double %0, %0
%5 = fmul double %4, 1.000000e+06
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
store double %5, double* %6
ret void
}
unsigned char kmAlmostEqual(float lhs, float rhs) {
  return (lhs + 1.0 / 64.0 > rhs && lhs - 1.0 / 64.0 < rhs);
}


x86 assembly (clang, -O0):
<kmAlmostEqual>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee1(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jbe    1163 <kmAlmostEqual+0x63>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb4(%rip),%xmm0
subsd  %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmAlmostEqual>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm2
addsd  %xmm0,%xmm2
cvtss2sd %xmm1,%xmm1
ucomisd %xmm1,%xmm2
seta   %cl
addsd  0xee5(%rip),%xmm0
ucomisd %xmm0,%xmm1
seta   %al
and    %cl,%al
ret

LLVM IR (-O0):
define zeroext i8 @kmAlmostEqual(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = fadd double %6, 1.562500e-02
%8 = load float, float* %4
%9 = fpext float %8 to double
%10 = fcmp ogt double %7, %9
br i1 %10, label %11, label %18
11: ; preds = %2
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = fsub double %13, 1.562500e-02
%15 = load float, float* %4
%16 = fpext float %15 to double
%17 = fcmp olt double %14, %16
br label %18
18: ; preds = %11, %2
%19 = phi i1 [ false, %2 ], [ %17, %11 ]
%20 = zext i1 %19 to i32
%21 = trunc i32 %20 to i8
ret i8 %21
}

LLVM IR (-O2):
define zeroext i8 @kmAlmostEqual(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fadd double %3, 1.562500e-02
%5 = fpext float %1 to double
%6 = fcmp ogt double %4, %5
%7 = fadd double %3, -1.562500e-02
%8 = fcmp olt double %7, %5
%9 = and i1 %6, %8
%10 = zext i1 %9 to i8
ret i8 %10
}
/* Variables and functions */
int inb(int);
int /*<<< orphan*/ outb(int, int);
void crt_cursor_on() {
  outb(0x3D4, 0x0A);
  outb(0x3D5, (inb(0x3D5) & 0xC0) | 0x00);
  outb(0x3D4, 0x0B);
  outb(0x3D5, (inb(0x3E0) & 0xE0) | 0x0E);
}


x86 assembly (clang, -O0):
<crt_cursor_on>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3d4,%edi
mov    $0xa,%esi
call   1030 <outb@plt>
mov    $0x3d5,%edi
call   1040 <inb@plt>
mov    %eax,%esi
and    $0xc0,%esi
or     $0x0,%esi
mov    $0x3d5,%edi
call   1030 <outb@plt>
mov    $0x3d4,%edi
mov    $0xb,%esi
call   1030 <outb@plt>
mov    $0x3e0,%edi
call   1040 <inb@plt>
mov    %eax,%esi
and    $0xe0,%esi
or     $0xe,%esi
mov    $0x3d5,%edi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<crt_cursor_on>:
push   %rax
mov    $0x3d4,%edi
mov    $0xa,%esi
call   1030 <outb@plt>
mov    $0x3d5,%edi
call   1040 <inb@plt>
and    $0xc0,%eax
mov    $0x3d5,%edi
mov    %eax,%esi
call   1030 <outb@plt>
mov    $0x3d4,%edi
mov    $0xb,%esi
call   1030 <outb@plt>
mov    $0x3e0,%edi
call   1040 <inb@plt>
and    $0xe0,%eax
lea    0xe(%rax),%esi
mov    $0x3d5,%edi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @crt_cursor_on() {
%1 = call i32 @outb(i32 980, i32 10)
%2 = call i32 @inb(i32 981)
%3 = and i32 %2, 192
%4 = or i32 %3, 0
%5 = call i32 @outb(i32 981, i32 %4)
%6 = call i32 @outb(i32 980, i32 11)
%7 = call i32 @inb(i32 992)
%8 = and i32 %7, 224
%9 = or i32 %8, 14
%10 = call i32 @outb(i32 981, i32 %9)
ret void
}

LLVM IR (-O2):
define void @crt_cursor_on() {
%1 = tail call i32 @outb(i32 980, i32 10)
%2 = tail call i32 @inb(i32 981)
%3 = and i32 %2, 192
%4 = tail call i32 @outb(i32 981, i32 %3)
%5 = tail call i32 @outb(i32 980, i32 11)
%6 = tail call i32 @inb(i32 992)
%7 = and i32 %6, 224
%8 = or i32 %7, 14
%9 = tail call i32 @outb(i32 981, i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_226() {
  Assert_real((isqrt(226) == 15),
              "/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",
              1135, ("Integer square root of 226 should be 15"));
}


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

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

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 226 should be 15\00"
define void @t_sqrt_226() {
%1 = call i32 @isqrt(i32 226)
%2 = icmp eq i32 %1, 15
%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 1135, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 226 should be 15\00"
define void @t_sqrt_226() {
%1 = tail call i32 @isqrt(i32 226)
%2 = icmp eq i32 %1, 15
%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 1135, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(unsigned long);
int /*<<< orphan*/ printf(char *, int, unsigned long);
__attribute__((__noreturn__)) void exitfunc11(int status, void *arg) {
  printf("Executing exitfunc"
         "11"
         " (status=%d, arg=%lu)\n",
         status, (unsigned long)arg);
  exit((unsigned long)arg);
}


x86 assembly (clang, -O0):
<exitfunc11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc11>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Executing exitfunc11 (status=%d, arg=%lu)\0A\00"
define void @exitfunc11(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i64
%8 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %5, i64 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i64
%11 = call i32 @exit(i64 %10)
unreachable
}

LLVM IR (-O2):
@.str = [43 x i8] c"Executing exitfunc11 (status=%d, arg=%lu)\0A\00"
define void @exitfunc11(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %0, i64 %3)
%5 = tail call i32 @exit(i64 %3)
unreachable
}
double f(x)
double x;
{
  double z;
  z = x * x * x - 3 * x + 1;
  return z;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  0xee8(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xeb4(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xeec(%rip),%xmm0
addsd  %xmm1,%xmm0
addsd  0xee8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @f(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fmul double %4, %5
%7 = load double, double* %2
%8 = load double, double* %2
%9 = fmul double 3.000000e+00, %8
%10 = fneg double %9
%11 = call double @llvm.fmuladd.f64(double %6, double %7, double %10)
%12 = fadd double %11, 1.000000e+00
store double %12, double* %3
%13 = load double, double* %3
ret double %13
}

LLVM IR (-O2):
define double @f(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %0, -3.000000e+00
%4 = tail call double @llvm.fmuladd.f64(double %2, double %0, double %3)
%5 = fadd double %4, 1.000000e+00
ret double %5
}
/* Variables and functions */
void *sstore_new(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @sstore_new() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @sstore_new() {
ret i8* null
}
/* Type definitions */
struct cxl_ioctl_start_work {
  int /*<<< orphan*/ work_element_descriptor;
};
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int cxl_work_get_wed(struct cxl_ioctl_start_work *work, __u64 *valp) {
  if (work == NULL) {
    errno = EINVAL;
    return -1;
  }
  *valp = work->work_element_descriptor;
  return 0;
}


x86 assembly (clang, -O0):
<cxl_work_get_wed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1135 <cxl_work_get_wed+0x35>
mov    0x2eba(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb9(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1148 <cxl_work_get_wed+0x48>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cxl_work_get_wed>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %cl
jne    1118 <cxl_work_get_wed+0x18>
mov    0x2ec7(%rip),%rdi
mov    0x2ec8(%rip),%rsi
mov    %cl,%al
neg    %eax
mov    (%rdi),%ecx
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
%struct.cxl_ioctl_start_work = type { i32 }
@EINVAL = global i32 0
@errno = global i32 0
define i32 @cxl_work_get_wed(%struct.cxl_ioctl_start_work* %0, i32* %1) {
%3 = alloca i32
%4 = alloca %struct.cxl_ioctl_start_work*
%5 = alloca i32*
store %struct.cxl_ioctl_start_work* %0, %struct.cxl_ioctl_start_work** %4
store i32* %1, i32** %5
%6 = load %struct.cxl_ioctl_start_work*, %struct.cxl_ioctl_start_work** %4
%7 = icmp eq %struct.cxl_ioctl_start_work* %6, null
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* @EINVAL
store i32 %9, i32* @errno
store i32 -1, i32* %3
br label %15
10: ; preds = %2
%11 = load %struct.cxl_ioctl_start_work*, %struct.cxl_ioctl_start_work** %4
%12 = getelementptr inbounds %struct.cxl_ioctl_start_work, %struct.cxl_ioctl_start_work* %11, i32 0, i32 0
%13 = load i32, i32* %12
%14 = load i32*, i32** %5
store i32 %13, i32* %14
store i32 0, i32* %3
br label %15
15: ; preds = %10, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.cxl_ioctl_start_work = type { i32 }
@EINVAL = global i32 0
@errno = global i32 0
define i32 @cxl_work_get_wed(%struct.cxl_ioctl_start_work* %0, i32* nocapture writeonly %1) {
%3 = icmp eq %struct.cxl_ioctl_start_work* %0, null
%4 = getelementptr inbounds %struct.cxl_ioctl_start_work, %struct.cxl_ioctl_start_work* %0, i64 0, i32 0
%5 = select i1 %3, i32* @EINVAL, i32* %4
%6 = select i1 %3, i32* @errno, i32* %1
%7 = sext i1 %3 to i32
%8 = load i32, i32* %5
store i32 %8, i32* %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, float, float);
void main() {
  int i = 2, j = 3, k, l;
  float a, b;
  k = i / j * j;
  l = j / i * i;
  a = i / j * j;
  b = j / i * i;
  printf("%d %d %f %f", k, l, a, b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x2,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
imul   -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
imul   -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
imul   -0x4(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xeed(%rip),%rdi
movss  0xee1(%rip),%xmm1
xorps  %xmm0,%xmm0
xor    %esi,%esi
mov    $0x2,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%d %d %f %f\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
store i32 2, i32* %1
store i32 3, i32* %2
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = sdiv i32 %7, %8
%10 = load i32, i32* %2
%11 = mul nsw i32 %9, %10
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = load i32, i32* %1
%14 = sdiv i32 %12, %13
%15 = load i32, i32* %1
%16 = mul nsw i32 %14, %15
store i32 %16, i32* %4
%17 = load i32, i32* %1
%18 = load i32, i32* %2
%19 = sdiv i32 %17, %18
%20 = load i32, i32* %2
%21 = mul nsw i32 %19, %20
%22 = sitofp i32 %21 to float
store float %22, float* %5
%23 = load i32, i32* %2
%24 = load i32, i32* %1
%25 = sdiv i32 %23, %24
%26 = load i32, i32* %1
%27 = mul nsw i32 %25, %26
%28 = sitofp i32 %27 to float
store float %28, float* %6
%29 = load i32, i32* %3
%30 = load i32, i32* %4
%31 = load float, float* %5
%32 = load float, float* %6
%33 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %29, i32 %30, float %31, float %32)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %f %f\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 0, i32 2, float 0.000000e+00, float 2.000000e+00)
ret void
}
int execute_timer_getoverrun() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_timer_getoverrun() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printargs(int, ...);
int main(void) {
  printargs(5, 2, 14, 84, 97, 15, 24, 48, -1);
  printargs(84, 51, -1);
  printargs(-1);
  printargs(1, -1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
mov    $0x2,%esi
mov    $0xe,%edx
mov    $0x54,%ecx
mov    $0x61,%r8d
mov    $0xf,%r9d
movl   $0x18,(%rsp)
movl   $0x30,0x8(%rsp)
movl   $0xffffffff,0x10(%rsp)
ff
mov    $0x0,%al
call   1030 <printargs@plt>
mov    $0x54,%edi
mov    $0x33,%esi
mov    $0xffffffff,%edx
mov    $0x0,%al
call   1030 <printargs@plt>
mov    $0xffffffff,%edi
mov    $0x0,%al
call   1030 <printargs@plt>
mov    $0x1,%edi
mov    $0xffffffff,%esi
mov    $0x0,%al
call   1030 <printargs@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
sub    $0x8,%rsp
mov    $0x5,%edi
mov    $0x2,%esi
mov    $0xe,%edx
mov    $0x54,%ecx
mov    $0x61,%r8d
mov    $0xf,%r9d
xor    %eax,%eax
push   $0xffffffffffffffff
push   $0x30
push   $0x18
call   1030 <printargs@plt>
add    $0x20,%rsp
mov    $0x54,%edi
mov    $0x33,%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
call   1030 <printargs@plt>
mov    $0xffffffff,%edi
xor    %eax,%eax
call   1030 <printargs@plt>
mov    $0x1,%edi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1030 <printargs@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i32, ...) @printargs(i32 5, i32 2, i32 14, i32 84, i32 97, i32 15, i32 24, i32 48, i32 -1)
%3 = call i32 (i32, ...) @printargs(i32 84, i32 51, i32 -1)
%4 = call i32 (i32, ...) @printargs(i32 -1)
%5 = call i32 (i32, ...) @printargs(i32 1, i32 -1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i32, ...) @printargs(i32 5, i32 2, i32 14, i32 84, i32 97, i32 15, i32 24, i32 48, i32 -1)
%2 = tail call i32 (i32, ...) @printargs(i32 84, i32 51, i32 -1)
%3 = tail call i32 (i32, ...) @printargs(i32 -1)
%4 = tail call i32 (i32, ...) @printargs(i32 1, i32 -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("\n1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\nBuzz\n11\nFizz\n13\n14\nFizzBu"
       "zz\n16\n17\nFizz\n19\nBuzz\nFizz\n22\n23\nFizz\nBuzz\n26\nFizz\n28\n29"
       "\nFizzBuzz\n31\n32\nFizz\n34\nBuzz\nFizz\n37\n38\nFizz\nBuzz\n41\nFizz"
       "\n43\n44\nFizzBuzz\n46\n47\nFizz\n49\nBuzz\nFizz\n52\n53\nFizz\nBuzz\n5"
       "6\nFizz\n58\n59\nFizzBuzz\n61\n62\nFizz\n64\nBuzz\nFizz\n67\n68\nFizz\n"
       "Buzz\n71\nFizz\n73\n74\nFizzBuzz\n76\n77\nFizz\n79\nBuzz\nFizz\n82\n83"
       "\nFizz\nBuzz\n86\nFizz\n88\n89\nFizzBuzz\n91\n92\nFizz\n94\nBuzz\nFizz"
       "\n97\n98\nFizz\nBuzz");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <puts@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 = [414 x i8] c"\0A1\0A2\0AFizz\0A4\0ABuzz\0AFizz\0A7\0A8\0AFizz\0ABuzz\0A11\0AFizz\0A13\0A14\0AFizzBuzz\0A16\0A17\0AFizz\0A19\0ABuzz\0AFizz\0A22\0A23\0AFizz\0ABuzz\0A26\0AFizz\0A28\0A29\0AFizzBuzz\0A31\0A32\0AFizz\0A34\0ABuzz\0AFizz\0A37\0A38\0AFizz\0ABuzz\0A41\0AFizz\0A43\0A44\0AFizzBuzz\0A46\0A47\0AFizz\0A49\0ABuzz\0AFizz\0A52\0A53\0AFizz\0ABuzz\0A56\0AFizz\0A58\0A59\0AFizzBuzz\0A61\0A62\0AFizz\0A64\0ABuzz\0AFizz\0A67\0A68\0AFizz\0ABuzz\0A71\0AFizz\0A73\0A74\0AFizzBuzz\0A76\0A77\0AFizz\0A79\0ABuzz\0AFizz\0A82\0A83\0AFizz\0ABuzz\0A86\0AFizz\0A88\0A89\0AFizzBuzz\0A91\0A92\0AFizz\0A94\0ABuzz\0AFizz\0A97\0A98\0AFizz\0ABuzz\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([414 x i8], [414 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [414 x i8] c"\0A1\0A2\0AFizz\0A4\0ABuzz\0AFizz\0A7\0A8\0AFizz\0ABuzz\0A11\0AFizz\0A13\0A14\0AFizzBuzz\0A16\0A17\0AFizz\0A19\0ABuzz\0AFizz\0A22\0A23\0AFizz\0ABuzz\0A26\0AFizz\0A28\0A29\0AFizzBuzz\0A31\0A32\0AFizz\0A34\0ABuzz\0AFizz\0A37\0A38\0AFizz\0ABuzz\0A41\0AFizz\0A43\0A44\0AFizzBuzz\0A46\0A47\0AFizz\0A49\0ABuzz\0AFizz\0A52\0A53\0AFizz\0ABuzz\0A56\0AFizz\0A58\0A59\0AFizzBuzz\0A61\0A62\0AFizz\0A64\0ABuzz\0AFizz\0A67\0A68\0AFizz\0ABuzz\0A71\0AFizz\0A73\0A74\0AFizzBuzz\0A76\0A77\0AFizz\0A79\0ABuzz\0AFizz\0A82\0A83\0AFizz\0ABuzz\0A86\0AFizz\0A88\0A89\0AFizzBuzz\0A91\0A92\0AFizz\0A94\0ABuzz\0AFizz\0A97\0A98\0AFizz\0ABuzz\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([414 x i8], [414 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int f(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d", f(1));
  printf("%d", f(2));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <f@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x2,%edi
call   1030 <f@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1030 <f@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x2,%edi
call   1030 <f@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @f(i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @f(i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
void set(unsigned char *a, unsigned char pos) { *a |= 1 << pos; }


x86 assembly (clang, -O0):
<set>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
or     %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     %al,(%rdi)
ret

LLVM IR (-O0):
define void @set(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 1, %6
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = or i32 %10, %7
%12 = trunc i32 %11 to i8
store i8 %12, i8* %8
ret void
}

LLVM IR (-O2):
define void @set(i8* nocapture %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = shl nuw i32 1, %3
%5 = load i8, i8* %0
%6 = trunc i32 %4 to i8
%7 = or i8 %5, %6
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void thread_new() { exit(1); }


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

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

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

LLVM IR (-O2):
define void @thread_new() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
void Security_noFiles(struct Except *eh) {}


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

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

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

LLVM IR (-O2):
%struct.Except = type opaque
define void @Security_noFiles(%struct.Except* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ pow(double, double);
float powf(float x, float y) { return (float)pow((double)x, (double)y); }


x86 assembly (clang, -O0):
<powf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
call   1030 <pow@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<powf>:
push   %rax
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @powf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = call i64 @pow(double %6, double %8)
%10 = sitofp i64 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @powf(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fpext float %1 to double
%5 = tail call i64 @pow(double %3, double %4)
%6 = sitofp i64 %5 to float
ret float %6
}
void Interp4(unsigned char *pc, int c1, int c2, int c3) {
  c1 &= 0xf0f0f0;
  c2 &= 0xf0f0f0;
  c3 &= 0xf0f0f0;
  *((int *)pc) = (c1 * 2 + (c2 + c3) * 7) >> 4;
}


x86 assembly (clang, -O0):
<Interp4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%eax
and    $0xf0f0f0,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
and    $0xf0f0f0,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
and    $0xf0f0f0,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
imul   $0x7,%eax,%eax
add    %eax,%ecx
sar    $0x4,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp4>:
and    $0xf0f0f0,%edx
and    $0xf0f0f0,%ecx
add    %edx,%ecx
and    $0xf0f0f0,%esi
lea    0x0(,%rcx,8),%eax
sub    %ecx,%eax
lea    (%rax,%rsi,2),%eax
shr    $0x4,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @Interp4(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = and i32 %9, 15790320
store i32 %10, i32* %6
%11 = load i32, i32* %7
%12 = and i32 %11, 15790320
store i32 %12, i32* %7
%13 = load i32, i32* %8
%14 = and i32 %13, 15790320
store i32 %14, i32* %8
%15 = load i32, i32* %6
%16 = mul nsw i32 %15, 2
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = add nsw i32 %17, %18
%20 = mul nsw i32 %19, 7
%21 = add nsw i32 %16, %20
%22 = ashr i32 %21, 4
%23 = load i8*, i8** %5
%24 = bitcast i8* %23 to i32*
store i32 %22, i32* %24
ret void
}

LLVM IR (-O2):
define void @Interp4(i8* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
%5 = and i32 %2, 15790320
%6 = and i32 %3, 15790320
%7 = shl i32 %1, 1
%8 = and i32 %7, 31580640
%9 = add nuw nsw i32 %6, %5
%10 = mul nuw nsw i32 %9, 7
%11 = add nuw nsw i32 %10, %8
%12 = lshr exact i32 %11, 4
%13 = bitcast i8* %0 to i32*
store i32 %12, i32* %13
ret void
}
void fd_log_ram(char *message __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @fd_log_ram(i8* nocapture %0) {
ret void
}
/* Variables and functions */
double copysign(double x, double y) {
  if ((x < 0 && y > 0) || (x > 0 && y < 0))
    return -x;
  return x;
}


x86 assembly (clang, -O0):
<copysign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112e <copysign+0x2e>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
ja     114e <copysign+0x4e>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1174 <copysign+0x74>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1174 <copysign+0x74>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117e <copysign+0x7e>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<copysign>:
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
jbe    1110 <copysign+0x10>
ucomisd %xmm2,%xmm1
ja     1120 <copysign+0x20>
ucomisd %xmm2,%xmm0
jbe    1128 <copysign+0x28>
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
jbe    1128 <copysign+0x28>
xorpd  0xed8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @copysign(double %0, double %1) {
%3 = fcmp olt double %0, 0.000000e+00
%4 = fcmp ogt double %1, 0.000000e+00
%5 = and i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = fcmp ogt double %0, 0.000000e+00
%8 = fcmp olt double %1, 0.000000e+00
%9 = and i1 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %6, %2
%11 = fneg double %0
br label %12
12: ; preds = %6, %10
%13 = phi double [ %11, %10 ], [ %0, %6 ]
ret double %13
}
/* Variables and functions */
int INT_MIN;
int /*<<< orphan*/ itoa(int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int n = INT_MIN;
  printf("int   : %d\n", n);
  printf("string: ");
  itoa(n);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <itoa@plt>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2eb0(%rip),%rax
mov    (%rax),%ebx
lea    0xebf(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%edi
call   1050 <itoa@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
@.str = [12 x i8] c"int : %d\0A\00"
@.str.1 = [9 x i8] c"string: \00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @INT_MIN
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* %2
%8 = call i32 @itoa(i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@INT_MIN = global i32 0
@.str = [12 x i8] c"int : %d\0A\00"
@.str.1 = [9 x i8] c"string: \00"
define i32 @main() {
%1 = load i32, i32* @INT_MIN
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @itoa(i32 %1)
%5 = tail call i32 @putchar(i32 10)
ret i32 0
}
int test_imm_BFint32_mem(int *val) {
  return ((*val) & (0xBF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BFint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0xbf,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_BFint32_mem>:
testb  $0xbf,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_BFint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 191
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void timsort(int arr[], int n) {}


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

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

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

LLVM IR (-O2):
define void @timsort(i32* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void wn_add_scaled_vect(double *x, double *y, double w, int t) { assert(0); }


x86 assembly (clang, -O0):
<wn_add_scaled_vect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @wn_add_scaled_vect(double* %0, double* %1, double %2, i32 %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
%8 = alloca i32
store double* %0, double** %5
store double* %1, double** %6
store double %2, double* %7
store i32 %3, i32* %8
%9 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @wn_add_scaled_vect(double* nocapture readnone %0, double* nocapture readnone %1, double %2, i32 %3) {
%5 = tail call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
float asinf(float);
float num_asin(float a) { return asinf(a); }


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

x86 assembly (clang, -O2):
<num_asin>:
jmp    1030 <asinf@plt>

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

LLVM IR (-O2):
define float @num_asin(float %0) {
%2 = tail call float @asinf(float %0)
ret float %2
}
int fun523() { return 523; }


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

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

LLVM IR (-O0):
define i32 @fun523() {
ret i32 523
}

LLVM IR (-O2):
define i32 @fun523() {
ret i32 523
}
/* Variables and functions */
int /*<<< orphan*/ SIGFPE;
int /*<<< orphan*/ derror(int);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
void float_err(int sig_num) {
  signal(SIGFPE, float_err);
  derror(3);
}


x86 assembly (clang, -O0):
<float_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    0x2ea5(%rip),%rsi
call   1040 <signal@plt>
mov    $0x3,%edi
call   1030 <derror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_err>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rsi
call   1040 <signal@plt>
mov    $0x3,%edi
pop    %rax
jmp    1030 <derror@plt>

LLVM IR (-O0):
@SIGFPE = global i32 0
define void @float_err(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SIGFPE
%4 = call i32 @signal(i32 %3, void (i32)* @float_err)
%5 = call i32 @derror(i32 3)
ret void
}

LLVM IR (-O2):
@SIGFPE = global i32 0
define void @float_err(i32 %0) {
%2 = load i32, i32* @SIGFPE
%3 = tail call i32 @signal(i32 %2, void (i32)* @float_err)
%4 = tail call i32 @derror(i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void *xmalloc(size_t s) {
  void *m = malloc(s);
  if (m == NULL) {
    fprintf(stderr, "Unable to allocate memory: %s\n", strerror(errno));
    exit(1);
  }
  return m;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    119a <xmalloc+0x5a>
mov    0x2e75(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    %rax,%rdx
lea    0xe75(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     114d <xmalloc+0xd>
pop    %rbx
ret
mov    0x2e8c(%rip),%rax
mov    (%rax),%ebx
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
lea    0xe95(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Unable to allocate memory: %s\0A\00"
@errno = global i32 0
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i32, i32* @errno
%11 = call i8* @strerror(i32 %10)
%12 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Unable to allocate memory: %s\0A\00"
@errno = global i32 0
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = load i32, i32* @errno
%7 = tail call i8* @strerror(i32 %6)
%8 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %1
ret i8* %2
}