xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ cos(double);
long double cosl(long double x) { return (long double)cos((double)x); }


x86 assembly (clang, -O0):
<cosl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <cos@plt>
mov    %rax,-0x18(%rbp)
fildll -0x18(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <cos@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @cosl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call i64 @cos(double %4)
%6 = sitofp i64 %5 to x86_fp80
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @cosl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call i64 @cos(double %2)
%4 = sitofp i64 %3 to x86_fp80
ret x86_fp80 %4
}
__attribute__((unused)) void ularith_addmod_ul_ul(unsigned long *r,
                                                  const unsigned long a,
                                                  const unsigned long b,
                                                  const unsigned long m) {
  ;
  r[0] = (b >= m - a) ? (b - (m - a)) : (a + b);
  ;
}


x86 assembly (clang, -O0):
<ularith_addmod_ul_ul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    -0x10(%rbp),%rcx
cmp    %rcx,%rax
jb     1141 <ularith_addmod_ul_ul+0x41>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x28(%rbp)
jmp    114d <ularith_addmod_ul_ul+0x4d>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ularith_addmod_ul_ul>:
sub    %rsi,%rcx
mov    %rcx,%rax
neg    %rax
cmp    %rdx,%rcx
cmova  %rsi,%rax
add    %rdx,%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @ularith_addmod_ul_ul(i64* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64* %0, i64** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %7
%10 = load i64, i64* %8
%11 = load i64, i64* %6
%12 = sub i64 %10, %11
%13 = icmp uge i64 %9, %12
br i1 %13, label %14, label %20
14: ; preds = %4
%15 = load i64, i64* %7
%16 = load i64, i64* %8
%17 = load i64, i64* %6
%18 = sub i64 %16, %17
%19 = sub i64 %15, %18
br label %24
20: ; preds = %4
%21 = load i64, i64* %6
%22 = load i64, i64* %7
%23 = add i64 %21, %22
br label %24
24: ; preds = %20, %14
%25 = phi i64 [ %19, %14 ], [ %23, %20 ]
%26 = load i64*, i64** %5
%27 = getelementptr inbounds i64, i64* %26, i64 0
store i64 %25, i64* %27
ret void
}

LLVM IR (-O2):
define void @ularith_addmod_ul_ul(i64* nocapture writeonly %0, i64 %1, i64 %2, i64 %3) {
%5 = sub i64 %3, %1
%6 = icmp ugt i64 %5, %2
%7 = sub i64 0, %5
%8 = select i1 %6, i64 %1, i64 %7
%9 = add i64 %8, %2
store i64 %9, i64* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned long long);
int /*<<< orphan*/ stdout;
void cutils_cout_unsigned_long_long_print(unsigned long long number) {
  fprintf(stdout, "%lluull\n", number);
}


x86 assembly (clang, -O0):
<cutils_cout_unsigned_long_long_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutils_cout_unsigned_long_long_print>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [9 x i8] c"%lluull\0A\00"
define void @cutils_cout_unsigned_long_long_print(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i32, i32* @stdout
%4 = load i64, i64* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [9 x i8] c"%lluull\0A\00"
define void @cutils_cout_unsigned_long_long_print(i64 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %0)
ret void
}
void spacetoplus(char *str) {
  register int x;
  for (x = 0; str[x]; x++)
    if (str[x] == ' ')
      str[x] = '+';
}


x86 assembly (clang, -O0):
<spacetoplus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1155 <spacetoplus+0x55>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    1142 <spacetoplus+0x42>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x2b,(%rax,%rcx,1)
jmp    1147 <spacetoplus+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <spacetoplus+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<spacetoplus>:
jmp    1117 <spacetoplus+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x2b,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x20,%al
je     1110 <spacetoplus+0x10>
test   %al,%al
jne    1113 <spacetoplus+0x13>
ret

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

LLVM IR (-O2):
define void @spacetoplus(i8* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i64 [ %8, %7 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %7 [
i8 0, label %9
i8 32, label %6
]
6: ; preds = %2
store i8 43, i8* %4
br label %7
7: ; preds = %2, %6
%8 = add nuw i64 %3, 1
br label %2
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a();
int /*<<< orphan*/ b();
int /*<<< orphan*/ c();
int /*<<< orphan*/ d();
int main() {
  a();
  b();
  c();
  d();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <a@plt>
xor    %eax,%eax
call   1040 <b@plt>
xor    %eax,%eax
call   1050 <c@plt>
xor    %eax,%eax
call   1030 <d@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @a()
%3 = call i32 (...) @b()
%4 = call i32 (...) @c()
%5 = call i32 (...) @d()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @a()
%2 = tail call i32 (...) @b()
%3 = tail call i32 (...) @c()
%4 = tail call i32 (...) @d()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void __VERIFIER_error() { exit(144); }


x86 assembly (clang, -O0):
<__VERIFIER_error>:
push   %rbp
mov    %rsp,%rbp
mov    $0x90,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<__VERIFIER_error>:
push   %rax
mov    $0x90,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @__VERIFIER_error() {
%1 = call i32 @exit(i32 144)
unreachable
}

LLVM IR (-O2):
define void @__VERIFIER_error() {
%1 = tail call i32 @exit(i32 144)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ bar(char *);
void foo() {
  char *d;
  d = "df";
  bar(d);
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"df\00"
define void @foo() {
%1 = alloca i8*
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @bar(i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"df\00"
define void @foo() {
%1 = tail call i32 @bar(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memchunk_dump_to_file() {
  printf("NOT IMPLEMENTED:"
         "pa_memchunk_dump_to_file"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"NOT IMPLEMENTED:pa_memchunk_dump_to_file\0A\00"
define i32 @pa_memchunk_dump_to_file() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [41 x i8] c"NOT IMPLEMENTED:pa_memchunk_dump_to_file\00"
define i32 @pa_memchunk_dump_to_file() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void gtk_text_buffer_end_user_action() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_end_user_action() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
void exit_success(void) {
  printf("SUCCESS\n");
  fflush(NULL);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<exit_success>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <fflush@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<exit_success>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <fflush@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"SUCCESS\0A\00"
@EXIT_SUCCESS = global i32 0
define void @exit_success() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @fflush(i32* null)
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [8 x i8] c"SUCCESS\00"
define void @exit_success() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @fflush(i32* null)
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
int riva128_ramin_readl(int, void *);
int /*<<< orphan*/ riva128_ramin_writel(int, int, void *);
void riva128_ramin_writew(uint32_t addr, uint16_t val, void *p) {
  uint32_t tmp = riva128_ramin_readl(addr, p);
  tmp &= ~(0xffff << ((addr & 2) << 4));
  tmp |= val << ((addr & 2) << 4);
  riva128_ramin_writel(addr, tmp, p);
}


x86 assembly (clang, -O0):
<riva128_ramin_writew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <riva128_ramin_readl@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x2,%ecx
shl    $0x4,%ecx
mov    $0xffff,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
and    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
and    $0x2,%ecx
shl    $0x4,%ecx
shl    %cl,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <riva128_ramin_writel@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<riva128_ramin_writew>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
mov    %rdx,%rsi
call   1040 <riva128_ramin_readl@plt>
and    $0xffff0000,%eax
or     %eax,%ebp
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <riva128_ramin_writel@plt>

LLVM IR (-O0):
define void @riva128_ramin_writew(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %6
%10 = call i32 @riva128_ramin_readl(i32 %8, i8* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %4
%12 = and i32 %11, 2
%13 = shl i32 %12, 4
%14 = shl i32 65535, %13
%15 = xor i32 %14, -1
%16 = load i32, i32* %7
%17 = and i32 %16, %15
store i32 %17, i32* %7
%18 = load i32, i32* %5
%19 = load i32, i32* %4
%20 = and i32 %19, 2
%21 = shl i32 %20, 4
%22 = shl i32 %18, %21
%23 = load i32, i32* %7
%24 = or i32 %23, %22
store i32 %24, i32* %7
%25 = load i32, i32* %4
%26 = load i32, i32* %7
%27 = load i8*, i8** %6
%28 = call i32 @riva128_ramin_writel(i32 %25, i32 %26, i8* %27)
ret void
}

LLVM IR (-O2):
define void @riva128_ramin_writew(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @riva128_ramin_readl(i32 %0, i8* %2)
%5 = and i32 %4, -65536
%6 = or i32 %5, %1
%7 = tail call i32 @riva128_ramin_writel(i32 %0, i32 %6, i8* %2)
ret void
}
void io_con_free() {}


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

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

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

LLVM IR (-O2):
define void @io_con_free() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef unsigned long long uint16_t;

/* Variables and functions */
uint16_t fdt16_to_cpu(uint16_t x) {
  return (((unsigned long long)((uint8_t *)&x)[0]) << 8) |
         ((unsigned long long)((uint8_t *)&x)[1]);
}


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

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

LLVM IR (-O0):
define i64 @fdt16_to_cpu(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = getelementptr inbounds i64, i64* %2, i64 0
%4 = load i64, i64* %3
%5 = shl i64 %4, 8
%6 = getelementptr inbounds i64, i64* %2, i64 1
%7 = load i64, i64* %6
%8 = or i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @fdt16_to_cpu(i64 %0) {
ret i64 poison
}
void utl_strdelc_shift(char *str) {
  while (*str) {
    str[0] = str[1];
    str++;
  }
}


x86 assembly (clang, -O0):
<utl_strdelc_shift>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1133 <utl_strdelc_shift+0x33>
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <utl_strdelc_shift+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<utl_strdelc_shift>:
cmpb   $0x0,(%rdi)
je     111e <utl_strdelc_shift+0x1e>
add    $0x1,%rdi
nopl   0x0(%rax)
movzbl (%rdi),%eax
mov    %al,-0x1(%rdi)
add    $0x1,%rdi
test   %al,%al
jne    1110 <utl_strdelc_shift+0x10>
ret

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

LLVM IR (-O2):
define void @utl_strdelc_shift(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %6, %4 ], [ %0, %1 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}
void SteamAPI_ISteamGameServer_SetMapName(void *self, const char *pszMapName) {
  xlogf("%s(self = %p, pszMapName = %s)\n", __func__, self, pszMapName);
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamGameServer_SetMapName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xed1(%rip),%rdi
lea    0xeea(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamGameServer_SetMapName>:
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xee3(%rip),%rdi
lea    0xefc(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"%s(self = %p, pszMapName = %s)\0A\00"
@__func__.SteamAPI_ISteamGameServer_SetMapName = [37 x i8] c"SteamAPI_ISteamGameServer_SetMapName\00"
define void @SteamAPI_ISteamGameServer_SetMapName(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 (i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @__func__.SteamAPI_ISteamGameServer_SetMapName, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"%s(self = %p, pszMapName = %s)\0A\00"
@__func__.SteamAPI_ISteamGameServer_SetMapName = [37 x i8] c"SteamAPI_ISteamGameServer_SetMapName\00"
define void @SteamAPI_ISteamGameServer_SetMapName(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @__func__.SteamAPI_ISteamGameServer_SetMapName, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
float obter_numero_uniforme();
int obter_numero_uniforme_discreto(float l_inf, float l_sup) {
  float u = obter_numero_uniforme();
  return l_inf + (int)((l_sup - l_inf + 1.0) * u);
}


x86 assembly (clang, -O0):
<obter_numero_uniforme_discreto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <obter_numero_uniforme@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
subss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xeb7(%rip),%xmm2
addsd  %xmm2,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm1
cvttsd2si %xmm1,%eax
cvtsi2ss %eax,%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<obter_numero_uniforme_discreto>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <obter_numero_uniforme@plt>
movss  (%rsp),%xmm2
movss  0x4(%rsp),%xmm1
subss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
addsd  0xec2(%rip),%xmm1
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
cvttpd2dq %xmm0,%xmm0
cvtdq2ps %xmm0,%xmm0
addss  %xmm2,%xmm0
cvttss2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @obter_numero_uniforme_discreto(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = call float (...) @obter_numero_uniforme()
store float %6, float* %5
%7 = load float, float* %3
%8 = load float, float* %4
%9 = load float, float* %3
%10 = fsub float %8, %9
%11 = fpext float %10 to double
%12 = fadd double %11, 1.000000e+00
%13 = load float, float* %5
%14 = fpext float %13 to double
%15 = fmul double %12, %14
%16 = fptosi double %15 to i32
%17 = sitofp i32 %16 to float
%18 = fadd float %7, %17
%19 = fptosi float %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @obter_numero_uniforme_discreto(float %0, float %1) {
%3 = tail call float (...) @obter_numero_uniforme()
%4 = fsub float %1, %0
%5 = fpext float %4 to double
%6 = fadd double %5, 1.000000e+00
%7 = fpext float %3 to double
%8 = fmul double %6, %7
%9 = fptosi double %8 to i32
%10 = sitofp i32 %9 to float
%11 = fadd float %10, %0
%12 = fptosi float %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void version() {
  printf("%s %s\n\n%s\n", "bin2png", "1.0",
         "Copyright (C) 2015 - Jardel Weyrich <jweyrich@gmail.com>\n\n"
         "This is free software; see the source for copying conditions. There "
         "is NO\n"
         "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR "
         "PURPOSE.");
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xeea(%rip),%rdx
lea    0xee7(%rip),%rcx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
lea    0xee9(%rip),%rdi
lea    0xeed(%rip),%rsi
lea    0xeee(%rip),%rdx
lea    0xeeb(%rip),%rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%s %s\0A\0A%s\0A\00"
@.str.1 = [8 x i8] c"bin2png\00"
@.str.2 = [4 x i8] c"1.0\00"
@.str.3 = [208 x i8] c"Copyright (C) 2015 - Jardel Weyrich <jweyrich@gmail.com>\0A\0AThis is free software; see the source for copying conditions. There is NO\0Awarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s %s\0A\0A%s\0A\00"
@.str.1 = [8 x i8] c"bin2png\00"
@.str.2 = [4 x i8] c"1.0\00"
@.str.3 = [208 x i8] c"Copyright (C) 2015 - Jardel Weyrich <jweyrich@gmail.com>\0A\0AThis is free software; see the source for copying conditions. There is NO\0Awarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\00"
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mktime(struct tm *);
time_t xine_private_timegm(struct tm *tm) {
  time_t ret;
  ret = mktime(tm);
  return ret;
}


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

x86 assembly (clang, -O2):
<xine_private_timegm>:
jmp    1030 <mktime@plt>

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

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @xine_private_timegm(%struct.tm* nocapture %0) {
%2 = tail call i32 @mktime(%struct.tm* %0)
ret i32 %2
}
/* Variables and functions */
double get_time();
double read_loop(int *array) {
  int i, value;
  double start_time = get_time();
  for (i = 0; i < 10000000; i++) {
    value = *(array + i);
  }
  return get_time() - start_time;
}


x86 assembly (clang, -O0):
<read_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <get_time@plt>
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x989680,-0xc(%rbp)
jge    1158 <read_loop+0x48>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112f <read_loop+0x1f>
mov    $0x0,%al
call   1030 <get_time@plt>
subsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_loop>:
push   %rax
xor    %eax,%eax
call   1030 <get_time@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <get_time@plt>
subsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @read_loop(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32* %0, i32** %2
%6 = call double (...) @get_time()
store double %6, double* %5
store i32 0, i32* %3
br label %7
7: ; preds = %16, %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 10000000
br i1 %9, label %10, label %19
10: ; preds = %7
%11 = load i32*, i32** %2
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
store i32 %15, i32* %4
br label %16
16: ; preds = %10
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %7
19: ; preds = %7
%20 = call double (...) @get_time()
%21 = load double, double* %5
%22 = fsub double %20, %21
ret double %22
}

LLVM IR (-O2):
define double @read_loop(i32* nocapture readnone %0) {
%2 = tail call double (...) @get_time()
%3 = tail call double (...) @get_time()
%4 = fsub double %3, %2
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void mov_m16_reg16(unsigned short *m16, int reg16) {
  put8(0x66);
  put8(0x89);
  put8((reg16 << 3) | 5);
  put32((unsigned long)(m16));
}


x86 assembly (clang, -O0):
<mov_m16_reg16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x66,%edi
call   1030 <put8@plt>
mov    $0x89,%edi
call   1030 <put8@plt>
mov    -0xc(%rbp),%edi
shl    $0x3,%edi
or     $0x5,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rdi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_m16_reg16>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    $0x66,%edi
call   1030 <put8@plt>
mov    $0x89,%edi
call   1030 <put8@plt>
lea    0x5(,%rbx,8),%edi
call   1030 <put8@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @mov_m16_reg16(i16* %0, i32 %1) {
%3 = alloca i16*
%4 = alloca i32
store i16* %0, i16** %3
store i32 %1, i32* %4
%5 = call i32 @put8(i32 102)
%6 = call i32 @put8(i32 137)
%7 = load i32, i32* %4
%8 = shl i32 %7, 3
%9 = or i32 %8, 5
%10 = call i32 @put8(i32 %9)
%11 = load i16*, i16** %3
%12 = ptrtoint i16* %11 to i64
%13 = call i32 @put32(i64 %12)
ret void
}

LLVM IR (-O2):
define void @mov_m16_reg16(i16* %0, i32 %1) {
%3 = tail call i32 @put8(i32 102)
%4 = tail call i32 @put8(i32 137)
%5 = shl i32 %1, 3
%6 = or i32 %5, 5
%7 = tail call i32 @put8(i32 %6)
%8 = ptrtoint i16* %0 to i64
%9 = tail call i32 @put32(i64 %8)
ret void
}
/* Variables and functions */
unsigned long getdiskspace(char const *, unsigned long, int);
unsigned long getfreediskspace(const char *path, unsigned long unit) {
  return getdiskspace(path, unit, 1);
}


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

x86 assembly (clang, -O2):
<getfreediskspace>:
mov    $0x1,%edx
jmp    1030 <getdiskspace@plt>

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

LLVM IR (-O2):
define i64 @getfreediskspace(i8* %0, i64 %1) {
%3 = tail call i64 @getdiskspace(i8* %0, i64 %1, i32 1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ RAND_bytes(unsigned char *, int);
int /*<<< orphan*/ *memchr(unsigned char *, char, int);
void gen_random_bytes(unsigned char *buf, int len) {
  do {
    RAND_bytes(buf, len);
  } while (memchr(buf, '\0', len) != NULL);
}


x86 assembly (clang, -O0):
<gen_random_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <RAND_bytes@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1040 <memchr@plt>
cmp    $0x0,%rax
jne    112f <gen_random_bytes+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_random_bytes>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <RAND_bytes@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1040 <memchr@plt>
test   %rax,%rax
jne    1130 <gen_random_bytes+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @gen_random_bytes(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @RAND_bytes(i8* %6, i32 %7)
br label %9
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = call i32* @memchr(i8* %10, i8 signext 0, i32 %11)
%13 = icmp ne i32* %12, null
br i1 %13, label %5, label %14
14: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @gen_random_bytes(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @RAND_bytes(i8* %0, i32 %1)
%5 = tail call i32* @memchr(i8* %0, i8 signext 0, i32 %1)
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %3
7: ; preds = %3
ret void
}
/* Variables and functions */
scalar_t__ isnan(float);
int __ocl_isless_float(float src1, float src2) {
  return (isnan(src1) || isnan(src2)) ? 0 : src1 < src2;
}


x86 assembly (clang, -O0):
<__ocl_isless_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
jne    114a <__ocl_isless_float+0x3a>
movss  -0x8(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
je     1154 <__ocl_isless_float+0x44>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    116c <__ocl_isless_float+0x5c>
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_isless_float>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0xc(%rsp)
call   1030 <isnan@plt>
xor    %ebx,%ebx
test   %rax,%rax
jne    114d <__ocl_isless_float+0x3d>
movss  0x8(%rsp),%xmm0
call   1030 <isnan@plt>
test   %rax,%rax
jne    114d <__ocl_isless_float+0x3d>
xor    %ebx,%ebx
movss  0x8(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
seta   %bl
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__ocl_isless_float(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 = call i64 @isnan(float %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load float, float* %4
%10 = call i64 @isnan(float %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8, %2
br label %18
13: ; preds = %8
%14 = load float, float* %3
%15 = load float, float* %4
%16 = fcmp olt float %14, %15
%17 = zext i1 %16 to i32
br label %18
18: ; preds = %13, %12
%19 = phi i32 [ 0, %12 ], [ %17, %13 ]
ret i32 %19
}

LLVM IR (-O2):
define i32 @__ocl_isless_float(float %0, float %1) {
%3 = tail call i64 @isnan(float %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = tail call i64 @isnan(float %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = fcmp olt float %0, %1
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %2, %5, %8
%12 = phi i32 [ %10, %8 ], [ 0, %5 ], [ 0, %2 ]
ret i32 %12
}
/* Variables and functions */
double R_edgeBlendTet(int *, double *);
double E_blendOnRegion(int eindex[], int etype, double *L) {
  if (etype == 4)
    return R_edgeBlendTet(eindex, L);
  else
    return 0.0;
}


x86 assembly (clang, -O0):
<E_blendOnRegion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x4,-0x14(%rbp)
jne    1144 <E_blendOnRegion+0x34>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <R_edgeBlendTet@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    114c <E_blendOnRegion+0x3c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<E_blendOnRegion>:
cmp    $0x4,%esi
jne    111d <E_blendOnRegion+0xd>
mov    %rdx,%rsi
jmp    1030 <R_edgeBlendTet@plt>
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @E_blendOnRegion(i32* %0, i32 %1, double* %2) {
%4 = alloca double
%5 = alloca i32*
%6 = alloca i32
%7 = alloca double*
store i32* %0, i32** %5
store i32 %1, i32* %6
store double* %2, double** %7
%8 = load i32, i32* %6
%9 = icmp eq i32 %8, 4
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i32*, i32** %5
%12 = load double*, double** %7
%13 = call double @R_edgeBlendTet(i32* %11, double* %12)
store double %13, double* %4
br label %15
14: ; preds = %3
store double 0.000000e+00, double* %4
br label %15
15: ; preds = %14, %10
%16 = load double, double* %4
ret double %16
}

LLVM IR (-O2):
define double @E_blendOnRegion(i32* %0, i32 %1, double* %2) {
%4 = icmp eq i32 %1, 4
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call double @R_edgeBlendTet(i32* %0, double* %2)
br label %7
7: ; preds = %3, %5
%8 = phi double [ %6, %5 ], [ 0.000000e+00, %3 ]
ret double %8
}
int main() {
  int i;
  float array[100];
  for (i = 0; i < 100; i++) {
    array[i] = i;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1143 <main+0x43>
cvtsi2ssl -0x8(%rbp),%xmm0
movslq -0x8(%rbp),%rax
movss  %xmm0,-0x1a0(%rbp,%rax,4)
ff ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x float]
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sitofp i32 %8 to float
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 %11
store float %9, float* %12
br label %13
13: ; preds = %7
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %4
16: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
char *hash_plugin_detailed(void) {
  return ("keepass - KeePass passphrase plugin\n"
          "------------------------------------------------\n"
          "Use this module to crack KeePass databases\n"
          "Input should be a KeePass db file (.kdb/.kdbx) specified with -f\n"
          "Known software that uses this password hashing method:\n"
          "KeePass2/KeePassX, etc.\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [318 x i8] c"keepass - KeePass passphrase plugin\0A------------------------------------------------\0AUse this module to crack KeePass databases\0AInput should be a KeePass db file (.kdb/.kdbx) specified with -f\0AKnown software that uses this password hashing method:\0AKeePass2/KeePassX, etc.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([318 x i8], [318 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [318 x i8] c"keepass - KeePass passphrase plugin\0A------------------------------------------------\0AUse this module to crack KeePass databases\0AInput should be a KeePass db file (.kdb/.kdbx) specified with -f\0AKnown software that uses this password hashing method:\0AKeePass2/KeePassX, etc.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([318 x i8], [318 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int sweep_dobldobl_real_run(void) {
  int fail, *b;
  double *c;
  int precision = 1;
  fail = _ada_use_c2phc4c(621, &precision, b, c, 0);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @sweep_dobldobl_real_run() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = call i32 @_ada_use_c2phc4c(i32 621, i32* %1, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int pigpio_command(int, int, int /*<<< orphan*/, int /*<<< orphan*/, int);
int set_bank_1(int pi, uint32_t levels) {
  return pigpio_command(pi, 14, levels, 0, 1);
}


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

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

LLVM IR (-O0):
define i32 @set_bank_1(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 @pigpio_command(i32 %5, i32 14, i32 %6, i32 0, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @set_bank_1(i32 %0, i32 %1) {
%3 = tail call i32 @pigpio_command(i32 %0, i32 14, i32 %1, i32 0, i32 1)
ret i32 %3
}
void dbDelete(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               58, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<dbDelete>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x3a,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbDelete>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x3a,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.dbDelete = [9 x i8] c"dbDelete\00"
define void @dbDelete() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 58, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.dbDelete, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.dbDelete = [9 x i8] c"dbDelete\00"
define void @dbDelete() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 58, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.dbDelete, i64 0, i64 0))
ret void
}
void HAL_RTC_Cancel_UnixAlarm(void) {}


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

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

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

LLVM IR (-O2):
define void @HAL_RTC_Cancel_UnixAlarm() {
ret void
}
void mark_timeoffset_cyclone(void) {}


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

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

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

LLVM IR (-O2):
define void @mark_timeoffset_cyclone() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void cgiMakeOptionalButton(char *name, char *value, int disabled) {
  printf("<INPUT TYPE=SUBMIT NAME=\"%s\" VALUE=\"%s\"", name, value);
  if (disabled)
    printf(" DISABLED");
  printf(">");
}


x86 assembly (clang, -O0):
<cgiMakeOptionalButton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
je     1151 <cgiMakeOptionalButton+0x41>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgiMakeOptionalButton>:
push   %rbx
mov    %edx,%ebx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
je     1149 <cgiMakeOptionalButton+0x29>
lea    0xee6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3e,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"<INPUT TYPE=SUBMIT NAME=\22%s\22 VALUE=\22%s\22\00"
@.str.1 = [10 x i8] c" DISABLED\00"
@.str.2 = [2 x i8] c">\00"
define void @cgiMakeOptionalButton(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %3
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"<INPUT TYPE=SUBMIT NAME=\22%s\22 VALUE=\22%s\22\00"
@.str.1 = [10 x i8] c" DISABLED\00"
define void @cgiMakeOptionalButton(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = icmp eq i32 %2, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
%9 = tail call i32 @putchar(i32 62)
ret void
}
int Scanner_isoperator(int tokval) {
  if (tokval >= 100)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<Scanner_isoperator>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jl     111d <Scanner_isoperator+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <Scanner_isoperator+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @Scanner_isoperator(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 100
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @Scanner_isoperator(i32 %0) {
%2 = icmp sgt i32 %0, 99
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t ip_get_flag_mf(const uint8_t *p_ip) { return (p_ip[6] & 0x20); }


x86 assembly (clang, -O0):
<ip_get_flag_mf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
and    $0x20,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_get_flag_mf>:
mov    0x18(%rdi),%eax
and    $0x20,%eax
ret

LLVM IR (-O0):
define i32 @ip_get_flag_mf(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 6
%5 = load i32, i32* %4
%6 = and i32 %5, 32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ip_get_flag_mf(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 6
%3 = load i32, i32* %2
%4 = and i32 %3, 32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usg() {
  fprintf(stderr, "usage: ply2punto <in.ply>\n");
  exit(2);
}


x86 assembly (clang, -O0):
<usg>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usg>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"usage: ply2punto <in.ply>\0A\00"
define void @usg() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"usage: ply2punto <in.ply>\0A\00"
define void @usg() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}