xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned long fs_update_crc(long, unsigned char *, int);
unsigned long fs_crc(unsigned char *buf, int len) {
  return fs_update_crc(0L, buf, len);
}


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

x86 assembly (clang, -O2):
<fs_crc>:
mov    %esi,%edx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <fs_update_crc@plt>

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

LLVM IR (-O2):
define i64 @fs_crc(i8* %0, i32 %1) {
%3 = tail call i64 @fs_update_crc(i64 0, i8* %0, i32 %1)
ret i64 %3
}
void put_4bytes(unsigned char *p, long v) {
  p[0] = (unsigned char)(v >> 24);
  p[1] = (unsigned char)(v >> 16);
  p[2] = (unsigned char)(v >> 8);
  p[3] = (unsigned char)v;
}


x86 assembly (clang, -O0):
<put_4bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sar    $0x18,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
sar    $0x10,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
sar    $0x8,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_4bytes>:
bswap  %esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @put_4bytes(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = ashr i64 %5, 24
%7 = trunc i64 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i64, i64* %4
%11 = ashr i64 %10, 16
%12 = trunc i64 %11 to i8
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
%15 = load i64, i64* %4
%16 = ashr i64 %15, 8
%17 = trunc i64 %16 to i8
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 2
store i8 %17, i8* %19
%20 = load i64, i64* %4
%21 = trunc i64 %20 to i8
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 3
store i8 %21, i8* %23
ret void
}

LLVM IR (-O2):
define void @put_4bytes(i8* nocapture writeonly %0, i64 %1) {
%3 = lshr i64 %1, 24
%4 = trunc i64 %3 to i8
store i8 %4, i8* %0
%5 = lshr i64 %1, 16
%6 = trunc i64 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i64 %1, 8
%9 = trunc i64 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = trunc i64 %1 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char const *);
void gl_warn(const char *s) { puts(s); }


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

x86 assembly (clang, -O2):
<gl_warn>:
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
define void @gl_warn(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, short);
void extractdate(short int x) { printf("month = %d\n", (x & 0xf000) >> 12); }


x86 assembly (clang, -O0):
<extractdate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
and    $0xf000,%eax
sar    $0xc,%eax
lea    0xece(%rip),%rdi
movswl %ax,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extractdate>:
movzwl %di,%esi
shr    $0xc,%esi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"month = %d\0A\00"
define void @extractdate(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 61440
%6 = ashr i32 %5, 12
%7 = trunc i32 %6 to i16
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i16 signext %7)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"month = %d\0A\00"
define void @extractdate(i16 signext %0) {
%2 = lshr i16 %0, 12
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i16 signext %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int __infer_nondet_int();
int iswupper(wint_t wc) { return __infer_nondet_int(); }


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

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

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

LLVM IR (-O2):
define i32 @iswupper(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Variables and functions */
int maior(int *, int);
int menor(int *, int);
int soma_maior_menor(int v[], int tam) { return maior(v, tam) + menor(v, tam); }


x86 assembly (clang, -O0):
<soma_maior_menor>:
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 <maior@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <menor@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<soma_maior_menor>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <maior@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <menor@plt>
add    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @soma_maior_menor(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 @maior(i32* %5, i32 %6)
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = call i32 @menor(i32* %8, i32 %9)
%11 = add nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @soma_maior_menor(i32* %0, i32 %1) {
%3 = tail call i32 @maior(i32* %0, i32 %1)
%4 = tail call i32 @menor(i32* %0, i32 %1)
%5 = add nsw i32 %4, %3
ret i32 %5
}
int reset_assert_bulk(struct reset_ctl_bulk *bulk) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.reset_ctl_bulk = type opaque
define i32 @reset_assert_bulk(%struct.reset_ctl_bulk* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *);
void debug(char *color, char *name, char *str) {
  if (1) {
    printf("[%s%s%s] %s\n", color, name, "\e[39m", str);
  }
}


x86 assembly (clang, -O0):
<debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%r8
lea    0xec9(%rip),%rdi
lea    0xecf(%rip),%rcx
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug>:
mov    %rdx,%r8
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee0(%rip),%rdi
lea    0xee6(%rip),%rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"[%s%s%s] %s\0A\00"
@.str.1 = [6 x i8] c"\1B[39m\00"
define void @debug(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"[%s%s%s] %s\0A\00"
@.str.1 = [6 x i8] c"\1B[39m\00"
define void @debug(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned int finhb(int /*<<< orphan*/ *);
unsigned int finhw(FILE *f) {
  unsigned int result;
  result = finhb(f) << 8;
  result |= finhb(f);
  return result;
}


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

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

LLVM IR (-O0):
define i32 @finhw(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @finhb(i32* %4)
%6 = shl i32 %5, 8
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = call i32 @finhb(i32* %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):
define i32 @finhw(i32* %0) {
%2 = tail call i32 @finhb(i32* %0)
%3 = shl i32 %2, 8
%4 = tail call i32 @finhb(i32* %0)
%5 = or i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Msp430TimerCapComP__0__Timer__overflow();
int /*<<< orphan*/ Msp430TimerCapComP__1__Timer__overflow();
int /*<<< orphan*/ Msp430TimerCapComP__2__Timer__overflow();
void Msp430TimerP__0__Timer__overflow(void) {
  Msp430TimerCapComP__0__Timer__overflow();
  Msp430TimerCapComP__1__Timer__overflow();
  Msp430TimerCapComP__2__Timer__overflow();
}


x86 assembly (clang, -O0):
<Msp430TimerP__0__Timer__overflow>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Msp430TimerCapComP__0__Timer__overflow@plt>
mov    $0x0,%al
call   1040 <Msp430TimerCapComP__1__Timer__overflow@plt>
mov    $0x0,%al
call   1050 <Msp430TimerCapComP__2__Timer__overflow@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Msp430TimerP__0__Timer__overflow>:
push   %rax
xor    %eax,%eax
call   1030 <Msp430TimerCapComP__0__Timer__overflow@plt>
xor    %eax,%eax
call   1040 <Msp430TimerCapComP__1__Timer__overflow@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <Msp430TimerCapComP__2__Timer__overflow@plt>

LLVM IR (-O0):
define void @Msp430TimerP__0__Timer__overflow() {
%1 = call i32 (...) @Msp430TimerCapComP__0__Timer__overflow()
%2 = call i32 (...) @Msp430TimerCapComP__1__Timer__overflow()
%3 = call i32 (...) @Msp430TimerCapComP__2__Timer__overflow()
ret void
}

LLVM IR (-O2):
define void @Msp430TimerP__0__Timer__overflow() {
%1 = tail call i32 (...) @Msp430TimerCapComP__0__Timer__overflow()
%2 = tail call i32 (...) @Msp430TimerCapComP__1__Timer__overflow()
%3 = tail call i32 (...) @Msp430TimerCapComP__2__Timer__overflow()
ret void
}
/* Variables and functions */
scalar_t__ is_digit(int);
bool is_decdigit(int c) {
  if (is_digit(c)) {
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<is_decdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <is_digit@plt>
cmp    $0x0,%rax
je     1139 <is_decdigit+0x29>
movl   $0x1,-0x4(%rbp)
jmp    1140 <is_decdigit+0x30>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_decdigit>:
push   %rax
call   1030 <is_digit@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @is_decdigit(i32 %0) {
%2 = tail call i64 @is_digit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
float nI(int i) { return (float)i / 200000; }


x86 assembly (clang, -O0):
<nI>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  0xeec(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<nI>:
cvtsi2ss %edi,%xmm0
divss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @nI(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to float
%5 = fdiv float %4, 2.000000e+05
ret float %5
}

LLVM IR (-O2):
define float @nI(i32 %0) {
%2 = sitofp i32 %0 to float
%3 = fdiv float %2, 2.000000e+05
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ halt();
int f21() {
  int x = 4;
  ++x;
  if (1) {
    halt();
    (void)x;
  }
  return 1;
}


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

x86 assembly (clang, -O2):
<f21>:
push   %rax
xor    %eax,%eax
call   1030 <halt@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f21() {
%1 = alloca i32
store i32 4, i32* %1
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 1
store i32 %3, i32* %1
%4 = call i32 (...) @halt()
%5 = load i32, i32* %1
ret i32 1
}

LLVM IR (-O2):
define i32 @f21() {
%1 = tail call i32 (...) @halt()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cglognot(void) {
  gen("negq\t%rax");
  gen("sbbq\t%rax,%rax");
  gen("incq\t%rax");
}


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

x86 assembly (clang, -O2):
<cglognot>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <gen@plt>
lea    0xee6(%rip),%rdi
call   1030 <gen@plt>
lea    0xee9(%rip),%rdi
pop    %rax
jmp    1030 <gen@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"negq\09%rax\00"
@.str.1 = [15 x i8] c"sbbq\09%rax,%rax\00"
@.str.2 = [10 x i8] c"incq\09%rax\00"
define void @cglognot() {
%1 = call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"negq\09%rax\00"
@.str.1 = [15 x i8] c"sbbq\09%rax,%rax\00"
@.str.2 = [10 x i8] c"incq\09%rax\00"
define void @cglognot() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
float __nv_remainderf(float, float);
float remainderf(float __a, float __b) { return __nv_remainderf(__a, __b); }


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

x86 assembly (clang, -O2):
<remainderf>:
jmp    1030 <__nv_remainderf@plt>

LLVM IR (-O0):
define float @remainderf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @__nv_remainderf(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @remainderf(float %0, float %1) {
%3 = tail call float @__nv_remainderf(float %0, float %1)
ret float %3
}
int *printmessage_1_svc(char **argp, struct svc_req *rqstp) {
  static int result;
  return &result;
}


x86 assembly (clang, -O0):
<printmessage_1_svc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0x2f11(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.svc_req = type opaque
@printmessage_1_svc.result = internal global i32 0
define i32* @printmessage_1_svc(i8** %0, %struct.svc_req* %1) {
%3 = alloca i8**
%4 = alloca %struct.svc_req*
store i8** %0, i8*** %3
store %struct.svc_req* %1, %struct.svc_req** %4
ret i32* @printmessage_1_svc.result
}

LLVM IR (-O2):
%struct.svc_req = type opaque
@printmessage_1_svc.result = internal global i32 0
define i32* @printmessage_1_svc(i8** nocapture readnone %0, %struct.svc_req* nocapture readnone %1) {
ret i32* @printmessage_1_svc.result
}
char *help() {
  return "Simple Brainfuck Interpreter\nThis is an interpreter "
         "for programs written in brainfuck.\nIf you "
         "want to learn more about this language please visit "
         "http://es.wikipedia.org/wiki/Brainfuck.\n\n "
         "Synopsis\n\tsbfi OPTION NAME_OF_FILE\n"
         "Description:\n\tRun a Brainfuck program according to OPTION:\n "
         "\t-s Executes step by step, outputs console and memory\n"
         "\t-a Executes all at once, outputs console and memory\n"
         "\t-c Executes all once, outputs console only\n\n";
}


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

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

LLVM IR (-O0):
@.str = [436 x i8] c"Simple Brainfuck Interpreter\0AThis is an interpreter for programs written in brainfuck.\0AIf you want to learn more about this language please visit http://es.wikipedia.org/wiki/Brainfuck.\0A\0A Synopsis\0A\09sbfi OPTION NAME_OF_FILE\0ADescription:\0A\09Run a Brainfuck program according to OPTION:\0A \09-s Executes step by step, outputs console and memory\0A\09-a Executes all at once, outputs console and memory\0A\09-c Executes all once, outputs console only\0A\0A\00"
define i8* @help() {
ret i8* getelementptr inbounds ([436 x i8], [436 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [436 x i8] c"Simple Brainfuck Interpreter\0AThis is an interpreter for programs written in brainfuck.\0AIf you want to learn more about this language please visit http://es.wikipedia.org/wiki/Brainfuck.\0A\0A Synopsis\0A\09sbfi OPTION NAME_OF_FILE\0ADescription:\0A\09Run a Brainfuck program according to OPTION:\0A \09-s Executes step by step, outputs console and memory\0A\09-a Executes all at once, outputs console and memory\0A\09-c Executes all once, outputs console only\0A\0A\00"
define i8* @help() {
ret i8* getelementptr inbounds ([436 x i8], [436 x i8]* @.str, i64 0, i64 0)
}
void wifi_evt_https_on_req(const struct wifi_msg_https_on_req_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_https_on_req_evt_t = type opaque
define void @wifi_evt_https_on_req(%struct.wifi_msg_https_on_req_evt_t* nocapture %0) {
ret void
}
/* Variables and functions */
int u8isgreeki(int /*<<< orphan*/);
int /*<<< orphan*/ u8tointcc(char const *);
int u8isgreekcc(const char *c) { return u8isgreeki(u8tointcc(c)); }


x86 assembly (clang, -O0):
<u8isgreekcc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <u8tointcc@plt>
mov    %eax,%edi
call   1040 <u8isgreeki@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8isgreekcc>:
push   %rax
call   1030 <u8tointcc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <u8isgreeki@plt>

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

LLVM IR (-O2):
define i32 @u8isgreekcc(i8* %0) {
%2 = tail call i32 @u8tointcc(i8* %0)
%3 = tail call i32 @u8isgreeki(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void display_version(void) {
  printf("nanddump"
         " "
         "$Revision: 4848 $"
         "\n"
         "\n"
         "nanddump"
         " comes with NO WARRANTY\n"
         "to the extent permitted by law.\n"
         "\n"
         "You may redistribute copies of "
         "nanddump"
         "\n"
         "under the terms of the GNU General Public Licence.\n"
         "See the file `COPYING' for more information.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<display_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<display_version>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [230 x i8] c"nanddump $Revision: 4848 $\0A\0Ananddump comes with NO WARRANTY\0Ato the extent permitted by law.\0A\0AYou may redistribute copies of nanddump\0Aunder the terms of the GNU General Public Licence.\0ASee the file `COPYING' for more information.\0A\00"
define void @display_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([230 x i8], [230 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [229 x i8] c"nanddump $Revision: 4848 $\0A\0Ananddump comes with NO WARRANTY\0Ato the extent permitted by law.\0A\0AYou may redistribute copies of nanddump\0Aunder the terms of the GNU General Public Licence.\0ASee the file `COPYING' for more information.\00"
define void @display_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([229 x i8], [229 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ EnableInterrupts();
void Core3_Deadloop(void) {
  EnableInterrupts();
  while (1) {
  }
}


x86 assembly (clang, -O0):
<Core3_Deadloop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <EnableInterrupts@plt>
jmp    111b <Core3_Deadloop+0xb>

x86 assembly (clang, -O2):
<Core3_Deadloop>:
push   %rax
xor    %eax,%eax
call   1030 <EnableInterrupts@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <Core3_Deadloop+0x10>

LLVM IR (-O0):
define void @Core3_Deadloop() {
%1 = call i32 (...) @EnableInterrupts()
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
define void @Core3_Deadloop() {
%1 = tail call i32 (...) @EnableInterrupts()
br label %2
2: ; preds = %0, %2
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/ *);
int /*<<< orphan*/ fileno(int /*<<< orphan*/ *);
int lock_fd(int /*<<< orphan*/);
int lock_file(FILE *f) {
  assert(f);
  return lock_fd(fileno(f));
}


x86 assembly (clang, -O0):
<lock_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fileno@plt>
mov    %eax,%edi
call   1050 <lock_fd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock_file>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1040 <fileno@plt>
mov    %eax,%edi
pop    %rbx
jmp    1050 <lock_fd@plt>

LLVM IR (-O0):
define i32 @lock_file(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @assert(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @fileno(i32* %5)
%7 = call i32 @lock_fd(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @lock_file(i32* %0) {
%2 = tail call i32 @assert(i32* %0)
%3 = tail call i32 @fileno(i32* %0)
%4 = tail call i32 @lock_fd(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _HibernateWriteComplete();
void HibernateTamperEnable(void) {
  (*((volatile unsigned long *)(0x400FC360))) = 0xA3359554;
  _HibernateWriteComplete();
  (*((volatile unsigned long *)(0x400FC400))) |= 0x00000001;
  _HibernateWriteComplete();
  (*((volatile unsigned long *)(0x400FC360))) = 0;
  _HibernateWriteComplete();
}


x86 assembly (clang, -O0):
<HibernateTamperEnable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fc360,%eax
mov    $0xa3359554,%ecx
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <_HibernateWriteComplete@plt>
mov    $0x400fc400,%eax
mov    (%rax),%rcx
or     $0x1,%rcx
mov    $0x400fc400,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <_HibernateWriteComplete@plt>
mov    $0x400fc360,%eax
movq   $0x0,(%rax)
mov    $0x0,%al
call   1030 <_HibernateWriteComplete@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateTamperEnable>:
push   %rax
mov    $0xa3359554,%eax
mov    %rax,0x400fc360
40
xor    %eax,%eax
call   1030 <_HibernateWriteComplete@plt>
orq    $0x1,0x400fc400
40 01
xor    %eax,%eax
call   1030 <_HibernateWriteComplete@plt>
movq   $0x0,0x400fc360
xor    %eax,%eax
pop    %rcx
jmp    1030 <_HibernateWriteComplete@plt>

LLVM IR (-O0):
define void @HibernateTamperEnable() {
store volatile i64 2738197844, i64* inttoptr (i64 1074774880 to i64*)
%1 = call i32 (...) @_HibernateWriteComplete()
%2 = load volatile i64, i64* inttoptr (i64 1074775040 to i64*)
%3 = or i64 %2, 1
store volatile i64 %3, i64* inttoptr (i64 1074775040 to i64*)
%4 = call i32 (...) @_HibernateWriteComplete()
store volatile i64 0, i64* inttoptr (i64 1074774880 to i64*)
%5 = call i32 (...) @_HibernateWriteComplete()
ret void
}

LLVM IR (-O2):
define void @HibernateTamperEnable() {
store volatile i64 2738197844, i64* inttoptr (i64 1074774880 to i64*)
%1 = tail call i32 (...) @_HibernateWriteComplete()
%2 = load volatile i64, i64* inttoptr (i64 1074775040 to i64*)
%3 = or i64 %2, 1
store volatile i64 %3, i64* inttoptr (i64 1074775040 to i64*)
%4 = tail call i32 (...) @_HibernateWriteComplete()
store volatile i64 0, i64* inttoptr (i64 1074774880 to i64*)
%5 = tail call i32 (...) @_HibernateWriteComplete()
ret void
}
void gtk_get_current_event_time() {}


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

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

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

LLVM IR (-O2):
define void @gtk_get_current_event_time() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Dequeue();
int /*<<< orphan*/ Enqueue(int);
int /*<<< orphan*/ Print();
int /*<<< orphan*/ printf(char *, int);
int size();
int main(void) {
  Enqueue(2);
  Print();
  Enqueue(4);
  Print();
  Enqueue(6);
  Print();
  Dequeue();
  Print();
  Enqueue(8);
  Print();
  printf("Length of Queue: %d\n", size());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <Enqueue@plt>
mov    $0x0,%al
call   1070 <Print@plt>
mov    $0x4,%edi
call   1030 <Enqueue@plt>
mov    $0x0,%al
call   1070 <Print@plt>
mov    $0x6,%edi
call   1030 <Enqueue@plt>
mov    $0x0,%al
call   1070 <Print@plt>
mov    $0x0,%al
call   1060 <Dequeue@plt>
mov    $0x0,%al
call   1070 <Print@plt>
mov    $0x8,%edi
call   1030 <Enqueue@plt>
mov    $0x0,%al
call   1070 <Print@plt>
mov    $0x0,%al
call   1040 <size@plt>
mov    %eax,%esi
lea    0xe4a(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1030 <Enqueue@plt>
xor    %eax,%eax
call   1070 <Print@plt>
mov    $0x4,%edi
call   1030 <Enqueue@plt>
xor    %eax,%eax
call   1070 <Print@plt>
mov    $0x6,%edi
call   1030 <Enqueue@plt>
xor    %eax,%eax
call   1070 <Print@plt>
xor    %eax,%eax
call   1060 <Dequeue@plt>
xor    %eax,%eax
call   1070 <Print@plt>
mov    $0x8,%edi
call   1030 <Enqueue@plt>
xor    %eax,%eax
call   1070 <Print@plt>
xor    %eax,%eax
call   1040 <size@plt>
lea    0xe4f(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Length of Queue: %d\0A\00"
define i32 @main() {
%1 = call i32 @Enqueue(i32 2)
%2 = call i32 (...) @Print()
%3 = call i32 @Enqueue(i32 4)
%4 = call i32 (...) @Print()
%5 = call i32 @Enqueue(i32 6)
%6 = call i32 (...) @Print()
%7 = call i32 (...) @Dequeue()
%8 = call i32 (...) @Print()
%9 = call i32 @Enqueue(i32 8)
%10 = call i32 (...) @Print()
%11 = call i32 (...) @size()
%12 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Length of Queue: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @Enqueue(i32 2)
%2 = tail call i32 (...) @Print()
%3 = tail call i32 @Enqueue(i32 4)
%4 = tail call i32 (...) @Print()
%5 = tail call i32 @Enqueue(i32 6)
%6 = tail call i32 (...) @Print()
%7 = tail call i32 (...) @Dequeue()
%8 = tail call i32 (...) @Print()
%9 = tail call i32 @Enqueue(i32 8)
%10 = tail call i32 (...) @Print()
%11 = tail call i32 (...) @size()
%12 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ligne_1(int x) {
  int a;
  a = 0;
  while (a != x) {
    if (a != 0 && a != x - 1) {
      ft_putchar('B');
    } else {
      ft_putchar('A');
    }
    a++;
  }
}


x86 assembly (clang, -O0):
<ligne_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
je     1170 <ligne_1+0x60>
cmpl   $0x0,-0x8(%rbp)
je     1158 <ligne_1+0x48>
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     1158 <ligne_1+0x48>
mov    $0x42,%edi
call   1030 <ft_putchar@plt>
jmp    1162 <ligne_1+0x52>
mov    $0x41,%edi
call   1030 <ft_putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <ligne_1+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ligne_1>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
je     1148 <ligne_1+0x38>
mov    %edi,%r14d
xor    %ebx,%ebx
nopl   (%rax)
lea    (%r14,%rbx,1),%eax
sub    $0x1,%ebx
setb   %cl
cmp    $0x1,%eax
sete   %al
or     %cl,%al
movzbl %al,%eax
mov    $0x42,%edi
sub    %eax,%edi
call   1030 <ft_putchar@plt>
mov    %r14d,%eax
add    %ebx,%eax
jne    1120 <ligne_1+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @ligne_1(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ 0, %3 ], [ %12, %5 ]
%7 = icmp eq i32 %6, 0
%8 = icmp eq i32 %6, %4
%9 = select i1 %7, i1 true, i1 %8
%10 = select i1 %9, i8 65, i8 66
%11 = tail call i32 @ft_putchar(i8 signext %10)
%12 = add nuw nsw i32 %6, 1
%13 = icmp eq i32 %12, %0
br i1 %13, label %14, label %5
14: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ menu();
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  printf("Welcome to Coldornot.\n\n");
  menu();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Welcome to Coldornot.\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @menu()
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"Welcome to Coldornot.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @menu()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ rm(char *);
int /*<<< orphan*/ sm(char *);
void decckm(int flag) {
  if (flag)
    sm("?1");
  else
    rm("?1");
}


x86 assembly (clang, -O0):
<decckm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1146 <decckm+0x26>
lea    0xec4(%rip),%rdi
call   1040 <sm@plt>
jmp    1152 <decckm+0x32>
lea    0xeb3(%rip),%rdi
call   1030 <rm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decckm>:
test   %edi,%edi
je     1130 <decckm+0x10>
lea    0xed5(%rip),%rdi
jmp    1040 <sm@plt>
lea    0xec9(%rip),%rdi
jmp    1030 <rm@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"?1\00"
define void @decckm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @sm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @rm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"?1\00"
define void @decckm(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @sm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 @rm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}
unsigned int altera_a10_cdr_lookup_fastlock(unsigned int lpd) {
  if (lpd == 16)
    return 1;
  else
    return 0;
}


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

x86 assembly (clang, -O2):
<altera_a10_cdr_lookup_fastlock>:
xor    %eax,%eax
cmp    $0x10,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @altera_a10_cdr_lookup_fastlock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 16
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 @altera_a10_cdr_lookup_fastlock(i32 %0) {
%2 = icmp eq i32 %0, 16
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ lucas();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ twins();
int main() {
  printf("LUCAS NUMBERS\n");
  lucas();
  printf("\n\nTWIN NUMBERS\n");
  twins();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"LUCAS NUMBERS\0A\00"
@.str.1 = [16 x i8] c"\0A\0ATWIN NUMBERS\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @lucas()
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @twins()
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"LUCAS NUMBERS\00"
@str.2 = [15 x i8] c"\0A\0ATWIN NUMBERS\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @lucas()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 (...) @twins()
ret i32 0
}
int foo(a, b, c)
int a;
float b;
int *c;
{ return a + (int)b + *c; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
cvtsd2ss %xmm0,%xmm0
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cvttss2si -0x8(%rbp),%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
add    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cvtsd2ss %xmm0,%xmm0
cvttss2si %xmm0,%eax
add    %edi,%eax
add    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0, double %1, i32* %2) {
%4 = alloca i32
%5 = alloca float
%6 = alloca i32*
%7 = fptrunc double %1 to float
store i32 %0, i32* %4
store float %7, float* %5
store i32* %2, i32** %6
%8 = load i32, i32* %4
%9 = load float, float* %5
%10 = fptosi float %9 to i32
%11 = add nsw i32 %8, %10
%12 = load i32*, i32** %6
%13 = load i32, i32* %12
%14 = add nsw i32 %11, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @foo(i32 %0, double %1, i32* nocapture %2) {
%4 = fptrunc double %1 to float
%5 = fptosi float %4 to i32
%6 = add nsw i32 %5, %0
%7 = load i32, i32* %2
%8 = add nsw i32 %6, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int numero, soma = 0;
  do {
    scanf("%d", &numero);
    if (numero <= 0) {
      break;
    } else {
      soma += numero;
    }
  } while (1);
  printf("Soma=%d\n", soma);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jg     1155 <main+0x35>
jmp    1172 <main+0x52>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1163 <main+0x43>
mov    $0x1,%al
test   $0x1,%al
jne    1136 <main+0x16>
jmp    1172 <main+0x52>
mov    -0xc(%rbp),%esi
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
lea    0xece(%rip),%r14
lea    0xc(%rsp),%r15
nopw   0x0(%rax,%rax,1)
mov    %eax,%ebx
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%ecx
lea    (%rcx,%rbx,1),%eax
test   %ecx,%ecx
jg     1140 <main+0x20>
lea    0xea4(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"Soma=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = phi i32 [ 0, %0 ], [ %8, %3 ]
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 1
%8 = add nsw i32 %6, %4
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
void foo(void) {
  void bar(void);
  bar();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
call   1030 <bar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
jmp    1030 <bar@plt>

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

LLVM IR (-O2):
define void @foo() {
tail call void @bar()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lgen(char *, char *, int);
void cgincsw(int a) { lgen("%s\t%c%d", "incl", a); }


x86 assembly (clang, -O0):
<cgincsw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xedb(%rip),%rdi
lea    0xedc(%rip),%rsi
call   1030 <lgen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgincsw>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
lea    0xee8(%rip),%rsi
jmp    1030 <lgen@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%s\09%c%d\00"
@.str.1 = [5 x i8] c"incl\00"
define void @cgincsw(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @lgen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s\09%c%d\00"
@.str.1 = [5 x i8] c"incl\00"
define void @cgincsw(i32 %0) {
%2 = tail call i32 @lgen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  if ((argc != 1) && (argc != 3)) {
    printf("usage: %s [-f file]", argv[0]);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     1159 <main+0x49>
cmpl   $0x3,-0x8(%rbp)
je     1159 <main+0x49>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1160 <main+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
and    $0xfffffffd,%edi
xor    %eax,%eax
cmp    $0x1,%edi
je     1133 <main+0x23>
push   %rax
mov    (%rsi),%rsi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
@.str = [20 x i8] c"usage: %s [-f file]\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = and i32 %0, -3
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i8*, i8** %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ putLinePicture(double, double, int /*<<< orphan*/, int,
                                  double);
void putVerticalLinePicture(double px, double py, double len) {
  putLinePicture(px, py, 0, 1, len);
}


x86 assembly (clang, -O0):
<putVerticalLinePicture>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <putLinePicture@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putVerticalLinePicture>:
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <putLinePicture@plt>

LLVM IR (-O0):
define void @putVerticalLinePicture(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call i32 @putLinePicture(double %7, double %8, i32 0, i32 1, double %9)
ret void
}

LLVM IR (-O2):
define void @putVerticalLinePicture(double %0, double %1, double %2) {
%4 = tail call i32 @putLinePicture(double %0, double %1, i32 0, i32 1, double %2)
ret void
}
/* Variables and functions */
char *appendExt(char const *, char const *);
int fileExists(char *);
int /*<<< orphan*/ free(char *);
int extExists(const char *name, const char *newExt) {
  char *fName = appendExt(name, newExt);
  int exists = fileExists(fName);
  free(fName);
  return exists;
}


x86 assembly (clang, -O0):
<extExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <appendExt@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <fileExists@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extExists>:
push   %rbp
push   %rbx
push   %rax
call   1050 <appendExt@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <fileExists@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @extExists(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i8* @appendExt(i8* %7, i8* %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = call i32 @fileExists(i8* %10)
store i32 %11, i32* %6
%12 = load i8*, i8** %5
%13 = call i32 @free(i8* %12)
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
define i32 @extExists(i8* %0, i8* %1) {
%3 = tail call i8* @appendExt(i8* %0, i8* %1)
%4 = tail call i32 @fileExists(i8* %3)
%5 = tail call i32 @free(i8* %3)
ret i32 %4
}