xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ err(int, char *, size_t);
void *realloc(void *, size_t);
void *xrealloc(void *ptr, size_t size) {
  void *ret = realloc(ptr, size);
  if (ret == NULL)
    err(1, "couldn't realloc %d bytes\n", size);
  return ret;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1161 <xrealloc+0x41>
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
lea    0xea4(%rip),%rsi
call   1030 <err@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1148 <xrealloc+0x28>
lea    0xec5(%rip),%rsi
mov    $0x1,%edi
mov    %r14,%rdx
call   1030 <err@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [27 x i8] c"couldn't realloc %d bytes\0A\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i64, i64* %4
%13 = call i32 @err(i32 1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %12)
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [27 x i8] c"couldn't realloc %d bytes\0A\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int cpFile(char const *, char const *);
int rmFile(char const *);
int mvFile(const char *srcpath, const char *dstpath) {
  int error;
  if ((error = cpFile(srcpath, dstpath)) != 0)
    return error;
  if ((error = rmFile(srcpath)) != 0)
    return error;
  return 0;
}


x86 assembly (clang, -O0):
<mvFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <cpFile@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     1154 <mvFile+0x34>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117b <mvFile+0x5b>
mov    -0x10(%rbp),%rdi
call   1030 <rmFile@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     1174 <mvFile+0x54>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117b <mvFile+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvFile>:
push   %rbx
mov    %rdi,%rbx
call   1040 <cpFile@plt>
test   %eax,%eax
je     112f <mvFile+0xf>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <rmFile@plt>

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

LLVM IR (-O2):
define i32 @mvFile(i8* %0, i8* %1) {
%3 = tail call i32 @cpFile(i8* %0, i8* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @rmFile(i8* %0)
br label %7
7: ; preds = %5, %2
%8 = phi i32 [ %3, %2 ], [ %6, %5 ]
ret i32 %8
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int initialize_multprec_solution(int k) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc4c(513, &k, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<initialize_multprec_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x201,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_multprec_solution>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x201,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @initialize_multprec_solution(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %4
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 513, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @initialize_multprec_solution(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 513, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t packer_uint32_hton(uint32_t value) {
  return ((value >> 24) & 0x000000FF) | ((value >> 8) & 0x0000FF00) |
         ((value << 8) & 0x00FF0000) | ((value << 24) & 0xFF000000);
}


x86 assembly (clang, -O0):
<packer_uint32_hton>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x18,%ecx
and    $0xff000000,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @packer_uint32_hton(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 24
%5 = and i32 %4, 255
%6 = load i32, i32* %2
%7 = ashr i32 %6, 8
%8 = and i32 %7, 65280
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = shl i32 %10, 8
%12 = and i32 %11, 16711680
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = shl i32 %14, 24
%16 = and i32 %15, -16777216
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @packer_uint32_hton(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ LCD_Write_Byte(int, int);
int /*<<< orphan*/ usleep(int);
void LCD_Clear() {
  LCD_Write_Byte(0x00, 0x01);
  usleep(1500);
}


x86 assembly (clang, -O0):
<LCD_Clear>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <LCD_Write_Byte@plt>
mov    $0x5dc,%edi
call   1040 <usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_Clear>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <LCD_Write_Byte@plt>
mov    $0x5dc,%edi
pop    %rax
jmp    1040 <usleep@plt>

LLVM IR (-O0):
define void @LCD_Clear() {
%1 = call i32 @LCD_Write_Byte(i32 0, i32 1)
%2 = call i32 @usleep(i32 1500)
ret void
}

LLVM IR (-O2):
define void @LCD_Clear() {
%1 = tail call i32 @LCD_Write_Byte(i32 0, i32 1)
%2 = tail call i32 @usleep(i32 1500)
ret void
}
/* Variables and functions */
double AT_histoOld_log_bin_width(long const, double const *);
double exp(scalar_t__);
scalar_t__ log(double const);
double AT_histoOld_lower_bin_limit(const long number_of_bins,
                                   const double bin_centers[],
                                   const long bin_no) {
  return (exp(log(bin_centers[bin_no]) -
              0.5 * AT_histoOld_log_bin_width(number_of_bins, bin_centers)));
}


x86 assembly (clang, -O0):
<AT_histoOld_lower_bin_limit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <log@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <AT_histoOld_log_bin_width@plt>
movsd  -0x20(%rbp),%xmm1
movsd  0xe86(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <exp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AT_histoOld_lower_bin_limit>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movsd  (%rsi,%rdx,8),%xmm0
call   1040 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <AT_histoOld_log_bin_width@plt>
mulsd  0xe9c(%rip),%xmm0
addsd  (%rsp),%xmm0
cvttsd2si %xmm0,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @AT_histoOld_lower_bin_limit(i64 %0, double* %1, i64 %2) {
%4 = alloca i64
%5 = alloca double*
%6 = alloca i64
store i64 %0, i64* %4
store double* %1, double** %5
store i64 %2, i64* %6
%7 = load double*, double** %5
%8 = load i64, i64* %6
%9 = getelementptr inbounds double, double* %7, i64 %8
%10 = load double, double* %9
%11 = call i64 @log(double %10)
%12 = sitofp i64 %11 to double
%13 = load i64, i64* %4
%14 = load double*, double** %5
%15 = call double @AT_histoOld_log_bin_width(i64 %13, double* %14)
%16 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %15, double %12)
%17 = fptosi double %16 to i64
%18 = call double @exp(i64 %17)
ret double %18
}

LLVM IR (-O2):
define double @AT_histoOld_lower_bin_limit(i64 %0, double* %1, i64 %2) {
%4 = getelementptr inbounds double, double* %1, i64 %2
%5 = load double, double* %4
%6 = tail call i64 @log(double %5)
%7 = sitofp i64 %6 to double
%8 = tail call double @AT_histoOld_log_bin_width(i64 %0, double* %1)
%9 = tail call double @llvm.fmuladd.f64(double %8, double -5.000000e-01, double %7)
%10 = fptosi double %9 to i64
%11 = tail call double @exp(i64 %10)
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void robPrintMessage(int num) {
  int i = 0;
  printf("Matthew Garand and Matthew Farr");
  for (i; i < num; i++) {
    printf("really ");
  }
  printf("loves robots!\n");
  return;
}


x86 assembly (clang, -O0):
<robPrintMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1154 <robPrintMessage+0x44>
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112e <robPrintMessage+0x1e>
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<robPrintMessage>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xed3(%rip),%rdi
call   1040 <printf@plt>
test   %ebx,%ebx
jle    114d <robPrintMessage+0x2d>
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebx
jne    1140 <robPrintMessage+0x20>
lea    0xed4(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Matthew Garand and Matthew Farr\00"
@.str.1 = [8 x i8] c"really \00"
@.str.2 = [15 x i8] c"loves robots!\0A\00"
define void @robPrintMessage(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %3
br label %6
6: ; preds = %12, %1
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %6
15: ; preds = %6
%16 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Matthew Garand and Matthew Farr\00"
@.str.1 = [8 x i8] c"really \00"
@str = [14 x i8] c"loves robots!\00"
define void @robPrintMessage(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
%10 = 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 /*<<< orphan*/ NONULL(char const *);
int strcmp(int /*<<< orphan*/, int /*<<< orphan*/);
int safe_strcmp(const char *a, const char *b) {
  return strcmp(NONULL(a), NONULL(b));
}


x86 assembly (clang, -O0):
<safe_strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <NONULL@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <NONULL@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <strcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_strcmp>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <NONULL@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <NONULL@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <strcmp@plt>

LLVM IR (-O0):
define i32 @safe_strcmp(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 = call i32 @NONULL(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @NONULL(i8* %7)
%9 = call i32 @strcmp(i32 %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @safe_strcmp(i8* %0, i8* %1) {
%3 = tail call i32 @NONULL(i8* %0)
%4 = tail call i32 @NONULL(i8* %1)
%5 = tail call i32 @strcmp(i32 %3, i32 %4)
ret i32 %5
}
void hm_Init(void) { return; }


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

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

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

LLVM IR (-O2):
define void @hm_Init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dump_exit(unsigned long);
int /*<<< orphan*/ printf(char *);
void panic_notify(unsigned long code) {
  printf("Dump failed");
  dump_exit(code);
}


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

x86 assembly (clang, -O2):
<panic_notify>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <dump_exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Dump failed\00"
define void @panic_notify(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i64, i64* %2
%5 = call i32 @dump_exit(i64 %4)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Dump failed\00"
define void @panic_notify(i64 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @dump_exit(i64 %0)
ret void
}
int CheckMagic(const char type[4]) {
  if ((type[0] == 'I' || type[0] == 'P') && type[1] == 'W' && type[2] == 'A' &&
      type[3] == 'D') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<CheckMagic>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x49,%eax
je     1128 <CheckMagic+0x28>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x50,%eax
jne    1167 <CheckMagic+0x67>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x57,%eax
jne    1167 <CheckMagic+0x67>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x41,%eax
jne    1167 <CheckMagic+0x67>
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x44,%eax
jne    1167 <CheckMagic+0x67>
movl   $0x1,-0x4(%rbp)
jmp    116e <CheckMagic+0x6e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckMagic>:
mov    (%rdi),%al
cmp    $0x50,%al
je     110a <CheckMagic+0xa>
cmp    $0x49,%al
jne    1121 <CheckMagic+0x21>
cmpb   $0x57,0x1(%rdi)
jne    1121 <CheckMagic+0x21>
cmpb   $0x41,0x2(%rdi)
jne    1121 <CheckMagic+0x21>
mov    $0x1,%eax
cmpb   $0x44,0x3(%rdi)
je     1123 <CheckMagic+0x23>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @CheckMagic(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 73
br i1 %8, label %15, label %9
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 80
br i1 %14, label %15, label %34
15: ; preds = %9, %1
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 87
br i1 %20, label %21, label %34
21: ; preds = %15
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 2
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 65
br i1 %26, label %27, label %34
27: ; preds = %21
%28 = load i8*, i8** %3
%29 = getelementptr inbounds i8, i8* %28, i64 3
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 68
br i1 %32, label %33, label %34
33: ; preds = %27
store i32 1, i32* %2
br label %35
34: ; preds = %27, %21, %15, %9
store i32 0, i32* %2
br label %35
35: ; preds = %34, %33
%36 = load i32, i32* %2
ret i32 %36
}

LLVM IR (-O2):
define i32 @CheckMagic(i8* nocapture %0) {
%2 = load i8, i8* %0
switch i8 %2, label %15 [
i8 73, label %3
i8 80, label %3
]
3: ; preds = %1, %1
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 87
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %0, i64 2
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 65
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = getelementptr inbounds i8, i8* %0, i64 3
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 68
br i1 %14, label %16, label %15
15: ; preds = %1, %11, %7, %3
br label %16
16: ; preds = %11, %15
%17 = phi i32 [ 0, %15 ], [ 1, %11 ]
ret i32 %17
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ fread(void *, int, int, int /*<<< orphan*/ *);
void read_bytes(FILE *file, void *buffer, int size) {
  int count = (int)fread(buffer, 1, size, file);
  assert(count == size);
  ((void)(count));
}


x86 assembly (clang, -O0):
<read_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_bytes>:
push   %rbx
mov    %edx,%ebx
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
call   1030 <fread@plt>
xor    %edi,%edi
cmp    %ebx,%eax
sete   %dil
pop    %rbx
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @read_bytes(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = load i32*, i32** %4
%11 = call i64 @fread(i8* %8, i32 1, i32 %9, i32* %10)
%12 = trunc i64 %11 to i32
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = load i32, i32* %6
%15 = icmp eq i32 %13, %14
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load i32, i32* %7
ret void
}

LLVM IR (-O2):
define void @read_bytes(i32* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i64 @fread(i8* %1, i32 1, i32 %2, i32* %0)
%5 = trunc i64 %4 to i32
%6 = icmp eq i32 %5, %2
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret void
}
void printgraph(char ch) {}


x86 assembly (clang, -O0):
<printgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @printgraph(i8 signext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _OS_PUSH_Y();
int /*<<< orphan*/ _OS_SET_FSR_CUR_TASK();
int /*<<< orphan*/ _OS_SET_PC();
void _OS_JumpToTask(void) {
  _OS_PUSH_Y();
  _OS_SET_FSR_CUR_TASK();
  _OS_SET_PC();
}


x86 assembly (clang, -O0):
<_OS_JumpToTask>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <_OS_PUSH_Y@plt>
mov    $0x0,%al
call   1040 <_OS_SET_FSR_CUR_TASK@plt>
mov    $0x0,%al
call   1050 <_OS_SET_PC@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_OS_JumpToTask>:
push   %rax
xor    %eax,%eax
call   1030 <_OS_PUSH_Y@plt>
xor    %eax,%eax
call   1040 <_OS_SET_FSR_CUR_TASK@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <_OS_SET_PC@plt>

LLVM IR (-O0):
define void @_OS_JumpToTask() {
%1 = call i32 (...) @_OS_PUSH_Y()
%2 = call i32 (...) @_OS_SET_FSR_CUR_TASK()
%3 = call i32 (...) @_OS_SET_PC()
ret void
}

LLVM IR (-O2):
define void @_OS_JumpToTask() {
%1 = tail call i32 (...) @_OS_PUSH_Y()
%2 = tail call i32 (...) @_OS_SET_FSR_CUR_TASK()
%3 = tail call i32 (...) @_OS_SET_PC()
ret void
}
int mlx5dr_table_set_miss_action(struct mlx5dr_table *tbl,
                                 struct mlx5dr_action *action) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.mlx5dr_table = type opaque
%struct.mlx5dr_action = type opaque
define i32 @mlx5dr_table_set_miss_action(%struct.mlx5dr_table* %0, %struct.mlx5dr_action* %1) {
%3 = alloca %struct.mlx5dr_table*
%4 = alloca %struct.mlx5dr_action*
store %struct.mlx5dr_table* %0, %struct.mlx5dr_table** %3
store %struct.mlx5dr_action* %1, %struct.mlx5dr_action** %4
ret i32 0
}

LLVM IR (-O2):
%struct.mlx5dr_table = type opaque
%struct.mlx5dr_action = type opaque
define i32 @mlx5dr_table_set_miss_action(%struct.mlx5dr_table* nocapture readnone %0, %struct.mlx5dr_action* nocapture readnone %1) {
ret i32 0
}
int dmap_version(void) { return (1 * 1000000 + 2 * 1000 + 1); }


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

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

LLVM IR (-O0):
define i32 @dmap_version() {
ret i32 1002001
}

LLVM IR (-O2):
define i32 @dmap_version() {
ret i32 1002001
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ little32(int /*<<< orphan*/);
uint32_t little2host32(uint32_t n) { return little32(n); }


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

x86 assembly (clang, -O2):
<little2host32>:
jmp    1030 <little32@plt>

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

LLVM IR (-O2):
define i32 @little2host32(i32 %0) {
%2 = tail call i32 @little32(i32 %0)
ret i32 %2
}
/* Variables and functions */
char *notImplemented();
char *serverSave(char *unused1, char *unused2, char *unused3) {
  (void)(unused1);
  (void)(unused2);
  (void)(unused3);
  return notImplemented();
}


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

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

LLVM IR (-O0):
define i8* @serverSave(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i8* (...) @notImplemented()
ret i8* %10
}

LLVM IR (-O2):
define i8* @serverSave(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i8* (...) @notImplemented()
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_hex16(int, unsigned short);
void print_notice_hex16(unsigned short value) { __console_tx_hex16(5, value); }


x86 assembly (clang, -O0):
<print_notice_hex16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x5,%edi
movzwl -0x2(%rbp),%esi
call   1030 <__console_tx_hex16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_notice_hex16>:
mov    %edi,%esi
mov    $0x5,%edi
jmp    1030 <__console_tx_hex16@plt>

LLVM IR (-O0):
define void @print_notice_hex16(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @__console_tx_hex16(i32 5, i16 zeroext %3)
ret void
}

LLVM IR (-O2):
define void @print_notice_hex16(i16 zeroext %0) {
%2 = tail call i32 @__console_tx_hex16(i32 5, i16 zeroext %0)
ret void
}
int clearrange(int x, int i, int j) {
  return x & ~((~(~0 << (j - i + 1))) << i);
}


x86 assembly (clang, -O0):
<clearrange>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
add    $0x1,%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearrange>:
sub    %esi,%edx
lea    0x1(%rdx),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
mov    %esi,%ecx
shl    %cl,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @clearrange(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 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = sub nsw i32 %8, %9
%11 = add nsw i32 %10, 1
%12 = shl i32 -1, %11
%13 = xor i32 %12, -1
%14 = load i32, i32* %5
%15 = shl i32 %13, %14
%16 = xor i32 %15, -1
%17 = and i32 %7, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @clearrange(i32 %0, i32 %1, i32 %2) {
%4 = sub i32 1, %1
%5 = add i32 %4, %2
%6 = shl nsw i32 -1, %5
%7 = xor i32 %6, -1
%8 = shl i32 %7, %1
%9 = xor i32 %8, -1
%10 = and i32 %9, %0
ret i32 %10
}
/* Variables and functions */
scalar_t__ malloc_or_die(int);
char *char_malloc_or_die(int num_chars) {
  return (char *)malloc_or_die(num_chars * sizeof(char));
}


x86 assembly (clang, -O0):
<char_malloc_or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <malloc_or_die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_malloc_or_die>:
jmp    1030 <malloc_or_die@plt>

LLVM IR (-O0):
define i8* @char_malloc_or_die(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = mul i64 %4, 1
%6 = trunc i64 %5 to i32
%7 = call i64 @malloc_or_die(i32 %6)
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @char_malloc_or_die(i32 %0) {
%2 = tail call i64 @malloc_or_die(i32 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
double HECMW_radian_to_degree(double rad) {
  return rad * 180 / 3.1415926535897932;
}


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

x86 assembly (clang, -O2):
<HECMW_radian_to_degree>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @HECMW_radian_to_degree(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.800000e+02
%5 = fdiv double %4, 0x400921FB54442D18
ret double %5
}

LLVM IR (-O2):
define double @HECMW_radian_to_degree(double %0) {
%2 = fmul double %0, 1.800000e+02
%3 = fdiv double %2, 0x400921FB54442D18
ret double %3
}
void t4(int a) {
  int b = 0;
  if (a)
    b == 1;
  else
    b == 2;
  while (1)
    b == 3;
  do
    b == 4;
  while (1);
  for (;;)
    b == 5;
  for (b == 1;;) {
  }
  for (; b == 1;) {
  }
  for (;; b == 1) {
  }
}


x86 assembly (clang, -O0):
<t4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111d <t4+0x1d>
jmp    111d <t4+0x1d>
jmp    1122 <t4+0x22>
jmp    1122 <t4+0x22>

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

LLVM IR (-O0):
define void @t4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
br label %14
10: ; preds = %1
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 2
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %10, %6
br label %15
15: ; preds = %14, %15
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 3
%18 = zext i1 %17 to i32
br label %15
}

LLVM IR (-O2):
define void @t4(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
void RTManifestVerifyDigestType(void) {}


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

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

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

LLVM IR (-O2):
define void @RTManifestVerifyDigestType() {
ret void
}
float __fdiv_rz(float x, float y) { return x / y; }


x86 assembly (clang, -O0):
<__fdiv_rz>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fdiv_rz>:
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @__fdiv_rz(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fdiv float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @__fdiv_rz(float %0, float %1) {
%3 = fdiv float %0, %1
ret float %3
}
void test_6(unsigned char *x, unsigned int *y) { y[0] = x[1] >> 7; }


x86 assembly (clang, -O0):
<test_6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
sar    $0x7,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_6>:
movzbl 0x1(%rdi),%eax
shr    $0x7,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @test_6(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 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = ashr i32 %8, 7
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
ret void
}

LLVM IR (-O2):
define void @test_6(i8* nocapture %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = lshr i8 %4, 7
%6 = zext i8 %5 to i32
store i32 %6, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_put_char(char);
void ft_display_comb(char i, char j, char k) {
  if (j != k && i != j) {
    ft_put_char(i);
    ft_put_char(j);
    ft_put_char(k);
    ft_put_char(',');
    ft_put_char(' ');
  }
}


x86 assembly (clang, -O0):
<ft_display_comb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movsbl -0x2(%rbp),%eax
movsbl -0x3(%rbp),%ecx
cmp    %ecx,%eax
je     1178 <ft_display_comb+0x68>
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
je     1178 <ft_display_comb+0x68>
movsbl -0x1(%rbp),%edi
call   1030 <ft_put_char@plt>
movsbl -0x2(%rbp),%edi
call   1030 <ft_put_char@plt>
movsbl -0x3(%rbp),%edi
call   1030 <ft_put_char@plt>
mov    $0x2c,%edi
call   1030 <ft_put_char@plt>
mov    $0x20,%edi
call   1030 <ft_put_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_display_comb>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
cmp    %bpl,%dil
je     1155 <ft_display_comb+0x45>
mov    %edx,%ebx
cmp    %bl,%bpl
je     1155 <ft_display_comb+0x45>
movsbl %dil,%edi
call   1030 <ft_put_char@plt>
movsbl %bpl,%edi
call   1030 <ft_put_char@plt>
movsbl %bl,%edi
call   1030 <ft_put_char@plt>
mov    $0x2c,%edi
call   1030 <ft_put_char@plt>
mov    $0x20,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ft_put_char@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @ft_display_comb(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = icmp eq i8 %1, %2
%5 = icmp eq i8 %0, %1
%6 = or i1 %5, %4
br i1 %6, label %13, label %7
7: ; preds = %3
%8 = tail call i32 @ft_put_char(i8 signext %0)
%9 = tail call i32 @ft_put_char(i8 signext %1)
%10 = tail call i32 @ft_put_char(i8 signext %2)
%11 = tail call i32 @ft_put_char(i8 signext 44)
%12 = tail call i32 @ft_put_char(i8 signext 32)
br label %13
13: ; preds = %7, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xf8() {
  Assert_real((isascii(248) == 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",
              1245, ("isascii should be 0 for 0xf8"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xf8>:
push   %rax
mov    $0xf8,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4dd,%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 0xf8\00"
define void @t_isascii_0xf8() {
%1 = call i64 @isascii(i32 248)
%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 1245, 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 0xf8\00"
define void @t_isascii_0xf8() {
%1 = tail call i64 @isascii(i32 248)
%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 1245, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double floor(double const);
double roundPeriod(const double period) {
  return floor(period * 1000.0) / 1000.0;
}


x86 assembly (clang, -O0):
<roundPeriod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movsd  0xec9(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundPeriod>:
push   %rax
mulsd  0xee7(%rip),%xmm0
call   1030 <floor@plt>
divsd  0xeda(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @roundPeriod(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.000000e+03
%5 = call double @llvm.floor.f64(double %4)
%6 = fdiv double %5, 1.000000e+03
ret double %6
}

LLVM IR (-O2):
define double @roundPeriod(double %0) {
%2 = fmul double %0, 1.000000e+03
%3 = tail call double @llvm.floor.f64(double %2)
%4 = fdiv double %3, 1.000000e+03
ret double %4
}
TR_CLASSVARS_DECL(TR_Timer) {}


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

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

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

LLVM IR (-O2):
define i32 @TR_CLASSVARS_DECL(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
scalar_t__ strlen(char *);
void cmdline_parser_print_version(void) {
  printf("%s %s\n", (strlen("zmap") ? "zmap" : "zmap"), "1.2.1");
}


x86 assembly (clang, -O0):
<cmdline_parser_print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xedc(%rip),%rdi
call   1030 <strlen@plt>
lea    0xed0(%rip),%rsi
cmp    $0x0,%rax
cmovne %rsi,%rsi
lea    0xeba(%rip),%rdi
lea    0xebf(%rip),%rdx
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmdline_parser_print_version>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xee7(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [5 x i8] c"zmap\00"
@.str.2 = [6 x i8] c"1.2.1\00"
define void @cmdline_parser_print_version() {
%1 = call i64 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [5 x i8] c"zmap\00"
@.str.2 = [6 x i8] c"1.2.1\00"
define void @cmdline_parser_print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int clear_support_string(void) {
  int fail, *a, *b;
  double *c;
  fail = _ada_use_c2phc4c(588, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<clear_support_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x24c,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_support_string>:
mov    $0x24c,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @clear_support_string() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca double*
%5 = load i32*, i32** %2
%6 = load i32*, i32** %3
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 588, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %1
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @clear_support_string() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 588, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
unsigned int psr_get();
int /*<<< orphan*/ psr_set(unsigned int);
void psr_enable_interupt(void) {
  unsigned int psr = psr_get();
  psr &= ~(0xF << 8);
  psr_set(psr | (((0x0) & 0xF) << 8));
}


x86 assembly (clang, -O0):
<psr_enable_interupt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <psr_get@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffff0ff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
or     $0x0,%edi
call   1040 <psr_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psr_enable_interupt>:
push   %rax
xor    %eax,%eax
call   1030 <psr_get@plt>
and    $0xfffff0ff,%eax
mov    %eax,%edi
pop    %rax
jmp    1040 <psr_set@plt>

LLVM IR (-O0):
define void @psr_enable_interupt() {
%1 = alloca i32
%2 = call i32 (...) @psr_get()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = and i32 %3, -3841
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = or i32 %5, 0
%7 = call i32 @psr_set(i32 %6)
ret void
}

LLVM IR (-O2):
define void @psr_enable_interupt() {
%1 = tail call i32 (...) @psr_get()
%2 = and i32 %1, -3841
%3 = tail call i32 @psr_set(i32 %2)
ret void
}
int compare_ptrs(const void *k1, const void *k2) {
  return !((char *)k1 - (char *)k2);
}


x86 assembly (clang, -O0):
<compare_ptrs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_ptrs>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @compare_ptrs(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 = ptrtoint i8* %5 to i64
%8 = ptrtoint i8* %6 to i64
%9 = sub i64 %7, %8
%10 = icmp ne i64 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @compare_ptrs(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ fabsf(float);
int /*<<< orphan*/ link_failure_fabsf();
void test_fabsf(float f) {
  if (fabsf(f) != fabsf(f))
    link_failure_fabsf();
}


x86 assembly (clang, -O0):
<test_fabsf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fabsf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fabsf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_fabsf+0x3c>
mov    $0x0,%al
call   1040 <link_failure_fabsf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fabsf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1030 <fabsf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1030 <fabsf@plt>
cmp    %rax,%rbx
jne    1149 <test_fabsf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_fabsf@plt>

LLVM IR (-O0):
define void @test_fabsf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @fabsf(float %3)
%5 = load float, float* %2
%6 = call i64 @fabsf(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_fabsf()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_fabsf(float %0) {
%2 = tail call i64 @fabsf(float %0)
%3 = tail call i64 @fabsf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_fabsf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void test0_ok() { write(1, "(once called) ", sizeof("(once called) ") - 1); }


x86 assembly (clang, -O0):
<test0_ok>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0xe,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test0_ok>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0xe,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"(once called) \00"
define void @test0_ok() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 14)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"(once called) \00"
define void @test0_ok() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 14)
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;
struct timeval {
  scalar_t__ tv_sec;
};

/* Variables and functions */
char *ctime_r(scalar_t__ *, char *);
int /*<<< orphan*/ monotime(struct timeval *);
scalar_t__ time(int /*<<< orphan*/ *);
char *time_to_string(time_t ts, char *buf) {
  struct timeval tv;
  time_t tbuf;
  monotime(&tv);
  tbuf = time(NULL) - (tv.tv_sec - ts);
  return ctime_r(&tbuf, buf);
}


x86 assembly (clang, -O0):
<time_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
call   1040 <monotime@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    -0x18(%rbp),%rcx
sub    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdi
call   1050 <ctime_r@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_to_string>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x10(%rsp),%rdi
call   1040 <monotime@plt>
xor    %edi,%edi
call   1030 <time@plt>
add    %rbx,%rax
sub    0x10(%rsp),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
mov    %r14,%rsi
call   1050 <ctime_r@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.timeval = type { i64 }
define i8* @time_to_string(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca %struct.timeval
%6 = alloca i64
store i64 %0, i64* %3
store i8* %1, i8** %4
%7 = call i32 @monotime(%struct.timeval* %5)
%8 = call i64 @time(i32* null)
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%10 = load i64, i64* %9
%11 = load i64, i64* %3
%12 = sub nsw i64 %10, %11
%13 = sub nsw i64 %8, %12
store i64 %13, i64* %6
%14 = load i8*, i8** %4
%15 = call i8* @ctime_r(i64* %6, i8* %14)
ret i8* %15
}

LLVM IR (-O2):
%struct.timeval = type { i64 }
define i8* @time_to_string(i64 %0, i8* %1) {
%3 = alloca %struct.timeval
%4 = alloca i64
%5 = bitcast %struct.timeval* %3 to i8*
%6 = bitcast i64* %4 to i8*
%7 = call i32 @monotime(%struct.timeval* %3)
%8 = call i64 @time(i32* null)
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
%10 = load i64, i64* %9
%11 = add i64 %8, %0
%12 = sub i64 %11, %10
store i64 %12, i64* %4
%13 = call i8* @ctime_r(i64* %4, i8* %1)
ret i8* %13
}