#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*/ ft_takes_place_next(int);
int /*<<< orphan*/ printf(char *, int);
void ft_takes_place(int hour) {
  if (hour <= 8 && hour >= 1) {
    printf("THE FOLLOWING TAKES BETWEEN 0%d.00 A.M.", hour);
    printf("AND 0%d.00 A.M.\n", (hour + 1));
  }
  if (hour == 9) {
    printf("THE FOLLOWING TAKES BETWEEN 0%d.00 A.M.", hour);
    printf("AND %d.00 A.M.\n", (hour + 1));
  }
  if (hour == 10) {
    printf("THE FOLLOWING TAKES BETWEEN %d.00 A.M.", hour);
    printf("AND %d.00 A.M.\n", (hour + 1));
  }
  if (hour == 11) {
    printf("THE FOLLOWING TAKES BETWEEN %d.00 A.M.", hour);
    printf("AND %d.00 P.M.\n", (hour + 1));
  }
  if (hour > 11 || hour == 0)
    ft_takes_place_next(hour);
}


x86 assembly (clang, -O0):
<ft_takes_place>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x8,-0x4(%rbp)
jg     1160 <ft_takes_place+0x40>
cmpl   $0x1,-0x4(%rbp)
jl     1160 <ft_takes_place+0x40>
mov    -0x4(%rbp),%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
add    $0x1,%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x9,-0x4(%rbp)
jne    118b <ft_takes_place+0x6b>
mov    -0x4(%rbp),%esi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
add    $0x1,%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0xa,-0x4(%rbp)
jne    11b6 <ft_takes_place+0x96>
mov    -0x4(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
add    $0x1,%esi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0xb,-0x4(%rbp)
jne    11e1 <ft_takes_place+0xc1>
mov    -0x4(%rbp),%esi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
add    $0x1,%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0xb,-0x4(%rbp)
jg     11f5 <ft_takes_place+0xd5>
cmpl   $0x0,-0x4(%rbp)
jne    11fd <ft_takes_place+0xdd>
mov    -0x4(%rbp),%edi
call   1040 <ft_takes_place_next@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_takes_place>:
push   %rbx
mov    %edi,%ebx
lea    -0x1(%rbx),%eax
cmp    $0x7,%eax
ja     1148 <ft_takes_place+0x28>
lea    0xece(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0x1(%rbx),%esi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
cmp    $0xb,%ebx
je     1176 <ft_takes_place+0x56>
cmp    $0xa,%ebx
je     1195 <ft_takes_place+0x75>
cmp    $0x9,%ebx
jne    11b7 <ft_takes_place+0x97>
lea    0xea2(%rip),%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0xa,%esi
jmp    11b2 <ft_takes_place+0x92>
lea    0xecc(%rip),%rdi
mov    $0xb,%esi
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0xc,%esi
jmp    11b2 <ft_takes_place+0x92>
lea    0xead(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
lea    0xe8c(%rip),%rdi
mov    $0xb,%esi
call   1030 <printf@plt>
cmp    $0xb,%ebx
jg     11c2 <ft_takes_place+0xa2>
test   %ebx,%ebx
je     11c2 <ft_takes_place+0xa2>
pop    %rbx
ret
mov    %ebx,%edi
pop    %rbx
jmp    1040 <ft_takes_place_next@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"THE FOLLOWING TAKES BETWEEN 0%d.00 A.M.\00"
@.str.1 = [17 x i8] c"AND 0%d.00 A.M.\0A\00"
@.str.2 = [16 x i8] c"AND %d.00 A.M.\0A\00"
@.str.3 = [39 x i8] c"THE FOLLOWING TAKES BETWEEN %d.00 A.M.\00"
@.str.4 = [16 x i8] c"AND %d.00 P.M.\0A\00"
define void @ft_takes_place(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 8
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 1
br i1 %7, label %8, label %14
8: ; preds = %5
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
%13 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %8, %5, %1
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 9
br i1 %16, label %17, label %23
17: ; preds = %14
%18 = load i32, i32* %2
%19 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
%22 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %21)
br label %23
23: ; preds = %17, %14
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 10
br i1 %25, label %26, label %32
26: ; preds = %23
%27 = load i32, i32* %2
%28 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i32 %27)
%29 = load i32, i32* %2
%30 = add nsw i32 %29, 1
%31 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %30)
br label %32
32: ; preds = %26, %23
%33 = load i32, i32* %2
%34 = icmp eq i32 %33, 11
br i1 %34, label %35, label %41
35: ; preds = %32
%36 = load i32, i32* %2
%37 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i32 %36)
%38 = load i32, i32* %2
%39 = add nsw i32 %38, 1
%40 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %39)
br label %41
41: ; preds = %35, %32
%42 = load i32, i32* %2
%43 = icmp sgt i32 %42, 11
br i1 %43, label %47, label %44
44: ; preds = %41
%45 = load i32, i32* %2
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %50
47: ; preds = %44, %41
%48 = load i32, i32* %2
%49 = call i32 @ft_takes_place_next(i32 %48)
br label %50
50: ; preds = %47, %44
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"THE FOLLOWING TAKES BETWEEN 0%d.00 A.M.\00"
@.str.1 = [17 x i8] c"AND 0%d.00 A.M.\0A\00"
@.str.2 = [16 x i8] c"AND %d.00 A.M.\0A\00"
@.str.3 = [39 x i8] c"THE FOLLOWING TAKES BETWEEN %d.00 A.M.\00"
@.str.4 = [16 x i8] c"AND %d.00 P.M.\0A\00"
define void @ft_takes_place(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 8
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = add nuw nsw i32 %0, 1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %4, %1
switch i32 %0, label %18 [
i32 9, label %9
i32 10, label %12
i32 11, label %15
]
9: ; preds = %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 9)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 10)
br label %18
12: ; preds = %8
%13 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i32 10)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 11)
br label %18
15: ; preds = %8
%16 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i32 11)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 12)
br label %18
18: ; preds = %12, %9, %8, %15
%19 = icmp sgt i32 %0, 11
%20 = icmp eq i32 %0, 0
%21 = or i1 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = tail call i32 @ft_takes_place_next(i32 %0)
br label %24
24: ; preds = %18, %22
ret void
}