int f(int x, char c, float f, double d, char *s) {
  x = square(x);
  c = square(c);
  square(f);
  square(d);
  square(s);
  return (square(d));
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movss  %xmm0,-0xc(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <square@plt>
mov    %eax,-0x4(%rbp)
movsbl -0x5(%rbp),%edi
mov    $0x0,%al
call   1030 <square@plt>
mov    %al,-0x5(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <square@plt>
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1030 <square@plt>
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1030 <square@plt>
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1030 <square@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%rbx
movsd  %xmm1,0x10(%rsp)
movss  %xmm0,0xc(%rsp)
mov    %esi,%ebp
xor    %eax,%eax
call   1030 <square@plt>
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <square@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <square@plt>
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1030 <square@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <square@plt>
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
add    $0x18,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <square@plt>

LLVM IR (-O0):
define i32 @f(i32 %0, i8 signext %1, float %2, double %3, i8* %4) {
%6 = alloca i32
%7 = alloca i8
%8 = alloca float
%9 = alloca double
%10 = alloca i8*
store i32 %0, i32* %6
store i8 %1, i8* %7
store float %2, float* %8
store double %3, double* %9
store i8* %4, i8** %10
%11 = load i32, i32* %6
%12 = call i32 (i32, ...) bitcast (i32 (...)* @square to i32 (i32, ...)*)(i32 %11)
store i32 %12, i32* %6
%13 = load i8, i8* %7
%14 = sext i8 %13 to i32
%15 = call i32 (i32, ...) bitcast (i32 (...)* @square to i32 (i32, ...)*)(i32 %14)
%16 = trunc i32 %15 to i8
store i8 %16, i8* %7
%17 = load float, float* %8
%18 = fpext float %17 to double
%19 = call i32 (double, ...) bitcast (i32 (...)* @square to i32 (double, ...)*)(double %18)
%20 = load double, double* %9
%21 = call i32 (double, ...) bitcast (i32 (...)* @square to i32 (double, ...)*)(double %20)
%22 = load i8*, i8** %10
%23 = call i32 (i8*, ...) bitcast (i32 (...)* @square to i32 (i8*, ...)*)(i8* %22)
%24 = load double, double* %9
%25 = call i32 (double, ...) bitcast (i32 (...)* @square to i32 (double, ...)*)(double %24)
ret i32 %25
}

LLVM IR (-O2):
define i32 @f(i32 %0, i8 signext %1, float %2, double %3, i8* %4) {
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @square to i32 (i32, ...)*)(i32 %0)
%7 = sext i8 %1 to i32
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @square to i32 (i32, ...)*)(i32 %7)
%9 = fpext float %2 to double
%10 = tail call i32 (double, ...) bitcast (i32 (...)* @square to i32 (double, ...)*)(double %9)
%11 = tail call i32 (double, ...) bitcast (i32 (...)* @square to i32 (double, ...)*)(double %3)
%12 = tail call i32 (i8*, ...) bitcast (i32 (...)* @square to i32 (i8*, ...)*)(i8* %4)
%13 = tail call i32 (double, ...) bitcast (i32 (...)* @square to i32 (double, ...)*)(double %3)
ret i32 %13
}