#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *,
                           char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
int gen_set_timekeeping_defs(FILE *fp) {
  char *aux, *streamtype, streamno[5];
  int i;
  for (i = 0; i < 2 * 12; i++) {
    if (i % 12 == 0) {
      aux = "";
      streamno[0] = '\0';
    } else {
      aux = "aux";
      sprintf(streamno, "%d", i % 12);
    }
    if (i < 12) {
      streamtype = "input";
    } else {
      streamtype = (i % 12 == 0) ? "history" : "hist";
    }
    fprintf(fp, " INTEGER :: %s%s%s_interval  , &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_interval_d, &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_interval_h, &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_interval_m, &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_interval_s   \n", aux, streamtype,
            streamno);
    fprintf(fp, " INTEGER :: %s%s%s_begin  ,    &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_begin_y,    &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_begin_d,    &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_begin_h,    &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_begin_m,    &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_begin_s      \n", aux, streamtype,
            streamno);
    fprintf(fp, " INTEGER :: %s%s%s_end  ,      &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_end_y,      &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_end_d,      &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_end_h,      &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_end_m,      &\n", aux, streamtype,
            streamno);
    fprintf(fp, "            %s%s%s_end_s        \n", aux, streamtype,
            streamno);
  }
  return 0;
}


x86 assembly (clang, -O0):
<gen_set_timekeeping_defs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x18,-0x24(%rbp)
jge    13b3 <gen_set_timekeeping_defs+0x293>
mov    -0x24(%rbp),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1165 <gen_set_timekeeping_defs+0x45>
lea    0x1103(%rip),%rax
mov    %rax,-0x10(%rbp)
movb   $0x0,-0x1d(%rbp)
jmp    118b <gen_set_timekeeping_defs+0x6b>
lea    0xe94(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x1d(%rbp),%rdi
mov    -0x24(%rbp),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
lea    0xe7e(%rip),%rsi
call   1040 <sprintf@plt>
cmpl   $0xc,-0x24(%rbp)
jge    11a5 <gen_set_timekeeping_defs+0x85>
lea    0xe6b(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    11c9 <gen_set_timekeeping_defs+0xa9>
mov    -0x24(%rbp),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
lea    0xe5e(%rip),%rax
lea    0xe4f(%rip),%rcx
cmp    $0x0,%edx
cmove  %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe3a(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe40(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe46(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe4c(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe52(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe58(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe5e(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe64(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe6a(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe70(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe76(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe7c(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe82(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe88(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe8e(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x1d(%rbp),%r8
lea    0xe9a(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1133 <gen_set_timekeeping_defs+0x13>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_set_timekeeping_defs>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
lea    0x3(%rsp),%r15
lea    0x10fe(%rip),%r14
jmp    1330 <gen_set_timekeeping_defs+0x210>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebp,%eax
mov    $0xaaaaaaab,%ecx
imul   %rcx,%rax
shr    $0x23,%rax
shl    $0x2,%eax
lea    (%rax,%rax,2),%edx
neg    %edx
add    %ebp,%edx
mov    %r15,%rdi
lea    0xe91(%rip),%rsi
call   1040 <sprintf@plt>
lea    0xe96(%rip),%r12
lea    0xe7a(%rip),%r13
cmp    $0xc,%ebp
lea    0xe77(%rip),%rax
cmovb  %rax,%r12
mov    %rbx,%rdi
lea    0xe7c(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xe86(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xe90(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xe9a(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xea4(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xeae(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xeb8(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xec2(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xecc(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xed6(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xee0(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xeea(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xef4(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xefe(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xf08(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
lea    0xf12(%rip),%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1030 <fprintf@plt>
add    $0x1,%ebp
cmp    $0x18,%ebp
je     1365 <gen_set_timekeeping_defs+0x245>
movzbl %bpl,%eax
imul   $0xab,%eax,%ecx
shr    $0x9,%ecx
and    $0xfffffffc,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %cl,%al
jne    1150 <gen_set_timekeeping_defs+0x30>
movb   $0x0,0x3(%rsp)
lea    0xcb4(%rip),%r12
lea    0xefb(%rip),%r13
jmp    1186 <gen_set_timekeeping_defs+0x66>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"aux\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [6 x i8] c"input\00"
@.str.4 = [8 x i8] c"history\00"
@.str.5 = [5 x i8] c"hist\00"
@.str.6 = [34 x i8] c" INTEGER :: %s%s%s_interval , &\0A\00"
@.str.7 = [34 x i8] c" %s%s%s_interval_d, &\0A\00"
@.str.8 = [34 x i8] c" %s%s%s_interval_h, &\0A\00"
@.str.9 = [34 x i8] c" %s%s%s_interval_m, &\0A\00"
@.str.10 = [34 x i8] c" %s%s%s_interval_s \0A\00"
@.str.11 = [34 x i8] c" INTEGER :: %s%s%s_begin , &\0A\00"
@.str.12 = [34 x i8] c" %s%s%s_begin_y, &\0A\00"
@.str.13 = [34 x i8] c" %s%s%s_begin_d, &\0A\00"
@.str.14 = [34 x i8] c" %s%s%s_begin_h, &\0A\00"
@.str.15 = [34 x i8] c" %s%s%s_begin_m, &\0A\00"
@.str.16 = [34 x i8] c" %s%s%s_begin_s \0A\00"
@.str.17 = [34 x i8] c" INTEGER :: %s%s%s_end , &\0A\00"
@.str.18 = [34 x i8] c" %s%s%s_end_y, &\0A\00"
@.str.19 = [34 x i8] c" %s%s%s_end_d, &\0A\00"
@.str.20 = [34 x i8] c" %s%s%s_end_h, &\0A\00"
@.str.21 = [34 x i8] c" %s%s%s_end_m, &\0A\00"
@.str.22 = [34 x i8] c" %s%s%s_end_s \0A\00"
define i32 @gen_set_timekeeping_defs(i32* %0) {
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [5 x i8]
%6 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %6
br label %7
7: ; preds = %117, %1
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 24
br i1 %9, label %10, label %120
10: ; preds = %7
%11 = load i32, i32* %6
%12 = srem i32 %11, 12
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %10
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %3
%15 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
store i8 0, i8* %15
br label %21
16: ; preds = %10
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %3
%17 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%18 = load i32, i32* %6
%19 = srem i32 %18, 12
%20 = call i32 @sprintf(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %16, %14
%22 = load i32, i32* %6
%23 = icmp slt i32 %22, 12
br i1 %23, label %24, label %25
24: ; preds = %21
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %4
br label %31
25: ; preds = %21
%26 = load i32, i32* %6
%27 = srem i32 %26, 12
%28 = icmp eq i32 %27, 0
%29 = zext i1 %28 to i64
%30 = select i1 %28, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0)
store i8* %30, i8** %4
br label %31
31: ; preds = %25, %24
%32 = load i32*, i32** %2
%33 = load i8*, i8** %3
%34 = load i8*, i8** %4
%35 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%36 = call i32 @fprintf(i32* %32, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i8* %33, i8* %34, i8* %35)
%37 = load i32*, i32** %2
%38 = load i8*, i8** %3
%39 = load i8*, i8** %4
%40 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%41 = call i32 @fprintf(i32* %37, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0), i8* %38, i8* %39, i8* %40)
%42 = load i32*, i32** %2
%43 = load i8*, i8** %3
%44 = load i8*, i8** %4
%45 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%46 = call i32 @fprintf(i32* %42, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0), i8* %43, i8* %44, i8* %45)
%47 = load i32*, i32** %2
%48 = load i8*, i8** %3
%49 = load i8*, i8** %4
%50 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%51 = call i32 @fprintf(i32* %47, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), i8* %48, i8* %49, i8* %50)
%52 = load i32*, i32** %2
%53 = load i8*, i8** %3
%54 = load i8*, i8** %4
%55 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%56 = call i32 @fprintf(i32* %52, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), i8* %53, i8* %54, i8* %55)
%57 = load i32*, i32** %2
%58 = load i8*, i8** %3
%59 = load i8*, i8** %4
%60 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%61 = call i32 @fprintf(i32* %57, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.11, i64 0, i64 0), i8* %58, i8* %59, i8* %60)
%62 = load i32*, i32** %2
%63 = load i8*, i8** %3
%64 = load i8*, i8** %4
%65 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%66 = call i32 @fprintf(i32* %62, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.12, i64 0, i64 0), i8* %63, i8* %64, i8* %65)
%67 = load i32*, i32** %2
%68 = load i8*, i8** %3
%69 = load i8*, i8** %4
%70 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%71 = call i32 @fprintf(i32* %67, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0), i8* %68, i8* %69, i8* %70)
%72 = load i32*, i32** %2
%73 = load i8*, i8** %3
%74 = load i8*, i8** %4
%75 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%76 = call i32 @fprintf(i32* %72, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0), i8* %73, i8* %74, i8* %75)
%77 = load i32*, i32** %2
%78 = load i8*, i8** %3
%79 = load i8*, i8** %4
%80 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%81 = call i32 @fprintf(i32* %77, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0), i8* %78, i8* %79, i8* %80)
%82 = load i32*, i32** %2
%83 = load i8*, i8** %3
%84 = load i8*, i8** %4
%85 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%86 = call i32 @fprintf(i32* %82, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.16, i64 0, i64 0), i8* %83, i8* %84, i8* %85)
%87 = load i32*, i32** %2
%88 = load i8*, i8** %3
%89 = load i8*, i8** %4
%90 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%91 = call i32 @fprintf(i32* %87, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.17, i64 0, i64 0), i8* %88, i8* %89, i8* %90)
%92 = load i32*, i32** %2
%93 = load i8*, i8** %3
%94 = load i8*, i8** %4
%95 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%96 = call i32 @fprintf(i32* %92, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.18, i64 0, i64 0), i8* %93, i8* %94, i8* %95)
%97 = load i32*, i32** %2
%98 = load i8*, i8** %3
%99 = load i8*, i8** %4
%100 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%101 = call i32 @fprintf(i32* %97, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.19, i64 0, i64 0), i8* %98, i8* %99, i8* %100)
%102 = load i32*, i32** %2
%103 = load i8*, i8** %3
%104 = load i8*, i8** %4
%105 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%106 = call i32 @fprintf(i32* %102, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.20, i64 0, i64 0), i8* %103, i8* %104, i8* %105)
%107 = load i32*, i32** %2
%108 = load i8*, i8** %3
%109 = load i8*, i8** %4
%110 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%111 = call i32 @fprintf(i32* %107, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.21, i64 0, i64 0), i8* %108, i8* %109, i8* %110)
%112 = load i32*, i32** %2
%113 = load i8*, i8** %3
%114 = load i8*, i8** %4
%115 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%116 = call i32 @fprintf(i32* %112, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.22, i64 0, i64 0), i8* %113, i8* %114, i8* %115)
br label %117
117: ; preds = %31
%118 = load i32, i32* %6
%119 = add nsw i32 %118, 1
store i32 %119, i32* %6
br label %7
120: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"aux\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [6 x i8] c"input\00"
@.str.4 = [8 x i8] c"history\00"
@.str.5 = [5 x i8] c"hist\00"
@.str.6 = [34 x i8] c" INTEGER :: %s%s%s_interval , &\0A\00"
@.str.7 = [34 x i8] c" %s%s%s_interval_d, &\0A\00"
@.str.8 = [34 x i8] c" %s%s%s_interval_h, &\0A\00"
@.str.9 = [34 x i8] c" %s%s%s_interval_m, &\0A\00"
@.str.10 = [34 x i8] c" %s%s%s_interval_s \0A\00"
@.str.11 = [34 x i8] c" INTEGER :: %s%s%s_begin , &\0A\00"
@.str.12 = [34 x i8] c" %s%s%s_begin_y, &\0A\00"
@.str.13 = [34 x i8] c" %s%s%s_begin_d, &\0A\00"
@.str.14 = [34 x i8] c" %s%s%s_begin_h, &\0A\00"
@.str.15 = [34 x i8] c" %s%s%s_begin_m, &\0A\00"
@.str.16 = [34 x i8] c" %s%s%s_begin_s \0A\00"
@.str.17 = [34 x i8] c" INTEGER :: %s%s%s_end , &\0A\00"
@.str.18 = [34 x i8] c" %s%s%s_end_y, &\0A\00"
@.str.19 = [34 x i8] c" %s%s%s_end_d, &\0A\00"
@.str.20 = [34 x i8] c" %s%s%s_end_h, &\0A\00"
@.str.21 = [34 x i8] c" %s%s%s_end_m, &\0A\00"
@.str.22 = [34 x i8] c" %s%s%s_end_s \0A\00"
define i32 @gen_set_timekeeping_defs(i32* nocapture %0) {
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
br label %4
4: ; preds = %1, %13
%5 = phi i32 [ 0, %1 ], [ %35, %13 ]
%6 = trunc i32 %5 to i8
%7 = urem i8 %6, 12
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %4
store i8 0, i8* %3
br label %13
10: ; preds = %4
%11 = zext i8 %7 to i32
%12 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %10, %9
%14 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), %10 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), %9 ]
%15 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %10 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %9 ]
%16 = icmp ult i32 %5, 12
%17 = select i1 %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %14
%18 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%19 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%20 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%21 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%22 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%23 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.11, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%24 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.12, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%25 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%26 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%27 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%28 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.16, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%29 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.17, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%30 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.18, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%31 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.19, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%32 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.20, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%33 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.21, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%34 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.22, i64 0, i64 0), i8* %15, i8* %17, i8* %3)
%35 = add nuw nsw i32 %5, 1
%36 = icmp eq i32 %35, 24
br i1 %36, label %37, label %4
37: ; preds = %13
ret i32 0
}