#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 */
typedef int /*<<< orphan*/ varf;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ test(int);
int /*<<< orphan*/ test2(double);
int main(void) {
  float varf = 123423.0;
  double vard = 234234234.0;
  int vari = 2;
  char varc = 1;
  short i = 1;
  printf("%lu\n", sizeof(varf));
  test(varf);
  test((double)(varf + vari + varc));
  printf("%lu\n", sizeof(varf));
  test(vari + varc);
  printf("%lu\n", sizeof(varf));
  test2(vard);
  printf("%Lf", 1.0F + 2.0L);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movsd  0xebc(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
movb   $0x1,-0x15(%rbp)
movw   $0x1,-0x18(%rbp)
lea    0xea7(%rip),%rdi
movss  0xe8b(%rip),%xmm0
call   1030 <printf@plt>
cvttss2si -0x8(%rbp),%edi
call   1050 <test@plt>
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0x14(%rbp),%xmm1
addss  %xmm1,%xmm0
movsbl -0x15(%rbp),%eax
cvtsi2ss %eax,%xmm1
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <test@plt>
lea    0xe62(%rip),%rdi
movss  0xe46(%rip),%xmm0
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
movsbl -0x15(%rbp),%eax
add    %eax,%edi
call   1050 <test@plt>
lea    0xe40(%rip),%rdi
movss  0xe24(%rip),%xmm0
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
call   1040 <test2@plt>
lea    0xe27(%rip),%rdi
movss  0xe02(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
movss  0xec0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x1e21f,%edi
call   1050 <test@plt>
mov    $0x1e222,%edi
call   1050 <test@plt>
mov    %rbx,%rdi
movss  0xe99(%rip),%xmm0
call   1030 <printf@plt>
mov    $0x3,%edi
call   1050 <test@plt>
mov    %rbx,%rdi
movss  0xe7f(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xe7a(%rip),%xmm0
call   1040 <test2@plt>
lea    0xe7b(%rip),%rdi
movss  0xe62(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lu\0A\00"
@.str.1 = [4 x i8] c"%Lf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca double
%4 = alloca i32
%5 = alloca i8
%6 = alloca i16
store i32 0, i32* %1
store float 1.234230e+05, float* %2
store double 0x41ABEC42F4000000, double* %3
store i32 2, i32* %4
store i8 1, i8* %5
store i16 1, i16* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 4.000000e+00)
%8 = load float, float* %2
%9 = fptosi float %8 to i32
%10 = call i32 @test(i32 %9)
%11 = load float, float* %2
%12 = load i32, i32* %4
%13 = sitofp i32 %12 to float
%14 = fadd float %11, %13
%15 = load i8, i8* %5
%16 = sext i8 %15 to i32
%17 = sitofp i32 %16 to float
%18 = fadd float %14, %17
%19 = fpext float %18 to double
%20 = fptosi double %19 to i32
%21 = call i32 @test(i32 %20)
%22 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 4.000000e+00)
%23 = load i32, i32* %4
%24 = load i8, i8* %5
%25 = sext i8 %24 to i32
%26 = add nsw i32 %23, %25
%27 = call i32 @test(i32 %26)
%28 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 4.000000e+00)
%29 = load double, double* %3
%30 = call i32 @test2(double %29)
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float 3.000000e+00)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lu\0A\00"
@.str.1 = [4 x i8] c"%Lf\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 4.000000e+00)
%2 = tail call i32 @test(i32 123423)
%3 = tail call i32 @test(i32 123426)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 4.000000e+00)
%5 = tail call i32 @test(i32 3)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 4.000000e+00)
%7 = tail call i32 @test2(double 0x41ABEC42F4000000)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float 3.000000e+00)
ret i32 0
}