xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _MM_SET_EXCEPTION_STATE(unsigned int);
void test_MM_SET_EXCEPTION_STATE(unsigned int A) { _MM_SET_EXCEPTION_STATE(A); }


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

x86 assembly (clang, -O2):
<test_MM_SET_EXCEPTION_STATE>:
jmp    1030 <_MM_SET_EXCEPTION_STATE@plt>

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

LLVM IR (-O2):
define void @test_MM_SET_EXCEPTION_STATE(i32 %0) {
%2 = tail call i32 @_MM_SET_EXCEPTION_STATE(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgior(void) { gen("or\tax,cx"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"or\09ax,cx\00"
define void @cgior() {
%1 = call i32 @gen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"or\09ax,cx\00"
define void @cgior() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
long GPUgetMode();
long ZN_GPUgetMode(void) { return GPUgetMode(); }


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

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

LLVM IR (-O0):
define i64 @ZN_GPUgetMode() {
%1 = call i64 (...) @GPUgetMode()
ret i64 %1
}

LLVM IR (-O2):
define i64 @ZN_GPUgetMode() {
%1 = tail call i64 (...) @GPUgetMode()
ret i64 %1
}
/* Variables and functions */
scalar_t__ malloc(unsigned int);
int /*<<< orphan*/ nrerror(char *);
int *intVector(long nLow, long nHigh) {
  int *v;
  v = (int *)malloc((unsigned int)((nHigh - nLow + 1 + 1) * sizeof(int)));
  if (!v)
    nrerror("Memory allocation failure in intVector().");
  return v - nLow + 1;
}


x86 assembly (clang, -O0):
<intVector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x8(%rbp),%rax
add    $0x1,%rax
add    $0x1,%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1166 <intVector+0x46>
lea    0xe9f(%rip),%rdi
call   1030 <nrerror@plt>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x4,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intVector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %r14d,%esi
lea    0x8(,%rsi,4),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114a <intVector+0x2a>
lea    0xebb(%rip),%rdi
call   1030 <nrerror@plt>
shl    $0x2,%r14
sub    %r14,%rbx
add    $0x4,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Memory allocation failure in intVector().\00"
define i32* @intVector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 1
%10 = add nsw i64 %9, 1
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i64 @malloc(i32 %12)
%14 = inttoptr i64 %13 to i32*
store i32* %14, i32** %5
%15 = load i32*, i32** %5
%16 = icmp ne i32* %15, null
br i1 %16, label %19, label %17
17: ; preds = %2
%18 = call i32 @nrerror(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %2
%20 = load i32*, i32** %5
%21 = load i64, i64* %3
%22 = sub i64 0, %21
%23 = getelementptr inbounds i32, i32* %20, i64 %22
%24 = getelementptr inbounds i32, i32* %23, i64 1
ret i32* %24
}

LLVM IR (-O2):
@.str = [42 x i8] c"Memory allocation failure in intVector().\00"
define i32* @intVector(i64 %0, i64 %1) {
%3 = sub nsw i64 %1, %0
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 2
%6 = add i32 %5, 8
%7 = tail call i64 @malloc(i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = tail call i32 @nrerror(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
%12 = inttoptr i64 %7 to i32*
%13 = sub i64 0, %0
%14 = getelementptr inbounds i32, i32* %12, i64 %13
%15 = getelementptr inbounds i32, i32* %14, i64 1
ret i32* %15
}
void p16e_pps_out_rst(void) {}


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

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

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

LLVM IR (-O2):
define void @p16e_pps_out_rst() {
ret void
}
unsigned long long int badshift(unsigned long long int v) {
  return v << 31 << 1;
}


x86 assembly (clang, -O0):
<badshift>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x1f,%rax
shl    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<badshift>:
mov    %rdi,%rax
shl    $0x20,%rax
ret

LLVM IR (-O0):
define i64 @badshift(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = shl i64 %3, 31
%5 = shl i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
define i64 @badshift(i64 %0) {
%2 = shl i64 %0, 32
ret i64 %2
}
/* Variables and functions */
int escKey();
int /*<<< orphan*/ eset(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getch_(int);
int Mgch(int nargs, int *args) {
  int x = getch_(1);
  if (x == 0x1b)
    return escKey();
  if (x == 0x1b)
    eset(99);
  if (x == 0x03)
    exit(0);
  return x;
}


x86 assembly (clang, -O0):
<Mgch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
call   1050 <getch_@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1b,-0x14(%rbp)
jne    1175 <Mgch+0x35>
mov    $0x0,%al
call   1040 <escKey@plt>
mov    %eax,-0x4(%rbp)
jmp    11a0 <Mgch+0x60>
cmpl   $0x1b,-0x14(%rbp)
jne    1189 <Mgch+0x49>
mov    $0x63,%edi
call   1030 <eset@plt>
cmpl   $0x3,-0x14(%rbp)
jne    119a <Mgch+0x5a>
xor    %edi,%edi
call   1060 <exit@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mgch>:
push   %rax
mov    $0x1,%edi
call   1040 <getch_@plt>
cmp    $0x1b,%eax
je     1147 <Mgch+0x17>
cmp    $0x3,%eax
je     114f <Mgch+0x1f>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <escKey@plt>
xor    %edi,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
define i32 @Mgch(i32 %0, i32* nocapture readnone %1) {
%3 = tail call i32 @getch_(i32 1)
switch i32 %3, label %8 [
i32 27, label %4
i32 3, label %6
]
4: ; preds = %2
%5 = tail call i32 (...) @escKey()
br label %8
6: ; preds = %2
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %2, %4
%9 = phi i32 [ %5, %4 ], [ %3, %2 ]
ret i32 %9
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_emit_interfaces_removed(void *bus, const char *path,
                               const char *interface, ...) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_emit_interfaces_removed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
neg    %eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_emit_interfaces_removed>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_emit_interfaces_removed(i8* %0, i8* %1, i8* %2, ...) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_emit_interfaces_removed(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, ...) {
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
ret i32 %5
}
/* Type definitions */
struct trb_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
void **trb_probe(struct trb_table *, void *);
void(trb_assert_insert)(struct trb_table *table, void *item) {
  void **p = trb_probe(table, item);
  assert(p != NULL && *p == item);
}


x86 assembly (clang, -O0):
<trb_assert_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <trb_probe@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x18(%rbp)
mov    %al,-0x19(%rbp)
je     1162 <trb_assert_insert+0x42>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trb_assert_insert>:
push   %rbx
mov    %rsi,%rbx
call   1030 <trb_probe@plt>
xor    %edi,%edi
test   %rax,%rax
je     1137 <trb_assert_insert+0x17>
cmp    %rbx,(%rax)
sete   %dil
pop    %rbx
jmp    1040 <assert@plt>

LLVM IR (-O0):
%struct.trb_table = type { i32 }
define void @trb_assert_insert(%struct.trb_table* %0, i8* %1) {
%3 = alloca %struct.trb_table*
%4 = alloca i8*
%5 = alloca i8**
store %struct.trb_table* %0, %struct.trb_table** %3
store i8* %1, i8** %4
%6 = load %struct.trb_table*, %struct.trb_table** %3
%7 = load i8*, i8** %4
%8 = call i8** @trb_probe(%struct.trb_table* %6, i8* %7)
store i8** %8, i8*** %5
%9 = load i8**, i8*** %5
%10 = icmp ne i8** %9, null
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = load i8*, i8** %12
%14 = load i8*, i8** %4
%15 = icmp eq i8* %13, %14
br label %16
16: ; preds = %11, %2
%17 = phi i1 [ false, %2 ], [ %15, %11 ]
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
ret void
}

LLVM IR (-O2):
%struct.trb_table = type { i32 }
define void @trb_assert_insert(%struct.trb_table* %0, i8* %1) {
%3 = tail call i8** @trb_probe(%struct.trb_table* %0, i8* %1)
%4 = icmp eq i8** %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %1
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
%11 = tail call i32 @assert(i32 %10)
ret void
}
int is_line_no_valid(int line_no) {
  return (line_no >= 0 && line_no <= 99) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_line_no_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <is_line_no_valid+0x20>
cmpl   $0x63,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_line_no_valid>:
xor    %eax,%eax
cmp    $0x64,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @is_line_no_valid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 99
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @is_line_no_valid(i32 %0) {
%2 = icmp ult i32 %0, 100
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_length_standard_solution_string(int k, int *n) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(200, &k, n, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_length_standard_solution_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xc8,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_length_standard_solution_string>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0xc8,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solcon_length_standard_solution_string(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 200, i32* %3, i32* %7, double* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @solcon_length_standard_solution_string(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 200, i32* %3, i32* %1, double* undef)
ret i32 %4
}
/* Variables and functions */
int get_relaxed();
int __get_relaxed(char *input) { return get_relaxed(); }


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

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

LLVM IR (-O0):
define i32 @__get_relaxed(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @get_relaxed()
ret i32 %3
}

LLVM IR (-O2):
define i32 @__get_relaxed(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @get_relaxed()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ sqrt(float);
void quadrado_perfeito(float x) {
  if ((int)sqrt(x) * (int)sqrt(x) == x) {
    printf("Quadrado perfeito\n");
  } else {
    printf("Nao eh um quadrado perfeito\n");
  }
}


x86 assembly (clang, -O0):
<quadrado_perfeito>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <sqrt@plt>
mov    %eax,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <sqrt@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%eax
imul   %ecx,%eax
cvtsi2ss %eax,%xmm0
ucomiss -0x4(%rbp),%xmm0
jne    1172 <quadrado_perfeito+0x52>
jp     1172 <quadrado_perfeito+0x52>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
jmp    117e <quadrado_perfeito+0x5e>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadrado_perfeito>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1040 <sqrt@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1040 <sqrt@plt>
imul   %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
ucomiss 0xc(%rsp),%xmm0
lea    0xeac(%rip),%rax
lea    0xec1(%rip),%rdi
cmovne %rax,%rdi
cmovp  %rax,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Quadrado perfeito\0A\00"
@.str.1 = [29 x i8] c"Nao eh um quadrado perfeito\0A\00"
define void @quadrado_perfeito(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @sqrt(float %3)
%5 = trunc i64 %4 to i32
%6 = load float, float* %2
%7 = call i64 @sqrt(float %6)
%8 = trunc i64 %7 to i32
%9 = mul nsw i32 %5, %8
%10 = sitofp i32 %9 to float
%11 = load float, float* %2
%12 = fcmp oeq float %10, %11
br i1 %12, label %13, label %15
13: ; preds = %1
%14 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %17
15: ; preds = %1
%16 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %13
ret void
}

LLVM IR (-O2):
@str = [28 x i8] c"Nao eh um quadrado perfeito\00"
@str.2 = [18 x i8] c"Quadrado perfeito\00"
define void @quadrado_perfeito(float %0) {
%2 = tail call i64 @sqrt(float %0)
%3 = trunc i64 %2 to i32
%4 = tail call i64 @sqrt(float %0)
%5 = trunc i64 %4 to i32
%6 = mul nsw i32 %5, %3
%7 = sitofp i32 %6 to float
%8 = fcmp oeq float %7, %0
%9 = select i1 %8, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0)
%10 = tail call i32 @puts(i8* dereferenceable(1) %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cria_arquivos(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int quant = 10;
  int tam;
  printf("Digite o tamanho em KB:");
  scanf("%d", &tam);
  cria_arquivos(quant, tam);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <cria_arquivos@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%esi
mov    $0xa,%edi
call   1030 <cria_arquivos@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Digite o tamanho em KB:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @cria_arquivos(i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Digite o tamanho em KB:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @cria_arquivos(i32 10, i32 %5)
ret i32 0
}
/* Variables and functions */
int ints_extreme(int *, int, int /*<<< orphan*/);
int ints_max(int *ints, int size) { return (ints_extreme(ints, size, 0)); }


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

x86 assembly (clang, -O2):
<ints_max>:
xor    %edx,%edx
jmp    1030 <ints_extreme@plt>

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

LLVM IR (-O2):
define i32 @ints_max(i32* %0, i32 %1) {
%3 = tail call i32 @ints_extreme(i32* %0, i32 %1, i32 0)
ret i32 %3
}
/* Variables and functions */
double ln_solve_barker(double, double);
double ln_get_par_radius_vector(double q, double t) {
  double s;
  s = ln_solve_barker(q, t);
  return q * (1.0 + s * s);
}


x86 assembly (clang, -O0):
<ln_get_par_radius_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <ln_solve_barker@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xeaf(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_par_radius_vector>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <ln_solve_barker@plt>
mulsd  %xmm0,%xmm0
addsd  0xed9(%rip),%xmm0
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ln_get_par_radius_vector(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = call double @ln_solve_barker(double %6, double %7)
store double %8, double* %5
%9 = load double, double* %3
%10 = load double, double* %5
%11 = load double, double* %5
%12 = call double @llvm.fmuladd.f64(double %10, double %11, double 1.000000e+00)
%13 = fmul double %9, %12
ret double %13
}

LLVM IR (-O2):
define double @ln_get_par_radius_vector(double %0, double %1) {
%3 = tail call double @ln_solve_barker(double %0, double %1)
%4 = tail call double @llvm.fmuladd.f64(double %3, double %3, double 1.000000e+00)
%5 = fmul double %4, %0
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ cls();
int /*<<< orphan*/ initialize_array();
int /*<<< orphan*/ start_ui();
int main() {
  cls();
  initialize_array();
  start_ui();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <cls@plt>
mov    $0x0,%al
call   1040 <initialize_array@plt>
mov    $0x0,%al
call   1050 <start_ui@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <cls@plt>
xor    %eax,%eax
call   1040 <initialize_array@plt>
xor    %eax,%eax
call   1050 <start_ui@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @cls()
%3 = call i32 (...) @initialize_array()
%4 = call i32 (...) @start_ui()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @cls()
%2 = tail call i32 (...) @initialize_array()
%3 = tail call i32 (...) @start_ui()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int getpid();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sleep(int);
void child_code(int delay) {
  printf("child %d here, will sleep for %d seconds\n", getpid(), delay);
  sleep(delay);
  printf("child done, start to exit\n");
  exit(17);
}


x86 assembly (clang, -O0):
<child_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
mov    -0x4(%rbp),%edx
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1060 <sleep@plt>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x11,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<child_code>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xe9f(%rip),%rdi
mov    %eax,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebx,%edi
call   1070 <sleep@plt>
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
mov    $0x11,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"child %d here, will sleep for %d seconds\0A\00"
@.str.1 = [27 x i8] c"child done, start to exit\0A\00"
define void @child_code(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @getpid()
%4 = load i32, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @sleep(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @exit(i32 17)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"child %d here, will sleep for %d seconds\0A\00"
@str = [26 x i8] c"child done, start to exit\00"
define void @child_code(i32 %0) {
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %0)
%4 = tail call i32 @sleep(i32 %0)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 17)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ plfit_error_handler(char const *, char const *, int, int);
void plfit_error(const char *reason, const char *file, int line,
                 int plfit_errno) {
  plfit_error_handler(reason, file, line, plfit_errno);
}


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

x86 assembly (clang, -O2):
<plfit_error>:
jmp    1030 <plfit_error_handler@plt>

LLVM IR (-O0):
define void @plfit_error(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @plfit_error_handler(i8* %9, i8* %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @plfit_error(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @plfit_error_handler(i8* %0, i8* %1, i32 %2, i32 %3)
ret void
}
/* Type definitions */
struct dw_line_info_struct {
  int dummy;
};

/* Variables and functions */
scalar_t__ ggc_test_and_set_mark(struct dw_line_info_struct *const);
void gt_ggc_mx_dw_line_info_struct(void *x_p) {
  struct dw_line_info_struct *const x = (struct dw_line_info_struct *)x_p;
  if (ggc_test_and_set_mark(x)) {
  }
}


x86 assembly (clang, -O0):
<gt_ggc_mx_dw_line_info_struct>:
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 <ggc_test_and_set_mark@plt>
cmp    $0x0,%rax
je     113c <gt_ggc_mx_dw_line_info_struct+0x2c>
jmp    113c <gt_ggc_mx_dw_line_info_struct+0x2c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt_ggc_mx_dw_line_info_struct>:
jmp    1030 <ggc_test_and_set_mark@plt>

LLVM IR (-O0):
%struct.dw_line_info_struct = type { i32 }
define void @gt_ggc_mx_dw_line_info_struct(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.dw_line_info_struct*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.dw_line_info_struct*
store %struct.dw_line_info_struct* %5, %struct.dw_line_info_struct** %3
%6 = load %struct.dw_line_info_struct*, %struct.dw_line_info_struct** %3
%7 = call i64 @ggc_test_and_set_mark(%struct.dw_line_info_struct* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
%struct.dw_line_info_struct = type { i32 }
define void @gt_ggc_mx_dw_line_info_struct(i8* %0) {
%2 = bitcast i8* %0 to %struct.dw_line_info_struct*
%3 = tail call i64 @ggc_test_and_set_mark(%struct.dw_line_info_struct* %2)
ret void
}
int calc_n(int w) {
  if (w == 3)
    return 3;
  if (w == 4)
    return 5;
  if (w == 5)
    return 11;
  if (w == 6)
    return 41;
  return 0;
}


x86 assembly (clang, -O0):
<calc_n>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    111d <calc_n+0x1d>
movl   $0x3,-0x4(%rbp)
jmp    1166 <calc_n+0x66>
cmpl   $0x4,-0x8(%rbp)
jne    1133 <calc_n+0x33>
movl   $0x5,-0x4(%rbp)
jmp    1166 <calc_n+0x66>
cmpl   $0x5,-0x8(%rbp)
jne    1149 <calc_n+0x49>
movl   $0xb,-0x4(%rbp)
jmp    1166 <calc_n+0x66>
cmpl   $0x6,-0x8(%rbp)
jne    115f <calc_n+0x5f>
movl   $0x29,-0x4(%rbp)
jmp    1166 <calc_n+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_n>:
add    $0xfffffffd,%edi
xor    %eax,%eax
cmp    $0x3,%edi
ja     1117 <calc_n+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

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

LLVM IR (-O2):
@switch.table.calc_n = [4 x i32] [i32 3, i32 5, i32 11, i32 41]
define i32 @calc_n(i32 %0) {
%2 = add i32 %0, -3
%3 = icmp ult i32 %2, 4
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.calc_n, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
int iscntrl(int c) { return (c < 0x20 && c); }


x86 assembly (clang, -O0):
<iscntrl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jge    1120 <iscntrl+0x20>
cmpl   $0x0,-0x4(%rbp)
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscntrl>:
cmp    $0x20,%edi
setl   %al
test   %edi,%edi
setne  %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
%2 = icmp slt i32 %0, 32
%3 = icmp ne i32 %0, 0
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void gensltiu() {}


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

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

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

LLVM IR (-O2):
define void @gensltiu() {
ret void
}
/* Variables and functions */
char *mlr_malloc_or_die(int);
int snprintf(int /*<<< orphan*/ *, int /*<<< orphan*/, char *,
             unsigned long long);
int /*<<< orphan*/ sprintf(char *, char *, unsigned long long);
char *mlr_alloc_string_from_ull(unsigned long long value) {
  int n = snprintf(NULL, 0, "%llu", value);
  char *string = mlr_malloc_or_die(n + 1);
  sprintf(string, "%llu", value);
  return string;
}


x86 assembly (clang, -O0):
<mlr_alloc_string_from_ull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
lea    0xeb3(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <mlr_malloc_or_die@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe8d(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlr_alloc_string_from_ull>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
lea    0xec1(%rip),%r14
xor    %edi,%edi
xor    %esi,%esi
mov    %r14,%rdx
mov    %r15,%rcx
call   1030 <snprintf@plt>
lea    0x1(%rax),%edi
call   1040 <mlr_malloc_or_die@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%llu\00"
define i8* @mlr_alloc_string_from_ull(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i8*
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = call i32 @snprintf(i32* null, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = call i8* @mlr_malloc_or_die(i32 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i64, i64* %2
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %11)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"%llu\00"
define i8* @mlr_alloc_string_from_ull(i64 %0) {
%2 = tail call i32 @snprintf(i32* null, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @mlr_malloc_or_die(i32 %3)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i8* %4
}
void VDP_waitDMACompletion() {
  while (((*(volatile unsigned short *)(0xC00004)) & ((1 << 1))))
    ;
}


x86 assembly (clang, -O0):
<VDP_waitDMACompletion>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <VDP_waitDMACompletion+0x9>
mov    $0xc00004,%eax
mov    (%rax),%ax
movzwl %ax,%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1125 <VDP_waitDMACompletion+0x25>
jmp    1109 <VDP_waitDMACompletion+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<VDP_waitDMACompletion>:
movzwl 0xc00004,%eax
test   $0x2,%al
jne    1100 <VDP_waitDMACompletion>
ret

LLVM IR (-O0):
define void @VDP_waitDMACompletion() {
br label %1
1: ; preds = %6, %0
%2 = load volatile i16, i16* inttoptr (i64 12582916 to i16*)
%3 = zext i16 %2 to i32
%4 = and i32 %3, 2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %1
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @VDP_waitDMACompletion() {
br label %1
1: ; preds = %1, %0
%2 = load volatile i16, i16* inttoptr (i64 12582916 to i16*)
%3 = and i16 %2, 2
%4 = icmp eq i16 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
ret void
}
void getConf(void) {}


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

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

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

LLVM IR (-O2):
define void @getConf() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_statements_Exit();
int /*<<< orphan*/ printf(char *);
void print_Mucke_Exit(void) {
  printf(" bool Exit( Module cm, PrCount cp )\n");
  printf("(false\n");
  print_statements_Exit();
  printf("); \n");
}


x86 assembly (clang, -O0):
<print_Mucke_Exit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <print_statements_Exit@plt>
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_Mucke_Exit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <print_statements_Exit@plt>
lea    0xee4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [37 x i8] c" bool Exit( Module cm, PrCount cp )\0A\00"
@.str.1 = [8 x i8] c"(false\0A\00"
@.str.2 = [5 x i8] c"); \0A\00"
define void @print_Mucke_Exit() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @print_statements_Exit()
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [36 x i8] c" bool Exit( Module cm, PrCount cp )\00"
@str.3 = [7 x i8] c"(false\00"
@str.4 = [4 x i8] c"); \00"
define void @print_Mucke_Exit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 (...) @print_statements_Exit()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Type definitions */
struct battle_char {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_status(struct battle_char *, int);
scalar_t__ get_random(int /*<<< orphan*/, int);
scalar_t__ mod6(struct battle_char *, struct battle_char *, int);
void blind_yin(struct battle_char *origin, struct battle_char *target) {
  if (get_random(0, 100) < mod6(origin, target, 200)) {
    add_status(target, 2);
  }
}


x86 assembly (clang, -O0):
<blind_yin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0xc8,%edx
call   1040 <mod6@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1180 <blind_yin+0x50>
mov    -0x10(%rbp),%rdi
mov    $0x2,%esi
call   1050 <add_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blind_yin>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0xc8,%edx
call   1040 <mod6@plt>
cmp    %rax,%rbx
jge    1171 <blind_yin+0x41>
mov    %r14,%rdi
mov    $0x2,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <add_status@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.battle_char = type { i32 }
define void @blind_yin(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
%5 = call i64 @get_random(i32 0, i32 100)
%6 = load %struct.battle_char*, %struct.battle_char** %3
%7 = load %struct.battle_char*, %struct.battle_char** %4
%8 = call i64 @mod6(%struct.battle_char* %6, %struct.battle_char* %7, i32 200)
%9 = icmp slt i64 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load %struct.battle_char*, %struct.battle_char** %4
%12 = call i32 @add_status(%struct.battle_char* %11, i32 2)
br label %13
13: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define void @blind_yin(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = tail call i64 @get_random(i32 0, i32 100)
%4 = tail call i64 @mod6(%struct.battle_char* %0, %struct.battle_char* %1, i32 200)
%5 = icmp slt i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @add_status(%struct.battle_char* %1, i32 2)
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CountDown(int, int, int, int);
void CntDwn(int Time) { CountDown(Time, 11, 2, 2); }


x86 assembly (clang, -O0):
<CntDwn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xb,%esi
mov    $0x2,%ecx
mov    %ecx,%edx
call   1030 <CountDown@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CntDwn>:
mov    $0xb,%esi
mov    $0x2,%edx
mov    $0x2,%ecx
jmp    1030 <CountDown@plt>

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

LLVM IR (-O2):
define void @CntDwn(i32 %0) {
%2 = tail call i32 @CountDown(i32 %0, i32 11, i32 2, i32 2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int ns_name_skip(int /*<<< orphan*/ const **, int /*<<< orphan*/ const *);
int dn_skipname(const u_char *ptr, const u_char *eom) {
  const u_char *saveptr = ptr;
  if (ns_name_skip(&ptr, eom) == -1)
    return (-1);
  return (ptr - saveptr);
}


x86 assembly (clang, -O0):
<dn_skipname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
lea    -0x10(%rbp),%rdi
call   1030 <ns_name_skip@plt>
cmp    $0xffffffff,%eax
jne    114a <dn_skipname+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    115c <dn_skipname+0x4c>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dn_skipname>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %rdi,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <ns_name_skip@plt>
mov    0x8(%rsp),%rcx
sub    %rbx,%rcx
shr    $0x2,%rcx
cmp    $0xffffffff,%eax
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @dn_skipname(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
%7 = load i32*, i32** %4
store i32* %7, i32** %6
%8 = load i32*, i32** %5
%9 = call i32 @ns_name_skip(i32** %4, i32* %8)
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %20
12: ; preds = %2
%13 = load i32*, i32** %4
%14 = load i32*, i32** %6
%15 = ptrtoint i32* %13 to i64
%16 = ptrtoint i32* %14 to i64
%17 = sub i64 %15, %16
%18 = sdiv exact i64 %17, 4
%19 = trunc i64 %18 to i32
store i32 %19, i32* %3
br label %20
20: ; preds = %12, %11
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @dn_skipname(i32* %0, i32* %1) {
%3 = alloca i32*
store i32* %0, i32** %3
%4 = call i32 @ns_name_skip(i32** %3, i32* %1)
%5 = icmp eq i32 %4, -1
%6 = load i32*, i32** %3
%7 = ptrtoint i32* %6 to i64
%8 = ptrtoint i32* %0 to i64
%9 = sub i64 %7, %8
%10 = lshr exact i64 %9, 2
%11 = trunc i64 %10 to i32
%12 = select i1 %5, i32 -1, i32 %11
ret i32 %12
}
/* Variables and functions */
char *strrchr(char const *, int);
void last_char_pos(int *index, const char *haystack, int needle) {
  char *match;
  match = strrchr(haystack, needle);
  if (match != NULL) {
    *index = (int)(match - haystack);
  }
}


x86 assembly (clang, -O0):
<last_char_pos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <strrchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1151 <last_char_pos+0x41>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<last_char_pos>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %edx,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     112e <last_char_pos+0x1e>
sub    %ebx,%eax
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @last_char_pos(i32* nocapture writeonly %0, i8* %1, i32 %2) {
%4 = tail call i8* @strrchr(i8* dereferenceable(1) %1, i32 %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = ptrtoint i8* %4 to i64
%8 = ptrtoint i8* %1 to i64
%9 = sub i64 %7, %8
%10 = trunc i64 %9 to i32
store i32 %10, i32* %0
br label %11
11: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int stub1(int);
int ind(int (*func)(int), int arg) {
  fprintf(stderr, "inside ind\n");
  (*func)(arg);
}


x86 assembly (clang, -O0):
<ind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
call   *%rax
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ind>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebp,%edi
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    *%rax

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"inside ind\0A\00"
define i32 @ind(i32 (i32)* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32 (i32)*
%5 = alloca i32
store i32 (i32)* %0, i32 (i32)** %4
store i32 %1, i32* %5
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%8 = load i32 (i32)*, i32 (i32)** %4
%9 = load i32, i32* %5
%10 = call i32 %8(i32 %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"inside ind\0A\00"
define i32 @ind(i32 (i32)* nocapture %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 %0(i32 %1)
ret i32 undef
}
void I2CMasterDataPut(unsigned int baseAdd, unsigned char data) {
  (*((volatile unsigned int *)(baseAdd + (0x9C)))) = data;
}


x86 assembly (clang, -O0):
<I2CMasterDataPut>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x9c,%eax
mov    %eax,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterDataPut>:
add    $0x9c,%edi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @I2CMasterDataPut(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i32, i32* %3
%8 = add i32 %7, 156
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
store volatile i32 %6, i32* %10
ret void
}

LLVM IR (-O2):
define void @I2CMasterDataPut(i32 %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = add i32 %0, 156
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
store volatile i32 %3, i32* %6
ret void
}