#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 */

/* Variables and functions */
scalar_t__ floor(double);
void Int_To_Hours_Minutes_Seconds(unsigned int t, int *hours, int *minutes,
                                  int *seconds) {
  double tmp;
  tmp = ((double)t) / 3600.0;
  *hours = (int)tmp;
  tmp -= floor(tmp);
  tmp *= 60.0;
  *minutes = (int)tmp;
  tmp -= floor(tmp);
  tmp *= 60.0;
  *seconds = (int)tmp;
  return;
}


x86 assembly (clang, -O0):
<Int_To_Hours_Minutes_Seconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  0xed1(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
cvttsd2si -0x28(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movsd  -0x28(%rbp),%xmm0
call   1030 <floor@plt>
cvtsi2sd %rax,%xmm1
movsd  -0x28(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe90(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
cvttsd2si -0x28(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movsd  -0x28(%rbp),%xmm0
call   1030 <floor@plt>
cvtsi2sd %rax,%xmm1
movsd  -0x28(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe56(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
cvttsd2si -0x28(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Int_To_Hours_Minutes_Seconds>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%eax
cvtsi2sd %rax,%xmm0
divsd  0xedd(%rip),%xmm0
movsd  %xmm0,(%rsp)
mov    %rcx,%r14
mov    %rdx,%rbx
cvttsd2si %xmm0,%eax
mov    %eax,(%rsi)
call   1030 <floor@plt>
cvtsi2sd %rax,%xmm1
movsd  (%rsp),%xmm0
subsd  %xmm1,%xmm0
mulsd  0xeb9(%rip),%xmm0
movsd  %xmm0,(%rsp)
cvttsd2si %xmm0,%eax
mov    %eax,(%rbx)
call   1030 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xe90(%rip),%xmm1
cvttsd2si %xmm1,%eax
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @Int_To_Hours_Minutes_Seconds(i32 %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca double
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%10 = load i32, i32* %5
%11 = uitofp i32 %10 to double
%12 = fdiv double %11, 3.600000e+03
store double %12, double* %9
%13 = load double, double* %9
%14 = fptosi double %13 to i32
%15 = load i32*, i32** %6
store i32 %14, i32* %15
%16 = load double, double* %9
%17 = call i64 @floor(double %16)
%18 = sitofp i64 %17 to double
%19 = load double, double* %9
%20 = fsub double %19, %18
store double %20, double* %9
%21 = load double, double* %9
%22 = fmul double %21, 6.000000e+01
store double %22, double* %9
%23 = load double, double* %9
%24 = fptosi double %23 to i32
%25 = load i32*, i32** %7
store i32 %24, i32* %25
%26 = load double, double* %9
%27 = call i64 @floor(double %26)
%28 = sitofp i64 %27 to double
%29 = load double, double* %9
%30 = fsub double %29, %28
store double %30, double* %9
%31 = load double, double* %9
%32 = fmul double %31, 6.000000e+01
store double %32, double* %9
%33 = load double, double* %9
%34 = fptosi double %33 to i32
%35 = load i32*, i32** %8
store i32 %34, i32* %35
ret void
}

LLVM IR (-O2):
define void @Int_To_Hours_Minutes_Seconds(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = uitofp i32 %0 to double
%6 = fdiv double %5, 3.600000e+03
%7 = fptosi double %6 to i32
store i32 %7, i32* %1
%8 = tail call i64 @floor(double %6)
%9 = sitofp i64 %8 to double
%10 = fsub double %6, %9
%11 = fmul double %10, 6.000000e+01
%12 = fptosi double %11 to i32
store i32 %12, i32* %2
%13 = tail call i64 @floor(double %11)
%14 = sitofp i64 %13 to double
%15 = fsub double %11, %14
%16 = fmul double %15, 6.000000e+01
%17 = fptosi double %16 to i32
store i32 %17, i32* %3
ret void
}