#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*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  int i;
  char word[30];
  scanf("%s", word);
  for (i = 1; word[i] != '\0'; i++)
    if (word[i] == 's' && word[i - 1] == 's') {
      printf("hiss");
      return 0;
    }
  printf("no hiss");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1040 <scanf@plt>
movl   $0x1,-0x8(%rbp)
movslq -0x8(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     11ab <main+0x8b>
movslq -0x8(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%eax
cmp    $0x73,%eax
jne    1198 <main+0x78>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x30(%rbp,%rax,1),%eax
cmp    $0x73,%eax
jne    1198 <main+0x78>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11be <main+0x9e>
jmp    119d <main+0x7d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x26>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xed5(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
lea    0x1(%rsp),%rax
lea    0xec4(%rip),%rdi
lea    0xec0(%rip),%rcx
jmp    115a <main+0x3a>
nopl   0x0(%rax,%rax,1)
cmpb   $0x73,-0x1(%rax)
je     1168 <main+0x48>
add    $0x1,%rax
movzbl (%rax),%edx
cmp    $0x73,%dl
je     1150 <main+0x30>
test   %dl,%dl
jne    1156 <main+0x36>
jmp    116b <main+0x4b>
mov    %rcx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"hiss\00"
@.str.2 = [8 x i8] c"no hiss\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [30 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
store i32 1, i32* %2
br label %6
6: ; preds = %31, %0
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %34
13: ; preds = %6
%14 = load i32, i32* %2
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 115
br i1 %19, label %20, label %30
20: ; preds = %13
%21 = load i32, i32* %2
%22 = sub nsw i32 %21, 1
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 115
br i1 %27, label %28, label %30
28: ; preds = %20
%29 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %36
30: ; preds = %20, %13
br label %31
31: ; preds = %30
%32 = load i32, i32* %2
%33 = add nsw i32 %32, 1
store i32 %33, i32* %2
br label %6
34: ; preds = %6
%35 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %36
36: ; preds = %34, %28
%37 = load i32, i32* %1
ret i32 %37
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"hiss\00"
@.str.2 = [8 x i8] c"no hiss\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %4
4: ; preds = %13, %0
%5 = phi i64 [ %14, %13 ], [ 1, %0 ]
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 %5
%7 = load i8, i8* %6
switch i8 %7, label %13 [
i8 0, label %15
i8 115, label %8
]
8: ; preds = %4
%9 = add nsw i64 %5, -1
%10 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 115
br i1 %12, label %15, label %13
13: ; preds = %4, %8
%14 = add nuw i64 %5, 1
br label %4
15: ; preds = %4, %8
%16 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %8 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), %4 ]
%17 = call i32 @printf(i8* dereferenceable(1) %16)
ret i32 0
}