xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void usage(void) {
  (void)fprintf(stderr, "usage: "
                        "cam"
                        " [ -iqd |"
                        " -LRCTBE |"
                        " -v! |"
                        " -w width(%%) |"
                        " -W width(character) |"
                        " -h height(%%) |"
                        " -H height(character) |"
                        " -[sS] duration(sec) |"
                        " -r repeat_count"
                        " ] file ...\n");
  fflush(stdout);
  fflush(stderr);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ea8(%rip),%rbx
mov    (%rbx),%edi
lea    0xebf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [162 x i8] c"usage: cam [ -iqd | -LRCTBE | -v! | -w width(%%) | -W width(character) | -h height(%%) | -H height(character) | -[sS] duration(sec) | -r repeat_count ] file ...\0A\00"
@stdout = global i32 0
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
%5 = load i32, i32* @stderr
%6 = call i32 @fflush(i32 %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [162 x i8] c"usage: cam [ -iqd | -LRCTBE | -v! | -w width(%%) | -W width(character) | -h height(%%) | -H height(character) | -[sS] duration(sec) | -r repeat_count ] file ...\0A\00"
@stdout = global i32 0
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fflush(i32 %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void lockout(char *user) {
  FILE *lockoutFile = fopen("lockout", "a");
  fprintf(lockoutFile, "\n%s", user);
  fclose(lockoutFile);
}


x86 assembly (clang, -O0):
<lockout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
lea    0xebe(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lockout>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xec2(%rip),%rdi
lea    0xec3(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xeb6(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"lockout\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [4 x i8] c"\0A%s\00"
define void @lockout(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = load i8*, i8** %2
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%8 = load i32*, i32** %3
%9 = call i32 @fclose(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"lockout\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [4 x i8] c"\0A%s\00"
define void @lockout(i8* %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%4 = tail call i32 @fclose(i32* %2)
ret void
}
double fun(double x) { return (x * x * x + 5 * x * x - 3 * x - 4); }


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  0xef0(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xec9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xeb1(%rip),%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xef0(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm1
mulsd  0xee4(%rip),%xmm0
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
addsd  0xedc(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @fun(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %0, 5.000000e+00
%4 = fmul double %3, %0
%5 = tail call double @llvm.fmuladd.f64(double %2, double %0, double %4)
%6 = tail call double @llvm.fmuladd.f64(double %0, double -3.000000e+00, double %5)
%7 = fadd double %6, -4.000000e+00
ret double %7
}
int ra_conf_retransmit(int newvalue) {
  static int value = 0;
  if (newvalue > 0 && newvalue <= 60000)
    value = newvalue;
  return value;
}


x86 assembly (clang, -O0):
<ra_conf_retransmit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1127 <ra_conf_retransmit+0x27>
cmpl   $0xea60,-0x4(%rbp)
jg     1127 <ra_conf_retransmit+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,0x2efd(%rip)
mov    0x2ef7(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ra_conf_retransmit>:
mov    %edi,%eax
lea    -0x1(%rax),%ecx
cmp    $0xea60,%ecx
jae    1114 <ra_conf_retransmit+0x14>
mov    %eax,0x2f11(%rip)
ret
mov    0x2f0a(%rip),%eax
ret

LLVM IR (-O0):
@ra_conf_retransmit.value = internal global i32 0
define i32 @ra_conf_retransmit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 60000
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = load i32, i32* %2
store i32 %9, i32* @ra_conf_retransmit.value
br label %10
10: ; preds = %8, %5, %1
%11 = load i32, i32* @ra_conf_retransmit.value
ret i32 %11
}

LLVM IR (-O2):
@ra_conf_retransmit.value = internal unnamed_addr global i32 0
define i32 @ra_conf_retransmit(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 60000
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = load i32, i32* @ra_conf_retransmit.value
br label %7
6: ; preds = %1
store i32 %0, i32* @ra_conf_retransmit.value
br label %7
7: ; preds = %4, %6
%8 = phi i32 [ %5, %4 ], [ %0, %6 ]
ret i32 %8
}
unsigned char set_frame_ext(unsigned int table[], unsigned short frame,
                            unsigned int address, unsigned short flags) {
  unsigned int tmp = 0;
  tmp = (address & 0xFFFFF000);
  tmp |= (flags & 0x1FF);
  table[frame] = tmp;
  return 1;
}


x86 assembly (clang, -O0):
<set_frame_ext>:
push   %rbp
mov    %rsp,%rbp
mov    %cx,%ax
mov    %si,%cx
mov    %rdi,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    $0xfffff000,%eax
mov    %eax,-0x18(%rbp)
movzwl -0x12(%rbp),%eax
and    $0x1ff,%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edx
mov    -0x8(%rbp),%rax
movzwl -0xa(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_frame_ext>:
and    $0xfffff000,%edx
and    $0x1ff,%ecx
or     %edx,%ecx
mov    %esi,%eax
mov    %ecx,(%rdi,%rax,4)
mov    $0x1,%al
ret

LLVM IR (-O0):
define zeroext i8 @set_frame_ext(i32* %0, i16 zeroext %1, i32 %2, i16 zeroext %3) {
%5 = alloca i32*
%6 = alloca i16
%7 = alloca i32
%8 = alloca i16
%9 = alloca i32
store i32* %0, i32** %5
store i16 %1, i16* %6
store i32 %2, i32* %7
store i16 %3, i16* %8
store i32 0, i32* %9
%10 = load i32, i32* %7
%11 = and i32 %10, -4096
store i32 %11, i32* %9
%12 = load i16, i16* %8
%13 = zext i16 %12 to i32
%14 = and i32 %13, 511
%15 = load i32, i32* %9
%16 = or i32 %15, %14
store i32 %16, i32* %9
%17 = load i32, i32* %9
%18 = load i32*, i32** %5
%19 = load i16, i16* %6
%20 = zext i16 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
ret i8 1
}

LLVM IR (-O2):
define zeroext i8 @set_frame_ext(i32* nocapture writeonly %0, i16 zeroext %1, i32 %2, i16 zeroext %3) {
%5 = and i32 %2, -4096
%6 = and i16 %3, 511
%7 = zext i16 %6 to i32
%8 = or i32 %5, %7
%9 = zext i16 %1 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
store i32 %8, i32* %10
ret i8 1
}
/* Variables and functions */
scalar_t__ snis_rand();
float snis_random_float(void) {
  return (2.0f * ((float)snis_rand() / 32768.0f) - 1.0f);
}


x86 assembly (clang, -O0):
<snis_random_float>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <snis_rand@plt>
cvtsi2ss %rax,%xmm0
movss  0xedc(%rip),%xmm1
divss  %xmm1,%xmm0
addss  %xmm0,%xmm0
movss  0xec8(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<snis_random_float>:
push   %rax
xor    %eax,%eax
call   1030 <snis_rand@plt>
cvtsi2ss %rax,%xmm0
mulss  0xedb(%rip),%xmm0
addss  %xmm0,%xmm0
addss  0xed3(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @snis_random_float() {
%1 = call i64 (...) @snis_rand()
%2 = sitofp i64 %1 to float
%3 = fdiv float %2, 3.276800e+04
%4 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %3, float -1.000000e+00)
ret float %4
}

LLVM IR (-O2):
define float @snis_random_float() {
%1 = tail call i64 (...) @snis_rand()
%2 = sitofp i64 %1 to float
%3 = fmul float %2, 0x3F00000000000000
%4 = tail call float @llvm.fmuladd.f32(float %3, float 2.000000e+00, float -1.000000e+00)
ret float %4
}
const char *File_Brief(void) { return "Operating System File"; }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Operating System File\00"
define i8* @File_Brief() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [22 x i8] c"Operating System File\00"
define i8* @File_Brief() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}
int f_bun_rm1(float a1, float *a2) { return (__builtin_isunordered(a1, *a2)); }


x86 assembly (clang, -O0):
<f_bun_rm1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x10(%rbp),%rax
ucomiss (%rax),%xmm0
setp   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_bun_rm1>:
xor    %eax,%eax
ucomiss (%rdi),%xmm0
setp   %al
ret

LLVM IR (-O0):
define i32 @f_bun_rm1(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 = load float, float* %6
%8 = fcmp uno float %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @f_bun_rm1(float %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = fcmp uno float %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
char *langRomTypeEseSCC256() { return "256kB Ese-SCC"; }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"256kB Ese-SCC\00"
define i8* @langRomTypeEseSCC256() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"256kB Ese-SCC\00"
define i8* @langRomTypeEseSCC256() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
void batadv_nc_mesh_free(struct batadv_priv *bat_priv) { return; }


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

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

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

LLVM IR (-O2):
%struct.batadv_priv = type opaque
define void @batadv_nc_mesh_free(%struct.batadv_priv* nocapture %0) {
ret void
}
/* Variables and functions */
int geteuid();
int getuid();
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  printf("%d, e %d\n", getuid(), geteuid());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <getuid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <geteuid@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d, e %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getuid()
%2 = tail call i32 (...) @geteuid()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret i32 0
}
long foo(long a, long b) {
  if (b == 0)
    return 0;
  return a / b;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1124 <foo+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1132 <foo+0x32>
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
test   %rsi,%rsi
je     111a <foo+0x1a>
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     111d <foo+0x1d>
mov    %rdi,%rax
cqto
idiv   %rsi
ret
xor    %eax,%eax
ret
mov    %edi,%eax
xor    %edx,%edx
div    %esi
ret

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

LLVM IR (-O2):
define i64 @foo(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = sdiv i64 %0, %1
br label %6
6: ; preds = %2, %4
%7 = phi i64 [ %5, %4 ], [ 0, %2 ]
ret i64 %7
}
int main(int argc, char *argv[]) {
  int a = 0;
  int i = 0;
  int c = 0;
  while (i < 10) {
    i++;
    a++;
  }
  c = i;
  if (a < 20) {
  ERROR:
    goto ERROR;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0xa,-0x18(%rbp)
jge    1148 <main+0x48>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <main+0x27>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x14,-0x14(%rbp)
jge    1162 <main+0x62>
jmp    115d <main+0x5d>
jmp    115d <main+0x5d>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *ret = malloc(size);
  if (!ret)
    die("Out of memory, malloc failed");
  return ret;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <xmalloc+0x30>
lea    0xeb5(%rip),%rdi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <xmalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Out of memory, malloc failed\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [29 x i8] c"Out of memory, malloc failed\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ PTRACE_TRACEME;
int /*<<< orphan*/ SIGUSR1;
int err_out(char *);
int ptrace(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *);
int /*<<< orphan*/ raise(int /*<<< orphan*/);
int do_child(void) {
  if (ptrace(PTRACE_TRACEME, 0, NULL, NULL) == -1)
    return err_out("ptrace traceme");
  raise(SIGUSR1);
  return 0;
}


x86 assembly (clang, -O0):
<do_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1050 <ptrace@plt>
cmp    $0xffffffff,%eax
jne    116c <do_child+0x3c>
lea    0xea1(%rip),%rdi
call   1040 <err_out@plt>
mov    %eax,-0x4(%rbp)
jmp    1181 <do_child+0x51>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_child>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <ptrace@plt>
cmp    $0xffffffff,%eax
je     115c <do_child+0x2c>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xe9d(%rip),%rdi
pop    %rax
jmp    1040 <err_out@plt>

LLVM IR (-O0):
@PTRACE_TRACEME = global i32 0
@.str = [15 x i8] c"ptrace traceme\00"
@SIGUSR1 = global i32 0
define i32 @do_child() {
%1 = alloca i32
%2 = load i32, i32* @PTRACE_TRACEME
%3 = call i32 @ptrace(i32 %2, i32 0, i32* null, i32* null)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @err_out(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 %6, i32* %1
br label %10
7: ; preds = %0
%8 = load i32, i32* @SIGUSR1
%9 = call i32 @raise(i32 %8)
store i32 0, i32* %1
br label %10
10: ; preds = %7, %5
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@PTRACE_TRACEME = global i32 0
@.str = [15 x i8] c"ptrace traceme\00"
@SIGUSR1 = global i32 0
define i32 @do_child() {
%1 = load i32, i32* @PTRACE_TRACEME
%2 = tail call i32 @ptrace(i32 %1, i32 0, i32* null, i32* null)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @err_out(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %9
6: ; preds = %0
%7 = load i32, i32* @SIGUSR1
%8 = tail call i32 @raise(i32 %7)
br label %9
9: ; preds = %6, %4
%10 = phi i32 [ %5, %4 ], [ 0, %6 ]
ret i32 %10
}
float minf(float a, float b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<minf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <minf+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <minf+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<minf>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @minf(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 = fcmp ogt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @minf(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
void *occampi_ctclienttrace_chook_copy(void *chook) { return chook; }


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

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

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

LLVM IR (-O2):
define i8* @occampi_ctclienttrace_chook_copy(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ xref(char *, int);
void incref(char *name) { xref(name, 1); }


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

x86 assembly (clang, -O2):
<incref>:
mov    $0x1,%esi
jmp    1030 <xref@plt>

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

LLVM IR (-O2):
define void @incref(i8* %0) {
%2 = tail call i32 @xref(i8* %0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xfa() {
  Assert_real((isgraph(250) == 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_isgraph.c",
              1255, ("isgraph should be 0 for 0xfa"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xfa>:
push   %rax
mov    $0xfa,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4e7,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xfa\00"
define void @t_isgraph_0xfa() {
%1 = call i64 @isgraph(i32 250)
%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 1255, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xfa\00"
define void @t_isgraph_0xfa() {
%1 = tail call i64 @isgraph(i32 250)
%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 1255, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void edit_scripts(void) {}


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

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

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

LLVM IR (-O2):
define void @edit_scripts() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_brev_ldw(int *, int *, int);
int sub(int *);
int brev_store_elimination_test4(int *ptr, int mod) {
  int dst = 100;
  __builtin_brev_ldw(ptr, &dst, mod);
  return sub(&dst);
}


x86 assembly (clang, -O0):
<brev_store_elimination_test4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x64,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    -0x10(%rbp),%rsi
call   1030 <__builtin_brev_ldw@plt>
lea    -0x10(%rbp),%rdi
call   1040 <sub@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brev_store_elimination_test4>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%edx
movl   $0x64,0xc(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
call   1030 <__builtin_brev_ldw@plt>
mov    %rbx,%rdi
call   1040 <sub@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @brev_store_elimination_test4(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 100, i32* %5
%6 = load i32*, i32** %3
%7 = load i32, i32* %4
%8 = call i32 @__builtin_brev_ldw(i32* %6, i32* %5, i32 %7)
%9 = call i32 @sub(i32* %5)
ret i32 %9
}

LLVM IR (-O2):
define i32 @brev_store_elimination_test4(i32* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 100, i32* %3
%5 = call i32 @__builtin_brev_ldw(i32* %0, i32* %3, i32 %1)
%6 = call i32 @sub(i32* %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ rs_encode_(int *, int *);
void rs_encode__(int *dgen, int *sent) { rs_encode_(dgen, sent); }


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

x86 assembly (clang, -O2):
<rs_encode__>:
jmp    1030 <rs_encode_@plt>

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

LLVM IR (-O2):
define void @rs_encode__(i32* %0, i32* %1) {
%3 = tail call i32 @rs_encode_(i32* %0, i32* %1)
ret void
}
/* Variables and functions */
size_t utf8codepointsize(int chr) {
  if (0 == ((int)0xffffff80 & chr)) {
    return 1;
  } else if (0 == ((int)0xfffff800 & chr)) {
    return 2;
  } else if (0 == ((int)0xffff0000 & chr)) {
    return 3;
  } else {
    return 4;
  }
}


x86 assembly (clang, -O0):
<utf8codepointsize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xffffff80,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1127 <utf8codepointsize+0x27>
movq   $0x1,-0x8(%rbp)
jmp    116f <utf8codepointsize+0x6f>
mov    -0xc(%rbp),%ecx
and    $0xfffff800,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1147 <utf8codepointsize+0x47>
movq   $0x2,-0x8(%rbp)
jmp    116f <utf8codepointsize+0x6f>
mov    -0xc(%rbp),%ecx
and    $0xffff0000,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1167 <utf8codepointsize+0x67>
movq   $0x3,-0x8(%rbp)
jmp    116f <utf8codepointsize+0x6f>
movq   $0x4,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8codepointsize>:
mov    $0x1,%eax
cmp    $0x80,%edi
jb     1129 <utf8codepointsize+0x29>
mov    $0x2,%eax
cmp    $0x800,%edi
jb     1129 <utf8codepointsize+0x29>
cmp    $0x10000,%edi
mov    $0x4,%eax
sbb    $0x0,%rax
ret

LLVM IR (-O0):
define i64 @utf8codepointsize(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 -128, %4
%6 = icmp eq i32 0, %5
br i1 %6, label %7, label %8
7: ; preds = %1
store i64 1, i64* %2
br label %19
8: ; preds = %1
%9 = load i32, i32* %3
%10 = and i32 -2048, %9
%11 = icmp eq i32 0, %10
br i1 %11, label %12, label %13
12: ; preds = %8
store i64 2, i64* %2
br label %19
13: ; preds = %8
%14 = load i32, i32* %3
%15 = and i32 -65536, %14
%16 = icmp eq i32 0, %15
br i1 %16, label %17, label %18
17: ; preds = %13
store i64 3, i64* %2
br label %19
18: ; preds = %13
store i64 4, i64* %2
br label %19
19: ; preds = %18, %17, %12, %7
%20 = load i64, i64* %2
ret i64 %20
}

LLVM IR (-O2):
define i64 @utf8codepointsize(i32 %0) {
%2 = icmp ult i32 %0, 128
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 2048
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = icmp ult i32 %0, 65536
%7 = select i1 %6, i64 3, i64 4
br label %8
8: ; preds = %5, %3, %1
%9 = phi i64 [ 1, %1 ], [ 2, %3 ], [ %7, %5 ]
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ watch_log(char *);
long int syscall(long int number, ...) {
  watch_log("syscall\n");
  return 0;
}


x86 assembly (clang, -O0):
<syscall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <watch_log@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"syscall\0A\00"
define i64 @syscall(i64 %0, ...) {
%2 = tail call i32 @watch_log(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i64 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;
typedef int uint32_t;
typedef int time_t;

/* Variables and functions */
int xTime_getTime(int *, int /*<<< orphan*/);
uint64_t xTime_centiTime(uint8_t u8Type) {
  register uint64_t u64Time;
  uint32_t u32NanoSec = 0;
  if ((u64Time = xTime_getTime(&u32NanoSec, u8Type)) == (time_t)-1) {
    goto xTime_centiTime_cleanup;
  }
  u64Time = u64Time * 100 + u32NanoSec / 10000000;
xTime_centiTime_cleanup:
  return u64Time;
}


x86 assembly (clang, -O0):
<xTime_centiTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%esi
lea    -0xc(%rbp),%rdi
call   1030 <xTime_getTime@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xffffffff,%eax
jne    113f <xTime_centiTime+0x2f>
jmp    115b <xTime_centiTime+0x4b>
imul   $0x64,-0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x989680,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xTime_centiTime>:
push   %rax
mov    %edi,%esi
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <xTime_getTime@plt>
cmp    $0xffffffff,%eax
je     114a <xTime_centiTime+0x3a>
imul   $0x64,%eax,%ecx
movslq 0x4(%rsp),%rax
imul   $0x6b5fca6b,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x36,%rax
add    %edx,%eax
add    %ecx,%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @xTime_centiTime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %4
%5 = load i32, i32* %2
%6 = call i32 @xTime_getTime(i32* %4, i32 %5)
store i32 %6, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %1
br label %15
9: ; preds = %1
%10 = load i32, i32* %3
%11 = mul nsw i32 %10, 100
%12 = load i32, i32* %4
%13 = sdiv i32 %12, 10000000
%14 = add nsw i32 %11, %13
store i32 %14, i32* %3
br label %15
15: ; preds = %9, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @xTime_centiTime(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @xTime_getTime(i32* %2, i32 %0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = mul nsw i32 %4, 100
%8 = load i32, i32* %2
%9 = sdiv i32 %8, 10000000
%10 = add nsw i32 %9, %7
br label %11
11: ; preds = %1, %6
%12 = phi i32 [ -1, %1 ], [ %10, %6 ]
ret i32 %12
}
const char *get_lame_short_version(void) {
  static const char *const str = "LAME_MAJOR_VERSION"
                                 "."
                                 "LAME_MINOR_VERSION";
  return str;
}


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

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

LLVM IR (-O0):
@get_lame_short_version.str = internal constant i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i32 0, i32 0)
@.str = [38 x i8] c"LAME_MAJOR_VERSION.LAME_MINOR_VERSION\00"
define i8* @get_lame_short_version() {
ret i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i32 0, i32 0)
}

LLVM IR (-O2):
@.str = [38 x i8] c"LAME_MAJOR_VERSION.LAME_MINOR_VERSION\00"
define i8* @get_lame_short_version() {
ret i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cWriteWord(unsigned char, unsigned short);
void SensorSetReg_MT9V112(unsigned short uAddr, unsigned short uVal) {
  VIM_SIF_I2cWriteWord((unsigned char)uAddr, (unsigned short)uVal);
}


x86 assembly (clang, -O0):
<SensorSetReg_MT9V112>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
movzbl %al,%edi
movzwl -0x4(%rbp),%esi
call   1030 <VIM_SIF_I2cWriteWord@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetReg_MT9V112>:
movzbl %dil,%edi
jmp    1030 <VIM_SIF_I2cWriteWord@plt>

LLVM IR (-O0):
define void @SensorSetReg_MT9V112(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = trunc i16 %5 to i8
%7 = load i16, i16* %4
%8 = call i32 @VIM_SIF_I2cWriteWord(i8 zeroext %6, i16 zeroext %7)
ret void
}

LLVM IR (-O2):
define void @SensorSetReg_MT9V112(i16 zeroext %0, i16 zeroext %1) {
%3 = trunc i16 %0 to i8
%4 = tail call i32 @VIM_SIF_I2cWriteWord(i8 zeroext %3, i16 zeroext %1)
ret void
}
/* Variables and functions */
float powf(float const, float const);
float Maths_Pow(const float number, const float power) {
  return powf(number, power);
}


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

x86 assembly (clang, -O2):
<Maths_Pow>:
jmp    1030 <powf@plt>

LLVM IR (-O0):
define float @Maths_Pow(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 = call float @powf(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @Maths_Pow(float %0, float %1) {
%3 = tail call float @powf(float %0, float %1)
ret float %3
}
/* Variables and functions */
double M_PI;
double sin(double);
double myfun(double x, void *data) { return sin(4.0 * M_PI * x); }


x86 assembly (clang, -O0):
<myfun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  0xed7(%rip),%xmm0
mov    0x2eb8(%rip),%rax
mulsd  (%rax),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myfun>:
mov    0x2ed1(%rip),%rax
movsd  (%rax),%xmm1
mulsd  0xedd(%rip),%xmm1
mulsd  %xmm1,%xmm0
jmp    1030 <sin@plt>

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @myfun(double %0, i8* %1) {
%3 = alloca double
%4 = alloca i8*
store double %0, double* %3
store i8* %1, i8** %4
%5 = load double, double* @M_PI
%6 = fmul double 4.000000e+00, %5
%7 = load double, double* %3
%8 = fmul double %6, %7
%9 = call double @sin(double %8)
ret double %9
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @myfun(double %0, i8* nocapture readnone %1) {
%3 = load double, double* @M_PI
%4 = fmul double %3, 4.000000e+00
%5 = fmul double %4, %0
%6 = tail call double @sin(double %5)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ printf(char *, size_t);
void *smalloc(size_t size) {
  void *ptr = NULL;
  if ((ptr = malloc(size)) == NULL) {
    printf("Allocation of %i bytes failed\n", size);
    exit(255);
  }
  memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<smalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1185 <smalloc+0x45>
mov    -0x8(%rbp),%rsi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
mov    $0xff,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <malloc@plt>
test   %rax,%rax
je     116c <smalloc+0x2c>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1040 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe8d(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    $0xff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Allocation of %i bytes failed\0A\00"
define i8* @smalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
store i8* null, i8** %3
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i64, i64* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %8)
%10 = call i32 @exit(i32 255)
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = load i64, i64* %2
%14 = call i32 @memset(i8* %12, i32 0, i64 %13)
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [31 x i8] c"Allocation of %i bytes failed\0A\00"
define i8* @smalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %0)
%6 = tail call i32 @exit(i32 255)
unreachable
7: ; preds = %1
%8 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
int fun_coverage_for(int x) {
  int ret = 0;
  int iloop;
  for (iloop = 0; iloop < x; iloop++) {
    ret += 2;
  }
  return ret;
}


x86 assembly (clang, -O0):
<fun_coverage_for>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1138 <fun_coverage_for+0x38>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <fun_coverage_for+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_coverage_for>:
lea    (%rdi,%rdi,1),%ecx
xor    %eax,%eax
test   %edi,%edi
cmovg  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fun_coverage_for(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %12, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 2
store i32 %11, i32* %3
br label %12
12: ; preds = %9
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
store i32 %14, i32* %4
br label %5
15: ; preds = %5
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @fun_coverage_for(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = shl nuw i32 %0, 1
%4 = select i1 %2, i32 %3, i32 0
ret i32 %4
}
/* Variables and functions */
double cos(double);
scalar_t__ pow(double, double);
double sin(double);
double sqrt(scalar_t__);
double ellipse(double angle, double x, double y) {
  return (1.0 / sqrt(pow(cos(angle) / x, 2.0) + pow(sin(angle) / y, 2.0)));
}


x86 assembly (clang, -O0):
<ellipse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
divsd  -0x10(%rbp),%xmm0
movsd  0xe9a(%rip),%xmm1
call   1050 <pow@plt>
mov    %rax,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
divsd  -0x18(%rbp),%xmm0
movsd  0xe7a(%rip),%xmm1
call   1050 <pow@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe56(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ellipse>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
call   1040 <cos@plt>
divsd  0x8(%rsp),%xmm0
movsd  0xe96(%rip),%xmm1
call   1050 <pow@plt>
mov    %rax,%rbx
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
divsd  0x18(%rsp),%xmm0
movsd  0xe75(%rip),%xmm1
call   1050 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1060 <sqrt@plt>
movsd  0xe65(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @ellipse(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = call double @cos(double %7)
%9 = load double, double* %5
%10 = fdiv double %8, %9
%11 = call i64 @pow(double %10, double 2.000000e+00)
%12 = load double, double* %4
%13 = call double @sin(double %12)
%14 = load double, double* %6
%15 = fdiv double %13, %14
%16 = call i64 @pow(double %15, double 2.000000e+00)
%17 = add nsw i64 %11, %16
%18 = call double @sqrt(i64 %17)
%19 = fdiv double 1.000000e+00, %18
ret double %19
}

LLVM IR (-O2):
define double @ellipse(double %0, double %1, double %2) {
%4 = tail call double @cos(double %0)
%5 = fdiv double %4, %1
%6 = tail call i64 @pow(double %5, double 2.000000e+00)
%7 = tail call double @sin(double %0)
%8 = fdiv double %7, %2
%9 = tail call i64 @pow(double %8, double 2.000000e+00)
%10 = add nsw i64 %9, %6
%11 = tail call double @sqrt(i64 %10)
%12 = fdiv double 1.000000e+00, %11
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  if (n != 0) {
    if (n > 0) {
      printf("positive");
    } else {
      printf("negative");
    }
  } else
    printf("zero");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
je     1175 <main+0x55>
cmpl   $0x0,-0x8(%rbp)
jle    1164 <main+0x44>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    1170 <main+0x50>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
jmp    1181 <main+0x61>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
lea    0xec5(%rip),%rax
lea    0xec7(%rip),%rcx
cmovg  %rax,%rcx
lea    0xec5(%rip),%rdi
cmovne %rcx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"positive\00"
@.str.2 = [9 x i8] c"negative\00"
@.str.3 = [5 x i8] c"zero\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %13
11: ; preds = %6
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
br label %16
14: ; preds = %0
%15 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %16
16: ; preds = %14, %13
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"positive\00"
@.str.2 = [9 x i8] c"negative\00"
@.str.3 = [5 x i8] c"zero\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 0
%6 = icmp sgt i32 %4, 0
%7 = select i1 %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)
%8 = select i1 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %7
%9 = call i32 @printf(i8* dereferenceable(1) %8)
ret i32 0
}