long dummy_func(long double a1, char b1, long double a2, char b2,
                long double a3, char b3, long double a4, char b4) {
  return a1 + b1 + a2 + b2 + a3 + b3 + a4 + b4;
}


x86 assembly (clang, -O0):
<dummy_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
fldt   0x40(%rbp)
fldt   0x30(%rbp)
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %sil,-0x11(%rbp)
fstpt  -0x30(%rbp)
mov    %dl,-0x31(%rbp)
fstpt  -0x50(%rbp)
mov    %cl,-0x51(%rbp)
fstpt  -0x70(%rbp)
mov    %al,-0x71(%rbp)
fldt   -0x10(%rbp)
movsbl -0x11(%rbp),%eax
mov    %eax,-0x90(%rbp)
fildl  -0x90(%rbp)
faddp  %st,%st(1)
fldt   -0x30(%rbp)
faddp  %st,%st(1)
movsbl -0x31(%rbp),%eax
mov    %eax,-0x8c(%rbp)
fildl  -0x8c(%rbp)
faddp  %st,%st(1)
fldt   -0x50(%rbp)
faddp  %st,%st(1)
movsbl -0x51(%rbp),%eax
mov    %eax,-0x88(%rbp)
fildl  -0x88(%rbp)
faddp  %st,%st(1)
fldt   -0x70(%rbp)
faddp  %st,%st(1)
movsbl -0x71(%rbp),%eax
mov    %eax,-0x84(%rbp)
fildl  -0x84(%rbp)
faddp  %st,%st(1)
fnstcw -0x92(%rbp)
movzwl -0x92(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x94(%rbp)
fldcw  -0x94(%rbp)
fistpll -0x80(%rbp)
fldcw  -0x92(%rbp)
mov    -0x80(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummy_func>:
fldt   0x38(%rsp)
fldt   0x28(%rsp)
fldt   0x18(%rsp)
fldt   0x8(%rsp)
mov    %di,-0xa(%rsp)
fiadds -0xa(%rsp)
faddp  %st,%st(1)
mov    %si,-0xc(%rsp)
fiadds -0xc(%rsp)
faddp  %st,%st(1)
mov    %dx,-0xe(%rsp)
fiadds -0xe(%rsp)
faddp  %st,%st(1)
mov    %cx,-0x10(%rsp)
fiadds -0x10(%rsp)
fnstcw -0x14(%rsp)
movzwl -0x14(%rsp),%eax
or     $0xc00,%eax
mov    %ax,-0x12(%rsp)
fldcw  -0x12(%rsp)
fistpll -0x8(%rsp)
fldcw  -0x14(%rsp)
mov    -0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @dummy_func(x86_fp80 %0, i8 signext %1, x86_fp80 %2, i8 signext %3, x86_fp80 %4, i8 signext %5, x86_fp80 %6, i8 signext %7) {
%9 = alloca x86_fp80
%10 = alloca i8
%11 = alloca x86_fp80
%12 = alloca i8
%13 = alloca x86_fp80
%14 = alloca i8
%15 = alloca x86_fp80
%16 = alloca i8
store x86_fp80 %0, x86_fp80* %9
store i8 %1, i8* %10
store x86_fp80 %2, x86_fp80* %11
store i8 %3, i8* %12
store x86_fp80 %4, x86_fp80* %13
store i8 %5, i8* %14
store x86_fp80 %6, x86_fp80* %15
store i8 %7, i8* %16
%17 = load x86_fp80, x86_fp80* %9
%18 = load i8, i8* %10
%19 = sext i8 %18 to i32
%20 = sitofp i32 %19 to x86_fp80
%21 = fadd x86_fp80 %17, %20
%22 = load x86_fp80, x86_fp80* %11
%23 = fadd x86_fp80 %21, %22
%24 = load i8, i8* %12
%25 = sext i8 %24 to i32
%26 = sitofp i32 %25 to x86_fp80
%27 = fadd x86_fp80 %23, %26
%28 = load x86_fp80, x86_fp80* %13
%29 = fadd x86_fp80 %27, %28
%30 = load i8, i8* %14
%31 = sext i8 %30 to i32
%32 = sitofp i32 %31 to x86_fp80
%33 = fadd x86_fp80 %29, %32
%34 = load x86_fp80, x86_fp80* %15
%35 = fadd x86_fp80 %33, %34
%36 = load i8, i8* %16
%37 = sext i8 %36 to i32
%38 = sitofp i32 %37 to x86_fp80
%39 = fadd x86_fp80 %35, %38
%40 = fptosi x86_fp80 %39 to i64
ret i64 %40
}

LLVM IR (-O2):
define i64 @dummy_func(x86_fp80 %0, i8 signext %1, x86_fp80 %2, i8 signext %3, x86_fp80 %4, i8 signext %5, x86_fp80 %6, i8 signext %7) {
%9 = sitofp i8 %1 to x86_fp80
%10 = fadd x86_fp80 %9, %0
%11 = fadd x86_fp80 %10, %2
%12 = sitofp i8 %3 to x86_fp80
%13 = fadd x86_fp80 %11, %12
%14 = fadd x86_fp80 %13, %4
%15 = sitofp i8 %5 to x86_fp80
%16 = fadd x86_fp80 %14, %15
%17 = fadd x86_fp80 %16, %6
%18 = sitofp i8 %7 to x86_fp80
%19 = fadd x86_fp80 %17, %18
%20 = fptosi x86_fp80 %19 to i64
ret i64 %20
}