#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*/ charfunc(double);
int /*<<< orphan*/ floatfunc(double);
int /*<<< orphan*/ intfunc(double);
int /*<<< orphan*/ printf(char *, float, float);
int main() {
  charfunc('a');
  charfunc(98);
  charfunc(99.0);
  intfunc('a');
  intfunc(98);
  intfunc(99.0);
  floatfunc('a');
  floatfunc(98);
  floatfunc(99.0);
  char b = 97;
  char c = 97.0;
  printf("%d %d\n", b, c);
  int d = 'a';
  int e = 97.0;
  printf("%d %d\n", d, e);
  float f = 'a';
  float g = 97;
  printf("%f %f\n", f, g);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb1(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
call   1040 <charfunc@plt>
movsd  0xea7(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
call   1040 <charfunc@plt>
movsd  0xe9d(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
call   1040 <charfunc@plt>
movsd  -0x30(%rbp),%xmm0
call   1030 <intfunc@plt>
movsd  -0x28(%rbp),%xmm0
call   1030 <intfunc@plt>
movsd  -0x20(%rbp),%xmm0
call   1030 <intfunc@plt>
movsd  -0x30(%rbp),%xmm0
call   1060 <floatfunc@plt>
movsd  -0x28(%rbp),%xmm0
call   1060 <floatfunc@plt>
movsd  -0x20(%rbp),%xmm0
call   1060 <floatfunc@plt>
movb   $0x61,-0x5(%rbp)
movb   $0x61,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
cvtsi2ss %eax,%xmm0
movsbl -0x6(%rbp),%eax
cvtsi2ss %eax,%xmm1
lea    0xe40(%rip),%rdi
call   1050 <printf@plt>
movl   $0x61,-0xc(%rbp)
movl   $0x61,-0x10(%rbp)
cvtsi2ssl -0xc(%rbp),%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
lea    0xe1c(%rip),%rdi
call   1050 <printf@plt>
movss  0xdef(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xde2(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
lea    0xdf3(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xeb7(%rip),%xmm0
call   1040 <charfunc@plt>
movsd  0xeb2(%rip),%xmm0
call   1040 <charfunc@plt>
movsd  0xead(%rip),%xmm0
call   1040 <charfunc@plt>
movsd  0xe90(%rip),%xmm0
call   1030 <intfunc@plt>
movsd  0xe8b(%rip),%xmm0
call   1030 <intfunc@plt>
movsd  0xe86(%rip),%xmm0
call   1030 <intfunc@plt>
movsd  0xe69(%rip),%xmm0
call   1060 <floatfunc@plt>
movsd  0xe64(%rip),%xmm0
call   1060 <floatfunc@plt>
movsd  0xe5f(%rip),%xmm0
call   1060 <floatfunc@plt>
lea    0xe5f(%rip),%rbx
movss  0xe53(%rip),%xmm0
mov    %rbx,%rdi
movaps %xmm0,%xmm1
call   1050 <printf@plt>
mov    %rbx,%rdi
movss  0xe3d(%rip),%xmm0
movaps %xmm0,%xmm1
call   1050 <printf@plt>
lea    0xe39(%rip),%rdi
movss  0xe26(%rip),%xmm0
movaps %xmm0,%xmm1
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d %d\0A\00"
@.str.1 = [7 x i8] c"%f %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
%7 = alloca float
store i32 0, i32* %1
%8 = call i32 @charfunc(double 9.700000e+01)
%9 = call i32 @charfunc(double 9.800000e+01)
%10 = call i32 @charfunc(double 9.900000e+01)
%11 = call i32 @intfunc(double 9.700000e+01)
%12 = call i32 @intfunc(double 9.800000e+01)
%13 = call i32 @intfunc(double 9.900000e+01)
%14 = call i32 @floatfunc(double 9.700000e+01)
%15 = call i32 @floatfunc(double 9.800000e+01)
%16 = call i32 @floatfunc(double 9.900000e+01)
store i8 97, i8* %2
store i8 97, i8* %3
%17 = load i8, i8* %2
%18 = sitofp i8 %17 to float
%19 = load i8, i8* %3
%20 = sitofp i8 %19 to float
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float %18, float %20)
store i32 97, i32* %4
store i32 97, i32* %5
%22 = load i32, i32* %4
%23 = sitofp i32 %22 to float
%24 = load i32, i32* %5
%25 = sitofp i32 %24 to float
%26 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float %23, float %25)
store float 9.700000e+01, float* %6
store float 9.700000e+01, float* %7
%27 = load float, float* %6
%28 = load float, float* %7
%29 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float %27, float %28)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
@.str.1 = [7 x i8] c"%f %f\0A\00"
define i32 @main() {
%1 = tail call i32 @charfunc(double 9.700000e+01)
%2 = tail call i32 @charfunc(double 9.800000e+01)
%3 = tail call i32 @charfunc(double 9.900000e+01)
%4 = tail call i32 @intfunc(double 9.700000e+01)
%5 = tail call i32 @intfunc(double 9.800000e+01)
%6 = tail call i32 @intfunc(double 9.900000e+01)
%7 = tail call i32 @floatfunc(double 9.700000e+01)
%8 = tail call i32 @floatfunc(double 9.800000e+01)
%9 = tail call i32 @floatfunc(double 9.900000e+01)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float 9.700000e+01, float 9.700000e+01)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float 9.700000e+01, float 9.700000e+01)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float 9.700000e+01, float 9.700000e+01)
ret i32 0
}