#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*/ puts(char *);
void print_suggestion(int total) {
  if (total > 40) {
    puts("Your depression seems to be extreme. You should seek medical help "
         "immediately.");
  } else if (total > 30) {
    puts("Your depression is severe.");
  } else if (total > 20) {
    puts("You suffer from moderate depression.");
  } else if (total > 16) {
    puts("Your mood disturbance is borderline clinical depression.");
  } else if (total > 10) {
    puts("You may suffer from mild mood disturbances.");
  } else if (total > 1) {
    puts("These ups and downs are considered normal.");
  } else {
    puts("You do not seem to have any mood disturbance.");
  }
}


x86 assembly (clang, -O0):
<print_suggestion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x28,-0x4(%rbp)
jle    1136 <print_suggestion+0x26>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
jmp    11e2 <print_suggestion+0xd2>
cmpl   $0x1e,-0x4(%rbp)
jle    1151 <print_suggestion+0x41>
lea    0xf08(%rip),%rdi
call   1030 <puts@plt>
jmp    11dd <print_suggestion+0xcd>
cmpl   $0x14,-0x4(%rbp)
jle    116c <print_suggestion+0x5c>
lea    0xf08(%rip),%rdi
call   1030 <puts@plt>
jmp    11d8 <print_suggestion+0xc8>
cmpl   $0x10,-0x4(%rbp)
jle    1187 <print_suggestion+0x77>
lea    0xf12(%rip),%rdi
call   1030 <puts@plt>
jmp    11d3 <print_suggestion+0xc3>
cmpl   $0xa,-0x4(%rbp)
jle    11a2 <print_suggestion+0x92>
lea    0xf30(%rip),%rdi
call   1030 <puts@plt>
jmp    11ce <print_suggestion+0xbe>
cmpl   $0x1,-0x4(%rbp)
jle    11bd <print_suggestion+0xad>
lea    0xf41(%rip),%rdi
call   1030 <puts@plt>
jmp    11c9 <print_suggestion+0xb9>
lea    0xf5b(%rip),%rdi
call   1030 <puts@plt>
jmp    11ce <print_suggestion+0xbe>
jmp    11d3 <print_suggestion+0xc3>
jmp    11d8 <print_suggestion+0xc8>
jmp    11dd <print_suggestion+0xcd>
jmp    11e2 <print_suggestion+0xd2>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_suggestion>:
cmp    $0x28,%edi
jle    1121 <print_suggestion+0x11>
lea    0xee4(%rip),%rdi
jmp    1030 <puts@plt>
cmp    $0x1e,%edi
jle    1132 <print_suggestion+0x22>
lea    0xf22(%rip),%rdi
jmp    1030 <puts@plt>
cmp    $0x14,%edi
jle    1143 <print_suggestion+0x33>
lea    0xf2c(%rip),%rdi
jmp    1030 <puts@plt>
cmp    $0x10,%edi
jle    1154 <print_suggestion+0x44>
lea    0xf40(%rip),%rdi
jmp    1030 <puts@plt>
cmp    $0xa,%edi
jle    1165 <print_suggestion+0x55>
lea    0xf68(%rip),%rdi
jmp    1030 <puts@plt>
cmp    $0x2,%edi
lea    0xf85(%rip),%rax
lea    0xfa9(%rip),%rdi
cmovge %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [79 x i8] c"Your depression seems to be extreme. You should seek medical help immediately.\00"
@.str.1 = [27 x i8] c"Your depression is severe.\00"
@.str.2 = [37 x i8] c"You suffer from moderate depression.\00"
@.str.3 = [57 x i8] c"Your mood disturbance is borderline clinical depression.\00"
@.str.4 = [44 x i8] c"You may suffer from mild mood disturbances.\00"
@.str.5 = [43 x i8] c"These ups and downs are considered normal.\00"
@.str.6 = [46 x i8] c"You do not seem to have any mood disturbance.\00"
define void @print_suggestion(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 40
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @puts(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
br label %39
7: ; preds = %1
%8 = load i32, i32* %2
%9 = icmp sgt i32 %8, 30
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %38
12: ; preds = %7
%13 = load i32, i32* %2
%14 = icmp sgt i32 %13, 20
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
br label %37
17: ; preds = %12
%18 = load i32, i32* %2
%19 = icmp sgt i32 %18, 16
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @puts(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0))
br label %36
22: ; preds = %17
%23 = load i32, i32* %2
%24 = icmp sgt i32 %23, 10
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 @puts(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0))
br label %35
27: ; preds = %22
%28 = load i32, i32* %2
%29 = icmp sgt i32 %28, 1
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
br label %34
32: ; preds = %27
%33 = call i32 @puts(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0))
br label %34
34: ; preds = %32, %30
br label %35
35: ; preds = %34, %25
br label %36
36: ; preds = %35, %20
br label %37
37: ; preds = %36, %15
br label %38
38: ; preds = %37, %10
br label %39
39: ; preds = %38, %5
ret void
}

LLVM IR (-O2):
@.str = [79 x i8] c"Your depression seems to be extreme. You should seek medical help immediately.\00"
@.str.1 = [27 x i8] c"Your depression is severe.\00"
@.str.2 = [37 x i8] c"You suffer from moderate depression.\00"
@.str.3 = [57 x i8] c"Your mood disturbance is borderline clinical depression.\00"
@.str.4 = [44 x i8] c"You may suffer from mild mood disturbances.\00"
@.str.5 = [43 x i8] c"These ups and downs are considered normal.\00"
@.str.6 = [46 x i8] c"You do not seem to have any mood disturbance.\00"
define void @print_suggestion(i32 %0) {
%2 = icmp sgt i32 %0, 40
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = icmp sgt i32 %0, 30
br i1 %4, label %14, label %5
5: ; preds = %3
%6 = icmp sgt i32 %0, 20
br i1 %6, label %14, label %7
7: ; preds = %5
%8 = icmp sgt i32 %0, 16
br i1 %8, label %14, label %9
9: ; preds = %7
%10 = icmp sgt i32 %0, 10
br i1 %10, label %14, label %11
11: ; preds = %9
%12 = icmp sgt i32 %0, 1
%13 = select i1 %12, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0)
br label %14
14: ; preds = %11, %9, %7, %5, %3, %1
%15 = phi i8* [ getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), %5 ], [ getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0), %7 ], [ getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), %9 ], [ %13, %11 ]
%16 = tail call i32 @puts(i8* dereferenceable(1) %15)
ret void
}