#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*/ ffpmsg(char *);
int /*<<< orphan*/ sprintf(char *, char *, int, ...);
int fftm2s(int year, int month, int day, int hour, int minute, double second,
           int decimals, char *datestr, int *status) {
  int width;
  char errmsg[81];
  if (*status > 0)
    return (*status);
  if (year < 0 || year > 9999) {
    sprintf(errmsg, "input year value is out of range 0 - 9999: %d (fftm2s)",
            year);
    ffpmsg(errmsg);
    return (*status = 420);
  } else if (month < 0 || month > 12) {
    sprintf(errmsg, "input month value is out of range 0 - 12: %d (fftm2s)",
            month);
    ffpmsg(errmsg);
    return (*status = 420);
  } else if (day < 0 || day > 31) {
    sprintf(errmsg, "input day value is out of range 0 - 31: %d (fftm2s)", day);
    ffpmsg(errmsg);
    return (*status = 420);
  } else if (hour < 0 || hour > 23) {
    sprintf(errmsg, "input hour value is out of range 0 - 23: %d (fftm2s)",
            hour);
    ffpmsg(errmsg);
    return (*status = 420);
  } else if (minute < 0 || minute > 59) {
    sprintf(errmsg, "input minute value is out of range 0 - 59: %d (fftm2s)",
            minute);
    ffpmsg(errmsg);
    return (*status = 420);
  } else if (second < 0. || second >= 61) {
    sprintf(errmsg,
            "input second value is out of range 0 - 60.999: %f (fftm2s)",
            second);
    ffpmsg(errmsg);
    return (*status = 420);
  } else if (decimals > 25) {
    sprintf(errmsg, "input decimals value is out of range 0 - 25: %d (fftm2s)",
            decimals);
    ffpmsg(errmsg);
    return (*status = 420);
  }
  if (decimals == 0)
    width = 2;
  else
    width = decimals + 3;
  if (decimals < 0) {
    sprintf(datestr, "%.4d-%.2d-%.2d", year, month, day);
  } else if (year == 0 && month == 0 && day == 0) {
    sprintf(datestr, "%.2d:%.2d:%0*.*f", hour, minute, width, decimals, second);
  } else {
    sprintf(datestr, "%.4d-%.2d-%.2dT%.2d:%.2d:%0*.*f", year, month, day, hour,
            minute, width, decimals, second);
  }
  return (*status);
}


x86 assembly (clang, -O0):
<fftm2s>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    0x18(%rbp),%rax
cmpl   $0x0,(%rax)
jle    1167 <fftm2s+0x47>
mov    0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1466 <fftm2s+0x346>
cmpl   $0x0,-0x8(%rbp)
jl     117e <fftm2s+0x5e>
cmpl   $0x270f,-0x8(%rbp)
jle    11b2 <fftm2s+0x92>
lea    -0x80(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xe7c(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <ffpmsg@plt>
mov    0x18(%rbp),%rax
movl   $0x1a4,(%rax)
movl   $0x1a4,-0x4(%rbp)
jmp    1466 <fftm2s+0x346>
cmpl   $0x0,-0xc(%rbp)
jl     11c6 <fftm2s+0xa6>
cmpl   $0xc,-0xc(%rbp)
jle    11fa <fftm2s+0xda>
lea    -0x80(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xe6b(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <ffpmsg@plt>
mov    0x18(%rbp),%rax
movl   $0x1a4,(%rax)
movl   $0x1a4,-0x4(%rbp)
jmp    1466 <fftm2s+0x346>
cmpl   $0x0,-0x10(%rbp)
jl     120e <fftm2s+0xee>
cmpl   $0x1f,-0x10(%rbp)
jle    1242 <fftm2s+0x122>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%edx
lea    0xe59(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <ffpmsg@plt>
mov    0x18(%rbp),%rax
movl   $0x1a4,(%rax)
movl   $0x1a4,-0x4(%rbp)
jmp    1466 <fftm2s+0x346>
cmpl   $0x0,-0x14(%rbp)
jl     1256 <fftm2s+0x136>
cmpl   $0x17,-0x14(%rbp)
jle    128a <fftm2s+0x16a>
lea    -0x80(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xe45(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <ffpmsg@plt>
mov    0x18(%rbp),%rax
movl   $0x1a4,(%rax)
movl   $0x1a4,-0x4(%rbp)
jmp    1466 <fftm2s+0x346>
cmpl   $0x0,-0x18(%rbp)
jl     129e <fftm2s+0x17e>
cmpl   $0x3b,-0x18(%rbp)
jle    12d2 <fftm2s+0x1b2>
lea    -0x80(%rbp),%rdi
mov    -0x18(%rbp),%edx
lea    0xe32(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <ffpmsg@plt>
mov    0x18(%rbp),%rax
movl   $0x1a4,(%rax)
movl   $0x1a4,-0x4(%rbp)
jmp    1466 <fftm2s+0x346>
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
ja     12f7 <fftm2s+0x1d7>
movsd  -0x20(%rbp),%xmm0
movsd  0xd13(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     132d <fftm2s+0x20d>
lea    -0x80(%rbp),%rdi
cvttsd2si -0x20(%rbp),%edx
lea    0xe0e(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <ffpmsg@plt>
mov    0x18(%rbp),%rax
movl   $0x1a4,(%rax)
movl   $0x1a4,-0x4(%rbp)
jmp    1466 <fftm2s+0x346>
cmpl   $0x19,-0x24(%rbp)
jle    136b <fftm2s+0x24b>
lea    -0x80(%rbp),%rdi
mov    -0x24(%rbp),%edx
lea    0xe0b(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <ffpmsg@plt>
mov    0x18(%rbp),%rax
movl   $0x1a4,(%rax)
movl   $0x1a4,-0x4(%rbp)
jmp    1466 <fftm2s+0x346>
jmp    1370 <fftm2s+0x250>
jmp    1375 <fftm2s+0x255>
jmp    137a <fftm2s+0x25a>
jmp    137f <fftm2s+0x25f>
jmp    1384 <fftm2s+0x264>
jmp    1389 <fftm2s+0x269>
cmpl   $0x0,-0x24(%rbp)
jne    139f <fftm2s+0x27f>
movl   $0x2,-0x28(%rbp)
jmp    13a8 <fftm2s+0x288>
mov    -0x24(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    13d3 <fftm2s+0x2b3>
mov    0x10(%rbp),%rdi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xdc2(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    145d <fftm2s+0x33d>
cmpl   $0x0,-0x8(%rbp)
jne    141b <fftm2s+0x2fb>
cmpl   $0x0,-0xc(%rbp)
jne    141b <fftm2s+0x2fb>
cmpl   $0x0,-0x10(%rbp)
jne    141b <fftm2s+0x2fb>
mov    0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x24(%rbp),%r9d
movsd  -0x20(%rbp),%xmm0
lea    0xd98(%rip),%rsi
mov    $0x1,%al
call   1040 <sprintf@plt>
jmp    1458 <fftm2s+0x338>
mov    0x10(%rbp),%rdi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%r11d
mov    -0x28(%rbp),%r10d
mov    -0x24(%rbp),%eax
movsd  -0x20(%rbp),%xmm0
lea    0xd54(%rip),%rsi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x1,%al
call   1040 <sprintf@plt>
jmp    145d <fftm2s+0x33d>
mov    0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fftm2s>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    0x78(%rsp),%r14
mov    (%r14),%eax
test   %eax,%eax
jg     1204 <fftm2s+0xe4>
mov    %r8d,%r10d
mov    %edx,%r8d
mov    %edi,%edx
cmp    $0x2710,%edi
jb     1159 <fftm2s+0x39>
lea    0xeba(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
jmp    11e9 <fftm2s+0xc9>
mov    %r9d,%r11d
mov    %ecx,%r9d
mov    %esi,%ecx
cmp    $0xd,%esi
jb     1177 <fftm2s+0x57>
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %ecx,%edx
jmp    11e9 <fftm2s+0xc9>
cmp    $0x20,%r8d
jb     118f <fftm2s+0x6f>
lea    0xef1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r8d,%edx
jmp    11e9 <fftm2s+0xc9>
cmp    $0x18,%r9d
jb     11a7 <fftm2s+0x87>
lea    0xf0d(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r9d,%edx
jmp    11e9 <fftm2s+0xc9>
cmp    $0x3c,%r10d
jb     11bf <fftm2s+0x9f>
lea    0xf2a(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r10d,%edx
jmp    11e9 <fftm2s+0xc9>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     120c <fftm2s+0xec>
ucomisd 0xe2f(%rip),%xmm0
jae    120c <fftm2s+0xec>
cmp    $0x1a,%r11d
jl     121c <fftm2s+0xfc>
lea    0xf70(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r11d,%edx
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <ffpmsg@plt>
movl   $0x1a4,(%r14)
mov    $0x1a4,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret
cvttsd2si %xmm0,%edx
lea    0xefe(%rip),%rsi
jmp    114e <fftm2s+0x2e>
mov    0x70(%rsp),%rdi
lea    0x3(%r11),%eax
mov    $0x2,%ebx
test   %r11d,%r11d
cmovne %eax,%ebx
js     1258 <fftm2s+0x138>
mov    %ecx,%eax
or     %edx,%eax
or     %r8d,%eax
je     1268 <fftm2s+0x148>
sub    $0x8,%rsp
lea    0xf52(%rip),%rsi
mov    $0x1,%al
push   %r11
push   %rbx
push   %r10
call   1040 <sprintf@plt>
add    $0x20,%rsp
jmp    1282 <fftm2s+0x162>
lea    0xf2a(%rip),%rsi
xor    %eax,%eax
call   1040 <sprintf@plt>
jmp    1282 <fftm2s+0x162>
lea    0xf38(%rip),%rsi
mov    %r9d,%edx
mov    %r10d,%ecx
mov    %ebx,%r8d
mov    %r11d,%r9d
mov    $0x1,%al
call   1040 <sprintf@plt>
mov    (%r14),%eax
jmp    1204 <fftm2s+0xe4>

LLVM IR (-O0):
@.str = [55 x i8] c"input year value is out of range 0 - 9999: %d (fftm2s)\00"
@.str.1 = [54 x i8] c"input month value is out of range 0 - 12: %d (fftm2s)\00"
@.str.2 = [52 x i8] c"input day value is out of range 0 - 31: %d (fftm2s)\00"
@.str.3 = [53 x i8] c"input hour value is out of range 0 - 23: %d (fftm2s)\00"
@.str.4 = [55 x i8] c"input minute value is out of range 0 - 59: %d (fftm2s)\00"
@.str.5 = [59 x i8] c"input second value is out of range 0 - 60.999: %f (fftm2s)\00"
@.str.6 = [57 x i8] c"input decimals value is out of range 0 - 25: %d (fftm2s)\00"
@.str.7 = [15 x i8] c"%.4d-%.2d-%.2d\00"
@.str.8 = [17 x i8] c"%.2d:%.2d:%0*.*f\00"
@.str.9 = [32 x i8] c"%.4d-%.2d-%.2dT%.2d:%.2d:%0*.*f\00"
define i32 @fftm2s(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, double %5, i32 %6, i8* %7, i32* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca double
%17 = alloca i32
%18 = alloca i8*
%19 = alloca i32*
%20 = alloca i32
%21 = alloca [81 x i8]
store i32 %0, i32* %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store double %5, double* %16
store i32 %6, i32* %17
store i8* %7, i8** %18
store i32* %8, i32** %19
%22 = load i32*, i32** %19
%23 = load i32, i32* %22
%24 = icmp sgt i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %9
%26 = load i32*, i32** %19
%27 = load i32, i32* %26
store i32 %27, i32* %10
br label %171
28: ; preds = %9
%29 = load i32, i32* %11
%30 = icmp slt i32 %29, 0
br i1 %30, label %34, label %31
31: ; preds = %28
%32 = load i32, i32* %11
%33 = icmp sgt i32 %32, 9999
br i1 %33, label %34, label %41
34: ; preds = %31, %28
%35 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%36 = load i32, i32* %11
%37 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %35, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %36)
%38 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%39 = call i32 @ffpmsg(i8* %38)
%40 = load i32*, i32** %19
store i32 420, i32* %40
store i32 420, i32* %10
br label %171
41: ; preds = %31
%42 = load i32, i32* %12
%43 = icmp slt i32 %42, 0
br i1 %43, label %47, label %44
44: ; preds = %41
%45 = load i32, i32* %12
%46 = icmp sgt i32 %45, 12
br i1 %46, label %47, label %54
47: ; preds = %44, %41
%48 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%49 = load i32, i32* %12
%50 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %48, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 %49)
%51 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%52 = call i32 @ffpmsg(i8* %51)
%53 = load i32*, i32** %19
store i32 420, i32* %53
store i32 420, i32* %10
br label %171
54: ; preds = %44
%55 = load i32, i32* %13
%56 = icmp slt i32 %55, 0
br i1 %56, label %60, label %57
57: ; preds = %54
%58 = load i32, i32* %13
%59 = icmp sgt i32 %58, 31
br i1 %59, label %60, label %67
60: ; preds = %57, %54
%61 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%62 = load i32, i32* %13
%63 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %61, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), i32 %62)
%64 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%65 = call i32 @ffpmsg(i8* %64)
%66 = load i32*, i32** %19
store i32 420, i32* %66
store i32 420, i32* %10
br label %171
67: ; preds = %57
%68 = load i32, i32* %14
%69 = icmp slt i32 %68, 0
br i1 %69, label %73, label %70
70: ; preds = %67
%71 = load i32, i32* %14
%72 = icmp sgt i32 %71, 23
br i1 %72, label %73, label %80
73: ; preds = %70, %67
%74 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%75 = load i32, i32* %14
%76 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %74, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0), i32 %75)
%77 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%78 = call i32 @ffpmsg(i8* %77)
%79 = load i32*, i32** %19
store i32 420, i32* %79
store i32 420, i32* %10
br label %171
80: ; preds = %70
%81 = load i32, i32* %15
%82 = icmp slt i32 %81, 0
br i1 %82, label %86, label %83
83: ; preds = %80
%84 = load i32, i32* %15
%85 = icmp sgt i32 %84, 59
br i1 %85, label %86, label %93
86: ; preds = %83, %80
%87 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%88 = load i32, i32* %15
%89 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %87, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 %88)
%90 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%91 = call i32 @ffpmsg(i8* %90)
%92 = load i32*, i32** %19
store i32 420, i32* %92
store i32 420, i32* %10
br label %171
93: ; preds = %83
%94 = load double, double* %16
%95 = fcmp olt double %94, 0.000000e+00
br i1 %95, label %99, label %96
96: ; preds = %93
%97 = load double, double* %16
%98 = fcmp oge double %97, 6.100000e+01
br i1 %98, label %99, label %107
99: ; preds = %96, %93
%100 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%101 = load double, double* %16
%102 = fptosi double %101 to i32
%103 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %100, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0), i32 %102)
%104 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%105 = call i32 @ffpmsg(i8* %104)
%106 = load i32*, i32** %19
store i32 420, i32* %106
store i32 420, i32* %10
br label %171
107: ; preds = %96
%108 = load i32, i32* %17
%109 = icmp sgt i32 %108, 25
br i1 %109, label %110, label %117
110: ; preds = %107
%111 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%112 = load i32, i32* %17
%113 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %111, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.6, i64 0, i64 0), i32 %112)
%114 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%115 = call i32 @ffpmsg(i8* %114)
%116 = load i32*, i32** %19
store i32 420, i32* %116
store i32 420, i32* %10
br label %171
117: ; preds = %107
br label %118
118: ; preds = %117
br label %119
119: ; preds = %118
br label %120
120: ; preds = %119
br label %121
121: ; preds = %120
br label %122
122: ; preds = %121
br label %123
123: ; preds = %122
%124 = load i32, i32* %17
%125 = icmp eq i32 %124, 0
br i1 %125, label %126, label %127
126: ; preds = %123
store i32 2, i32* %20
br label %130
127: ; preds = %123
%128 = load i32, i32* %17
%129 = add nsw i32 %128, 3
store i32 %129, i32* %20
br label %130
130: ; preds = %127, %126
%131 = load i32, i32* %17
%132 = icmp slt i32 %131, 0
br i1 %132, label %133, label %139
133: ; preds = %130
%134 = load i8*, i8** %18
%135 = load i32, i32* %11
%136 = load i32, i32* %12
%137 = load i32, i32* %13
%138 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %134, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 %135, i32 %136, i32 %137)
br label %168
139: ; preds = %130
%140 = load i32, i32* %11
%141 = icmp eq i32 %140, 0
br i1 %141, label %142, label %156
142: ; preds = %139
%143 = load i32, i32* %12
%144 = icmp eq i32 %143, 0
br i1 %144, label %145, label %156
145: ; preds = %142
%146 = load i32, i32* %13
%147 = icmp eq i32 %146, 0
br i1 %147, label %148, label %156
148: ; preds = %145
%149 = load i8*, i8** %18
%150 = load i32, i32* %14
%151 = load i32, i32* %15
%152 = load i32, i32* %20
%153 = load i32, i32* %17
%154 = load double, double* %16
%155 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %149, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %150, i32 %151, i32 %152, i32 %153, double %154)
br label %167
156: ; preds = %145, %142, %139
%157 = load i8*, i8** %18
%158 = load i32, i32* %11
%159 = load i32, i32* %12
%160 = load i32, i32* %13
%161 = load i32, i32* %14
%162 = load i32, i32* %15
%163 = load i32, i32* %20
%164 = load i32, i32* %17
%165 = load double, double* %16
%166 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %157, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0), i32 %158, i32 %159, i32 %160, i32 %161, i32 %162, i32 %163, i32 %164, double %165)
br label %167
167: ; preds = %156, %148
br label %168
168: ; preds = %167, %133
%169 = load i32*, i32** %19
%170 = load i32, i32* %169
store i32 %170, i32* %10
br label %171
171: ; preds = %168, %110, %99, %86, %73, %60, %47, %34, %25
%172 = load i32, i32* %10
ret i32 %172
}

LLVM IR (-O2):
@.str = [55 x i8] c"input year value is out of range 0 - 9999: %d (fftm2s)\00"
@.str.1 = [54 x i8] c"input month value is out of range 0 - 12: %d (fftm2s)\00"
@.str.2 = [52 x i8] c"input day value is out of range 0 - 31: %d (fftm2s)\00"
@.str.3 = [53 x i8] c"input hour value is out of range 0 - 23: %d (fftm2s)\00"
@.str.4 = [55 x i8] c"input minute value is out of range 0 - 59: %d (fftm2s)\00"
@.str.5 = [59 x i8] c"input second value is out of range 0 - 60.999: %f (fftm2s)\00"
@.str.6 = [57 x i8] c"input decimals value is out of range 0 - 25: %d (fftm2s)\00"
@.str.7 = [15 x i8] c"%.4d-%.2d-%.2d\00"
@.str.8 = [17 x i8] c"%.2d:%.2d:%0*.*f\00"
@.str.9 = [32 x i8] c"%.4d-%.2d-%.2dT%.2d:%.2d:%0*.*f\00"
define i32 @fftm2s(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, double %5, i32 %6, i8* nocapture writeonly %7, i32* nocapture %8) {
%10 = alloca [81 x i8]
%11 = getelementptr inbounds [81 x i8], [81 x i8]* %10, i64 0, i64 0
%12 = load i32, i32* %8
%13 = icmp sgt i32 %12, 0
br i1 %13, label %69, label %14
14: ; preds = %9
%15 = icmp ugt i32 %0, 9999
br i1 %15, label %16, label %19
16: ; preds = %14
%17 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %0)
%18 = call i32 @ffpmsg(i8* %11)
store i32 420, i32* %8
br label %69
19: ; preds = %14
%20 = icmp ugt i32 %1, 12
br i1 %20, label %21, label %24
21: ; preds = %19
%22 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%23 = call i32 @ffpmsg(i8* %11)
store i32 420, i32* %8
br label %69
24: ; preds = %19
%25 = icmp ugt i32 %2, 31
br i1 %25, label %26, label %29
26: ; preds = %24
%27 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), i32 %2)
%28 = call i32 @ffpmsg(i8* %11)
store i32 420, i32* %8
br label %69
29: ; preds = %24
%30 = icmp ugt i32 %3, 23
br i1 %30, label %31, label %34
31: ; preds = %29
%32 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0), i32 %3)
%33 = call i32 @ffpmsg(i8* %11)
store i32 420, i32* %8
br label %69
34: ; preds = %29
%35 = icmp ugt i32 %4, 59
br i1 %35, label %36, label %39
36: ; preds = %34
%37 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 %4)
%38 = call i32 @ffpmsg(i8* %11)
store i32 420, i32* %8
br label %69
39: ; preds = %34
%40 = fcmp olt double %5, 0.000000e+00
%41 = fcmp oge double %5, 6.100000e+01
%42 = or i1 %40, %41
br i1 %42, label %43, label %47
43: ; preds = %39
%44 = fptosi double %5 to i32
%45 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0), i32 %44)
%46 = call i32 @ffpmsg(i8* %11)
store i32 420, i32* %8
br label %69
47: ; preds = %39
%48 = icmp sgt i32 %6, 25
br i1 %48, label %49, label %52
49: ; preds = %47
%50 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.6, i64 0, i64 0), i32 %6)
%51 = call i32 @ffpmsg(i8* %11)
store i32 420, i32* %8
br label %69
52: ; preds = %47
%53 = icmp eq i32 %6, 0
%54 = add nsw i32 %6, 3
%55 = select i1 %53, i32 2, i32 %54
%56 = icmp slt i32 %6, 0
br i1 %56, label %57, label %59
57: ; preds = %52
%58 = tail call i32 (i8*, i8*, i32, ...) @sprintf(i8* dereferenceable(1) %7, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
br label %67
59: ; preds = %52
%60 = or i32 %1, %0
%61 = or i32 %60, %2
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %59
%64 = tail call i32 (i8*, i8*, i32, ...) @sprintf(i8* dereferenceable(1) %7, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %3, i32 %4, i32 %55, i32 %6, double %5)
br label %67
65: ; preds = %59
%66 = tail call i32 (i8*, i8*, i32, ...) @sprintf(i8* dereferenceable(1) %7, i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %55, i32 %6, double %5)
br label %67
67: ; preds = %63, %65, %57
%68 = load i32, i32* %8
br label %69
69: ; preds = %9, %67, %49, %43, %36, %31, %26, %21, %16
%70 = phi i32 [ 420, %16 ], [ 420, %21 ], [ 420, %26 ], [ 420, %31 ], [ 420, %36 ], [ 420, %43 ], [ 420, %49 ], [ %68, %67 ], [ %12, %9 ]
ret i32 %70
}