#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, ...);
int main(void) {
  int x, y;
  scanf("%d");
  while (scanf("%d %d", &x, &y) != EOF) {
    x = 100 - x - y;
    if (x > 0 && x <= 30)
      printf("sad!\n");
    else if (x > 30 && x <= 60)
      printf("hmm~~\n");
    else if (x > 60 && x < 100)
      printf("Happyyummy\n");
    else
      printf("evil!!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    0x2e8e(%rip),%rcx
cmp    (%rcx),%rax
je     11fb <main+0xdb>
mov    $0x64,%eax
sub    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1196 <main+0x76>
cmpl   $0x1e,-0x8(%rbp)
jg     1196 <main+0x76>
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
jmp    11f6 <main+0xd6>
cmpl   $0x1e,-0x8(%rbp)
jle    11bb <main+0x9b>
cmpl   $0x3c,-0x8(%rbp)
jg     11bb <main+0x9b>
lea    0xe5b(%rip),%rdi
call   1030 <printf@plt>
jmp    11f1 <main+0xd1>
cmpl   $0x3c,-0x8(%rbp)
jle    11e0 <main+0xc0>
cmpl   $0x64,-0x8(%rbp)
jge    11e0 <main+0xc0>
lea    0xe3d(%rip),%rdi
call   1030 <printf@plt>
jmp    11ec <main+0xcc>
lea    0xe38(%rip),%rdi
call   1030 <printf@plt>
jmp    11f1 <main+0xd1>
jmp    11f6 <main+0xd6>
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec0(%rip),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x2e92(%rip),%r12
cmp    (%r12),%rax
jne    116d <main+0x4d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xeaa(%rip),%r13
lea    0xe85(%rip),%r14
mov    %rsp,%r15
lea    0x4(%rsp),%rbx
lea    0xe8e(%rip),%rbp
jmp    11ab <main+0x8b>
nopl   0x0(%rax)
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    (%r12),%rax
je     115c <main+0x3c>
mov    (%rsp),%ecx
mov    0x4(%rsp),%edx
lea    (%rdx,%rcx,1),%eax
mov    $0x64,%esi
sub    %eax,%esi
mov    %esi,(%rsp)
add    %edx,%ecx
add    $0xffffffba,%ecx
mov    %r13,%rdi
cmp    $0x1e,%ecx
jb     1190 <main+0x70>
lea    -0x28(%rax),%ecx
mov    %rbp,%rdi
cmp    $0x1e,%ecx
jb     1190 <main+0x70>
add    $0xffffffff,%eax
lea    0xe2c(%rip),%rdi
cmp    $0x27,%eax
jb     1190 <main+0x70>
lea    0xe19(%rip),%rdi
jmp    1190 <main+0x70>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %d\00"
@EOF = global i64 0
@.str.2 = [6 x i8] c"sad!\0A\00"
@.str.3 = [7 x i8] c"hmm~~\0A\00"
@.str.4 = [12 x i8] c"Happyyummy\0A\00"
@.str.5 = [8 x i8] c"evil!!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %41, %0
%6 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%7 = load i64, i64* @EOF
%8 = icmp ne i64 %6, %7
br i1 %8, label %9, label %42
9: ; preds = %5
%10 = load i32, i32* %2
%11 = sub nsw i32 100, %10
%12 = load i32, i32* %3
%13 = sub nsw i32 %11, %12
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %9
%17 = load i32, i32* %2
%18 = icmp sle i32 %17, 30
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %41
21: ; preds = %16, %9
%22 = load i32, i32* %2
%23 = icmp sgt i32 %22, 30
br i1 %23, label %24, label %29
24: ; preds = %21
%25 = load i32, i32* %2
%26 = icmp sle i32 %25, 60
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %40
29: ; preds = %24, %21
%30 = load i32, i32* %2
%31 = icmp sgt i32 %30, 60
br i1 %31, label %32, label %37
32: ; preds = %29
%33 = load i32, i32* %2
%34 = icmp slt i32 %33, 100
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
br label %39
37: ; preds = %32, %29
%38 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
br label %39
39: ; preds = %37, %35
br label %40
40: ; preds = %39, %27
br label %41
41: ; preds = %40, %19
br label %5
42: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %d\00"
@EOF = global i64 0
@str = [7 x i8] c"evil!!\00"
@str.6 = [11 x i8] c"Happyyummy\00"
@str.7 = [6 x i8] c"hmm~~\00"
@str.8 = [5 x i8] c"sad!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i64, i64* @EOF
%8 = icmp eq i64 %6, %7
br i1 %8, label %29, label %9
9: ; preds = %0, %23
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = add i32 %11, %10
%13 = sub i32 100, %12
store i32 %13, i32* %1
%14 = add i32 %12, -70
%15 = icmp ult i32 %14, 30
br i1 %15, label %23, label %16
16: ; preds = %9
%17 = add i32 %12, -40
%18 = icmp ult i32 %17, 30
br i1 %18, label %23, label %19
19: ; preds = %16
%20 = add i32 %12, -1
%21 = icmp ult i32 %20, 39
%22 = select i1 %21, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0)
br label %23
23: ; preds = %19, %16, %9
%24 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.7, i64 0, i64 0), %16 ], [ %22, %19 ]
%25 = call i32 @puts(i8* dereferenceable(1) %24)
%26 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%27 = load i64, i64* @EOF
%28 = icmp eq i64 %26, %27
br i1 %28, label %29, label %9
29: ; preds = %23, %0
ret i32 0
}