xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_scilab_comment_entities();
int /*<<< orphan*/ test_scilab_comments();
void all_scilab_tests() {
  test_scilab_comments();
  test_scilab_comment_entities();
}


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

x86 assembly (clang, -O2):
<all_scilab_tests>:
push   %rax
xor    %eax,%eax
call   1030 <test_scilab_comments@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_scilab_comment_entities@plt>

LLVM IR (-O0):
define void @all_scilab_tests() {
%1 = call i32 (...) @test_scilab_comments()
%2 = call i32 (...) @test_scilab_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_scilab_tests() {
%1 = tail call i32 (...) @test_scilab_comments()
%2 = tail call i32 (...) @test_scilab_comment_entities()
ret void
}
/* Variables and functions */
int dateToDays(int, int, int, int);
int findNextTaxDay(int taxDay, int years, int isLeapYear) {
  int taxDigit = 0;
  if (taxDay == 6)
    taxDigit = dateToDays(17, 4, years, isLeapYear);
  else if (taxDay == 0)
    taxDigit = dateToDays(16, 4, years, isLeapYear);
  else
    taxDigit = dateToDays(15, 4, years, isLeapYear);
  return taxDigit;
}


x86 assembly (clang, -O0):
<findNextTaxDay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x4(%rbp)
jne    114f <findNextTaxDay+0x3f>
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x11,%edi
mov    $0x4,%esi
call   1030 <dateToDays@plt>
mov    %eax,-0x10(%rbp)
jmp    1193 <findNextTaxDay+0x83>
cmpl   $0x0,-0x4(%rbp)
jne    1176 <findNextTaxDay+0x66>
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x10,%edi
mov    $0x4,%esi
call   1030 <dateToDays@plt>
mov    %eax,-0x10(%rbp)
jmp    118e <findNextTaxDay+0x7e>
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0xf,%edi
mov    $0x4,%esi
call   1030 <dateToDays@plt>
mov    %eax,-0x10(%rbp)
jmp    1193 <findNextTaxDay+0x83>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findNextTaxDay>:
mov    %edx,%ecx
mov    %esi,%edx
cmp    $0x1,%edi
mov    $0xf,%eax
adc    $0x0,%eax
cmp    $0x6,%edi
mov    $0x11,%edi
cmovne %eax,%edi
mov    $0x4,%esi
jmp    1030 <dateToDays@plt>

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

LLVM IR (-O2):
define i32 @findNextTaxDay(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 16, i32 15
%6 = icmp eq i32 %0, 6
%7 = select i1 %6, i32 17, i32 %5
%8 = tail call i32 @dateToDays(i32 %7, i32 4, i32 %1, i32 %2)
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int parse_bgp_path_attr_nexthop(char *buffer, int remaining, uint8_t *input,
                                int len) {
  return len;
}


x86 assembly (clang, -O0):
<parse_bgp_path_attr_nexthop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_bgp_path_attr_nexthop>:
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @parse_bgp_path_attr_nexthop(i8* %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @parse_bgp_path_attr_nexthop(i8* nocapture readnone %0, i32 %1, i32* nocapture readnone %2, i32 returned %3) {
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int HadTu_alignment(void const *);
int HadTu_size(void const *);
size_t HadTu_paddedSize(const void *my) {
  uint32_t size;
  uint32_t alignment;
  size = HadTu_size(my);
  alignment = HadTu_alignment(my);
  return (size & (alignment - 1)) ? (size & ~(alignment - 1)) + alignment
                                  : size;
}


x86 assembly (clang, -O0):
<HadTu_paddedSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <HadTu_size@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <HadTu_alignment@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1171 <HadTu_paddedSize+0x51>
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1177 <HadTu_paddedSize+0x57>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HadTu_paddedSize>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <HadTu_size@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <HadTu_alignment@plt>
lea    -0x1(%rax),%ecx
mov    %eax,%edx
neg    %edx
and    %ebp,%edx
add    %eax,%edx
test   %ebp,%ecx
cmove  %ebp,%edx
movslq %edx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i64 @HadTu_paddedSize(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @HadTu_size(i8* %5)
store i32 %6, i32* %3
%7 = load i8*, i8** %2
%8 = call i32 @HadTu_alignment(i8* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 1
%12 = and i32 %9, %11
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %1
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = sub nsw i32 %16, 1
%18 = xor i32 %17, -1
%19 = and i32 %15, %18
%20 = load i32, i32* %4
%21 = add nsw i32 %19, %20
br label %24
22: ; preds = %1
%23 = load i32, i32* %3
br label %24
24: ; preds = %22, %14
%25 = phi i32 [ %21, %14 ], [ %23, %22 ]
%26 = sext i32 %25 to i64
ret i64 %26
}

LLVM IR (-O2):
define i64 @HadTu_paddedSize(i8* %0) {
%2 = tail call i32 @HadTu_size(i8* %0)
%3 = tail call i32 @HadTu_alignment(i8* %0)
%4 = add nsw i32 %3, -1
%5 = and i32 %4, %2
%6 = icmp eq i32 %5, 0
%7 = sub i32 0, %3
%8 = and i32 %2, %7
%9 = add nsw i32 %8, %3
%10 = select i1 %6, i32 %2, i32 %9
%11 = sext i32 %10 to i64
ret i64 %11
}
__attribute__((always_)) int is_vmalloc_addr(const void *x) {
  unsigned long addr = (unsigned long)x;
  return addr >= (0xffffc90000000000UL) && addr < (0xffffe8ffffffffffUL);
}


x86 assembly (clang, -O0):
<is_vmalloc_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
movabs $0xffffc90000000000,%rcx
c9 ff ff
cmp    %rcx,-0x10(%rbp)
mov    %al,-0x11(%rbp)
jb     113d <is_vmalloc_addr+0x3d>
movabs $0xffffe8ffffffffff,%rax
e8 ff ff
cmp    %rax,-0x10(%rbp)
setb   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_vmalloc_addr>:
mov    %rdi,%rax
shr    $0x28,%rax
cmp    $0xffffc9,%eax
setae  %al
movabs $0xffffe8ffffffffff,%rcx
e8 ff ff
cmp    %rcx,%rdi
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_vmalloc_addr(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = icmp uge i64 %6, -60473139527680
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i64, i64* %3
%10 = icmp ult i64 %9, -25288767438849
br label %11
11: ; preds = %8, %1
%12 = phi i1 [ false, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @is_vmalloc_addr(i8* readnone %0) {
%2 = icmp ugt i8* %0, inttoptr (i64 -60473139527681 to i8*)
%3 = icmp ult i8* %0, inttoptr (i64 -25288767438849 to i8*)
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int hash(const char *s) {
  unsigned int h = 0;
  while (*s)
    h = h * 17 + ((*s++) & 0xdf);
  return h % 11987;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1142 <hash+0x42>
imul   $0x11,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
and    $0xdf,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x2ed3,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     114b <hash+0x4b>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
mov    %eax,%edx
shl    $0x4,%edx
add    %eax,%edx
and    $0xdf,%cl
movzbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
mov    %eax,%ecx
imul   $0x5de78687,%rcx,%rcx
shr    $0x20,%rcx
mov    %eax,%edx
sub    %ecx,%edx
shr    %edx
add    %ecx,%edx
shr    $0xd,%edx
imul   $0x2ed3,%edx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %12, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 17
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = and i8 %5, -33
%11 = zext i8 %10 to i32
%12 = add i32 %8, %11
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4
%16 = urem i32 %12, 11987
br label %17
17: ; preds = %15, %1
%18 = phi i32 [ 0, %1 ], [ %16, %15 ]
ret i32 %18
}
int teamd_bpf_desc_compile_finish(struct sock_fprog *fprog) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.sock_fprog = type opaque
define i32 @teamd_bpf_desc_compile_finish(%struct.sock_fprog* nocapture readnone %0) {
ret i32 0
}
void swap_elements(int *first, int *second) {
  int temp;
  temp = *first;
  *first = *second;
  *second = temp;
}


x86 assembly (clang, -O0):
<swap_elements>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_elements>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @swap_elements(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
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap_elements(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
int pfloat_Multiply(int a, int b) { return (a >> 8) * (b >> 8); }


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

x86 assembly (clang, -O2):
<pfloat_Multiply>:
mov    %esi,%eax
sar    $0x8,%edi
sar    $0x8,%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @pfloat_Multiply(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 = ashr i32 %5, 8
%7 = load i32, i32* %4
%8 = ashr i32 %7, 8
%9 = mul nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @pfloat_Multiply(i32 %0, i32 %1) {
%3 = ashr i32 %0, 8
%4 = ashr i32 %1, 8
%5 = mul nsw i32 %4, %3
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *stderr;
FILE *c_stderr(void) { return stderr; }


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

x86 assembly (clang, -O2):
<c_stderr>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
@stderr = global i32* null
define i32* @c_stderr() {
%1 = load i32*, i32** @stderr
ret i32* %1
}

LLVM IR (-O2):
@stderr = global i32* null
define i32* @c_stderr() {
%1 = load i32*, i32** @stderr
ret i32* %1
}
/* Variables and functions */
int /*<<< orphan*/ console_tx_byte(unsigned char);
void console_tx_nibble(unsigned nibble) {
  unsigned char digit;
  digit = nibble + '0';
  if (digit > '9') {
    digit += 39;
  }
  console_tx_byte(digit);
}


x86 assembly (clang, -O0):
<console_tx_nibble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jle    113b <console_tx_nibble+0x2b>
movzbl -0x5(%rbp),%eax
add    $0x27,%eax
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%edi
call   1030 <console_tx_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_tx_nibble>:
lea    0x30(%rdi),%eax
add    $0x57,%dil
cmp    $0x3a,%al
movzbl %dil,%ecx
movzbl %al,%eax
cmovae %ecx,%eax
movzbl %al,%edi
jmp    1030 <console_tx_byte@plt>

LLVM IR (-O0):
define void @console_tx_nibble(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add i32 %4, 48
%6 = trunc i32 %5 to i8
store i8 %6, i8* %3
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = icmp sgt i32 %8, 57
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = add nsw i32 %12, 39
%14 = trunc i32 %13 to i8
store i8 %14, i8* %3
br label %15
15: ; preds = %10, %1
%16 = load i8, i8* %3
%17 = call i32 @console_tx_byte(i8 zeroext %16)
ret void
}

LLVM IR (-O2):
define void @console_tx_nibble(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = add i8 %2, 48
%4 = icmp ugt i8 %3, 57
%5 = add i8 %2, 87
%6 = select i1 %4, i8 %5, i8 %3
%7 = tail call i32 @console_tx_byte(i8 zeroext %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ draw_grid();
int /*<<< orphan*/ draw_numbers();
int /*<<< orphan*/ draw_score();
int /*<<< orphan*/ mvprintw(int, int /*<<< orphan*/, char *);
void draw_all() {
  draw_score();
  draw_grid();
  draw_numbers();
  mvprintw(17, 0, " ");
}


x86 assembly (clang, -O0):
<draw_all>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <draw_score@plt>
mov    $0x0,%al
call   1050 <draw_grid@plt>
mov    $0x0,%al
call   1030 <draw_numbers@plt>
mov    $0x11,%edi
xor    %esi,%esi
lea    0xe99(%rip),%rdx
call   1060 <mvprintw@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_all>:
push   %rax
xor    %eax,%eax
call   1040 <draw_score@plt>
xor    %eax,%eax
call   1050 <draw_grid@plt>
xor    %eax,%eax
call   1030 <draw_numbers@plt>
lea    0xea3(%rip),%rdx
mov    $0x11,%edi
xor    %esi,%esi
pop    %rax
jmp    1060 <mvprintw@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define void @draw_all() {
%1 = call i32 (...) @draw_score()
%2 = call i32 (...) @draw_grid()
%3 = call i32 (...) @draw_numbers()
%4 = call i32 @mvprintw(i32 17, i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @draw_all() {
%1 = tail call i32 (...) @draw_score()
%2 = tail call i32 (...) @draw_grid()
%3 = tail call i32 (...) @draw_numbers()
%4 = tail call i32 @mvprintw(i32 17, i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ geraInstrucao(int /*<<< orphan*/, int, int /*<<< orphan*/,
                                 int /*<<< orphan*/, char *);
void gerarGOTO() { geraInstrucao(0, 2022, 0, 0, ""); }


x86 assembly (clang, -O0):
<gerarGOTO>:
push   %rbp
mov    %rsp,%rbp
xor    %ecx,%ecx
mov    $0x7e6,%esi
lea    0xede(%rip),%r8
mov    %ecx,%edi
mov    %ecx,%edx
call   1030 <geraInstrucao@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gerarGOTO>:
lea    0xee9(%rip),%r8
xor    %edi,%edi
mov    $0x7e6,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <geraInstrucao@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @gerarGOTO() {
%1 = call i32 @geraInstrucao(i32 0, i32 2022, i32 0, i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @gerarGOTO() {
%1 = tail call i32 @geraInstrucao(i32 0, i32 2022, i32 0, i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
void end_multircv(void) {}


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

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

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

LLVM IR (-O2):
define void @end_multircv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RCT2_CALLPROC_EBPSAFE(int);
void window_map_scrollpaint() { RCT2_CALLPROC_EBPSAFE(0x0068CF23); }


x86 assembly (clang, -O0):
<window_map_scrollpaint>:
push   %rbp
mov    %rsp,%rbp
mov    $0x68cf23,%edi
call   1030 <RCT2_CALLPROC_EBPSAFE@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<window_map_scrollpaint>:
mov    $0x68cf23,%edi
jmp    1030 <RCT2_CALLPROC_EBPSAFE@plt>

LLVM IR (-O0):
define void @window_map_scrollpaint() {
%1 = call i32 @RCT2_CALLPROC_EBPSAFE(i32 6868771)
ret void
}

LLVM IR (-O2):
define void @window_map_scrollpaint() {
%1 = tail call i32 @RCT2_CALLPROC_EBPSAFE(i32 6868771)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ mvwprintw(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/, char *);
int /*<<< orphan*/ werase(int /*<<< orphan*/ *);
int /*<<< orphan*/ wgetch(int /*<<< orphan*/ *);
void clearWn(WINDOW *wn) {
  wgetch(wn);
  werase(wn);
  mvwprintw(wn, 0, 0, "Press any key...");
  wgetch(wn);
  werase(wn);
}


x86 assembly (clang, -O0):
<clearWn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <wgetch@plt>
mov    -0x8(%rbp),%rdi
call   1050 <werase@plt>
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
lea    0xea5(%rip),%rcx
mov    %edx,%esi
call   1040 <mvwprintw@plt>
mov    -0x8(%rbp),%rdi
call   1030 <wgetch@plt>
mov    -0x8(%rbp),%rdi
call   1050 <werase@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearWn>:
push   %rbx
mov    %rdi,%rbx
call   1030 <wgetch@plt>
mov    %rbx,%rdi
call   1050 <werase@plt>
lea    0xeb8(%rip),%rcx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <mvwprintw@plt>
mov    %rbx,%rdi
call   1030 <wgetch@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <werase@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Press any key...\00"
define void @clearWn(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @wgetch(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @werase(i32* %5)
%7 = load i32*, i32** %2
%8 = call i32 @mvwprintw(i32* %7, i32 0, i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = load i32*, i32** %2
%10 = call i32 @wgetch(i32* %9)
%11 = load i32*, i32** %2
%12 = call i32 @werase(i32* %11)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Press any key...\00"
define void @clearWn(i32* %0) {
%2 = tail call i32 @wgetch(i32* %0)
%3 = tail call i32 @werase(i32* %0)
%4 = tail call i32 @mvwprintw(i32* %0, i32 0, i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @wgetch(i32* %0)
%6 = tail call i32 @werase(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AttitudeStateHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void AttitudeStateRequestUpdate() {
  UAVObjRequestUpdate(AttitudeStateHandle());
}


x86 assembly (clang, -O0):
<AttitudeStateRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <AttitudeStateHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AttitudeStateRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <AttitudeStateHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @AttitudeStateRequestUpdate() {
%1 = call i32 (...) @AttitudeStateHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @AttitudeStateRequestUpdate() {
%1 = tail call i32 (...) @AttitudeStateHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
char *handle_spelled_numbers_in_place(char *);
char *strdup(char *);
char *handle_spelled_numbers(char *input) {
  char *x = strdup(input);
  return handle_spelled_numbers_in_place(x);
}


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

x86 assembly (clang, -O2):
<handle_spelled_numbers>:
push   %rax
call   1040 <strdup@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <handle_spelled_numbers_in_place@plt>

LLVM IR (-O0):
define i8* @handle_spelled_numbers(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @handle_spelled_numbers_in_place(i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @handle_spelled_numbers(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = tail call i8* @handle_spelled_numbers_in_place(i8* %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ outp(int, char);
void writechar(char x) {
  int COM1 = 0x03F8;
  outp(COM1, x);
}


x86 assembly (clang, -O0):
<writechar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x3f8,-0x8(%rbp)
mov    -0x8(%rbp),%edi
movsbl -0x1(%rbp),%esi
call   1030 <outp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writechar>:
mov    %edi,%esi
mov    $0x3f8,%edi
jmp    1030 <outp@plt>

LLVM IR (-O0):
define void @writechar(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 1016, i32* %3
%4 = load i32, i32* %3
%5 = load i8, i8* %2
%6 = call i32 @outp(i32 %4, i8 signext %5)
ret void
}

LLVM IR (-O2):
define void @writechar(i8 signext %0) {
%2 = tail call i32 @outp(i32 1016, i8 signext %0)
ret void
}
int test_imm_54uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x54 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_54uint64_lowword_reg>:
test   $0x54,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_54uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 84
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *_resposta_padrao(int, int, char *);
char *ConsultarUltimaSessaoFiscal(int sessao, char *codigo_ativacao) {
  char *mensagem = "N\xc3\xa3o existe sess\xc3\xa3o fiscal";
  return _resposta_padrao(sessao, 19003, mensagem);
}


x86 assembly (clang, -O0):
<ConsultarUltimaSessaoFiscal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    $0x4a3b,%esi
call   1030 <_resposta_padrao@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConsultarUltimaSessaoFiscal>:
lea    0xee9(%rip),%rdx
mov    $0x4a3b,%esi
jmp    1030 <_resposta_padrao@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"N\C3\A3o existe sess\C3\A3o fiscal\00"
define i8* @ConsultarUltimaSessaoFiscal(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i32, i32* %3
%7 = load i8*, i8** %5
%8 = call i8* @_resposta_padrao(i32 %6, i32 19003, i8* %7)
ret i8* %8
}

LLVM IR (-O2):
@.str = [27 x i8] c"N\C3\A3o existe sess\C3\A3o fiscal\00"
define i8* @ConsultarUltimaSessaoFiscal(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i8* @_resposta_padrao(i32 %0, i32 19003, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(void *);
int /*<<< orphan*/ free(void *);
void sqlite3GenericFree(void *p) {
  assert(p);
  free(p);
}


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

x86 assembly (clang, -O2):
<sqlite3GenericFree>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @sqlite3GenericFree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @assert(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @sqlite3GenericFree(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int factorial(int);
int64_t choose(int n, int k) {
  return factorial(n) / (factorial(k) * factorial(n - k));
}


x86 assembly (clang, -O0):
<choose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    -0x10(%rbp),%ecx
mov    %eax,%edx
mov    -0xc(%rbp),%eax
imul   %edx,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<choose>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <factorial@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1030 <factorial@plt>
mov    %eax,%r15d
sub    %ebx,%ebp
mov    %ebp,%edi
call   1030 <factorial@plt>
mov    %eax,%ecx
imul   %r15d,%ecx
mov    %r14d,%eax
cltd
idiv   %ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @choose(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 = call i32 @factorial(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @factorial(i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %9, %10
%12 = call i32 @factorial(i32 %11)
%13 = mul nsw i32 %8, %12
%14 = sdiv i32 %6, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @choose(i32 %0, i32 %1) {
%3 = tail call i32 @factorial(i32 %0)
%4 = tail call i32 @factorial(i32 %1)
%5 = sub nsw i32 %0, %1
%6 = tail call i32 @factorial(i32 %5)
%7 = mul nsw i32 %6, %4
%8 = sdiv i32 %3, %7
ret i32 %8
}
void rop3_201_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T | *D;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_201_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_201_1_1>:
mov    (%rdi),%al
mov    %eax,%ecx
or     %dl,%cl
xor    %sil,%cl
or     %sil,%dl
or     %dl,%cl
not    %cl
and    %al,%dl
or     %cl,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_201_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = or i32 %10, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %5
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8, i8* %6
%33 = zext i8 %32 to i32
%34 = xor i32 %33, -1
%35 = and i32 %31, %34
%36 = load i8*, i8** %4
%37 = load i8, i8* %36
%38 = zext i8 %37 to i32
%39 = load i8, i8* %5
%40 = zext i8 %39 to i32
%41 = and i32 %38, %40
%42 = or i32 %35, %41
%43 = load i8*, i8** %4
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = load i8, i8* %6
%47 = zext i8 %46 to i32
%48 = and i32 %45, %47
%49 = or i32 %42, %48
%50 = trunc i32 %49 to i8
%51 = load i8*, i8** %4
store i8 %50, i8* %51
ret void
}

LLVM IR (-O2):
define void @rop3_201_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %2
%6 = xor i8 %5, %1
%7 = or i8 %2, %1
%8 = or i8 %7, %6
%9 = xor i8 %8, -1
%10 = and i8 %4, %7
%11 = or i8 %10, %9
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ initialize();
int /*<<< orphan*/ report_and_exit();
int /*<<< orphan*/ test_loop();
int main() {
  initialize();
  test_loop();
  report_and_exit();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initialize()
%2 = tail call i32 (...) @test_loop()
%3 = tail call i32 (...) @report_and_exit()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRCORE_U16_N16_swap(char *, int);
void U_WMRPOLYLINE_swap(char *record, int torev) {
  U_WMRCORE_U16_N16_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRPOLYLINE_swap>:
jmp    1030 <U_WMRCORE_U16_N16_swap@plt>

LLVM IR (-O0):
define void @U_WMRPOLYLINE_swap(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 i32 @U_WMRCORE_U16_N16_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_WMRPOLYLINE_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRCORE_U16_N16_swap(i8* %0, i32 %1)
ret void
}
void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem, int priority) {}


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

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

LLVM IR (-O0):
%struct.mem_cgroup = type opaque
define void @mem_cgroup_note_reclaim_priority(%struct.mem_cgroup* %0, i32 %1) {
%3 = alloca %struct.mem_cgroup*
%4 = alloca i32
store %struct.mem_cgroup* %0, %struct.mem_cgroup** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.mem_cgroup = type opaque
define void @mem_cgroup_note_reclaim_priority(%struct.mem_cgroup* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ charattr(int);
int /*<<< orphan*/ printw(char *, int);
bgcolor(int a) {
  if (a < 16)
    charattr(a < 8 ? a + 40 : a + 92);
  else
    printw("\e[48;5;%dm", a);
}


x86 assembly (clang, -O0):
<bgcolor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jge    1163 <bgcolor+0x43>
cmpl   $0x8,-0x8(%rbp)
jge    114d <bgcolor+0x2d>
mov    -0x8(%rbp),%eax
add    $0x28,%eax
mov    %eax,-0xc(%rbp)
jmp    1156 <bgcolor+0x36>
mov    -0x8(%rbp),%eax
add    $0x5c,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <charattr@plt>
jmp    1172 <bgcolor+0x52>
mov    -0x8(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printw@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bgcolor>:
push   %rax
mov    %edi,%esi
cmp    $0xf,%edi
jg     113b <bgcolor+0x1b>
lea    0x5c(%rsi),%eax
lea    0x28(%rsi),%edi
cmp    $0x8,%esi
cmovge %eax,%edi
call   1040 <charattr@plt>
pop    %rcx
ret
lea    0xebe(%rip),%rdi
call   1030 <printw@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[48;5;%dm\00"
define i32 @bgcolor(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 16
br i1 %5, label %6, label %18
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 8
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 40
br label %15
12: ; preds = %6
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 92
br label %15
15: ; preds = %12, %9
%16 = phi i32 [ %11, %9 ], [ %14, %12 ]
%17 = call i32 @charattr(i32 %16)
br label %21
18: ; preds = %1
%19 = load i32, i32* %3
%20 = call i32 @printw(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %18, %15
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[48;5;%dm\00"
define i32 @bgcolor(i32 %0) {
%2 = icmp slt i32 %0, 16
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = icmp slt i32 %0, 8
%5 = select i1 %4, i32 40, i32 92
%6 = add nsw i32 %5, %0
%7 = tail call i32 @charattr(i32 %6)
br label %10
8: ; preds = %1
%9 = tail call i32 @printw(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %10
10: ; preds = %8, %3
ret i32 undef
}
unsigned long hash(const char *str) {
  unsigned long hash = 5381;
  int c;
  while ((c = *str++)) {
    hash = ((hash << 5) + hash) + c;
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <hash+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
float cos(float);
float func(float x) { return cos(x); }


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

x86 assembly (clang, -O2):
<func>:
jmp    1030 <cos@plt>

LLVM IR (-O0):
define float @func(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @cos(float %3)
ret float %4
}

LLVM IR (-O2):
define float @func(float %0) {
%2 = tail call float @cos(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, float);
int main() {
  float x, y, z;
  y = 10.0;
  z = x + y;
  printf("El valor de z es: %f\n", z);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
movss  0xed0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"El valor de z es: %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
store float 1.000000e+01, float* %3
%5 = load float, float* %2
%6 = load float, float* %3
%7 = fadd float %5, %6
store float %7, float* %4
%8 = load float, float* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float %8)
%10 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"El valor de z es: %f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float 0x7FF8000000000000)
%2 = tail call i32 (...) @getchar()
ret i32 0
}
void spacer() {}


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

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

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

LLVM IR (-O2):
define void @spacer() {
ret void
}
/* Type definitions */
struct margins_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ margins_assign(struct margins_t *, struct margins_t *);
void margins_initfrom(struct margins_t *margins, struct margins_t *src) {
  ;
  margins_assign(margins, src);
  { return; };
}


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

x86 assembly (clang, -O2):
<margins_initfrom>:
jmp    1030 <margins_assign@plt>

LLVM IR (-O0):
%struct.margins_t = type { i32 }
define void @margins_initfrom(%struct.margins_t* %0, %struct.margins_t* %1) {
%3 = alloca %struct.margins_t*
%4 = alloca %struct.margins_t*
store %struct.margins_t* %0, %struct.margins_t** %3
store %struct.margins_t* %1, %struct.margins_t** %4
%5 = load %struct.margins_t*, %struct.margins_t** %3
%6 = load %struct.margins_t*, %struct.margins_t** %4
%7 = call i32 @margins_assign(%struct.margins_t* %5, %struct.margins_t* %6)
ret void
}

LLVM IR (-O2):
%struct.margins_t = type { i32 }
define void @margins_initfrom(%struct.margins_t* %0, %struct.margins_t* %1) {
%3 = tail call i32 @margins_assign(%struct.margins_t* %0, %struct.margins_t* %1)
ret void
}
void gui_ksys_exit(int value) {
  __asm__ __volatile__("int $0x40" : : "a"(-1), "b"(value));
}


x86 assembly (clang, -O0):
<gui_ksys_exit>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%ebx
mov    $0xffffffff,%eax
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_ksys_exit>:
push   %rbx
mov    %edi,%ebx
mov    $0xffffffff,%eax
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define void @gui_ksys_exit(i32 %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 -1, i32 %0)
ret void
}
void ini_iz(double *vars, double *min, double *minABS, double *max) {
  vars[0] = 30.240263;
  vars[1] = -5.544592;
  *min = -50.000000;
  *minABS = -74.235106;
  *max = 30.240470;
  return;
}


x86 assembly (clang, -O0):
<ini_iz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xf00(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0xecf(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xeb7(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xe9f(%rip),%xmm0
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini_iz>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movabs $0xc049000000000000,%rax
mov    %rax,(%rsi)
movabs $0xc0528f0bfa0945fa,%rax
8f 52 c0
mov    %rax,(%rdx)
movabs $0x403e3d8f7121ab4b,%rax
3d 3e 40
mov    %rax,(%rcx)
ret

LLVM IR (-O0):
define void @ini_iz(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load double*, double** %5
%10 = getelementptr inbounds double, double* %9, i64 0
store double 0x403E3D81E03F7058, double* %10
%11 = load double*, double** %5
%12 = getelementptr inbounds double, double* %11, i64 1
store double 0xC0162DA98676A726, double* %12
%13 = load double*, double** %6
store double -5.000000e+01, double* %13
%14 = load double*, double** %7
store double 0xC0528F0BFA0945FA, double* %14
%15 = load double*, double** %8
store double 0x403E3D8F7121AB4B, double* %15
ret void
}

LLVM IR (-O2):
define void @ini_iz(double* nocapture writeonly %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = bitcast double* %0 to <2 x double>*
store <2 x double> <double 0x403E3D81E03F7058, double 0xC0162DA98676A726>, <2 x double>* %5
store double -5.000000e+01, double* %1
store double 0xC0528F0BFA0945FA, double* %2
store double 0x403E3D8F7121AB4B, double* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void bar(int c) {
  static int d = '0';
  if (c != d++)
    abort();
  if (c < '0' || c > '9')
    abort();
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2f04(%rip),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,0x2ef9(%rip)
cmp    %ecx,%eax
je     113e <bar+0x2e>
mov    $0x0,%al
call   1030 <abort@plt>
cmpl   $0x30,-0x4(%rbp)
jl     1152 <bar+0x42>
cmpl   $0x39,-0x4(%rbp)
jle    1159 <bar+0x49>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
mov    0x2f11(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f08(%rip)
cmp    %edi,%eax
jne    112e <bar+0x1e>
add    $0xffffffc6,%edi
cmp    $0xfffffff5,%edi
jbe    112e <bar+0x1e>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@bar.d = internal global i32 48
define void @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @bar.d
%5 = add nsw i32 %4, 1
store i32 %5, i32* @bar.d
%6 = icmp ne i32 %3, %4
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %1
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 48
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp sgt i32 %13, 57
br i1 %14, label %15, label %17
15: ; preds = %12, %9
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %12
ret void
}

LLVM IR (-O2):
@bar.d = internal unnamed_addr global i32 48
define void @bar(i32 %0) {
%2 = load i32, i32* @bar.d
%3 = add nsw i32 %2, 1
store i32 %3, i32* @bar.d
%4 = icmp eq i32 %2, %0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = add i32 %0, -58
%9 = icmp ult i32 %8, -10
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = tail call i32 (...) @abort()
unreachable
12: ; preds = %7
ret void
}