#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*/ _putchar(char);
void jack_bauer(void) {
  int i, n;
  for (i = 0; i < 24; i++) {
    for (n = 0; n < 60; n++) {
      _putchar((i / 10) + '0');
      _putchar((i % 10) + '0');
      _putchar(':');
      _putchar((n / 10) + '0');
      _putchar((n % 10) + '0');
      _putchar('\n');
    }
  }
}


x86 assembly (clang, -O0):
<jack_bauer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x18,-0x4(%rbp)
jge    11cb <jack_bauer+0xbb>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3c,-0x8(%rbp)
jge    11b8 <jack_bauer+0xa8>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%eax
movsbl %al,%edi
call   1030 <_putchar@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%al
movsbl %al,%edi
call   1030 <_putchar@plt>
mov    $0x3a,%edi
call   1030 <_putchar@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%eax
movsbl %al,%edi
call   1030 <_putchar@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%al
movsbl %al,%edi
call   1030 <_putchar@plt>
mov    $0xa,%edi
call   1030 <_putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <jack_bauer+0x20>
jmp    11bd <jack_bauer+0xad>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <jack_bauer+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jack_bauer>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %r15d,%r15d
xchg   %ax,%ax
mov    %r15d,%eax
mov    $0xcccccccd,%ecx
imul   %rcx,%rax
shr    $0x23,%rax
lea    0x30(%rax),%r12d
add    %eax,%eax
lea    (%rax,%rax,4),%eax
mov    %r15d,%r13d
sub    %eax,%r13d
or     $0x30,%r13b
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
movzbl %bpl,%eax
imul   $0xcd,%eax,%ebx
shr    $0xb,%ebx
mov    %ebx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%r14d
movsbl %r12b,%edi
call   1030 <_putchar@plt>
movsbl %r13b,%edi
call   1030 <_putchar@plt>
mov    $0x3a,%edi
call   1030 <_putchar@plt>
lea    0x30(%rbx),%eax
movzbl %al,%edi
call   1030 <_putchar@plt>
mov    %ebp,%eax
sub    %r14d,%eax
or     $0x30,%al
movsbl %al,%edi
call   1030 <_putchar@plt>
mov    $0xa,%edi
call   1030 <_putchar@plt>
add    $0x1,%ebp
cmp    $0x3c,%ebp
jne    1150 <jack_bauer+0x40>
add    $0x1,%r15d
cmp    $0x18,%r15d
jne    1120 <jack_bauer+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @jack_bauer() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %37, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 24
br i1 %5, label %6, label %40
6: ; preds = %3
store i32 0, i32* %2
br label %7
7: ; preds = %33, %6
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 60
br i1 %9, label %10, label %36
10: ; preds = %7
%11 = load i32, i32* %1
%12 = sdiv i32 %11, 10
%13 = add nsw i32 %12, 48
%14 = trunc i32 %13 to i8
%15 = call i32 @_putchar(i8 signext %14)
%16 = load i32, i32* %1
%17 = srem i32 %16, 10
%18 = add nsw i32 %17, 48
%19 = trunc i32 %18 to i8
%20 = call i32 @_putchar(i8 signext %19)
%21 = call i32 @_putchar(i8 signext 58)
%22 = load i32, i32* %2
%23 = sdiv i32 %22, 10
%24 = add nsw i32 %23, 48
%25 = trunc i32 %24 to i8
%26 = call i32 @_putchar(i8 signext %25)
%27 = load i32, i32* %2
%28 = srem i32 %27, 10
%29 = add nsw i32 %28, 48
%30 = trunc i32 %29 to i8
%31 = call i32 @_putchar(i8 signext %30)
%32 = call i32 @_putchar(i8 signext 10)
br label %33
33: ; preds = %10
%34 = load i32, i32* %2
%35 = add nsw i32 %34, 1
store i32 %35, i32* %2
br label %7
36: ; preds = %7
br label %37
37: ; preds = %36
%38 = load i32, i32* %1
%39 = add nsw i32 %38, 1
store i32 %39, i32* %1
br label %3
40: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @jack_bauer() {
br label %1
1: ; preds = %0, %24
%2 = phi i32 [ 0, %0 ], [ %25, %24 ]
%3 = udiv i32 %2, 10
%4 = trunc i32 %3 to i8
%5 = add i8 %4, 48
%6 = urem i32 %2, 10
%7 = trunc i32 %6 to i8
%8 = or i8 %7, 48
br label %9
9: ; preds = %1, %9
%10 = phi i32 [ 0, %1 ], [ %22, %9 ]
%11 = tail call i32 @_putchar(i8 signext %5)
%12 = tail call i32 @_putchar(i8 signext %8)
%13 = tail call i32 @_putchar(i8 signext 58)
%14 = trunc i32 %10 to i8
%15 = udiv i8 %14, 10
%16 = add nuw nsw i8 %15, 48
%17 = tail call i32 @_putchar(i8 signext %16)
%18 = urem i8 %14, 10
%19 = or i8 %18, 48
%20 = tail call i32 @_putchar(i8 signext %19)
%21 = tail call i32 @_putchar(i8 signext 10)
%22 = add nuw nsw i32 %10, 1
%23 = icmp eq i32 %22, 60
br i1 %23, label %24, label %9
24: ; preds = %9
%25 = add nuw nsw i32 %2, 1
%26 = icmp eq i32 %25, 24
br i1 %26, label %27, label %1
27: ; preds = %24
ret void
}