#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int int64_t;

/* Variables and functions */
void _crack_time(double tt, int *hh, int *mm, int *ss, int *ms) {
  (*ms) = (int)((int64_t)(tt * 1000.0) % 1000);
  (*ss) = (int)((int64_t)(tt) % 60);
  (*mm) = (int)((int64_t)(tt / (60.0)) % 60);
  (*hh) = (int)((int64_t)(tt / (60.0 * 60.0)));
}


x86 assembly (clang, -O0):
<_crack_time>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    -0x28(%rbp),%rax
mov    %edx,(%rax)
cvttsd2si -0x8(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%rax
mov    %edx,(%rax)
movsd  -0x8(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    -0x18(%rbp),%rax
mov    %edx,(%rax)
movsd  -0x8(%rbp),%xmm0
movsd  0xe85(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_crack_time>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
movslq %eax,%r8
imul   $0x10624dd3,%r8,%rax
mov    %rax,%r9
shr    $0x3f,%r9
shr    $0x20,%rax
sar    $0x6,%eax
add    %r9d,%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%r8d
mov    %r8d,(%rcx)
cvttsd2si %xmm0,%eax
movslq %eax,%r8
imul   $0xffffffff88888889,%r8,%rcx
shr    $0x20,%rcx
add    %r8d,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
sar    $0x5,%ecx
add    %eax,%ecx
imul   $0x3c,%ecx,%eax
sub    %eax,%r8d
movapd %xmm0,%xmm1
divsd  0xea0(%rip),%xmm1
cvttsd2si %xmm1,%eax
mov    %r8d,(%rdx)
cltq
imul   $0xffffffff88888889,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x3c,%ecx,%ecx
sub    %ecx,%eax
divsd  0xe7b(%rip),%xmm0
mov    %eax,(%rsi)
cvttsd2si %xmm0,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @_crack_time(double %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca double
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store double %0, double* %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load double, double* %6
%12 = fmul double %11, 1.000000e+03
%13 = fptosi double %12 to i32
%14 = srem i32 %13, 1000
%15 = load i32*, i32** %10
store i32 %14, i32* %15
%16 = load double, double* %6
%17 = fptosi double %16 to i32
%18 = srem i32 %17, 60
%19 = load i32*, i32** %9
store i32 %18, i32* %19
%20 = load double, double* %6
%21 = fdiv double %20, 6.000000e+01
%22 = fptosi double %21 to i32
%23 = srem i32 %22, 60
%24 = load i32*, i32** %8
store i32 %23, i32* %24
%25 = load double, double* %6
%26 = fdiv double %25, 3.600000e+03
%27 = fptosi double %26 to i32
%28 = load i32*, i32** %7
store i32 %27, i32* %28
ret void
}

LLVM IR (-O2):
define void @_crack_time(double %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4) {
%6 = fmul double %0, 1.000000e+03
%7 = fptosi double %6 to i32
%8 = srem i32 %7, 1000
store i32 %8, i32* %4
%9 = fptosi double %0 to i32
%10 = srem i32 %9, 60
store i32 %10, i32* %3
%11 = fdiv double %0, 6.000000e+01
%12 = fptosi double %11 to i32
%13 = srem i32 %12, 60
store i32 %13, i32* %2
%14 = fdiv double %0, 3.600000e+03
%15 = fptosi double %14 to i32
store i32 %15, i32* %1
ret void
}