#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 */
struct tm {
  int tm_sec;
  int tm_min;
  int tm_hour;
};

/* Variables and functions */
struct tm attime2utc(int at) {
  int totsec = at * 86.4;
  int hr = totsec / 3600;
  int t = totsec % 3600;
  int min = t / 60;
  int sec = t % 60;
  struct tm tm;
  tm.tm_sec = sec;
  tm.tm_min = min;
  tm.tm_hour = hr;
  return tm;
}


x86 assembly (clang, -O0):
<attime2utc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
movslq -0x18(%rbp),%rax
mov    %eax,%ecx
imul   $0xffffffff91a2b3c5,%rax,%rax
shr    $0x20,%rax
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0xb,%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
movslq -0x18(%rbp),%rcx
mov    %ecx,%eax
imul   $0xffffffff91a2b3c5,%rcx,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0xb,%ecx
add    %edx,%ecx
imul   $0xe10,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,-0x20(%rbp)
movslq -0x20(%rbp),%rax
mov    %eax,%ecx
imul   $0xffffffff88888889,%rax,%rax
shr    $0x20,%rax
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x5,%eax
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
movslq -0x20(%rbp),%rcx
mov    %ecx,%eax
imul   $0xffffffff88888889,%rcx,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x3c,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%edx
pop    %rbp
ret

x86 assembly (clang, -O2):
<attime2utc>:
cvtsi2sd %edi,%xmm0
mulsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%eax
cltq
imul   $0xffffffff91a2b3c5,%rax,%rdx
shr    $0x20,%rdx
add    %eax,%edx
mov    %edx,%ecx
shr    $0x1f,%ecx
sar    $0xb,%edx
add    %ecx,%edx
imul   $0xe10,%edx,%ecx
sub    %ecx,%eax
movswl %ax,%ecx
imul   $0xffff8889,%ecx,%ecx
shr    $0x10,%ecx
add    %eax,%ecx
movzwl %cx,%ecx
movswl %cx,%esi
shr    $0xf,%ecx
sar    $0x5,%esi
add    %ecx,%esi
movswq %si,%rcx
imul   $0x3c,%esi,%esi
sub    %esi,%eax
movswq %ax,%rax
shl    $0x20,%rcx
mov    %eax,%eax
or     %rcx,%rax
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
define { i64, i32 } @attime2utc(i32 %0) {
%2 = alloca %struct.tm
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca { i64, i32 }
store i32 %0, i32* %3
%10 = load i32, i32* %3
%11 = sitofp i32 %10 to double
%12 = fmul double %11, 8.640000e+01
%13 = fptosi double %12 to i32
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = sdiv i32 %14, 3600
store i32 %15, i32* %5
%16 = load i32, i32* %4
%17 = srem i32 %16, 3600
store i32 %17, i32* %6
%18 = load i32, i32* %6
%19 = sdiv i32 %18, 60
store i32 %19, i32* %7
%20 = load i32, i32* %6
%21 = srem i32 %20, 60
store i32 %21, i32* %8
%22 = load i32, i32* %8
%23 = getelementptr inbounds %struct.tm, %struct.tm* %2, i32 0, i32 0
store i32 %22, i32* %23
%24 = load i32, i32* %7
%25 = getelementptr inbounds %struct.tm, %struct.tm* %2, i32 0, i32 1
store i32 %24, i32* %25
%26 = load i32, i32* %5
%27 = getelementptr inbounds %struct.tm, %struct.tm* %2, i32 0, i32 2
store i32 %26, i32* %27
%28 = bitcast { i64, i32 }* %9 to i8*
%29 = bitcast %struct.tm* %2 to i8*
%30 = load { i64, i32 }, { i64, i32 }* %9
ret { i64, i32 } %30
}

LLVM IR (-O2):
define { i64, i32 } @attime2utc(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 8.640000e+01
%4 = fptosi double %3 to i32
%5 = sdiv i32 %4, 3600
%6 = srem i32 %4, 3600
%7 = trunc i32 %6 to i16
%8 = sdiv i16 %7, 60
%9 = sext i16 %8 to i64
%10 = srem i16 %7, 60
%11 = sext i16 %10 to i64
%12 = shl nsw i64 %9, 32
%13 = and i64 %11, 4294967295
%14 = or i64 %12, %13
%15 = insertvalue { i64, i32 } poison, i64 %14, 0
%16 = insertvalue { i64, i32 } %15, i32 %5, 1
ret { i64, i32 } %16
}