xunge/DecIR huggingface dataset:
/* Variables and functions */
char *get_type(int, int);
int /*<<< orphan*/ printf(char *, char const *, char *);
void gen_type(const char *name, int is_signed, int size) {
  printf("   subtype %s is %s;\n", name, get_type(is_signed, size));
}


x86 assembly (clang, -O0):
<gen_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1040 <get_type@plt>
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_type>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
mov    %edx,%esi
call   1040 <get_type@plt>
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [22 x i8] c" subtype %s is %s;\0A\00"
define void @gen_type(i8* %0, i32 %1, i32 %2) {
%4 = tail call i8* @get_type(i32 %1, i32 %2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
ret void
}
/* Variables and functions */
char const *dlerror();
const char *Exynos_OSAL_dlerror(void) { return dlerror(); }


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

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

LLVM IR (-O0):
define i8* @Exynos_OSAL_dlerror() {
%1 = call i8* (...) @dlerror()
ret i8* %1
}

LLVM IR (-O2):
define i8* @Exynos_OSAL_dlerror() {
%1 = tail call i8* (...) @dlerror()
ret i8* %1
}
double schwarzschildPotential(const double r, const double M) {
  assert(r >= 2.0 * M);
  return ((1 - 2 * M / r) / ((r) * (r)));
}


x86 assembly (clang, -O0):
<schwarzschildPotential>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed9(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  0xeb9(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  -0x8(%rbp),%xmm1
movsd  0xe9f(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<schwarzschildPotential>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
addsd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
xor    %edi,%edi
ucomisd %xmm1,%xmm0
setae  %dil
xor    %eax,%eax
call   1030 <assert@plt>
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
divsd  %xmm1,%xmm2
movsd  0xeb3(%rip),%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @schwarzschildPotential(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fmul double 2.000000e+00, %6
%8 = fcmp oge double %5, %7
%9 = zext i1 %8 to i32
%10 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %9)
%11 = load double, double* %4
%12 = fmul double 2.000000e+00, %11
%13 = load double, double* %3
%14 = fdiv double %12, %13
%15 = fsub double 1.000000e+00, %14
%16 = load double, double* %3
%17 = load double, double* %3
%18 = fmul double %16, %17
%19 = fdiv double %15, %18
ret double %19
}

LLVM IR (-O2):
define double @schwarzschildPotential(double %0, double %1) {
%3 = fmul double %1, 2.000000e+00
%4 = fcmp ole double %3, %0
%5 = zext i1 %4 to i32
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %5)
%7 = fdiv double %3, %0
%8 = fsub double 1.000000e+00, %7
%9 = fmul double %0, %0
%10 = fdiv double %8, %9
ret double %10
}
unsigned short inw(unsigned short port) {
  unsigned short ret;
  __asm__ __volatile__("inw %1, %0" : "=a"(ret) : "Nd"(port));
  return ret;
}


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

x86 assembly (clang, -O2):
<inw>:
mov    %edi,%edx
in     (%dx),%ax
ret

LLVM IR (-O0):
define zeroext i16 @inw(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i16 asm sideeffect "inw $1, $0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i16 %5, i16* %3
%6 = load i16, i16* %3
ret i16 %6
}

LLVM IR (-O2):
define zeroext i16 @inw(i16 zeroext %0) {
%2 = tail call i16 asm sideeffect "inw $1, $0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i16 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int INLINE_SYSCALL(int /*<<< orphan*/, int, int /*<<< orphan*/, char const *,
                   int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fchownat;
int __chown(const char *file, uid_t owner, gid_t group) {
  return INLINE_SYSCALL(fchownat, 5, AT_FDCWD, file, owner, group, 0);
}


x86 assembly (clang, -O0):
<__chown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%r8d
mov    -0x10(%rbp),%r9d
mov    $0x5,%esi
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <INLINE_SYSCALL@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__chown>:
push   %rax
mov    %edx,%r9d
mov    %esi,%r8d
mov    %rdi,%rcx
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
mov    0x2ea6(%rip),%rax
mov    (%rax),%edx
movl   $0x0,(%rsp)
mov    $0x5,%esi
call   1030 <INLINE_SYSCALL@plt>
pop    %rcx
ret

LLVM IR (-O0):
@fchownat = global i32 0
@AT_FDCWD = global i32 0
define i32 @__chown(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @fchownat
%8 = load i32, i32* @AT_FDCWD
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 @INLINE_SYSCALL(i32 %7, i32 5, i32 %8, i8* %9, i32 %10, i32 %11, i32 0)
ret i32 %12
}

LLVM IR (-O2):
@fchownat = global i32 0
@AT_FDCWD = global i32 0
define i32 @__chown(i8* %0, i32 %1, i32 %2) {
%4 = load i32, i32* @fchownat
%5 = load i32, i32* @AT_FDCWD
%6 = tail call i32 @INLINE_SYSCALL(i32 %4, i32 5, i32 %5, i8* %0, i32 %1, i32 %2, i32 0)
ret i32 %6
}
int isPalindromeIterative(char *input, int length) {
  int start = 0, end = length;
  while (start < end)
    if (input[start++] != input[end--])
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isPalindromeIterative>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1169 <isPalindromeIterative+0x69>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x18(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
mov    -0x1c(%rbp),%edx
mov    %edx,%esi
add    $0xffffffff,%esi
mov    %esi,-0x1c(%rbp)
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1164 <isPalindromeIterative+0x64>
movl   $0x0,-0x4(%rbp)
jmp    1170 <isPalindromeIterative+0x70>
jmp    1118 <isPalindromeIterative+0x18>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPalindromeIterative>:
movslq %esi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %rax,%rcx
jge    112c <isPalindromeIterative+0x2c>
movzbl (%rdi,%rcx,1),%edx
add    $0x1,%rcx
lea    -0x1(%rax),%rsi
cmp    (%rdi,%rax,1),%dl
mov    %rsi,%rax
je     1110 <isPalindromeIterative+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isPalindromeIterative(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 0, i32* %6
%8 = load i32, i32* %5
store i32 %8, i32* %7
br label %9
9: ; preds = %30, %2
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %31
13: ; preds = %9
%14 = load i8*, i8** %4
%15 = load i32, i32* %6
%16 = add nsw i32 %15, 1
store i32 %16, i32* %6
%17 = sext i32 %15 to i64
%18 = getelementptr inbounds i8, i8* %14, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = load i8*, i8** %4
%22 = load i32, i32* %7
%23 = add nsw i32 %22, -1
store i32 %23, i32* %7
%24 = sext i32 %22 to i64
%25 = getelementptr inbounds i8, i8* %21, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp ne i32 %20, %27
br i1 %28, label %29, label %30
29: ; preds = %13
store i32 0, i32* %3
br label %32
30: ; preds = %13
br label %9
31: ; preds = %9
store i32 1, i32* %3
br label %32
32: ; preds = %31, %29
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @isPalindromeIterative(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %8, %2
%5 = phi i64 [ %12, %8 ], [ %3, %2 ]
%6 = phi i64 [ %9, %8 ], [ 0, %2 ]
%7 = icmp slt i64 %6, %5
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %6
%11 = load i8, i8* %10
%12 = add nsw i64 %5, -1
%13 = getelementptr inbounds i8, i8* %0, i64 %5
%14 = load i8, i8* %13
%15 = icmp eq i8 %11, %14
br i1 %15, label %4, label %16
16: ; preds = %4, %8
%17 = phi i32 [ 0, %8 ], [ 1, %4 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ outbyte(char);
void outdirectpage() { outbyte('<'); }


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

x86 assembly (clang, -O2):
<outdirectpage>:
mov    $0x3c,%edi
jmp    1030 <outbyte@plt>

LLVM IR (-O0):
define void @outdirectpage() {
%1 = call i32 @outbyte(i8 signext 60)
ret void
}

LLVM IR (-O2):
define void @outdirectpage() {
%1 = tail call i32 @outbyte(i8 signext 60)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ADC_Driver();
int /*<<< orphan*/ Timer0Init();
int /*<<< orphan*/ UART1_Conf(int, int);
int /*<<< orphan*/ UART1_Driver();
int /*<<< orphan*/ UART1_SendStringNow(char *, int);
int main() {
  UART1_Conf(9600, 1);
  Timer0Init();
  UART1_SendStringNow("Ready!\r\n", 8);
  while (1) {
    UART1_Driver();
    ADC_Driver();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2580,%edi
mov    $0x1,%esi
call   1050 <UART1_Conf@plt>
mov    $0x0,%al
call   1070 <Timer0Init@plt>
lea    0xe84(%rip),%rdi
mov    $0x8,%esi
call   1040 <UART1_SendStringNow@plt>
mov    $0x0,%al
call   1030 <UART1_Driver@plt>
mov    $0x0,%al
call   1060 <ADC_Driver@plt>
jmp    1186 <main+0x36>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2580,%edi
mov    $0x1,%esi
call   1050 <UART1_Conf@plt>
xor    %eax,%eax
call   1070 <Timer0Init@plt>
lea    0xe92(%rip),%rdi
mov    $0x8,%esi
call   1040 <UART1_SendStringNow@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <UART1_Driver@plt>
xor    %eax,%eax
call   1060 <ADC_Driver@plt>
jmp    1180 <main+0x30>

LLVM IR (-O0):
@.str = [9 x i8] c"Ready!\0D\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @UART1_Conf(i32 9600, i32 1)
%3 = call i32 (...) @Timer0Init()
%4 = call i32 @UART1_SendStringNow(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
br label %5
5: ; preds = %0, %5
%6 = call i32 (...) @UART1_Driver()
%7 = call i32 (...) @ADC_Driver()
br label %5
}

LLVM IR (-O2):
@.str = [9 x i8] c"Ready!\0D\0A\00"
define i32 @main() {
%1 = tail call i32 @UART1_Conf(i32 9600, i32 1)
%2 = tail call i32 (...) @Timer0Init()
%3 = tail call i32 @UART1_SendStringNow(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
br label %4
4: ; preds = %0, %4
%5 = tail call i32 (...) @UART1_Driver()
%6 = tail call i32 (...) @ADC_Driver()
br label %4
}
void memset_(unsigned char *dst, unsigned char val, unsigned char len) {
  while (len--) {
    *dst++ = val;
  }
}


x86 assembly (clang, -O0):
<memset_>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,%cl
add    $0xff,%cl
mov    %cl,-0xa(%rbp)
cmp    $0x0,%al
je     113f <memset_+0x3f>
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1113 <memset_+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<memset_>:
test   %edx,%edx
je     1125 <memset_+0x15>
push   %rax
movzbl %dl,%edx
movzbl %sil,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @memset_(i8* nocapture writeonly %0, i8 zeroext %1, i8 zeroext %2) {
%4 = icmp eq i8 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = zext i8 %2 to i64
br label %7
7: ; preds = %5, %3
ret void
}
void XwcFreeStringList() {}


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

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

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

LLVM IR (-O2):
define void @XwcFreeStringList() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ system(char *);
int main() {
  int i;
  for (i; i <= 100; i++) {
    if (i % 2 == 0) {
      system("clear");
      system("toilet -F border --gay -f pagga \"Gatos y Tetas\"");
      system("sleep 0.5");
    } else {
      system("clear");
      system("toilet -F border --gay -f pagga \"Tetas y Gatos\"");
      system("sleep 0.5");
    }
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     119d <main+0x8d>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1166 <main+0x56>
lea    0xebc(%rip),%rdi
call   1030 <system@plt>
lea    0xeb6(%rip),%rdi
call   1030 <system@plt>
lea    0xeda(%rip),%rdi
call   1030 <system@plt>
jmp    118a <main+0x7a>
lea    0xe93(%rip),%rdi
call   1030 <system@plt>
lea    0xec7(%rip),%rdi
call   1030 <system@plt>
lea    0xeb1(%rip),%rdi
call   1030 <system@plt>
jmp    118f <main+0x7f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <main+0xf>
mov    0x2e3c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [48 x i8] c"toilet -F border --gay -f pagga \22Gatos y Tetas\22\00"
@.str.2 = [10 x i8] c"sleep 0.5\00"
@.str.3 = [48 x i8] c"toilet -F border --gay -f pagga \22Tetas y Gatos\22\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* %2
br label %4
4: ; preds = %20, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 100
br i1 %6, label %7, label %23
7: ; preds = %4
%8 = load i32, i32* %2
%9 = srem i32 %8, 2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @system(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %19
15: ; preds = %7
%16 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @system(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0))
%18 = call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %19
19: ; preds = %15, %11
br label %20
20: ; preds = %19
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %4
23: ; preds = %4
%24 = load i32, i32* @EXIT_SUCCESS
ret i32 %24
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @EXIT_SUCCESS
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ usleep(int);
int do_child_job() {
  usleep(17 * 1000000L);
  exit(EXIT_SUCCESS);
  return 1;
}


x86 assembly (clang, -O0):
<do_child_job>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1036640,%edi
call   1040 <usleep@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<do_child_job>:
push   %rax
mov    $0x1036640,%edi
call   1040 <usleep@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @do_child_job() {
%1 = call i32 @usleep(i32 17000000)
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @do_child_job() {
%1 = tail call i32 @usleep(i32 17000000)
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
void genround_l_s() {}


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

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

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

LLVM IR (-O2):
define void @genround_l_s() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void mumble_suggestconfig_callback(uint32_t version, uint32_t positional,
                                   uint32_t push_to_talk, void *user_data) {
  printf("suggestconfig_callback\n");
}


x86 assembly (clang, -O0):
<mumble_suggestconfig_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"suggestconfig_callback\0A\00"
define void @mumble_suggestconfig_callback(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"suggestconfig_callback\00"
define void @mumble_suggestconfig_callback(i32 %0, i32 %1, i32 %2, i8* nocapture readnone %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct device_node {
  int dummy;
};

/* Variables and functions */
int ENODEV;
int cci_ace_get_port(struct device_node *dn) { return -ENODEV; }


x86 assembly (clang, -O0):
<cci_ace_get_port>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cci_ace_get_port>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
%struct.device_node = type { i32 }
@ENODEV = global i32 0
define i32 @cci_ace_get_port(%struct.device_node* %0) {
%2 = alloca %struct.device_node*
store %struct.device_node* %0, %struct.device_node** %2
%3 = load i32, i32* @ENODEV
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
%struct.device_node = type { i32 }
@ENODEV = global i32 0
define i32 @cci_ace_get_port(%struct.device_node* nocapture readnone %0) {
%2 = load i32, i32* @ENODEV
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
int __builtin_mips_shll_s_w(int, int);
int silk_LSHIFT_SAT32(int a, int shift) {
  int r;
  r = __builtin_mips_shll_s_w(a, shift);
  return r;
}


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

x86 assembly (clang, -O2):
<silk_LSHIFT_SAT32>:
jmp    1030 <__builtin_mips_shll_s_w@plt>

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

LLVM IR (-O2):
define i32 @silk_LSHIFT_SAT32(i32 %0, i32 %1) {
%3 = tail call i32 @__builtin_mips_shll_s_w(i32 %0, i32 %1)
ret i32 %3
}
__attribute__((always_)) void pci_remove_legacy_files(struct pci_bus *bus) {
  return;
}


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

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

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

LLVM IR (-O2):
%struct.pci_bus = type opaque
define void @pci_remove_legacy_files(%struct.pci_bus* nocapture %0) {
ret void
}
/* Variables and functions */
double DaylightSavingTA(double);
double LocalTZA();
double UTC(double loc) {
  return loc - LocalTZA() - DaylightSavingTA(loc - LocalTZA());
}


x86 assembly (clang, -O0):
<UTC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    $0x0,%al
call   1030 <LocalTZA@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <LocalTZA@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  %xmm1,%xmm0
call   1040 <DaylightSavingTA@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UTC>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <LocalTZA@plt>
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
xor    %eax,%eax
call   1030 <LocalTZA@plt>
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1040 <DaylightSavingTA@plt>
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @UTC(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double (...) @LocalTZA()
%5 = fsub double %3, %4
%6 = load double, double* %2
%7 = call double (...) @LocalTZA()
%8 = fsub double %6, %7
%9 = call double @DaylightSavingTA(double %8)
%10 = fsub double %5, %9
ret double %10
}

LLVM IR (-O2):
define double @UTC(double %0) {
%2 = tail call double (...) @LocalTZA()
%3 = fsub double %0, %2
%4 = tail call double (...) @LocalTZA()
%5 = fsub double %0, %4
%6 = tail call double @DaylightSavingTA(double %5)
%7 = fsub double %3, %6
ret double %7
}
int test_imm_4Buint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x4B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_4Buint64_lowword_mem>:
testb  $0x4b,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Buint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 75
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ SA1Absolute(int);
int /*<<< orphan*/ STA16(int /*<<< orphan*/, int);
void Op8DM0(void) { STA16(SA1Absolute(2), 0xFFFFFF); }


x86 assembly (clang, -O0):
<Op8DM0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <SA1Absolute@plt>
mov    %eax,%edi
mov    $0xffffff,%esi
call   1040 <STA16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op8DM0>:
push   %rax
mov    $0x2,%edi
call   1030 <SA1Absolute@plt>
mov    %eax,%edi
mov    $0xffffff,%esi
pop    %rax
jmp    1040 <STA16@plt>

LLVM IR (-O0):
define void @Op8DM0() {
%1 = call i32 @SA1Absolute(i32 2)
%2 = call i32 @STA16(i32 %1, i32 16777215)
ret void
}

LLVM IR (-O2):
define void @Op8DM0() {
%1 = tail call i32 @SA1Absolute(i32 2)
%2 = tail call i32 @STA16(i32 %1, i32 16777215)
ret void
}
void wait_for_subcore_guest_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @wait_for_subcore_guest_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Linux();
int /*<<< orphan*/ printf(char *);
int main() {
  Linux();
  printf("Hello, C/C++\n");
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, C/C++\0A\00"
define i32 @main() {
%1 = call i32 (...) @Linux()
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello, C/C++\00"
define i32 @main() {
%1 = tail call i32 (...) @Linux()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int symlink(const char *oldpath, const char *newpath) {
  assert(!"NYI");
  return -1;
}


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

x86 assembly (clang, -O2):
<symlink>:
push   %rax
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"NYI\00"
define i32 @symlink(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @assert(i32 0)
ret i32 -1
}

LLVM IR (-O2):
define i32 @symlink(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @assert(i32 0)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int);
char *get_item_class_name(int class_num, int item_num) {
  static char name[32];
  sprintf(name, "ICNAM%d.%d", class_num, item_num);
  return name;
}


x86 assembly (clang, -O0):
<get_item_class_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0x2f15(%rip),%rdi
lea    0xece(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f02(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_item_class_name>:
push   %rbx
mov    %esi,%ecx
mov    %edi,%edx
lea    0x2f24(%rip),%rbx
lea    0xedd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@get_item_class_name.name = internal global [32 x i8] zeroinitializer
@.str = [11 x i8] c"ICNAM%d.%d\00"
define i8* @get_item_class_name(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @sprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @get_item_class_name.name, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @get_item_class_name.name, i64 0, i64 0)
}

LLVM IR (-O2):
@get_item_class_name.name = internal global [32 x i8] zeroinitializer
@.str = [11 x i8] c"ICNAM%d.%d\00"
define i8* @get_item_class_name(i32 %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @get_item_class_name.name, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @get_item_class_name.name, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  int i = 1;
  char *p = (char *)&i;
  puts(*p ? "LittleEndian" : "BigEndian");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
lea    0xed1(%rip),%rdi
lea    0xebd(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"LittleEndian\00"
@.str.1 = [10 x i8] c"BigEndian\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
store i32 0, i32* %1
store i32 1, i32* %2
%4 = bitcast i32* %2 to i8*
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0)
%11 = call i32 @puts(i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"LittleEndian\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(
      stderr, "usage: rcp [-46p] f1 f2; or: rcp [-46pr] f1 ... fn directory\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"usage: rcp [-46p] f1 f2; or: rcp [-46pr] f1 ... fn directory\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"usage: rcp [-46p] f1 f2; or: rcp [-46pr] f1 ... fn directory\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int, int /*<<< orphan*/, int, int, int, int, int,
                       int, int, int, int, double);
int main() {
  foo(100, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0.5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x64,%edi
mov    $0x1,%ecx
xor    %edx,%edx
mov    $0x2,%r8d
mov    $0x3,%r9d
movsd  0xec1(%rip),%xmm0
mov    %ecx,%esi
movl   $0x4,(%rsp)
movl   $0x5,0x8(%rsp)
movl   $0x6,0x10(%rsp)
movl   $0x7,0x18(%rsp)
movl   $0x8,0x20(%rsp)
movl   $0x9,0x28(%rsp)
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
mov    $0x64,%edi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x1,%ecx
mov    $0x2,%r8d
mov    $0x3,%r9d
push   $0x9
push   $0x8
push   $0x7
push   $0x6
push   $0x5
push   $0x4
call   1030 <foo@plt>
add    $0x30,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 100, i32 1, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, double 5.000000e-01)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 100, i32 1, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, double 5.000000e-01)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SIZE_MAX;
int /*<<< orphan*/ UINT64_MAX;
void main() {
  (void)SIZE_MAX;
  (void)UINT64_MAX;
}


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

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

LLVM IR (-O0):
@SIZE_MAX = global i32 0
@UINT64_MAX = global i32 0
define void @main() {
%1 = load i32, i32* @SIZE_MAX
%2 = load i32, i32* @UINT64_MAX
ret void
}

LLVM IR (-O2):
@SIZE_MAX = global i32 0
@UINT64_MAX = global i32 0
define void @main() {
ret void
}
void g_value_array_new() {}


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

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

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

LLVM IR (-O2):
define void @g_value_array_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IPPROTO_IP;
int IPTOS_THROUGHPUT;
int /*<<< orphan*/ IP_TOS;
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, int *, int);
int iptos_throughput(int socket) {
  int tos = IPTOS_THROUGHPUT;
  return setsockopt(socket, IPPROTO_IP, IP_TOS, &tos, sizeof(int));
}


x86 assembly (clang, -O0):
<iptos_throughput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iptos_throughput>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rcx
ret

LLVM IR (-O0):
@IPTOS_THROUGHPUT = global i32 0
@IPPROTO_IP = global i32 0
@IP_TOS = global i32 0
define i32 @iptos_throughput(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @IPTOS_THROUGHPUT
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* @IPPROTO_IP
%7 = load i32, i32* @IP_TOS
%8 = call i32 @setsockopt(i32 %5, i32 %6, i32 %7, i32* %3, i32 4)
ret i32 %8
}

LLVM IR (-O2):
@IPTOS_THROUGHPUT = global i32 0
@IPPROTO_IP = global i32 0
@IP_TOS = global i32 0
define i32 @iptos_throughput(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @IPTOS_THROUGHPUT
store i32 %4, i32* %2
%5 = load i32, i32* @IPPROTO_IP
%6 = load i32, i32* @IP_TOS
%7 = call i32 @setsockopt(i32 %0, i32 %5, i32 %6, i32* %2, i32 4)
ret i32 %7
}
void enable_interrupts() { __asm__ __volatile__("sti" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @enable_interrupts() {
tail call void asm sideeffect "sti", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __REGISTER_RTX_ENTRY__();
int /*<<< orphan*/ __RTX_ENTRY__();
int main(void) {
  __REGISTER_RTX_ENTRY__();
  __RTX_ENTRY__();
  while (1) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__REGISTER_RTX_ENTRY__@plt>
mov    $0x0,%al
call   1040 <__RTX_ENTRY__@plt>
jmp    113d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__REGISTER_RTX_ENTRY__@plt>
xor    %eax,%eax
call   1040 <__RTX_ENTRY__@plt>
nop
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @__REGISTER_RTX_ENTRY__()
%3 = call i32 (...) @__RTX_ENTRY__()
br label %4
4: ; preds = %0, %4
br label %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__REGISTER_RTX_ENTRY__()
%2 = tail call i32 (...) @__RTX_ENTRY__()
br label %3
3: ; preds = %0, %3
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ init();
int x_ioctl(int, int, void *);
int v4l2_ioctl(int fd, int id, void *param) {
  init();
  return x_ioctl(fd, id, param);
}


x86 assembly (clang, -O0):
<v4l2_ioctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    $0x0,%al
call   1040 <init@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <x_ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v4l2_ioctl>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <init@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <x_ioctl@plt>

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

LLVM IR (-O2):
define i32 @v4l2_ioctl(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 (...) @init()
%5 = tail call i32 @x_ioctl(i32 %0, i32 %1, i8* %2)
ret i32 %5
}
int write(__attribute__((unused)) int fd,
          __attribute__((unused)) const char *buf, int len) {
  return len;
}


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @write(i32 %0, i8* nocapture readnone %1, i32 returned %2) {
ret i32 %2
}
/* Variables and functions */
int snoopy_outputregistry_dispatch(char *, int);
scalar_t__ strlen(char *);
int snoopy_log_dispatch(char *logMessage, int errorOrMessage) {
  if (0 == strlen(logMessage)) {
    return 0;
  }
  return snoopy_outputregistry_dispatch(logMessage, errorOrMessage);
}


x86 assembly (clang, -O0):
<snoopy_log_dispatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1152 <snoopy_log_dispatch+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1161 <snoopy_log_dispatch+0x41>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <snoopy_outputregistry_dispatch@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<snoopy_log_dispatch>:
cmpb   $0x0,(%rdi)
je     111a <snoopy_log_dispatch+0xa>
jmp    1030 <snoopy_outputregistry_dispatch@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @snoopy_log_dispatch(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @snoopy_outputregistry_dispatch(i8* %0, i32 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ 0, %2 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ __uint32_t;

/* Variables and functions */
int find_lev_passwd(char *, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ set_acckey(int /*<<< orphan*/);
int check_lev_passwd(char *passwd) {
  __uint32_t keylev, codlev;
  int nlev;
  nlev = find_lev_passwd(passwd, &keylev, &codlev);
  if (nlev > 0)
    set_acckey(keylev);
  return (nlev);
}


x86 assembly (clang, -O0):
<check_lev_passwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <find_lev_passwd@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1152 <check_lev_passwd+0x32>
mov    -0xc(%rbp),%edi
call   1030 <set_acckey@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_lev_passwd>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1040 <find_lev_passwd@plt>
mov    %eax,%ebx
test   %eax,%eax
jle    1143 <check_lev_passwd+0x23>
mov    0x8(%rsp),%edi
call   1030 <set_acckey@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @check_lev_passwd(i8* %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @find_lev_passwd(i8* %0, i32* %2, i32* %3)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 @set_acckey(i32 %9)
br label %11
11: ; preds = %8, %1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void drmp3__free_default(void *p, void *pUserData) {
  (void)pUserData;
  free((p));
}


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

x86 assembly (clang, -O2):
<drmp3__free_default>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @drmp3__free_default(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct battle_char {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ charge_generic(struct battle_char *, struct battle_char *,
                                  int);
void charge2(struct battle_char *origin, struct battle_char *target) {
  charge_generic(origin, target, 2);
}


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

x86 assembly (clang, -O2):
<charge2>:
mov    $0x2,%edx
jmp    1030 <charge_generic@plt>

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

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define void @charge2(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = tail call i32 @charge_generic(%struct.battle_char* %0, %struct.battle_char* %1, i32 2)
ret void
}
/* Variables and functions */
int dep(int);
int fun() { return dep(1000) + 1; }


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3e8,%edi
call   1030 <dep@plt>
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
push   %rax
mov    $0x3e8,%edi
call   1030 <dep@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fun() {
%1 = call i32 @dep(i32 1000)
%2 = add nsw i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @fun() {
%1 = tail call i32 @dep(i32 1000)
%2 = add nsw i32 %1, 1
ret i32 %2
}
void potrf_tile(int NB, double (*A)[NB * NB]) {}


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

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

LLVM IR (-O0):
define void @potrf_tile(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
store i32 %0, i32* %3
store double* %1, double** %4
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = mul nsw i32 %5, %6
%8 = zext i32 %7 to i64
ret void
}

LLVM IR (-O2):
define void @potrf_tile(i32 %0, double* nocapture %1) {
ret void
}
/* Type definitions */
struct in6_addr {
  int dummy;
};

/* Variables and functions */
int memcmp(struct in6_addr const *, struct in6_addr const *, int);
__attribute__((always_)) int ip6cmp(const struct in6_addr *a,
                                    const struct in6_addr *b) {
  return memcmp(a, b, sizeof(*a));
}


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

x86 assembly (clang, -O2):
<ip6cmp>:
mov    $0x4,%edx
jmp    1030 <memcmp@plt>

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

LLVM IR (-O2):
%struct.in6_addr = type { i32 }
define i32 @ip6cmp(%struct.in6_addr* %0, %struct.in6_addr* %1) {
%3 = tail call i32 @memcmp(%struct.in6_addr* %0, %struct.in6_addr* %1, i32 4)
ret i32 %3
}