#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*/ clear_screen();
int hour();
int /*<<< orphan*/ intToString(int, char *);
int minutes();
int /*<<< orphan*/ printf(char *);
int main(void) {
  clear_screen();
  char *hh;
  char *mm;
  int h = hour();
  int m = minutes();
  if (h == 1) {
    h = 22;
  } else if (h == 2) {
    h = 23;
  } else if (h == 0) {
    h = 21;
  } else {
    h = h - 3;
  }
  intToString(h, hh);
  intToString(m, mm);
  printf("Local time is ");
  printf(hh);
  printf(":");
  printf(mm);
  int i = 0;
  while (i < 500000000) {
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <clear_screen@plt>
mov    $0x0,%al
call   1030 <hour@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1070 <minutes@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    1190 <main+0x40>
movl   $0x16,-0x1c(%rbp)
jmp    11cf <main+0x7f>
cmpl   $0x2,-0x1c(%rbp)
jne    11a6 <main+0x56>
movl   $0x17,-0x1c(%rbp)
jmp    11ca <main+0x7a>
cmpl   $0x0,-0x1c(%rbp)
jne    11bc <main+0x6c>
movl   $0x15,-0x1c(%rbp)
jmp    11c5 <main+0x75>
mov    -0x1c(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x1c(%rbp)
jmp    11ca <main+0x7a>
jmp    11cf <main+0x7f>
mov    -0x1c(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <intToString@plt>
mov    -0x20(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1050 <intToString@plt>
lea    0xe12(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <printf@plt>
lea    0xe0c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x1dcd6500,-0x24(%rbp)
jge    1233 <main+0xe3>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1218 <main+0xc8>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1070 <clear_screen@plt>
xor    %eax,%eax
call   1030 <hour@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <minutes@plt>
mov    %eax,%ebp
lea    -0x3(%rbx),%eax
lea    0x15(%rbx),%edi
cmp    $0x3,%ebx
cmovae %eax,%edi
call   1060 <intToString@plt>
mov    %ebp,%edi
call   1060 <intToString@plt>
lea    0xe65(%rip),%rdi
call   1050 <printf@plt>
call   1050 <printf@plt>
mov    $0x3a,%edi
call   1040 <putchar@plt>
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Local time is \00"
@.str.1 = [2 x i8] c":\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 (...) @clear_screen()
%8 = call i32 (...) @hour()
store i32 %8, i32* %4
%9 = call i32 (...) @minutes()
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %0
store i32 22, i32* %4
br label %26
13: ; preds = %0
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 23, i32* %4
br label %25
17: ; preds = %13
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %17
store i32 21, i32* %4
br label %24
21: ; preds = %17
%22 = load i32, i32* %4
%23 = sub nsw i32 %22, 3
store i32 %23, i32* %4
br label %24
24: ; preds = %21, %20
br label %25
25: ; preds = %24, %16
br label %26
26: ; preds = %25, %12
%27 = load i32, i32* %4
%28 = load i8*, i8** %2
%29 = call i32 @intToString(i32 %27, i8* %28)
%30 = load i32, i32* %5
%31 = load i8*, i8** %3
%32 = call i32 @intToString(i32 %30, i8* %31)
%33 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%34 = load i8*, i8** %2
%35 = call i32 @printf(i8* %34)
%36 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%37 = load i8*, i8** %3
%38 = call i32 @printf(i8* %37)
store i32 0, i32* %6
br label %39
39: ; preds = %42, %26
%40 = load i32, i32* %6
%41 = icmp slt i32 %40, 500000000
br i1 %41, label %42, label %45
42: ; preds = %39
%43 = load i32, i32* %6
%44 = add nsw i32 %43, 1
store i32 %44, i32* %6
br label %39
45: ; preds = %39
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Local time is \00"
define i32 @main() {
%1 = tail call i32 (...) @clear_screen()
%2 = tail call i32 (...) @hour()
%3 = tail call i32 (...) @minutes()
%4 = icmp ult i32 %2, 3
%5 = select i1 %4, i32 21, i32 -3
%6 = add i32 %2, %5
%7 = tail call i32 @intToString(i32 %6, i8* undef)
%8 = tail call i32 @intToString(i32 %3, i8* undef)
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @printf(i8* dereferenceable(1) undef)
%11 = tail call i32 @putchar(i32 58)
%12 = tail call i32 @printf(i8* dereferenceable(1) undef)
ret i32 0
}