int hypotime2hrminsec(long double phypo_time, int *phypo_hour, int *phypo_min,
                      double *phypo_sec) {
  long double hyp_time_tmp = phypo_time;
  *phypo_hour = (int)(hyp_time_tmp / 3600.0L);
  hyp_time_tmp -= (long double)*phypo_hour * 3600.0L;
  *phypo_min = (int)(hyp_time_tmp / 60.0L);
  hyp_time_tmp -= (long double)*phypo_min * 60.0L;
  *phypo_sec = (double)hyp_time_tmp;
  return (0);
}


x86 assembly (clang, -O0):
<hypotime2hrminsec>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
fldt   -0x10(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
flds   0xedb(%rip)
fdivr  %st,%st(1)
fnstcw -0x5a(%rbp)
movzwl -0x5a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x5c(%rbp)
fldcw  -0x5c(%rbp)
fxch   %st(1)
fistpl -0x50(%rbp)
fldcw  -0x5a(%rbp)
mov    -0x50(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
fildl  -0x4c(%rbp)
fldt   -0x40(%rbp)
fxch   %st(1)
fmulp  %st,%st(2)
fsubp  %st,%st(1)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
flds   0xe98(%rip)
fdivr  %st,%st(1)
fnstcw -0x5e(%rbp)
movzwl -0x5e(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x60(%rbp)
fldcw  -0x60(%rbp)
fxch   %st(1)
fistpl -0x48(%rbp)
fldcw  -0x5e(%rbp)
mov    -0x48(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
fildl  -0x44(%rbp)
fldt   -0x40(%rbp)
fxch   %st(1)
fmulp  %st,%st(2)
fsubp  %st,%st(1)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
fstpl  -0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hypotime2hrminsec>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
fld    %st(1)
fdiv   %st(1),%st
fnstcw -0x16(%rsp)
movzwl -0x16(%rsp),%eax
or     $0xc00,%eax
mov    %ax,-0x12(%rsp)
fldcw  -0x12(%rsp)
fistpl -0x10(%rsp)
fldcw  -0x16(%rsp)
mov    -0x10(%rsp),%eax
mov    %eax,(%rdi)
mov    %eax,-0xc(%rsp)
fimull -0xc(%rsp)
fsubrp %st,%st(1)
flds   0xec1(%rip)
fld    %st(1)
fdiv   %st(1),%st
fnstcw -0x18(%rsp)
movzwl -0x18(%rsp),%eax
or     $0xc00,%eax
mov    %ax,-0x14(%rsp)
fldcw  -0x14(%rsp)
fistpl -0x8(%rsp)
fldcw  -0x18(%rsp)
mov    -0x8(%rsp),%eax
mov    %eax,(%rsi)
mov    %eax,-0x4(%rsp)
fimull -0x4(%rsp)
fsubrp %st,%st(1)
fstpl  (%rdx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @hypotime2hrminsec(x86_fp80 %0, i32* %1, i32* %2, double* %3) {
%5 = alloca x86_fp80
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca double*
%9 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store double* %3, double** %8
%10 = load x86_fp80, x86_fp80* %5
store x86_fp80 %10, x86_fp80* %9
%11 = load x86_fp80, x86_fp80* %9
%12 = fdiv x86_fp80 %11, 0xK400AE100000000000000
%13 = fptosi x86_fp80 %12 to i32
%14 = load i32*, i32** %6
store i32 %13, i32* %14
%15 = load i32*, i32** %6
%16 = load i32, i32* %15
%17 = sitofp i32 %16 to x86_fp80
%18 = load x86_fp80, x86_fp80* %9
%19 = fneg x86_fp80 %17
%20 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %19, x86_fp80 0xK400AE100000000000000, x86_fp80 %18)
store x86_fp80 %20, x86_fp80* %9
%21 = load x86_fp80, x86_fp80* %9
%22 = fdiv x86_fp80 %21, 0xK4004F000000000000000
%23 = fptosi x86_fp80 %22 to i32
%24 = load i32*, i32** %7
store i32 %23, i32* %24
%25 = load i32*, i32** %7
%26 = load i32, i32* %25
%27 = sitofp i32 %26 to x86_fp80
%28 = load x86_fp80, x86_fp80* %9
%29 = fneg x86_fp80 %27
%30 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %29, x86_fp80 0xK4004F000000000000000, x86_fp80 %28)
store x86_fp80 %30, x86_fp80* %9
%31 = load x86_fp80, x86_fp80* %9
%32 = fptrunc x86_fp80 %31 to double
%33 = load double*, double** %8
store double %32, double* %33
ret i32 0
}

LLVM IR (-O2):
define i32 @hypotime2hrminsec(x86_fp80 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = fdiv x86_fp80 %0, 0xK400AE100000000000000
%6 = fptosi x86_fp80 %5 to i32
store i32 %6, i32* %1
%7 = sitofp i32 %6 to x86_fp80
%8 = fneg x86_fp80 %7
%9 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %8, x86_fp80 0xK400AE100000000000000, x86_fp80 %0)
%10 = fdiv x86_fp80 %9, 0xK4004F000000000000000
%11 = fptosi x86_fp80 %10 to i32
store i32 %11, i32* %2
%12 = sitofp i32 %11 to x86_fp80
%13 = fneg x86_fp80 %12
%14 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %13, x86_fp80 0xK4004F000000000000000, x86_fp80 %9)
%15 = fptrunc x86_fp80 %14 to double
store double %15, double* %3
ret i32 0
}