#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 */
double atlagos_szohossz(char const *, int);
scalar_t__ strcasestr(char const *, char *);
int tiszta_lehet(const char *titkos, int titkos_meret) {
  double szohossz = atlagos_szohossz(titkos, titkos_meret);
  return szohossz > 6.0 && szohossz < 9.0 && strcasestr(titkos, "hogy") &&
         strcasestr(titkos, "nem") && strcasestr(titkos, "az") &&
         strcasestr(titkos, "ha");
}


x86 assembly (clang, -O0):
<tiszta_lehet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <atlagos_szohossz@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
movsd  0xeb1(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jbe    11f4 <tiszta_lehet+0xd4>
xor    %eax,%eax
movsd  0xea2(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
mov    %al,-0x19(%rbp)
jbe    11f4 <tiszta_lehet+0xd4>
mov    -0x8(%rbp),%rdi
lea    0xe91(%rip),%rsi
call   1040 <strcasestr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x19(%rbp)
je     11f4 <tiszta_lehet+0xd4>
mov    -0x8(%rbp),%rdi
lea    0xe74(%rip),%rsi
call   1040 <strcasestr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x19(%rbp)
je     11f4 <tiszta_lehet+0xd4>
mov    -0x8(%rbp),%rdi
lea    0xe56(%rip),%rsi
call   1040 <strcasestr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x19(%rbp)
je     11f4 <tiszta_lehet+0xd4>
mov    -0x8(%rbp),%rdi
lea    0xe37(%rip),%rsi
call   1040 <strcasestr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tiszta_lehet>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <atlagos_szohossz@plt>
xor    %ebp,%ebp
ucomisd 0xecb(%rip),%xmm0
jbe    1199 <tiszta_lehet+0x79>
movsd  0xec9(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1199 <tiszta_lehet+0x79>
lea    0xec4(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasestr@plt>
test   %rax,%rax
je     1199 <tiszta_lehet+0x79>
lea    0xeb5(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasestr@plt>
test   %rax,%rax
je     1199 <tiszta_lehet+0x79>
lea    0xea5(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasestr@plt>
test   %rax,%rax
je     1199 <tiszta_lehet+0x79>
lea    0xe94(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasestr@plt>
xor    %ebp,%ebp
test   %rax,%rax
setne  %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"hogy\00"
@.str.1 = [4 x i8] c"nem\00"
@.str.2 = [3 x i8] c"az\00"
@.str.3 = [3 x i8] c"ha\00"
define i32 @tiszta_lehet(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca double
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call double @atlagos_szohossz(i8* %6, i32 %7)
store double %8, double* %5
%9 = load double, double* %5
%10 = fcmp ogt double %9, 6.000000e+00
br i1 %10, label %11, label %30
11: ; preds = %2
%12 = load double, double* %5
%13 = fcmp olt double %12, 9.000000e+00
br i1 %13, label %14, label %30
14: ; preds = %11
%15 = load i8*, i8** %3
%16 = call i64 @strcasestr(i8* %15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %30
18: ; preds = %14
%19 = load i8*, i8** %3
%20 = call i64 @strcasestr(i8* %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %30
22: ; preds = %18
%23 = load i8*, i8** %3
%24 = call i64 @strcasestr(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = load i8*, i8** %3
%28 = call i64 @strcasestr(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%29 = icmp ne i64 %28, 0
br label %30
30: ; preds = %26, %22, %18, %14, %11, %2
%31 = phi i1 [ false, %22 ], [ false, %18 ], [ false, %14 ], [ false, %11 ], [ false, %2 ], [ %29, %26 ]
%32 = zext i1 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
@.str = [5 x i8] c"hogy\00"
@.str.1 = [4 x i8] c"nem\00"
@.str.2 = [3 x i8] c"az\00"
@.str.3 = [3 x i8] c"ha\00"
define i32 @tiszta_lehet(i8* %0, i32 %1) {
%3 = tail call double @atlagos_szohossz(i8* %0, i32 %1)
%4 = fcmp ogt double %3, 6.000000e+00
%5 = fcmp olt double %3, 9.000000e+00
%6 = and i1 %4, %5
br i1 %6, label %7, label %20
7: ; preds = %2
%8 = tail call i64 @strcasestr(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %20, label %10
10: ; preds = %7
%11 = tail call i64 @strcasestr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %20, label %13
13: ; preds = %10
%14 = tail call i64 @strcasestr(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %20, label %16
16: ; preds = %13
%17 = tail call i64 @strcasestr(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%18 = icmp ne i64 %17, 0
%19 = zext i1 %18 to i32
br label %20
20: ; preds = %16, %13, %10, %7, %2
%21 = phi i32 [ 0, %13 ], [ 0, %10 ], [ 0, %7 ], [ 0, %2 ], [ %19, %16 ]
ret i32 %21
}