#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*/ print_am(int);
int /*<<< orphan*/ print_beg(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ printpm(int);
void ft_takes_place(int hour) {
  print_beg(hour);
  if (hour < 11) {
    print_am(hour + 1);
  } else if (hour == 11) {
    printf(".00 A.M. AND 12.00 P.M.");
  } else if (hour < 23) {
    printpm(hour + 1);
  } else if (hour == 11) {
    printf(".00 A.M. AND 12.00 P.M.");
  } else {
    printf(".00 P.M. AND 12.00 A.M.");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<ft_takes_place>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <print_beg@plt>
cmpl   $0xb,-0x4(%rbp)
jge    116d <ft_takes_place+0x2d>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1050 <print_am@plt>
jmp    11d8 <ft_takes_place+0x98>
cmpl   $0xb,-0x4(%rbp)
jne    1188 <ft_takes_place+0x48>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
jmp    11d3 <ft_takes_place+0x93>
cmpl   $0x17,-0x4(%rbp)
jge    11a2 <ft_takes_place+0x62>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1040 <printpm@plt>
jmp    11ce <ft_takes_place+0x8e>
cmpl   $0xb,-0x4(%rbp)
jne    11bd <ft_takes_place+0x7d>
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
jmp    11c9 <ft_takes_place+0x89>
lea    0xe54(%rip),%rdi
call   1030 <printf@plt>
jmp    11ce <ft_takes_place+0x8e>
jmp    11d3 <ft_takes_place+0x93>
jmp    11d8 <ft_takes_place+0x98>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_takes_place>:
push   %rbx
mov    %edi,%ebx
call   1070 <print_beg@plt>
cmp    $0xa,%ebx
jg     1169 <ft_takes_place+0x19>
add    $0x1,%ebx
mov    %ebx,%edi
call   1060 <print_am@plt>
jmp    1194 <ft_takes_place+0x44>
cmp    $0xb,%ebx
jne    1177 <ft_takes_place+0x27>
lea    0xe8b(%rip),%rdi
jmp    118f <ft_takes_place+0x3f>
cmp    $0x16,%ebx
ja     1188 <ft_takes_place+0x38>
add    $0x1,%ebx
mov    %ebx,%edi
call   1050 <printpm@plt>
jmp    1194 <ft_takes_place+0x44>
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [24 x i8] c".00 A.M. AND 12.00 P.M.\00"
@.str.1 = [24 x i8] c".00 P.M. AND 12.00 A.M.\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @ft_takes_place(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @print_beg(i32 %3)
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 11
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
%10 = call i32 @print_am(i32 %9)
br label %33
11: ; preds = %1
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 11
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %32
16: ; preds = %11
%17 = load i32, i32* %2
%18 = icmp slt i32 %17, 23
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
%22 = call i32 @printpm(i32 %21)
br label %31
23: ; preds = %16
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 11
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %30
28: ; preds = %23
%29 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %30
30: ; preds = %28, %26
br label %31
31: ; preds = %30, %19
br label %32
32: ; preds = %31, %14
br label %33
33: ; preds = %32, %7
%34 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c".00 A.M. AND 12.00 P.M.\00"
@.str.1 = [24 x i8] c".00 P.M. AND 12.00 A.M.\00"
define void @ft_takes_place(i32 %0) {
%2 = tail call i32 @print_beg(i32 %0)
%3 = icmp slt i32 %0, 11
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = add nsw i32 %0, 1
%6 = tail call i32 @print_am(i32 %5)
br label %18
7: ; preds = %1
%8 = icmp eq i32 %0, 11
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %18
11: ; preds = %7
%12 = icmp ult i32 %0, 23
br i1 %12, label %13, label %16
13: ; preds = %11
%14 = add nuw nsw i32 %0, 1
%15 = tail call i32 @printpm(i32 %14)
br label %18
16: ; preds = %11
%17 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %9, %16, %13, %4
%19 = tail call i32 @putchar(i32 10)
ret void
}