#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
main() {
  char string[40], string1[40];
  fgets(string, 40, stdin);
  fgets(string1, 40, stdin);
  if (strcmp(string, "aplauda suas maos\n") == 0)
    printf("bata palmas");
  if (strcmp(string, "it has beaten palms\n") == 0)
    printf("clap your hands");
  if (strcmp(string, "bata palmas\n") == 0)
    printf("bata palmas");
  if (strcmp(string, "clap your hands\n") == 0)
    printf("clap your hands");
  printf("\n");
  if (strcmp(string1, "aplauda suas maos\n") == 0)
    printf("bata palmas");
  if (strcmp(string1, "it has beaten palms\n") == 0)
    printf("clap your hands");
  if (strcmp(string1, "bata palmas\n") == 0)
    printf("bata palmas");
  if (strcmp(string1, "clap your hands\n") == 0)
    printf("clap your hands");
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
mov    $0x28,%esi
call   1040 <fgets@plt>
lea    -0x60(%rbp),%rdi
mov    0x2e87(%rip),%rax
mov    (%rax),%edx
mov    $0x28,%esi
call   1040 <fgets@plt>
lea    -0x30(%rbp),%rdi
lea    0xe88(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1193 <main+0x63>
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
lea    0xe81(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11b9 <main+0x89>
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
lea    0xe80(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11df <main+0xaf>
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1205 <main+0xd5>
lea    0xe34(%rip),%rdi
call   1030 <printf@plt>
lea    0xe43(%rip),%rdi
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
lea    0xde4(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1237 <main+0x107>
lea    0xde1(%rip),%rdi
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
lea    0xddd(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    125d <main+0x12d>
lea    0xddc(%rip),%rdi
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
lea    0xddc(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1283 <main+0x153>
lea    0xd95(%rip),%rdi
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
lea    0xdc3(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12a9 <main+0x179>
lea    0xd90(%rip),%rdi
call   1030 <printf@plt>
lea    0xd9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    0x2e9a(%rip),%rbx
mov    (%rbx),%edx
lea    0x30(%rsp),%r14
mov    %r14,%rdi
mov    $0x28,%esi
call   1050 <fgets@plt>
mov    (%rbx),%edx
mov    %rsp,%rdi
mov    $0x28,%esi
call   1050 <fgets@plt>
lea    0xe88(%rip),%rsi
mov    %r14,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1191 <main+0x51>
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
lea    0xe87(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    11b3 <main+0x73>
lea    0xe86(%rip),%rdi
call   1040 <printf@plt>
lea    0xe8a(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    11d5 <main+0x95>
lea    0xe43(%rip),%rdi
call   1040 <printf@plt>
lea    0xe75(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    11f7 <main+0xb7>
lea    0xe42(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdf8(%rip),%rsi
mov    %rsp,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1221 <main+0xe1>
lea    0xdf7(%rip),%rdi
call   1040 <printf@plt>
lea    0xdf7(%rip),%rsi
mov    %rsp,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1241 <main+0x101>
lea    0xdf8(%rip),%rdi
call   1040 <printf@plt>
lea    0xdfc(%rip),%rsi
mov    %rsp,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1261 <main+0x121>
lea    0xdb7(%rip),%rdi
call   1040 <printf@plt>
lea    0xde9(%rip),%rsi
mov    %rsp,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1281 <main+0x141>
lea    0xdb8(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [19 x i8] c"aplauda suas maos\0A\00"
@.str.1 = [12 x i8] c"bata palmas\00"
@.str.2 = [21 x i8] c"it has beaten palms\0A\00"
@.str.3 = [16 x i8] c"clap your hands\00"
@.str.4 = [13 x i8] c"bata palmas\0A\00"
@.str.5 = [17 x i8] c"clap your hands\0A\00"
@.str.6 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [40 x i8]
%3 = alloca [40 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 40, i32 %5)
%7 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%8 = load i32, i32* @stdin
%9 = call i32 @fgets(i8* %7, i32 40, i32 %8)
%10 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%11 = call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %0
%16 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%17 = call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %21
21: ; preds = %19, %15
%22 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%23 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %27
27: ; preds = %25, %21
%28 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %27
%32 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %33
33: ; preds = %31, %27
%34 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%35 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%36 = call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %33
%39 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %40
40: ; preds = %38, %33
%41 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%42 = call i64 @strcmp(i8* %41, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %40
%45 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %46
46: ; preds = %44, %40
%47 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%48 = call i64 @strcmp(i8* %47, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %46
%51 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %52
52: ; preds = %50, %46
%53 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%54 = call i64 @strcmp(i8* %53, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %52
%57 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %58
58: ; preds = %56, %52
%59 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [19 x i8] c"aplauda suas maos\0A\00"
@.str.1 = [12 x i8] c"bata palmas\00"
@.str.2 = [21 x i8] c"it has beaten palms\0A\00"
@.str.3 = [16 x i8] c"clap your hands\00"
@.str.4 = [13 x i8] c"bata palmas\0A\00"
@.str.5 = [17 x i8] c"clap your hands\0A\00"
define i32 @main() {
%1 = alloca [40 x i8]
%2 = alloca [40 x i8]
%3 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %3, i32 40, i32 %5)
%7 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %4, i32 40, i32 %7)
%9 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %0
%14 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %18
18: ; preds = %16, %13
%19 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %21, %18
%24 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %28
28: ; preds = %26, %23
%29 = call i32 @putchar(i32 10)
%30 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %28
%33 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %34
34: ; preds = %32, %28
%35 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %39
39: ; preds = %37, %34
%40 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %44
44: ; preds = %42, %39
%45 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %44
%48 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %49
49: ; preds = %47, %44
%50 = call i32 @putchar(i32 10)
ret i32 0
}