#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 {
  char tm_mday;
  char tm_mon;
  char tm_wday;
};

/* Variables and functions */
char atoi(char *);
int /*<<< orphan*/ gotoxy(char, char);
int /*<<< orphan*/ invertColors();
int mktime(struct tm *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ restoreColors();
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
void drawCalendar(struct tm *timeinfo) {
  char i;
  char wk1;
  char wk_offset;
  char day_offset;
  char today;
  char month;
  char buf[15];
  today = timeinfo->tm_mday;
  month = timeinfo->tm_mon;
  wk1 = 0;
  wk_offset = 0;
  day_offset = 0;
  gotoxy(3, 2);
  strftime(buf, 15, "%B %Y", timeinfo);
  printf("%s Calendar", buf);
  gotoxy(3, 4);
  printf("Su Mo Tu We Th Fr Sa  Wk");
  for (i = 0; i < 8; i++) {
    gotoxy(3, 5 + i);
    printf("                        ");
  }
  for (i = 1; i < 32; i++) {
    timeinfo->tm_mday = i;
    if (mktime(timeinfo) != -1) {
      if (i == 1) {
        day_offset = timeinfo->tm_wday;
        strftime(buf, 3, "%U", timeinfo);
        wk1 = atoi(buf);
        gotoxy(25, 5);
        printf("%d", wk1);
      } else if (timeinfo->tm_wday == 0 && month == timeinfo->tm_mon) {
        wk_offset++;
        day_offset = 0;
        gotoxy(25, 5 + wk_offset);
        printf("%d", wk1 + wk_offset);
      }
      if (month == timeinfo->tm_mon) {
        if (i == today) {
          invertColors();
        }
        gotoxy((day_offset * 3) + 3, wk_offset + 5);
        printf("%d", timeinfo->tm_mday);
        day_offset++;
        if (i == today) {
          restoreColors();
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<drawCalendar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0xe(%rbp)
movb   $0x0,-0xa(%rbp)
movb   $0x0,-0xb(%rbp)
movb   $0x0,-0xc(%rbp)
mov    $0x3,%edi
mov    $0x2,%esi
call   1080 <gotoxy@plt>
lea    -0x1d(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0xf,%esi
lea    0xe42(%rip),%rdx
call   1070 <strftime@plt>
lea    -0x1d(%rbp),%rsi
lea    0xe38(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   1080 <gotoxy@plt>
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movb   $0x0,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x8,%eax
jge    1232 <drawCalendar+0xc2>
movsbl -0x9(%rbp),%eax
add    $0x5,%eax
mov    $0x3,%edi
movsbl %al,%esi
call   1080 <gotoxy@plt>
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x9(%rbp),%al
add    $0x1,%al
mov    %al,-0x9(%rbp)
jmp    11f6 <drawCalendar+0x86>
movb   $0x1,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x20,%eax
jge    13bb <drawCalendar+0x24b>
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rdi
call   1060 <mktime@plt>
cmp    $0xffffffff,%eax
je     13a9 <drawCalendar+0x239>
movsbl -0x9(%rbp),%eax
cmp    $0x1,%eax
jne    12c0 <drawCalendar+0x150>
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%al
mov    %al,-0xc(%rbp)
lea    -0x1d(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x3,%esi
lea    0xdbb(%rip),%rdx
call   1070 <strftime@plt>
lea    -0x1d(%rbp),%rdi
call   1090 <atoi@plt>
mov    %al,-0xa(%rbp)
mov    $0x19,%edi
mov    $0x5,%esi
call   1080 <gotoxy@plt>
movsbl -0xa(%rbp),%esi
lea    0xd93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1322 <drawCalendar+0x1b2>
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x0,%eax
jne    131d <drawCalendar+0x1ad>
movsbl -0xe(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
cmp    %ecx,%eax
jne    131d <drawCalendar+0x1ad>
mov    -0xb(%rbp),%al
add    $0x1,%al
mov    %al,-0xb(%rbp)
movb   $0x0,-0xc(%rbp)
movsbl -0xb(%rbp),%eax
add    $0x5,%eax
mov    $0x19,%edi
movsbl %al,%esi
call   1080 <gotoxy@plt>
movsbl -0xa(%rbp),%esi
movsbl -0xb(%rbp),%eax
add    %eax,%esi
lea    0xd31(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1322 <drawCalendar+0x1b2>
movsbl -0xe(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
cmp    %ecx,%eax
jne    13a4 <drawCalendar+0x234>
movsbl -0x9(%rbp),%eax
movsbl -0xd(%rbp),%ecx
cmp    %ecx,%eax
jne    134d <drawCalendar+0x1dd>
mov    $0x0,%al
call   1030 <invertColors@plt>
movsbl -0xc(%rbp),%eax
imul   $0x3,%eax,%eax
add    $0x3,%eax
mov    %al,%cl
movsbl -0xb(%rbp),%eax
add    $0x5,%eax
movsbl %cl,%edi
movsbl %al,%esi
call   1080 <gotoxy@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%esi
lea    0xcce(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%al
add    $0x1,%al
mov    %al,-0xc(%rbp)
movsbl -0x9(%rbp),%eax
movsbl -0xd(%rbp),%ecx
cmp    %ecx,%eax
jne    139f <drawCalendar+0x22f>
mov    $0x0,%al
call   1050 <restoreColors@plt>
jmp    13a4 <drawCalendar+0x234>
jmp    13a9 <drawCalendar+0x239>
jmp    13ae <drawCalendar+0x23e>
mov    -0x9(%rbp),%al
add    $0x1,%al
mov    %al,-0x9(%rbp)
jmp    1236 <drawCalendar+0xc6>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawCalendar>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
mov    (%rdi),%r13b
mov    0x1(%rdi),%r12b
mov    $0x3,%edi
mov    $0x2,%esi
call   1080 <gotoxy@plt>
lea    0xe62(%rip),%rdx
lea    0x9(%rsp),%r14
mov    %r14,%rdi
mov    $0xf,%esi
mov    %rbx,%rcx
call   1070 <strftime@plt>
lea    0xe4c(%rip),%rdi
xor    %ebp,%ebp
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   1080 <gotoxy@plt>
lea    0xe36(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x5,%esi
call   1080 <gotoxy@plt>
lea    0xe32(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1080 <gotoxy@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x7,%esi
call   1080 <gotoxy@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x8,%esi
call   1080 <gotoxy@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x9,%esi
call   1080 <gotoxy@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0xa,%esi
call   1080 <gotoxy@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0xb,%esi
call   1080 <gotoxy@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0xc,%esi
call   1080 <gotoxy@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movb   $0x1,(%rbx)
mov    %rbx,%rdi
call   1060 <mktime@plt>
mov    $0x0,%r14d
cmp    $0xffffffff,%eax
je     1364 <drawCalendar+0x1f4>
mov    0x2(%rbx),%bpl
lea    0xd6d(%rip),%rdx
lea    0x9(%rsp),%r14
mov    %r14,%rdi
mov    $0x3,%esi
mov    %rbx,%rcx
call   1070 <strftime@plt>
mov    %r14,%rdi
call   1090 <atoi@plt>
mov    %eax,%r14d
mov    $0x19,%edi
mov    $0x5,%esi
call   1080 <gotoxy@plt>
movsbl %r14b,%esi
lea    0xd36(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    0x1(%rbx),%r12b
jne    1364 <drawCalendar+0x1f4>
cmp    $0x1,%r13b
jne    132b <drawCalendar+0x1bb>
xor    %eax,%eax
call   1030 <invertColors@plt>
movzbl %bpl,%ebp
lea    0x0(%rbp,%rbp,2),%eax
add    $0x3,%al
movsbl %al,%edi
mov    $0x5,%esi
call   1080 <gotoxy@plt>
movsbl (%rbx),%esi
lea    0xcfb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%bpl
cmp    $0x1,%r13b
jne    1364 <drawCalendar+0x1f4>
xor    %eax,%eax
call   1050 <restoreColors@plt>
movsbl %r14b,%eax
mov    %eax,0x4(%rsp)
mov    $0x2,%r14b
xor    %r15d,%r15d
mov    %r12b,0x3(%rsp)
jmp    138e <drawCalendar+0x21e>
nopl   0x0(%rax)
add    $0x1,%r14b
cmp    $0x20,%r14b
je     1445 <drawCalendar+0x2d5>
mov    %r14b,(%rbx)
mov    %rbx,%rdi
call   1060 <mktime@plt>
cmp    $0xffffffff,%eax
je     1380 <drawCalendar+0x210>
cmpb   $0x0,0x2(%rbx)
jne    13f0 <drawCalendar+0x280>
cmp    0x1(%rbx),%r12b
jne    13f0 <drawCalendar+0x280>
lea    0x1(%r15),%r12d
movsbl %r12b,%ebp
add    0x4(%rsp),%ebp
add    $0x6,%r15b
movsbl %r15b,%esi
mov    $0x19,%edi
call   1080 <gotoxy@plt>
lea    0xc78(%rip),%rdi
mov    %ebp,%esi
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12d,%r15d
movzbl 0x3(%rsp),%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    0x1(%rbx),%r12b
jne    1380 <drawCalendar+0x210>
cmp    %r14b,%r13b
jne    1402 <drawCalendar+0x292>
xor    %eax,%eax
call   1030 <invertColors@plt>
movzbl %bpl,%ebp
lea    0x0(%rbp,%rbp,2),%eax
add    $0x3,%al
lea    0x5(%r15),%ecx
movsbl %al,%edi
movsbl %cl,%esi
call   1080 <gotoxy@plt>
movsbl (%rbx),%esi
lea    0xc22(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%bpl
cmp    %r14b,%r13b
jne    1380 <drawCalendar+0x210>
xor    %eax,%eax
call   1050 <restoreColors@plt>
jmp    1380 <drawCalendar+0x210>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i8, i8, i8 }
@.str = [6 x i8] c"%B %Y\00"
@.str.1 = [12 x i8] c"%s Calendar\00"
@.str.2 = [25 x i8] c"Su Mo Tu We Th Fr Sa Wk\00"
@.str.3 = [25 x i8] c" \00"
@.str.4 = [3 x i8] c"%U\00"
@.str.5 = [3 x i8] c"%d\00"
define void @drawCalendar(%struct.tm* %0) {
%2 = alloca %struct.tm*
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca [15 x i8]
store %struct.tm* %0, %struct.tm** %2
%10 = load %struct.tm*, %struct.tm** %2
%11 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 0
%12 = load i8, i8* %11
store i8 %12, i8* %7
%13 = load %struct.tm*, %struct.tm** %2
%14 = getelementptr inbounds %struct.tm, %struct.tm* %13, i32 0, i32 1
%15 = load i8, i8* %14
store i8 %15, i8* %8
store i8 0, i8* %4
store i8 0, i8* %5
store i8 0, i8* %6
%16 = call i32 @gotoxy(i8 signext 3, i8 signext 2)
%17 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%18 = load %struct.tm*, %struct.tm** %2
%19 = call i32 @strftime(i8* %17, i32 15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.tm* %18)
%20 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %20)
%22 = call i32 @gotoxy(i8 signext 3, i8 signext 4)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
store i8 0, i8* %3
br label %24
24: ; preds = %35, %1
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = icmp slt i32 %26, 8
br i1 %27, label %28, label %38
28: ; preds = %24
%29 = load i8, i8* %3
%30 = sext i8 %29 to i32
%31 = add nsw i32 5, %30
%32 = trunc i32 %31 to i8
%33 = call i32 @gotoxy(i8 signext 3, i8 signext %32)
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %35
35: ; preds = %28
%36 = load i8, i8* %3
%37 = add i8 %36, 1
store i8 %37, i8* %3
br label %24
38: ; preds = %24
store i8 1, i8* %3
br label %39
39: ; preds = %140, %38
%40 = load i8, i8* %3
%41 = sext i8 %40 to i32
%42 = icmp slt i32 %41, 32
br i1 %42, label %43, label %143
43: ; preds = %39
%44 = load i8, i8* %3
%45 = load %struct.tm*, %struct.tm** %2
%46 = getelementptr inbounds %struct.tm, %struct.tm* %45, i32 0, i32 0
store i8 %44, i8* %46
%47 = load %struct.tm*, %struct.tm** %2
%48 = call i32 @mktime(%struct.tm* %47)
%49 = icmp ne i32 %48, -1
br i1 %49, label %50, label %139
50: ; preds = %43
%51 = load i8, i8* %3
%52 = sext i8 %51 to i32
%53 = icmp eq i32 %52, 1
br i1 %53, label %54, label %67
54: ; preds = %50
%55 = load %struct.tm*, %struct.tm** %2
%56 = getelementptr inbounds %struct.tm, %struct.tm* %55, i32 0, i32 2
%57 = load i8, i8* %56
store i8 %57, i8* %6
%58 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%59 = load %struct.tm*, %struct.tm** %2
%60 = call i32 @strftime(i8* %58, i32 3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), %struct.tm* %59)
%61 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%62 = call signext i8 @atoi(i8* %61)
store i8 %62, i8* %4
%63 = call i32 @gotoxy(i8 signext 25, i8 signext 5)
%64 = load i8, i8* %4
%65 = sext i8 %64 to i32
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %65)
br label %96
67: ; preds = %50
%68 = load %struct.tm*, %struct.tm** %2
%69 = getelementptr inbounds %struct.tm, %struct.tm* %68, i32 0, i32 2
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %95
73: ; preds = %67
%74 = load i8, i8* %8
%75 = sext i8 %74 to i32
%76 = load %struct.tm*, %struct.tm** %2
%77 = getelementptr inbounds %struct.tm, %struct.tm* %76, i32 0, i32 1
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = icmp eq i32 %75, %79
br i1 %80, label %81, label %95
81: ; preds = %73
%82 = load i8, i8* %5
%83 = add i8 %82, 1
store i8 %83, i8* %5
store i8 0, i8* %6
%84 = load i8, i8* %5
%85 = sext i8 %84 to i32
%86 = add nsw i32 5, %85
%87 = trunc i32 %86 to i8
%88 = call i32 @gotoxy(i8 signext 25, i8 signext %87)
%89 = load i8, i8* %4
%90 = sext i8 %89 to i32
%91 = load i8, i8* %5
%92 = sext i8 %91 to i32
%93 = add nsw i32 %90, %92
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %93)
br label %95
95: ; preds = %81, %73, %67
br label %96
96: ; preds = %95, %54
%97 = load i8, i8* %8
%98 = sext i8 %97 to i32
%99 = load %struct.tm*, %struct.tm** %2
%100 = getelementptr inbounds %struct.tm, %struct.tm* %99, i32 0, i32 1
%101 = load i8, i8* %100
%102 = sext i8 %101 to i32
%103 = icmp eq i32 %98, %102
br i1 %103, label %104, label %138
104: ; preds = %96
%105 = load i8, i8* %3
%106 = sext i8 %105 to i32
%107 = load i8, i8* %7
%108 = sext i8 %107 to i32
%109 = icmp eq i32 %106, %108
br i1 %109, label %110, label %112
110: ; preds = %104
%111 = call i32 (...) @invertColors()
br label %112
112: ; preds = %110, %104
%113 = load i8, i8* %6
%114 = sext i8 %113 to i32
%115 = mul nsw i32 %114, 3
%116 = add nsw i32 %115, 3
%117 = trunc i32 %116 to i8
%118 = load i8, i8* %5
%119 = sext i8 %118 to i32
%120 = add nsw i32 %119, 5
%121 = trunc i32 %120 to i8
%122 = call i32 @gotoxy(i8 signext %117, i8 signext %121)
%123 = load %struct.tm*, %struct.tm** %2
%124 = getelementptr inbounds %struct.tm, %struct.tm* %123, i32 0, i32 0
%125 = load i8, i8* %124
%126 = sext i8 %125 to i32
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %126)
%128 = load i8, i8* %6
%129 = add i8 %128, 1
store i8 %129, i8* %6
%130 = load i8, i8* %3
%131 = sext i8 %130 to i32
%132 = load i8, i8* %7
%133 = sext i8 %132 to i32
%134 = icmp eq i32 %131, %133
br i1 %134, label %135, label %137
135: ; preds = %112
%136 = call i32 (...) @restoreColors()
br label %137
137: ; preds = %135, %112
br label %138
138: ; preds = %137, %96
br label %139
139: ; preds = %138, %43
br label %140
140: ; preds = %139
%141 = load i8, i8* %3
%142 = add i8 %141, 1
store i8 %142, i8* %3
br label %39
143: ; preds = %39
ret void
}

LLVM IR (-O2):
%struct.tm = type { i8, i8, i8 }
@.str = [6 x i8] c"%B %Y\00"
@.str.1 = [12 x i8] c"%s Calendar\00"
@.str.2 = [25 x i8] c"Su Mo Tu We Th Fr Sa Wk\00"
@.str.3 = [25 x i8] c" \00"
@.str.4 = [3 x i8] c"%U\00"
@.str.5 = [3 x i8] c"%d\00"
define void @drawCalendar(%struct.tm* %0) {
%2 = alloca [15 x i8]
%3 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%4 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 0
%5 = load i8, i8* %4
%6 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 1
%7 = load i8, i8* %6
%8 = tail call i32 @gotoxy(i8 signext 3, i8 signext 2)
%9 = call i32 @strftime(i8* %3, i32 15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.tm* %0)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%11 = call i32 @gotoxy(i8 signext 3, i8 signext 4)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 @gotoxy(i8 signext 3, i8 signext 5)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @gotoxy(i8 signext 3, i8 signext 6)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%17 = call i32 @gotoxy(i8 signext 3, i8 signext 7)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @gotoxy(i8 signext 3, i8 signext 8)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%21 = call i32 @gotoxy(i8 signext 3, i8 signext 9)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%23 = call i32 @gotoxy(i8 signext 3, i8 signext 10)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%25 = call i32 @gotoxy(i8 signext 3, i8 signext 11)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%27 = call i32 @gotoxy(i8 signext 3, i8 signext 12)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%29 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 2
store i8 1, i8* %4
%30 = call i32 @mktime(%struct.tm* %0)
%31 = icmp eq i32 %30, -1
br i1 %31, label %55, label %32
32: ; preds = %1
%33 = load i8, i8* %29
%34 = call i32 @strftime(i8* %3, i32 3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), %struct.tm* %0)
%35 = call signext i8 @atoi(i8* %3)
%36 = call i32 @gotoxy(i8 signext 25, i8 signext 5)
%37 = sext i8 %35 to i32
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %37)
%39 = load i8, i8* %6
%40 = icmp eq i8 %7, %39
br i1 %40, label %41, label %55
41: ; preds = %32
%42 = icmp eq i8 %5, 1
br i1 %42, label %43, label %45
43: ; preds = %41
%44 = call i32 (...) @invertColors()
br label %45
45: ; preds = %43, %41
%46 = mul i8 %33, 3
%47 = add i8 %46, 3
%48 = call i32 @gotoxy(i8 signext %47, i8 signext 5)
%49 = load i8, i8* %4
%50 = sext i8 %49 to i32
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %50)
%52 = add i8 %33, 1
br i1 %42, label %53, label %55
53: ; preds = %45
%54 = call i32 (...) @restoreColors()
br label %55
55: ; preds = %1, %32, %45, %53
%56 = phi i8 [ %52, %53 ], [ %52, %45 ], [ %33, %32 ], [ 0, %1 ]
%57 = phi i8 [ %35, %53 ], [ %35, %45 ], [ %35, %32 ], [ 0, %1 ]
%58 = sext i8 %57 to i32
br label %59
59: ; preds = %55, %98
%60 = phi i8 [ 2, %55 ], [ %101, %98 ]
%61 = phi i8 [ %56, %55 ], [ %100, %98 ]
%62 = phi i8 [ 0, %55 ], [ %99, %98 ]
store i8 %60, i8* %4
%63 = call i32 @mktime(%struct.tm* %0)
%64 = icmp eq i32 %63, -1
br i1 %64, label %98, label %65
65: ; preds = %59
%66 = load i8, i8* %29
%67 = icmp eq i8 %66, 0
br i1 %67, label %68, label %78
68: ; preds = %65
%69 = load i8, i8* %6
%70 = icmp eq i8 %7, %69
br i1 %70, label %71, label %78
71: ; preds = %68
%72 = add i8 %62, 1
%73 = sext i8 %72 to i32
%74 = add i8 %62, 6
%75 = call i32 @gotoxy(i8 signext 25, i8 signext %74)
%76 = add nsw i32 %58, %73
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %76)
br label %78
78: ; preds = %65, %68, %71
%79 = phi i8 [ %72, %71 ], [ %62, %68 ], [ %62, %65 ]
%80 = phi i8 [ 0, %71 ], [ %61, %68 ], [ %61, %65 ]
%81 = load i8, i8* %6
%82 = icmp eq i8 %7, %81
br i1 %82, label %83, label %98
83: ; preds = %78
%84 = icmp eq i8 %60, %5
br i1 %84, label %85, label %87
85: ; preds = %83
%86 = call i32 (...) @invertColors()
br label %87
87: ; preds = %85, %83
%88 = mul i8 %80, 3
%89 = add i8 %88, 3
%90 = add i8 %79, 5
%91 = call i32 @gotoxy(i8 signext %89, i8 signext %90)
%92 = load i8, i8* %4
%93 = sext i8 %92 to i32
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %93)
%95 = add i8 %80, 1
br i1 %84, label %96, label %98
96: ; preds = %87
%97 = call i32 (...) @restoreColors()
br label %98
98: ; preds = %59, %87, %96, %78
%99 = phi i8 [ %79, %96 ], [ %79, %87 ], [ %79, %78 ], [ %62, %59 ]
%100 = phi i8 [ %95, %96 ], [ %95, %87 ], [ %80, %78 ], [ %61, %59 ]
%101 = add nuw nsw i8 %60, 1
%102 = icmp eq i8 %101, 32
br i1 %102, label %103, label %59
103: ; preds = %98
ret void
}