xunge/DecIR huggingface dataset:
float macheps() {
  float macheps;
  macheps = 1.0;
  while ((macheps + 1.0) > 1.0) {
    macheps = macheps / 2.0f;
  }
  macheps = macheps * 2;
  return macheps;
}


x86 assembly (clang, -O0):
<macheps>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xeda(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1153 <macheps+0x53>
movss  -0x4(%rbp),%xmm0
movss  0xebf(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1111 <macheps+0x11>
movss  0xea9(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<macheps>:
movss  0xef8(%rip),%xmm0
movss  0xef4(%rip),%xmm1
movsd  0xef0(%rip),%xmm2
nopl   0x0(%rax,%rax,1)
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
xorps  %xmm3,%xmm3
cvtss2sd %xmm0,%xmm3
addsd  %xmm2,%xmm3
ucomisd %xmm2,%xmm3
jbe    1153 <macheps+0x53>
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
jmp    1120 <macheps+0x20>
addss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @macheps() {
%1 = alloca float
store float 1.000000e+00, float* %1
br label %2
2: ; preds = %7, %0
%3 = load float, float* %1
%4 = fpext float %3 to double
%5 = fadd double %4, 1.000000e+00
%6 = fcmp ogt double %5, 1.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load float, float* %1
%9 = fdiv float %8, 2.000000e+00
store float %9, float* %1
br label %2
10: ; preds = %2
%11 = load float, float* %1
%12 = fmul float %11, 2.000000e+00
store float %12, float* %1
%13 = load float, float* %1
ret float %13
}

LLVM IR (-O2):
define float @macheps() {
br label %1
1: ; preds = %11, %0
%2 = phi float [ 1.000000e+00, %0 ], [ %14, %11 ]
%3 = fmul float %2, 5.000000e-01
%4 = fmul float %3, 5.000000e-01
%5 = fmul float %4, 5.000000e-01
%6 = fmul float %5, 5.000000e-01
%7 = fmul float %6, 5.000000e-01
%8 = fpext float %7 to double
%9 = fadd double %8, 1.000000e+00
%10 = fcmp ogt double %9, 1.000000e+00
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = fmul float %7, 5.000000e-01
%13 = fmul float %12, 5.000000e-01
%14 = fmul float %13, 5.000000e-01
br label %1
15: ; preds = %1
%16 = fmul float %7, 2.000000e+00
ret float %16
}
int sqliteIntCompare(const void *pKey1, int n1, const void *pKey2, int n2) {
  return n2 - n1;
}


x86 assembly (clang, -O0):
<sqliteIntCompare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
sub    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqliteIntCompare>:
mov    %ecx,%eax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @sqliteIntCompare(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = load i32, i32* %6
%11 = sub nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @sqliteIntCompare(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 %3) {
%5 = sub nsw i32 %3, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ report_test(int, int /*<<< orphan*/, int /*<<< orphan*/,
                               char *);
int symlink(char *, char *);
void symlink_empty2(void) {
  int rv;
  rv = symlink("foo", "");
  report_test(rv, errno, EINVAL, "symlink named empty string");
}


x86 assembly (clang, -O0):
<symlink_empty2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    0xee8(%rip),%rsi
call   1040 <symlink@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
mov    0x2e87(%rip),%rax
mov    (%rax),%edx
lea    0xeaa(%rip),%rcx
call   1030 <report_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<symlink_empty2>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xeef(%rip),%rsi
call   1040 <symlink@plt>
mov    0x2ea5(%rip),%rcx
mov    (%rcx),%esi
mov    0x2e94(%rip),%rcx
mov    (%rcx),%edx
lea    0xeb7(%rip),%rcx
mov    %eax,%edi
pop    %rax
jmp    1030 <report_test@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"foo\00"
@.str.1 = [1 x i8] zeroinitializer
@errno = global i32 0
@EINVAL = global i32 0
@.str.2 = [27 x i8] c"symlink named empty string\00"
define void @symlink_empty2() {
%1 = alloca i32
%2 = call i32 @symlink(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = load i32, i32* @errno
%5 = load i32, i32* @EINVAL
%6 = call i32 @report_test(i32 %3, i32 %4, i32 %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"foo\00"
@.str.1 = [1 x i8] zeroinitializer
@errno = global i32 0
@EINVAL = global i32 0
@.str.2 = [27 x i8] c"symlink named empty string\00"
define void @symlink_empty2() {
%1 = tail call i32 @symlink(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%2 = load i32, i32* @errno
%3 = load i32, i32* @EINVAL
%4 = tail call i32 @report_test(i32 %1, i32 %2, i32 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
ret void
}
double mass_sg(double radius, double sg) {
  return sg * (radius * radius) / 6.67408E-11;
}


x86 assembly (clang, -O0):
<mass_sg>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed7(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mass_sg>:
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
divsd  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @mass_sg(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = load double, double* %3
%8 = fmul double %6, %7
%9 = fmul double %5, %8
%10 = fdiv double %9, 6.674080e-11
ret double %10
}

LLVM IR (-O2):
define double @mass_sg(double %0, double %1) {
%3 = fmul double %0, %0
%4 = fmul double %3, %1
%5 = fdiv double %4, 6.674080e-11
ret double %5
}
int isonum_712(char *p) {
  int val;
  val = *p;
  if (val & 0x80)
    val |= 0xffffff00;
  return (val);
}


x86 assembly (clang, -O0):
<isonum_712>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     112e <isonum_712+0x2e>
mov    -0xc(%rbp),%eax
or     $0xffffff00,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isonum_712>:
movsbl (%rdi),%ecx
mov    %ecx,%eax
or     $0xffffff00,%eax
test   $0x80,%cl
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @isonum_712(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = and i32 %7, 128
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i32, i32* %3
%12 = or i32 %11, -256
store i32 %12, i32* %3
br label %13
13: ; preds = %10, %1
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @isonum_712(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, 128
%5 = icmp eq i32 %4, 0
%6 = or i32 %3, -256
%7 = select i1 %5, i32 %3, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, size_t);
char *sizeu4(size_t num) {
  static char sizeu4_buf[28];
  sprintf(sizeu4_buf,
          "%"
          "zu",
          num);
  return sizeu4_buf;
}


x86 assembly (clang, -O0):
<sizeu4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0x2f19(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f06(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sizeu4>:
push   %rbx
mov    %rdi,%rdx
lea    0x2f25(%rip),%rbx
lea    0xede(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@sizeu4.sizeu4_buf = internal global [28 x i8] zeroinitializer
@.str = [4 x i8] c"%zu\00"
define i8* @sizeu4(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @sizeu4.sizeu4_buf, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %3)
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @sizeu4.sizeu4_buf, i64 0, i64 0)
}

LLVM IR (-O2):
@sizeu4.sizeu4_buf = internal global [28 x i8] zeroinitializer
@.str = [4 x i8] c"%zu\00"
define i8* @sizeu4(i64 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @sizeu4.sizeu4_buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @sizeu4.sizeu4_buf, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void store_le32_aligned(uint8_t *dst, const uint32_t v) {
  *((uint32_t *)dst) = (v);
}


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

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

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

LLVM IR (-O2):
define void @store_le32_aligned(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
void dbUnshareStringValue(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               61, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<dbUnshareStringValue>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x3d,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbUnshareStringValue>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x3d,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.dbUnshareStringValue = [21 x i8] c"dbUnshareStringValue\00"
define void @dbUnshareStringValue() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 61, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.dbUnshareStringValue, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.dbUnshareStringValue = [21 x i8] c"dbUnshareStringValue\00"
define void @dbUnshareStringValue() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 61, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.dbUnshareStringValue, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_usage(const char *name) {
  printf("usage: %s [-vhdix?] <filename>\n", name);
  printf("\n"
         "   -d | --dump:                      dump intel firmware descriptor\n"
         "   -x | --extract:                   extract intel fd modules\n"
         "   -i | --inject <region>:<module>   inject file <module> into "
         "region <region>\n"
         "   -s | --spifreq <20|33|50>         set the SPI frequency\n"
         "   -v | --version:                   print the version\n"
         "   -h | --help:                      print this help\n\n"
         "<region> is one of Descriptor, BIOS, ME, GbE, Platform\n"
         "\n");
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee7(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"usage: %s [-vhdix?] <filename>\0A\00"
@.str.1 = [435 x i8] c"\0A -d | --dump: dump intel firmware descriptor\0A -x | --extract: extract intel fd modules\0A -i | --inject <region>:<module> inject file <module> into region <region>\0A -s | --spifreq <20|33|50> set the SPI frequency\0A -v | --version: print the version\0A -h | --help: print this help\0A\0A<region> is one of Descriptor, BIOS, ME, GbE, Platform\0A\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([435 x i8], [435 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"usage: %s [-vhdix?] <filename>\0A\00"
@str = [434 x i8] c"\0A -d | --dump: dump intel firmware descriptor\0A -x | --extract: extract intel fd modules\0A -i | --inject <region>:<module> inject file <module> into region <region>\0A -s | --spifreq <20|33|50> set the SPI frequency\0A -v | --version: print the version\0A -h | --help: print this help\0A\0A<region> is one of Descriptor, BIOS, ME, GbE, Platform\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([434 x i8], [434 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ reset_to_98(int *);
int main(void) {
  int n;
  n = 402;
  printf("n=%d\n", n);
  reset_to_98(&n);
  printf("n=%d\n", n);
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x192,0xc(%rsp)
lea    0xecc(%rip),%rbx
mov    %rbx,%rdi
mov    $0x192,%esi
call   1030 <printf@plt>
lea    0xc(%rsp),%rdi
call   1040 <reset_to_98@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"n=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 402, i32* %1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 402)
%4 = call i32 @reset_to_98(i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
void _sbus_writel(unsigned long val, unsigned long addr) {
  *(volatile unsigned long *)addr = val;
}


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

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

LLVM IR (-O0):
define void @_sbus_writel(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = inttoptr i64 %6 to i64*
store volatile i64 %5, i64* %7
ret void
}

LLVM IR (-O2):
define void @_sbus_writel(i64 %0, i64 %1) {
%3 = inttoptr i64 %1 to i64*
store volatile i64 %0, i64* %3
ret void
}
void INI_String_ffnc_ctx() { ; }


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

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

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

LLVM IR (-O2):
define void @INI_String_ffnc_ctx() {
ret void
}
const char *SPM_BuildIdentifierString() { return ""; }


x86 assembly (clang, -O0):
<SPM_BuildIdentifierString>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPM_BuildIdentifierString>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @SPM_BuildIdentifierString() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @SPM_BuildIdentifierString() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
float FastExp2(int /*<<< orphan*/);
int /*<<< orphan*/ FastLog2(float);
int /*<<< orphan*/ LinMapping(int, int /*<<< orphan*/, int /*<<< orphan*/);
float LogMapping(int value_in, float min_out, float max_out) {
  return FastExp2(LinMapping(value_in, FastLog2(min_out), FastLog2(max_out)));
}


x86 assembly (clang, -O0):
<LogMapping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <FastLog2@plt>
mov    %eax,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
call   1040 <FastLog2@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    %eax,%edx
call   1030 <LinMapping@plt>
mov    %eax,%edi
call   1050 <FastExp2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LogMapping>:
push   %rbp
push   %rbx
push   %rax
movss  %xmm1,0x4(%rsp)
mov    %edi,%ebx
call   1040 <FastLog2@plt>
mov    %eax,%ebp
movss  0x4(%rsp),%xmm0
call   1040 <FastLog2@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <LinMapping@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <FastExp2@plt>

LLVM IR (-O0):
define float @LogMapping(i32 %0, float %1, float %2) {
%4 = alloca i32
%5 = alloca float
%6 = alloca float
store i32 %0, i32* %4
store float %1, float* %5
store float %2, float* %6
%7 = load i32, i32* %4
%8 = load float, float* %5
%9 = call i32 @FastLog2(float %8)
%10 = load float, float* %6
%11 = call i32 @FastLog2(float %10)
%12 = call i32 @LinMapping(i32 %7, i32 %9, i32 %11)
%13 = call float @FastExp2(i32 %12)
ret float %13
}

LLVM IR (-O2):
define float @LogMapping(i32 %0, float %1, float %2) {
%4 = tail call i32 @FastLog2(float %1)
%5 = tail call i32 @FastLog2(float %2)
%6 = tail call i32 @LinMapping(i32 %0, i32 %4, i32 %5)
%7 = tail call float @FastExp2(i32 %6)
ret float %7
}
double my_sqrt(float n) {
  float x = 1;
  int iter;
  for (iter = 0; iter < 100; iter++) {
    x = x / 2 + n / (2 * x);
  }
  return x;
}


x86 assembly (clang, -O0):
<my_sqrt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    1165 <my_sqrt+0x65>
movss  -0x8(%rbp),%xmm0
movss  0xed0(%rip),%xmm1
divss  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
movss  0xebf(%rip),%xmm2
mulss  -0x8(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111d <my_sqrt+0x1d>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_sqrt>:
movss  0xef8(%rip),%xmm2
mov    $0x64,%eax
movss  0xeef(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
nop
movaps %xmm2,%xmm3
mulss  %xmm1,%xmm3
addss  %xmm2,%xmm2
movaps %xmm0,%xmm4
divss  %xmm2,%xmm4
addss  %xmm3,%xmm4
movaps %xmm4,%xmm3
mulss  %xmm1,%xmm3
addss  %xmm4,%xmm4
movaps %xmm0,%xmm2
divss  %xmm4,%xmm2
addss  %xmm3,%xmm2
add    $0xfffffffe,%eax
jne    1120 <my_sqrt+0x20>
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @my_sqrt(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca i32
store float %0, float* %2
store float 1.000000e+00, float* %3
store i32 0, i32* %4
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load float, float* %3
%10 = fdiv float %9, 2.000000e+00
%11 = load float, float* %2
%12 = load float, float* %3
%13 = fmul float 2.000000e+00, %12
%14 = fdiv float %11, %13
%15 = fadd float %10, %14
store float %15, float* %3
br label %16
16: ; preds = %8
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
br label %5
19: ; preds = %5
%20 = load float, float* %3
%21 = fpext float %20 to double
ret double %21
}

LLVM IR (-O2):
define double @my_sqrt(float %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %13, %2 ]
%4 = phi float [ 1.000000e+00, %1 ], [ %12, %2 ]
%5 = fmul float %4, 5.000000e-01
%6 = fmul float %4, 2.000000e+00
%7 = fdiv float %0, %6
%8 = fadd float %5, %7
%9 = fmul float %8, 5.000000e-01
%10 = fmul float %8, 2.000000e+00
%11 = fdiv float %0, %10
%12 = fadd float %9, %11
%13 = add nuw nsw i32 %3, 2
%14 = icmp eq i32 %13, 100
br i1 %14, label %15, label %2
15: ; preds = %2
%16 = fpext float %12 to double
ret double %16
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
unsigned short flip(unsigned short input) {
  assert(sizeof(unsigned short) == 2);
  unsigned char *bytes = (unsigned char *)&input;
  unsigned char temp;
  temp = bytes[0];
  bytes[0] = bytes[1];
  bytes[1] = temp;
  return input;
}


x86 assembly (clang, -O0):
<flip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x1,%edi
call   1030 <assert@plt>
lea    -0x2(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
movzwl -0x2(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flip>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1030 <assert@plt>
rol    $0x8,%bx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @flip(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8*
%4 = alloca i8
store i16 %0, i16* %2
%5 = call i32 @assert(i32 1)
%6 = bitcast i16* %2 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
store i8 %9, i8* %4
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 0
store i8 %12, i8* %14
%15 = load i8, i8* %4
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %15, i8* %17
%18 = load i16, i16* %2
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @flip(i16 zeroext %0) {
%2 = tail call i32 @assert(i32 1)
%3 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %3
}
void ARGBAttenuateRow_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ARGBAttenuateRow_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x72() {
  Assert_real((iscntrl(114) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              575, ("iscntrl should be 0 for r"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x72>:
push   %rax
mov    $0x72,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x23f,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for r\00"
define void @t_iscntrl_0x72() {
%1 = call i64 @iscntrl(i32 114)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 575, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for r\00"
define void @t_iscntrl_0x72() {
%1 = tail call i64 @iscntrl(i32 114)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 575, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
FILE *fdopen(int fildes, const char *mode) { return ((FILE *)fildes); }


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

x86 assembly (clang, -O2):
<fdopen>:
movslq %edi,%rax
ret

LLVM IR (-O0):
define i32* @fdopen(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 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
ret i32* %7
}

LLVM IR (-O2):
define i32* @fdopen(i32 %0, i8* nocapture readnone %1) {
%3 = sext i32 %0 to i64
%4 = inttoptr i64 %3 to i32*
ret i32* %4
}
/* Type definitions */
struct telnetp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ telnetp_send_data(struct telnetp *, char *, int);
void send_response(struct telnetp *t, int type, unsigned char c) {
  char resp[3] = {255, type, c};
  telnetp_send_data(t, resp, 3);
}


x86 assembly (clang, -O0):
<send_response>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
movb   $0xff,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,-0xf(%rbp)
mov    -0xd(%rbp),%al
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <telnetp_send_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_response>:
push   %rax
movb   $0xff,0x5(%rsp)
mov    %sil,0x6(%rsp)
mov    %dl,0x7(%rsp)
lea    0x5(%rsp),%rsi
mov    $0x3,%edx
call   1030 <telnetp_send_data@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.telnetp = type { i32 }
define void @send_response(%struct.telnetp* %0, i32 %1, i8 zeroext %2) {
%4 = alloca %struct.telnetp*
%5 = alloca i32
%6 = alloca i8
%7 = alloca [3 x i8]
store %struct.telnetp* %0, %struct.telnetp** %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
store i8 -1, i8* %8
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i32, i32* %5
%11 = trunc i32 %10 to i8
store i8 %11, i8* %9
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = load i8, i8* %6
store i8 %13, i8* %12
%14 = load %struct.telnetp*, %struct.telnetp** %4
%15 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%16 = call i32 @telnetp_send_data(%struct.telnetp* %14, i8* %15, i32 3)
ret void
}

LLVM IR (-O2):
%struct.telnetp = type { i32 }
define void @send_response(%struct.telnetp* %0, i32 %1, i8 zeroext %2) {
%4 = alloca [3 x i8]
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
store i8 -1, i8* %5
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 1
%7 = trunc i32 %1 to i8
store i8 %7, i8* %6
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 2
store i8 %2, i8* %8
%9 = call i32 @telnetp_send_data(%struct.telnetp* %0, i8* %5, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void SHR_B_IMM(int reg, int count) {
  addbyte(0xc0);
  addbyte(0xc0 | reg | 0x28);
  addbyte(count);
}


x86 assembly (clang, -O0):
<SHR_B_IMM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xc0,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
or     $0xc0,%edi
or     $0x28,%edi
call   1030 <addbyte@plt>
mov    -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHR_B_IMM>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0xc0,%edi
call   1030 <addbyte@plt>
or     $0xe8,%ebp
mov    %ebp,%edi
call   1030 <addbyte@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @SHR_B_IMM(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 192)
%6 = load i32, i32* %3
%7 = or i32 192, %6
%8 = or i32 %7, 40
%9 = call i32 @addbyte(i32 %8)
%10 = load i32, i32* %4
%11 = call i32 @addbyte(i32 %10)
ret void
}

LLVM IR (-O2):
define void @SHR_B_IMM(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 192)
%4 = or i32 %0, 232
%5 = tail call i32 @addbyte(i32 %4)
%6 = tail call i32 @addbyte(i32 %1)
ret void
}
void __attribute__((cold)) unused_cold_fn(void) {}


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

x86 assembly (clang, -O2):
<unused_cold_fn>:
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)

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

LLVM IR (-O2):
define void @unused_cold_fn() {
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ close(int /*<<< orphan*/);
int /*<<< orphan*/ sendto(int /*<<< orphan*/, void *, int /*<<< orphan*/,
                          int /*<<< orphan*/, struct sockaddr *,
                          int /*<<< orphan*/);
int /*<<< orphan*/ socket(int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
void initHooks() {
  socket(0, 0, 0);
  sendto(0, (void *)NULL, 0, 0, (struct sockaddr *)NULL, 0);
  close(0);
}


x86 assembly (clang, -O0):
<initHooks>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1050 <socket@plt>
xor    %r9d,%r9d
xor    %eax,%eax
mov    %eax,%r8d
mov    %r9d,%edi
mov    %r8,%rsi
mov    %r9d,%edx
mov    %r9d,%ecx
call   1030 <sendto@plt>
xor    %edi,%edi
call   1040 <close@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initHooks>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <socket@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <sendto@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <close@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define void @initHooks() {
%1 = call i32 @socket(i32 0, i32 0, i32 0)
%2 = call i32 @sendto(i32 0, i8* null, i32 0, i32 0, %struct.sockaddr* null, i32 0)
%3 = call i32 @close(i32 0)
ret void
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define void @initHooks() {
%1 = tail call i32 @socket(i32 0, i32 0, i32 0)
%2 = tail call i32 @sendto(i32 0, i8* null, i32 0, i32 0, %struct.sockaddr* null, i32 0)
%3 = tail call i32 @close(i32 0)
ret void
}
int g1(int *iptr) { return iptr ? *iptr : 0; }


x86 assembly (clang, -O0):
<g1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1121 <g1+0x21>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    112b <g1+0x2b>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <g1+0x2b>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g1>:
test   %rdi,%rdi
je     1108 <g1+0x8>
mov    (%rdi),%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @g1(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi i32 [ %7, %5 ], [ 0, %8 ]
ret i32 %10
}

LLVM IR (-O2):
define i32 @g1(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = load i32, i32* %0
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
int __fesetround(int round) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @__fesetround(i32 %0) {
ret i32 1
}
int history_search_prefix(string, direction)
char *string;
int direction;
{ return (history_search_internal(string, direction, 1)); }


x86 assembly (clang, -O0):
<history_search_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1030 <history_search_internal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<history_search_prefix>:
mov    $0x1,%edx
xor    %eax,%eax
jmp    1030 <history_search_internal@plt>

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

LLVM IR (-O2):
define i32 @history_search_prefix(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @history_search_internal to i32 (i8*, i32, i32, ...)*)(i8* %0, i32 %1, i32 1)
ret i32 %3
}
int NpyOS_ascii_isspace(char c) {
  return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' ||
         c == '\v';
}


x86 assembly (clang, -O0):
<NpyOS_ascii_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1171 <NpyOS_ascii_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xc,%ecx
mov    %al,-0x2(%rbp)
je     1171 <NpyOS_ascii_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     1171 <NpyOS_ascii_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     1171 <NpyOS_ascii_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     1171 <NpyOS_ascii_isspace+0x71>
movsbl -0x1(%rbp),%eax
cmp    $0xb,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<NpyOS_ascii_isspace>:
cmp    $0x20,%dil
ja     1120 <NpyOS_ascii_isspace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100003600,%rdx
bt     %rcx,%rdx
jae    1120 <NpyOS_ascii_isspace+0x20>
ret
xor    %eax,%eax
cmp    $0xb,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @NpyOS_ascii_isspace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 13, label %5
i8 12, label %5
i8 10, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 11
%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 jac_chain_nm6_sq(double x) { return x * x; }


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

x86 assembly (clang, -O2):
<jac_chain_nm6_sq>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @jac_chain_nm6_sq(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @jac_chain_nm6_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __setCHRBank7Low(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ m22_SetChrROMBank7();
void m22_setParamsEXX2(uint16_t addr, uint8_t val) {
  __setCHRBank7Low(addr, val);
  m22_SetChrROMBank7();
}


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

x86 assembly (clang, -O2):
<m22_setParamsEXX2>:
push   %rax
call   1030 <__setCHRBank7Low@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <m22_SetChrROMBank7@plt>

LLVM IR (-O0):
define void @m22_setParamsEXX2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @__setCHRBank7Low(i32 %5, i32 %6)
%8 = call i32 (...) @m22_SetChrROMBank7()
ret void
}

LLVM IR (-O2):
define void @m22_setParamsEXX2(i32 %0, i32 %1) {
%3 = tail call i32 @__setCHRBank7Low(i32 %0, i32 %1)
%4 = tail call i32 (...) @m22_SetChrROMBank7()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int k3, k5, k15;
  const static int n = 999;
  k3 = n / 3;
  k5 = n / 5;
  k15 = n / 15;
  k3 = 3 * k3 * (k3 + 1) / 2;
  k5 = 5 * k5 * (k5 + 1) / 2;
  k15 = 15 * k15 * (k15 + 1) / 2;
  printf("%d\n", k3 + k5 - k15);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14d,-0x8(%rbp)
movl   $0xc7,-0xc(%rbp)
movl   $0x42,-0x10(%rbp)
imul   $0x3,-0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
imul   $0x5,-0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
imul   $0xf,-0x10(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
sub    -0x10(%rbp),%esi
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@main.n = internal constant i32 999
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 333, i32* %2
store i32 199, i32* %3
store i32 66, i32* %4
%5 = load i32, i32* %2
%6 = mul nsw i32 3, %5
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
%9 = mul nsw i32 %6, %8
%10 = sdiv i32 %9, 2
store i32 %10, i32* %2
%11 = load i32, i32* %3
%12 = mul nsw i32 5, %11
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
%15 = mul nsw i32 %12, %14
%16 = sdiv i32 %15, 2
store i32 %16, i32* %3
%17 = load i32, i32* %4
%18 = mul nsw i32 15, %17
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
%21 = mul nsw i32 %18, %20
%22 = sdiv i32 %21, 2
store i32 %22, i32* %4
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = add nsw i32 %23, %24
%26 = load i32, i32* %4
%27 = sub nsw i32 %25, %26
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 233168)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LOG_NOTICE;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ logIT(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ vcontrol_semfree();
void sigTermHandler(int signo) {
  logIT(LOG_NOTICE, "%s", "SIGTERM empfangen");
  vcontrol_semfree();
  exit(1);
}


x86 assembly (clang, -O0):
<sigTermHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
lea    0xeb1(%rip),%rdx
call   1050 <logIT@plt>
mov    $0x0,%al
call   1030 <vcontrol_semfree@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigTermHandler>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
lea    0xebb(%rip),%rdx
call   1050 <logIT@plt>
xor    %eax,%eax
call   1030 <vcontrol_semfree@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@LOG_NOTICE = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [18 x i8] c"SIGTERM empfangen\00"
define void @sigTermHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @LOG_NOTICE
%4 = call i32 @logIT(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @vcontrol_semfree()
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@LOG_NOTICE = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [18 x i8] c"SIGTERM empfangen\00"
define void @sigTermHandler(i32 %0) {
%2 = load i32, i32* @LOG_NOTICE
%3 = tail call i32 @logIT(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @vcontrol_semfree()
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_errfunc1(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_errfunc1() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_errfunc1() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
int longitud_string(char *s) {
  int i;
  i = 0;
  while (s[i] != '\0')
    i++;
  s = s + 1;
  return i;
}


x86 assembly (clang, -O0):
<longitud_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <longitud_string+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <longitud_string+0xf>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<longitud_string>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <longitud_string+0x10>
ret

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

LLVM IR (-O2):
define i32 @longitud_string(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *, char const *);
volatile void panic(const char *s) {
  printk("Kernel panic: %s\n\r", s);
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printk@plt>
jmp    112c <panic+0x1c>

x86 assembly (clang, -O2):
<panic>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printk@plt>
jmp    1120 <panic+0x10>

LLVM IR (-O0):
@.str = [19 x i8] c"Kernel panic: %s\0A\0D\00"
define void @panic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printk(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3)
br label %5
5: ; preds = %5, %1
br label %5
}

LLVM IR (-O2):
@.str = [19 x i8] c"Kernel panic: %s\0A\0D\00"
define void @panic(i8* %0) {
%2 = tail call i32 @printk(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %3
3: ; preds = %3, %1
br label %3
}