int function3(long double a, float b, double c, int d, short int e, float f,
              float g, float h, double i, long double j) {
  return a + b + c + d + e + f + g + h + i + j;
}


x86 assembly (clang, -O0):
<function3>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %edi,-0x24(%rbp)
mov    %ax,-0x26(%rbp)
movss  %xmm2,-0x2c(%rbp)
movss  %xmm3,-0x30(%rbp)
movss  %xmm4,-0x34(%rbp)
movsd  %xmm5,-0x40(%rbp)
fstpt  -0x50(%rbp)
fldt   -0x10(%rbp)
flds   -0x14(%rbp)
faddp  %st,%st(1)
fldl   -0x20(%rbp)
faddp  %st,%st(1)
mov    -0x24(%rbp),%eax
mov    %eax,-0x58(%rbp)
fildl  -0x58(%rbp)
faddp  %st,%st(1)
movswl -0x26(%rbp),%eax
mov    %eax,-0x5c(%rbp)
fildl  -0x5c(%rbp)
faddp  %st,%st(1)
flds   -0x2c(%rbp)
faddp  %st,%st(1)
flds   -0x30(%rbp)
faddp  %st,%st(1)
flds   -0x34(%rbp)
faddp  %st,%st(1)
fldl   -0x40(%rbp)
faddp  %st,%st(1)
fldt   -0x50(%rbp)
faddp  %st,%st(1)
fnstcw -0x5e(%rbp)
movzwl -0x5e(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x60(%rbp)
fldcw  -0x60(%rbp)
fistpl -0x54(%rbp)
fldcw  -0x5e(%rbp)
mov    -0x54(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<function3>:
fldt   0x8(%rsp)
movss  %xmm0,-0x1c(%rsp)
fadds  -0x1c(%rsp)
movsd  %xmm1,-0x8(%rsp)
faddl  -0x8(%rsp)
mov    %edi,-0x18(%rsp)
fiaddl -0x18(%rsp)
mov    %si,-0x2a(%rsp)
fiadds -0x2a(%rsp)
movss  %xmm2,-0x20(%rsp)
fadds  -0x20(%rsp)
movss  %xmm3,-0x24(%rsp)
fadds  -0x24(%rsp)
fldt   0x18(%rsp)
movss  %xmm4,-0x28(%rsp)
fxch   %st(1)
fadds  -0x28(%rsp)
movsd  %xmm5,-0x10(%rsp)
faddl  -0x10(%rsp)
faddp  %st,%st(1)
fnstcw -0x2e(%rsp)
movzwl -0x2e(%rsp),%eax
or     $0xc00,%eax
mov    %ax,-0x2c(%rsp)
fldcw  -0x2c(%rsp)
fistpl -0x14(%rsp)
fldcw  -0x2e(%rsp)
mov    -0x14(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @function3(x86_fp80 %0, float %1, double %2, i32 %3, i16 signext %4, float %5, float %6, float %7, double %8, x86_fp80 %9) {
%11 = alloca x86_fp80
%12 = alloca float
%13 = alloca double
%14 = alloca i32
%15 = alloca i16
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca double
%20 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %11
store float %1, float* %12
store double %2, double* %13
store i32 %3, i32* %14
store i16 %4, i16* %15
store float %5, float* %16
store float %6, float* %17
store float %7, float* %18
store double %8, double* %19
store x86_fp80 %9, x86_fp80* %20
%21 = load x86_fp80, x86_fp80* %11
%22 = load float, float* %12
%23 = fpext float %22 to x86_fp80
%24 = fadd x86_fp80 %21, %23
%25 = load double, double* %13
%26 = fpext double %25 to x86_fp80
%27 = fadd x86_fp80 %24, %26
%28 = load i32, i32* %14
%29 = sitofp i32 %28 to x86_fp80
%30 = fadd x86_fp80 %27, %29
%31 = load i16, i16* %15
%32 = sext i16 %31 to i32
%33 = sitofp i32 %32 to x86_fp80
%34 = fadd x86_fp80 %30, %33
%35 = load float, float* %16
%36 = fpext float %35 to x86_fp80
%37 = fadd x86_fp80 %34, %36
%38 = load float, float* %17
%39 = fpext float %38 to x86_fp80
%40 = fadd x86_fp80 %37, %39
%41 = load float, float* %18
%42 = fpext float %41 to x86_fp80
%43 = fadd x86_fp80 %40, %42
%44 = load double, double* %19
%45 = fpext double %44 to x86_fp80
%46 = fadd x86_fp80 %43, %45
%47 = load x86_fp80, x86_fp80* %20
%48 = fadd x86_fp80 %46, %47
%49 = fptosi x86_fp80 %48 to i32
ret i32 %49
}

LLVM IR (-O2):
define i32 @function3(x86_fp80 %0, float %1, double %2, i32 %3, i16 signext %4, float %5, float %6, float %7, double %8, x86_fp80 %9) {
%11 = fpext float %1 to x86_fp80
%12 = fadd x86_fp80 %11, %0
%13 = fpext double %2 to x86_fp80
%14 = fadd x86_fp80 %12, %13
%15 = sitofp i32 %3 to x86_fp80
%16 = fadd x86_fp80 %14, %15
%17 = sitofp i16 %4 to x86_fp80
%18 = fadd x86_fp80 %16, %17
%19 = fpext float %5 to x86_fp80
%20 = fadd x86_fp80 %18, %19
%21 = fpext float %6 to x86_fp80
%22 = fadd x86_fp80 %20, %21
%23 = fpext float %7 to x86_fp80
%24 = fadd x86_fp80 %22, %23
%25 = fpext double %8 to x86_fp80
%26 = fadd x86_fp80 %24, %25
%27 = fadd x86_fp80 %26, %9
%28 = fptosi x86_fp80 %27 to i32
ret i32 %28
}