#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*/ time_t;
struct tm {
  int tm_min;
  int tm_hour;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
struct tm *gmtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ print_hours(int);
int /*<<< orphan*/ print_minutes(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int /*<<< orphan*/ stderr;
char *strstr(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ usage(char **);
int main(int argc, char *argv[]) {
  char *colon;
  int hours, minutes, temp_minutes, temp_hours, am, twentyfour;
  if (argc > 2) {
    usage(argv);
  }
  if (argc == 2) {
    colon = strstr(argv[1], ":");
    if (colon == NULL) {
      fprintf(stderr, "Invalid time format on command line\n");
      usage(argv);
    }
    sscanf(argv[1], "%d", &temp_hours);
    sscanf(colon + 1, "%d", &temp_minutes);
    if ((strstr(argv[1], "am") != NULL) || (strstr(argv[1], "AM") != NULL)) {
      am = 1;
    } else if ((strstr(argv[1], "pm") != NULL) ||
               (strstr(argv[1], "PM") != NULL)) {
      am = 0;
    } else
      usage(argv);
  } else {
    time_t timep = time(NULL);
    struct tm *curr_time = gmtime(&timep);
    temp_minutes = curr_time->tm_min;
    temp_hours = curr_time->tm_hour;
    if (temp_hours > 12) {
      am = 0;
      temp_hours -= 12;
    } else {
      am = 1;
    }
  }
  minutes = (temp_minutes / 5) * 5;
  if ((temp_minutes % 5) > 2) {
    minutes += 5;
  }
  if (minutes > 30) {
    hours = temp_hours + 1;
    if (hours == 13)
      hours = 1;
    if (hours == 12) {
      if (am == 1)
        am = 0;
      else
        am = 1;
    }
  } else {
    hours = temp_hours;
  }
  printf("Time is");
  if ((temp_minutes < minutes) && (temp_hours == hours)) {
    printf(" almost");
  } else if ((temp_minutes > minutes) && (temp_hours == hours)) {
    printf(" about");
  } else if ((temp_minutes > minutes) && (temp_hours != hours)) {
    printf(" almost");
  } else if ((temp_minutes < minutes) && (temp_hours != hours)) {
    printf(" around");
  } else if (temp_minutes == minutes) {
    printf(" exactly");
  }
  print_minutes(minutes);
  if (am == 0) {
    if (hours == 12)
      twentyfour = 12;
    else
      twentyfour = hours + 12;
  } else {
    if (hours == 12)
      twentyfour = 0;
    else
      twentyfour = hours;
  }
  print_hours(twentyfour);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    11b9 <main+0x29>
mov    -0x10(%rbp),%rdi
call   1080 <usage@plt>
cmpl   $0x2,-0x8(%rbp)
jne    12d7 <main+0x147>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe2e(%rip),%rsi
call   10b0 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1204 <main+0x74>
mov    0x2df3(%rip),%rax
mov    (%rax),%edi
lea    0xe0c(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1080 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe14(%rip),%rsi
lea    -0x28(%rbp),%rdx
call   1070 <sscanf@plt>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xdfc(%rip),%rsi
lea    -0x24(%rbp),%rdx
call   1070 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xde7(%rip),%rsi
call   10b0 <strstr@plt>
cmp    $0x0,%rax
jne    1270 <main+0xe0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdcc(%rip),%rsi
call   10b0 <strstr@plt>
cmp    $0x0,%rax
je     127c <main+0xec>
movl   $0x1,-0x2c(%rbp)
jmp    12d2 <main+0x142>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xda5(%rip),%rsi
call   10b0 <strstr@plt>
cmp    $0x0,%rax
jne    12b8 <main+0x128>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd8a(%rip),%rsi
call   10b0 <strstr@plt>
cmp    $0x0,%rax
je     12c4 <main+0x134>
movl   $0x0,-0x2c(%rbp)
jmp    12cd <main+0x13d>
mov    -0x10(%rbp),%rdi
call   1080 <usage@plt>
jmp    12d2 <main+0x142>
jmp    132e <main+0x19e>
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,-0x34(%rbp)
lea    -0x34(%rbp),%rdi
call   1090 <gmtime@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x40(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x28(%rbp)
cmpl   $0xc,-0x28(%rbp)
jle    1322 <main+0x192>
movl   $0x0,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
sub    $0xc,%eax
mov    %eax,-0x28(%rbp)
jmp    1329 <main+0x199>
movl   $0x1,-0x2c(%rbp)
jmp    132e <main+0x19e>
mov    -0x24(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
imul   $0x5,%eax,%eax
mov    %eax,-0x20(%rbp)
mov    -0x24(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x2,%edx
jle    135c <main+0x1cc>
mov    -0x20(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x1e,-0x20(%rbp)
jle    13b1 <main+0x221>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0xd,-0x1c(%rbp)
jne    1380 <main+0x1f0>
movl   $0x1,-0x1c(%rbp)
cmpl   $0xc,-0x1c(%rbp)
jne    13ac <main+0x21c>
cmpl   $0x1,-0x2c(%rbp)
jne    13a0 <main+0x210>
movl   $0x0,-0x2c(%rbp)
jmp    13a7 <main+0x217>
movl   $0x1,-0x2c(%rbp)
jmp    13ac <main+0x21c>
jmp    13b7 <main+0x227>
mov    -0x28(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    0xc78(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    13ec <main+0x25c>
mov    -0x28(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    13ec <main+0x25c>
lea    0xc5c(%rip),%rdi
call   1030 <printf@plt>
jmp    1493 <main+0x303>
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    1415 <main+0x285>
mov    -0x28(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    1415 <main+0x285>
lea    0xc3b(%rip),%rdi
call   1030 <printf@plt>
jmp    148e <main+0x2fe>
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    143e <main+0x2ae>
mov    -0x28(%rbp),%eax
cmp    -0x1c(%rbp),%eax
je     143e <main+0x2ae>
lea    0xc0a(%rip),%rdi
call   1030 <printf@plt>
jmp    1489 <main+0x2f9>
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1467 <main+0x2d7>
mov    -0x28(%rbp),%eax
cmp    -0x1c(%rbp),%eax
je     1467 <main+0x2d7>
lea    0xbf0(%rip),%rdi
call   1030 <printf@plt>
jmp    1484 <main+0x2f4>
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jne    147f <main+0x2ef>
lea    0xbdb(%rip),%rdi
call   1030 <printf@plt>
jmp    1484 <main+0x2f4>
jmp    1489 <main+0x2f9>
jmp    148e <main+0x2fe>
jmp    1493 <main+0x303>
mov    -0x20(%rbp),%edi
call   10a0 <print_minutes@plt>
cmpl   $0x0,-0x2c(%rbp)
jne    14c9 <main+0x339>
cmpl   $0xc,-0x1c(%rbp)
jne    14bb <main+0x32b>
movl   $0xc,-0x30(%rbp)
jmp    14c4 <main+0x334>
mov    -0x1c(%rbp),%eax
add    $0xc,%eax
mov    %eax,-0x30(%rbp)
jmp    14ea <main+0x35a>
cmpl   $0xc,-0x1c(%rbp)
jne    14df <main+0x34f>
movl   $0x0,-0x30(%rbp)
jmp    14e5 <main+0x355>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    14ea <main+0x35a>
mov    -0x30(%rbp),%edi
call   1040 <print_hours@plt>
lea    0xb2c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r15
cmp    $0x3,%edi
jl     11d1 <main+0x21>
mov    %r15,%rdi
call   10a0 <usage@plt>
jmp    12a6 <main+0xf6>
cmp    $0x2,%edi
jne    12a6 <main+0xf6>
mov    0x8(%r15),%r14
mov    %r14,%rdi
mov    $0x3a,%esi
call   1040 <strchr@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1214 <main+0x64>
mov    0x2de6(%rip),%rax
mov    (%rax),%edi
lea    0xdfd(%rip),%rsi
call   1070 <fprintf@plt>
mov    %r15,%rdi
call   10a0 <usage@plt>
mov    0x8(%r15),%r14
lea    0xe0a(%rip),%r12
lea    0x4(%rsp),%rdx
mov    %r14,%rdi
mov    %r12,%rsi
call   1090 <sscanf@plt>
add    $0x1,%rbx
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
mov    %r12,%rsi
call   1090 <sscanf@plt>
mov    0x8(%r15),%r14
lea    0xdde(%rip),%rsi
mov    %r14,%rdi
call   10d0 <strstr@plt>
mov    $0x1,%r12d
test   %rax,%rax
jne    12d8 <main+0x128>
lea    0xdc7(%rip),%rsi
mov    %r14,%rdi
call   10d0 <strstr@plt>
test   %rax,%rax
jne    12d8 <main+0x128>
lea    0xdb6(%rip),%rsi
mov    %r14,%rdi
call   10d0 <strstr@plt>
xor    %r12d,%r12d
test   %rax,%rax
jne    12d8 <main+0x128>
lea    0xda2(%rip),%rsi
mov    %r14,%rdi
call   10d0 <strstr@plt>
test   %rax,%rax
jne    12d8 <main+0x128>
mov    %r15,%rdi
call   10a0 <usage@plt>
jmp    12d8 <main+0x128>
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   10b0 <gmtime@plt>
mov    (%rax),%ecx
mov    %ecx,0x8(%rsp)
mov    0x4(%rax),%eax
lea    -0xc(%rax),%ecx
xor    %r12d,%r12d
cmp    $0xd,%eax
setl   %r12b
cmovl  %eax,%ecx
mov    %ecx,0x4(%rsp)
movslq 0x8(%rsp),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
sub    %edx,%eax
cmp    $0x3,%eax
lea    0x5(%rcx,%rcx,4),%ebx
cmovl  %edx,%ebx
mov    0x4(%rsp),%ebp
cmp    $0x1f,%ebx
jl     132f <main+0x17f>
mov    %ebp,%eax
add    $0x1,%eax
cmp    $0xd,%eax
mov    $0x1,%ebp
cmovne %eax,%ebp
cmp    $0xc,%ebp
jne    132f <main+0x17f>
xor    %eax,%eax
cmp    $0x1,%r12d
setne  %al
mov    $0xc,%ebp
mov    %eax,%r12d
lea    0xcfe(%rip),%rdi
call   1050 <printf@plt>
mov    0x8(%rsp),%eax
mov    0x4(%rsp),%ecx
lea    0xcf2(%rip),%rdi
cmp    %ebx,%eax
jge    1352 <main+0x1a2>
cmp    %ebp,%ecx
je     1387 <main+0x1d7>
cmp    %ebx,%eax
jle    1363 <main+0x1b3>
cmp    %ebp,%ecx
jne    1363 <main+0x1b3>
lea    0xce3(%rip),%rdi
jmp    1387 <main+0x1d7>
cmp    %ebx,%eax
jle    136b <main+0x1bb>
cmp    %ebp,%ecx
jne    1387 <main+0x1d7>
cmp    %ebx,%eax
jge    137c <main+0x1cc>
cmp    %ebp,%ecx
je     137c <main+0x1cc>
lea    0xcd1(%rip),%rdi
jmp    1387 <main+0x1d7>
cmp    %ebx,%eax
jne    138c <main+0x1dc>
lea    0xccc(%rip),%rdi
call   1050 <printf@plt>
mov    %ebx,%edi
call   10c0 <print_minutes@plt>
lea    0xc(%rbp),%edi
xor    %eax,%eax
cmp    $0xc,%ebp
mov    %ebp,%ecx
cmove  %eax,%ecx
cmove  %ebp,%edi
test   %r12d,%r12d
cmovne %ecx,%edi
call   1060 <print_hours@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32 }
@.str = [2 x i8] c":\00"
@stderr = global i32 0
@.str.1 = [37 x i8] c"Invalid time format on command line\0A\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"am\00"
@.str.4 = [3 x i8] c"AM\00"
@.str.5 = [3 x i8] c"pm\00"
@.str.6 = [3 x i8] c"PM\00"
@.str.7 = [8 x i8] c"Time is\00"
@.str.8 = [8 x i8] c" almost\00"
@.str.9 = [7 x i8] c" about\00"
@.str.10 = [8 x i8] c" around\00"
@.str.11 = [9 x i8] c" exactly\00"
@.str.12 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca %struct.tm*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* %4
%16 = icmp sgt i32 %15, 2
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = call i32 @usage(i8** %18)
br label %20
20: ; preds = %17, %2
%21 = load i32, i32* %4
%22 = icmp eq i32 %21, 2
br i1 %22, label %23, label %73
23: ; preds = %20
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i8* @strstr(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %27, i8** %6
%28 = load i8*, i8** %6
%29 = icmp eq i8* %28, null
br i1 %29, label %30, label %35
30: ; preds = %23
%31 = load i32, i32* @stderr
%32 = call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%33 = load i8**, i8*** %5
%34 = call i32 @usage(i8** %33)
br label %35
35: ; preds = %30, %23
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 1
%38 = load i8*, i8** %37
%39 = call i32 @sscanf(i8* %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %10)
%40 = load i8*, i8** %6
%41 = getelementptr inbounds i8, i8* %40, i64 1
%42 = call i32 @sscanf(i8* %41, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %9)
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 1
%45 = load i8*, i8** %44
%46 = call i8* @strstr(i8* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%47 = icmp ne i8* %46, null
br i1 %47, label %54, label %48
48: ; preds = %35
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 1
%51 = load i8*, i8** %50
%52 = call i8* @strstr(i8* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%53 = icmp ne i8* %52, null
br i1 %53, label %54, label %55
54: ; preds = %48, %35
store i32 1, i32* %11
br label %72
55: ; preds = %48
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 1
%58 = load i8*, i8** %57
%59 = call i8* @strstr(i8* %58, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%60 = icmp ne i8* %59, null
br i1 %60, label %67, label %61
61: ; preds = %55
%62 = load i8**, i8*** %5
%63 = getelementptr inbounds i8*, i8** %62, i64 1
%64 = load i8*, i8** %63
%65 = call i8* @strstr(i8* %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%66 = icmp ne i8* %65, null
br i1 %66, label %67, label %68
67: ; preds = %61, %55
store i32 0, i32* %11
br label %71
68: ; preds = %61
%69 = load i8**, i8*** %5
%70 = call i32 @usage(i8** %69)
br label %71
71: ; preds = %68, %67
br label %72
72: ; preds = %71, %54
br label %89
73: ; preds = %20
%74 = call i32 @time(i32* null)
store i32 %74, i32* %13
%75 = call %struct.tm* @gmtime(i32* %13)
store %struct.tm* %75, %struct.tm** %14
%76 = load %struct.tm*, %struct.tm** %14
%77 = getelementptr inbounds %struct.tm, %struct.tm* %76, i32 0, i32 0
%78 = load i32, i32* %77
store i32 %78, i32* %9
%79 = load %struct.tm*, %struct.tm** %14
%80 = getelementptr inbounds %struct.tm, %struct.tm* %79, i32 0, i32 1
%81 = load i32, i32* %80
store i32 %81, i32* %10
%82 = load i32, i32* %10
%83 = icmp sgt i32 %82, 12
br i1 %83, label %84, label %87
84: ; preds = %73
store i32 0, i32* %11
%85 = load i32, i32* %10
%86 = sub nsw i32 %85, 12
store i32 %86, i32* %10
br label %88
87: ; preds = %73
store i32 1, i32* %11
br label %88
88: ; preds = %87, %84
br label %89
89: ; preds = %88, %72
%90 = load i32, i32* %9
%91 = sdiv i32 %90, 5
%92 = mul nsw i32 %91, 5
store i32 %92, i32* %8
%93 = load i32, i32* %9
%94 = srem i32 %93, 5
%95 = icmp sgt i32 %94, 2
br i1 %95, label %96, label %99
96: ; preds = %89
%97 = load i32, i32* %8
%98 = add nsw i32 %97, 5
store i32 %98, i32* %8
br label %99
99: ; preds = %96, %89
%100 = load i32, i32* %8
%101 = icmp sgt i32 %100, 30
br i1 %101, label %102, label %118
102: ; preds = %99
%103 = load i32, i32* %10
%104 = add nsw i32 %103, 1
store i32 %104, i32* %7
%105 = load i32, i32* %7
%106 = icmp eq i32 %105, 13
br i1 %106, label %107, label %108
107: ; preds = %102
store i32 1, i32* %7
br label %108
108: ; preds = %107, %102
%109 = load i32, i32* %7
%110 = icmp eq i32 %109, 12
br i1 %110, label %111, label %117
111: ; preds = %108
%112 = load i32, i32* %11
%113 = icmp eq i32 %112, 1
br i1 %113, label %114, label %115
114: ; preds = %111
store i32 0, i32* %11
br label %116
115: ; preds = %111
store i32 1, i32* %11
br label %116
116: ; preds = %115, %114
br label %117
117: ; preds = %116, %108
br label %120
118: ; preds = %99
%119 = load i32, i32* %10
store i32 %119, i32* %7
br label %120
120: ; preds = %118, %117
%121 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%122 = load i32, i32* %9
%123 = load i32, i32* %8
%124 = icmp slt i32 %122, %123
br i1 %124, label %125, label %131
125: ; preds = %120
%126 = load i32, i32* %10
%127 = load i32, i32* %7
%128 = icmp eq i32 %126, %127
br i1 %128, label %129, label %131
129: ; preds = %125
%130 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
br label %171
131: ; preds = %125, %120
%132 = load i32, i32* %9
%133 = load i32, i32* %8
%134 = icmp sgt i32 %132, %133
br i1 %134, label %135, label %141
135: ; preds = %131
%136 = load i32, i32* %10
%137 = load i32, i32* %7
%138 = icmp eq i32 %136, %137
br i1 %138, label %139, label %141
139: ; preds = %135
%140 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
br label %170
141: ; preds = %135, %131
%142 = load i32, i32* %9
%143 = load i32, i32* %8
%144 = icmp sgt i32 %142, %143
br i1 %144, label %145, label %151
145: ; preds = %141
%146 = load i32, i32* %10
%147 = load i32, i32* %7
%148 = icmp ne i32 %146, %147
br i1 %148, label %149, label %151
149: ; preds = %145
%150 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
br label %169
151: ; preds = %145, %141
%152 = load i32, i32* %9
%153 = load i32, i32* %8
%154 = icmp slt i32 %152, %153
br i1 %154, label %155, label %161
155: ; preds = %151
%156 = load i32, i32* %10
%157 = load i32, i32* %7
%158 = icmp ne i32 %156, %157
br i1 %158, label %159, label %161
159: ; preds = %155
%160 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
br label %168
161: ; preds = %155, %151
%162 = load i32, i32* %9
%163 = load i32, i32* %8
%164 = icmp eq i32 %162, %163
br i1 %164, label %165, label %167
165: ; preds = %161
%166 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
br label %167
167: ; preds = %165, %161
br label %168
168: ; preds = %167, %159
br label %169
169: ; preds = %168, %149
br label %170
170: ; preds = %169, %139
br label %171
171: ; preds = %170, %129
%172 = load i32, i32* %8
%173 = call i32 @print_minutes(i32 %172)
%174 = load i32, i32* %11
%175 = icmp eq i32 %174, 0
br i1 %175, label %176, label %184
176: ; preds = %171
%177 = load i32, i32* %7
%178 = icmp eq i32 %177, 12
br i1 %178, label %179, label %180
179: ; preds = %176
store i32 12, i32* %12
br label %183
180: ; preds = %176
%181 = load i32, i32* %7
%182 = add nsw i32 %181, 12
store i32 %182, i32* %12
br label %183
183: ; preds = %180, %179
br label %191
184: ; preds = %171
%185 = load i32, i32* %7
%186 = icmp eq i32 %185, 12
br i1 %186, label %187, label %188
187: ; preds = %184
store i32 0, i32* %12
br label %190
188: ; preds = %184
%189 = load i32, i32* %7
store i32 %189, i32* %12
br label %190
190: ; preds = %188, %187
br label %191
191: ; preds = %190, %183
%192 = load i32, i32* %12
%193 = call i32 @print_hours(i32 %192)
%194 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.tm = type { i32, i32 }
@stderr = global i32 0
@.str.1 = [37 x i8] c"Invalid time format on command line\0A\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"am\00"
@.str.4 = [3 x i8] c"AM\00"
@.str.5 = [3 x i8] c"pm\00"
@.str.6 = [3 x i8] c"PM\00"
@.str.7 = [8 x i8] c"Time is\00"
@.str.8 = [8 x i8] c" almost\00"
@.str.9 = [7 x i8] c" about\00"
@.str.10 = [8 x i8] c" around\00"
@.str.11 = [9 x i8] c" exactly\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = icmp sgt i32 %0, 2
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = tail call i32 @usage(i8** %1)
br label %42
11: ; preds = %2
%12 = icmp eq i32 %0, 2
br i1 %12, label %13, label %42
13: ; preds = %11
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = tail call i8* @strchr(i8* dereferenceable(1) %15, i32 58)
%17 = icmp eq i8* %16, null
br i1 %17, label %18, label %23
18: ; preds = %13
%19 = load i32, i32* @stderr
%20 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%21 = tail call i32 @usage(i8** %1)
%22 = load i8*, i8** %14
br label %23
23: ; preds = %18, %13
%24 = phi i8* [ %22, %18 ], [ %15, %13 ]
%25 = call i32 @sscanf(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%26 = getelementptr inbounds i8, i8* %16, i64 1
%27 = call i32 @sscanf(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%28 = load i8*, i8** %14
%29 = call i8* @strstr(i8* dereferenceable(1) %28, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%30 = icmp eq i8* %29, null
br i1 %30, label %31, label %55
31: ; preds = %23
%32 = call i8* @strstr(i8* dereferenceable(1) %28, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%33 = icmp eq i8* %32, null
br i1 %33, label %34, label %55
34: ; preds = %31
%35 = call i8* @strstr(i8* dereferenceable(1) %28, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%36 = icmp eq i8* %35, null
br i1 %36, label %37, label %55
37: ; preds = %34
%38 = call i8* @strstr(i8* dereferenceable(1) %28, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%39 = icmp eq i8* %38, null
br i1 %39, label %40, label %55
40: ; preds = %37
%41 = call i32 @usage(i8** %1)
br label %55
42: ; preds = %9, %11
%43 = bitcast i32* %5 to i8*
%44 = tail call i32 @time(i32* null)
store i32 %44, i32* %5
%45 = call %struct.tm* @gmtime(i32* %5)
%46 = getelementptr inbounds %struct.tm, %struct.tm* %45, i64 0, i32 0
%47 = load i32, i32* %46
store i32 %47, i32* %3
%48 = getelementptr inbounds %struct.tm, %struct.tm* %45, i64 0, i32 1
%49 = load i32, i32* %48
%50 = icmp sgt i32 %49, 12
%51 = add nsw i32 %49, -12
%52 = select i1 %50, i32 %51, i32 %49
%53 = xor i1 %50, true
%54 = zext i1 %53 to i32
store i32 %52, i32* %4
br label %55
55: ; preds = %34, %37, %23, %31, %40, %42
%56 = phi i32 [ undef, %40 ], [ %54, %42 ], [ 1, %31 ], [ 1, %23 ], [ 0, %37 ], [ 0, %34 ]
%57 = load i32, i32* %3
%58 = srem i32 %57, 5
%59 = sub i32 %57, %58
%60 = icmp sgt i32 %58, 2
%61 = add nsw i32 %59, 5
%62 = select i1 %60, i32 %61, i32 %59
%63 = icmp sgt i32 %62, 30
%64 = load i32, i32* %4
br i1 %63, label %65, label %73
65: ; preds = %55
%66 = add nsw i32 %64, 1
%67 = icmp eq i32 %66, 13
%68 = select i1 %67, i32 1, i32 %66
%69 = icmp eq i32 %68, 12
br i1 %69, label %70, label %73
70: ; preds = %65
%71 = icmp ne i32 %56, 1
%72 = zext i1 %71 to i32
br label %73
73: ; preds = %55, %70, %65
%74 = phi i32 [ %56, %65 ], [ %72, %70 ], [ %56, %55 ]
%75 = phi i32 [ %68, %65 ], [ 12, %70 ], [ %64, %55 ]
%76 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%77 = load i32, i32* %3
%78 = icmp slt i32 %77, %62
%79 = load i32, i32* %4
%80 = icmp eq i32 %79, %75
%81 = select i1 %78, i1 %80, i1 false
br i1 %81, label %93, label %82
82: ; preds = %73
%83 = icmp sgt i32 %77, %62
%84 = select i1 %83, i1 %80, i1 false
br i1 %84, label %93, label %85
85: ; preds = %82
%86 = icmp sle i32 %77, %62
%87 = select i1 %86, i1 true, i1 %80
br i1 %87, label %88, label %93
88: ; preds = %85
%89 = icmp sge i32 %77, %62
%90 = select i1 %89, i1 true, i1 %80
br i1 %90, label %91, label %93
91: ; preds = %88
%92 = icmp eq i32 %77, %62
br i1 %92, label %93, label %96
93: ; preds = %91, %88, %85, %82, %73
%94 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), %73 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), %82 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), %85 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), %88 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), %91 ]
%95 = call i32 @printf(i8* dereferenceable(1) %94)
br label %96
96: ; preds = %93, %91
%97 = call i32 @print_minutes(i32 %62)
%98 = icmp eq i32 %74, 0
%99 = icmp eq i32 %75, 12
%100 = select i1 %99, i32 0, i32 %75
%101 = add nsw i32 %75, 12
%102 = select i1 %99, i32 12, i32 %101
%103 = select i1 %98, i32 %102, i32 %100
%104 = call i32 @print_hours(i32 %103)
%105 = call i32 @putchar(i32 10)
ret i32 0
}