#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 */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int hour, minute;
  printf("for Loop Example 9 - Clock Display\n\n");
  for (hour = 0; hour < 12; hour++)
    for (minute = 0; minute < 60; minute++)
      printf("%02d:%02d\n", hour, minute);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xc,-0x8(%rbp)
jge    1184 <main+0x74>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3c,-0xc(%rbp)
jge    1171 <main+0x61>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <main+0x35>
jmp    1176 <main+0x66>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
lea    0xeca(%rip),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x3c,%ebp
jne    1140 <main+0x20>
lea    0xea3(%rip),%rbx
xor    %ebp,%ebp
nop
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x3c,%ebp
jne    1160 <main+0x40>
lea    0xe80(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x2,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x3c,%ebp
jne    1190 <main+0x70>
lea    0xe50(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x3,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x3c,%ebp
jne    11c0 <main+0xa0>
lea    0xe20(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x4,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x3c,%ebp
jne    11f0 <main+0xd0>
lea    0xdf0(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x5,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x3c,%ebp
jne    1220 <main+0x100>
lea    0xdc0(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x6,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x3c,%ebp
jne    1250 <main+0x130>
lea    0xd90(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x7,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x3c,%ebp
jne    1280 <main+0x160>
lea    0xd60(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x8,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x3c,%ebp
jne    12b0 <main+0x190>
lea    0xd30(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x9,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x3c,%ebp
jne    12e0 <main+0x1c0>
lea    0xd00(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0xa,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x3c,%ebp
jne    1310 <main+0x1f0>
lea    0xcd0(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0xb,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x3c,%ebp
jne    1340 <main+0x220>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [37 x i8] c"for Loop Example 9 - Clock Display\0A\0A\00"
@.str.1 = [11 x i8] c"%02d:%02d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %5
5: ; preds = %20, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 12
br i1 %7, label %8, label %23
8: ; preds = %5
store i32 0, i32* %3
br label %9
9: ; preds = %16, %8
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 60
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %13, i32 %14)
br label %16
16: ; preds = %12
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %9
19: ; preds = %9
br label %20
20: ; preds = %19
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %5
23: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"%02d:%02d\0A\00"
@str = [36 x i8] c"for Loop Example 9 - Clock Display\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 %3)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 60
br i1 %6, label %7, label %2
7: ; preds = %2, %7
%8 = phi i32 [ %10, %7 ], [ 0, %2 ]
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 %8)
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, 60
br i1 %11, label %12, label %7
12: ; preds = %7, %12
%13 = phi i32 [ %15, %12 ], [ 0, %7 ]
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 %13)
%15 = add nuw nsw i32 %13, 1
%16 = icmp eq i32 %15, 60
br i1 %16, label %17, label %12
17: ; preds = %12, %17
%18 = phi i32 [ %20, %17 ], [ 0, %12 ]
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 %18)
%20 = add nuw nsw i32 %18, 1
%21 = icmp eq i32 %20, 60
br i1 %21, label %22, label %17
22: ; preds = %17, %22
%23 = phi i32 [ %25, %22 ], [ 0, %17 ]
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 %23)
%25 = add nuw nsw i32 %23, 1
%26 = icmp eq i32 %25, 60
br i1 %26, label %27, label %22
27: ; preds = %22, %27
%28 = phi i32 [ %30, %27 ], [ 0, %22 ]
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 %28)
%30 = add nuw nsw i32 %28, 1
%31 = icmp eq i32 %30, 60
br i1 %31, label %32, label %27
32: ; preds = %27, %32
%33 = phi i32 [ %35, %32 ], [ 0, %27 ]
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 6, i32 %33)
%35 = add nuw nsw i32 %33, 1
%36 = icmp eq i32 %35, 60
br i1 %36, label %37, label %32
37: ; preds = %32, %37
%38 = phi i32 [ %40, %37 ], [ 0, %32 ]
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 7, i32 %38)
%40 = add nuw nsw i32 %38, 1
%41 = icmp eq i32 %40, 60
br i1 %41, label %42, label %37
42: ; preds = %37, %42
%43 = phi i32 [ %45, %42 ], [ 0, %37 ]
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 %43)
%45 = add nuw nsw i32 %43, 1
%46 = icmp eq i32 %45, 60
br i1 %46, label %47, label %42
47: ; preds = %42, %47
%48 = phi i32 [ %50, %47 ], [ 0, %42 ]
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 9, i32 %48)
%50 = add nuw nsw i32 %48, 1
%51 = icmp eq i32 %50, 60
br i1 %51, label %52, label %47
52: ; preds = %47, %52
%53 = phi i32 [ %55, %52 ], [ 0, %47 ]
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 %53)
%55 = add nuw nsw i32 %53, 1
%56 = icmp eq i32 %55, 60
br i1 %56, label %57, label %52
57: ; preds = %52, %57
%58 = phi i32 [ %60, %57 ], [ 0, %52 ]
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 11, i32 %58)
%60 = add nuw nsw i32 %58, 1
%61 = icmp eq i32 %60, 60
br i1 %61, label %62, label %57
62: ; preds = %57
ret i32 0
}