#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 *, unsigned int, unsigned int, int);
void printTime(const unsigned long long pTicks) {
  unsigned int seconds =
      (unsigned int)(pTicks / ((unsigned long long)50000000));
  unsigned int minutes = seconds / 60;
  seconds = seconds % 60;
  float fract = ((float)(pTicks % ((unsigned long long)50000000))) /
                ((unsigned long long)50000000);
  printf("%d:%d.%3.3d\n\r", minutes, seconds, (int)(fract * 1000));
}


x86 assembly (clang, -O0):
<printTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movabs $0xabcc77118461cefd,%rcx
77 cc ab
mul    %rcx
shr    $0x19,%rdx
mov    %edx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x88888889,%esi
imul   %rsi,%rax
shr    $0x25,%rax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%edx
mov    %edx,%eax
imul   %rsi,%rdx
shr    $0x25,%rdx
imul   $0x3c,%edx,%edx
sub    %edx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mul    %rcx
mov    -0x20(%rbp),%rax
shr    $0x19,%rdx
mov    %edx,%ecx
imul   $0x2faf080,%ecx,%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
movss  0xe7b(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
movss  0xe60(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
cvttss2si %xmm0,%ecx
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTime>:
movabs $0xabcc77118461cefd,%rcx
77 cc ab
mov    %rdi,%rax
mul    %rcx
shr    $0x19,%rdx
mov    %edx,%eax
mov    $0x88888889,%esi
imul   %rax,%rsi
shr    $0x25,%rsi
imul   $0x3c,%esi,%eax
imul   $0x2faf080,%edx,%ecx
sub    %ecx,%edi
cvtsi2ss %edi,%xmm0
divss  0xeb6(%rip),%xmm0
mulss  0xeb2(%rip),%xmm0
sub    %eax,%edx
cvttss2si %xmm0,%ecx
lea    0xea9(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%d:%d.%3.3d\0A\0D\00"
define void @printTime(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i64 %0, i64* %2
%6 = load i64, i64* %2
%7 = udiv i64 %6, 50000000
%8 = trunc i64 %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = udiv i32 %9, 60
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = urem i32 %11, 60
store i32 %12, i32* %3
%13 = load i64, i64* %2
%14 = urem i64 %13, 50000000
%15 = uitofp i64 %14 to float
%16 = fdiv float %15, 5.000000e+07
store float %16, float* %5
%17 = load i32, i32* %4
%18 = load i32, i32* %3
%19 = load float, float* %5
%20 = fmul float %19, 1.000000e+03
%21 = fptosi float %20 to i32
%22 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %18, i32 %21)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%d:%d.%3.3d\0A\0D\00"
define void @printTime(i64 %0) {
%2 = udiv i64 %0, 50000000
%3 = trunc i64 %2 to i32
%4 = udiv i32 %3, 60
%5 = urem i32 %3, 60
%6 = urem i64 %0, 50000000
%7 = uitofp i64 %6 to float
%8 = fdiv float %7, 5.000000e+07
%9 = fmul float %8, 1.000000e+03
%10 = fptosi float %9 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %10)
ret void
}