#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int /*<<< orphan*/ stdin;
int main(void) {
  unsigned int hour;
  printf("Gib die Stunde der momentanten Uhrzeit ein: ");
  scanf("%u", &hour);
  printf("---> ");
  if (hour == 23 || hour <= 5)
    printf("Gute Nacht");
  else if (hour >= 6 && hour <= 10)
    printf("Guten Morgen");
  else if (hour >= 11 && hour <= 13)
    printf("Mahlzeit");
  else if (hour >= 14 && hour <= 17)
    printf("Schoenen Nachmittag");
  else if (hour >= 18 && hour <= 22)
    printf("Guten Abend");
  else
    printf("keine erlaubte Stunden-Angabe");
  fflush(stdin);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x17,-0x8(%rbp)
je     118b <main+0x4b>
cmpl   $0x5,-0x8(%rbp)
ja     119c <main+0x5c>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <main+0x110>
cmpl   $0x6,-0x8(%rbp)
jb     11c1 <main+0x81>
cmpl   $0xa,-0x8(%rbp)
ja     11c1 <main+0x81>
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
jmp    124b <main+0x10b>
cmpl   $0xb,-0x8(%rbp)
jb     11e6 <main+0xa6>
cmpl   $0xd,-0x8(%rbp)
ja     11e6 <main+0xa6>
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
jmp    1246 <main+0x106>
cmpl   $0xe,-0x8(%rbp)
jb     120b <main+0xcb>
cmpl   $0x11,-0x8(%rbp)
ja     120b <main+0xcb>
lea    0xe56(%rip),%rdi
call   1030 <printf@plt>
jmp    1241 <main+0x101>
cmpl   $0x12,-0x8(%rbp)
jb     1230 <main+0xf0>
cmpl   $0x16,-0x8(%rbp)
ja     1230 <main+0xf0>
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
jmp    123c <main+0xfc>
lea    0xe40(%rip),%rdi
call   1030 <printf@plt>
jmp    1241 <main+0x101>
jmp    1246 <main+0x106>
jmp    124b <main+0x10b>
jmp    1250 <main+0x110>
mov    0x2d91(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    0x4(%rsp),%eax
cmp    $0x6,%eax
jae    1198 <main+0x58>
call   1030 <printf@plt>
mov    0x2e62(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret
cmp    $0x17,%eax
je     117a <main+0x3a>
cmp    $0xb,%eax
jae    11ab <main+0x6b>
lea    0xe98(%rip),%rdi
jmp    117a <main+0x3a>
cmp    $0xe,%eax
jae    11b9 <main+0x79>
lea    0xe97(%rip),%rdi
jmp    117a <main+0x3a>
cmp    $0x12,%eax
jae    11c7 <main+0x87>
lea    0xe92(%rip),%rdi
jmp    117a <main+0x3a>
cmp    $0x17,%eax
lea    0xe9a(%rip),%rax
lea    0xe9f(%rip),%rdi
cmovb  %rax,%rdi
jmp    117a <main+0x3a>

LLVM IR (-O0):
@.str = [45 x i8] c"Gib die Stunde der momentanten Uhrzeit ein: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [6 x i8] c"---> \00"
@.str.3 = [11 x i8] c"Gute Nacht\00"
@.str.4 = [13 x i8] c"Guten Morgen\00"
@.str.5 = [9 x i8] c"Mahlzeit\00"
@.str.6 = [20 x i8] c"Schoenen Nachmittag\00"
@.str.7 = [12 x i8] c"Guten Abend\00"
@.str.8 = [30 x i8] c"keine erlaubte Stunden-Angabe\00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 23
br i1 %7, label %11, label %8
8: ; preds = %0
%9 = load i32, i32* %2
%10 = icmp ule i32 %9, 5
br i1 %10, label %11, label %13
11: ; preds = %8, %0
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
br label %51
13: ; preds = %8
%14 = load i32, i32* %2
%15 = icmp uge i32 %14, 6
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = load i32, i32* %2
%18 = icmp ule i32 %17, 10
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
br label %50
21: ; preds = %16, %13
%22 = load i32, i32* %2
%23 = icmp uge i32 %22, 11
br i1 %23, label %24, label %29
24: ; preds = %21
%25 = load i32, i32* %2
%26 = icmp ule i32 %25, 13
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
br label %49
29: ; preds = %24, %21
%30 = load i32, i32* %2
%31 = icmp uge i32 %30, 14
br i1 %31, label %32, label %37
32: ; preds = %29
%33 = load i32, i32* %2
%34 = icmp ule i32 %33, 17
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
br label %48
37: ; preds = %32, %29
%38 = load i32, i32* %2
%39 = icmp uge i32 %38, 18
br i1 %39, label %40, label %45
40: ; preds = %37
%41 = load i32, i32* %2
%42 = icmp ule i32 %41, 22
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
br label %47
45: ; preds = %40, %37
%46 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0))
br label %47
47: ; preds = %45, %43
br label %48
48: ; preds = %47, %35
br label %49
49: ; preds = %48, %27
br label %50
50: ; preds = %49, %19
br label %51
51: ; preds = %50, %11
%52 = load i32, i32* @stdin
%53 = call i32 @fflush(i32 %52)
%54 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"Gib die Stunde der momentanten Uhrzeit ein: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [6 x i8] c"---> \00"
@.str.3 = [11 x i8] c"Gute Nacht\00"
@.str.4 = [13 x i8] c"Guten Morgen\00"
@.str.5 = [9 x i8] c"Mahlzeit\00"
@.str.6 = [20 x i8] c"Schoenen Nachmittag\00"
@.str.7 = [12 x i8] c"Guten Abend\00"
@.str.8 = [30 x i8] c"keine erlaubte Stunden-Angabe\00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32, i32* %1
switch i32 %6, label %7 [
i32 23, label %16
i32 5, label %16
i32 4, label %16
i32 3, label %16
i32 2, label %16
i32 1, label %16
i32 0, label %16
]
7: ; preds = %0
%8 = icmp ult i32 %6, 11
br i1 %8, label %16, label %9
9: ; preds = %7
%10 = icmp ult i32 %6, 14
br i1 %10, label %16, label %11
11: ; preds = %9
%12 = icmp ult i32 %6, 18
br i1 %12, label %16, label %13
13: ; preds = %11
%14 = icmp ult i32 %6, 23
%15 = select i1 %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0)
br label %16
16: ; preds = %13, %11, %9, %7, %0, %0, %0, %0, %0, %0, %0
%17 = phi i8* [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %0 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %0 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %0 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %0 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %0 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %0 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %0 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), %7 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), %9 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), %11 ], [ %15, %13 ]
%18 = call i32 @printf(i8* dereferenceable(1) %17)
%19 = load i32, i32* @stdin
%20 = call i32 @fflush(i32 %19)
%21 = call i32 (...) @getchar()
ret i32 0
}