#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 */
long get_secs();
int /*<<< orphan*/ printf(char *, char *const, char *const, char *const,
                          char *const);
int /*<<< orphan*/ puts(char *);
void qt(void) {
  static char *const hr[] = {"twelve", "one",  "two", "three",
                             "four",   "five", "six", "seven",
                             "eight",  "nine", "ten", "eleven"};
  static char *const mn[] = {"",        "five ",        "ten ", "a quarter ",
                             "twenty ", "twenty-five ", "half "};
  static char *const ny[] = {"nearly ", "almost ", "", "just after ", "after "};
  static char *const up[] = {"to ", "", "past "};
  long adj_mins = (get_secs() + 30L) / 60L + 27L;
  long hours = (adj_mins / 60L) % 12L;
  long minutes = adj_mins % 60L;
  long almost = minutes % 5L;
  long divisions = (minutes / 5L) - 5L;
  long to_past_idx = divisions > 0L ? 1L : 0L;
  if (divisions < 0L) {
    divisions = -divisions;
    to_past_idx = -1L;
  }
  ++to_past_idx;
  (void)printf("It's %s%s%s%s", ny[almost], mn[divisions], up[to_past_idx],
               hr[hours]);
  if (divisions == 0L)
    (void)puts(" o'clock.");
  else
    (void)puts(".");
}


x86 assembly (clang, -O0):
<qt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    $0x0,%al
call   1030 <get_secs@plt>
add    $0x1e,%rax
mov    $0x3c,%ecx
cqto
idiv   %rcx
add    $0x1b,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    $0xc,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x5,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x5,%ecx
cqto
idiv   %rcx
sub    $0x5,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovg  %rcx,%rax
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x28(%rbp)
jge    11df <qt+0xaf>
xor    %eax,%eax
sub    -0x28(%rbp),%rax
mov    %rax,-0x28(%rbp)
movq   $0xffffffffffffffff,-0x30(%rbp)
ff
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rcx
lea    0x2bda(%rip),%rax
mov    (%rax,%rcx,8),%rsi
mov    -0x28(%rbp),%rcx
lea    0x2b8b(%rip),%rax
mov    (%rax,%rcx,8),%rdx
mov    -0x30(%rbp),%rcx
lea    0x2bec(%rip),%rax
mov    (%rax,%rcx,8),%rcx
mov    -0x10(%rbp),%rdi
lea    0x2b0d(%rip),%rax
mov    (%rax,%rdi,8),%r8
lea    0xe62(%rip),%rdi
call   1050 <printf@plt>
cmpq   $0x0,-0x28(%rbp)
jne    124f <qt+0x11f>
lea    0xe59(%rip),%rdi
call   1040 <puts@plt>
jmp    125b <qt+0x12b>
lea    0xe50(%rip),%rdi
call   1040 <puts@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qt>:
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
xor    %eax,%eax
call   1030 <get_secs@plt>
mov    %rax,%rcx
add    $0x1e,%rax
movabs $0x8888888888888889,%rdi
88 88 88
imul   %rdi
add    %rdx,%rcx
add    $0x1e,%rcx
mov    %rcx,%rbx
shr    $0x3f,%rbx
sar    $0x5,%rcx
lea    (%rcx,%rbx,1),%rsi
add    $0x1b,%rsi
mov    %rsi,%rax
imul   %rdi
lea    (%rcx,%rbx,1),%rax
lea    (%rdx,%rax,1),%rdi
add    $0x1b,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x5,%rdi
add    %rax,%rdi
movabs $0x2aaaaaaaaaaaaaab,%rcx
aa aa 2a
mov    %rdi,%rax
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    %rdx
add    %rax,%rdx
shl    $0x2,%rdx
lea    (%rdx,%rdx,2),%rax
imul   $0x3c,%rdi,%rcx
sub    %rax,%rdi
sub    %rcx,%rsi
movsbl %sil,%eax
imul   $0x67,%eax,%eax
movzwl %ax,%eax
movswl %ax,%ecx
shr    $0xf,%eax
shr    $0x9,%ecx
add    %al,%cl
movzbl %cl,%eax
lea    (%rax,%rax,4),%ecx
mov    %esi,%edx
sub    %cl,%dl
movsbq %dl,%r8
movsbq %al,%rax
lea    -0x5(%rax),%rdx
xor    %ecx,%ecx
cmp    $0x1e,%rsi
setge  %cl
mov    $0x5,%ebx
sub    %rax,%rbx
add    $0x1,%rcx
cmp    $0x19,%rsi
cmovge %rdx,%rbx
cmovge %rcx,%r14
lea    0xe3e(%rip),%rax
movslq (%rax,%r8,4),%rsi
add    %rax,%rsi
lea    0xe14(%rip),%rax
movslq (%rax,%rbx,4),%rdx
add    %rax,%rdx
lea    0xe36(%rip),%rax
movslq (%rax,%r14,4),%rcx
add    %rax,%rcx
lea    0xdc8(%rip),%rax
movslq (%rax,%rdi,4),%r8
add    %rax,%r8
lea    0xeb6(%rip),%rdi
call   1050 <printf@plt>
test   %rbx,%rbx
lea    0xeb5(%rip),%rax
lea    0xeb6(%rip),%rdi
cmove  %rax,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <puts@plt>

LLVM IR (-O0):
@qt.hr = internal constant [12 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i32 0, i32 0)]
@.str = [7 x i8] c"twelve\00"
@.str.1 = [4 x i8] c"one\00"
@.str.2 = [4 x i8] c"two\00"
@.str.3 = [6 x i8] c"three\00"
@.str.4 = [5 x i8] c"four\00"
@.str.5 = [5 x i8] c"five\00"
@.str.6 = [4 x i8] c"six\00"
@.str.7 = [6 x i8] c"seven\00"
@.str.8 = [6 x i8] c"eight\00"
@.str.9 = [5 x i8] c"nine\00"
@.str.10 = [4 x i8] c"ten\00"
@.str.11 = [7 x i8] c"eleven\00"
@qt.mn = internal constant [7 x i8*] [i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i32 0, i32 0)]
@.str.12 = [1 x i8] zeroinitializer
@.str.13 = [6 x i8] c"five \00"
@.str.14 = [5 x i8] c"ten \00"
@.str.15 = [11 x i8] c"a quarter \00"
@.str.16 = [8 x i8] c"twenty \00"
@.str.17 = [13 x i8] c"twenty-five \00"
@.str.18 = [6 x i8] c"half \00"
@qt.ny = internal constant [5 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i32 0, i32 0)]
@.str.19 = [8 x i8] c"nearly \00"
@.str.20 = [8 x i8] c"almost \00"
@.str.21 = [12 x i8] c"just after \00"
@.str.22 = [7 x i8] c"after \00"
@qt.up = internal constant [3 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.24, i32 0, i32 0)]
@.str.23 = [4 x i8] c"to \00"
@.str.24 = [6 x i8] c"past \00"
@.str.25 = [14 x i8] c"It's %s%s%s%s\00"
@.str.26 = [10 x i8] c" o'clock.\00"
@.str.27 = [2 x i8] c".\00"
define void @qt() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = call i64 (...) @get_secs()
%8 = add nsw i64 %7, 30
%9 = sdiv i64 %8, 60
%10 = add nsw i64 %9, 27
store i64 %10, i64* %1
%11 = load i64, i64* %1
%12 = sdiv i64 %11, 60
%13 = srem i64 %12, 12
store i64 %13, i64* %2
%14 = load i64, i64* %1
%15 = srem i64 %14, 60
store i64 %15, i64* %3
%16 = load i64, i64* %3
%17 = srem i64 %16, 5
store i64 %17, i64* %4
%18 = load i64, i64* %3
%19 = sdiv i64 %18, 5
%20 = sub nsw i64 %19, 5
store i64 %20, i64* %5
%21 = load i64, i64* %5
%22 = icmp sgt i64 %21, 0
%23 = zext i1 %22 to i64
%24 = select i1 %22, i64 1, i64 0
store i64 %24, i64* %6
%25 = load i64, i64* %5
%26 = icmp slt i64 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %0
%28 = load i64, i64* %5
%29 = sub nsw i64 0, %28
store i64 %29, i64* %5
store i64 -1, i64* %6
br label %30
30: ; preds = %27, %0
%31 = load i64, i64* %6
%32 = add nsw i64 %31, 1
store i64 %32, i64* %6
%33 = load i64, i64* %4
%34 = getelementptr inbounds [5 x i8*], [5 x i8*]* @qt.ny, i64 0, i64 %33
%35 = load i8*, i8** %34
%36 = load i64, i64* %5
%37 = getelementptr inbounds [7 x i8*], [7 x i8*]* @qt.mn, i64 0, i64 %36
%38 = load i8*, i8** %37
%39 = load i64, i64* %6
%40 = getelementptr inbounds [3 x i8*], [3 x i8*]* @qt.up, i64 0, i64 %39
%41 = load i8*, i8** %40
%42 = load i64, i64* %2
%43 = getelementptr inbounds [12 x i8*], [12 x i8*]* @qt.hr, i64 0, i64 %42
%44 = load i8*, i8** %43
%45 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.25, i64 0, i64 0), i8* %35, i8* %38, i8* %41, i8* %44)
%46 = load i64, i64* %5
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %30
%49 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.26, i64 0, i64 0))
br label %52
50: ; preds = %30
%51 = call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.27, i64 0, i64 0))
br label %52
52: ; preds = %50, %48
ret void
}

LLVM IR (-O2):
@reltable.qt = internal unnamed_addr constant [12 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str to i64), i64 ptrtoint ([12 x i32]* @reltable.qt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.1 to i64), i64 ptrtoint ([12 x i32]* @reltable.qt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.2 to i64), i64 ptrtoint ([12 x i32]* @reltable.qt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.3 to i64), i64 ptrtoint ([12 x i32]* @reltable.qt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.4 to i64), i64 ptrtoint ([12 x i32]* @reltable.qt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.5 to i64), i64 ptrtoint ([12 x i32]* @reltable.qt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.6 to i64), i64 ptrtoint ([12 x i32]* @reltable.qt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.7 to i64), i64 ptrtoint ([12 x i32]* @reltable.qt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.8 to i64), i64 ptrtoint ([12 x i32]* @reltable.qt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.9 to i64), i64 ptrtoint ([12 x i32]* @reltable.qt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.10 to i64), i64 ptrtoint ([12 x i32]* @reltable.qt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.11 to i64), i64 ptrtoint ([12 x i32]* @reltable.qt to i64)) to i32)]
@.str = [7 x i8] c"twelve\00"
@.str.1 = [4 x i8] c"one\00"
@.str.2 = [4 x i8] c"two\00"
@.str.3 = [6 x i8] c"three\00"
@.str.4 = [5 x i8] c"four\00"
@.str.5 = [5 x i8] c"five\00"
@.str.6 = [4 x i8] c"six\00"
@.str.7 = [6 x i8] c"seven\00"
@.str.8 = [6 x i8] c"eight\00"
@.str.9 = [5 x i8] c"nine\00"
@.str.10 = [4 x i8] c"ten\00"
@.str.11 = [7 x i8] c"eleven\00"
@reltable.qt.28 = internal unnamed_addr constant [7 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([1 x i8]* @.str.12 to i64), i64 ptrtoint ([7 x i32]* @reltable.qt.28 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.13 to i64), i64 ptrtoint ([7 x i32]* @reltable.qt.28 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.14 to i64), i64 ptrtoint ([7 x i32]* @reltable.qt.28 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.15 to i64), i64 ptrtoint ([7 x i32]* @reltable.qt.28 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.16 to i64), i64 ptrtoint ([7 x i32]* @reltable.qt.28 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.17 to i64), i64 ptrtoint ([7 x i32]* @reltable.qt.28 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.18 to i64), i64 ptrtoint ([7 x i32]* @reltable.qt.28 to i64)) to i32)]
@.str.12 = [1 x i8] zeroinitializer
@.str.13 = [6 x i8] c"five \00"
@.str.14 = [5 x i8] c"ten \00"
@.str.15 = [11 x i8] c"a quarter \00"
@.str.16 = [8 x i8] c"twenty \00"
@.str.17 = [13 x i8] c"twenty-five \00"
@.str.18 = [6 x i8] c"half \00"
@reltable.qt.29 = internal unnamed_addr constant [5 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.19 to i64), i64 ptrtoint ([5 x i32]* @reltable.qt.29 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.20 to i64), i64 ptrtoint ([5 x i32]* @reltable.qt.29 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([1 x i8]* @.str.12 to i64), i64 ptrtoint ([5 x i32]* @reltable.qt.29 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.21 to i64), i64 ptrtoint ([5 x i32]* @reltable.qt.29 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.22 to i64), i64 ptrtoint ([5 x i32]* @reltable.qt.29 to i64)) to i32)]
@.str.19 = [8 x i8] c"nearly \00"
@.str.20 = [8 x i8] c"almost \00"
@.str.21 = [12 x i8] c"just after \00"
@.str.22 = [7 x i8] c"after \00"
@reltable.qt.30 = internal unnamed_addr constant [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.23 to i64), i64 ptrtoint ([3 x i32]* @reltable.qt.30 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([1 x i8]* @.str.12 to i64), i64 ptrtoint ([3 x i32]* @reltable.qt.30 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.24 to i64), i64 ptrtoint ([3 x i32]* @reltable.qt.30 to i64)) to i32)]
@.str.23 = [4 x i8] c"to \00"
@.str.24 = [6 x i8] c"past \00"
@.str.25 = [14 x i8] c"It's %s%s%s%s\00"
@.str.26 = [10 x i8] c" o'clock.\00"
@.str.27 = [2 x i8] c".\00"
define void @qt() {
%1 = tail call i64 (...) @get_secs()
%2 = add nsw i64 %1, 30
%3 = sdiv i64 %2, 60
%4 = add nsw i64 %3, 27
%5 = sdiv i64 %4, 60
%6 = srem i64 %5, 12
%7 = srem i64 %4, 60
%8 = trunc i64 %7 to i8
%9 = srem i8 %8, 5
%10 = sext i8 %9 to i64
%11 = sdiv i8 %8, 5
%12 = sext i8 %11 to i64
%13 = add nsw i64 %12, -5
%14 = icmp sgt i64 %7, 29
%15 = icmp slt i64 %7, 25
%16 = sub nsw i64 5, %12
%17 = select i1 %15, i64 %16, i64 %13
%18 = select i1 %14, i64 2, i64 1
%19 = select i1 %15, i64 0, i64 %18
%20 = shl i64 %10, 2
%21 = call i8* @llvm.load.relative.i64(i8* bitcast ([5 x i32]* @reltable.qt.29 to i8*), i64 %20)
%22 = shl i64 %17, 2
%23 = call i8* @llvm.load.relative.i64(i8* bitcast ([7 x i32]* @reltable.qt.28 to i8*), i64 %22)
%24 = shl i64 %19, 2
%25 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.qt.30 to i8*), i64 %24)
%26 = shl i64 %6, 2
%27 = call i8* @llvm.load.relative.i64(i8* bitcast ([12 x i32]* @reltable.qt to i8*), i64 %26)
%28 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.25, i64 0, i64 0), i8* %21, i8* %23, i8* %25, i8* %27)
%29 = icmp eq i64 %17, 0
%30 = select i1 %29, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.26, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.27, i64 0, i64 0)
%31 = tail call i32 @puts(i8* dereferenceable(1) %30)
ret void
}