#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int second, minute, hour;
  scanf("%d\n", &second);
  hour = second / 3600;
  minute = second / 60 % 60;
  second %= 60;
  printf("%d:%d:%d\n", hour, minute, second);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xede(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rcx
imul   $0xffffffff91a2b3c5,%rcx,%rsi
shr    $0x20,%rsi
add    %ecx,%esi
mov    %esi,%eax
shr    $0x1f,%eax
sar    $0xb,%esi
add    %eax,%esi
imul   $0xffffffff88888889,%rcx,%rax
shr    $0x20,%rax
add    %ecx,%eax
mov    %eax,%edx
shr    $0x1f,%edx
sar    $0x5,%eax
add    %edx,%eax
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
imul   $0x3c,%edx,%edi
sub    %eax,%edx
sub    %edi,%ecx
mov    %ecx,0x4(%rsp)
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [10 x i8] c"%d:%d:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 3600
store i32 %7, i32* %4
%8 = load i32, i32* %2
%9 = sdiv i32 %8, 60
%10 = srem i32 %9, 60
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = srem i32 %11, 60
store i32 %12, i32* %2
%13 = load i32, i32* %4
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %13, i32 %14, i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [10 x i8] c"%d:%d:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = sdiv i32 %4, 3600
%6 = sdiv i32 %4, 60
%7 = srem i32 %6, 60
%8 = srem i32 %4, 60
store i32 %8, i32* %1
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %7, i32 %8)
ret i32 0
}