#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 */
double acos(int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  float Co = 3.141592653589793;
  double F = acos(-1);
  float Zu = 3.1415929203539825;
  printf("Hello world!\n");
  printf("Co = %.2f\n", Co);
  printf("F = %.10f\n", F);
  printf("Zu = %.6f\n", Zu);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xecd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    $0xffffffff,%edi
call   1040 <acos@plt>
movsd  %xmm0,-0x10(%rbp)
movss  0xead(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xe98(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffffff,%edi
call   1050 <acos@plt>
movsd  %xmm0,(%rsp)
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
lea    0xebd(%rip),%rdi
movsd  0xea5(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xeb2(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xeaa(%rip),%rdi
movsd  0xe84(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world!\0A\00"
@.str.1 = [11 x i8] c"Co = %.2f\0A\00"
@.str.2 = [11 x i8] c"F = %.10f\0A\00"
@.str.3 = [11 x i8] c"Zu = %.6f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca double
%4 = alloca float
store i32 0, i32* %1
store float 0x400921FB60000000, float* %2
%5 = call double @acos(i32 -1)
store double %5, double* %3
store float 0x400921FB80000000, float* %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), double %8)
%10 = load double, double* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double %10)
%12 = load float, float* %4
%13 = fpext float %12 to double
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), double %13)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"Co = %.2f\0A\00"
@.str.2 = [11 x i8] c"F = %.10f\0A\00"
@.str.3 = [11 x i8] c"Zu = %.6f\0A\00"
@str = [13 x i8] c"Hello world!\00"
define i32 @main() {
%1 = tail call double @acos(i32 -1)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), double 0x400921FB60000000)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double %1)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), double 0x400921FB80000000)
ret i32 0
}