#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*/ TimeYrsecToYMDHMS(int, int, int *, int *, int *, int *,
                                     int *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  int yr, mo, dy, hr, mt, sc;
  int tval = 18000;
  yr = 2002;
  TimeYrsecToYMDHMS(tval, yr, &mo, &dy, &hr, &mt, &sc);
  fprintf(stdout, "TimeYrsecToYMDHMS\n");
  fprintf(stdout, "Tval: %d\n", tval);
  fprintf(stdout, "Time: %.4d-%.2d-%.2d %.2d:%.2d:%.2d\n", yr, mo, dy, hr, mt,
          sc);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4650,-0x2c(%rbp)
movl   $0x7d2,-0x14(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x14(%rbp),%esi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
lea    -0x20(%rbp),%r8
lea    -0x24(%rbp),%r9
lea    -0x28(%rbp),%rax
mov    %rax,(%rsp)
call   1040 <TimeYrsecToYMDHMS@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
lea    0xe89(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
mov    -0x2c(%rbp),%edx
lea    0xe82(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    -0x24(%rbp),%r10d
mov    -0x28(%rbp),%eax
lea    0xe60(%rip),%rsi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
sub    $0x8,%rsp
lea    0x14(%rsp),%rax
lea    0x24(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x1c(%rsp),%r8
lea    0x18(%rsp),%r9
mov    $0x4650,%edi
mov    $0x7d2,%esi
push   %rax
call   1040 <TimeYrsecToYMDHMS@plt>
add    $0x10,%rsp
mov    0x2e83(%rip),%rbx
mov    (%rbx),%edi
lea    0xe9a(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xe9d(%rip),%rsi
mov    $0x4650,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
mov    0x1c(%rsp),%ecx
mov    0x18(%rsp),%r8d
mov    0x14(%rsp),%r9d
mov    0x10(%rsp),%r10d
mov    0xc(%rsp),%ebx
lea    0xe7b(%rip),%rsi
mov    $0x7d2,%edx
xor    %eax,%eax
push   %rbx
push   %r10
call   1030 <fprintf@plt>
add    $0x10,%rsp
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [19 x i8] c"TimeYrsecToYMDHMS\0A\00"
@.str.1 = [10 x i8] c"Tval: %d\0A\00"
@.str.2 = [37 x i8] c"Time: %.4d-%.2d-%.2d %.2d:%.2d:%.2d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 18000, i32* %12
store i32 2002, i32* %6
%13 = load i32, i32* %12
%14 = load i32, i32* %6
%15 = call i32 @TimeYrsecToYMDHMS(i32 %13, i32 %14, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11)
%16 = load i32, i32* @stdout
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%18 = load i32, i32* @stdout
%19 = load i32, i32* %12
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = load i32, i32* @stdout
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = load i32, i32* %8
%25 = load i32, i32* %9
%26 = load i32, i32* %10
%27 = load i32, i32* %11
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 %27)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [19 x i8] c"TimeYrsecToYMDHMS\0A\00"
@.str.1 = [10 x i8] c"Tval: %d\0A\00"
@.str.2 = [37 x i8] c"Time: %.4d-%.2d-%.2d %.2d:%.2d:%.2d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = bitcast i32* %6 to i8*
%12 = bitcast i32* %7 to i8*
%13 = call i32 @TimeYrsecToYMDHMS(i32 18000, i32 2002, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7)
%14 = load i32, i32* @stdout
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @stdout
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 18000)
%18 = load i32, i32* @stdout
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 2002, i32 %19, i32 %20, i32 %21, i32 %22, i32 %23)
ret i32 0
}