xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ omp_nest_lock_t;

/* Variables and functions */
void c_pomp_set_nest_lock_(omp_nest_lock_t *s) { (void)0; }


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

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

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

LLVM IR (-O2):
define void @c_pomp_set_nest_lock_(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int getpid();
int my_getpid();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("my pid is %d\n", getpid());
  printf("my pid is %d\n", my_getpid());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xec1(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <my_getpid@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"my pid is %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpid()
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @my_getpid()
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"my pid is %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @my_getpid()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
int imaginary_cmd(cp)
char *cp;
{ return complex_func(cp, 1); }


x86 assembly (clang, -O0):
<imaginary_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <complex_func@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imaginary_cmd>:
mov    $0x1,%esi
xor    %eax,%eax
jmp    1030 <complex_func@plt>

LLVM IR (-O0):
define i32 @imaginary_cmd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @complex_func to i32 (i8*, i32, ...)*)(i8* %3, i32 1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @imaginary_cmd(i8* %0) {
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @complex_func to i32 (i8*, i32, ...)*)(i8* %0, i32 1)
ret i32 %2
}
/* Type definitions */
typedef size_t uint8_t;

/* Variables and functions */
int get_bit(const uint8_t bitmap[], size_t bit) {
  return (bitmap[bit / 8] >> (bit % 8)) & 1;
}


x86 assembly (clang, -O0):
<get_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x3,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x10(%rbp),%rcx
and    $0x7,%rcx
shr    %cl,%rax
and    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit>:
mov    %rsi,%rcx
mov    %rsi,%rax
and    $0xfffffffffffffff8,%rax
mov    (%rdi,%rax,1),%rax
and    $0x7,%cl
shr    %cl,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @get_bit(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %4
%7 = udiv i64 %6, 8
%8 = getelementptr inbounds i64, i64* %5, i64 %7
%9 = load i64, i64* %8
%10 = load i64, i64* %4
%11 = urem i64 %10, 8
%12 = lshr i64 %9, %11
%13 = and i64 %12, 1
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @get_bit(i64* nocapture %0, i64 %1) {
%3 = lshr i64 %1, 3
%4 = getelementptr inbounds i64, i64* %0, i64 %3
%5 = load i64, i64* %4
%6 = and i64 %1, 7
%7 = lshr i64 %5, %6
%8 = trunc i64 %7 to i32
%9 = and i32 %8, 1
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ interchange(int, int);
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int x = 5, y = 10;
  printf("Originally x = %d and y = %d.\n", x, y);
  interchange(x, y);
  printf("Now x = %d and y = %d.\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <interchange@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x5,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
mov    $0x5,%edi
mov    $0xa,%esi
call   1040 <interchange@plt>
lea    0xed2(%rip),%rdi
mov    $0x5,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Originally x = %d and y = %d.\0A\00"
@.str.1 = [24 x i8] c"Now x = %d and y = %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 10, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 @interchange(i32 %7, i32 %8)
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"Originally x = %d and y = %d.\0A\00"
@.str.1 = [24 x i8] c"Now x = %d and y = %d.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 5, i32 10)
%2 = tail call i32 @interchange(i32 5, i32 10)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 10)
ret i32 0
}
long double __multf3(long double a __attribute__((unused)),
                     long double b __attribute__((unused))) {
  return 0.0;
}


x86 assembly (clang, -O0):
<__multf3>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldz
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @__multf3(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
ret x86_fp80 0xK00000000000000000000
}

LLVM IR (-O2):
define x86_fp80 @__multf3(x86_fp80 %0, x86_fp80 %1) {
ret x86_fp80 0xK00000000000000000000
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ VM_putchar(int /*<<< orphan*/);
int /*<<< orphan*/ vsprintf(char *, char const *, int /*<<< orphan*/);
void VM_vprintf(const char *fmt, va_list ap) {
  char buf[80], *p = buf;
  vsprintf(buf, fmt, ap);
  while (*p != '\0')
    VM_putchar(*p++);
}


x86 assembly (clang, -O0):
<VM_vprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x60(%rbp),%rax
mov    %rax,-0x68(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <vsprintf@plt>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1173 <VM_vprintf+0x53>
mov    -0x68(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x68(%rbp)
movsbl (%rax),%edi
call   1030 <VM_putchar@plt>
jmp    1147 <VM_vprintf+0x27>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VM_vprintf>:
push   %rbx
sub    $0x50,%rsp
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1040 <vsprintf@plt>
mov    (%rsp),%al
test   %al,%al
je     1153 <VM_vprintf+0x33>
lea    0x1(%rsp),%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <VM_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1140 <VM_vprintf+0x20>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @VM_vprintf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [80 x i8]
%6 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
store i8* %7, i8** %6
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 @vsprintf(i8* %8, i8* %9, i32 %10)
br label %12
12: ; preds = %17, %2
%13 = load i8*, i8** %6
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %23
17: ; preds = %12
%18 = load i8*, i8** %6
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %6
%20 = load i8, i8* %18
%21 = sext i8 %20 to i32
%22 = call i32 @VM_putchar(i32 %21)
br label %12
23: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @VM_vprintf(i8* nocapture %0, i32 %1) {
%3 = alloca [80 x i8]
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = call i32 @vsprintf(i8* %4, i8* %0, i32 %1)
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %2, %8
%9 = phi i8 [ %14, %8 ], [ %6, %2 ]
%10 = phi i8* [ %12, %8 ], [ %4, %2 ]
%11 = sext i8 %9 to i32
%12 = getelementptr inbounds i8, i8* %10, i64 1
%13 = tail call i32 @VM_putchar(i32 %11)
%14 = load i8, i8* %12
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %8
16: ; preds = %8, %2
ret void
}
int fz_screen_byte(int bd, int s) {
  return bd + s - (((bd) * ((s) + ((s) >> 7))) >> 8);
}


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

x86 assembly (clang, -O2):
<fz_screen_byte>:
lea    (%rsi,%rdi,1),%eax
mov    %esi,%ecx
sar    $0x7,%ecx
add    %esi,%ecx
imul   %edi,%ecx
sar    $0x8,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fz_screen_byte(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = add nsw i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = load i32, i32* %4
%11 = ashr i32 %10, 7
%12 = add nsw i32 %9, %11
%13 = mul nsw i32 %8, %12
%14 = ashr i32 %13, 8
%15 = sub nsw i32 %7, %14
ret i32 %15
}

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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void end_doc(FILE *ofp) {
  fprintf(ofp, "%c", 9);
  fprintf(ofp, "\033%%-12345X");
}


x86 assembly (clang, -O0):
<end_doc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x9,%edx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_doc>:
push   %rbx
mov    %rdi,%rbx
mov    $0x9,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0xec8(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [11 x i8] c"\1B%%-12345X\00"
define void @end_doc(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 (i32*, i8*, ...) @fprintf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 9)
%5 = load i32*, i32** %2
%6 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"\1B%%-12345X\00"
define void @end_doc(i32* nocapture %0) {
%2 = tail call i32 @fputc(i32 9, i32* %0)
%3 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ isdigit(char);
int nif_detect_type(const char *nif) {
  char pos_zero = nif[0];
  if (isdigit(pos_zero)) {
    return 10;
  } else if (pos_zero == 'X' || pos_zero == 'Y' || pos_zero == 'Z') {
    return 20;
  } else {
    return -20;
  }
}


x86 assembly (clang, -O0):
<nif_detect_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1144 <nif_detect_type+0x34>
movl   $0xa,-0x4(%rbp)
jmp    117e <nif_detect_type+0x6e>
movsbl -0x11(%rbp),%eax
cmp    $0x58,%eax
je     116b <nif_detect_type+0x5b>
movsbl -0x11(%rbp),%eax
cmp    $0x59,%eax
je     116b <nif_detect_type+0x5b>
movsbl -0x11(%rbp),%eax
cmp    $0x5a,%eax
jne    1177 <nif_detect_type+0x67>
movl   $0x14,-0x4(%rbp)
jmp    117e <nif_detect_type+0x6e>
movl   $0xffffffec,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nif_detect_type>:
push   %rbx
movsbl (%rdi),%ebx
mov    %ebx,%edi
call   1030 <isdigit@plt>
lea    -0x58(%rbx),%ecx
cmp    $0x3,%cl
mov    $0x14,%ecx
mov    $0xffffffec,%edx
cmovb  %ecx,%edx
test   %rax,%rax
mov    $0xa,%eax
cmove  %edx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @nif_detect_type(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @isdigit(i8 signext %2)
%4 = icmp eq i64 %3, 0
%5 = add i8 %2, -88
%6 = icmp ult i8 %5, 3
%7 = select i1 %6, i32 20, i32 -20
%8 = select i1 %4, i32 %7, i32 10
ret i32 %8
}
char *getstring() {
  auto char array[10] = "hello";
  return array;
}


x86 assembly (clang, -O0):
<getstring>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0xa(%rbp)
mov    0xef2(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0xa(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getstring>:
lea    -0xa(%rsp),%rax
ret

LLVM IR (-O0):
@__const.getstring.array = [10 x i8] c"hello\00\00\00\00\00"
define i8* @getstring() {
%1 = alloca [10 x i8]
%2 = bitcast [10 x i8]* %1 to i8*
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @getstring() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ pump_async(int /*<<< orphan*/, int);
int /*<<< orphan*/ set_stdin_raw();
void pump_stdin_async(int outfd) {
  set_stdin_raw();
  pump_async(STDIN_FILENO, outfd);
}


x86 assembly (clang, -O0):
<pump_stdin_async>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <set_stdin_raw@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <pump_async@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pump_stdin_async>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <set_stdin_raw@plt>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <pump_async@plt>

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
define void @pump_stdin_async(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @set_stdin_raw()
%4 = load i32, i32* @STDIN_FILENO
%5 = load i32, i32* %2
%6 = call i32 @pump_async(i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
define void @pump_stdin_async(i32 %0) {
%2 = tail call i32 (...) @set_stdin_raw()
%3 = load i32, i32* @STDIN_FILENO
%4 = tail call i32 @pump_async(i32 %3, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ shared_func();
int main() {
  printf("Main -> Shared -> Static\n");
  shared_func();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <shared_func@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"Main -> Shared -> Static\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @shared_func()
ret i32 0
}

LLVM IR (-O2):
@str = [25 x i8] c"Main -> Shared -> Static\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @shared_func()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SendInterrupt(int, int, int, int);
void ScuSendExternalInterrupt12(void) {
  SendInterrupt(0x5C, 0x1, 0x8000, 0x10000000);
}


x86 assembly (clang, -O0):
<ScuSendExternalInterrupt12>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5c,%edi
mov    $0x1,%esi
mov    $0x8000,%edx
mov    $0x10000000,%ecx
call   1030 <SendInterrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScuSendExternalInterrupt12>:
mov    $0x5c,%edi
mov    $0x1,%esi
mov    $0x8000,%edx
mov    $0x10000000,%ecx
jmp    1030 <SendInterrupt@plt>

LLVM IR (-O0):
define void @ScuSendExternalInterrupt12() {
%1 = call i32 @SendInterrupt(i32 92, i32 1, i32 32768, i32 268435456)
ret void
}

LLVM IR (-O2):
define void @ScuSendExternalInterrupt12() {
%1 = tail call i32 @SendInterrupt(i32 92, i32 1, i32 32768, i32 268435456)
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRD0_get(void) { return U_WMRCORENONE_get("U_WMRD0"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRD0\00"
define i32 @U_WMRD0_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
const char *IoTHubClient_GetVersionString(void) { return "1.0.17"; }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"1.0.17\00"
define i8* @IoTHubClient_GetVersionString() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"1.0.17\00"
define i8* @IoTHubClient_GetVersionString() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ cgentry();
int /*<<< orphan*/ gentext();
void genentry(void) {
  gentext();
  cgentry();
}


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

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

LLVM IR (-O0):
define void @genentry() {
%1 = call i32 (...) @gentext()
%2 = call i32 (...) @cgentry()
ret void
}

LLVM IR (-O2):
define void @genentry() {
%1 = tail call i32 (...) @gentext()
%2 = tail call i32 (...) @cgentry()
ret void
}
/* Variables and functions */
int SIM_power_gatecap(double, int /*<<< orphan*/);
double SIM_fpfp_clock_cap(void) {
  return (2 * SIM_power_gatecap((5.4 * 0.0875) + (30.5 * 0.0875), 0));
}


x86 assembly (clang, -O0):
<SIM_fpfp_clock_cap>:
push   %rbp
mov    %rsp,%rbp
movsd  0xee4(%rip),%xmm0
xor    %edi,%edi
call   1030 <SIM_power_gatecap@plt>
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SIM_fpfp_clock_cap>:
push   %rax
movsd  0xee7(%rip),%xmm0
xor    %edi,%edi
call   1030 <SIM_power_gatecap@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @SIM_fpfp_clock_cap() {
%1 = call i32 @SIM_power_gatecap(double 3.141250e+00, i32 0)
%2 = mul nsw i32 2, %1
%3 = sitofp i32 %2 to double
ret double %3
}

LLVM IR (-O2):
define double @SIM_fpfp_clock_cap() {
%1 = tail call i32 @SIM_power_gatecap(double 3.141250e+00, i32 0)
%2 = shl nsw i32 %1, 1
%3 = sitofp i32 %2 to double
ret double %3
}
char get_bit(void *const data, const unsigned int i) {
  return (((unsigned int *)data)[i >> 5] >> (i & 31)) & 1;
}


x86 assembly (clang, -O0):
<get_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    $0x5,%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,4),%eax
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
shr    %cl,%eax
and    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit>:
mov    %esi,%ecx
mov    %esi,%eax
shr    $0x5,%eax
mov    (%rdi,%rax,4),%eax
shr    %cl,%eax
and    $0x1,%al
ret

LLVM IR (-O0):
define signext i8 @get_bit(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %4
%8 = lshr i32 %7, 5
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %6, i64 %9
%11 = load i32, i32* %10
%12 = load i32, i32* %4
%13 = and i32 %12, 31
%14 = lshr i32 %11, %13
%15 = and i32 %14, 1
%16 = trunc i32 %15 to i8
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @get_bit(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = lshr i32 %1, 5
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %3, i64 %5
%7 = load i32, i32* %6
%8 = and i32 %1, 31
%9 = lshr i32 %7, %8
%10 = trunc i32 %9 to i8
%11 = and i8 %10, 1
ret i8 %11
}
/* Variables and functions */
double sqrt(double);
double ellipsoid_radius(double sin_phig, double cos_phig, double Ae2,
                        double Be2) {
  return sqrt(Ae2 * Be2 /
              (Ae2 * sin_phig * sin_phig + Be2 * cos_phig * cos_phig));
}


x86 assembly (clang, -O0):
<ellipsoid_radius>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
movsd  -0x20(%rbp),%xmm2
mulsd  -0x10(%rbp),%xmm2
mulsd  -0x10(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ellipsoid_radius>:
movapd %xmm0,%xmm4
mulsd  %xmm2,%xmm4
mulsd  %xmm3,%xmm2
mulsd  %xmm1,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
divsd  %xmm4,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jb     1142 <ellipsoid_radius+0x32>
xorps  %xmm0,%xmm0
sqrtsd %xmm2,%xmm0
ret
movapd %xmm2,%xmm0
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @ellipsoid_radius(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* %7
%10 = load double, double* %8
%11 = fmul double %9, %10
%12 = load double, double* %7
%13 = load double, double* %5
%14 = fmul double %12, %13
%15 = load double, double* %5
%16 = load double, double* %8
%17 = load double, double* %6
%18 = fmul double %16, %17
%19 = load double, double* %6
%20 = fmul double %18, %19
%21 = call double @llvm.fmuladd.f64(double %14, double %15, double %20)
%22 = fdiv double %11, %21
%23 = call double @sqrt(double %22)
ret double %23
}

LLVM IR (-O2):
define double @ellipsoid_radius(double %0, double %1, double %2, double %3) {
%5 = fmul double %2, %3
%6 = fmul double %0, %2
%7 = fmul double %1, %3
%8 = fmul double %7, %1
%9 = tail call double @llvm.fmuladd.f64(double %6, double %0, double %8)
%10 = fdiv double %5, %9
%11 = tail call double @sqrt(double %10)
ret double %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(unsigned short, int /*<<< orphan*/ *);
int cas_write_eof(FILE *out, unsigned short start_addr) {
  fputc(0x78, out);
  fputc(start_addr & 0xFF, out);
  fputc(start_addr >> 8, out);
}


x86 assembly (clang, -O0):
<cas_write_eof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x78,%edi
call   1030 <fputc@plt>
movzwl -0x12(%rbp),%eax
and    $0xff,%eax
mov    -0x10(%rbp),%rsi
movzwl %ax,%edi
call   1030 <fputc@plt>
movzwl -0x12(%rbp),%eax
sar    $0x8,%eax
mov    -0x10(%rbp),%rsi
movzwl %ax,%edi
call   1030 <fputc@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cas_write_eof>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    $0x78,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
movzbl %bl,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
shr    $0x8,%ebx
mov    %ebx,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define i32 @cas_write_eof(i32* %0, i16 zeroext %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i16
store i32* %0, i32** %4
store i16 %1, i16* %5
%6 = load i32*, i32** %4
%7 = call i32 @fputc(i16 zeroext 120, i32* %6)
%8 = load i16, i16* %5
%9 = zext i16 %8 to i32
%10 = and i32 %9, 255
%11 = trunc i32 %10 to i16
%12 = load i32*, i32** %4
%13 = call i32 @fputc(i16 zeroext %11, i32* %12)
%14 = load i16, i16* %5
%15 = zext i16 %14 to i32
%16 = ashr i32 %15, 8
%17 = trunc i32 %16 to i16
%18 = load i32*, i32** %4
%19 = call i32 @fputc(i16 zeroext %17, i32* %18)
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @cas_write_eof(i32* nocapture %0, i16 zeroext %1) {
%3 = tail call i32 @fputc(i16 zeroext 120, i32* %0)
%4 = and i16 %1, 255
%5 = tail call i32 @fputc(i16 zeroext %4, i32* %0)
%6 = lshr i16 %1, 8
%7 = tail call i32 @fputc(i16 zeroext %6, i32* %0)
ret i32 undef
}
void Lut_3(double *out, double *in) {
  out[0] = in[0];
  out[1] = in[1];
  out[2] = in[2];
}


x86 assembly (clang, -O0):
<Lut_3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lut_3>:
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @Lut_3(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %3
%9 = getelementptr inbounds double, double* %8, i64 0
store double %7, double* %9
%10 = load double*, double** %4
%11 = getelementptr inbounds double, double* %10, i64 1
%12 = load double, double* %11
%13 = load double*, double** %3
%14 = getelementptr inbounds double, double* %13, i64 1
store double %12, double* %14
%15 = load double*, double** %4
%16 = getelementptr inbounds double, double* %15, i64 2
%17 = load double, double* %16
%18 = load double*, double** %3
%19 = getelementptr inbounds double, double* %18, i64 2
store double %17, double* %19
ret void
}

LLVM IR (-O2):
define void @Lut_3(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
store double %3, double* %0
%4 = getelementptr inbounds double, double* %1, i64 1
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %0, i64 1
store double %5, double* %6
%7 = getelementptr inbounds double, double* %1, i64 2
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %0, i64 2
store double %8, double* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TestStruct();
int main(void) {
  TestStruct();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @TestStruct()
ret i32 0
}
void __svgalib_rendition_outgra(int index, int val) {}


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

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

LLVM IR (-O0):
define void @__svgalib_rendition_outgra(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @__svgalib_rendition_outgra(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
struct t_config_section {
  int dummy;
};
struct t_config_option {
  int dummy;
};
struct t_config_file {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ config_file_option_free(struct t_config_option *);
int /*<<< orphan*/ config_weechat_debug_set_all();
int config_weechat_debug_delete_option_cb(void *data,
                                          struct t_config_file *config_file,
                                          struct t_config_section *section,
                                          struct t_config_option *option) {
  (void)data;
  (void)config_file;
  (void)section;
  config_file_option_free(option);
  config_weechat_debug_set_all();
  return 2;
}


x86 assembly (clang, -O0):
<config_weechat_debug_delete_option_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <config_file_option_free@plt>
mov    $0x0,%al
call   1040 <config_weechat_debug_set_all@plt>
mov    $0x2,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_weechat_debug_delete_option_cb>:
push   %rax
mov    %rcx,%rdi
call   1030 <config_file_option_free@plt>
xor    %eax,%eax
call   1040 <config_weechat_debug_set_all@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.t_config_file = type { i32 }
%struct.t_config_section = type { i32 }
%struct.t_config_option = type { i32 }
define i32 @config_weechat_debug_delete_option_cb(i8* %0, %struct.t_config_file* %1, %struct.t_config_section* %2, %struct.t_config_option* %3) {
%5 = alloca i8*
%6 = alloca %struct.t_config_file*
%7 = alloca %struct.t_config_section*
%8 = alloca %struct.t_config_option*
store i8* %0, i8** %5
store %struct.t_config_file* %1, %struct.t_config_file** %6
store %struct.t_config_section* %2, %struct.t_config_section** %7
store %struct.t_config_option* %3, %struct.t_config_option** %8
%9 = load i8*, i8** %5
%10 = load %struct.t_config_file*, %struct.t_config_file** %6
%11 = load %struct.t_config_section*, %struct.t_config_section** %7
%12 = load %struct.t_config_option*, %struct.t_config_option** %8
%13 = call i32 @config_file_option_free(%struct.t_config_option* %12)
%14 = call i32 (...) @config_weechat_debug_set_all()
ret i32 2
}

LLVM IR (-O2):
%struct.t_config_file = type { i32 }
%struct.t_config_section = type { i32 }
%struct.t_config_option = type { i32 }
define i32 @config_weechat_debug_delete_option_cb(i8* nocapture readnone %0, %struct.t_config_file* nocapture readnone %1, %struct.t_config_section* nocapture readnone %2, %struct.t_config_option* %3) {
%5 = tail call i32 @config_file_option_free(%struct.t_config_option* %3)
%6 = tail call i32 (...) @config_weechat_debug_set_all()
ret i32 2
}
double deepin_linear(double t) { return t; }


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

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

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

LLVM IR (-O2):
define double @deepin_linear(double returned %0) {
ret double %0
}
void foo469() {}


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

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

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

LLVM IR (-O2):
define void @foo469() {
ret void
}
void X509_STORE_CTX_set_verify_cb(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_STORE_CTX_set_verify_cb() {
ret void
}
/* Variables and functions */
int rand();
char randomchar() {
  int randval;
  randval = rand() % 52;
  randval += 'A';
  return (char)randval;
}


x86 assembly (clang, -O0):
<randomchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x34,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x41,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomchar>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x24,%rcx
add    %edx,%ecx
imul   $0x34,%ecx,%ecx
sub    %ecx,%eax
add    $0x41,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @randomchar() {
%1 = alloca i32
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 52
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 65
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = trunc i32 %6 to i8
ret i8 %7
}

LLVM IR (-O2):
define signext i8 @randomchar() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 52
%3 = trunc i32 %2 to i8
%4 = add nsw i8 %3, 65
ret i8 %4
}
OP(fd, f7) { op_f7(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_f7@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_f7()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ SetReadMode();
void NOROM_FlashDisableSectorsForWrite(void) {
  SetReadMode();
  (*((volatile unsigned long *)(0x40030000 + 0x00002030))) = 0x00000001;
  (*((volatile unsigned long *)(0x40030000 + 0x00002034))) = 0x0000;
  (*((volatile unsigned long *)(0x40030000 + 0x00002030))) = 0;
  (*((volatile unsigned long *)(0x40030000 + 0x00002288))) = 5;
  (*((volatile unsigned long *)(0x40030000 + 0x000022C0))) = 0xFFFFFFFF;
  (*((volatile unsigned long *)(0x40030000 + 0x000022C4))) = 0xFFFFFFFF;
  (*((volatile unsigned long *)(0x40030000 + 0x00002288))) = 2;
}


x86 assembly (clang, -O0):
<NOROM_FlashDisableSectorsForWrite>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <SetReadMode@plt>
mov    $0x40032030,%eax
movq   $0x1,(%rax)
mov    $0x40032034,%eax
movq   $0x0,(%rax)
mov    $0x40032030,%eax
movq   $0x0,(%rax)
mov    $0x40032288,%eax
movq   $0x5,(%rax)
mov    $0x400322c0,%eax
mov    $0xffffffff,%ecx
mov    %rcx,(%rax)
mov    $0x400322c4,%eax
mov    $0xffffffff,%ecx
mov    %rcx,(%rax)
mov    $0x40032288,%eax
movq   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<NOROM_FlashDisableSectorsForWrite>:
push   %rax
xor    %eax,%eax
call   1030 <SetReadMode@plt>
movq   $0x1,0x40032030
movq   $0x0,0x40032034
movq   $0x0,0x40032030
movq   $0x5,0x40032288
mov    $0xffffffff,%eax
mov    %rax,0x400322c0
40
mov    %rax,0x400322c4
40
movq   $0x2,0x40032288
pop    %rax
ret

LLVM IR (-O0):
define void @NOROM_FlashDisableSectorsForWrite() {
%1 = call i32 (...) @SetReadMode()
store volatile i64 1, i64* inttoptr (i64 1073946672 to i64*)
store volatile i64 0, i64* inttoptr (i64 1073946676 to i64*)
store volatile i64 0, i64* inttoptr (i64 1073946672 to i64*)
store volatile i64 5, i64* inttoptr (i64 1073947272 to i64*)
store volatile i64 4294967295, i64* inttoptr (i64 1073947328 to i64*)
store volatile i64 4294967295, i64* inttoptr (i64 1073947332 to i64*)
store volatile i64 2, i64* inttoptr (i64 1073947272 to i64*)
ret void
}

LLVM IR (-O2):
define void @NOROM_FlashDisableSectorsForWrite() {
%1 = tail call i32 (...) @SetReadMode()
store volatile i64 1, i64* inttoptr (i64 1073946672 to i64*)
store volatile i64 0, i64* inttoptr (i64 1073946676 to i64*)
store volatile i64 0, i64* inttoptr (i64 1073946672 to i64*)
store volatile i64 5, i64* inttoptr (i64 1073947272 to i64*)
store volatile i64 4294967295, i64* inttoptr (i64 1073947328 to i64*)
store volatile i64 4294967295, i64* inttoptr (i64 1073947332 to i64*)
store volatile i64 2, i64* inttoptr (i64 1073947272 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ suzerain_inorder_wavenumber(int const, int const);
int suzerain_inorder_wavenumber_valid(int const, int /*<<< orphan*/);
int suzerain_inorder_wavenumber_translatable(const int N, const int dN,
                                             const int i) {
  assert(N <= dN);
  return suzerain_inorder_wavenumber_valid(N,
                                           suzerain_inorder_wavenumber(dN, i));
}


x86 assembly (clang, -O0):
<suzerain_inorder_wavenumber_translatable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <suzerain_inorder_wavenumber@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1030 <suzerain_inorder_wavenumber_valid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suzerain_inorder_wavenumber_translatable>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %edi,%edi
cmp    %esi,%ebx
setle  %dil
call   1040 <assert@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1050 <suzerain_inorder_wavenumber@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <suzerain_inorder_wavenumber_valid@plt>

LLVM IR (-O0):
define i32 @suzerain_inorder_wavenumber_translatable(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* %4
%8 = load i32, i32* %5
%9 = icmp sle i32 %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @suzerain_inorder_wavenumber(i32 %13, i32 %14)
%16 = call i32 @suzerain_inorder_wavenumber_valid(i32 %12, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @suzerain_inorder_wavenumber_translatable(i32 %0, i32 %1, i32 %2) {
%4 = icmp sle i32 %0, %1
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @suzerain_inorder_wavenumber(i32 %1, i32 %2)
%8 = tail call i32 @suzerain_inorder_wavenumber_valid(i32 %0, i32 %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ say(char *);
void usage(void) {
  say("Usage: intr [-d] [-t seconds] command [arg ...]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"Usage: intr [-d] [-t seconds] command [arg ...]\0A\00"
define void @usage() {
%1 = call i32 @say(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [49 x i8] c"Usage: intr [-d] [-t seconds] command [arg ...]\0A\00"
define void @usage() {
%1 = tail call i32 @say(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
int XX(int n) {
  if (n == 0) {
    return 0;
  } else {
    return XX(n / 3 + 1) + n;
  }
}


x86 assembly (clang, -O0):
<XX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <XX+0x21>
movl   $0x0,-0x4(%rbp)
jmp    114c <XX+0x3c>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
add    $0x1,%edi
call   1030 <XX@plt>
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XX>:
xor    %eax,%eax
test   %edi,%edi
je     112d <XX+0x2d>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x55555556,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rdi
add    %edx,%edi
add    %ecx,%eax
inc    %edi
jne    1110 <XX+0x10>
ret

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

LLVM IR (-O2):
define i32 @XX(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = phi i32 [ %8, %3 ], [ 0, %1 ]
%6 = sdiv i32 %4, 3
%7 = add nsw i32 %6, 1
%8 = add nsw i32 %4, %5
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
signed int mknod(const char *__path, unsigned int __mode,
                 unsigned long int __dev) {
  signed int return_value___xmknod$1;
  return_value___xmknod$1 = __xmknod(0, __path, __mode, &__dev);
  return return_value___xmknod$1;
}


x86 assembly (clang, -O0):
<mknod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
xor    %edi,%edi
lea    -0x18(%rbp),%rcx
mov    $0x0,%al
call   1030 <__xmknod@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mknod>:
push   %rax
mov    %esi,%eax
mov    %rdi,%rsi
mov    %rdx,(%rsp)
mov    %rsp,%rcx
xor    %edi,%edi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <__xmknod@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mknod(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i32 (i32, i8*, i32, i64*, ...) bitcast (i32 (...)* @__xmknod to i32 (i32, i8*, i32, i64*, ...)*)(i32 0, i8* %8, i32 %9, i64* %6)
store i32 %10, i32* %7
%11 = load i32, i32* %7
ret i32 %11
}

LLVM IR (-O2):
define i32 @mknod(i8* %0, i32 %1, i64 %2) {
%4 = alloca i64
store i64 %2, i64* %4
%5 = call i32 (i32, i8*, i32, i64*, ...) bitcast (i32 (...)* @__xmknod to i32 (i32, i8*, i32, i64*, ...)*)(i32 0, i8* %0, i32 %1, i64* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void *zzz() {
  printf("\r%sType '??quit' to exit.\n%s", "\e[1;33m", "\e[0m");
  return 0;
}


x86 assembly (clang, -O0):
<zzz>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xefb(%rip),%rsi
lea    0xefc(%rip),%rdx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zzz>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xefe(%rip),%rsi
lea    0xeff(%rip),%rdx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"\0D%sType '??quit' to exit.\0A%s\00"
@.str.1 = [8 x i8] c"\1B[1;33m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define i8* @zzz() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [29 x i8] c"\0D%sType '??quit' to exit.\0A%s\00"
@.str.1 = [8 x i8] c"\1B[1;33m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define noalias i8* @zzz() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret i8* null
}
unsigned int f65(unsigned int x, unsigned int y) {
  return (x << y) + (x >> ((-y) & (8 * 4 - 1)));
}


x86 assembly (clang, -O0):
<f65>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
and    $0x1f,%ecx
shr    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f65>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f65(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub i32 0, %9
%11 = and i32 %10, 31
%12 = lshr i32 %8, %11
%13 = add i32 %7, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @f65(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub i32 0, %1
%5 = and i32 %4, 31
%6 = lshr i32 %0, %5
%7 = add i32 %6, %3
ret i32 %7
}