#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  double x, y;
  long int i, j, k;
  char letter, chain[] = "a quick fox\n";
  letter = 'B';
  y = 1.01;
  i = 2;
  printf("\n");
  printf("%lf %ld %c %s\n", y, i, letter, chain);
  j = 0;
  while (j++ < 31) {
    x = y * y;
    k = 2 * i;
    printf("%ld %lf %ld\n", j, x, i);
    y = x;
    i = k;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xee2(%rip),%rax
mov    %rax,-0x3e(%rbp)
mov    0xee0(%rip),%eax
mov    %eax,-0x36(%rbp)
mov    0xedb(%rip),%al
mov    %al,-0x32(%rbp)
movb   $0x42,-0x31(%rbp)
movsd  0xeb8(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movq   $0x2,-0x20(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
mov    -0x20(%rbp),%rsi
movsbl -0x31(%rbp),%edx
lea    -0x3e(%rbp),%rcx
lea    0xe9a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
cmp    $0x1f,%rax
jge    11f0 <main+0xe0>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x20(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rsi
movsd  -0x10(%rbp),%xmm0
mov    -0x20(%rbp),%rdx
lea    0xe52(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    118a <main+0x7a>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
movabs $0xa786f66206b63,%rax
mov    %rax,0xd(%rsp)
movabs $0x206b636975712061,%rax
63 6b 20
mov    %rax,0x8(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebb(%rip),%rdi
movsd  0xe9e(%rip),%xmm0
mov    $0x2,%r14d
lea    0x8(%rsp),%rcx
mov    $0x2,%esi
movsd  %xmm0,(%rsp)
mov    $0x42,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x1,%ebx
lea    0xe95(%rip),%r15
nop
movsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm0
lea    (%r14,%r14,1),%r12
mov    %r15,%rdi
mov    %rbx,%rsi
movsd  %xmm0,(%rsp)
mov    %r14,%rdx
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbx
mov    %r12,%r14
cmp    $0x20,%rbx
jne    1190 <main+0x70>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.chain = [13 x i8] c"a quick fox\0A\00"
@.str = [2 x i8] c"\0A\00"
@.str.1 = [15 x i8] c"%lf %ld %c %s\0A\00"
@.str.2 = [13 x i8] c"%ld %lf %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8
%8 = alloca [13 x i8]
store i32 0, i32* %1
%9 = bitcast [13 x i8]* %8 to i8*
store i8 66, i8* %7
store double 1.010000e+00, double* %3
store i64 2, i64* %4
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = load double, double* %3
%12 = load i64, i64* %4
%13 = load i8, i8* %7
%14 = sext i8 %13 to i32
%15 = getelementptr inbounds [13 x i8], [13 x i8]* %8, i64 0, i64 0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double %11, i64 %12, i32 %14, i8* %15)
store i64 0, i64* %5
br label %17
17: ; preds = %21, %0
%18 = load i64, i64* %5
%19 = add nsw i64 %18, 1
store i64 %19, i64* %5
%20 = icmp slt i64 %18, 31
br i1 %20, label %21, label %33
21: ; preds = %17
%22 = load double, double* %3
%23 = load double, double* %3
%24 = fmul double %22, %23
store double %24, double* %2
%25 = load i64, i64* %4
%26 = mul nsw i64 2, %25
store i64 %26, i64* %6
%27 = load i64, i64* %5
%28 = load double, double* %2
%29 = load i64, i64* %4
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i64 %27, double %28, i64 %29)
%31 = load double, double* %2
store double %31, double* %3
%32 = load i64, i64* %6
store i64 %32, i64* %4
br label %17
33: ; preds = %17
%34 = load i32, i32* %1
ret i32 %34
}

LLVM IR (-O2):
@__const.main.chain = [13 x i8] c"a quick fox\0A\00"
@.str.1 = [15 x i8] c"%lf %ld %c %s\0A\00"
@.str.2 = [13 x i8] c"%ld %lf %ld\0A\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @putchar(i32 10)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double 1.010000e+00, i64 2, i32 66, i8* %2)
br label %5
5: ; preds = %0, %5
%6 = phi i64 [ 1, %0 ], [ %12, %5 ]
%7 = phi double [ 1.010000e+00, %0 ], [ %9, %5 ]
%8 = phi i64 [ 2, %0 ], [ %10, %5 ]
%9 = fmul double %7, %7
%10 = shl nsw i64 %8, 1
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i64 %6, double %9, i64 %8)
%12 = add nuw nsw i64 %6, 1
%13 = icmp eq i64 %12, 32
br i1 %13, label %14, label %5
14: ; preds = %5
ret i32 0
}