xunge/DecIR huggingface dataset:
int grisu3_iceil(double v) {
  int k = (int)v;
  if (v < 0)
    return k;
  return v - k == 0 ? k : k + 1;
}


x86 assembly (clang, -O0):
<grisu3_iceil>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112a <grisu3_iceil+0x2a>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1165 <grisu3_iceil+0x65>
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
subsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1156 <grisu3_iceil+0x56>
jp     1156 <grisu3_iceil+0x56>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    115f <grisu3_iceil+0x5f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<grisu3_iceil>:
cvttsd2si %xmm0,%eax
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     1122 <grisu3_iceil+0x22>
cvtsi2sd %eax,%xmm2
subsd  %xmm2,%xmm0
cmpneqsd %xmm1,%xmm0
movq   %xmm0,%rcx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @grisu3_iceil(double %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
%5 = load double, double* %3
%6 = fptosi double %5 to i32
store i32 %6, i32* %4
%7 = load double, double* %3
%8 = fcmp olt double %7, 0.000000e+00
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %4
store i32 %10, i32* %2
br label %24
11: ; preds = %1
%12 = load double, double* %3
%13 = load i32, i32* %4
%14 = sitofp i32 %13 to double
%15 = fsub double %12, %14
%16 = fcmp oeq double %15, 0.000000e+00
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = load i32, i32* %4
br label %22
19: ; preds = %11
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
br label %22
22: ; preds = %19, %17
%23 = phi i32 [ %18, %17 ], [ %21, %19 ]
store i32 %23, i32* %2
br label %24
24: ; preds = %22, %9
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @grisu3_iceil(double %0) {
%2 = fptosi double %0 to i32
%3 = fcmp olt double %0, 0.000000e+00
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = sitofp i32 %2 to double
%6 = fsub double %0, %5
%7 = fcmp une double %6, 0.000000e+00
%8 = zext i1 %7 to i32
%9 = add nsw i32 %8, %2
br label %10
10: ; preds = %1, %4
%11 = phi i32 [ %9, %4 ], [ %2, %1 ]
ret i32 %11
}
/* Variables and functions */
void *plat_prepare_screenshot(int *, int *, int *);
void *pl_prepare_screenshot(int *w, int *h, int *bpp) {
  return plat_prepare_screenshot(w, h, bpp);
}


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

x86 assembly (clang, -O2):
<pl_prepare_screenshot>:
jmp    1030 <plat_prepare_screenshot@plt>

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

LLVM IR (-O2):
define i8* @pl_prepare_screenshot(i32* %0, i32* %1, i32* %2) {
%4 = tail call i8* @plat_prepare_screenshot(i32* %0, i32* %1, i32* %2)
ret i8* %4
}
/* Type definitions */
struct statvfs {
  int dummy;
};
struct statfs {
  int dummy;
};

/* Variables and functions */
int __statfs(char const *, struct statfs *);
int statvfs(const char *file, struct statvfs *buf) {
  return __statfs(file, (struct statfs *)buf);
}


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

x86 assembly (clang, -O2):
<statvfs>:
jmp    1030 <__statfs@plt>

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

LLVM IR (-O2):
%struct.statvfs = type { i32 }
%struct.statfs = type { i32 }
define i32 @statvfs(i8* %0, %struct.statvfs* %1) {
%3 = bitcast %struct.statvfs* %1 to %struct.statfs*
%4 = tail call i32 @__statfs(i8* %0, %struct.statfs* %3)
ret i32 %4
}
/* Variables and functions */
int count_word(char *);
scalar_t__ gets(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char line[1000000];
  while (gets(line))
    printf("%d\n", count_word(line));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf4250,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xf4250(%rbp),%rdi
call   1050 <gets@plt>
cmp    $0x0,%rax
je     1177 <main+0x47>
lea    -0xf4250(%rbp),%rdi
call   1040 <count_word@plt>
mov    %eax,%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0xf4250,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xf4248,%rsp
mov    %rsp,%rdi
call   1050 <gets@plt>
test   %rax,%rax
je     117f <main+0x4f>
mov    %rsp,%rbx
lea    0xeaf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <count_word@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1050 <gets@plt>
test   %rax,%rax
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0xf4248,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [1000000 x i8]
%2 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %1, i64 0, i64 0
%3 = call i64 @gets(i8* %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %0, %5
%6 = call i32 @count_word(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i64 @gets(i8* %2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %0
ret i32 0
}
void GB_TIMES_f_FP32(float *z, const float *x, const float *y) {
  (*z) = (*x) * (*y);
}


x86 assembly (clang, -O0):
<GB_TIMES_f_FP32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mulss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GB_TIMES_f_FP32>:
movss  (%rsi),%xmm0
mulss  (%rdx),%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @GB_TIMES_f_FP32(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = load float, float* %7
%9 = load float*, float** %6
%10 = load float, float* %9
%11 = fmul float %8, %10
%12 = load float*, float** %4
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @GB_TIMES_f_FP32(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fmul float %4, %5
store float %6, float* %0
ret void
}
void normal2x_width_generic_output(void *data, unsigned *out_width,
                                   unsigned *out_height, unsigned width,
                                   unsigned height) {
  *out_width = width << 1;
  *out_height = height;
}


x86 assembly (clang, -O0):
<normal2x_width_generic_output>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<normal2x_width_generic_output>:
add    %ecx,%ecx
mov    %ecx,(%rsi)
mov    %r8d,(%rdx)
ret

LLVM IR (-O0):
define void @normal2x_width_generic_output(i8* %0, i32* %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %9
%12 = shl i32 %11, 1
%13 = load i32*, i32** %7
store i32 %12, i32* %13
%14 = load i32, i32* %10
%15 = load i32*, i32** %8
store i32 %14, i32* %15
ret void
}

LLVM IR (-O2):
define void @normal2x_width_generic_output(i8* nocapture readnone %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32 %3, i32 %4) {
%6 = shl i32 %3, 1
store i32 %6, i32* %1
store i32 %4, i32* %2
ret void
}
int SANITY_FUNC() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @SANITY_FUNC() {
ret i32 0
}
void MROnMediaChangeRequestSink(const char *MediaUri) {}


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

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

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

LLVM IR (-O2):
define void @MROnMediaChangeRequestSink(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t Ch(uint32_t x, uint32_t y, uint32_t z) { return (x & y) | (~x & z); }


x86 assembly (clang, -O0):
<Ch>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ch>:
mov    %esi,%eax
xor    %edx,%eax
and    %edi,%eax
xor    %edx,%eax
ret

LLVM IR (-O0):
define i32 @Ch(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* %5
%9 = and i32 %7, %8
%10 = load i32, i32* %4
%11 = xor i32 %10, -1
%12 = load i32, i32* %6
%13 = and i32 %11, %12
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @Ch(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, %0
%5 = xor i32 %0, -1
%6 = and i32 %5, %2
%7 = or i32 %6, %4
ret i32 %7
}
void ub_io_writeback_dec(struct address_space *mapping) {}


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

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

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

LLVM IR (-O2):
%struct.address_space = type opaque
define void @ub_io_writeback_dec(%struct.address_space* nocapture %0) {
ret void
}
/* Type definitions */
struct redfish_dirp {
  int dummy;
};
struct dirent {
  int dummy;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
struct dirent *readdir(int /*<<< orphan*/ *);
struct dirent *do_readdir(struct redfish_dirp *dp) {
  DIR *rdp = (DIR *)dp;
  return readdir(rdp);
}


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

x86 assembly (clang, -O2):
<do_readdir>:
jmp    1030 <readdir@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
%struct.redfish_dirp = type { i32 }
define %struct.dirent* @do_readdir(%struct.redfish_dirp* %0) {
%2 = alloca %struct.redfish_dirp*
%3 = alloca i32*
store %struct.redfish_dirp* %0, %struct.redfish_dirp** %2
%4 = load %struct.redfish_dirp*, %struct.redfish_dirp** %2
%5 = bitcast %struct.redfish_dirp* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call %struct.dirent* @readdir(i32* %6)
ret %struct.dirent* %7
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
%struct.redfish_dirp = type { i32 }
define %struct.dirent* @do_readdir(%struct.redfish_dirp* %0) {
%2 = getelementptr %struct.redfish_dirp, %struct.redfish_dirp* %0, i64 0, i32 0
%3 = tail call %struct.dirent* @readdir(i32* %2)
ret %struct.dirent* %3
}
char *Func(void) {
  char str[30] = "lixiang";
  return str;
}


x86 assembly (clang, -O0):
<Func>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xef2(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeed(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xee7(%rip),%ax
mov    %ax,-0x4(%rbp)
lea    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Func>:
lea    -0x28(%rsp),%rax
ret

LLVM IR (-O0):
@__const.Func.str = [30 x i8] c"lixiang\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i8* @Func() {
%1 = alloca [30 x i8]
%2 = bitcast [30 x i8]* %1 to i8*
%3 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @Func() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ picnicExample(int);
int main() { picnicExample(6); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1030 <picnicExample@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6,%edi
call   1030 <picnicExample@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @picnicExample(i32 6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @picnicExample(i32 6)
ret i32 0
}
void ff_hevc_put_hevc_bi_w_qpel_hv48_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_hv48_8_sse4() {
ret void
}
void _system_post_cinit(void) {}


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

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

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

LLVM IR (-O2):
define void @_system_post_cinit() {
ret void
}
int main(int argc, char *argv[], char *envp[]) {
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
jmp    1116 <main+0x16>

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
br label %8
8: ; preds = %3, %8
br label %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
br label %4
4: ; preds = %3, %4
br label %4
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
scalar_t__ scale8(scalar_t__, scalar_t__);
uint8_t brighten8_raw(uint8_t x) {
  uint8_t ix = 255 - x;
  return 255 - scale8(ix, ix);
}


x86 assembly (clang, -O0):
<brighten8_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xff,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <scale8@plt>
mov    %rax,%rcx
mov    $0xff,%eax
sub    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brighten8_raw>:
push   %rbx
mov    $0xff,%ebx
mov    $0xff,%esi
sub    %rdi,%rsi
mov    %rsi,%rdi
call   1030 <scale8@plt>
sub    %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @brighten8_raw(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = sub nsw i64 255, %4
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = load i64, i64* %3
%8 = call i64 @scale8(i64 %6, i64 %7)
%9 = sub nsw i64 255, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @brighten8_raw(i64 %0) {
%2 = sub nsw i64 255, %0
%3 = tail call i64 @scale8(i64 %2, i64 %2)
%4 = sub nsw i64 255, %3
ret i64 %4
}
void addc_inst(struct state *context, struct debug_state *dbg_context,
               struct instruction *inst) {}


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

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

LLVM IR (-O0):
%struct.state = type opaque
%struct.debug_state = type opaque
%struct.instruction = type opaque
define void @addc_inst(%struct.state* %0, %struct.debug_state* %1, %struct.instruction* %2) {
%4 = alloca %struct.state*
%5 = alloca %struct.debug_state*
%6 = alloca %struct.instruction*
store %struct.state* %0, %struct.state** %4
store %struct.debug_state* %1, %struct.debug_state** %5
store %struct.instruction* %2, %struct.instruction** %6
ret void
}

LLVM IR (-O2):
%struct.state = type opaque
%struct.debug_state = type opaque
%struct.instruction = type opaque
define void @addc_inst(%struct.state* nocapture %0, %struct.debug_state* nocapture %1, %struct.instruction* nocapture %2) {
ret void
}
int NullTextHeight(struct ADrawTag *ctx __attribute__((unused))) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ADrawTag = type opaque
define i32 @NullTextHeight(%struct.ADrawTag* nocapture readnone %0) {
ret i32 0
}
void __attribute__((dllimport)) foo2() {}


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

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

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

LLVM IR (-O2):
define void @foo2() {
ret void
}
int pascal(int row, int col) {
  if (col == 0 || col == row) {
    return 1;
  } else {
    return pascal(row - 1, col - 1) + pascal(row - 1, col);
  }
}


x86 assembly (clang, -O0):
<pascal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1134 <pascal+0x24>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1140 <pascal+0x30>
movl   $0x1,-0x4(%rbp)
jmp    116c <pascal+0x5c>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <pascal@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <pascal@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pascal>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebp
test   %esi,%esi
je     1162 <pascal+0x52>
mov    %esi,%r14d
mov    %edi,%ebx
cmp    %edi,%esi
je     1162 <pascal+0x52>
lea    -0x1(%r14),%r15d
neg    %r14d
add    $0xffffffff,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
mov    %r15d,%esi
call   1030 <pascal@plt>
add    %eax,%ebp
lea    (%r14,%rbx,1),%eax
add    $0xffffffff,%eax
mov    %ebx,%ecx
add    $0xffffffff,%ecx
mov    %ecx,%ebx
cmp    $0xffffffff,%eax
jne    1140 <pascal+0x30>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @pascal(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = icmp eq i32 %1, %0
%5 = or i1 %3, %4
br i1 %5, label %17, label %6
6: ; preds = %2
%7 = add nsw i32 %1, -1
br label %8
8: ; preds = %6, %8
%9 = phi i32 [ %0, %6 ], [ %11, %8 ]
%10 = phi i32 [ 0, %6 ], [ %13, %8 ]
%11 = add nsw i32 %9, -1
%12 = tail call i32 @pascal(i32 %11, i32 %7)
%13 = add nsw i32 %12, %10
%14 = icmp eq i32 %11, %1
br i1 %14, label %15, label %8
15: ; preds = %8
%16 = add i32 %13, 1
br label %17
17: ; preds = %15, %2
%18 = phi i32 [ 1, %2 ], [ %16, %15 ]
ret i32 %18
}
char *hash_plugin_detailed(void) {
  return ("sha512 - A simple sha512 plugin\n"
          "------------------------\n"
          "Use this module to crack simple sha512 hashes\n"
          "Input should be in form: \'user:hash\' or just \'hash\'\n"
          "Known software that uses this password hashing method:\n"
          "None.\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [262 x i8] c"sha512 - A simple sha512 plugin\0A------------------------\0AUse this module to crack simple sha512 hashes\0AInput should be in form: 'user:hash' or just 'hash'\0AKnown software that uses this password hashing method:\0ANone.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([262 x i8], [262 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [262 x i8] c"sha512 - A simple sha512 plugin\0A------------------------\0AUse this module to crack simple sha512 hashes\0AInput should be in form: 'user:hash' or just 'hash'\0AKnown software that uses this password hashing method:\0ANone.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([262 x i8], [262 x i8]* @.str, i64 0, i64 0)
}
void wifi_evt_config_mac_address(
    const struct wifi_msg_config_mac_address_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_config_mac_address_evt_t = type opaque
define void @wifi_evt_config_mac_address(%struct.wifi_msg_config_mac_address_evt_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_28() {
  Assert_real((isqrt(28) == 5),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              145, ("Integer square root of 28 should be 5"));
}


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

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

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 28 should be 5\00"
define void @t_sqrt_28() {
%1 = call i32 @isqrt(i32 28)
%2 = icmp eq i32 %1, 5
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 145, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 28 should be 5\00"
define void @t_sqrt_28() {
%1 = tail call i32 @isqrt(i32 28)
%2 = icmp eq i32 %1, 5
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 145, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int isPower2(unsigned int x) { return x && !(x & (x - 1)); }


x86 assembly (clang, -O0):
<isPower2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112c <isPower2+0x2c>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPower2>:
test   %edi,%edi
je     110f <isPower2+0xf>
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
test   %ecx,%edi
sete   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isPower2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = sub i32 %7, 1
%9 = and i32 %6, %8
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
br label %12
12: ; preds = %5, %1
%13 = phi i1 [ false, %1 ], [ %11, %5 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @isPower2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @llvm.ctpop.i32(i32 %0)
%5 = icmp ult i32 %4, 2
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void ooof() {
  if (""[0] == 0)
    foo();
}


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

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

LLVM IR (-O0):
define void @ooof() {
%1 = call i32 (...) @foo()
ret void
}

LLVM IR (-O2):
define void @ooof() {
%1 = tail call i32 (...) @foo()
ret void
}
void MemClr(unsigned char *NcTgtPtr, unsigned short UsClrSiz) {
  unsigned short UsClrIdx;
  for (UsClrIdx = 0; UsClrIdx < UsClrSiz; UsClrIdx++) {
    *NcTgtPtr = 0;
    NcTgtPtr++;
  }
  return;
}


x86 assembly (clang, -O0):
<MemClr>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movw   $0x0,-0xc(%rbp)
movzwl -0xc(%rbp),%eax
movzwl -0xa(%rbp),%ecx
cmp    %ecx,%eax
jge    1149 <MemClr+0x49>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xc(%rbp)
jmp    1115 <MemClr+0x15>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MemClr>:
test   %esi,%esi
je     1123 <MemClr+0x13>
push   %rax
movzwl %si,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @MemClr(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = icmp eq i16 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i16 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
void trm_done() {}


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

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

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

LLVM IR (-O2):
define void @trm_done() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void put_be24_ptr(uint8_t *p, uint32_t v) {
  p[2] = (v & 0xFF);
  p[1] = (v >> 8) & 0xFF;
  p[0] = (v >> 16) & 0xFF;
}


x86 assembly (clang, -O0):
<put_be24_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_be24_ptr>:
mov    %esi,%eax
movzbl %al,%ecx
mov    %ecx,0x8(%rdi)
movzbl %ah,%ecx
mov    %ecx,0x4(%rdi)
shr    $0x10,%eax
movzbl %al,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @put_be24_ptr(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 2
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = ashr i32 %9, 8
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
%14 = load i32, i32* %4
%15 = ashr i32 %14, 16
%16 = and i32 %15, 255
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 0
store i32 %16, i32* %18
ret void
}

LLVM IR (-O2):
define void @put_be24_ptr(i32* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 255
%4 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %3, i32* %4
%5 = lshr i32 %1, 8
%6 = and i32 %5, 255
%7 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %6, i32* %7
%8 = lshr i32 %1, 16
%9 = and i32 %8, 255
store i32 %9, i32* %0
ret void
}
/* Type definitions */
struct F_name_type {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Client_Content(struct F_name_type *);
int /*<<< orphan*/ HTTP_Response(struct F_name_type *);
int /*<<< orphan*/ Write_log_file(char *);
void Write_Page(struct F_name_type *F) {
  HTTP_Response(F);
  Write_log_file("Sent the http is OK! %d\n");
  Client_Content(F);
  Write_log_file("Sent the content is OK! %d\n");
}


x86 assembly (clang, -O0):
<Write_Page>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <HTTP_Response@plt>
lea    0xeb4(%rip),%rdi
call   1040 <Write_log_file@plt>
mov    -0x8(%rbp),%rdi
call   1030 <Client_Content@plt>
lea    0xeb8(%rip),%rdi
call   1040 <Write_log_file@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Write_Page>:
push   %rbx
mov    %rdi,%rbx
call   1050 <HTTP_Response@plt>
lea    0xec0(%rip),%rdi
call   1040 <Write_log_file@plt>
mov    %rbx,%rdi
call   1030 <Client_Content@plt>
lea    0xec5(%rip),%rdi
pop    %rbx
jmp    1040 <Write_log_file@plt>

LLVM IR (-O0):
%struct.F_name_type = type { i32 }
@.str = [25 x i8] c"Sent the http is OK! %d\0A\00"
@.str.1 = [28 x i8] c"Sent the content is OK! %d\0A\00"
define void @Write_Page(%struct.F_name_type* %0) {
%2 = alloca %struct.F_name_type*
store %struct.F_name_type* %0, %struct.F_name_type** %2
%3 = load %struct.F_name_type*, %struct.F_name_type** %2
%4 = call i32 @HTTP_Response(%struct.F_name_type* %3)
%5 = call i32 @Write_log_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = load %struct.F_name_type*, %struct.F_name_type** %2
%7 = call i32 @Client_Content(%struct.F_name_type* %6)
%8 = call i32 @Write_log_file(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.F_name_type = type { i32 }
@.str = [25 x i8] c"Sent the http is OK! %d\0A\00"
@.str.1 = [28 x i8] c"Sent the content is OK! %d\0A\00"
define void @Write_Page(%struct.F_name_type* %0) {
%2 = tail call i32 @HTTP_Response(%struct.F_name_type* %0)
%3 = tail call i32 @Write_log_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @Client_Content(%struct.F_name_type* %0)
%5 = tail call i32 @Write_log_file(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void f13(void) {
a:
  goto a;
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f13>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <f13+0x9>
jmp    1109 <f13+0x9>

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

LLVM IR (-O0):
define void @f13() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @f13() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ PWM3_1_DriverIRQHandler();
__attribute__((weak)) void PWM3_1_IRQHandler(void) {
  PWM3_1_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @PWM3_1_IRQHandler() {
%1 = call i32 (...) @PWM3_1_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @PWM3_1_IRQHandler() {
%1 = tail call i32 (...) @PWM3_1_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FLSMBusGPIO_sendMBus8bit(int, int);
void FLSMBusGPIO_wakeup() { FLSMBusGPIO_sendMBus8bit(0x01, 0x10000000); }


x86 assembly (clang, -O0):
<FLSMBusGPIO_wakeup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x10000000,%esi
call   1030 <FLSMBusGPIO_sendMBus8bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FLSMBusGPIO_wakeup>:
mov    $0x1,%edi
mov    $0x10000000,%esi
jmp    1030 <FLSMBusGPIO_sendMBus8bit@plt>

LLVM IR (-O0):
define void @FLSMBusGPIO_wakeup() {
%1 = call i32 @FLSMBusGPIO_sendMBus8bit(i32 1, i32 268435456)
ret void
}

LLVM IR (-O2):
define void @FLSMBusGPIO_wakeup() {
%1 = tail call i32 @FLSMBusGPIO_sendMBus8bit(i32 1, i32 268435456)
ret void
}
/* Type definitions */
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
int Cyc_Tcutil_cnst_exp(int /*<<< orphan*/, int /*<<< orphan*/,
                        struct Cyc_Absyn_Exp *);
int Cyc_Tcutil_is_const_exp(struct Cyc_Absyn_Exp *e) {
  int _T0;
  _T0 = Cyc_Tcutil_cnst_exp(0, 0, e);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Tcutil_is_const_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
mov    %esi,%edi
call   1030 <Cyc_Tcutil_cnst_exp@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Tcutil_is_const_exp>:
mov    %rdi,%rdx
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <Cyc_Tcutil_cnst_exp@plt>

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
define i32 @Cyc_Tcutil_is_const_exp(%struct.Cyc_Absyn_Exp* %0) {
%2 = alloca %struct.Cyc_Absyn_Exp*
%3 = alloca i32
store %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp** %2
%4 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %2
%5 = call i32 @Cyc_Tcutil_cnst_exp(i32 0, i32 0, %struct.Cyc_Absyn_Exp* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
define i32 @Cyc_Tcutil_is_const_exp(%struct.Cyc_Absyn_Exp* %0) {
%2 = tail call i32 @Cyc_Tcutil_cnst_exp(i32 0, i32 0, %struct.Cyc_Absyn_Exp* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
main() {
  printf("%s a %s\n", "Hola", "todos");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"%s a %s\0A\00"
@.str.1 = [5 x i8] c"Hola\00"
@.str.2 = [6 x i8] c"todos\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 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 i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s a %s\0A\00"
@.str.1 = [5 x i8] c"Hola\00"
@.str.2 = [6 x i8] c"todos\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 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 i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printYellow() {
  printf("For he's a jolly good fellow!\n");
  printf("For he's a jolly good fellow!\n");
  printf("For he's a jolly good fellow!\n");
}


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

x86 assembly (clang, -O2):
<printYellow>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"For he's a jolly good fellow!\0A\00"
define void @printYellow() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str.2 = [30 x i8] c"For he's a jolly good fellow!\00"
define void @printYellow() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.2, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void exit_usage(const char *program) {
  fprintf(stderr, "usage: %s -a <arch> [-d] [-h]\n", program);
  exit(EINVAL);
}


x86 assembly (clang, -O0):
<exit_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"usage: %s -a <arch> [-d] [-h]\0A\00"
@EINVAL = global i32 0
define void @exit_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EINVAL
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"usage: %s -a <arch> [-d] [-h]\0A\00"
@EINVAL = global i32 0
define void @exit_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EINVAL
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ *__init_file(int, int /*<<< orphan*/, int);
int __parse_mode(char const *);
int /*<<< orphan*/ errno;
FILE *fdopen(int fd, const char *mode) {
  int flags;
  if (fd < 0) {
    errno = -EINVAL;
    return NULL;
  }
  flags = __parse_mode(mode);
  return __init_file(fd, 0, flags);
}


x86 assembly (clang, -O0):
<fdopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    115a <fdopen+0x3a>
xor    %ecx,%ecx
mov    0x2e96(%rip),%rax
sub    (%rax),%ecx
mov    0x2e95(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
jmp    1177 <fdopen+0x57>
mov    -0x18(%rbp),%rdi
call   1040 <__parse_mode@plt>
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x1c(%rbp),%edx
xor    %esi,%esi
call   1030 <__init_file@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdopen>:
push   %rbx
test   %edi,%edi
js     113b <fdopen+0x1b>
mov    %edi,%ebx
mov    %rsi,%rdi
call   1040 <__parse_mode@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    %eax,%edx
pop    %rbx
jmp    1030 <__init_file@plt>
mov    0x2e96(%rip),%rax
xor    %ecx,%ecx
sub    (%rax),%ecx
mov    0x2e93(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
define i32* @fdopen(i32 %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* @EINVAL
%11 = sub nsw i32 0, %10
store i32 %11, i32* @errno
store i32* null, i32** %3
br label %18
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = call i32 @__parse_mode(i8* %13)
store i32 %14, i32* %6
%15 = load i32, i32* %4
%16 = load i32, i32* %6
%17 = call i32* @__init_file(i32 %15, i32 0, i32 %16)
store i32* %17, i32** %3
br label %18
18: ; preds = %12, %9
%19 = load i32*, i32** %3
ret i32* %19
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
define i32* @fdopen(i32 %0, i8* %1) {
%3 = icmp slt i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
store i32 %6, i32* @errno
br label %10
7: ; preds = %2
%8 = tail call i32 @__parse_mode(i8* %1)
%9 = tail call i32* @__init_file(i32 %0, i32 0, i32 %8)
br label %10
10: ; preds = %7, %4
%11 = phi i32* [ null, %4 ], [ %9, %7 ]
ret i32* %11
}
void chipcon_init(int spino) {}


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

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

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

LLVM IR (-O2):
define void @chipcon_init(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Hello World!!\n\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Hello World!!\0A\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"Hello World!!\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int external(unsigned int);
int recursive_helper(unsigned int);
int recursive(unsigned int start) {
  if (start == 0) {
    return external(start);
  } else {
    return recursive_helper(start);
  }
}


x86 assembly (clang, -O0):
<recursive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1145 <recursive+0x25>
mov    -0x8(%rbp),%edi
call   1030 <external@plt>
mov    %eax,-0x4(%rbp)
jmp    1150 <recursive+0x30>
mov    -0x8(%rbp),%edi
call   1040 <recursive_helper@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recursive>:
test   %edi,%edi
je     1129 <recursive+0x9>
jmp    1040 <recursive_helper@plt>
xor    %edi,%edi
jmp    1030 <external@plt>

LLVM IR (-O0):
define i32 @recursive(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i32 @external(i32 %7)
store i32 %8, i32* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call i32 @recursive_helper(i32 %10)
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @recursive(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @external(i32 0)
br label %7
5: ; preds = %1
%6 = tail call i32 @recursive_helper(i32 %0)
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ %4, %3 ], [ %6, %5 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ unget_line_queue(char *);
void timlib_unget_line(char *in_line) { unget_line_queue(in_line); }


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

x86 assembly (clang, -O2):
<timlib_unget_line>:
jmp    1030 <unget_line_queue@plt>

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

LLVM IR (-O2):
define void @timlib_unget_line(i8* %0) {
%2 = tail call i32 @unget_line_queue(i8* %0)
ret void
}
int md_setdsuspchar(int c) {
  (c += 0);
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @md_setdsuspchar(i32 %0) {
ret i32 0
}