#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 uint8_t;
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
void from_time(uint32_t t, uint16_t *cdn, uint8_t *h, uint8_t *m, uint8_t *s) {
  *s = t % 60;
  t /= 60;
  *m = t % 60;
  t /= 60;
  *h = t % 24;
  t /= 24;
  *cdn = t;
}


x86 assembly (clang, -O0):
<from_time>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    -0x28(%rbp),%rax
mov    %edx,(%rax)
mov    -0x4(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%rax
mov    %edx,(%rax)
mov    -0x4(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x18,%ecx
cltd
idiv   %ecx
mov    -0x18(%rbp),%rax
mov    %edx,(%rax)
mov    -0x4(%rbp),%eax
mov    $0x18,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<from_time>:
push   %r14
push   %rbx
movslq %edi,%r10
imul   $0xffffffff88888889,%r10,%r11
shr    $0x20,%r11
add    %r10d,%r11d
mov    %r11d,%edi
shr    $0x1f,%edi
sar    $0x5,%r11d
add    %edi,%r11d
imul   $0x3c,%r11d,%r9d
imul   $0xffffffff91a2b3c5,%r10,%r14
shr    $0x20,%r14
add    %r10d,%r14d
imul   $0xffffffffc22e4507,%r10,%rax
shr    $0x20,%rax
add    %r10d,%eax
mov    %r10d,%edi
sub    %r9d,%edi
mov    %edi,(%r8)
movslq %r11d,%rdi
imul   $0xffffffff88888889,%rdi,%rbx
shr    $0x20,%rbx
add    %edi,%ebx
mov    %ebx,%r8d
shr    $0x1f,%r8d
sar    $0x5,%ebx
add    %r8d,%ebx
imul   $0x3c,%ebx,%ebx
sub    %ebx,%edi
mov    %edi,(%rcx)
mov    %r14d,%ecx
shr    $0x1f,%ecx
sar    $0xb,%r14d
add    %ecx,%r14d
movslq %r14d,%rcx
imul   $0x2aaaaaab,%rcx,%rdi
mov    %rdi,%rbx
shr    $0x3f,%rbx
shr    $0x22,%rdi
add    %ebx,%edi
shl    $0x3,%edi
lea    (%rdi,%rdi,2),%edi
sub    %edi,%ecx
mov    %ecx,(%rdx)
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x10,%eax
add    %ecx,%eax
mov    %eax,(%rsi)
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @from_time(i32 %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i32 %0, i32* %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = srem i32 %11, 60
%13 = load i32*, i32** %10
store i32 %12, i32* %13
%14 = load i32, i32* %6
%15 = sdiv i32 %14, 60
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = srem i32 %16, 60
%18 = load i32*, i32** %9
store i32 %17, i32* %18
%19 = load i32, i32* %6
%20 = sdiv i32 %19, 60
store i32 %20, i32* %6
%21 = load i32, i32* %6
%22 = srem i32 %21, 24
%23 = load i32*, i32** %8
store i32 %22, i32* %23
%24 = load i32, i32* %6
%25 = sdiv i32 %24, 24
store i32 %25, i32* %6
%26 = load i32, i32* %6
%27 = load i32*, i32** %7
store i32 %26, i32* %27
ret void
}

LLVM IR (-O2):
define void @from_time(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4) {
%6 = srem i32 %0, 60
store i32 %6, i32* %4
%7 = sdiv i32 %0, 60
%8 = srem i32 %7, 60
store i32 %8, i32* %3
%9 = sdiv i32 %0, 3600
%10 = srem i32 %9, 24
store i32 %10, i32* %2
%11 = sdiv i32 %0, 86400
store i32 %11, i32* %1
ret void
}