#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 {
  int tm_sec;
  int tm_min;
  int tm_hour;
};

/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ clock_set_content(char *, int, double, double, char);
int /*<<< orphan*/ draw_line(char *, int, double, char, double);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ memset(char **, char, int);
int /*<<< orphan*/ printf(char *, char, char);
int /*<<< orphan*/ puts(char *);
scalar_t__ round(double);
double sqrt(double);
int /*<<< orphan*/ stdout;
void clock_display(struct tm *current_time) {
  double radius = (60) / 2.0;
  char clock[(60)][(60)] = {};
  int i, x, y;
  int seconds, minutes;
  memset(clock, ' ', (60) * (60));
  for (x = 0; x < (60); x++) {
    for (y = 0; y < (60); y++) {
      double dx, dy, distance;
      dx = x;
      dy = y;
      dx = dx < radius ? radius - dx : dx - radius;
      dy = dy < radius ? radius - dy : dy - radius;
      distance = sqrt(dx * dx + dy * dy);
      if (distance < radius) {
        clock[x][y] = '.';
      }
    }
  }
  draw_line((char *)clock,
            ((int)round(seconds = current_time->tm_sec * 6) + 270) % 360,
            radius, 'S', 1);
  draw_line(
      (char *)clock,
      ((int)round(minutes = current_time->tm_min * 6 + seconds / 60.0) + 270) %
          360,
      radius, 'M', 0.8);
  draw_line(
      (char *)clock,
      ((int)round(current_time->tm_hour % 12 * 30 + minutes / 12.0) + 270) %
          360,
      radius, 'H', 0.5);
  clock[(int)round(radius)][(int)round(radius)] = 'O';
  for (i = 0; i < 360; i++) {
    clock_set_content((char *)clock, i, radius - 0.5, radius, '#');
  }
  for (i = 0; i < 360; i += 30) {
    clock_set_content((char *)clock, i, radius - 0.5, radius, 'O');
  }
  clear();
  for (x = 0; x < (60); x++) {
    for (y = 0; y < (60); y++) {
      printf("%c%c", clock[x][y], clock[x][y]);
    }
    if (x != (60) - 1) {
      puts("");
    } else {
      fflush(stdout);
    }
  }
}


x86 assembly (clang, -O0):
<clock_display>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe80,%rsp
mov    %rdi,-0x8(%rbp)
movsd  0xe59(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0xe20(%rbp),%rdi
xor    %esi,%esi
mov    $0xe10,%edx
call   1050 <memset@plt>
lea    -0xe20(%rbp),%rdi
mov    $0x20,%esi
mov    $0xe10,%edx
call   1050 <memset@plt>
movl   $0x0,-0xe28(%rbp)
cmpl   $0x3c,-0xe28(%rbp)
jge    136d <clock_display+0x1dd>
movl   $0x0,-0xe2c(%rbp)
cmpl   $0x3c,-0xe2c(%rbp)
jge    1354 <clock_display+0x1c4>
cvtsi2sdl -0xe28(%rbp),%xmm0
ff
movsd  %xmm0,-0xe40(%rbp)
ff
cvtsi2sdl -0xe2c(%rbp),%xmm0
ff
movsd  %xmm0,-0xe48(%rbp)
ff
movsd  -0xe40(%rbp),%xmm1
ff
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1254 <clock_display+0xc4>
movsd  -0x10(%rbp),%xmm0
subsd  -0xe40(%rbp),%xmm0
ff
movsd  %xmm0,-0xe58(%rbp)
ff
jmp    1269 <clock_display+0xd9>
movsd  -0xe40(%rbp),%xmm0
ff
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xe58(%rbp)
ff
movsd  -0xe58(%rbp),%xmm0
ff
movsd  %xmm0,-0xe40(%rbp)
ff
movsd  -0xe48(%rbp),%xmm1
ff
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    12aa <clock_display+0x11a>
movsd  -0x10(%rbp),%xmm0
subsd  -0xe48(%rbp),%xmm0
ff
movsd  %xmm0,-0xe60(%rbp)
ff
jmp    12bf <clock_display+0x12f>
movsd  -0xe48(%rbp),%xmm0
ff
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xe60(%rbp)
ff
movsd  -0xe60(%rbp),%xmm0
ff
movsd  %xmm0,-0xe48(%rbp)
ff
movsd  -0xe40(%rbp),%xmm0
ff
movsd  -0xe40(%rbp),%xmm2
ff
movsd  -0xe48(%rbp),%xmm1
ff
mulsd  -0xe48(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   10a0 <sqrt@plt>
movsd  %xmm0,-0xe50(%rbp)
ff
movsd  -0xe50(%rbp),%xmm1
ff
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    133b <clock_display+0x1ab>
movslq -0xe28(%rbp),%rcx
lea    -0xe20(%rbp),%rax
imul   $0x3c,%rcx,%rcx
add    %rcx,%rax
movslq -0xe2c(%rbp),%rcx
movb   $0x2e,(%rax,%rcx,1)
jmp    1340 <clock_display+0x1b0>
mov    -0xe2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe2c(%rbp)
jmp    11f6 <clock_display+0x66>
jmp    1359 <clock_display+0x1c9>
mov    -0xe28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe28(%rbp)
jmp    11df <clock_display+0x4f>
lea    -0xe20(%rbp),%rax
mov    %rax,-0xe80(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x6,(%rax),%eax
mov    %eax,-0xe30(%rbp)
cvtsi2sd %eax,%xmm0
call   1090 <round@plt>
mov    -0xe80(%rbp),%rdi
add    $0x10e,%eax
mov    $0x168,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
movsd  -0x10(%rbp),%xmm0
mov    $0x53,%edx
movsd  0xc6f(%rip),%xmm1
call   1060 <draw_line@plt>
lea    -0xe20(%rbp),%rax
mov    %rax,-0xe78(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x6,0x4(%rax),%eax
cvtsi2sd %eax,%xmm0
cvtsi2sdl -0xe30(%rbp),%xmm1
ff
movsd  0xc38(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xe34(%rbp)
cvtsi2sd %eax,%xmm0
call   1090 <round@plt>
mov    -0xe78(%rbp),%rdi
add    $0x10e,%eax
mov    $0x168,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
movsd  -0x10(%rbp),%xmm0
mov    $0x4d,%edx
movsd  0xbed(%rip),%xmm1
call   1060 <draw_line@plt>
lea    -0xe20(%rbp),%rax
mov    %rax,-0xe70(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
imul   $0x1e,%edx,%eax
cvtsi2sd %eax,%xmm0
cvtsi2sdl -0xe34(%rbp),%xmm1
ff
movsd  0xbac(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
call   1090 <round@plt>
mov    -0xe70(%rbp),%rdi
add    $0x10e,%eax
mov    $0x168,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
movsd  -0x10(%rbp),%xmm0
mov    $0x48,%edx
movsd  0xb6f(%rip),%xmm1
call   1060 <draw_line@plt>
movsd  -0x10(%rbp),%xmm0
call   1090 <round@plt>
movslq %eax,%rcx
lea    -0xe20(%rbp),%rax
imul   $0x3c,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0xe68(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1090 <round@plt>
mov    %rax,%rcx
mov    -0xe68(%rbp),%rax
movslq %ecx,%rcx
movb   $0x4f,(%rax,%rcx,1)
movl   $0x0,-0xe24(%rbp)
cmpl   $0x168,-0xe24(%rbp)
jge    1536 <clock_display+0x3a6>
lea    -0xe20(%rbp),%rdi
mov    -0xe24(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
movsd  0xaf9(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mov    $0x23,%edx
call   1080 <clock_set_content@plt>
mov    -0xe24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe24(%rbp)
jmp    14e5 <clock_display+0x355>
movl   $0x0,-0xe24(%rbp)
cmpl   $0x168,-0xe24(%rbp)
jge    1591 <clock_display+0x401>
lea    -0xe20(%rbp),%rdi
mov    -0xe24(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
movsd  0xa9e(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mov    $0x4f,%edx
call   1080 <clock_set_content@plt>
mov    -0xe24(%rbp),%eax
add    $0x1e,%eax
mov    %eax,-0xe24(%rbp)
jmp    1540 <clock_display+0x3b0>
mov    $0x0,%al
call   10b0 <clear@plt>
movl   $0x0,-0xe28(%rbp)
cmpl   $0x3c,-0xe28(%rbp)
jge    166d <clock_display+0x4dd>
movl   $0x0,-0xe2c(%rbp)
cmpl   $0x3c,-0xe2c(%rbp)
jge    1628 <clock_display+0x498>
movslq -0xe28(%rbp),%rcx
lea    -0xe20(%rbp),%rax
imul   $0x3c,%rcx,%rcx
add    %rcx,%rax
movslq -0xe2c(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
movslq -0xe28(%rbp),%rcx
lea    -0xe20(%rbp),%rax
imul   $0x3c,%rcx,%rcx
add    %rcx,%rax
movslq -0xe2c(%rbp),%rcx
lea    0xa28(%rip),%rdi
movsbl %dl,%esi
movsbl (%rax,%rcx,1),%edx
call   1040 <printf@plt>
mov    -0xe2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe2c(%rbp)
jmp    15b9 <clock_display+0x429>
cmpl   $0x3b,-0xe28(%rbp)
je     1646 <clock_display+0x4b6>
lea    0x9f8(%rip),%rdi
call   1030 <puts@plt>
jmp    1654 <clock_display+0x4c4>
mov    0x2993(%rip),%rax
mov    (%rax),%edi
call   1070 <fflush@plt>
jmp    1659 <clock_display+0x4c9>
mov    -0xe28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe28(%rbp)
jmp    15a2 <clock_display+0x412>
add    $0xe80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock_display>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xe28,%rsp
mov    %rdi,%r14
lea    0x10(%rsp),%r12
xor    %r15d,%r15d
mov    $0xe10,%edx
mov    %r12,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    %r12,%rdi
mov    $0x20,%esi
mov    $0xe10,%edx
call   1050 <memset@plt>
movsd  0xe2e(%rip),%xmm2
movsd  0xe2e(%rip),%xmm3
xorpd  %xmm4,%xmm4
jmp    11f2 <clock_display+0x62>
add    $0x1,%r15
add    $0x3c,%r12
cmp    $0x3c,%r15
je     129b <clock_display+0x10b>
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
movapd %xmm0,%xmm5
addsd  %xmm3,%xmm5
cmp    $0x1e,%r15
jae    1210 <clock_display+0x80>
movapd %xmm2,%xmm5
subsd  %xmm0,%xmm5
xor    %ebx,%ebx
movsd  %xmm5,(%rsp)
jmp    122a <clock_display+0x9a>
nopl   0x0(%rax)
add    $0x1,%rbx
cmp    $0x3c,%rbx
je     11e0 <clock_display+0x50>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movapd %xmm0,%xmm1
addsd  %xmm3,%xmm1
cmp    $0x1e,%rbx
jae    1247 <clock_display+0xb7>
movapd %xmm2,%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm1
movapd %xmm5,%xmm0
mulsd  %xmm5,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm4,%xmm0
jb     1270 <clock_display+0xe0>
sqrtsd %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jbe    1220 <clock_display+0x90>
jmp    1294 <clock_display+0x104>
nopl   0x0(%rax)
call   10a0 <sqrt@plt>
movsd  (%rsp),%xmm5
xorpd  %xmm4,%xmm4
movsd  0xd82(%rip),%xmm3
movsd  0xd72(%rip),%xmm2
ucomisd %xmm0,%xmm2
jbe    1220 <clock_display+0x90>
movb   $0x2e,(%r12,%rbx,1)
jmp    1220 <clock_display+0x90>
mov    (%r14),%eax
add    %eax,%eax
lea    (%rax,%rax,2),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd %xmm0,(%rsp)
call   1090 <round@plt>
mov    %eax,%ecx
add    $0x10e,%ecx
movslq %ecx,%rsi
imul   $0xffffffffb60b60b7,%rsi,%rcx
shr    $0x20,%rcx
add    %ecx,%eax
add    $0x10e,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x8,%eax
add    %ecx,%eax
imul   $0x168,%eax,%eax
sub    %eax,%esi
lea    0x10(%rsp),%r15
movsd  0xd10(%rip),%xmm0
movsd  0xd18(%rip),%xmm1
mov    %r15,%rdi
mov    $0x53,%edx
call   1060 <draw_line@plt>
mov    0x4(%r14),%eax
add    %eax,%eax
lea    (%rax,%rax,2),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd (%rsp),%xmm1
divsd  0xcf6(%rip),%xmm1
addsd  %xmm0,%xmm1
cvttpd2dq %xmm1,%xmm0
cvtdq2pd %xmm0,%xmm0
movaps %xmm0,(%rsp)
call   1090 <round@plt>
mov    %eax,%ecx
add    $0x10e,%ecx
movslq %ecx,%rsi
imul   $0xffffffffb60b60b7,%rsi,%rcx
shr    $0x20,%rcx
add    %ecx,%eax
add    $0x10e,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x8,%eax
add    %ecx,%eax
imul   $0x168,%eax,%eax
sub    %eax,%esi
movsd  0xcb2(%rip),%xmm1
mov    %r15,%rdi
movsd  0xc87(%rip),%xmm0
mov    $0x4d,%edx
call   1060 <draw_line@plt>
movslq 0x8(%r14),%rax
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x21,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
mov    %eax,%ecx
shl    $0x5,%ecx
sub    %eax,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movapd (%rsp),%xmm1
divsd  0xc68(%rip),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1090 <round@plt>
mov    %eax,%ecx
add    $0x10e,%ecx
movslq %ecx,%rsi
imul   $0xffffffffb60b60b7,%rsi,%rcx
shr    $0x20,%rcx
add    %ecx,%eax
add    $0x10e,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x8,%eax
add    %ecx,%eax
imul   $0x168,%eax,%eax
sub    %eax,%esi
movsd  0xc2c(%rip),%xmm1
mov    %r15,%rdi
movsd  0xbf1(%rip),%xmm0
mov    $0x48,%edx
call   1060 <draw_line@plt>
movsd  0xbdf(%rip),%xmm0
call   1090 <round@plt>
movslq %eax,%rbx
movsd  0xbcf(%rip),%xmm0
call   1090 <round@plt>
cltq
imul   $0x3c,%rbx,%rcx
add    %rsp,%rcx
add    $0x10,%rcx
movb   $0x4f,(%rax,%rcx,1)
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %ebx,%esi
movsd  0xbdb(%rip),%xmm0
movsd  0xb9b(%rip),%xmm1
mov    $0x23,%edx
call   1080 <clock_set_content@plt>
add    $0x1,%ebx
cmp    $0x168,%ebx
jne    1450 <clock_display+0x2c0>
xor    %r14d,%r14d
movsd  0xbb3(%rip),%xmm0
movsd  0xb73(%rip),%xmm1
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x4f,%edx
call   1080 <clock_set_content@plt>
mov    %r15,%rdi
mov    $0x1e,%esi
movsd  0xb8c(%rip),%xmm0
movsd  0xb4c(%rip),%xmm1
mov    $0x4f,%edx
call   1080 <clock_set_content@plt>
mov    %r15,%rdi
mov    $0x3c,%esi
movsd  0xb6a(%rip),%xmm0
movsd  0xb2a(%rip),%xmm1
mov    $0x4f,%edx
call   1080 <clock_set_content@plt>
mov    %r15,%rdi
mov    $0x5a,%esi
movsd  0xb48(%rip),%xmm0
movsd  0xb08(%rip),%xmm1
mov    $0x4f,%edx
call   1080 <clock_set_content@plt>
mov    %r15,%rdi
mov    $0x78,%esi
movsd  0xb26(%rip),%xmm0
movsd  0xae6(%rip),%xmm1
mov    $0x4f,%edx
call   1080 <clock_set_content@plt>
mov    %r15,%rdi
mov    $0x96,%esi
movsd  0xb04(%rip),%xmm0
movsd  0xac4(%rip),%xmm1
mov    $0x4f,%edx
call   1080 <clock_set_content@plt>
mov    %r15,%rdi
mov    $0xb4,%esi
movsd  0xae2(%rip),%xmm0
movsd  0xaa2(%rip),%xmm1
mov    $0x4f,%edx
call   1080 <clock_set_content@plt>
mov    %r15,%rdi
mov    $0xd2,%esi
movsd  0xac0(%rip),%xmm0
movsd  0xa80(%rip),%xmm1
mov    $0x4f,%edx
call   1080 <clock_set_content@plt>
mov    %r15,%rdi
mov    $0xf0,%esi
movsd  0xa9e(%rip),%xmm0
movsd  0xa5e(%rip),%xmm1
mov    $0x4f,%edx
call   1080 <clock_set_content@plt>
mov    %r15,%rdi
mov    $0x10e,%esi
movsd  0xa7c(%rip),%xmm0
movsd  0xa3c(%rip),%xmm1
mov    $0x4f,%edx
call   1080 <clock_set_content@plt>
mov    %r15,%rdi
mov    $0x12c,%esi
movsd  0xa5a(%rip),%xmm0
movsd  0xa1a(%rip),%xmm1
mov    $0x4f,%edx
call   1080 <clock_set_content@plt>
mov    %r15,%rdi
mov    $0x14a,%esi
movsd  0xa38(%rip),%xmm0
movsd  0x9f8(%rip),%xmm1
mov    $0x4f,%edx
call   1080 <clock_set_content@plt>
xor    %eax,%eax
call   10b0 <clear@plt>
lea    0xa20(%rip),%r12
mov    $0xffffffffffffffc4,%rbx
nopw   0x0(%rax,%rax,1)
movsbl 0x3c(%r15,%rbx,1),%edx
mov    %r12,%rdi
mov    %edx,%esi
call   1040 <printf@plt>
inc    %rbx
jne    1630 <clock_display+0x4a0>
cmp    $0x3b,%r14
je     165f <clock_display+0x4cf>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r14
add    $0x3c,%r15
jmp    1620 <clock_display+0x490>
mov    0x297a(%rip),%rax
mov    (%rax),%edi
call   1070 <fflush@plt>
add    $0xe28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
@.str = [5 x i8] c"%c%c\00"
@.str.1 = [1 x i8] zeroinitializer
@stdout = global i32 0
define void @clock_display(%struct.tm* %0) {
%2 = alloca %struct.tm*
%3 = alloca double
%4 = alloca [60 x [60 x i8]]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca double
store %struct.tm* %0, %struct.tm** %2
store double 3.000000e+01, double* %3
%13 = bitcast [60 x [60 x i8]]* %4 to i8*
%14 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %4, i64 0, i64 0
%15 = bitcast [60 x i8]* %14 to i8**
%16 = call i32 @memset(i8** %15, i8 signext 32, i32 3600)
store i32 0, i32* %6
br label %17
17: ; preds = %77, %1
%18 = load i32, i32* %6
%19 = icmp slt i32 %18, 60
br i1 %19, label %20, label %80
20: ; preds = %17
store i32 0, i32* %7
br label %21
21: ; preds = %73, %20
%22 = load i32, i32* %7
%23 = icmp slt i32 %22, 60
br i1 %23, label %24, label %76
24: ; preds = %21
%25 = load i32, i32* %6
%26 = sitofp i32 %25 to double
store double %26, double* %10
%27 = load i32, i32* %7
%28 = sitofp i32 %27 to double
store double %28, double* %11
%29 = load double, double* %10
%30 = load double, double* %3
%31 = fcmp olt double %29, %30
br i1 %31, label %32, label %36
32: ; preds = %24
%33 = load double, double* %3
%34 = load double, double* %10
%35 = fsub double %33, %34
br label %40
36: ; preds = %24
%37 = load double, double* %10
%38 = load double, double* %3
%39 = fsub double %37, %38
br label %40
40: ; preds = %36, %32
%41 = phi double [ %35, %32 ], [ %39, %36 ]
store double %41, double* %10
%42 = load double, double* %11
%43 = load double, double* %3
%44 = fcmp olt double %42, %43
br i1 %44, label %45, label %49
45: ; preds = %40
%46 = load double, double* %3
%47 = load double, double* %11
%48 = fsub double %46, %47
br label %53
49: ; preds = %40
%50 = load double, double* %11
%51 = load double, double* %3
%52 = fsub double %50, %51
br label %53
53: ; preds = %49, %45
%54 = phi double [ %48, %45 ], [ %52, %49 ]
store double %54, double* %11
%55 = load double, double* %10
%56 = load double, double* %10
%57 = load double, double* %11
%58 = load double, double* %11
%59 = fmul double %57, %58
%60 = call double @llvm.fmuladd.f64(double %55, double %56, double %59)
%61 = call double @sqrt(double %60)
store double %61, double* %12
%62 = load double, double* %12
%63 = load double, double* %3
%64 = fcmp olt double %62, %63
br i1 %64, label %65, label %72
65: ; preds = %53
%66 = load i32, i32* %6
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %4, i64 0, i64 %67
%69 = load i32, i32* %7
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [60 x i8], [60 x i8]* %68, i64 0, i64 %70
store i8 46, i8* %71
br label %72
72: ; preds = %65, %53
br label %73
73: ; preds = %72
%74 = load i32, i32* %7
%75 = add nsw i32 %74, 1
store i32 %75, i32* %7
br label %21
76: ; preds = %21
br label %77
77: ; preds = %76
%78 = load i32, i32* %6
%79 = add nsw i32 %78, 1
store i32 %79, i32* %6
br label %17
80: ; preds = %17
%81 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %4, i64 0, i64 0
%82 = bitcast [60 x i8]* %81 to i8*
%83 = load %struct.tm*, %struct.tm** %2
%84 = getelementptr inbounds %struct.tm, %struct.tm* %83, i32 0, i32 0
%85 = load i32, i32* %84
%86 = mul nsw i32 %85, 6
store i32 %86, i32* %8
%87 = sitofp i32 %86 to double
%88 = call i64 @round(double %87)
%89 = trunc i64 %88 to i32
%90 = add nsw i32 %89, 270
%91 = srem i32 %90, 360
%92 = load double, double* %3
%93 = call i32 @draw_line(i8* %82, i32 %91, double %92, i8 signext 83, double 1.000000e+00)
%94 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %4, i64 0, i64 0
%95 = bitcast [60 x i8]* %94 to i8*
%96 = load %struct.tm*, %struct.tm** %2
%97 = getelementptr inbounds %struct.tm, %struct.tm* %96, i32 0, i32 1
%98 = load i32, i32* %97
%99 = mul nsw i32 %98, 6
%100 = sitofp i32 %99 to double
%101 = load i32, i32* %8
%102 = sitofp i32 %101 to double
%103 = fdiv double %102, 6.000000e+01
%104 = fadd double %100, %103
%105 = fptosi double %104 to i32
store i32 %105, i32* %9
%106 = sitofp i32 %105 to double
%107 = call i64 @round(double %106)
%108 = trunc i64 %107 to i32
%109 = add nsw i32 %108, 270
%110 = srem i32 %109, 360
%111 = load double, double* %3
%112 = call i32 @draw_line(i8* %95, i32 %110, double %111, i8 signext 77, double 8.000000e-01)
%113 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %4, i64 0, i64 0
%114 = bitcast [60 x i8]* %113 to i8*
%115 = load %struct.tm*, %struct.tm** %2
%116 = getelementptr inbounds %struct.tm, %struct.tm* %115, i32 0, i32 2
%117 = load i32, i32* %116
%118 = srem i32 %117, 12
%119 = mul nsw i32 %118, 30
%120 = sitofp i32 %119 to double
%121 = load i32, i32* %9
%122 = sitofp i32 %121 to double
%123 = fdiv double %122, 1.200000e+01
%124 = fadd double %120, %123
%125 = call i64 @round(double %124)
%126 = trunc i64 %125 to i32
%127 = add nsw i32 %126, 270
%128 = srem i32 %127, 360
%129 = load double, double* %3
%130 = call i32 @draw_line(i8* %114, i32 %128, double %129, i8 signext 72, double 5.000000e-01)
%131 = load double, double* %3
%132 = call i64 @round(double %131)
%133 = trunc i64 %132 to i32
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %4, i64 0, i64 %134
%136 = load double, double* %3
%137 = call i64 @round(double %136)
%138 = trunc i64 %137 to i32
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds [60 x i8], [60 x i8]* %135, i64 0, i64 %139
store i8 79, i8* %140
store i32 0, i32* %5
br label %141
141: ; preds = %152, %80
%142 = load i32, i32* %5
%143 = icmp slt i32 %142, 360
br i1 %143, label %144, label %155
144: ; preds = %141
%145 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %4, i64 0, i64 0
%146 = bitcast [60 x i8]* %145 to i8*
%147 = load i32, i32* %5
%148 = load double, double* %3
%149 = fsub double %148, 5.000000e-01
%150 = load double, double* %3
%151 = call i32 @clock_set_content(i8* %146, i32 %147, double %149, double %150, i8 signext 35)
br label %152
152: ; preds = %144
%153 = load i32, i32* %5
%154 = add nsw i32 %153, 1
store i32 %154, i32* %5
br label %141
155: ; preds = %141
store i32 0, i32* %5
br label %156
156: ; preds = %167, %155
%157 = load i32, i32* %5
%158 = icmp slt i32 %157, 360
br i1 %158, label %159, label %170
159: ; preds = %156
%160 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %4, i64 0, i64 0
%161 = bitcast [60 x i8]* %160 to i8*
%162 = load i32, i32* %5
%163 = load double, double* %3
%164 = fsub double %163, 5.000000e-01
%165 = load double, double* %3
%166 = call i32 @clock_set_content(i8* %161, i32 %162, double %164, double %165, i8 signext 79)
br label %167
167: ; preds = %159
%168 = load i32, i32* %5
%169 = add nsw i32 %168, 30
store i32 %169, i32* %5
br label %156
170: ; preds = %156
%171 = call i32 (...) @clear()
store i32 0, i32* %6
br label %172
172: ; preds = %207, %170
%173 = load i32, i32* %6
%174 = icmp slt i32 %173, 60
br i1 %174, label %175, label %210
175: ; preds = %172
store i32 0, i32* %7
br label %176
176: ; preds = %195, %175
%177 = load i32, i32* %7
%178 = icmp slt i32 %177, 60
br i1 %178, label %179, label %198
179: ; preds = %176
%180 = load i32, i32* %6
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %4, i64 0, i64 %181
%183 = load i32, i32* %7
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [60 x i8], [60 x i8]* %182, i64 0, i64 %184
%186 = load i8, i8* %185
%187 = load i32, i32* %6
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %4, i64 0, i64 %188
%190 = load i32, i32* %7
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds [60 x i8], [60 x i8]* %189, i64 0, i64 %191
%193 = load i8, i8* %192
%194 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %186, i8 signext %193)
br label %195
195: ; preds = %179
%196 = load i32, i32* %7
%197 = add nsw i32 %196, 1
store i32 %197, i32* %7
br label %176
198: ; preds = %176
%199 = load i32, i32* %6
%200 = icmp ne i32 %199, 59
br i1 %200, label %201, label %203
201: ; preds = %198
%202 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %206
203: ; preds = %198
%204 = load i32, i32* @stdout
%205 = call i32 @fflush(i32 %204)
br label %206
206: ; preds = %203, %201
br label %207
207: ; preds = %206
%208 = load i32, i32* %6
%209 = add nsw i32 %208, 1
store i32 %209, i32* %6
br label %172
210: ; preds = %172
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
@.str = [5 x i8] c"%c%c\00"
@stdout = global i32 0
define void @clock_display(%struct.tm* nocapture %0) {
%2 = alloca [60 x [60 x i8]]
%3 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %2, i64 0, i64 0, i64 0
%4 = bitcast [60 x [60 x i8]]* %2 to i8**
%5 = call i32 @memset(i8** %4, i8 signext 32, i32 3600)
br label %6
6: ; preds = %1, %31
%7 = phi i64 [ 0, %1 ], [ %32, %31 ]
%8 = trunc i64 %7 to i32
%9 = sitofp i32 %8 to double
%10 = icmp ult i64 %7, 30
%11 = fsub double 3.000000e+01, %9
%12 = fadd double %9, -3.000000e+01
%13 = select i1 %10, double %11, double %12
br label %14
14: ; preds = %6, %28
%15 = phi i64 [ 0, %6 ], [ %29, %28 ]
%16 = trunc i64 %15 to i32
%17 = sitofp i32 %16 to double
%18 = icmp ult i64 %15, 30
%19 = fsub double 3.000000e+01, %17
%20 = fadd double %17, -3.000000e+01
%21 = select i1 %18, double %19, double %20
%22 = fmul double %21, %21
%23 = call double @llvm.fmuladd.f64(double %13, double %13, double %22)
%24 = call double @sqrt(double %23)
%25 = fcmp olt double %24, 3.000000e+01
br i1 %25, label %26, label %28
26: ; preds = %14
%27 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %2, i64 0, i64 %7, i64 %15
store i8 46, i8* %27
br label %28
28: ; preds = %26, %14
%29 = add nuw nsw i64 %15, 1
%30 = icmp eq i64 %29, 60
br i1 %30, label %31, label %14
31: ; preds = %28
%32 = add nuw nsw i64 %7, 1
%33 = icmp eq i64 %32, 60
br i1 %33, label %34, label %6
34: ; preds = %31
%35 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 0
%36 = load i32, i32* %35
%37 = mul nsw i32 %36, 6
%38 = sitofp i32 %37 to double
%39 = call i64 @round(double %38)
%40 = trunc i64 %39 to i32
%41 = add nsw i32 %40, 270
%42 = srem i32 %41, 360
%43 = call i32 @draw_line(i8* %3, i32 %42, double 3.000000e+01, i8 signext 83, double 1.000000e+00)
%44 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 1
%45 = load i32, i32* %44
%46 = mul nsw i32 %45, 6
%47 = sitofp i32 %46 to double
%48 = fdiv double %38, 6.000000e+01
%49 = fadd double %48, %47
%50 = fptosi double %49 to i32
%51 = sitofp i32 %50 to double
%52 = call i64 @round(double %51)
%53 = trunc i64 %52 to i32
%54 = add nsw i32 %53, 270
%55 = srem i32 %54, 360
%56 = call i32 @draw_line(i8* %3, i32 %55, double 3.000000e+01, i8 signext 77, double 8.000000e-01)
%57 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 2
%58 = load i32, i32* %57
%59 = srem i32 %58, 12
%60 = mul nsw i32 %59, 30
%61 = sitofp i32 %60 to double
%62 = fdiv double %51, 1.200000e+01
%63 = fadd double %62, %61
%64 = call i64 @round(double %63)
%65 = trunc i64 %64 to i32
%66 = add nsw i32 %65, 270
%67 = srem i32 %66, 360
%68 = call i32 @draw_line(i8* %3, i32 %67, double 3.000000e+01, i8 signext 72, double 5.000000e-01)
%69 = call i64 @round(double 3.000000e+01)
%70 = shl i64 %69, 32
%71 = ashr exact i64 %70, 32
%72 = call i64 @round(double 3.000000e+01)
%73 = shl i64 %72, 32
%74 = ashr exact i64 %73, 32
%75 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %2, i64 0, i64 %71, i64 %74
store i8 79, i8* %75
br label %76
76: ; preds = %34, %76
%77 = phi i32 [ 0, %34 ], [ %79, %76 ]
%78 = call i32 @clock_set_content(i8* %3, i32 %77, double 2.950000e+01, double 3.000000e+01, i8 signext 35)
%79 = add nuw nsw i32 %77, 1
%80 = icmp eq i32 %79, 360
br i1 %80, label %81, label %76
81: ; preds = %76
%82 = call i32 @clock_set_content(i8* %3, i32 0, double 2.950000e+01, double 3.000000e+01, i8 signext 79)
%83 = call i32 @clock_set_content(i8* %3, i32 30, double 2.950000e+01, double 3.000000e+01, i8 signext 79)
%84 = call i32 @clock_set_content(i8* %3, i32 60, double 2.950000e+01, double 3.000000e+01, i8 signext 79)
%85 = call i32 @clock_set_content(i8* %3, i32 90, double 2.950000e+01, double 3.000000e+01, i8 signext 79)
%86 = call i32 @clock_set_content(i8* %3, i32 120, double 2.950000e+01, double 3.000000e+01, i8 signext 79)
%87 = call i32 @clock_set_content(i8* %3, i32 150, double 2.950000e+01, double 3.000000e+01, i8 signext 79)
%88 = call i32 @clock_set_content(i8* %3, i32 180, double 2.950000e+01, double 3.000000e+01, i8 signext 79)
%89 = call i32 @clock_set_content(i8* %3, i32 210, double 2.950000e+01, double 3.000000e+01, i8 signext 79)
%90 = call i32 @clock_set_content(i8* %3, i32 240, double 2.950000e+01, double 3.000000e+01, i8 signext 79)
%91 = call i32 @clock_set_content(i8* %3, i32 270, double 2.950000e+01, double 3.000000e+01, i8 signext 79)
%92 = call i32 @clock_set_content(i8* %3, i32 300, double 2.950000e+01, double 3.000000e+01, i8 signext 79)
%93 = call i32 @clock_set_content(i8* %3, i32 330, double 2.950000e+01, double 3.000000e+01, i8 signext 79)
%94 = call i32 (...) @clear()
br label %95
95: ; preds = %106, %81
%96 = phi i64 [ 0, %81 ], [ %108, %106 ]
br label %97
97: ; preds = %95, %97
%98 = phi i64 [ 0, %95 ], [ %102, %97 ]
%99 = getelementptr inbounds [60 x [60 x i8]], [60 x [60 x i8]]* %2, i64 0, i64 %96, i64 %98
%100 = load i8, i8* %99
%101 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %100, i8 signext %100)
%102 = add nuw nsw i64 %98, 1
%103 = icmp eq i64 %102, 60
br i1 %103, label %104, label %97
104: ; preds = %97
%105 = icmp eq i64 %96, 59
br i1 %105, label %109, label %106
106: ; preds = %104
%107 = call i32 @putchar(i32 10)
%108 = add nuw nsw i64 %96, 1
br label %95
109: ; preds = %104
%110 = load i32, i32* @stdout
%111 = call i32 @fflush(i32 %110)
ret void
}