#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*/ clock_str;

/* Variables and functions */
int /*<<< orphan*/ green_str_print(char *, char *);
int /*<<< orphan*/ memset(char *, int, int);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strncat(char *, char *, int);
void clock_num(int hour, int min, int type) {
  char clock_str[4096];
  memset(clock_str, 0x00, sizeof(clock_str));
  char *clock_split = "            ///              ///             ";
  char *clock[] = {"    /////   // //   // //   // //   /////    ",
                   "    ////      //      //      //    //////   ",
                   "    /////      //   /////   //      /////    ",
                   "    /////      //   /////      //   /////    ",
                   "   //  //  //  //  ////////    //      //    ",
                   "    /////   //      /////      //   /////    ",
                   "    /////   //      /////   // //   /////    ",
                   "    /////      //      //      //      //    ",
                   "    /////   // //   /////   // //   /////    ",
                   "    /////   // //   /////      //   /////    "};
  int hour_high, hour_low, min_high, min_low;
  hour_high = hour / 10;
  hour_low = hour % 10;
  min_high = min / 10;
  min_low = min % 10;
  int i;
  for (i = 0; i < 5; ++i) {
    strncat(clock_str, clock[hour_high] + i * 9, 9);
    strncat(clock_str, clock[hour_low] + i * 9, 9);
    if (type == 1) {
      strncat(clock_str, clock_split + i * 9, 9);
    } else {
      strncat(clock_str, "         ", 9);
    }
    strncat(clock_str, clock[min_high] + i * 9, 9);
    strncat(clock_str, clock[min_low] + i * 9, 9);
    strcat(clock_str, "\n");
  }
  green_str_print("%s", clock_str);
}


x86 assembly (clang, -O0):
<clock_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1090,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    -0x1010(%rbp),%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   1030 <memset@plt>
lea    0xe82(%rip),%rax
mov    %rax,-0x1018(%rbp)
lea    -0x1070(%rbp),%rdi
lea    0x2c3d(%rip),%rsi
mov    $0x50,%edx
call   1050 <memcpy@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1074(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1078(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x107c(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1080(%rbp)
movl   $0x0,-0x1084(%rbp)
cmpl   $0x5,-0x1084(%rbp)
jge    131a <clock_num+0x1ca>
lea    -0x1010(%rbp),%rdi
movslq -0x1074(%rbp),%rax
mov    -0x1070(%rbp,%rax,8),%rsi
ff
imul   $0x9,-0x1084(%rbp),%eax
cltq
add    %rax,%rsi
mov    $0x9,%edx
call   1040 <strncat@plt>
lea    -0x1010(%rbp),%rdi
movslq -0x1078(%rbp),%rax
mov    -0x1070(%rbp,%rax,8),%rsi
ff
imul   $0x9,-0x1084(%rbp),%eax
cltq
add    %rax,%rsi
mov    $0x9,%edx
call   1040 <strncat@plt>
cmpl   $0x1,-0xc(%rbp)
jne    1283 <clock_num+0x133>
lea    -0x1010(%rbp),%rdi
mov    -0x1018(%rbp),%rsi
imul   $0x9,-0x1084(%rbp),%eax
cltq
add    %rax,%rsi
mov    $0x9,%edx
call   1040 <strncat@plt>
jmp    129b <clock_num+0x14b>
lea    -0x1010(%rbp),%rdi
lea    0xd93(%rip),%rsi
mov    $0x9,%edx
call   1040 <strncat@plt>
lea    -0x1010(%rbp),%rdi
movslq -0x107c(%rbp),%rax
mov    -0x1070(%rbp,%rax,8),%rsi
ff
imul   $0x9,-0x1084(%rbp),%eax
cltq
add    %rax,%rsi
mov    $0x9,%edx
call   1040 <strncat@plt>
lea    -0x1010(%rbp),%rdi
movslq -0x1080(%rbp),%rax
mov    -0x1070(%rbp,%rax,8),%rsi
ff
imul   $0x9,-0x1084(%rbp),%eax
cltq
add    %rax,%rsi
mov    $0x9,%edx
call   1040 <strncat@plt>
lea    -0x1010(%rbp),%rdi
lea    0xef9(%rip),%rsi
call   1060 <strcat@plt>
mov    -0x1084(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1084(%rbp)
jmp    11eb <clock_num+0x9b>
lea    -0x1010(%rbp),%rsi
lea    0xed4(%rip),%rdi
call   1070 <green_str_print@plt>
add    $0x1090,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock_num>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1018,%rsp
mov    %edx,0xc(%rsp)
mov    %esi,%r14d
mov    %edi,%r15d
lea    0x10(%rsp),%rbx
xor    %ebp,%ebp
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   1030 <memset@plt>
movslq %r15d,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%eax
movslq %r14d,%rdx
imul   $0x66666667,%rdx,%rsi
mov    %rsi,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rsi
add    %edi,%esi
lea    (%rsi,%rsi,1),%edi
lea    (%rdi,%rdi,4),%edi
sub    %edi,%edx
movslq %ecx,%rcx
lea    0x2c17(%rip),%rdi
mov    (%rdi,%rcx,8),%r13
cltq
movslq %esi,%rcx
movslq %edx,%rdx
mov    (%rdi,%rax,8),%r15
mov    (%rdi,%rcx,8),%r14
mov    (%rdi,%rdx,8),%r12
jmp    122f <clock_num+0xef>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
lea    0xe3a(%rip),%rsi
mov    $0x9,%edx
call   1040 <strncat@plt>
lea    (%r14,%rbp,1),%rsi
mov    %rbx,%rdi
mov    $0x9,%edx
call   1040 <strncat@plt>
lea    (%r12,%rbp,1),%rsi
mov    %rbx,%rdi
mov    $0x9,%edx
call   1040 <strncat@plt>
mov    %rbx,%rdi
lea    0xfda(%rip),%rsi
call   1050 <strcat@plt>
add    $0x9,%rbp
cmp    $0x2d,%rbp
je     126a <clock_num+0x12a>
mov    %r13,%rsi
add    %rbp,%rsi
mov    %rbx,%rdi
mov    $0x9,%edx
call   1040 <strncat@plt>
lea    (%r15,%rbp,1),%rsi
mov    %rbx,%rdi
mov    $0x9,%edx
call   1040 <strncat@plt>
cmpl   $0x1,0xc(%rsp)
jne    11e0 <clock_num+0xa0>
lea    0xd9f(%rip),%rax
lea    (%rax,%rbp,1),%rsi
mov    %rbx,%rdi
jmp    11ea <clock_num+0xaa>
lea    0xf8b(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1060 <green_str_print@plt>
add    $0x1018,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [46 x i8] c" /// /// \00"
@.str.1 = [46 x i8] c" ///// // // // // // // ///// \00"
@.str.2 = [46 x i8] c" //// // // // ////// \00"
@.str.3 = [46 x i8] c" ///// // ///// // ///// \00"
@.str.4 = [46 x i8] c" ///// // ///// // ///// \00"
@.str.5 = [46 x i8] c" // // // // //////// // // \00"
@.str.6 = [46 x i8] c" ///// // ///// // ///// \00"
@.str.7 = [46 x i8] c" ///// // ///// // // ///// \00"
@.str.8 = [46 x i8] c" ///// // // // // \00"
@.str.9 = [46 x i8] c" ///// // // ///// // // ///// \00"
@.str.10 = [46 x i8] c" ///// // // ///// // ///// \00"
@__const.clock_num.clock = [10 x i8*] [i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.10, i32 0, i32 0)]
@.str.11 = [10 x i8] c" \00"
@.str.12 = [2 x i8] c"\0A\00"
@.str.13 = [3 x i8] c"%s\00"
define void @clock_num(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [4096 x i8]
%8 = alloca i8*
%9 = alloca [10 x i8*]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%15 = getelementptr inbounds [4096 x i8], [4096 x i8]* %7, i64 0, i64 0
%16 = call i32 @memset(i8* %15, i32 0, i32 4096)
store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8** %8
%17 = bitcast [10 x i8*]* %9 to i8*
%18 = load i32, i32* %4
%19 = sdiv i32 %18, 10
store i32 %19, i32* %10
%20 = load i32, i32* %4
%21 = srem i32 %20, 10
store i32 %21, i32* %11
%22 = load i32, i32* %5
%23 = sdiv i32 %22, 10
store i32 %23, i32* %12
%24 = load i32, i32* %5
%25 = srem i32 %24, 10
store i32 %25, i32* %13
store i32 0, i32* %14
br label %26
26: ; preds = %86, %3
%27 = load i32, i32* %14
%28 = icmp slt i32 %27, 5
br i1 %28, label %29, label %89
29: ; preds = %26
%30 = getelementptr inbounds [4096 x i8], [4096 x i8]* %7, i64 0, i64 0
%31 = load i32, i32* %10
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [10 x i8*], [10 x i8*]* %9, i64 0, i64 %32
%34 = load i8*, i8** %33
%35 = load i32, i32* %14
%36 = mul nsw i32 %35, 9
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8, i8* %34, i64 %37
%39 = call i32 @strncat(i8* %30, i8* %38, i32 9)
%40 = getelementptr inbounds [4096 x i8], [4096 x i8]* %7, i64 0, i64 0
%41 = load i32, i32* %11
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [10 x i8*], [10 x i8*]* %9, i64 0, i64 %42
%44 = load i8*, i8** %43
%45 = load i32, i32* %14
%46 = mul nsw i32 %45, 9
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i8, i8* %44, i64 %47
%49 = call i32 @strncat(i8* %40, i8* %48, i32 9)
%50 = load i32, i32* %6
%51 = icmp eq i32 %50, 1
br i1 %51, label %52, label %60
52: ; preds = %29
%53 = getelementptr inbounds [4096 x i8], [4096 x i8]* %7, i64 0, i64 0
%54 = load i8*, i8** %8
%55 = load i32, i32* %14
%56 = mul nsw i32 %55, 9
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i8, i8* %54, i64 %57
%59 = call i32 @strncat(i8* %53, i8* %58, i32 9)
br label %63
60: ; preds = %29
%61 = getelementptr inbounds [4096 x i8], [4096 x i8]* %7, i64 0, i64 0
%62 = call i32 @strncat(i8* %61, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i32 9)
br label %63
63: ; preds = %60, %52
%64 = getelementptr inbounds [4096 x i8], [4096 x i8]* %7, i64 0, i64 0
%65 = load i32, i32* %12
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [10 x i8*], [10 x i8*]* %9, i64 0, i64 %66
%68 = load i8*, i8** %67
%69 = load i32, i32* %14
%70 = mul nsw i32 %69, 9
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i8, i8* %68, i64 %71
%73 = call i32 @strncat(i8* %64, i8* %72, i32 9)
%74 = getelementptr inbounds [4096 x i8], [4096 x i8]* %7, i64 0, i64 0
%75 = load i32, i32* %13
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [10 x i8*], [10 x i8*]* %9, i64 0, i64 %76
%78 = load i8*, i8** %77
%79 = load i32, i32* %14
%80 = mul nsw i32 %79, 9
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8, i8* %78, i64 %81
%83 = call i32 @strncat(i8* %74, i8* %82, i32 9)
%84 = getelementptr inbounds [4096 x i8], [4096 x i8]* %7, i64 0, i64 0
%85 = call i32 @strcat(i8* %84, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %86
86: ; preds = %63
%87 = load i32, i32* %14
%88 = add nsw i32 %87, 1
store i32 %88, i32* %14
br label %26
89: ; preds = %26
%90 = getelementptr inbounds [4096 x i8], [4096 x i8]* %7, i64 0, i64 0
%91 = call i32 @green_str_print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* %90)
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c" /// /// \00"
@.str.1 = [46 x i8] c" ///// // // // // // // ///// \00"
@.str.2 = [46 x i8] c" //// // // // ////// \00"
@.str.3 = [46 x i8] c" ///// // ///// // ///// \00"
@.str.4 = [46 x i8] c" ///// // ///// // ///// \00"
@.str.5 = [46 x i8] c" // // // // //////// // // \00"
@.str.6 = [46 x i8] c" ///// // ///// // ///// \00"
@.str.7 = [46 x i8] c" ///// // ///// // // ///// \00"
@.str.8 = [46 x i8] c" ///// // // // // \00"
@.str.9 = [46 x i8] c" ///// // // ///// // // ///// \00"
@.str.10 = [46 x i8] c" ///// // // ///// // ///// \00"
@__const.clock_num.clock = [10 x i8*] [i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.10, i32 0, i32 0)]
@.str.11 = [10 x i8] c" \00"
@.str.12 = [2 x i8] c"\0A\00"
@.str.13 = [3 x i8] c"%s\00"
define void @clock_num(i32 %0, i32 %1, i32 %2) {
%4 = alloca [4096 x i8]
%5 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%6 = call i32 @memset(i8* %5, i32 0, i32 4096)
%7 = sdiv i32 %0, 10
%8 = srem i32 %0, 10
%9 = sdiv i32 %1, 10
%10 = srem i32 %1, 10
%11 = sext i32 %7 to i64
%12 = getelementptr inbounds [10 x i8*], [10 x i8*]* @__const.clock_num.clock, i64 0, i64 %11
%13 = load i8*, i8** %12
%14 = sext i32 %8 to i64
%15 = getelementptr inbounds [10 x i8*], [10 x i8*]* @__const.clock_num.clock, i64 0, i64 %14
%16 = icmp eq i32 %2, 1
%17 = sext i32 %9 to i64
%18 = getelementptr inbounds [10 x i8*], [10 x i8*]* @__const.clock_num.clock, i64 0, i64 %17
%19 = sext i32 %10 to i64
%20 = getelementptr inbounds [10 x i8*], [10 x i8*]* @__const.clock_num.clock, i64 0, i64 %19
br label %21
21: ; preds = %3, %34
%22 = phi i64 [ 0, %3 ], [ %42, %34 ]
%23 = mul nuw nsw i64 %22, 9
%24 = getelementptr inbounds i8, i8* %13, i64 %23
%25 = call i32 @strncat(i8* %5, i8* %24, i32 9)
%26 = load i8*, i8** %15
%27 = getelementptr inbounds i8, i8* %26, i64 %23
%28 = call i32 @strncat(i8* %5, i8* %27, i32 9)
br i1 %16, label %29, label %32
29: ; preds = %21
%30 = getelementptr inbounds [46 x i8], [46 x i8]* @.str, i64 0, i64 %23
%31 = call i32 @strncat(i8* %5, i8* %30, i32 9)
br label %34
32: ; preds = %21
%33 = call i32 @strncat(i8* %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i32 9)
br label %34
34: ; preds = %32, %29
%35 = load i8*, i8** %18
%36 = getelementptr inbounds i8, i8* %35, i64 %23
%37 = call i32 @strncat(i8* %5, i8* %36, i32 9)
%38 = load i8*, i8** %20
%39 = getelementptr inbounds i8, i8* %38, i64 %23
%40 = call i32 @strncat(i8* %5, i8* %39, i32 9)
%41 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%42 = add nuw nsw i64 %22, 1
%43 = icmp eq i64 %42, 5
br i1 %43, label %44, label %21
44: ; preds = %34
%45 = call i32 @green_str_print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* %5)
ret void
}