#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 */
scalar_t__ getInt(int *, int);
int /*<<< orphan*/ getString(char *, int);
int /*<<< orphan*/ printString(char *);
int /*<<< orphan*/ putChar(char);
int /*<<< orphan*/ set_system_time(int /*<<< orphan*/, unsigned char *);
unsigned char tobcd(int);
char tolower(unsigned char);
void change_system_time() {
  unsigned char rtcdata[6] = {0};
  unsigned char buffer[100];
  unsigned char option;
  int hora, minuto, dia, mes, anio;
  printString("Cambiar hora del sistema? (S/N) ");
  getString((char *)buffer, 100);
  option = buffer[0];
  if (tolower(option) != 's' && tolower(option) != 'n') {
    printString("Input Errado!\n");
  }
  if (tolower(option) == 'n') {
    putChar('\n');
    return;
  }
  printString("Ingrese horas: ");
  if (getInt(&hora, 2) == 0) {
    printString("Input Errado!\n");
  }
  if (hora > 23) {
    printString("Input Errado!\n");
  }
  printString("Ingrese minutos: ");
  if (getInt(&minuto, 2) == 0) {
    printString("Input Errado!\n");
  }
  if (minuto > 59) {
    printString("Input Errado!\n");
  }
  printString("Ingrese dia del mes: ");
  if (getInt(&dia, 2) == 0) {
    printString("Input Errado!\n");
  }
  if (dia > 31) {
    printString("Input Errado!\n");
  }
  printString("Ingrese numero de mes: ");
  if (getInt(&mes, 2) == 0) {
    printString("Input Errado!\n");
  }
  if (mes > 12) {
    printString("Input Errado!\n");
  }
  printString("Ingrese los dos ultimos digitos del anio: ");
  if (getInt(&anio, 2) == 0) {
    printString("Input Errado!\n");
  }
  if (mes == 2 && (dia > 29)) {
    printString("Fecha Invalida!\n");
  }
  if (mes == 2 && (anio % 4 != 0) && (dia > 28)) {
    printString("Fecha Invalida!\n");
  }
  if ((mes == 4 || mes == 6 || mes == 9 || mes == 11) && dia > 30) {
    printString("Fecha Invalida!\n");
  }
  rtcdata[0] = 0;
  rtcdata[1] = tobcd(minuto);
  rtcdata[2] = tobcd(hora);
  rtcdata[3] = tobcd(dia);
  rtcdata[4] = tobcd(mes);
  rtcdata[5] = tobcd(anio);
  set_system_time(0, rtcdata);
}


x86 assembly (clang, -O0):
<change_system_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
lea    -0x6(%rbp),%rdi
xor    %esi,%esi
mov    $0x6,%edx
call   1060 <memset@plt>
lea    0xe5e(%rip),%rdi
call   1070 <printString@plt>
lea    -0x70(%rbp),%rdi
mov    $0x64,%esi
call   1030 <getString@plt>
mov    -0x70(%rbp),%al
mov    %al,-0x71(%rbp)
movzbl -0x71(%rbp),%edi
call   1090 <tolower@plt>
movsbl %al,%eax
cmp    $0x73,%eax
je     11f1 <change_system_time+0x71>
movzbl -0x71(%rbp),%edi
call   1090 <tolower@plt>
movsbl %al,%eax
cmp    $0x6e,%eax
je     11f1 <change_system_time+0x71>
lea    0xe35(%rip),%rdi
call   1070 <printString@plt>
movzbl -0x71(%rbp),%edi
call   1090 <tolower@plt>
movsbl %al,%eax
cmp    $0x6e,%eax
jne    1215 <change_system_time+0x95>
mov    $0xa,%edi
call   1080 <putChar@plt>
jmp    1459 <change_system_time+0x2d9>
lea    0xe14(%rip),%rdi
call   1070 <printString@plt>
lea    -0x78(%rbp),%rdi
mov    $0x2,%esi
call   10a0 <getInt@plt>
cmp    $0x0,%rax
jne    1245 <change_system_time+0xc5>
lea    0xde1(%rip),%rdi
call   1070 <printString@plt>
cmpl   $0x17,-0x78(%rbp)
jle    125b <change_system_time+0xdb>
lea    0xdcb(%rip),%rdi
call   1070 <printString@plt>
lea    0xdde(%rip),%rdi
call   1070 <printString@plt>
lea    -0x7c(%rbp),%rdi
mov    $0x2,%esi
call   10a0 <getInt@plt>
cmp    $0x0,%rax
jne    128b <change_system_time+0x10b>
lea    0xd9b(%rip),%rdi
call   1070 <printString@plt>
cmpl   $0x3b,-0x7c(%rbp)
jle    12a1 <change_system_time+0x121>
lea    0xd85(%rip),%rdi
call   1070 <printString@plt>
lea    0xdaa(%rip),%rdi
call   1070 <printString@plt>
lea    -0x80(%rbp),%rdi
mov    $0x2,%esi
call   10a0 <getInt@plt>
cmp    $0x0,%rax
jne    12d1 <change_system_time+0x151>
lea    0xd55(%rip),%rdi
call   1070 <printString@plt>
cmpl   $0x1f,-0x80(%rbp)
jle    12e7 <change_system_time+0x167>
lea    0xd3f(%rip),%rdi
call   1070 <printString@plt>
lea    0xd7a(%rip),%rdi
call   1070 <printString@plt>
lea    -0x84(%rbp),%rdi
mov    $0x2,%esi
call   10a0 <getInt@plt>
cmp    $0x0,%rax
jne    131a <change_system_time+0x19a>
lea    0xd0c(%rip),%rdi
call   1070 <printString@plt>
cmpl   $0xc,-0x84(%rbp)
jle    1333 <change_system_time+0x1b3>
lea    0xcf3(%rip),%rdi
call   1070 <printString@plt>
lea    0xd46(%rip),%rdi
call   1070 <printString@plt>
lea    -0x88(%rbp),%rdi
mov    $0x2,%esi
call   10a0 <getInt@plt>
cmp    $0x0,%rax
jne    1366 <change_system_time+0x1e6>
lea    0xcc0(%rip),%rdi
call   1070 <printString@plt>
cmpl   $0x2,-0x84(%rbp)
jne    1389 <change_system_time+0x209>
cmpl   $0x1d,-0x80(%rbp)
jle    1389 <change_system_time+0x209>
lea    0xd27(%rip),%rdi
call   1070 <printString@plt>
cmpl   $0x2,-0x84(%rbp)
jne    13c3 <change_system_time+0x243>
mov    -0x88(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     13c3 <change_system_time+0x243>
cmpl   $0x1c,-0x80(%rbp)
jle    13c3 <change_system_time+0x243>
lea    0xced(%rip),%rdi
call   1070 <printString@plt>
cmpl   $0x4,-0x84(%rbp)
je     13f7 <change_system_time+0x277>
cmpl   $0x6,-0x84(%rbp)
je     13f7 <change_system_time+0x277>
cmpl   $0x9,-0x84(%rbp)
je     13f7 <change_system_time+0x277>
cmpl   $0xb,-0x84(%rbp)
jne    140d <change_system_time+0x28d>
cmpl   $0x1e,-0x80(%rbp)
jle    140d <change_system_time+0x28d>
lea    0xca3(%rip),%rdi
call   1070 <printString@plt>
movb   $0x0,-0x6(%rbp)
mov    -0x7c(%rbp),%edi
call   1040 <tobcd@plt>
mov    %al,-0x5(%rbp)
mov    -0x78(%rbp),%edi
call   1040 <tobcd@plt>
mov    %al,-0x4(%rbp)
mov    -0x80(%rbp),%edi
call   1040 <tobcd@plt>
mov    %al,-0x3(%rbp)
mov    -0x84(%rbp),%edi
call   1040 <tobcd@plt>
mov    %al,-0x2(%rbp)
mov    -0x88(%rbp),%edi
call   1040 <tobcd@plt>
mov    %al,-0x1(%rbp)
lea    -0x6(%rbp),%rsi
xor    %edi,%edi
call   1050 <set_system_time@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<change_system_time>:
push   %rbx
sub    $0x90,%rsp
movw   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xe72(%rip),%rdi
call   1060 <printString@plt>
lea    0x20(%rsp),%rdi
mov    $0x64,%esi
call   1030 <getString@plt>
movzbl 0x20(%rsp),%ebx
mov    %ebx,%edi
call   1080 <tolower@plt>
cmp    $0x73,%al
je     11c9 <change_system_time+0x59>
mov    %ebx,%edi
call   1080 <tolower@plt>
cmp    $0x6e,%al
je     11c9 <change_system_time+0x59>
lea    0xe5d(%rip),%rdi
call   1060 <printString@plt>
mov    %ebx,%edi
call   1080 <tolower@plt>
cmp    $0x6e,%al
jne    11e3 <change_system_time+0x73>
mov    $0xa,%edi
call   1070 <putChar@plt>
jmp    13ab <change_system_time+0x23b>
lea    0xe46(%rip),%rdi
call   1060 <printString@plt>
lea    0x1c(%rsp),%rdi
mov    $0x2,%esi
call   1090 <getInt@plt>
test   %rax,%rax
je     13b4 <change_system_time+0x244>
cmpl   $0x18,0x1c(%rsp)
jl     121a <change_system_time+0xaa>
lea    0xe0c(%rip),%rdi
call   1060 <printString@plt>
lea    0xe1f(%rip),%rdi
call   1060 <printString@plt>
lea    0x18(%rsp),%rdi
mov    $0x2,%esi
call   1090 <getInt@plt>
test   %rax,%rax
je     13d0 <change_system_time+0x260>
cmpl   $0x3c,0x18(%rsp)
jl     1251 <change_system_time+0xe1>
lea    0xdd5(%rip),%rdi
call   1060 <printString@plt>
lea    0xdfa(%rip),%rdi
call   1060 <printString@plt>
lea    0x8(%rsp),%rdi
mov    $0x2,%esi
call   1090 <getInt@plt>
test   %rax,%rax
je     13ec <change_system_time+0x27c>
cmpl   $0x20,0x8(%rsp)
jl     1288 <change_system_time+0x118>
lea    0xd9e(%rip),%rdi
call   1060 <printString@plt>
lea    0xdd9(%rip),%rdi
call   1060 <printString@plt>
lea    0x4(%rsp),%rdi
mov    $0x2,%esi
call   1090 <getInt@plt>
test   %rax,%rax
je     1408 <change_system_time+0x298>
cmpl   $0xd,0x4(%rsp)
jl     12bf <change_system_time+0x14f>
lea    0xd67(%rip),%rdi
call   1060 <printString@plt>
lea    0xdba(%rip),%rdi
call   1060 <printString@plt>
lea    0x14(%rsp),%rdi
mov    $0x2,%esi
call   1090 <getInt@plt>
test   %rax,%rax
jne    12eb <change_system_time+0x17b>
lea    0xd3b(%rip),%rdi
call   1060 <printString@plt>
mov    0x4(%rsp),%eax
cmp    $0x2,%eax
jne    130b <change_system_time+0x19b>
cmpl   $0x1e,0x8(%rsp)
jl     130b <change_system_time+0x19b>
lea    0xda9(%rip),%rdi
call   1060 <printString@plt>
mov    0x4(%rsp),%eax
cmp    $0x2,%eax
jne    1333 <change_system_time+0x1c3>
testb  $0x3,0x14(%rsp)
mov    $0x2,%eax
je     1333 <change_system_time+0x1c3>
cmpl   $0x1d,0x8(%rsp)
jl     1333 <change_system_time+0x1c3>
lea    0xd81(%rip),%rdi
call   1060 <printString@plt>
mov    0x4(%rsp),%eax
and    $0xfffffffd,%eax
cmp    $0x4,%eax
setne  %cl
cmp    $0x9,%eax
setne  %al
test   %cl,%al
jne    1359 <change_system_time+0x1e9>
cmpl   $0x1f,0x8(%rsp)
jl     1359 <change_system_time+0x1e9>
lea    0xd57(%rip),%rdi
call   1060 <printString@plt>
movb   $0x0,0xc(%rsp)
mov    0x18(%rsp),%edi
call   1040 <tobcd@plt>
mov    %al,0xd(%rsp)
mov    0x1c(%rsp),%edi
call   1040 <tobcd@plt>
mov    %al,0xe(%rsp)
mov    0x8(%rsp),%edi
call   1040 <tobcd@plt>
mov    %al,0xf(%rsp)
mov    0x4(%rsp),%edi
call   1040 <tobcd@plt>
mov    %al,0x10(%rsp)
mov    0x14(%rsp),%edi
call   1040 <tobcd@plt>
mov    %al,0x11(%rsp)
lea    0xc(%rsp),%rsi
xor    %edi,%edi
call   1050 <set_system_time@plt>
add    $0x90,%rsp
pop    %rbx
ret
lea    0xc66(%rip),%rdi
call   1060 <printString@plt>
cmpl   $0x18,0x1c(%rsp)
jge    120e <change_system_time+0x9e>
jmp    121a <change_system_time+0xaa>
lea    0xc4a(%rip),%rdi
call   1060 <printString@plt>
cmpl   $0x3c,0x18(%rsp)
jge    1245 <change_system_time+0xd5>
jmp    1251 <change_system_time+0xe1>
lea    0xc2e(%rip),%rdi
call   1060 <printString@plt>
cmpl   $0x20,0x8(%rsp)
jge    127c <change_system_time+0x10c>
jmp    1288 <change_system_time+0x118>
lea    0xc12(%rip),%rdi
call   1060 <printString@plt>
cmpl   $0xd,0x4(%rsp)
jge    12b3 <change_system_time+0x143>
jmp    12bf <change_system_time+0x14f>

LLVM IR (-O0):
@.str = [33 x i8] c"Cambiar hora del sistema? (S/N) \00"
@.str.1 = [15 x i8] c"Input Errado!\0A\00"
@.str.2 = [16 x i8] c"Ingrese horas: \00"
@.str.3 = [18 x i8] c"Ingrese minutos: \00"
@.str.4 = [22 x i8] c"Ingrese dia del mes: \00"
@.str.5 = [24 x i8] c"Ingrese numero de mes: \00"
@.str.6 = [43 x i8] c"Ingrese los dos ultimos digitos del anio: \00"
@.str.7 = [17 x i8] c"Fecha Invalida!\0A\00"
define void @change_system_time() {
%1 = alloca [6 x i8]
%2 = alloca [100 x i8]
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = bitcast [6 x i8]* %1 to i8*
%10 = call i32 @printString(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%12 = call i32 @getString(i8* %11, i32 100)
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%14 = load i8, i8* %13
store i8 %14, i8* %3
%15 = load i8, i8* %3
%16 = call signext i8 @tolower(i8 zeroext %15)
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 115
br i1 %18, label %19, label %26
19: ; preds = %0
%20 = load i8, i8* %3
%21 = call signext i8 @tolower(i8 zeroext %20)
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 110
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %26
26: ; preds = %24, %19, %0
%27 = load i8, i8* %3
%28 = call signext i8 @tolower(i8 zeroext %27)
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 110
br i1 %30, label %31, label %33
31: ; preds = %26
%32 = call i32 @putChar(i8 signext 10)
br label %139
33: ; preds = %26
%34 = call i32 @printString(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%35 = call i64 @getInt(i32* %4, i32 2)
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %39
39: ; preds = %37, %33
%40 = load i32, i32* %4
%41 = icmp sgt i32 %40, 23
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %44
44: ; preds = %42, %39
%45 = call i32 @printString(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%46 = call i64 @getInt(i32* %5, i32 2)
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %44
%49 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %50
50: ; preds = %48, %44
%51 = load i32, i32* %5
%52 = icmp sgt i32 %51, 59
br i1 %52, label %53, label %55
53: ; preds = %50
%54 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %55
55: ; preds = %53, %50
%56 = call i32 @printString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%57 = call i64 @getInt(i32* %6, i32 2)
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %55
%60 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %61
61: ; preds = %59, %55
%62 = load i32, i32* %6
%63 = icmp sgt i32 %62, 31
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %66
66: ; preds = %64, %61
%67 = call i32 @printString(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%68 = call i64 @getInt(i32* %7, i32 2)
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %66
%71 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %72
72: ; preds = %70, %66
%73 = load i32, i32* %7
%74 = icmp sgt i32 %73, 12
br i1 %74, label %75, label %77
75: ; preds = %72
%76 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %77
77: ; preds = %75, %72
%78 = call i32 @printString(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0))
%79 = call i64 @getInt(i32* %8, i32 2)
%80 = icmp eq i64 %79, 0
br i1 %80, label %81, label %83
81: ; preds = %77
%82 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %83
83: ; preds = %81, %77
%84 = load i32, i32* %7
%85 = icmp eq i32 %84, 2
br i1 %85, label %86, label %91
86: ; preds = %83
%87 = load i32, i32* %6
%88 = icmp sgt i32 %87, 29
br i1 %88, label %89, label %91
89: ; preds = %86
%90 = call i32 @printString(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
br label %91
91: ; preds = %89, %86, %83
%92 = load i32, i32* %7
%93 = icmp eq i32 %92, 2
br i1 %93, label %94, label %103
94: ; preds = %91
%95 = load i32, i32* %8
%96 = srem i32 %95, 4
%97 = icmp ne i32 %96, 0
br i1 %97, label %98, label %103
98: ; preds = %94
%99 = load i32, i32* %6
%100 = icmp sgt i32 %99, 28
br i1 %100, label %101, label %103
101: ; preds = %98
%102 = call i32 @printString(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
br label %103
103: ; preds = %101, %98, %94, %91
%104 = load i32, i32* %7
%105 = icmp eq i32 %104, 4
br i1 %105, label %115, label %106
106: ; preds = %103
%107 = load i32, i32* %7
%108 = icmp eq i32 %107, 6
br i1 %108, label %115, label %109
109: ; preds = %106
%110 = load i32, i32* %7
%111 = icmp eq i32 %110, 9
br i1 %111, label %115, label %112
112: ; preds = %109
%113 = load i32, i32* %7
%114 = icmp eq i32 %113, 11
br i1 %114, label %115, label %120
115: ; preds = %112, %109, %106, %103
%116 = load i32, i32* %6
%117 = icmp sgt i32 %116, 30
br i1 %117, label %118, label %120
118: ; preds = %115
%119 = call i32 @printString(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
br label %120
120: ; preds = %118, %115, %112
%121 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
store i8 0, i8* %121
%122 = load i32, i32* %5
%123 = call zeroext i8 @tobcd(i32 %122)
%124 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 1
store i8 %123, i8* %124
%125 = load i32, i32* %4
%126 = call zeroext i8 @tobcd(i32 %125)
%127 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 2
store i8 %126, i8* %127
%128 = load i32, i32* %6
%129 = call zeroext i8 @tobcd(i32 %128)
%130 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 3
store i8 %129, i8* %130
%131 = load i32, i32* %7
%132 = call zeroext i8 @tobcd(i32 %131)
%133 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 4
store i8 %132, i8* %133
%134 = load i32, i32* %8
%135 = call zeroext i8 @tobcd(i32 %134)
%136 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 5
store i8 %135, i8* %136
%137 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%138 = call i32 @set_system_time(i32 0, i8* %137)
br label %139
139: ; preds = %120, %31
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Cambiar hora del sistema? (S/N) \00"
@.str.1 = [15 x i8] c"Input Errado!\0A\00"
@.str.2 = [16 x i8] c"Ingrese horas: \00"
@.str.3 = [18 x i8] c"Ingrese minutos: \00"
@.str.4 = [22 x i8] c"Ingrese dia del mes: \00"
@.str.5 = [24 x i8] c"Ingrese numero de mes: \00"
@.str.6 = [43 x i8] c"Ingrese los dos ultimos digitos del anio: \00"
@.str.7 = [17 x i8] c"Fecha Invalida!\0A\00"
define void @change_system_time() {
%1 = alloca [6 x i8]
%2 = alloca [100 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = tail call i32 @printString(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @getString(i8* %9, i32 100)
%17 = load i8, i8* %9
%18 = call signext i8 @tolower(i8 zeroext %17)
%19 = icmp eq i8 %18, 115
br i1 %19, label %25, label %20
20: ; preds = %0
%21 = call signext i8 @tolower(i8 zeroext %17)
%22 = icmp eq i8 %21, 110
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %25
25: ; preds = %23, %20, %0
%26 = call signext i8 @tolower(i8 zeroext %17)
%27 = icmp eq i8 %26, 110
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 @putChar(i8 signext 10)
br label %130
30: ; preds = %25
%31 = call i32 @printString(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%32 = call i64 @getInt(i32* %3, i32 2)
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %36
36: ; preds = %34, %30
%37 = load i32, i32* %3
%38 = icmp sgt i32 %37, 23
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %41
41: ; preds = %39, %36
%42 = call i32 @printString(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%43 = call i64 @getInt(i32* %4, i32 2)
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %41
%46 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %47
47: ; preds = %45, %41
%48 = load i32, i32* %4
%49 = icmp sgt i32 %48, 59
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %52
52: ; preds = %50, %47
%53 = call i32 @printString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%54 = call i64 @getInt(i32* %5, i32 2)
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %52
%57 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %58
58: ; preds = %56, %52
%59 = load i32, i32* %5
%60 = icmp sgt i32 %59, 31
br i1 %60, label %61, label %63
61: ; preds = %58
%62 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %63
63: ; preds = %61, %58
%64 = call i32 @printString(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%65 = call i64 @getInt(i32* %6, i32 2)
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %63
%68 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %69
69: ; preds = %67, %63
%70 = load i32, i32* %6
%71 = icmp sgt i32 %70, 12
br i1 %71, label %72, label %74
72: ; preds = %69
%73 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %74
74: ; preds = %72, %69
%75 = call i32 @printString(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0))
%76 = call i64 @getInt(i32* %7, i32 2)
%77 = icmp eq i64 %76, 0
br i1 %77, label %78, label %80
78: ; preds = %74
%79 = call i32 @printString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %80
80: ; preds = %78, %74
%81 = load i32, i32* %6
%82 = icmp eq i32 %81, 2
%83 = load i32, i32* %5
%84 = icmp sgt i32 %83, 29
%85 = select i1 %82, i1 %84, i1 false
br i1 %85, label %86, label %89
86: ; preds = %80
%87 = call i32 @printString(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%88 = load i32, i32* %6
br label %89
89: ; preds = %86, %80
%90 = phi i32 [ %88, %86 ], [ %81, %80 ]
%91 = icmp eq i32 %90, 2
br i1 %91, label %92, label %102
92: ; preds = %89
%93 = load i32, i32* %7
%94 = and i32 %93, 3
%95 = icmp ne i32 %94, 0
%96 = load i32, i32* %5
%97 = icmp sgt i32 %96, 28
%98 = select i1 %95, i1 %97, i1 false
br i1 %98, label %99, label %102
99: ; preds = %92
%100 = call i32 @printString(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%101 = load i32, i32* %6
br label %102
102: ; preds = %99, %92, %89
%103 = phi i32 [ %101, %99 ], [ 2, %92 ], [ %90, %89 ]
%104 = and i32 %103, -3
%105 = icmp eq i32 %104, 4
%106 = icmp eq i32 %104, 9
%107 = or i1 %106, %105
%108 = load i32, i32* %5
%109 = icmp sgt i32 %108, 30
%110 = select i1 %107, i1 %109, i1 false
br i1 %110, label %111, label %113
111: ; preds = %102
%112 = call i32 @printString(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
br label %113
113: ; preds = %102, %111
store i8 0, i8* %8
%114 = load i32, i32* %4
%115 = call zeroext i8 @tobcd(i32 %114)
%116 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 1
store i8 %115, i8* %116
%117 = load i32, i32* %3
%118 = call zeroext i8 @tobcd(i32 %117)
%119 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 2
store i8 %118, i8* %119
%120 = load i32, i32* %5
%121 = call zeroext i8 @tobcd(i32 %120)
%122 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 3
store i8 %121, i8* %122
%123 = load i32, i32* %6
%124 = call zeroext i8 @tobcd(i32 %123)
%125 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 4
store i8 %124, i8* %125
%126 = load i32, i32* %7
%127 = call zeroext i8 @tobcd(i32 %126)
%128 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 5
store i8 %127, i8* %128
%129 = call i32 @set_system_time(i32 0, i8* %8)
br label %130
130: ; preds = %113, %28
ret void
}