xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EA_AY_DI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_st_8_di(void) { m68ki_write_8(EA_AY_DI_8(), 0xff); }


x86 assembly (clang, -O0):
<m68k_op_st_8_di>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <EA_AY_DI_8@plt>
mov    %eax,%edi
mov    $0xff,%esi
call   1040 <m68ki_write_8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_st_8_di>:
push   %rax
xor    %eax,%eax
call   1030 <EA_AY_DI_8@plt>
mov    %eax,%edi
mov    $0xff,%esi
pop    %rax
jmp    1040 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_st_8_di() {
%1 = call i32 (...) @EA_AY_DI_8()
%2 = call i32 @m68ki_write_8(i32 %1, i32 255)
ret void
}

LLVM IR (-O2):
define void @m68k_op_st_8_di() {
%1 = tail call i32 (...) @EA_AY_DI_8()
%2 = tail call i32 @m68ki_write_8(i32 %1, i32 255)
ret void
}
void upse_ps1_bios_shutdown() {}


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

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

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

LLVM IR (-O2):
define void @upse_ps1_bios_shutdown() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void printhelp(const char *argv0) {
  printf("Usage: %s <database>\n"
         "Take a few best guesses at repairing an obdgpslogger log\n",
         argv0);
}


x86 assembly (clang, -O0):
<printhelp>:
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):
<printhelp>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [79 x i8] c"Usage: %s <database>\0ATake a few best guesses at repairing an obdgpslogger log\0A\00"
define void @printhelp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [79 x i8] c"Usage: %s <database>\0ATake a few best guesses at repairing an obdgpslogger log\0A\00"
define void @printhelp(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void SPIEnable(unsigned long ulBase) {
  (*((volatile unsigned long *)(ulBase + 0x00000134))) |= 0x00000001;
}


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

x86 assembly (clang, -O2):
<SPIEnable>:
orq    $0x1,0x134(%rdi)
01
ret

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

LLVM IR (-O2):
define void @SPIEnable(i64 %0) {
%2 = add i64 %0, 308
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = or i64 %4, 1
store volatile i64 %5, i64* %3
ret void
}
int C_JPEG_TO_CCIR(int y) {
  y = (((y - 128) * ((int)((112.0 / 127.0) * (1 << 10) + 0.5)) +
        ((1 << (10 - 1)) + (128 << 10))) >>
       10);
  if (y < 16)
    y = 16;
  return y;
}


x86 assembly (clang, -O0):
<C_JPEG_TO_CCIR>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x80,%eax
imul   $0x387,%eax,%eax
add    $0x20200,%eax
sar    $0xa,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1131 <C_JPEG_TO_CCIR+0x31>
movl   $0x10,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_JPEG_TO_CCIR>:
imul   $0x387,%edi,%ecx
add    $0x3e80,%ecx
sar    $0xa,%ecx
cmp    $0x11,%ecx
mov    $0x10,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @C_JPEG_TO_CCIR(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 128
%5 = mul nsw i32 %4, 903
%6 = add nsw i32 %5, 131584
%7 = ashr i32 %6, 10
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 16
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 16, i32* %2
br label %11
11: ; preds = %10, %1
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @C_JPEG_TO_CCIR(i32 %0) {
%2 = mul i32 %0, 903
%3 = add i32 %2, 16000
%4 = ashr i32 %3, 10
%5 = icmp sgt i32 %4, 16
%6 = select i1 %5, i32 %4, i32 16
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fun1();
int /*<<< orphan*/ fun2();
void *fun(void *argv) {
  fun1();
  fun2();
  return NULL;
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <fun1@plt>
mov    $0x0,%al
call   1030 <fun2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
push   %rax
xor    %eax,%eax
call   1040 <fun1@plt>
xor    %eax,%eax
call   1030 <fun2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @fun(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @fun1()
%4 = call i32 (...) @fun2()
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @fun(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @fun1()
%3 = tail call i32 (...) @fun2()
ret i8* null
}
/* Variables and functions */
double scs_cos_rz(double);
double cos_rz(double x) { return scs_cos_rz(x); }


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

x86 assembly (clang, -O2):
<cos_rz>:
jmp    1030 <scs_cos_rz@plt>

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

LLVM IR (-O2):
define double @cos_rz(double %0) {
%2 = tail call double @scs_cos_rz(double %0)
ret double %2
}
/* Variables and functions */
int HibernateTamperStatusGet();
bool HibernateTamperExtOscValid(void) {
  if (HibernateTamperStatusGet() & (0x00000008 | 0x00000004)) {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<HibernateTamperExtOscValid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <HibernateTamperStatusGet@plt>
and    $0xc,%eax
cmp    $0x0,%eax
je     1137 <HibernateTamperExtOscValid+0x27>
movl   $0x1,-0x4(%rbp)
jmp    113e <HibernateTamperExtOscValid+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateTamperExtOscValid>:
push   %rax
xor    %eax,%eax
call   1030 <HibernateTamperStatusGet@plt>
xor    %ecx,%ecx
test   $0xc,%al
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @HibernateTamperExtOscValid() {
%1 = alloca i32
%2 = call i32 (...) @HibernateTamperStatusGet()
%3 = and i32 %2, 12
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 1, i32* %1
br label %7
6: ; preds = %0
store i32 0, i32* %1
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @HibernateTamperExtOscValid() {
%1 = tail call i32 (...) @HibernateTamperStatusGet()
%2 = and i32 %1, 12
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int hemmelig_funksjon(int a, int b) { return 50; }


x86 assembly (clang, -O0):
<hemmelig_funksjon>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x32,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @hemmelig_funksjon(i32 %0, i32 %1) {
ret i32 50
}
/* Variables and functions */
int /*<<< orphan*/ abs(int);
void ignoredReturnValue_abs(int i) {
  abs(i);
  abs(-100);
}


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

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

LLVM IR (-O0):
define void @ignoredReturnValue_abs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @abs(i32 %3)
%5 = call i32 @abs(i32 -100)
ret void
}

LLVM IR (-O2):
define void @ignoredReturnValue_abs(i32 %0) {
ret void
}
void _pending_rb_irq_sem(void) { return; }


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

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

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

LLVM IR (-O2):
define void @_pending_rb_irq_sem() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
FILE *pdb_open_file(char *file) {
  FILE *fptr = fopen(file, "r");
  return fptr;
}


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define noalias i32* @pdb_open_file(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ ExtSelect(char *, char *, int /*<<< orphan*/);
void ExttMonthHitSelect(void) {
  ExtSelect(
      "tMonthHit",
      "tMonthHit.uMonth,tMonthHit.cLabel,tMonthHit.uOwner,tMonthHit.uCreatedBy,"
      "tMonthHit.uCreatedDate,tMonthHit.uModBy,tMonthHit.uModDate",
      0);
}


x86 assembly (clang, -O0):
<ExttMonthHitSelect>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee8(%rip),%rsi
xor    %edx,%edx
call   1030 <ExtSelect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExttMonthHitSelect>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
xor    %edx,%edx
jmp    1030 <ExtSelect@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"tMonthHit\00"
@.str.1 = [131 x i8] c"tMonthHit.uMonth,tMonthHit.cLabel,tMonthHit.uOwner,tMonthHit.uCreatedBy,tMonthHit.uCreatedDate,tMonthHit.uModBy,tMonthHit.uModDate\00"
define void @ExttMonthHitSelect() {
%1 = call i32 @ExtSelect(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"tMonthHit\00"
@.str.1 = [131 x i8] c"tMonthHit.uMonth,tMonthHit.cLabel,tMonthHit.uOwner,tMonthHit.uCreatedBy,tMonthHit.uCreatedDate,tMonthHit.uModBy,tMonthHit.uModDate\00"
define void @ExttMonthHitSelect() {
%1 = tail call i32 @ExtSelect(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ UFILE;

/* Variables and functions */
int /*<<< orphan*/ u_fprintf(int /*<<< orphan*/ *, char *);
void print_trailer(UFILE *out) { u_fprintf(out, "</body>\n</xhtml>\n"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"</body>\0A</xhtml>\0A\00"
define void @print_trailer(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @u_fprintf(i32* %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"</body>\0A</xhtml>\0A\00"
define void @print_trailer(i32* %0) {
%2 = tail call i32 @u_fprintf(i32* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cm_error_log_warning(char const *, char const *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void cm_error_log_critical(const char *function, const char *message) {
  cm_error_log_warning(function, message);
  exit(0);
}


x86 assembly (clang, -O0):
<cm_error_log_critical>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <cm_error_log_warning@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<cm_error_log_critical>:
push   %rax
call   1030 <cm_error_log_warning@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @cm_error_log_critical(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @cm_error_log_warning(i8* %5, i8* %6)
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @cm_error_log_critical(i8* %0, i8* %1) {
%3 = tail call i32 @cm_error_log_warning(i8* %0, i8* %1)
%4 = tail call i32 @exit(i32 0)
unreachable
}
unsigned int triplethash_hashf(int a, int b, int c) {
  return ((unsigned int)(a * 7907 + b * 86028157 + c * 7919));
}


x86 assembly (clang, -O0):
<triplethash_hashf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
imul   $0x1ee3,-0x4(%rbp),%eax
imul   $0x520af7d,-0x8(%rbp),%ecx
add    %ecx,%eax
imul   $0x1eef,-0xc(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<triplethash_hashf>:
imul   $0x1ee3,%edi,%eax
imul   $0x520af7d,%esi,%ecx
add    %eax,%ecx
imul   $0x1eef,%edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @triplethash_hashf(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = mul nsw i32 %7, 7907
%9 = load i32, i32* %5
%10 = mul nsw i32 %9, 86028157
%11 = add nsw i32 %8, %10
%12 = load i32, i32* %6
%13 = mul nsw i32 %12, 7919
%14 = add nsw i32 %11, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @triplethash_hashf(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %0, 7907
%5 = mul nsw i32 %1, 86028157
%6 = add nsw i32 %5, %4
%7 = mul nsw i32 %2, 7919
%8 = add nsw i32 %6, %7
ret i32 %8
}
int arch_pointersize() { return 8; }


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

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

LLVM IR (-O0):
define i32 @arch_pointersize() {
ret i32 8
}

LLVM IR (-O2):
define i32 @arch_pointersize() {
ret i32 8
}
unsigned int sum(unsigned int begin, unsigned int end) {
  if (begin == end) {
    return begin;
  }
  unsigned int mid = begin + (end - begin) >> 1;
  unsigned int s1 = sum(begin, mid);
  unsigned int s2 = sum(mid + 1, end);
  unsigned int sum = s1 + s2;
  return sum;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1135 <sum+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <sum+0x64>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
add    %ecx,%eax
shr    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <sum@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <sum@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
cmp    %esi,%edi
jne    111f <sum+0xf>
mov    %edi,%r14d
jmp    1135 <sum+0x25>
mov    %esi,%ebp
mov    %esi,%ebx
shr    %ebx
lea    0x1(%rbx),%r14d
mov    %ebx,%esi
call   1030 <sum@plt>
cmp    %ebp,%r14d
jne    113d <sum+0x2d>
add    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %r14d,%edi
mov    %ebx,%esi
call   1030 <sum@plt>
nopw   0x0(%rax,%rax,1)
jmp    1150 <sum+0x40>

LLVM IR (-O0):
define i32 @sum(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = load i32, i32* %4
store i32 %14, i32* %3
br label %33
15: ; preds = %2
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = load i32, i32* %4
%19 = sub i32 %17, %18
%20 = add i32 %16, %19
%21 = lshr i32 %20, 1
store i32 %21, i32* %6
%22 = load i32, i32* %4
%23 = load i32, i32* %6
%24 = call i32 @sum(i32 %22, i32 %23)
store i32 %24, i32* %7
%25 = load i32, i32* %6
%26 = add i32 %25, 1
%27 = load i32, i32* %5
%28 = call i32 @sum(i32 %26, i32 %27)
store i32 %28, i32* %8
%29 = load i32, i32* %7
%30 = load i32, i32* %8
%31 = add i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %9
store i32 %32, i32* %3
br label %33
33: ; preds = %15, %13
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
define i32 @sum(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = lshr i32 %1, 1
%6 = add nuw i32 %5, 1
%7 = icmp eq i32 %6, %1
%8 = tail call i32 @sum(i32 %0, i32 %5)
br i1 %7, label %12, label %9
9: ; preds = %4
%10 = tail call i32 @sum(i32 %6, i32 %5)
br label %11
11: ; preds = %11, %9
br label %11
12: ; preds = %4, %2
%13 = phi i32 [ 0, %2 ], [ %8, %4 ]
%14 = phi i32 [ %0, %2 ], [ %6, %4 ]
%15 = add i32 %14, %13
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void fldz() {
  db(0xD9);
  db(0xEE);
}


x86 assembly (clang, -O0):
<fldz>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xee,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fldz>:
push   %rax
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xee,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @fldz() {
%1 = call i32 @db(i32 217)
%2 = call i32 @db(i32 238)
ret void
}

LLVM IR (-O2):
define void @fldz() {
%1 = tail call i32 @db(i32 217)
%2 = tail call i32 @db(i32 238)
ret void
}
int main() {
  double *plist = (double[]){1, 2, 3};
  double list[] = {1, 2, 3};
  printf("sizeof(plist)/(sizeof(double)+0.0)"
         ": %g\n",
         sizeof(plist) / (sizeof(double) + 0.0));
  ;
  printf("sizeof(list)/(sizeof(double)+0.0)"
         ": %g\n",
         sizeof(list) / (sizeof(double) + 0.0));
  ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x2f09(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2f06(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2f03(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec5(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xebf(%rip),%rdi
movsd  0xe97(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
movsd  0xe79(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
movsd  0xee0(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
movsd  0xed2(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@constinit = private global [3 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00]
@__const.main.list = [3 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00]
@.str = [40 x i8] c"sizeof(plist)/(sizeof(double)+0.0): %g\0A\00"
@.str.1 = [39 x i8] c"sizeof(list)/(sizeof(double)+0.0): %g\0A\00"
define i32 @main() {
%1 = alloca double*
%2 = alloca [3 x double]
%3 = alloca [3 x double]
%4 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%5 = bitcast [3 x double]* %2 to i8*
%6 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
store double* %6, double** %1
%7 = bitcast [3 x double]* %3 to i8*
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), double 1.000000e+00)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), double 3.000000e+00)
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"sizeof(plist)/(sizeof(double)+0.0): %g\0A\00"
@.str.1 = [39 x i8] c"sizeof(list)/(sizeof(double)+0.0): %g\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), double 1.000000e+00)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), double 3.000000e+00)
ret i32 0
}
void android_redrawOpenglesWindow(void) {}


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

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

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

LLVM IR (-O2):
define void @android_redrawOpenglesWindow() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
scalar_t__ read(int /*<<< orphan*/, int /*<<< orphan*/ *, int);
int main(void) {
  int64_t l;
  while (read(0, &l, 8))
    printf("%lld\n", l);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
lea    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1040 <read@plt>
cmp    $0x0,%rax
je     116d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0x4(%rsp),%rsi
xor    %edi,%edi
mov    $0x8,%edx
call   1040 <read@plt>
test   %rax,%rax
je     1180 <main+0x50>
lea    0xeaf(%rip),%r14
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    0x4(%rsp),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1040 <read@plt>
test   %rax,%rax
jne    1160 <main+0x30>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %6, %0
%4 = call i64 @read(i32 0, i32* %2, i32 8)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %3
9: ; preds = %3
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @read(i32 0, i32* %1, i32 8)
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %0, %5
%6 = load i32, i32* %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i64 @read(i32 0, i32* %1, i32 8)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %0
%11 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
unsigned int REG_SPI_BASE(unsigned int);
__attribute__((always_)) __attribute__((flatten)) unsigned int
SPI_SLAVE1(unsigned int i) {
  return (REG_SPI_BASE(i) + 0x34);
}


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

x86 assembly (clang, -O2):
<SPI_SLAVE1>:
push   %rax
call   1030 <REG_SPI_BASE@plt>
add    $0x34,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @SPI_SLAVE1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @REG_SPI_BASE(i32 %3)
%5 = add i32 %4, 52
ret i32 %5
}

LLVM IR (-O2):
define i32 @SPI_SLAVE1(i32 %0) {
%2 = tail call i32 @REG_SPI_BASE(i32 %0)
%3 = add i32 %2, 52
ret i32 %3
}
int xyzzy1(int x) { return x; }


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

x86 assembly (clang, -O2):
<xyzzy1>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @xyzzy1(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
unsigned long ___copy_to_user(void *, void const *, unsigned long);
unsigned long copy_to_user_fixup(void *, void const *, unsigned long);
unsigned long copy_to_user(void *to, const void *from, unsigned long size) {
  unsigned long ret = ___copy_to_user(to, from, size);
  if (ret)
    ret = copy_to_user_fixup(to, from, size);
  return ret;
}


x86 assembly (clang, -O0):
<copy_to_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <___copy_to_user@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1169 <copy_to_user+0x49>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <copy_to_user_fixup@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_to_user>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1040 <___copy_to_user@plt>
test   %rax,%rax
je     114b <copy_to_user+0x2b>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <copy_to_user_fixup@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @copy_to_user(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i64 @___copy_to_user(i8* %8, i8* %9, i64 %10)
store i64 %11, i64* %7
%12 = load i64, i64* %7
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %3
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = load i64, i64* %6
%18 = call i64 @copy_to_user_fixup(i8* %15, i8* %16, i64 %17)
store i64 %18, i64* %7
br label %19
19: ; preds = %14, %3
%20 = load i64, i64* %7
ret i64 %20
}

LLVM IR (-O2):
define i64 @copy_to_user(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @___copy_to_user(i8* %0, i8* %1, i64 %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i64 @copy_to_user_fixup(i8* %0, i8* %1, i64 %2)
br label %8
8: ; preds = %6, %3
%9 = phi i64 [ %7, %6 ], [ 0, %3 ]
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xe2() {
  Assert_real((isascii(226) == 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_isascii.c",
              1135, ("isascii should be 0 for 0xe2"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xe2>:
push   %rax
mov    $0xe2,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x46f,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xe2\00"
define void @t_isascii_0xe2() {
%1 = call i64 @isascii(i32 226)
%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 1135, i8* getelementptr inbounds ([29 x i8], [29 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xe2\00"
define void @t_isascii_0xe2() {
%1 = tail call i64 @isascii(i32 226)
%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 1135, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void RTRVImeth() {}


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

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

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

LLVM IR (-O2):
define void @RTRVImeth() {
ret void
}
/* Variables and functions */
size_t size_t_hash(const void *v) { return *(const size_t *)v; }


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

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

LLVM IR (-O0):
define i64 @size_t_hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @size_t_hash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, float);
int main(void) {
  int int_num = 0;
  float float_num = 0;
  printf("num: %d,%f\n", int_num, float_num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%esi
movss  -0xc(%rbp),%xmm0
lea    0xec3(%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
xorps  %xmm0,%xmm0
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"num: %d,%f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 0, float 0.000000e+00)
ret i32 0
}
/* Variables and functions */
double floor(double);
int /*<<< orphan*/ printf(char *, double);
int main(int argc, char *argv[]) {
  printf("\n lam tron cua so 5.4325 la %f", floor(5.4325));
  printf("\n lam tron cua so 5.6325 la %f", floor(5.6325));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xed2(%rip),%xmm0
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
movsd  0xebe(%rip),%xmm0
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
movsd  0xecc(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"\0A lam tron cua so 5.4325 la %f\00"
@.str.1 = [31 x i8] c"\0A lam tron cua so 5.6325 la %f\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call double @llvm.floor.f64(double 5.432500e+00)
%7 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double %6)
%8 = call double @llvm.floor.f64(double 5.632500e+00)
%9 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"\0A lam tron cua so 5.4325 la %f\00"
@.str.1 = [31 x i8] c"\0A lam tron cua so 5.6325 la %f\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double 5.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), double 5.000000e+00)
ret i32 0
}
/* Type definitions */
struct stack_st_OPENSSL_CSTRING {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
scalar_t__ OPENSSL_sk_delete_ptr(int /*<<< orphan*/ *, void const *);
const char *sk_OPENSSL_CSTRING_delete_ptr(struct stack_st_OPENSSL_CSTRING *sk,
                                          const char *ptr) {
  return (const char *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk,
                                             (const void *)ptr);
}


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

x86 assembly (clang, -O2):
<sk_OPENSSL_CSTRING_delete_ptr>:
jmp    1030 <OPENSSL_sk_delete_ptr@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_CSTRING = type { i32 }
define i8* @sk_OPENSSL_CSTRING_delete_ptr(%struct.stack_st_OPENSSL_CSTRING* %0, i8* %1) {
%3 = alloca %struct.stack_st_OPENSSL_CSTRING*
%4 = alloca i8*
store %struct.stack_st_OPENSSL_CSTRING* %0, %struct.stack_st_OPENSSL_CSTRING** %3
store i8* %1, i8** %4
%5 = load %struct.stack_st_OPENSSL_CSTRING*, %struct.stack_st_OPENSSL_CSTRING** %3
%6 = bitcast %struct.stack_st_OPENSSL_CSTRING* %5 to i32*
%7 = load i8*, i8** %4
%8 = call i64 @OPENSSL_sk_delete_ptr(i32* %6, i8* %7)
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_CSTRING = type { i32 }
define i8* @sk_OPENSSL_CSTRING_delete_ptr(%struct.stack_st_OPENSSL_CSTRING* %0, i8* %1) {
%3 = getelementptr %struct.stack_st_OPENSSL_CSTRING, %struct.stack_st_OPENSSL_CSTRING* %0, i64 0, i32 0
%4 = tail call i64 @OPENSSL_sk_delete_ptr(i32* %3, i8* %1)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
scalar_t__ isspace(unsigned char);
char *iq15_str_skip_spaces(char *str) {
  while (isspace((unsigned char)*str))
    str++;
  return str;
}


x86 assembly (clang, -O0):
<iq15_str_skip_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <iq15_str_skip_spaces+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <iq15_str_skip_spaces+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iq15_str_skip_spaces>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <iq15_str_skip_spaces+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @iq15_str_skip_spaces(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @isspace(i8 zeroext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @iq15_str_skip_spaces(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 zeroext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ tcflag_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void print_input_flag(tcflag_t flag) { printf("input flag %p\n", flag); }


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

x86 assembly (clang, -O2):
<print_input_flag>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"input flag %p\0A\00"
define void @print_input_flag(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
double mma7660fc_convert(uint8_t value) {
  double value_f = 0;
  if ((value & 0x60) > 0) {
    value = ((~value + 1) & 0x1F);
    value_f = -((double)value);
  } else {
    value_f = ((double)value);
  }
  value_f *= 0.047;
  return value_f;
}


x86 assembly (clang, -O0):
<mma7660fc_convert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x60,%eax
cmp    $0x0,%eax
jle    1153 <mma7660fc_convert+0x53>
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
add    $0x1,%eax
and    $0x1f,%eax
mov    %eax,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    115d <mma7660fc_convert+0x5d>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe9b(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mma7660fc_convert>:
test   $0x60,%dil
je     1120 <mma7660fc_convert+0x20>
neg    %edi
and    $0x1f,%edi
cvtsi2sd %edi,%xmm0
xorpd  0xee9(%rip),%xmm0
mulsd  0xef1(%rip),%xmm0
ret
cvtsi2sd %edi,%xmm0
mulsd  0xee4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @mma7660fc_convert(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
store double 0.000000e+00, double* %3
%4 = load i32, i32* %2
%5 = and i32 %4, 96
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i32, i32* %2
%9 = xor i32 %8, -1
%10 = add nsw i32 %9, 1
%11 = and i32 %10, 31
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = sitofp i32 %12 to double
%14 = fneg double %13
store double %14, double* %3
br label %18
15: ; preds = %1
%16 = load i32, i32* %2
%17 = sitofp i32 %16 to double
store double %17, double* %3
br label %18
18: ; preds = %15, %7
%19 = load double, double* %3
%20 = fmul double %19, 4.700000e-02
store double %20, double* %3
%21 = load double, double* %3
ret double %21
}

LLVM IR (-O2):
define double @mma7660fc_convert(i32 %0) {
%2 = and i32 %0, 96
%3 = icmp eq i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = sub i32 0, %0
%6 = and i32 %5, 31
%7 = sitofp i32 %6 to double
%8 = fneg double %7
br label %11
9: ; preds = %1
%10 = sitofp i32 %0 to double
br label %11
11: ; preds = %9, %4
%12 = phi double [ %8, %4 ], [ %10, %9 ]
%13 = fmul double %12, 4.700000e-02
ret double %13
}
void RasterAutoUnderFlowEnable(unsigned int baseAddr) {
  (*((volatile unsigned int *)(baseAddr + (0x4)))) |= (0x00000002u);
}


x86 assembly (clang, -O0):
<RasterAutoUnderFlowEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     $0x2,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RasterAutoUnderFlowEnable>:
add    $0x4,%edi
orl    $0x2,(%rdi)
ret

LLVM IR (-O0):
define void @RasterAutoUnderFlowEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 4
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, 2
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @RasterAutoUnderFlowEnable(i32 %0) {
%2 = add i32 %0, 4
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = or i32 %5, 2
store volatile i32 %6, i32* %4
ret void
}
int putchar(int character) { return character; }


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

x86 assembly (clang, -O2):
<putchar>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @putchar(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ udelay(int);
void mdelay(unsigned msec) {
  while (msec-- > 0) {
    udelay(1000);
  }
}


x86 assembly (clang, -O0):
<mdelay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jbe    113e <mdelay+0x2e>
mov    $0x3e8,%edi
call   1030 <udelay@plt>
jmp    111b <mdelay+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdelay>:
push   %rbx
test   %edi,%edi
je     112f <mdelay+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x3e8,%edi
call   1030 <udelay@plt>
add    $0xffffffff,%ebx
jne    1120 <mdelay+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @mdelay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add i32 %4, -1
store i32 %5, i32* %2
%6 = icmp ugt i32 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 @udelay(i32 1000)
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @mdelay(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add i32 %4, -1
%6 = tail call i32 @udelay(i32 1000)
%7 = icmp eq i32 %5, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
void gdk_drag_motion() {}


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

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

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

LLVM IR (-O2):
define void @gdk_drag_motion() {
ret void
}
/* Variables and functions */
int socketcall(int (*)(int, int), int, int, int /*<<< orphan*/,
               int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int listen(int fd, int backlog) {
  return socketcall(listen, fd, backlog, 0, 0, 0, 0);
}


x86 assembly (clang, -O0):
<listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    0x2eb5(%rip),%rdi
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <socketcall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<listen>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
movl   $0x0,(%rsp)
mov    0x2ebd(%rip),%rdi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <socketcall@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @listen(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 @socketcall(i32 (i32, i32)* @listen, i32 %5, i32 %6, i32 0, i32 0, i32 0, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @listen(i32 %0, i32 %1) {
%3 = tail call i32 @socketcall(i32 (i32, i32)* @listen, i32 %0, i32 %1, i32 0, i32 0, i32 0, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sigint(int signo) { printf("Caught SIGINT\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Caught SIGINT\0A\00"
define void @sigint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"Caught SIGINT\00"
define void @sigint(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int pigpio_command(int, int, int /*<<< orphan*/, int /*<<< orphan*/, int);
int wave_get_pulses(int pi) { return pigpio_command(pi, 35, 0, 0, 1); }


x86 assembly (clang, -O0):
<wave_get_pulses>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x23,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    %ecx,%edx
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wave_get_pulses>:
mov    $0x23,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

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

LLVM IR (-O2):
define i32 @wave_get_pulses(i32 %0) {
%2 = tail call i32 @pigpio_command(i32 %0, i32 35, i32 0, i32 0, i32 1)
ret i32 %2
}
/* Variables and functions */
int fifo_write(char *);
int fifo_pause() { return fifo_write("pause\n"); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"pause\0A\00"
define i32 @fifo_pause() {
%1 = tail call i32 @fifo_write(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int is_this_machine_little_endian() {
  int x = 0x87654321;
  char *t = (char *)&x;
  return (t[0] == (char)0x21);
}


x86 assembly (clang, -O0):
<is_this_machine_little_endian>:
push   %rbp
mov    %rsp,%rbp
movl   $0x87654321,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x21,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @is_this_machine_little_endian() {
%1 = alloca i32
%2 = alloca i8*
store i32 -2023406815, i32* %1
%3 = bitcast i32* %1 to i8*
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 33
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_this_machine_little_endian() {
ret i32 1
}