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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x7d2,-0x14(%rbp)
movl   $0x8,-0x18(%rbp)
movl   $0x1e,-0x1c(%rbp)
movl   $0xa,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
movsd  -0x30(%rbp),%xmm0
call   1040 <TimeYMDHMSToYrsec@plt>
mov    %eax,-0x34(%rbp)
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
lea    0xe6b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e3d(%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
cvttsd2si -0x30(%rbp),%eax
lea    0xe50(%rip),%rsi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e07(%rip),%rax
mov    (%rax),%edi
mov    -0x34(%rbp),%edx
lea    0xe53(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xorps  %xmm0,%xmm0
mov    $0x7d2,%edi
mov    $0x8,%esi
mov    $0x1e,%edx
mov    $0xa,%ecx
xor    %r8d,%r8d
call   1040 <TimeYMDHMSToYrsec@plt>
mov    %eax,%ebp
mov    0x2e95(%rip),%rbx
mov    (%rbx),%edi
lea    0xeac(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeaf(%rip),%rsi
mov    $0x7d2,%edx
mov    $0x8,%ecx
mov    $0x1e,%r8d
mov    $0xa,%r9d
xor    %eax,%eax
push   $0x0
push   $0x0
call   1030 <fprintf@plt>
add    $0x10,%rsp
mov    (%rbx),%edi
lea    0xea6(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [19 x i8] c"TimeYMDHMSToYrsec\0A\00"
@.str.1 = [37 x i8] c"Time: %.4d-%.2d-%.2d %.2d:%.2d:%.2d\0A\00"
@.str.2 = [10 x i8] c"Tval: %d\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 double
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %12
store i32 2002, i32* %6
store i32 8, i32* %7
store i32 30, i32* %8
store i32 10, i32* %9
store i32 0, i32* %10
store double 0.000000e+00, double* %11
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load double, double* %11
%19 = call i32 @TimeYMDHMSToYrsec(i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, double %18)
store i32 %19, i32* %12
%20 = load i32, i32* @stdout
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%22 = load i32, i32* @stdout
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = load i32, i32* %8
%26 = load i32, i32* %9
%27 = load i32, i32* %10
%28 = load double, double* %11
%29 = fptosi double %28 to i32
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 %23, i32 %24, i32 %25, i32 %26, i32 %27, i32 %29)
%31 = load i32, i32* @stdout
%32 = load i32, i32* %12
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %32)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [19 x i8] c"TimeYMDHMSToYrsec\0A\00"
@.str.1 = [37 x i8] c"Time: %.4d-%.2d-%.2d %.2d:%.2d:%.2d\0A\00"
@.str.2 = [10 x i8] c"Tval: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @TimeYMDHMSToYrsec(i32 2002, i32 8, i32 30, i32 10, i32 0, double 0.000000e+00)
%4 = load i32, i32* @stdout
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdout
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 2002, i32 8, i32 30, i32 10, i32 0, i32 0)
%8 = load i32, i32* @stdout
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %3)
ret i32 0
}