#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*/ decode_julday(int, int, int *, int *, int *);
void decode_juldaysec(int calendar, int julday, int secofday, int *year,
                      int *month, int *day, int *hour, int *minute,
                      int *second) {
  decode_julday(calendar, julday, year, month, day);
  *hour = secofday / 3600;
  *minute = secofday / 60 - *hour * 60;
  *second = secofday - *hour * 3600 - *minute * 60;
}


x86 assembly (clang, -O0):
<decode_juldaysec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <decode_julday@plt>
mov    -0xc(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    0x10(%rbp),%rax
imul   $0x3c,(%rax),%eax
sub    %eax,%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    0x10(%rbp),%rax
imul   $0xe10,(%rax),%eax
sub    %eax,%ecx
mov    0x18(%rbp),%rax
imul   $0x3c,(%rax),%eax
sub    %eax,%ecx
mov    0x20(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_juldaysec>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%ebx
mov    0x40(%rsp),%r14
mov    0x38(%rsp),%r15
mov    0x30(%rsp),%r12
mov    %rcx,%rdx
mov    %r8,%rcx
mov    %r9,%r8
call   1030 <decode_julday@plt>
movslq %ebx,%rax
imul   $0xffffffff91a2b3c5,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0xb,%ecx
add    %edx,%ecx
mov    %ecx,(%r12)
imul   $0xffffffff88888889,%rax,%rdx
shr    $0x20,%rdx
add    %eax,%edx
mov    %edx,%esi
shr    $0x1f,%esi
sar    $0x5,%edx
add    %esi,%edx
imul   $0xffffffc4,%ecx,%ecx
add    %edx,%ecx
mov    %ecx,(%r15)
imul   $0xfffff1f0,(%r12),%edx
ff
imul   $0xffffffc4,%ecx,%ecx
add    %eax,%ecx
add    %edx,%ecx
mov    %ecx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @decode_juldaysec(i32 %0, i32 %1, i32 %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32* %3, i32** %13
store i32* %4, i32** %14
store i32* %5, i32** %15
store i32* %6, i32** %16
store i32* %7, i32** %17
store i32* %8, i32** %18
%19 = load i32, i32* %10
%20 = load i32, i32* %11
%21 = load i32*, i32** %13
%22 = load i32*, i32** %14
%23 = load i32*, i32** %15
%24 = call i32 @decode_julday(i32 %19, i32 %20, i32* %21, i32* %22, i32* %23)
%25 = load i32, i32* %12
%26 = sdiv i32 %25, 3600
%27 = load i32*, i32** %16
store i32 %26, i32* %27
%28 = load i32, i32* %12
%29 = sdiv i32 %28, 60
%30 = load i32*, i32** %16
%31 = load i32, i32* %30
%32 = mul nsw i32 %31, 60
%33 = sub nsw i32 %29, %32
%34 = load i32*, i32** %17
store i32 %33, i32* %34
%35 = load i32, i32* %12
%36 = load i32*, i32** %16
%37 = load i32, i32* %36
%38 = mul nsw i32 %37, 3600
%39 = sub nsw i32 %35, %38
%40 = load i32*, i32** %17
%41 = load i32, i32* %40
%42 = mul nsw i32 %41, 60
%43 = sub nsw i32 %39, %42
%44 = load i32*, i32** %18
store i32 %43, i32* %44
ret void
}

LLVM IR (-O2):
define void @decode_juldaysec(i32 %0, i32 %1, i32 %2, i32* %3, i32* %4, i32* %5, i32* nocapture %6, i32* nocapture writeonly %7, i32* nocapture writeonly %8) {
%10 = tail call i32 @decode_julday(i32 %0, i32 %1, i32* %3, i32* %4, i32* %5)
%11 = sdiv i32 %2, 3600
store i32 %11, i32* %6
%12 = sdiv i32 %2, 60
%13 = mul nsw i32 %11, -60
%14 = add nsw i32 %13, %12
store i32 %14, i32* %7
%15 = load i32, i32* %6
%16 = mul i32 %15, -3600
%17 = mul i32 %14, -60
%18 = add i32 %17, %2
%19 = add i32 %18, %16
store i32 %19, i32* %8
ret void
}