#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__ check(char *, int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *, char *);
int /*<<< orphan*/ strlen(char *);
int main() {
  char pw[9], str[41];
  scanf("%s %s", pw, str);
  printf(check(pw, strlen(pw), str, strlen(str)) ? "PASS\n" : "FAIL\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    0xea2(%rip),%rdi
call   1050 <scanf@plt>
lea    -0xd(%rbp),%rax
mov    %rax,-0x58(%rbp)
lea    -0xd(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x4c(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    -0x40(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x58(%rbp),%rdi
mov    -0x4c(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    %eax,%ecx
call   1060 <check@plt>
mov    %rax,%rcx
lea    0xe68(%rip),%rdi
lea    0xe5b(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
lea    0xeb1(%rip),%rdi
lea    0x7(%rsp),%rbx
lea    0x10(%rsp),%r14
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %eax,%ecx
call   1060 <check@plt>
test   %rax,%rax
lea    0xe7d(%rip),%rax
lea    0xe70(%rip),%rdi
cmove  %rax,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [6 x i8] c"PASS\0A\00"
@.str.2 = [6 x i8] c"FAIL\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i8]
%3 = alloca [41 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [41 x i8], [41 x i8]* %3, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
%7 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
%10 = getelementptr inbounds [41 x i8], [41 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds [41 x i8], [41 x i8]* %3, i64 0, i64 0
%12 = call i32 @strlen(i8* %11)
%13 = call i64 @check(i8* %7, i32 %9, i8* %10, i32 %12)
%14 = icmp ne i64 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%17 = call i32 @printf(i8* %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [6 x i8] c"PASS\0A\00"
@.str.2 = [6 x i8] c"FAIL\0A\00"
define i32 @main() {
%1 = alloca [9 x i8]
%2 = alloca [41 x i8]
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [41 x i8], [41 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%6 = call i32 @strlen(i8* %3)
%7 = call i32 @strlen(i8* %4)
%8 = call i64 @check(i8* %3, i32 %6, i8* %4, i32 %7)
%9 = icmp eq i64 %8, 0
%10 = select i1 %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%11 = call i32 @printf(i8* dereferenceable(1) %10)
ret i32 0
}