xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_Vec4i_init(void) {
  _hmt_register_covercase("HMM_Vec4i", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_Vec4i_init>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"HMM_Vec4i\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_Vec4i_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"HMM_Vec4i\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_Vec4i_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = input[0UL] + (unsigned short)11483;
    local1 = 0UL;
    while (local1 < 1UL) {
      local1++;
    }
    output[0UL] = (state[0UL] + 255873917UL) << (unsigned short)1;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0x2cdb,%eax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x1,%rax
jae    1141 <RandomFunc+0x41>
mov    -0x14(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x14(%rbp)
jmp    1122 <RandomFunc+0x22>
movzwl -0x12(%rbp),%eax
add    $0xf40537d,%rax
shl    $0x1,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    %eax,%eax
add    $0xb0,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i32
%11 = add nsw i32 %10, 11483
%12 = trunc i32 %11 to i16
%13 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %12, i16* %13
store i16 0, i16* %6
br label %14
14: ; preds = %18, %2
%15 = load i16, i16* %6
%16 = zext i16 %15 to i64
%17 = icmp ult i64 %16, 1
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = load i16, i16* %6
%20 = add i16 %19, 1
store i16 %20, i16* %6
br label %14
21: ; preds = %14
%22 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%23 = load i16, i16* %22
%24 = zext i16 %23 to i64
%25 = add i64 %24, 255873917
%26 = shl i64 %25, 1
%27 = trunc i64 %26 to i16
%28 = load i16*, i16** %4
%29 = getelementptr inbounds i16, i16* %28, i64 0
store i16 %27, i16* %29
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = shl i16 %3, 1
%5 = add i16 %4, 176
store i16 %5, i16* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void msg_babble3() {
  printf("\n\nDo you want to babble more? (yes/no): ");
  return;
}


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

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

LLVM IR (-O0):
@.str = [41 x i8] c"\0A\0ADo you want to babble more? (yes/no): \00"
define void @msg_babble3() {
%1 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"\0A\0ADo you want to babble more? (yes/no): \00"
define void @msg_babble3() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int rand();
void randomizeString(char *pszStr, int len) {
  int i;
  for (i = 0; i < len; i++) {
    pszStr[i] = rand() % 93 + 33;
  }
}


x86 assembly (clang, -O0):
<randomizeString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115d <randomizeString+0x4d>
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x5d,%ecx
cltd
idiv   %ecx
add    $0x21,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <randomizeString+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomizeString>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1161 <randomizeString+0x51>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x2c0b02c1,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x24,%rcx
add    %edx,%ecx
imul   $0x5d,%ecx,%ecx
sub    %ecx,%eax
add    $0x21,%al
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <randomizeString+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @randomizeString(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %13, %6 ]
%8 = tail call i32 (...) @rand()
%9 = srem i32 %8, 93
%10 = trunc i32 %9 to i8
%11 = add nsw i8 %10, 33
%12 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %11, i8* %12
%13 = add nuw nsw i64 %7, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %15, label %6
15: ; preds = %6, %2
ret void
}
/* Variables and functions */
short asin(short);
short internal_asin_s(short value) { return asin(value); }


x86 assembly (clang, -O0):
<internal_asin_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edi
call   1030 <asin@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<internal_asin_s>:
jmp    1030 <asin@plt>

LLVM IR (-O0):
define signext i16 @internal_asin_s(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call signext i16 @asin(i16 signext %3)
ret i16 %4
}

LLVM IR (-O2):
define signext i16 @internal_asin_s(i16 signext %0) {
%2 = tail call signext i16 @asin(i16 signext %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ g(int);
int main() {
  g(1);
  g(2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <g@plt>
mov    $0x2,%edi
call   1030 <g@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @g(i32 1)
%2 = call i32 @g(i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @g(i32 1)
%2 = tail call i32 @g(i32 2)
ret i32 0
}
/* Variables and functions */
int _xte_utf8_streq(char const *, int /*<<< orphan*/, char const *,
                    int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int xte_cstrings_equal(char const *in_string1, char const *in_string2) {
  return _xte_utf8_streq(in_string1, strlen(in_string1), in_string2,
                         strlen(in_string2));
}


x86 assembly (clang, -O0):
<xte_cstrings_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    %eax,%ecx
call   1030 <_xte_utf8_streq@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xte_cstrings_equal>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <_xte_utf8_streq@plt>

LLVM IR (-O0):
define i32 @xte_cstrings_equal(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = load i8*, i8** %4
%10 = call i32 @strlen(i8* %9)
%11 = call i32 @_xte_utf8_streq(i8* %5, i32 %7, i8* %8, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @xte_cstrings_equal(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = tail call i32 @_xte_utf8_streq(i8* %0, i32 %3, i8* %1, i32 %4)
ret i32 %5
}
void gtk_text_buffer_get_slice() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_get_slice() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UtilsDelay(int);
void FlashDisable() {
  while (
      ((*((volatile unsigned long *)(0x4402D000 + 0x00000100))) & 0x00001000)) {
  }
  (*((volatile unsigned long *)(0x4402F000 + 0x00000114))) = 0xFFFF0000;
  UtilsDelay((50 * 80) / 3);
  (*((volatile unsigned long *)(0x4402D000 + 0x00000100))) = 0x0;
  UtilsDelay((50 * 80) / 3);
  (*((volatile unsigned long *)(0x4402F000 + 0x000000C0))) = 0x1;
  UtilsDelay((50 * 80) / 3);
}


x86 assembly (clang, -O0):
<FlashDisable>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <FlashDisable+0x9>
mov    $0x4402d100,%eax
mov    (%rax),%rax
and    $0x1000,%rax
cmp    $0x0,%rax
je     1136 <FlashDisable+0x26>
jmp    1119 <FlashDisable+0x9>
mov    $0x4402f114,%eax
mov    $0xffff0000,%ecx
mov    %rcx,(%rax)
mov    $0x535,%edi
call   1030 <UtilsDelay@plt>
mov    $0x4402d100,%eax
movq   $0x0,(%rax)
mov    $0x535,%edi
call   1030 <UtilsDelay@plt>
mov    $0x4402f0c0,%eax
movq   $0x1,(%rax)
mov    $0x535,%edi
call   1030 <UtilsDelay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlashDisable>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
testq  $0x1000,0x4402d100
jne    1120 <FlashDisable+0x10>
mov    $0xffff0000,%eax
mov    %rax,0x4402f114
44
mov    $0x535,%edi
call   1030 <UtilsDelay@plt>
movq   $0x0,0x4402d100
mov    $0x535,%edi
call   1030 <UtilsDelay@plt>
movq   $0x1,0x4402f0c0
mov    $0x535,%edi
pop    %rax
jmp    1030 <UtilsDelay@plt>

LLVM IR (-O0):
define void @FlashDisable() {
br label %1
1: ; preds = %5, %0
%2 = load volatile i64, i64* inttoptr (i64 1141035264 to i64*)
%3 = and i64 %2, 4096
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
store volatile i64 4294901760, i64* inttoptr (i64 1141043476 to i64*)
%7 = call i32 @UtilsDelay(i32 1333)
store volatile i64 0, i64* inttoptr (i64 1141035264 to i64*)
%8 = call i32 @UtilsDelay(i32 1333)
store volatile i64 1, i64* inttoptr (i64 1141043392 to i64*)
%9 = call i32 @UtilsDelay(i32 1333)
ret void
}

LLVM IR (-O2):
define void @FlashDisable() {
br label %1
1: ; preds = %1, %0
%2 = load volatile i64, i64* inttoptr (i64 1141035264 to i64*)
%3 = and i64 %2, 4096
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
store volatile i64 4294901760, i64* inttoptr (i64 1141043476 to i64*)
%6 = tail call i32 @UtilsDelay(i32 1333)
store volatile i64 0, i64* inttoptr (i64 1141035264 to i64*)
%7 = tail call i32 @UtilsDelay(i32 1333)
store volatile i64 1, i64* inttoptr (i64 1141043392 to i64*)
%8 = tail call i32 @UtilsDelay(i32 1333)
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
void crc64_state_init(uint64_t *crc) {
  (void)(crc != NULL);
  *crc = (uint64_t)-1;
}


x86 assembly (clang, -O0):
<crc64_state_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0xffffffffffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc64_state_init>:
movq   $0xffffffffffffffff,(%rdi)
ret

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

LLVM IR (-O2):
define void @crc64_state_init(i64* nocapture writeonly %0) {
store i64 -1, i64* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EBADF;
int /*<<< orphan*/ errno;
int lseek(int file, int ptr, int dir) {
  errno = EBADF;
  return -1;
}


x86 assembly (clang, -O0):
<lseek>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec3(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lseek>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EBADF = global i32 0
@errno = global i32 0
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @EBADF
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EBADF = global i32 0
@errno = global i32 0
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @EBADF
store i32 %4, i32* @errno
ret i32 -1
}
void main() { int a[32767]; }


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

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

LLVM IR (-O0):
define void @main() {
%1 = alloca [32767 x i32]
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ towhan(int, char, char, char);
int main() {
  int n;
  printf("ENTER THE NUMBER OF DISKS");
  scanf("%d", &n);
  towhan(n, 'A', 'B', 'C');
  int getch();
  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>
lea    0xec8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    $0x41,%esi
mov    $0x42,%edx
mov    $0x43,%ecx
call   1050 <towhan@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"ENTER THE NUMBER OF DISKS\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @towhan(i32 %5, i8 signext 65, i8 signext 66, i8 signext 67)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"ENTER THE NUMBER OF DISKS\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @towhan(i32 %5, i8 signext 65, i8 signext 66, i8 signext 67)
ret i32 0
}
/* Type definitions */
struct _glist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ glist_getfont(struct _glist *);
int /*<<< orphan*/ glist_getzoom(struct _glist *);
int sys_zoomfontheight(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int glist_fontheight(struct _glist *x) {
  return (sys_zoomfontheight(glist_getfont(x), glist_getzoom(x), 0));
}


x86 assembly (clang, -O0):
<glist_fontheight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <glist_getfont@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <glist_getzoom@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
xor    %edx,%edx
call   1030 <sys_zoomfontheight@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glist_fontheight>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <glist_getfont@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <glist_getzoom@plt>
mov    %ebp,%edi
mov    %eax,%esi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <sys_zoomfontheight@plt>

LLVM IR (-O0):
%struct._glist = type { i32 }
define i32 @glist_fontheight(%struct._glist* %0) {
%2 = alloca %struct._glist*
store %struct._glist* %0, %struct._glist** %2
%3 = load %struct._glist*, %struct._glist** %2
%4 = call i32 @glist_getfont(%struct._glist* %3)
%5 = load %struct._glist*, %struct._glist** %2
%6 = call i32 @glist_getzoom(%struct._glist* %5)
%7 = call i32 @sys_zoomfontheight(i32 %4, i32 %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
%struct._glist = type { i32 }
define i32 @glist_fontheight(%struct._glist* %0) {
%2 = tail call i32 @glist_getfont(%struct._glist* %0)
%3 = tail call i32 @glist_getzoom(%struct._glist* %0)
%4 = tail call i32 @sys_zoomfontheight(i32 %2, i32 %3, i32 0)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ name;

/* Variables and functions */
int /*<<< orphan*/ gethostname(char *, int);
char *myhostname(void) {
  static char name[256 + 1] = "";
  if (name[0] == 0) {
    gethostname(name, sizeof(name));
    name[256] = 0;
  }
  return (name);
}


x86 assembly (clang, -O0):
<myhostname>:
push   %rbp
mov    %rsp,%rbp
movsbl 0x2f25(%rip),%eax
cmp    $0x0,%eax
jne    113c <myhostname+0x2c>
lea    0x2f15(%rip),%rdi
mov    $0x101,%esi
call   1030 <gethostname@plt>
movb   $0x0,0x3004(%rip)
lea    0x2efd(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myhostname>:
push   %rax
cmpb   $0x0,0x2f28(%rip)
jne    1132 <myhostname+0x22>
lea    0x2f1f(%rip),%rdi
mov    $0x101,%esi
call   1030 <gethostname@plt>
movb   $0x0,0x300e(%rip)
lea    0x2f07(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@myhostname.name = internal global [257 x i8] zeroinitializer
define i8* @myhostname() {
%1 = load i8, i8* getelementptr inbounds ([257 x i8], [257 x i8]* @myhostname.name, i64 0, i64 0)
%2 = sext i8 %1 to i32
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @gethostname(i8* getelementptr inbounds ([257 x i8], [257 x i8]* @myhostname.name, i64 0, i64 0), i32 257)
store i8 0, i8* getelementptr inbounds ([257 x i8], [257 x i8]* @myhostname.name, i64 0, i64 256)
br label %6
6: ; preds = %4, %0
ret i8* getelementptr inbounds ([257 x i8], [257 x i8]* @myhostname.name, i64 0, i64 0)
}

LLVM IR (-O2):
@myhostname.name = internal global [257 x i8] zeroinitializer
define i8* @myhostname() {
%1 = load i8, i8* getelementptr inbounds ([257 x i8], [257 x i8]* @myhostname.name, i64 0, i64 0)
%2 = icmp eq i8 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @gethostname(i8* getelementptr inbounds ([257 x i8], [257 x i8]* @myhostname.name, i64 0, i64 0), i32 257)
store i8 0, i8* getelementptr inbounds ([257 x i8], [257 x i8]* @myhostname.name, i64 0, i64 256)
br label %5
5: ; preds = %3, %0
ret i8* getelementptr inbounds ([257 x i8], [257 x i8]* @myhostname.name, i64 0, i64 0)
}
/* Variables and functions */
int mapif_guild_message(int, int, char const *, size_t);
int mapif_parse_GuildMessage(int fd, int guild_id, int account_id,
                             const char *mes, size_t len) {
  return mapif_guild_message(guild_id, account_id, mes, len);
}


x86 assembly (clang, -O0):
<mapif_parse_GuildMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <mapif_guild_message@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapif_parse_GuildMessage>:
mov    %esi,%edi
mov    %edx,%esi
mov    %rcx,%rdx
mov    %r8,%rcx
jmp    1030 <mapif_guild_message@plt>

LLVM IR (-O0):
define i32 @mapif_parse_GuildMessage(i32 %0, i32 %1, i32 %2, i8* %3, i64 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = load i8*, i8** %9
%14 = load i64, i64* %10
%15 = call i32 @mapif_guild_message(i32 %11, i32 %12, i8* %13, i64 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @mapif_parse_GuildMessage(i32 %0, i32 %1, i32 %2, i8* %3, i64 %4) {
%6 = tail call i32 @mapif_guild_message(i32 %1, i32 %2, i8* %3, i64 %4)
ret i32 %6
}
int very_long_function(int a) {
  if (a > 0)
    return 2 * a + very_long_function(a) / 4;
  else
    return 2 * -a + very_long_function(a) / 4;
}


x86 assembly (clang, -O0):
<very_long_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    114d <very_long_function+0x3d>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <very_long_function@plt>
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1172 <very_long_function+0x62>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <very_long_function@plt>
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<very_long_function>:
push   %rbx
lea    (%rdi,%rdi,1),%eax
mov    %eax,%ebx
neg    %ebx
test   %edi,%edi
cmovg  %eax,%ebx
call   1030 <very_long_function@plt>
lea    0x3(%rax),%ecx
test   %eax,%eax
cmovs  %ecx,%eax
sar    $0x2,%eax
add    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @very_long_function(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = mul i32 %0, -2
%4 = shl nuw nsw i32 %0, 1
%5 = select i1 %2, i32 %4, i32 %3
%6 = tail call i32 @very_long_function(i32 %0)
%7 = sdiv i32 %6, 4
%8 = add nsw i32 %7, %5
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printData(int data[], int size) {
  int i;
  for (i = 0; i < size; i++) {
    printf("%4d", data[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printData+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printData+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printData>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printData+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printData+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%4d\00"
define void @printData(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int _unmarshal_uchar_array(unsigned char **, unsigned long *, unsigned char *,
                           int);
int _unmarshal_uuid(unsigned char **pData, unsigned long *pDataLen,
                    unsigned char *dest) {
  return _unmarshal_uchar_array(pData, pDataLen, dest, 16);
}


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

x86 assembly (clang, -O2):
<_unmarshal_uuid>:
mov    $0x10,%ecx
jmp    1030 <_unmarshal_uchar_array@plt>

LLVM IR (-O0):
define i32 @_unmarshal_uuid(i8** %0, i64* %1, i8* %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i8*
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i8* %2, i8** %6
%7 = load i8**, i8*** %4
%8 = load i64*, i64** %5
%9 = load i8*, i8** %6
%10 = call i32 @_unmarshal_uchar_array(i8** %7, i64* %8, i8* %9, i32 16)
ret i32 %10
}

LLVM IR (-O2):
define i32 @_unmarshal_uuid(i8** %0, i64* %1, i8* %2) {
%4 = tail call i32 @_unmarshal_uchar_array(i8** %0, i64* %1, i8* %2, i32 16)
ret i32 %4
}
int barometer_open_calibration(struct ssp_data *data) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ssp_data = type opaque
define i32 @barometer_open_calibration(%struct.ssp_data* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_instr(int);
void eval_geq(void) { write_instr(0x1A); }


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

x86 assembly (clang, -O2):
<eval_geq>:
mov    $0x1a,%edi
jmp    1030 <write_instr@plt>

LLVM IR (-O0):
define void @eval_geq() {
%1 = call i32 @write_instr(i32 26)
ret void
}

LLVM IR (-O2):
define void @eval_geq() {
%1 = tail call i32 @write_instr(i32 26)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ scrl(int);
int /*<<< orphan*/ term_canon(int /*<<< orphan*/, int);
void gui_term() {
  scrl(1);
  refresh();
  endwin();
  term_canon(STDIN_FILENO, 1);
}


x86 assembly (clang, -O0):
<gui_term>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1060 <scrl@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1030 <term_canon@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_term>:
push   %rax
mov    $0x1,%edi
call   1060 <scrl@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
xor    %eax,%eax
call   1050 <endwin@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <term_canon@plt>

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
define void @gui_term() {
%1 = call i32 @scrl(i32 1)
%2 = call i32 (...) @refresh()
%3 = call i32 (...) @endwin()
%4 = load i32, i32* @STDIN_FILENO
%5 = call i32 @term_canon(i32 %4, i32 1)
ret void
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
define void @gui_term() {
%1 = tail call i32 @scrl(i32 1)
%2 = tail call i32 (...) @refresh()
%3 = tail call i32 (...) @endwin()
%4 = load i32, i32* @STDIN_FILENO
%5 = tail call i32 @term_canon(i32 %4, i32 1)
ret void
}
/* Variables and functions */
int abs(int);
int ramp(int x) { return x * abs(x) / 127; }


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

x86 assembly (clang, -O2):
<ramp>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
imul   %edi,%eax
cltq
imul   $0xffffffff81020409,%rax,%rcx
shr    $0x20,%rcx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x6,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ramp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @abs(i32 %4)
%6 = mul nsw i32 %3, %5
%7 = sdiv i32 %6, 127
ret i32 %7
}

LLVM IR (-O2):
define i32 @ramp(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%3 = mul nsw i32 %2, %0
%4 = sdiv i32 %3, 127
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ nl();
int /*<<< orphan*/ ol(char *);
int /*<<< orphan*/ ot(char *);
int /*<<< orphan*/ outdec(int);
void loadargc(int n) {
  n >>= 1;
  if (n) {
    ot("ld\ta,");
    outdec(n);
    nl();
  } else
    ol("xor\ta");
}


x86 assembly (clang, -O0):
<loadargc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     117e <loadargc+0x3e>
lea    0xe9b(%rip),%rdi
call   1050 <ot@plt>
mov    -0x4(%rbp),%edi
call   1040 <outdec@plt>
mov    $0x0,%al
call   1030 <nl@plt>
jmp    118a <loadargc+0x4a>
lea    0xe81(%rip),%rdi
call   1060 <ol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loadargc>:
cmp    $0x2,%edi
jae    1151 <loadargc+0x11>
lea    0xeba(%rip),%rdi
jmp    1060 <ol@plt>
push   %rbx
mov    %edi,%ebx
sar    %ebx
lea    0xea3(%rip),%rdi
call   1050 <ot@plt>
mov    %ebx,%edi
call   1040 <outdec@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <nl@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"ld\09a,\00"
@.str.1 = [6 x i8] c"xor\09a\00"
define void @loadargc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = call i32 @ot(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = call i32 @outdec(i32 %9)
%11 = call i32 (...) @nl()
br label %14
12: ; preds = %1
%13 = call i32 @ol(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %7
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"ld\09a,\00"
@.str.1 = [6 x i8] c"xor\09a\00"
define void @loadargc(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = ashr i32 %0, 1
%5 = tail call i32 @ot(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @outdec(i32 %4)
%7 = tail call i32 (...) @nl()
br label %10
8: ; preds = %1
%9 = tail call i32 @ol(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %3
ret void
}
double f4_cb_send_pre_int_long(double (*cb)(int, long)) {
  long r = 33;
  return cb(8, r) + 1.0;
}


x86 assembly (clang, -O0):
<f4_cb_send_pre_int_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x21,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rsi
mov    $0x8,%edi
call   *%rax
movsd  0xed5(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_cb_send_pre_int_long>:
push   %rax
mov    %rdi,%rax
mov    $0x21,%esi
mov    $0x8,%edi
call   *%rax
addsd  0xee8(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f4_cb_send_pre_int_long(double (i32, i64)* %0) {
%2 = alloca double (i32, i64)*
%3 = alloca i64
store double (i32, i64)* %0, double (i32, i64)** %2
store i64 33, i64* %3
%4 = load double (i32, i64)*, double (i32, i64)** %2
%5 = load i64, i64* %3
%6 = call double %4(i32 8, i64 %5)
%7 = fadd double %6, 1.000000e+00
ret double %7
}

LLVM IR (-O2):
define double @f4_cb_send_pre_int_long(double (i32, i64)* nocapture %0) {
%2 = tail call double %0(i32 8, i64 33)
%3 = fadd double %2, 1.000000e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void acumen() { printf("acumen"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"acumen\00"
define void @acumen() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"acumen\00"
define void @acumen() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ k_debug_outputs(int, char *, char *);
int k_getlv();
void k_mod_no_support(void) {
  do {
    if (7 >= k_getlv())
      k_debug_outputs(7, "mod.open", "no module service support.");
  } while (0);
}


x86 assembly (clang, -O0):
<k_mod_no_support>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <k_mod_no_support+0x9>
mov    $0x0,%al
call   1040 <k_getlv@plt>
mov    %eax,%ecx
mov    $0x7,%eax
cmp    %ecx,%eax
jl     1157 <k_mod_no_support+0x37>
mov    $0x7,%edi
lea    0xeb5(%rip),%rsi
lea    0xeb7(%rip),%rdx
call   1030 <k_debug_outputs@plt>
jmp    115c <k_mod_no_support+0x3c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<k_mod_no_support>:
push   %rax
xor    %eax,%eax
call   1040 <k_getlv@plt>
cmp    $0x7,%eax
jg     1146 <k_mod_no_support+0x26>
lea    0xecc(%rip),%rsi
lea    0xece(%rip),%rdx
mov    $0x7,%edi
pop    %rax
jmp    1030 <k_debug_outputs@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"mod.open\00"
@.str.1 = [27 x i8] c"no module service support.\00"
define void @k_mod_no_support() {
br label %1
1: ; preds = %0
%2 = call i32 (...) @k_getlv()
%3 = icmp sge i32 7, %2
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = call i32 @k_debug_outputs(i32 7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
br label %7
7: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"mod.open\00"
@.str.1 = [27 x i8] c"no module service support.\00"
define void @k_mod_no_support() {
%1 = tail call i32 (...) @k_getlv()
%2 = icmp slt i32 %1, 8
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @k_debug_outputs(i32 7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
ret void
}
/* Variables and functions */
double loglike_posterior_theta(double *, int, void *, int *);
double fitfun(double *x, int n, void *output, int *info) {
  return loglike_posterior_theta(x, n, output, info);
}


x86 assembly (clang, -O0):
<fitfun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <loglike_posterior_theta@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fitfun>:
jmp    1030 <loglike_posterior_theta@plt>

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

LLVM IR (-O2):
define double @fitfun(double* %0, i32 %1, i8* %2, i32* %3) {
%5 = tail call double @loglike_posterior_theta(double* %0, i32 %1, i8* %2, i32* %3)
ret double %5
}
/* Variables and functions */
int clientRun();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ getOptions(int, char **);
int /*<<< orphan*/ showHelp();
int main(int argc, char *argv[]) {
  if (getOptions(argc, argv) != 0) {
    showHelp();
    exit(0);
  }
  return clientRun();
}


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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <getOptions@plt>
cmp    $0x0,%rax
je     117a <main+0x3a>
mov    $0x0,%al
call   1030 <showHelp@plt>
xor    %edi,%edi
call   1060 <exit@plt>
mov    $0x0,%al
call   1050 <clientRun@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <getOptions@plt>
test   %rax,%rax
jne    1153 <main+0x13>
xor    %eax,%eax
pop    %rcx
jmp    1050 <clientRun@plt>
xor    %eax,%eax
call   1030 <showHelp@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
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 = load i8**, i8*** %5
%8 = call i64 @getOptions(i32 %6, i8** %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = call i32 (...) @showHelp()
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %2
%14 = call i32 (...) @clientRun()
ret i32 %14
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i64 @getOptions(i32 %0, i8** %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 (...) @showHelp()
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %2
%9 = tail call i32 (...) @clientRun()
ret i32 %9
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
bool sancus_get_u32zu(size_t v, uint32_t *out) {
  if (v <= 0xffffffff) {
    if (out != NULL)
      *out = (uint32_t)v;
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<sancus_get_u32zu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    $0xffffffff,%eax
cmp    %rax,-0x10(%rbp)
ja     113d <sancus_get_u32zu+0x3d>
cmpq   $0x0,-0x18(%rbp)
je     1131 <sancus_get_u32zu+0x31>
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1144 <sancus_get_u32zu+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sancus_get_u32zu>:
xor    %eax,%eax
mov    %rdi,%rcx
shr    $0x20,%rcx
jne    1118 <sancus_get_u32zu+0x18>
mov    $0x1,%eax
test   %rsi,%rsi
je     1118 <sancus_get_u32zu+0x18>
mov    %rdi,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @sancus_get_u32zu(i64 %0, i64* writeonly %1) {
%3 = icmp ult i64 %0, 4294967296
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = icmp eq i64* %1, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i64 %0, i64* %1
br label %7
7: ; preds = %2, %4, %6
%8 = phi i32 [ 1, %6 ], [ 1, %4 ], [ 0, %2 ]
ret i32 %8
}
int foo(unsigned int u) { return (int)(u + 4) < (int)u; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4,%eax
cmp    -0x4(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp sgt i32 %0, 2147483643
%3 = zext i1 %2 to i32
ret i32 %3
}
void setSubHeaderStyle(void) {}


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

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

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

LLVM IR (-O2):
define void @setSubHeaderStyle() {
ret void
}
/* Variables and functions */
double acos(int /*<<< orphan*/);
int /*<<< orphan*/ sqrt(double);
double acumulativa_inversa_inclinacion(double x) { return acos(sqrt(1.0 - x)); }


x86 assembly (clang, -O0):
<acumulativa_inversa_inclinacion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xecb(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
call   1040 <sqrt@plt>
mov    %eax,%edi
call   1030 <acos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acumulativa_inversa_inclinacion>:
push   %rax
movsd  0xed7(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1040 <sqrt@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <acos@plt>

LLVM IR (-O0):
define double @acumulativa_inversa_inclinacion(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double 1.000000e+00, %3
%5 = call i32 @sqrt(double %4)
%6 = call double @acos(i32 %5)
ret double %6
}

LLVM IR (-O2):
define double @acumulativa_inversa_inclinacion(double %0) {
%2 = fsub double 1.000000e+00, %0
%3 = tail call i32 @sqrt(double %2)
%4 = tail call double @acos(i32 %3)
ret double %4
}
int ls_costN_nm8_n_in(void) { return 1; }


x86 assembly (clang, -O0):
<ls_costN_nm8_n_in>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ls_costN_nm8_n_in() {
ret i32 1
}

LLVM IR (-O2):
define i32 @ls_costN_nm8_n_in() {
ret i32 1
}
void foo447(int p) {}


x86 assembly (clang, -O0):
<foo447>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @foo447(i32 %0) {
ret void
}
unsigned short int cast_short_ushort(short int x) {
  return (unsigned short int)x;
}


x86 assembly (clang, -O0):
<cast_short_ushort>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cast_short_ushort>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @cast_short_ushort(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
ret i16 %3
}

LLVM IR (-O2):
define zeroext i16 @cast_short_ushort(i16 returned signext %0) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ emit_adc(int, int);
int /*<<< orphan*/ emit_rotr(int);
int /*<<< orphan*/ emit_shrimm(int, int, int);
void emit_rotrsr(int t, int sr) {
  emit_shrimm(sr, 1, sr);
  emit_rotr(t);
  emit_adc(sr, sr);
}


x86 assembly (clang, -O0):
<emit_rotrsr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x1,%esi
call   1030 <emit_shrimm@plt>
mov    -0x4(%rbp),%edi
call   1040 <emit_rotr@plt>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <emit_adc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_rotrsr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
mov    $0x1,%esi
mov    %ebx,%edx
call   1030 <emit_shrimm@plt>
mov    %ebp,%edi
call   1040 <emit_rotr@plt>
mov    %ebx,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <emit_adc@plt>

LLVM IR (-O0):
define void @emit_rotrsr(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @emit_shrimm(i32 %5, i32 1, i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @emit_rotr(i32 %8)
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = call i32 @emit_adc(i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @emit_rotrsr(i32 %0, i32 %1) {
%3 = tail call i32 @emit_shrimm(i32 %1, i32 1, i32 %1)
%4 = tail call i32 @emit_rotr(i32 %0)
%5 = tail call i32 @emit_adc(i32 %1, i32 %1)
ret void
}