#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 */
int /*<<< orphan*/ printf(char *, int, int, int, int);
void timer_DUMP(float t) {
  int th, tm, ts, tp;
  ts = t;
  tm = ts / 60;
  ts = ts % 60;
  th = tm / 60;
  tm = tm % 60;
  tp = t * 100;
  tp = tp % 100;
  printf("%02i:%02i:%02i.%02i", th, tm, ts, tp);
}


x86 assembly (clang, -O0):
<timer_DUMP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
movss  0xe9b(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_DUMP>:
cvttss2si %xmm0,%eax
movslq %eax,%rcx
imul   $0xffffffff88888889,%rcx,%rax
shr    $0x20,%rax
add    %ecx,%eax
mov    %eax,%edx
shr    $0x1f,%edx
sar    $0x5,%eax
add    %edx,%eax
imul   $0x3c,%eax,%edx
imul   $0xffffffff91a2b3c5,%rcx,%rsi
shr    $0x20,%rsi
add    %ecx,%esi
sub    %edx,%ecx
mov    %esi,%edx
shr    $0x1f,%edx
sar    $0xb,%esi
add    %edx,%esi
movslq %eax,%rdx
imul   $0xffffffff88888889,%rdx,%rax
shr    $0x20,%rax
add    %edx,%eax
mov    %eax,%edi
shr    $0x1f,%edi
sar    $0x5,%eax
add    %edi,%eax
imul   $0x3c,%eax,%eax
sub    %eax,%edx
mulss  0xe8f(%rip),%xmm0
cvttss2si %xmm0,%eax
movslq %eax,%r8
imul   $0x51eb851f,%r8,%rax
mov    %rax,%rdi
shr    $0x3f,%rdi
sar    $0x25,%rax
add    %edi,%eax
imul   $0x64,%eax,%eax
sub    %eax,%r8d
lea    0xe6b(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"%02i:%02i:%02i.%02i\00"
define void @timer_DUMP(float %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store float %0, float* %2
%7 = load float, float* %2
%8 = fptosi float %7 to i32
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = sdiv i32 %9, 60
store i32 %10, i32* %4
%11 = load i32, i32* %5
%12 = srem i32 %11, 60
store i32 %12, i32* %5
%13 = load i32, i32* %4
%14 = sdiv i32 %13, 60
store i32 %14, i32* %3
%15 = load i32, i32* %4
%16 = srem i32 %15, 60
store i32 %16, i32* %4
%17 = load float, float* %2
%18 = fmul float %17, 1.000000e+02
%19 = fptosi float %18 to i32
store i32 %19, i32* %6
%20 = load i32, i32* %6
%21 = srem i32 %20, 100
store i32 %21, i32* %6
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = load i32, i32* %6
%26 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %22, i32 %23, i32 %24, i32 %25)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"%02i:%02i:%02i.%02i\00"
define void @timer_DUMP(float %0) {
%2 = fptosi float %0 to i32
%3 = sdiv i32 %2, 60
%4 = srem i32 %2, 60
%5 = sdiv i32 %2, 3600
%6 = srem i32 %3, 60
%7 = fmul float %0, 1.000000e+02
%8 = fptosi float %7 to i32
%9 = srem i32 %8, 100
%10 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i32 %4, i32 %9)
ret void
}