#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*/ time_t;
struct winsize {
  int ws_col;
  int ws_row;
};
struct tm {
  int tm_hour;
  int tm_min;
  int tm_sec;
};

/* Variables and functions */
int /*<<< orphan*/ TIOCGWINSZ;
int /*<<< orphan*/ cls();
int /*<<< orphan*/ draw_circle(int, int, int);
int /*<<< orphan*/ draw_hand(int, int, char, int, int);
int /*<<< orphan*/ draw_text(int, int, char *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, struct winsize *);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ sprintf(char *, char *, int, int, int);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  char digital_time[32];
  int sXmax, sYmax, sXmaxo, sYmaxo, smax, hand_max, sXcen, sYcen;
  time_t t;
  struct tm *ltime;
  struct winsize ws;
  sXmaxo = sYmaxo = sXmax = sYmax = 0;
  sXcen = sYcen = 0;
  hand_max = 0;
  while (1) {
    sXmaxo = sXmax;
    sYmaxo = sYmax;
    ioctl(1, TIOCGWINSZ, &ws);
    sXmax = ws.ws_col;
    if (sXmax == 0)
      sXmax = 80;
    sYmax = ws.ws_row;
    if (sYmax == 0)
      sYmax = 24;
    if (sXmax != sXmaxo || sYmax != sYmaxo) {
      if (sXmax / 2 <= sYmax)
        smax = sXmax / 2;
      else
        smax = sYmax;
      hand_max = (smax / 2) - 1;
      sXcen = sXmax / 2;
      sYcen = sYmax / 2;
      cls();
      draw_circle(hand_max, sYcen, sXcen);
    }
    time(&t);
    ltime = localtime(&t);
    draw_hand((ltime->tm_hour * 5) + (ltime->tm_min / 10), 2 * hand_max / 3,
              'h', sXcen, sYcen);
    draw_hand(ltime->tm_min, hand_max - 2, 'm', sXcen, sYcen);
    draw_hand(ltime->tm_sec, hand_max - 1, '.', sXcen, sYcen);
    draw_text(sXcen - 4, sYcen - (3 * hand_max / 5), "RetroBSD");
    sprintf(digital_time, "[%02d:%02d:%02d]", ltime->tm_hour, ltime->tm_min,
            ltime->tm_sec);
    draw_text(sXcen - 5, sYcen + (3 * hand_max / 5), digital_time);
    fflush(stdout);
    sleep(1);
    draw_hand((ltime->tm_hour * 5) + (ltime->tm_min / 10), 2 * hand_max / 3,
              ' ', sXcen, sYcen);
    draw_hand(ltime->tm_min, hand_max - 2, ' ', sXcen, sYcen);
    draw_hand(ltime->tm_sec, hand_max - 1, ' ', sXcen, sYcen);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    0x2dd6(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
lea    -0x68(%rbp),%rdx
call   1060 <ioctl@plt>
mov    -0x68(%rbp),%eax
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jne    1221 <main+0x81>
movl   $0x50,-0x34(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x38(%rbp)
jne    1238 <main+0x98>
movl   $0x18,-0x38(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jne    1250 <main+0xb0>
mov    -0x38(%rbp),%eax
cmp    -0x40(%rbp),%eax
je     12bf <main+0x11f>
mov    -0x34(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    -0x38(%rbp),%eax
jg     1277 <main+0xd7>
mov    -0x34(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x44(%rbp)
jmp    127d <main+0xdd>
mov    -0x38(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x34(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4c(%rbp)
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x50(%rbp)
mov    $0x0,%al
call   10a0 <cls@plt>
mov    -0x48(%rbp),%edi
mov    -0x50(%rbp),%esi
mov    -0x4c(%rbp),%edx
call   1030 <draw_circle@plt>
lea    -0x54(%rbp),%rdi
call   1080 <time@plt>
lea    -0x54(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
imul   $0x5,(%rax),%edi
mov    -0x60(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    %eax,%edi
mov    -0x48(%rbp),%eax
shl    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0x4c(%rbp),%ecx
mov    -0x50(%rbp),%r8d
mov    $0x68,%edx
call   1070 <draw_hand@plt>
mov    -0x60(%rbp),%rax
mov    0x4(%rax),%edi
mov    -0x48(%rbp),%esi
sub    $0x2,%esi
mov    -0x4c(%rbp),%ecx
mov    -0x50(%rbp),%r8d
mov    $0x6d,%edx
call   1070 <draw_hand@plt>
mov    -0x60(%rbp),%rax
mov    0x8(%rax),%edi
mov    -0x48(%rbp),%esi
sub    $0x1,%esi
mov    -0x4c(%rbp),%ecx
mov    -0x50(%rbp),%r8d
mov    $0x2e,%edx
call   1070 <draw_hand@plt>
mov    -0x4c(%rbp),%edi
sub    $0x4,%edi
mov    -0x50(%rbp),%esi
imul   $0x3,-0x48(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
sub    %eax,%esi
lea    0xc98(%rip),%rdx
call   1050 <draw_text@plt>
lea    -0x30(%rbp),%rdi
mov    -0x60(%rbp),%rax
mov    (%rax),%edx
mov    -0x60(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x60(%rbp),%rax
mov    0x8(%rax),%r8d
lea    0xc7c(%rip),%rsi
call   10b0 <sprintf@plt>
mov    -0x4c(%rbp),%edi
sub    $0x5,%edi
mov    -0x50(%rbp),%esi
imul   $0x3,-0x48(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
add    %eax,%esi
lea    -0x30(%rbp),%rdx
call   1050 <draw_text@plt>
mov    0x2c27(%rip),%rax
mov    (%rax),%edi
call   1090 <fflush@plt>
mov    $0x1,%edi
call   10c0 <sleep@plt>
mov    -0x60(%rbp),%rax
imul   $0x5,(%rax),%edi
mov    -0x60(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    %eax,%edi
mov    -0x48(%rbp),%eax
shl    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0x4c(%rbp),%ecx
mov    -0x50(%rbp),%r8d
mov    $0x20,%edx
call   1070 <draw_hand@plt>
mov    -0x60(%rbp),%rax
mov    0x4(%rax),%edi
mov    -0x48(%rbp),%esi
sub    $0x2,%esi
mov    -0x4c(%rbp),%ecx
mov    -0x50(%rbp),%r8d
mov    $0x20,%edx
call   1070 <draw_hand@plt>
mov    -0x60(%rbp),%rax
mov    0x8(%rax),%edi
mov    -0x48(%rbp),%esi
sub    $0x1,%esi
mov    -0x4c(%rbp),%ecx
mov    -0x50(%rbp),%r8d
mov    $0x20,%edx
call   1070 <draw_hand@plt>
jmp    11e7 <main+0x47>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
xor    %r12d,%r12d
xor    %eax,%eax
mov    %rax,0x28(%rsp)
xor    %eax,%eax
mov    %rax,0x20(%rsp)
movl   $0x0,0xc(%rsp)
xor    %ebx,%ebx
jmp    13be <main+0x21e>
xchg   %ax,%ax
mov    %r14d,%r15d
shr    $0x1f,%r15d
add    %r14d,%r15d
sar    %r15d
cmp    %r13d,%r15d
mov    %r15d,%eax
cmovg  %r13d,%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
add    $0xffffffff,%ebx
mov    %r13d,%ebp
shr    $0x1f,%ebp
add    %r13d,%ebp
sar    %ebp
xor    %eax,%eax
call   10a0 <cls@plt>
mov    %rbx,0x28(%rsp)
mov    %ebx,%edi
mov    %ebp,0xc(%rsp)
mov    %ebp,%esi
mov    %r15,0x20(%rsp)
mov    %r15d,%edx
call   1030 <draw_circle@plt>
lea    0x3c(%rsp),%rbx
mov    %rbx,%rdi
call   1080 <time@plt>
mov    %rbx,%rdi
call   1040 <localtime@plt>
mov    %rax,%r12
mov    (%rax),%eax
lea    (%rax,%rax,4),%eax
movslq 0x4(%r12),%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rdi
sar    $0x2,%edi
add    %ecx,%edi
add    %eax,%edi
mov    0x28(%rsp),%rbx
lea    (%rbx,%rbx,1),%eax
cltq
mov    %r13d,0x18(%rsp)
imul   $0x55555556,%rax,%r13
mov    %r13,%rax
shr    $0x3f,%rax
shr    $0x20,%r13
add    %eax,%r13d
mov    %r13d,%esi
mov    $0x68,%edx
mov    0x20(%rsp),%r15
mov    %r15d,%ecx
mov    0xc(%rsp),%ebp
mov    %ebp,%r8d
call   1070 <draw_hand@plt>
mov    0x4(%r12),%edi
lea    -0x2(%rbx),%esi
mov    %esi,0x14(%rsp)
mov    $0x6d,%edx
mov    %r15d,%ecx
mov    %ebp,%r8d
call   1070 <draw_hand@plt>
mov    0x8(%r12),%edi
lea    -0x1(%rbx),%esi
mov    %esi,0x10(%rsp)
mov    $0x2e,%edx
mov    %r15d,%ecx
mov    %ebp,%r8d
call   1070 <draw_hand@plt>
lea    -0x4(%r15),%edi
lea    (%rbx,%rbx,2),%eax
cltq
imul   $0x66666667,%rax,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x21,%rbx
add    %eax,%ebx
mov    %ebp,%esi
sub    %ebx,%esi
lea    0xd06(%rip),%rdx
call   1050 <draw_text@plt>
mov    (%r12),%edx
mov    0x4(%r12),%ecx
mov    0x8(%r12),%r8d
mov    %r14d,0x1c(%rsp)
lea    0x40(%rsp),%r14
mov    %r14,%rdi
lea    0xce8(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x5(%r15),%edi
add    %ebp,%ebx
mov    %ebx,%esi
mov    %r14,%rdx
mov    0x1c(%rsp),%ebx
call   1050 <draw_text@plt>
mov    0x2c9f(%rip),%rax
mov    (%rax),%edi
call   1090 <fflush@plt>
mov    $0x1,%edi
call   10c0 <sleep@plt>
mov    (%r12),%eax
lea    (%rax,%rax,4),%eax
movslq 0x4(%r12),%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdi
add    %ecx,%edi
add    %eax,%edi
mov    %r13d,%esi
mov    $0x20,%edx
mov    %r15d,%ecx
mov    %ebp,%r8d
call   1070 <draw_hand@plt>
mov    0x4(%r12),%edi
mov    0x14(%rsp),%esi
mov    $0x20,%edx
mov    %r15d,%ecx
mov    %ebp,%r8d
call   1070 <draw_hand@plt>
mov    0x8(%r12),%edi
mov    0x10(%rsp),%esi
mov    $0x20,%edx
mov    %r15d,%ecx
mov    %ebp,%r8d
call   1070 <draw_hand@plt>
mov    0x18(%rsp),%r12d
mov    0x2c0b(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
lea    0x30(%rsp),%rdx
call   1060 <ioctl@plt>
mov    0x30(%rsp),%r14d
mov    0x34(%rsp),%r13d
test   %r14d,%r14d
mov    $0x50,%eax
cmove  %eax,%r14d
test   %r13d,%r13d
mov    $0x18,%eax
cmove  %eax,%r13d
cmp    %ebx,%r14d
jne    11d0 <main+0x30>
cmp    %r12d,%r13d
je     121f <main+0x7f>
jmp    11d0 <main+0x30>

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
%struct.winsize = type { i32, i32 }
@TIOCGWINSZ = global i32 0
@.str = [9 x i8] c"RetroBSD\00"
@.str.1 = [17 x i8] c"[%02d:%02d:%02d]\00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [32 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca %struct.tm*
%17 = alloca %struct.winsize
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
store i32 0, i32* %7
store i32 0, i32* %10
store i32 0, i32* %9
store i32 0, i32* %14
store i32 0, i32* %13
store i32 0, i32* %12
br label %18
18: ; preds = %2, %65
%19 = load i32, i32* %7
store i32 %19, i32* %9
%20 = load i32, i32* %8
store i32 %20, i32* %10
%21 = load i32, i32* @TIOCGWINSZ
%22 = call i32 @ioctl(i32 1, i32 %21, %struct.winsize* %17)
%23 = getelementptr inbounds %struct.winsize, %struct.winsize* %17, i32 0, i32 0
%24 = load i32, i32* %23
store i32 %24, i32* %7
%25 = load i32, i32* %7
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %18
store i32 80, i32* %7
br label %28
28: ; preds = %27, %18
%29 = getelementptr inbounds %struct.winsize, %struct.winsize* %17, i32 0, i32 1
%30 = load i32, i32* %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %28
store i32 24, i32* %8
br label %34
34: ; preds = %33, %28
%35 = load i32, i32* %7
%36 = load i32, i32* %9
%37 = icmp ne i32 %35, %36
br i1 %37, label %42, label %38
38: ; preds = %34
%39 = load i32, i32* %8
%40 = load i32, i32* %10
%41 = icmp ne i32 %39, %40
br i1 %41, label %42, label %65
42: ; preds = %38, %34
%43 = load i32, i32* %7
%44 = sdiv i32 %43, 2
%45 = load i32, i32* %8
%46 = icmp sle i32 %44, %45
br i1 %46, label %47, label %50
47: ; preds = %42
%48 = load i32, i32* %7
%49 = sdiv i32 %48, 2
store i32 %49, i32* %11
br label %52
50: ; preds = %42
%51 = load i32, i32* %8
store i32 %51, i32* %11
br label %52
52: ; preds = %50, %47
%53 = load i32, i32* %11
%54 = sdiv i32 %53, 2
%55 = sub nsw i32 %54, 1
store i32 %55, i32* %12
%56 = load i32, i32* %7
%57 = sdiv i32 %56, 2
store i32 %57, i32* %13
%58 = load i32, i32* %8
%59 = sdiv i32 %58, 2
store i32 %59, i32* %14
%60 = call i32 (...) @cls()
%61 = load i32, i32* %12
%62 = load i32, i32* %14
%63 = load i32, i32* %13
%64 = call i32 @draw_circle(i32 %61, i32 %62, i32 %63)
br label %65
65: ; preds = %52, %38
%66 = call i32 @time(i32* %15)
%67 = call %struct.tm* @localtime(i32* %15)
store %struct.tm* %67, %struct.tm** %16
%68 = load %struct.tm*, %struct.tm** %16
%69 = getelementptr inbounds %struct.tm, %struct.tm* %68, i32 0, i32 0
%70 = load i32, i32* %69
%71 = mul nsw i32 %70, 5
%72 = load %struct.tm*, %struct.tm** %16
%73 = getelementptr inbounds %struct.tm, %struct.tm* %72, i32 0, i32 1
%74 = load i32, i32* %73
%75 = sdiv i32 %74, 10
%76 = add nsw i32 %71, %75
%77 = load i32, i32* %12
%78 = mul nsw i32 2, %77
%79 = sdiv i32 %78, 3
%80 = load i32, i32* %13
%81 = load i32, i32* %14
%82 = call i32 @draw_hand(i32 %76, i32 %79, i8 signext 104, i32 %80, i32 %81)
%83 = load %struct.tm*, %struct.tm** %16
%84 = getelementptr inbounds %struct.tm, %struct.tm* %83, i32 0, i32 1
%85 = load i32, i32* %84
%86 = load i32, i32* %12
%87 = sub nsw i32 %86, 2
%88 = load i32, i32* %13
%89 = load i32, i32* %14
%90 = call i32 @draw_hand(i32 %85, i32 %87, i8 signext 109, i32 %88, i32 %89)
%91 = load %struct.tm*, %struct.tm** %16
%92 = getelementptr inbounds %struct.tm, %struct.tm* %91, i32 0, i32 2
%93 = load i32, i32* %92
%94 = load i32, i32* %12
%95 = sub nsw i32 %94, 1
%96 = load i32, i32* %13
%97 = load i32, i32* %14
%98 = call i32 @draw_hand(i32 %93, i32 %95, i8 signext 46, i32 %96, i32 %97)
%99 = load i32, i32* %13
%100 = sub nsw i32 %99, 4
%101 = load i32, i32* %14
%102 = load i32, i32* %12
%103 = mul nsw i32 3, %102
%104 = sdiv i32 %103, 5
%105 = sub nsw i32 %101, %104
%106 = call i32 @draw_text(i32 %100, i32 %105, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%107 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%108 = load %struct.tm*, %struct.tm** %16
%109 = getelementptr inbounds %struct.tm, %struct.tm* %108, i32 0, i32 0
%110 = load i32, i32* %109
%111 = load %struct.tm*, %struct.tm** %16
%112 = getelementptr inbounds %struct.tm, %struct.tm* %111, i32 0, i32 1
%113 = load i32, i32* %112
%114 = load %struct.tm*, %struct.tm** %16
%115 = getelementptr inbounds %struct.tm, %struct.tm* %114, i32 0, i32 2
%116 = load i32, i32* %115
%117 = call i32 @sprintf(i8* %107, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %110, i32 %113, i32 %116)
%118 = load i32, i32* %13
%119 = sub nsw i32 %118, 5
%120 = load i32, i32* %14
%121 = load i32, i32* %12
%122 = mul nsw i32 3, %121
%123 = sdiv i32 %122, 5
%124 = add nsw i32 %120, %123
%125 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%126 = call i32 @draw_text(i32 %119, i32 %124, i8* %125)
%127 = load i32, i32* @stdout
%128 = call i32 @fflush(i32 %127)
%129 = call i32 @sleep(i32 1)
%130 = load %struct.tm*, %struct.tm** %16
%131 = getelementptr inbounds %struct.tm, %struct.tm* %130, i32 0, i32 0
%132 = load i32, i32* %131
%133 = mul nsw i32 %132, 5
%134 = load %struct.tm*, %struct.tm** %16
%135 = getelementptr inbounds %struct.tm, %struct.tm* %134, i32 0, i32 1
%136 = load i32, i32* %135
%137 = sdiv i32 %136, 10
%138 = add nsw i32 %133, %137
%139 = load i32, i32* %12
%140 = mul nsw i32 2, %139
%141 = sdiv i32 %140, 3
%142 = load i32, i32* %13
%143 = load i32, i32* %14
%144 = call i32 @draw_hand(i32 %138, i32 %141, i8 signext 32, i32 %142, i32 %143)
%145 = load %struct.tm*, %struct.tm** %16
%146 = getelementptr inbounds %struct.tm, %struct.tm* %145, i32 0, i32 1
%147 = load i32, i32* %146
%148 = load i32, i32* %12
%149 = sub nsw i32 %148, 2
%150 = load i32, i32* %13
%151 = load i32, i32* %14
%152 = call i32 @draw_hand(i32 %147, i32 %149, i8 signext 32, i32 %150, i32 %151)
%153 = load %struct.tm*, %struct.tm** %16
%154 = getelementptr inbounds %struct.tm, %struct.tm* %153, i32 0, i32 2
%155 = load i32, i32* %154
%156 = load i32, i32* %12
%157 = sub nsw i32 %156, 1
%158 = load i32, i32* %13
%159 = load i32, i32* %14
%160 = call i32 @draw_hand(i32 %155, i32 %157, i8 signext 32, i32 %158, i32 %159)
br label %18
}

LLVM IR (-O2):
%struct.winsize = type { i32, i32 }
%struct.tm = type { i32, i32, i32 }
@TIOCGWINSZ = global i32 0
@.str = [9 x i8] c"RetroBSD\00"
@.str.1 = [17 x i8] c"[%02d:%02d:%02d]\00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [32 x i8]
%4 = alloca i32
%5 = alloca %struct.winsize
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%7 = bitcast i32* %4 to i8*
%8 = bitcast %struct.winsize* %5 to i8*
%9 = getelementptr inbounds %struct.winsize, %struct.winsize* %5, i64 0, i32 0
%10 = getelementptr inbounds %struct.winsize, %struct.winsize* %5, i64 0, i32 1
br label %11
11: ; preds = %37, %2
%12 = phi i32 [ 0, %2 ], [ %24, %37 ]
%13 = phi i32 [ 0, %2 ], [ %38, %37 ]
%14 = phi i32 [ 0, %2 ], [ %39, %37 ]
%15 = phi i32 [ 0, %2 ], [ %40, %37 ]
%16 = phi i32 [ 0, %2 ], [ %21, %37 ]
%17 = load i32, i32* @TIOCGWINSZ
%18 = call i32 @ioctl(i32 1, i32 %17, %struct.winsize* %5)
%19 = load i32, i32* %9
%20 = icmp eq i32 %19, 0
%21 = select i1 %20, i32 80, i32 %19
%22 = load i32, i32* %10
%23 = icmp eq i32 %22, 0
%24 = select i1 %23, i32 24, i32 %22
%25 = icmp eq i32 %21, %16
%26 = icmp eq i32 %24, %12
%27 = select i1 %25, i1 %26, i1 false
br i1 %27, label %37, label %28
28: ; preds = %11
%29 = sdiv i32 %21, 2
%30 = icmp sgt i32 %29, %24
%31 = select i1 %30, i32 %24, i32 %29
%32 = sdiv i32 %31, 2
%33 = add nsw i32 %32, -1
%34 = sdiv i32 %24, 2
%35 = call i32 (...) @cls()
%36 = call i32 @draw_circle(i32 %33, i32 %34, i32 %29)
br label %37
37: ; preds = %11, %28
%38 = phi i32 [ %33, %28 ], [ %13, %11 ]
%39 = phi i32 [ %29, %28 ], [ %14, %11 ]
%40 = phi i32 [ %34, %28 ], [ %15, %11 ]
%41 = call i32 @time(i32* %4)
%42 = call %struct.tm* @localtime(i32* %4)
%43 = getelementptr inbounds %struct.tm, %struct.tm* %42, i64 0, i32 0
%44 = load i32, i32* %43
%45 = mul nsw i32 %44, 5
%46 = getelementptr inbounds %struct.tm, %struct.tm* %42, i64 0, i32 1
%47 = load i32, i32* %46
%48 = sdiv i32 %47, 10
%49 = add nsw i32 %48, %45
%50 = shl nsw i32 %38, 1
%51 = sdiv i32 %50, 3
%52 = call i32 @draw_hand(i32 %49, i32 %51, i8 signext 104, i32 %39, i32 %40)
%53 = load i32, i32* %46
%54 = add nsw i32 %38, -2
%55 = call i32 @draw_hand(i32 %53, i32 %54, i8 signext 109, i32 %39, i32 %40)
%56 = getelementptr inbounds %struct.tm, %struct.tm* %42, i64 0, i32 2
%57 = load i32, i32* %56
%58 = add nsw i32 %38, -1
%59 = call i32 @draw_hand(i32 %57, i32 %58, i8 signext 46, i32 %39, i32 %40)
%60 = add nsw i32 %39, -4
%61 = mul nsw i32 %38, 3
%62 = sdiv i32 %61, 5
%63 = sub nsw i32 %40, %62
%64 = call i32 @draw_text(i32 %60, i32 %63, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%65 = load i32, i32* %43
%66 = load i32, i32* %46
%67 = load i32, i32* %56
%68 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %65, i32 %66, i32 %67)
%69 = add nsw i32 %39, -5
%70 = add nsw i32 %40, %62
%71 = call i32 @draw_text(i32 %69, i32 %70, i8* %6)
%72 = load i32, i32* @stdout
%73 = call i32 @fflush(i32 %72)
%74 = call i32 @sleep(i32 1)
%75 = load i32, i32* %43
%76 = mul nsw i32 %75, 5
%77 = load i32, i32* %46
%78 = sdiv i32 %77, 10
%79 = add nsw i32 %78, %76
%80 = call i32 @draw_hand(i32 %79, i32 %51, i8 signext 32, i32 %39, i32 %40)
%81 = load i32, i32* %46
%82 = call i32 @draw_hand(i32 %81, i32 %54, i8 signext 32, i32 %39, i32 %40)
%83 = load i32, i32* %56
%84 = call i32 @draw_hand(i32 %83, i32 %58, i8 signext 32, i32 %39, i32 %40)
br label %11
}