#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*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, double, int, float);
int main(int argc, char *argv[]) {
  double a = 323.0;
  int b = 1;
  float c = 124.0f;
  printf("sizeof(a)=%d sizeof(short)=%d a=%g b=%d c=%g\n", sizeof(a),
         sizeof(short), (short)a, b, c);
  printf("sizeof(a)=%d sizeof(short)=%d a=%g b=%d c=%g\n", sizeof(a),
         sizeof(short), a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movabs $0x4074300000000000,%rax
30 74 40
mov    %rax,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x42f80000,-0x20(%rbp)
cvttsd2si -0x18(%rbp),%eax
cwtl
cvtsi2sd %eax,%xmm0
mov    -0x1c(%rbp),%ecx
movss  -0x20(%rbp),%xmm1
lea    0xea5(%rip),%rdi
mov    $0x8,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
mov    -0x1c(%rbp),%ecx
movss  -0x20(%rbp),%xmm1
lea    0xe82(%rip),%rdi
mov    $0x8,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef4(%rip),%rbx
movsd  0xee0(%rip),%xmm0
movss  0xee0(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x2,%edx
movsd  0xeac(%rip),%xmm0
mov    $0x1,%ecx
movss  0xea7(%rip),%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"sizeof(a)=%d sizeof(short)=%d a=%g b=%d c=%g\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca i32
%8 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 3.230000e+02, double* %6
store i32 1, i32* %7
store float 1.240000e+02, float* %8
%9 = load double, double* %6
%10 = fptosi double %9 to i16
%11 = sitofp i16 %10 to double
%12 = load i32, i32* %7
%13 = load float, float* %8
%14 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 8, i32 2, double %11, i32 %12, float %13)
%15 = load double, double* %6
%16 = load i32, i32* %7
%17 = load float, float* %8
%18 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 8, i32 2, double %15, i32 %16, float %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [46 x i8] c"sizeof(a)=%d sizeof(short)=%d a=%g b=%d c=%g\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 8, i32 2, double 3.230000e+02, i32 1, float 1.240000e+02)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 8, i32 2, double 3.230000e+02, i32 1, float 1.240000e+02)
ret i32 0
}