long double f_va_3(char *fmt, ...) {
  __builtin_va_list va;
  __builtin_va_start(va, fmt);
  long double v = __builtin_va_arg(va, long double);
  int w = __builtin_va_arg(va, int);
  long double x = __builtin_va_arg(va, long double);
  __builtin_va_end(va);
  return v + x;
}


x86 assembly (clang, -O0):
<f_va_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
test   %al,%al
je     1142 <f_va_3+0x42>
movaps %xmm0,-0xd0(%rbp)
movaps %xmm1,-0xc0(%rbp)
movaps %xmm2,-0xb0(%rbp)
movaps %xmm3,-0xa0(%rbp)
movaps %xmm4,-0x90(%rbp)
movaps %xmm5,-0x80(%rbp)
movaps %xmm6,-0x70(%rbp)
movaps %xmm7,-0x60(%rbp)
mov    %r9,-0xd8(%rbp)
mov    %r8,-0xe0(%rbp)
mov    %rcx,-0xe8(%rbp)
mov    %rdx,-0xf0(%rbp)
mov    %rsi,-0xf8(%rbp)
mov    %rdi,-0x8(%rbp)
lea    -0x100(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x30,-0x1c(%rbp)
movl   $0x8,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
mov    %rax,%rcx
add    $0x10,%rcx
mov    %rcx,-0x18(%rbp)
fldt   (%rax)
fstpt  -0x30(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x110(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x104(%rbp)
cmp    $0x28,%eax
ja     11e8 <f_va_3+0xe8>
mov    -0x110(%rbp),%rcx
mov    -0x104(%rbp),%edx
movslq %edx,%rax
add    0x10(%rcx),%rax
add    $0x8,%edx
mov    %edx,(%rcx)
mov    %rax,-0x118(%rbp)
jmp    1205 <f_va_3+0x105>
mov    -0x110(%rbp),%rcx
mov    0x8(%rcx),%rdx
mov    %rdx,%rax
add    $0x8,%rdx
mov    %rdx,0x8(%rcx)
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
mov    %rax,%rcx
add    $0x10,%rcx
mov    %rcx,-0x18(%rbp)
fldt   (%rax)
fstpt  -0x50(%rbp)
fldt   -0x30(%rbp)
fldt   -0x50(%rbp)
faddp  %st,%st(1)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_va_3>:
sub    $0x58,%rsp
mov    %rsi,-0x58(%rsp)
mov    %rdx,-0x50(%rsp)
mov    %rcx,-0x48(%rsp)
mov    %r8,-0x40(%rsp)
mov    %r9,-0x38(%rsp)
test   %al,%al
je     1148 <f_va_3+0x48>
movaps %xmm0,-0x30(%rsp)
movaps %xmm1,-0x20(%rsp)
movaps %xmm2,-0x10(%rsp)
movaps %xmm3,(%rsp)
movaps %xmm4,0x10(%rsp)
movaps %xmm5,0x20(%rsp)
movaps %xmm6,0x30(%rsp)
movaps %xmm7,0x40(%rsp)
lea    -0x60(%rsp),%rax
mov    %rax,-0x70(%rsp)
movabs $0x3000000008,%rax
mov    %rax,-0x80(%rsp)
lea    0x70(%rsp),%rax
mov    %rax,-0x78(%rsp)
fldt   0x60(%rsp)
mov    $0x8,%ecx
cmp    $0x28,%ecx
ja     1182 <f_va_3+0x82>
add    $0x8,%ecx
mov    %ecx,-0x80(%rsp)
jmp    118b <f_va_3+0x8b>
lea    0x60(%rsp),%rax
add    $0x18,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
lea    0x10(%rax),%rcx
mov    %rcx,-0x78(%rsp)
fldt   (%rax)
faddp  %st,%st(1)
add    $0x58,%rsp
ret

LLVM IR (-O0):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define x86_fp80 @f_va_3(i8* %0, ...) {
%2 = alloca i8*
%3 = alloca [1 x %struct.__va_list_tag]
%4 = alloca x86_fp80
%5 = alloca i32
%6 = alloca x86_fp80
store i8* %0, i8** %2
%7 = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %3, i64 0, i64 0
%8 = bitcast %struct.__va_list_tag* %7 to i8*
%9 = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %3, i64 0, i64 0
%10 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %9, i32 0, i32 2
%11 = load i8*, i8** %10
%12 = ptrtoint i8* %11 to i64
%13 = add i64 %12, 15
%14 = and i64 %13, -16
%15 = inttoptr i64 %14 to i8*
%16 = bitcast i8* %15 to x86_fp80*
%17 = getelementptr i8, i8* %15, i32 16
store i8* %17, i8** %10
%18 = load x86_fp80, x86_fp80* %16
store x86_fp80 %18, x86_fp80* %4
%19 = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %3, i64 0, i64 0
%20 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %19, i32 0, i32 0
%21 = load i32, i32* %20
%22 = icmp ule i32 %21, 40
br i1 %22, label %23, label %29
23: ; preds = %1
%24 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %19, i32 0, i32 3
%25 = load i8*, i8** %24
%26 = getelementptr i8, i8* %25, i32 %21
%27 = bitcast i8* %26 to i32*
%28 = add i32 %21, 8
store i32 %28, i32* %20
br label %34
29: ; preds = %1
%30 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %19, i32 0, i32 2
%31 = load i8*, i8** %30
%32 = bitcast i8* %31 to i32*
%33 = getelementptr i8, i8* %31, i32 8
store i8* %33, i8** %30
br label %34
34: ; preds = %29, %23
%35 = phi i32* [ %27, %23 ], [ %32, %29 ]
%36 = load i32, i32* %35
store i32 %36, i32* %5
%37 = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %3, i64 0, i64 0
%38 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %37, i32 0, i32 2
%39 = load i8*, i8** %38
%40 = ptrtoint i8* %39 to i64
%41 = add i64 %40, 15
%42 = and i64 %41, -16
%43 = inttoptr i64 %42 to i8*
%44 = bitcast i8* %43 to x86_fp80*
%45 = getelementptr i8, i8* %43, i32 16
store i8* %45, i8** %38
%46 = load x86_fp80, x86_fp80* %44
store x86_fp80 %46, x86_fp80* %6
%47 = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %3, i64 0, i64 0
%48 = bitcast %struct.__va_list_tag* %47 to i8*
%49 = load x86_fp80, x86_fp80* %4
%50 = load x86_fp80, x86_fp80* %6
%51 = fadd x86_fp80 %49, %50
ret x86_fp80 %51
}

LLVM IR (-O2):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define x86_fp80 @f_va_3(i8* nocapture readnone %0, ...) {
%2 = alloca [1 x %struct.__va_list_tag]
%3 = bitcast [1 x %struct.__va_list_tag]* %2 to i8*
%4 = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %2, i64 0, i64 0, i32 2
%5 = load i8*, i8** %4
%6 = ptrtoint i8* %5 to i64
%7 = add i64 %6, 15
%8 = and i64 %7, -16
%9 = inttoptr i64 %8 to i8*
%10 = inttoptr i64 %8 to x86_fp80*
%11 = getelementptr i8, i8* %9, i64 16
store i8* %11, i8** %4
%12 = load x86_fp80, x86_fp80* %10
%13 = getelementptr inbounds [1 x %struct.__va_list_tag], [1 x %struct.__va_list_tag]* %2, i64 0, i64 0, i32 0
%14 = load i32, i32* %13
%15 = icmp ult i32 %14, 41
br i1 %15, label %16, label %18
16: ; preds = %1
%17 = add nuw nsw i32 %14, 8
store i32 %17, i32* %13
br label %20
18: ; preds = %1
%19 = getelementptr i8, i8* %9, i64 24
br label %20
20: ; preds = %18, %16
%21 = phi i8* [ %19, %18 ], [ %11, %16 ]
%22 = ptrtoint i8* %21 to i64
%23 = add i64 %22, 15
%24 = and i64 %23, -16
%25 = inttoptr i64 %24 to i8*
%26 = inttoptr i64 %24 to x86_fp80*
%27 = getelementptr i8, i8* %25, i64 16
store i8* %27, i8** %4
%28 = load x86_fp80, x86_fp80* %26
%29 = fadd x86_fp80 %12, %28
ret x86_fp80 %29
}