int main(void) {
  __float128 one = 1.0q;
  __float128 two = 2.0q;
  __float128 three = 3.0q;
  __float128 four = 4.0q;
  __float128 five = 5.0q;
  __float128 add_result = (1.0q + 2.0q);
  __float128 mul_result = ((1.0q + 2.0q) * 3.0q);
  __float128 div_result = (((1.0q + 2.0q) * 3.0q) / 4.0q);
  __float128 sub_result = ((((1.0q + 2.0q) * 3.0q) / 4.0q) - 5.0q);
  __float128 neg_result = -sub_result;
  __float128 add_xresult;
  __float128 mul_xresult;
  __float128 div_xresult;
  __float128 sub_xresult;
  __float128 neg_xresult;
  one = no_optimize(one);
  two = no_optimize(two);
  three = no_optimize(three);
  four = no_optimize(four);
  five = no_optimize(five);
  add_xresult = (one + two);
  do_test(add_result, add_xresult, "add");
  mul_xresult = add_xresult * three;
  do_test(mul_result, mul_xresult, "mul");
  div_xresult = mul_xresult / four;
  do_test(div_result, div_xresult, "div");
  sub_xresult = div_xresult - five;
  do_test(sub_result, sub_xresult, "sub");
  neg_xresult = -sub_xresult;
  do_test(neg_result, neg_xresult, "neg");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
movaps 0x4ec7(%rip),%xmm0
movaps %xmm0,-0x20(%rbp)
movaps 0x4ecc(%rip),%xmm0
movaps %xmm0,-0x30(%rbp)
movaps 0x4ed1(%rip),%xmm0
movaps %xmm0,-0x40(%rbp)
movaps 0x4ed6(%rip),%xmm1
movaps %xmm1,-0x50(%rbp)
movaps 0x4edb(%rip),%xmm1
movaps %xmm1,-0x60(%rbp)
movaps %xmm0,-0x70(%rbp)
movaps 0x4edc(%rip),%xmm0
movaps %xmm0,-0x80(%rbp)
movaps 0x4ee1(%rip),%xmm0
movaps %xmm0,-0x90(%rbp)
movaps 0x4ee3(%rip),%xmm0
movaps %xmm0,-0xa0(%rbp)
movaps -0xa0(%rbp),%xmm0
movaps 0x4ede(%rip),%xmm1
movaps %xmm1,-0x110(%rbp)
xorps  %xmm1,%xmm0
movaps %xmm0,-0xb0(%rbp)
movaps -0x20(%rbp),%xmm0
mov    $0x1,%al
mov    %al,-0x112(%rbp)
call   1040 <no_optimize@plt>
mov    %eax,%edi
call   5090 <__floatsitf>
mov    -0x112(%rbp),%al
movaps %xmm0,-0x20(%rbp)
movaps -0x30(%rbp),%xmm0
call   1040 <no_optimize@plt>
mov    %eax,%edi
call   5090 <__floatsitf>
mov    -0x112(%rbp),%al
movaps %xmm0,-0x30(%rbp)
movaps -0x40(%rbp),%xmm0
call   1040 <no_optimize@plt>
mov    %eax,%edi
call   5090 <__floatsitf>
mov    -0x112(%rbp),%al
movaps %xmm0,-0x40(%rbp)
movaps -0x50(%rbp),%xmm0
call   1040 <no_optimize@plt>
mov    %eax,%edi
call   5090 <__floatsitf>
mov    -0x112(%rbp),%al
movaps %xmm0,-0x50(%rbp)
movaps -0x60(%rbp),%xmm0
call   1040 <no_optimize@plt>
mov    %eax,%edi
call   5090 <__floatsitf>
movaps %xmm0,-0x60(%rbp)
movaps -0x20(%rbp),%xmm0
movaps -0x30(%rbp),%xmm1
call   1350 <__addtf3>
movaps %xmm0,-0xc0(%rbp)
movaps -0x70(%rbp),%xmm0
movaps -0xc0(%rbp),%xmm1
lea    0x4e33(%rip),%rdi
mov    $0x2,%al
mov    %al,-0x111(%rbp)
call   1030 <do_test@plt>
movaps -0xc0(%rbp),%xmm0
movaps -0x40(%rbp),%xmm1
call   3280 <__multf3>
mov    -0x111(%rbp),%al
movaps %xmm0,-0xd0(%rbp)
movaps -0x80(%rbp),%xmm0
movaps -0xd0(%rbp),%xmm1
lea    0x4dfb(%rip),%rdi
call   1030 <do_test@plt>
movaps -0xd0(%rbp),%xmm0
movaps -0x50(%rbp),%xmm1
call   2730 <__divtf3>
mov    -0x111(%rbp),%al
movaps %xmm0,-0xe0(%rbp)
movaps -0x90(%rbp),%xmm0
movaps -0xe0(%rbp),%xmm1
lea    0x4dc8(%rip),%rdi
call   1030 <do_test@plt>
movaps -0xe0(%rbp),%xmm0
movaps -0x60(%rbp),%xmm1
call   3d50 <__subtf3>
mov    -0x111(%rbp),%al
movaps %xmm0,-0xf0(%rbp)
movaps -0xa0(%rbp),%xmm0
movaps -0xf0(%rbp),%xmm1
lea    0x4d95(%rip),%rdi
call   1030 <do_test@plt>
movaps -0x110(%rbp),%xmm1
movaps -0xf0(%rbp),%xmm0
xorps  %xmm1,%xmm0
movaps %xmm0,-0x100(%rbp)
movaps -0xb0(%rbp),%xmm0
movaps -0x100(%rbp),%xmm1
lea    0x4d67(%rip),%rdi
mov    $0x2,%al
call   1030 <do_test@plt>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret
nopl   0x0(%rax,%rax,1)

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
movaps 0x4ed5(%rip),%xmm0
mov    $0x1,%al
call   1040 <no_optimize@plt>
mov    %eax,%edi
call   4fc0 <__floatsitf>
movaps %xmm0,(%rsp)
movaps 0x4ecc(%rip),%xmm0
mov    $0x1,%al
call   1040 <no_optimize@plt>
mov    %eax,%edi
call   4fc0 <__floatsitf>
movaps %xmm0,0x10(%rsp)
movaps 0x4ec2(%rip),%xmm0
mov    $0x1,%al
call   1040 <no_optimize@plt>
mov    %eax,%edi
call   4fc0 <__floatsitf>
movaps %xmm0,0x20(%rsp)
movaps 0x4eb8(%rip),%xmm0
mov    $0x1,%al
call   1040 <no_optimize@plt>
mov    %eax,%edi
call   4fc0 <__floatsitf>
movaps %xmm0,0x30(%rsp)
movaps 0x4eae(%rip),%xmm0
mov    $0x1,%al
call   1040 <no_optimize@plt>
mov    %eax,%edi
call   4fc0 <__floatsitf>
movaps %xmm0,0x40(%rsp)
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
call   1280 <__addtf3>
movaps %xmm0,%xmm1
movaps %xmm0,(%rsp)
lea    0x4edf(%rip),%rdi
movaps 0x4e58(%rip),%xmm0
mov    $0x2,%al
call   1030 <do_test@plt>
movaps (%rsp),%xmm0
movaps 0x20(%rsp),%xmm1
call   31b0 <__multf3>
movaps %xmm0,%xmm1
movaps %xmm0,(%rsp)
lea    0x4eb9(%rip),%rdi
movaps 0x4e5e(%rip),%xmm0
mov    $0x2,%al
call   1030 <do_test@plt>
movaps (%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
call   2660 <__divtf3>
movaps %xmm0,%xmm1
movaps %xmm0,(%rsp)
lea    0x4e93(%rip),%rdi
movaps 0x4e44(%rip),%xmm0
mov    $0x2,%al
call   1030 <do_test@plt>
movaps (%rsp),%xmm0
movaps 0x40(%rsp),%xmm1
call   3c80 <__subtf3>
movaps %xmm0,%xmm1
movaps %xmm0,(%rsp)
lea    0x4e6d(%rip),%rdi
movaps 0x4e2a(%rip),%xmm0
mov    $0x2,%al
call   1030 <do_test@plt>
movaps (%rsp),%xmm1
xorps  0x4e28(%rip),%xmm1
lea    0x4e51(%rip),%rdi
movaps 0x4e2a(%rip),%xmm0
mov    $0x2,%al
call   1030 <do_test@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax

LLVM IR (-O0):
@.str = [4 x i8] c"add\00"
@.str.1 = [4 x i8] c"mul\00"
@.str.2 = [4 x i8] c"div\00"
@.str.3 = [4 x i8] c"sub\00"
@.str.4 = [4 x i8] c"neg\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca fp128
%3 = alloca fp128
%4 = alloca fp128
%5 = alloca fp128
%6 = alloca fp128
%7 = alloca fp128
%8 = alloca fp128
%9 = alloca fp128
%10 = alloca fp128
%11 = alloca fp128
%12 = alloca fp128
%13 = alloca fp128
%14 = alloca fp128
%15 = alloca fp128
%16 = alloca fp128
store i32 0, i32* %1
store fp128 0xL00000000000000003FFF000000000000, fp128* %2
store fp128 0xL00000000000000004000000000000000, fp128* %3
store fp128 0xL00000000000000004000800000000000, fp128* %4
store fp128 0xL00000000000000004001000000000000, fp128* %5
store fp128 0xL00000000000000004001400000000000, fp128* %6
store fp128 0xL00000000000000004000800000000000, fp128* %7
store fp128 0xL00000000000000004002200000000000, fp128* %8
store fp128 0xL00000000000000004000200000000000, fp128* %9
store fp128 0xL0000000000000000C000600000000000, fp128* %10
%17 = load fp128, fp128* %10
%18 = fneg fp128 %17
store fp128 %18, fp128* %11
%19 = load fp128, fp128* %2
%20 = call i32 (fp128, ...) bitcast (i32 (...)* @no_optimize to i32 (fp128, ...)*)(fp128 %19)
%21 = sitofp i32 %20 to fp128
store fp128 %21, fp128* %2
%22 = load fp128, fp128* %3
%23 = call i32 (fp128, ...) bitcast (i32 (...)* @no_optimize to i32 (fp128, ...)*)(fp128 %22)
%24 = sitofp i32 %23 to fp128
store fp128 %24, fp128* %3
%25 = load fp128, fp128* %4
%26 = call i32 (fp128, ...) bitcast (i32 (...)* @no_optimize to i32 (fp128, ...)*)(fp128 %25)
%27 = sitofp i32 %26 to fp128
store fp128 %27, fp128* %4
%28 = load fp128, fp128* %5
%29 = call i32 (fp128, ...) bitcast (i32 (...)* @no_optimize to i32 (fp128, ...)*)(fp128 %28)
%30 = sitofp i32 %29 to fp128
store fp128 %30, fp128* %5
%31 = load fp128, fp128* %6
%32 = call i32 (fp128, ...) bitcast (i32 (...)* @no_optimize to i32 (fp128, ...)*)(fp128 %31)
%33 = sitofp i32 %32 to fp128
store fp128 %33, fp128* %6
%34 = load fp128, fp128* %2
%35 = load fp128, fp128* %3
%36 = fadd fp128 %34, %35
store fp128 %36, fp128* %12
%37 = load fp128, fp128* %7
%38 = load fp128, fp128* %12
%39 = call i32 (fp128, fp128, i8*, ...) bitcast (i32 (...)* @do_test to i32 (fp128, fp128, i8*, ...)*)(fp128 %37, fp128 %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%40 = load fp128, fp128* %12
%41 = load fp128, fp128* %4
%42 = fmul fp128 %40, %41
store fp128 %42, fp128* %13
%43 = load fp128, fp128* %8
%44 = load fp128, fp128* %13
%45 = call i32 (fp128, fp128, i8*, ...) bitcast (i32 (...)* @do_test to i32 (fp128, fp128, i8*, ...)*)(fp128 %43, fp128 %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%46 = load fp128, fp128* %13
%47 = load fp128, fp128* %5
%48 = fdiv fp128 %46, %47
store fp128 %48, fp128* %14
%49 = load fp128, fp128* %9
%50 = load fp128, fp128* %14
%51 = call i32 (fp128, fp128, i8*, ...) bitcast (i32 (...)* @do_test to i32 (fp128, fp128, i8*, ...)*)(fp128 %49, fp128 %50, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%52 = load fp128, fp128* %14
%53 = load fp128, fp128* %6
%54 = fsub fp128 %52, %53
store fp128 %54, fp128* %15
%55 = load fp128, fp128* %10
%56 = load fp128, fp128* %15
%57 = call i32 (fp128, fp128, i8*, ...) bitcast (i32 (...)* @do_test to i32 (fp128, fp128, i8*, ...)*)(fp128 %55, fp128 %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%58 = load fp128, fp128* %15
%59 = fneg fp128 %58
store fp128 %59, fp128* %16
%60 = load fp128, fp128* %11
%61 = load fp128, fp128* %16
%62 = call i32 (fp128, fp128, i8*, ...) bitcast (i32 (...)* @do_test to i32 (fp128, fp128, i8*, ...)*)(fp128 %60, fp128 %61, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"add\00"
@.str.1 = [4 x i8] c"mul\00"
@.str.2 = [4 x i8] c"div\00"
@.str.3 = [4 x i8] c"sub\00"
@.str.4 = [4 x i8] c"neg\00"
define i32 @main() {
%1 = tail call i32 (fp128, ...) bitcast (i32 (...)* @no_optimize to i32 (fp128, ...)*)(fp128 0xL00000000000000003FFF000000000000)
%2 = sitofp i32 %1 to fp128
%3 = tail call i32 (fp128, ...) bitcast (i32 (...)* @no_optimize to i32 (fp128, ...)*)(fp128 0xL00000000000000004000000000000000)
%4 = sitofp i32 %3 to fp128
%5 = tail call i32 (fp128, ...) bitcast (i32 (...)* @no_optimize to i32 (fp128, ...)*)(fp128 0xL00000000000000004000800000000000)
%6 = sitofp i32 %5 to fp128
%7 = tail call i32 (fp128, ...) bitcast (i32 (...)* @no_optimize to i32 (fp128, ...)*)(fp128 0xL00000000000000004001000000000000)
%8 = sitofp i32 %7 to fp128
%9 = tail call i32 (fp128, ...) bitcast (i32 (...)* @no_optimize to i32 (fp128, ...)*)(fp128 0xL00000000000000004001400000000000)
%10 = sitofp i32 %9 to fp128
%11 = fadd fp128 %2, %4
%12 = tail call i32 (fp128, fp128, i8*, ...) bitcast (i32 (...)* @do_test to i32 (fp128, fp128, i8*, ...)*)(fp128 0xL00000000000000004000800000000000, fp128 %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%13 = fmul fp128 %11, %6
%14 = tail call i32 (fp128, fp128, i8*, ...) bitcast (i32 (...)* @do_test to i32 (fp128, fp128, i8*, ...)*)(fp128 0xL00000000000000004002200000000000, fp128 %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%15 = fdiv fp128 %13, %8
%16 = tail call i32 (fp128, fp128, i8*, ...) bitcast (i32 (...)* @do_test to i32 (fp128, fp128, i8*, ...)*)(fp128 0xL00000000000000004000200000000000, fp128 %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%17 = fsub fp128 %15, %10
%18 = tail call i32 (fp128, fp128, i8*, ...) bitcast (i32 (...)* @do_test to i32 (fp128, fp128, i8*, ...)*)(fp128 0xL0000000000000000C000600000000000, fp128 %17, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%19 = fneg fp128 %17
%20 = tail call i32 (fp128, fp128, i8*, ...) bitcast (i32 (...)* @do_test to i32 (fp128, fp128, i8*, ...)*)(fp128 0xL00000000000000004000600000000000, fp128 %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}