#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 *);
scalar_t__ strcmp(char *, char *);
int main() {
  char in[8];
  char pw[8] = "pass";
  while (1) {
    scanf("%s", in);
    if (strcmp(in, pw) == 0) {
      printf("yes\n");
      break;
    } else {
      printf("no\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x14(%rbp)
lea    -0xc(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1050 <scanf@plt>
lea    -0xc(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1182 <main+0x52>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
jmp    1193 <main+0x63>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
jmp    114a <main+0x1a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
movq   $0x73736170,0x8(%rsp)
73 73
lea    0xeb5(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11b3 <main+0x83>
lea    0xe92(%rip),%r14
lea    0xe88(%rip),%r15
lea    0x10(%rsp),%rbx
lea    0x8(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    1190 <main+0x60>
lea    0xe4c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.pw = [8 x i8] c"pass\00\00\00\00"
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"yes\0A\00"
@.str.2 = [4 x i8] c"no\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i8]
%3 = alloca [8 x i8]
store i32 0, i32* %1
%4 = bitcast [8 x i8]* %3 to i8*
br label %5
5: ; preds = %0, %16
%6 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%10 = call i64 @strcmp(i8* %8, i8* %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %5
%13 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %17
14: ; preds = %5
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %14
br label %5
17: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@str = [3 x i8] c"no\00"
@str.3 = [4 x i8] c"yes\00"
define i32 @main() {
%1 = alloca [8 x i8]
%2 = alloca i64
%3 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%4 = bitcast i64* %2 to i8*
store i64 1936941424, i64* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = call i64 @strcmp(i8* %3, i8* %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %10, %0
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0))
ret i32 0
10: ; preds = %0, %10
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%13 = call i64 @strcmp(i8* %3, i8* %4)
%14 = icmp eq i64 %13, 0
br i1 %14, label %8, label %10
}