xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint16_t;
struct m6800 {
  int dummy;
};

/* Variables and functions */
int m6800_pull(struct m6800 *);
uint16_t m6800_pull16(struct m6800 *cpu) {
  uint16_t r = m6800_pull(cpu) << 8;
  r |= m6800_pull(cpu);
  return r;
}


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

x86 assembly (clang, -O2):
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <m6800_pull@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
mov    %rbx,%rdi
call   1030 <m6800_pull@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.m6800 = type { i32 }
define i32 @m6800_pull16(%struct.m6800* %0) {
%2 = alloca %struct.m6800*
%3 = alloca i32
store %struct.m6800* %0, %struct.m6800** %2
%4 = load %struct.m6800*, %struct.m6800** %2
%5 = call i32 @m6800_pull(%struct.m6800* %4)
%6 = shl i32 %5, 8
store i32 %6, i32* %3
%7 = load %struct.m6800*, %struct.m6800** %2
%8 = call i32 @m6800_pull(%struct.m6800* %7)
%9 = load i32, i32* %3
%10 = or i32 %9, %8
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
%struct.m6800 = type { i32 }
define i32 @m6800_pull16(%struct.m6800* %0) {
%2 = tail call i32 @m6800_pull(%struct.m6800* %0)
%3 = shl i32 %2, 8
%4 = tail call i32 @m6800_pull(%struct.m6800* %0)
%5 = or i32 %3, %4
ret i32 %5
}
void nop(unsigned long ticks) {
  while (ticks--)
    asm("NOP");
}


x86 assembly (clang, -O0):
<nop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
cmp    $0x0,%rax
je     1127 <nop+0x27>
nop
jmp    1108 <nop+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nop>:
test   %rdi,%rdi
je     1117 <nop+0x17>
cs nopw 0x0(%rax,%rax,1)
nop
nop
add    $0xffffffffffffffff,%rdi
jne    1110 <nop+0x10>
ret

LLVM IR (-O0):
define void @nop(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
br label %3
3: ; preds = %7, %1
%4 = load i64, i64* %2
%5 = add i64 %4, -1
store i64 %5, i64* %2
%6 = icmp ne i64 %4, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @nop(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %5, %3 ], [ %0, %1 ]
%5 = add i64 %4, -1
tail call void asm sideeffect "NOP", "~{dirflag},~{fpsr},~{flags}"()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ findPrime();
int main(void) {
  findPrime();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @findPrime()
ret i32 0
}
/* Variables and functions */
void *a(size_t);
void *b3(size_t n) { return a(n); }


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

x86 assembly (clang, -O2):
<b3>:
jmp    1030 <a@plt>

LLVM IR (-O0):
define i8* @b3(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @a(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @b3(i64 %0) {
%2 = tail call i8* @a(i64 %0)
ret i8* %2
}
IR0IR1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((*p0) <= (*p1))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<IR0IR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
mov    -0x20(%rbp),%rcx
movswl (%rcx),%ecx
cmp    %ecx,%eax
jg     1141 <IR0IR1+0x41>
movl   $0x1,-0x4(%rbp)
jmp    1148 <IR0IR1+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IR0IR1>:
movzwl (%r8),%ecx
xor    %eax,%eax
cmp    (%r9),%cx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @IR0IR1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture %5) {
%7 = load i16, i16* %4
%8 = load i16, i16* %5
%9 = icmp sle i16 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rot32l10(uint32_t x) { return (x << 10) | (x >> 22); }


x86 assembly (clang, -O0):
<rot32l10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xa,%eax
mov    -0x4(%rbp),%ecx
sar    $0x16,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot32l10>:
mov    %edi,%eax
shl    $0xa,%eax
sar    $0x16,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot32l10(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 10
%5 = load i32, i32* %2
%6 = ashr i32 %5, 22
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot32l10(i32 %0) {
%2 = shl i32 %0, 10
%3 = ashr i32 %0, 22
%4 = or i32 %2, %3
ret i32 %4
}
void dbg_dump_lpt_lebs(const struct ubifs_info *c) { return; }


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

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

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

LLVM IR (-O2):
%struct.ubifs_info = type opaque
define void @dbg_dump_lpt_lebs(%struct.ubifs_info* nocapture %0) {
ret void
}
int test_imm_3Bint64_highword_reg(long long val) {
  return ((val >> 32) & (0x3B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Bint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x20,%rdx
and    $0x3b,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_3Bint64_highword_reg>:
movabs $0x3b00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_3Bint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 59
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_3Bint64_highword_reg(i64 %0) {
%2 = and i64 %0, 253403070464
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ PHYSFS_setErrorCode(scalar_t__);
scalar_t__ errcodeFromErrno();
int remove(char const *);
int __PHYSFS_platformDelete(const char *path) {
  do {
    if (remove(path) == -1) {
      if (errcodeFromErrno())
        PHYSFS_setErrorCode(errcodeFromErrno());
      return 0;
    }
  } while (0);
  return 1;
}


x86 assembly (clang, -O0):
<__PHYSFS_platformDelete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <remove@plt>
cmp    $0xffffffff,%eax
jne    117a <__PHYSFS_platformDelete+0x4a>
mov    $0x0,%al
call   1040 <errcodeFromErrno@plt>
cmp    $0x0,%rax
je     116e <__PHYSFS_platformDelete+0x3e>
mov    $0x0,%al
call   1040 <errcodeFromErrno@plt>
mov    %rax,%rdi
call   1050 <PHYSFS_setErrorCode@plt>
movl   $0x0,-0x4(%rbp)
jmp    1186 <__PHYSFS_platformDelete+0x56>
jmp    117f <__PHYSFS_platformDelete+0x4f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__PHYSFS_platformDelete>:
push   %rbx
call   1030 <remove@plt>
mov    $0x1,%ebx
cmp    $0xffffffff,%eax
jne    115f <__PHYSFS_platformDelete+0x2f>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <errcodeFromErrno@plt>
test   %rax,%rax
je     115f <__PHYSFS_platformDelete+0x2f>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <errcodeFromErrno@plt>
mov    %rax,%rdi
call   1050 <PHYSFS_setErrorCode@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__PHYSFS_platformDelete(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %1
%5 = load i8*, i8** %3
%6 = call i32 @remove(i8* %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = call i64 (...) @errcodeFromErrno()
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = call i64 (...) @errcodeFromErrno()
%13 = call i32 @PHYSFS_setErrorCode(i64 %12)
br label %14
14: ; preds = %11, %8
store i32 0, i32* %2
br label %17
15: ; preds = %4
br label %16
16: ; preds = %15
store i32 1, i32* %2
br label %17
17: ; preds = %16, %14
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @__PHYSFS_platformDelete(i8* nocapture %0) {
%2 = tail call i32 @remove(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = tail call i64 (...) @errcodeFromErrno()
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = tail call i64 (...) @errcodeFromErrno()
%9 = tail call i32 @PHYSFS_setErrorCode(i64 %8)
br label %10
10: ; preds = %1, %4, %7
%11 = phi i32 [ 0, %7 ], [ 0, %4 ], [ 1, %1 ]
ret i32 %11
}
double f(double x) { return x + 1; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @f(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 1.000000e+00
ret double %4
}

LLVM IR (-O2):
define double @f(double %0) {
%2 = fadd double %0, 1.000000e+00
ret double %2
}
void to_sign_int_store(__float128 a, int *p) { *p = (int)a; }


x86 assembly (clang, -O0):
<to_sign_int_store>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movaps %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movaps -0x10(%rbp),%xmm0
call   1130 <__fixtfsi>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret
nopw   0x0(%rax,%rax,1)

x86 assembly (clang, -O2):
<to_sign_int_store>:
push   %rbx
mov    %rdi,%rbx
call   1110 <__fixtfsi>
mov    %eax,(%rbx)
pop    %rbx
ret
nopl   (%rax)

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

LLVM IR (-O2):
define void @to_sign_int_store(fp128 %0, i32* nocapture writeonly %1) {
%3 = fptosi fp128 %0 to i32
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *argv0) {
  fprintf(stderr,
          "Usage: %s manifest\n"
          "Options:\n"
          "   -v  Diagnostic output\n",
          argv0);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [54 x i8] c"Usage: %s manifest\0AOptions:\0A -v Diagnostic output\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [54 x i8] c"Usage: %s manifest\0AOptions:\0A -v Diagnostic output\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void Passed(void) {
  fprintf(stderr, "\n\n"
                  "------------------------------\n"
                  "All tests passed successfully.\n"
                  "------------------------------\n");
  _exit(0);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [96 x i8] c"\0A\0A------------------------------\0AAll tests passed successfully.\0A------------------------------\0A\00"
define void @Passed() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [96 x i8] c"\0A\0A------------------------------\0AAll tests passed successfully.\0A------------------------------\0A\00"
define void @Passed() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
int even(unsigned int);
int odd(unsigned int n) {
  if (n == 0)
    return 0;
  if (n == 1)
    return 1;
  return even(n - 1);
}


x86 assembly (clang, -O0):
<odd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <odd+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1155 <odd+0x45>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <odd+0x37>
movl   $0x1,-0x4(%rbp)
jmp    1155 <odd+0x45>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <even@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odd>:
test   %edi,%edi
je     111e <odd+0xe>
cmp    $0x1,%edi
jne    1121 <odd+0x11>
mov    $0x1,%edi
mov    %edi,%eax
ret
add    $0xffffffff,%edi
jmp    1030 <even@plt>

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

LLVM IR (-O2):
define i32 @odd(i32 %0) {
switch i32 %0, label %3 [
i32 0, label %6
i32 1, label %2
]
2: ; preds = %1
br label %6
3: ; preds = %1
%4 = add i32 %0, -1
%5 = tail call i32 @even(i32 %4)
br label %6
6: ; preds = %1, %3, %2
%7 = phi i32 [ 1, %2 ], [ %5, %3 ], [ %0, %1 ]
ret i32 %7
}
void g_mem_chunk_destroy() {}


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

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

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

LLVM IR (-O2):
define void @g_mem_chunk_destroy() {
ret void
}
double absolute(double x) {
  if (x < 0) {
    return x * (-1);
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<absolute>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112e <absolute+0x2e>
movsd  0xee1(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1138 <absolute+0x38>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absolute>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @absolute(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fmul double %7, -1.000000e+00
store double %8, double* %2
br label %11
9: ; preds = %1
%10 = load double, double* %3
store double %10, double* %2
br label %11
11: ; preds = %9, %6
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @absolute(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
int small(int num1, int num2) {
  int menor;
  menor = num1;
  if (num2 > num1) {
    menor = num2;
  }
  return menor;
}


x86 assembly (clang, -O0):
<small>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    1122 <small+0x22>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<small>:
mov    %edi,%eax
cmp    %edi,%esi
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @small(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int fabs(double);
double tanh(double);
double shape(double x) { return fabs(x) < 1e-12 ? 1.0 : tanh(x) / x; }


x86 assembly (clang, -O0):
<shape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xebd(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    115f <shape+0x3f>
movsd  0xeb3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1173 <shape+0x53>
movsd  -0x8(%rbp),%xmm0
call   1030 <tanh@plt>
divsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shape>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <fabs@plt>
test   %eax,%eax
jle    1140 <shape+0x20>
movsd  (%rsp),%xmm0
call   1030 <tanh@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret
movsd  0xeb8(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @shape(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @fabs(double %3)
%5 = sitofp i32 %4 to double
%6 = fcmp olt double %5, 0x3D719799812DEA11
br i1 %6, label %7, label %8
7: ; preds = %1
br label %13
8: ; preds = %1
%9 = load double, double* %2
%10 = call double @tanh(double %9)
%11 = load double, double* %2
%12 = fdiv double %10, %11
br label %13
13: ; preds = %8, %7
%14 = phi double [ 1.000000e+00, %7 ], [ %12, %8 ]
ret double %14
}

LLVM IR (-O2):
define double @shape(double %0) {
%2 = tail call i32 @fabs(double %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call double @tanh(double %0)
%6 = fdiv double %5, %0
br label %7
7: ; preds = %1, %4
%8 = phi double [ %6, %4 ], [ 1.000000e+00, %1 ]
ret double %8
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ internal_fiat_secp256k1_nonzero(uintptr_t);
void fiat_secp256k1_nonzero(uint64_t *out1, const uint64_t arg1[4]) {
  *out1 = (uint64_t)internal_fiat_secp256k1_nonzero((uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_secp256k1_nonzero>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <internal_fiat_secp256k1_nonzero@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @fiat_secp256k1_nonzero(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = ptrtoint i64* %5 to i64
%7 = call i64 @internal_fiat_secp256k1_nonzero(i64 %6)
%8 = load i64*, i64** %3
store i64 %7, i64* %8
ret void
}

LLVM IR (-O2):
define void @fiat_secp256k1_nonzero(i64* nocapture writeonly %0, i64* %1) {
%3 = ptrtoint i64* %1 to i64
%4 = tail call i64 @internal_fiat_secp256k1_nonzero(i64 %3)
store i64 %4, i64* %0
ret void
}
/* Variables and functions */
int strlen(const char *str) {
  int i;
  i = 0;
  while (*str != '\0') {
    str++;
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1139 <strlen+0x39>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111c <strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ timetest();
int main() {
  timetest();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @timetest()
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ a_or(int *, int);
void a_or_64(volatile uint64_t *p, uint64_t v) {
  a_or((int *)p, v);
  a_or((int *)p + 1, v >> 32);
}


x86 assembly (clang, -O0):
<a_or_64>:
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 <a_or@plt>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0xc(%rbp),%esi
mov    $0x20,%ecx
sar    %cl,%esi
call   1030 <a_or@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_or_64>:
push   %rbx
mov    %rdi,%rbx
call   1030 <a_or@plt>
add    $0x4,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <a_or@plt>

LLVM IR (-O0):
define void @a_or_64(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 @a_or(i32* %5, i32 %6)
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %4
%11 = ashr i32 %10, 32
%12 = call i32 @a_or(i32* %9, i32 %11)
ret void
}

LLVM IR (-O2):
define void @a_or_64(i32* %0, i32 %1) {
%3 = tail call i32 @a_or(i32* %0, i32 %1)
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = tail call i32 @a_or(i32* %4, i32 poison)
ret void
}
int impar(int numero) { return numero % 2 != 0; }


x86 assembly (clang, -O0):
<impar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<impar>:
mov    %edi,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @impar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 2
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @impar(i32 %0) {
%2 = and i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ chaz_ConfWriter_end_module();
int /*<<< orphan*/ chaz_ConfWriter_start_module(char *);
int /*<<< orphan*/ chaz_Memory_probe_alloca();
void chaz_Memory_run(void) {
  chaz_ConfWriter_start_module("Memory");
  chaz_Memory_probe_alloca();
  chaz_ConfWriter_end_module();
}


x86 assembly (clang, -O0):
<chaz_Memory_run>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <chaz_ConfWriter_start_module@plt>
mov    $0x0,%al
call   1040 <chaz_Memory_probe_alloca@plt>
mov    $0x0,%al
call   1050 <chaz_ConfWriter_end_module@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chaz_Memory_run>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <chaz_ConfWriter_start_module@plt>
xor    %eax,%eax
call   1040 <chaz_Memory_probe_alloca@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <chaz_ConfWriter_end_module@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Memory\00"
define void @chaz_Memory_run() {
%1 = call i32 @chaz_ConfWriter_start_module(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @chaz_Memory_probe_alloca()
%3 = call i32 (...) @chaz_ConfWriter_end_module()
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Memory\00"
define void @chaz_Memory_run() {
%1 = tail call i32 @chaz_ConfWriter_start_module(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @chaz_Memory_probe_alloca()
%3 = tail call i32 (...) @chaz_ConfWriter_end_module()
ret void
}
/* Variables and functions */
scalar_t__ ft_isupper(int);
int ft_tolower(int c) { return (ft_isupper(c) ? c + 32 : c); }


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ft_isupper@plt>
cmp    $0x0,%rax
je     113b <ft_tolower+0x2b>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <ft_tolower+0x31>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <ft_isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ft_tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @ft_isupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 32
br label %11
9: ; preds = %1
%10 = load i32, i32* %2
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @ft_tolower(i32 %0) {
%2 = tail call i64 @ft_isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int getInt(char const **, int *);
int delta_output_size(const char *zDelta, int lenDelta) {
  int size;
  size = getInt(&zDelta, &lenDelta);
  if (*zDelta != '\n') {
    return -1;
  }
  return size;
}


x86 assembly (clang, -O0):
<delta_output_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <getInt@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     114b <delta_output_size+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1151 <delta_output_size+0x41>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delta_output_size>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %esi,0xc(%rsp)
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1030 <getInt@plt>
mov    0x10(%rsp),%rcx
cmpb   $0xa,(%rcx)
mov    $0xffffffff,%ecx
cmovne %ecx,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @delta_output_size(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @getInt(i8** %3, i32* %4)
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 10
%9 = select i1 %8, i32 %5, i32 -1
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float real;
  printf("Insira um numero real: ");
  scanf("%f", &real);
  real = real * real;
  printf("Numero Real ao quadrado eh: %f\n", real);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeaf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
mulss  %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xec0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Insira um numero real: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [32 x i8] c"Numero Real ao quadrado eh: %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* 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), float* %2)
%5 = load float, float* %2
%6 = load float, float* %2
%7 = fmul float %5, %6
store float %7, float* %2
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Insira um numero real: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [32 x i8] c"Numero Real ao quadrado eh: %f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @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), float* %1)
%5 = load float, float* %1
%6 = fmul float %5, %5
store float %6, float* %1
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ X509;

/* Variables and functions */
int /*<<< orphan*/ NID_ad_OCSP;
char **ssl_x509_aias(int /*<<< orphan*/ *, int /*<<< orphan*/);
char **ssl_x509_ocsps(X509 *crt) { return ssl_x509_aias(crt, NID_ad_OCSP); }


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

x86 assembly (clang, -O2):
<ssl_x509_ocsps>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <ssl_x509_aias@plt>

LLVM IR (-O0):
@NID_ad_OCSP = global i32 0
define i8** @ssl_x509_ocsps(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @NID_ad_OCSP
%5 = call i8** @ssl_x509_aias(i32* %3, i32 %4)
ret i8** %5
}

LLVM IR (-O2):
@NID_ad_OCSP = global i32 0
define i8** @ssl_x509_ocsps(i32* %0) {
%2 = load i32, i32* @NID_ad_OCSP
%3 = tail call i8** @ssl_x509_aias(i32* %0, i32 %2)
ret i8** %3
}
/* Variables and functions */
int /*<<< orphan*/ hey(char);
int /*<<< orphan*/ printInt(int);
void main() {
  int y = 100;
  int x = y + 5;
  int c[2] = {10, 3};
  int b;
  hey('A');
  printInt(x);
  b = c[0] + 10;
  printInt(b);
  hey('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x64,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x8(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    $0x41,%edi
call   1040 <hey@plt>
mov    -0x8(%rbp),%edi
call   1030 <printInt@plt>
mov    -0x10(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <printInt@plt>
mov    $0xa,%edi
call   1040 <hey@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x41,%edi
call   1040 <hey@plt>
mov    $0x69,%edi
call   1030 <printInt@plt>
mov    $0x14,%edi
call   1030 <printInt@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <hey@plt>

LLVM IR (-O0):
@__const.main.c = [2 x i32] [i32 10, i32 3]
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [2 x i32]
%4 = alloca i32
store i32 100, i32* %1
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 5
store i32 %6, i32* %2
%7 = bitcast [2 x i32]* %3 to i8*
%8 = call i32 @hey(i8 signext 65)
%9 = load i32, i32* %2
%10 = call i32 @printInt(i32 %9)
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%12 = load i32, i32* %11
%13 = add nsw i32 %12, 10
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = call i32 @printInt(i32 %14)
%16 = call i32 @hey(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @hey(i8 signext 65)
%2 = tail call i32 @printInt(i32 105)
%3 = tail call i32 @printInt(i32 20)
%4 = tail call i32 @hey(i8 signext 10)
ret void
}
int is_lowercase(char c) { return (c >= 'a' && c <= 'z'); }


x86 assembly (clang, -O0):
<is_lowercase>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <is_lowercase+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_lowercase>:
add    $0x9f,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_lowercase(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
int ptrcmp(const void *_A, const void *_B) {
  const void *const *A = _A;
  const void *const *B = _B;
  return ({
    typeof(*A) _a = (*A);
    typeof(*B) _b = (*B);
    _a > _b ? 1 : _a < _b ? -1 : 0;
  });
}


x86 assembly (clang, -O0):
<ptrcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x30(%rbp),%rax
jbe    114d <ptrcmp+0x4d>
mov    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1165 <ptrcmp+0x65>
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rsi
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmovb  %ecx,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptrcmp>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
cmp    %rcx,%rax
sbb    %edx,%edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovbe %edx,%eax
ret

LLVM IR (-O0):
define i32 @ptrcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%10 = load i8*, i8** %3
%11 = bitcast i8* %10 to i8**
store i8** %11, i8*** %5
%12 = load i8*, i8** %4
%13 = bitcast i8* %12 to i8**
store i8** %13, i8*** %6
%14 = load i8**, i8*** %5
%15 = load i8*, i8** %14
store i8* %15, i8** %7
%16 = load i8**, i8*** %6
%17 = load i8*, i8** %16
store i8* %17, i8** %8
%18 = load i8*, i8** %7
%19 = load i8*, i8** %8
%20 = icmp ugt i8* %18, %19
br i1 %20, label %21, label %22
21: ; preds = %2
br label %28
22: ; preds = %2
%23 = load i8*, i8** %7
%24 = load i8*, i8** %8
%25 = icmp ult i8* %23, %24
%26 = zext i1 %25 to i64
%27 = select i1 %25, i32 -1, i32 0
br label %28
28: ; preds = %22, %21
%29 = phi i32 [ 1, %21 ], [ %27, %22 ]
store i32 %29, i32* %9
%30 = load i32, i32* %9
ret i32 %30
}

LLVM IR (-O2):
define i32 @ptrcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp ugt i8* %5, %6
%8 = icmp ult i8* %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *ltr_int_get_app_path(char *);
char *ltr_int_my_strcat(char *, char const *);
char *ltr_int_get_data_path(const char *data) {
  char *app_path = ltr_int_get_app_path("/../share/linuxtrack/");
  if (app_path == NULL) {
    return NULL;
  }
  char *data_path = ltr_int_my_strcat(app_path, data);
  free(app_path);
  return data_path;
}


x86 assembly (clang, -O0):
<ltr_int_get_data_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xebd(%rip),%rdi
call   1050 <ltr_int_get_app_path@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1164 <ltr_int_get_data_path+0x34>
movq   $0x0,-0x8(%rbp)
jmp    1186 <ltr_int_get_data_path+0x56>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <ltr_int_my_strcat@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltr_int_get_data_path>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xec2(%rip),%rdi
call   1050 <ltr_int_get_app_path@plt>
test   %rax,%rax
je     1166 <ltr_int_get_data_path+0x36>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <ltr_int_my_strcat@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
jmp    1168 <ltr_int_get_data_path+0x38>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [22 x i8] c"/../share/linuxtrack/\00"
define i8* @ltr_int_get_data_path(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
%6 = call i8* @ltr_int_get_app_path(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %1
store i8* null, i8** %2
br label %17
10: ; preds = %1
%11 = load i8*, i8** %4
%12 = load i8*, i8** %3
%13 = call i8* @ltr_int_my_strcat(i8* %11, i8* %12)
store i8* %13, i8** %5
%14 = load i8*, i8** %4
%15 = call i32 @free(i8* %14)
%16 = load i8*, i8** %5
store i8* %16, i8** %2
br label %17
17: ; preds = %10, %9
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
@.str = [22 x i8] c"/../share/linuxtrack/\00"
define i8* @ltr_int_get_data_path(i8* %0) {
%2 = tail call i8* @ltr_int_get_app_path(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i8* @ltr_int_my_strcat(i8* %2, i8* %0)
%6 = tail call i32 @free(i8* %2)
br label %7
7: ; preds = %1, %4
%8 = phi i8* [ %5, %4 ], [ null, %1 ]
ret i8* %8
}
/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ nl();
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_return(int /*<<< orphan*/);
void cmd_nl(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_return(nl());
}


x86 assembly (clang, -O0):
<cmd_nl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1167 <cmd_nl+0x27>
jmp    117f <cmd_nl+0x3f>
mov    $0x1,%edi
call   1060 <report_count@plt>
mov    $0x0,%al
call   1030 <nl@plt>
mov    %eax,%edi
call   1040 <report_return@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_nl>:
push   %rax
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    114f <cmd_nl+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1060 <report_count@plt>
xor    %eax,%eax
call   1030 <nl@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <report_return@plt>

LLVM IR (-O0):
define void @cmd_nl(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 0)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %13
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 (...) @nl()
%12 = call i32 @report_return(i32 %11)
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @cmd_nl(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @nl()
%8 = tail call i32 @report_return(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
int compare(int a, int b) {
  (void)a;
  (void)b;
  return 1;
}


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

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

LLVM IR (-O0):
define i32 @compare(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
ret i32 1
}

LLVM IR (-O2):
define i32 @compare(i32 %0, i32 %1) {
ret i32 1
}
/* Variables and functions */
void *mmt_load_data_with_prefix(unsigned int, int /*<<< orphan*/,
                                int /*<<< orphan*/);
void *mmt_load_data(unsigned int sz) {
  return mmt_load_data_with_prefix(sz, 0, 0);
}


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

x86 assembly (clang, -O2):
<mmt_load_data>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <mmt_load_data_with_prefix@plt>

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

LLVM IR (-O2):
define i8* @mmt_load_data(i32 %0) {
%2 = tail call i8* @mmt_load_data_with_prefix(i32 %0, i32 0, i32 0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("CGDB Usage:\n"
         "   cgdb [cgdb options] [--] [gdb options]\n"
         "\n"
         "CGDB Options:\n"
         "   -v          Print version information and then exit.\n"
         "   -h          Print help (this message) and then exit.\n"
         "   -d          Set debugger to use.\n"
         "   --          Marks the end of CGDB's options.\n");
}


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

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

LLVM IR (-O0):
@.str = [266 x i8] c"CGDB Usage:\0A cgdb [cgdb options] [--] [gdb options]\0A\0ACGDB Options:\0A -v Print version information and then exit.\0A -h Print help (this message) and then exit.\0A -d Set debugger to use.\0A -- Marks the end of CGDB's options.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([266 x i8], [266 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [265 x i8] c"CGDB Usage:\0A cgdb [cgdb options] [--] [gdb options]\0A\0ACGDB Options:\0A -v Print version information and then exit.\0A -h Print help (this message) and then exit.\0A -d Set debugger to use.\0A -- Marks the end of CGDB's options.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([265 x i8], [265 x i8]* @str, i64 0, i64 0))
ret void
}
int cfs_size_round32(int val) { return (val + 0x1f) & (~0x1f); }


x86 assembly (clang, -O0):
<cfs_size_round32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1f,%eax
and    $0xffffffe0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfs_size_round32>:
lea    0x1f(%rdi),%eax
and    $0xffffffe0,%eax
ret

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

LLVM IR (-O2):
define i32 @cfs_size_round32(i32 %0) {
%2 = add nsw i32 %0, 31
%3 = and i32 %2, -32
ret i32 %3
}