#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*/ printf(char *, ...);
void print_beg(int hour) {
  printf("THE FOLLOWING TAKES PLACE BETWEEN ");
  if (((hour < 10 && hour > 0) || (hour < 23 && hour > 12) && hour != 22)) {
    printf("0");
  }
  if (hour > 12) {
    printf("%d", hour - 12);
  } else if (hour == 0) {
    printf("12");
  } else {
    printf("%d", hour);
  }
}


x86 assembly (clang, -O0):
<print_beg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0xa,-0x4(%rbp)
jge    113d <print_beg+0x2d>
cmpl   $0x0,-0x4(%rbp)
jg     115b <print_beg+0x4b>
cmpl   $0x17,-0x4(%rbp)
jge    1169 <print_beg+0x59>
cmpl   $0xc,-0x4(%rbp)
jle    1169 <print_beg+0x59>
cmpl   $0x16,-0x4(%rbp)
je     1169 <print_beg+0x59>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0xc,-0x4(%rbp)
jle    118c <print_beg+0x7c>
mov    -0x4(%rbp),%esi
sub    $0xc,%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11bf <print_beg+0xaf>
cmpl   $0x0,-0x4(%rbp)
jne    11a9 <print_beg+0x99>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ba <print_beg+0xaa>
mov    -0x4(%rbp),%esi
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11bf <print_beg+0xaf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_beg>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    -0x1(%rbx),%eax
cmp    $0x9,%eax
jb     114b <print_beg+0x2b>
lea    -0xd(%rbx),%eax
cmp    $0x8,%eax
jbe    114b <print_beg+0x2b>
cmp    $0xd,%ebx
jl     115a <print_beg+0x3a>
add    $0xfffffff4,%ebx
jmp    115e <print_beg+0x3e>
mov    $0x30,%edi
call   1030 <putchar@plt>
cmp    $0xd,%ebx
jge    1146 <print_beg+0x26>
test   %ebx,%ebx
je     116f <print_beg+0x4f>
lea    0xebe(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [35 x i8] c"THE FOLLOWING TAKES PLACE BETWEEN \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"12\00"
define void @print_beg(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = add i32 %0, -1
%4 = icmp ult i32 %3, 9
%5 = add i32 %0, -13
%6 = icmp ult i32 %5, 9
%7 = or i1 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = tail call i32 @putchar(i32 48)
br label %10
10: ; preds = %1, %8
%11 = icmp sgt i32 %0, 12
br i1 %11, label %12, label %15
12: ; preds = %10
%13 = add nsw i32 %0, -12
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %13)
br label %21
15: ; preds = %10
%16 = icmp eq i32 %0, 0
br i1 %16, label %17, label %19
17: ; preds = %15
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %21
19: ; preds = %15
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %0)
br label %21
21: ; preds = %17, %19, %12
ret void
}