#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ f(char *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char *, char *);
int main() {
  FILE *fin = fopen("ride.in", "r");
  FILE *fout = fopen("ride.out", "w");
  char a[6 + 1], b[6 + 1];
  fscanf(fin, "%6s %6s", a, b);
  fputs(f(a) == f(b) ? "GO\n" : "STAY\n", fout);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xeb1(%rip),%rdi
lea    0xeb2(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x8(%rbp)
lea    0xea4(%rip),%rdi
lea    0xea6(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x17(%rbp),%rdx
lea    -0x1e(%rbp),%rcx
lea    0xe8c(%rip),%rsi
call   1050 <fscanf@plt>
lea    -0x17(%rbp),%rdi
call   1030 <f@plt>
mov    %rax,-0x28(%rbp)
lea    -0x1e(%rbp),%rdi
call   1030 <f@plt>
mov    -0x28(%rbp),%rcx
mov    %rax,%rdx
lea    0xe6f(%rip),%rdi
lea    0xe64(%rip),%rax
cmp    %rdx,%rcx
cmove  %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fputs@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeae(%rip),%rdi
lea    0xeaf(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
lea    0xea2(%rip),%rdi
lea    0xea4(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r14
lea    0xe97(%rip),%rsi
lea    0x11(%rsp),%r15
lea    0xa(%rsp),%r12
mov    %rbx,%rdi
mov    %r15,%rdx
mov    %r12,%rcx
call   1050 <fscanf@plt>
mov    %r15,%rdi
call   1030 <f@plt>
mov    %rax,%rbx
mov    %r12,%rdi
call   1030 <f@plt>
cmp    %rax,%rbx
lea    0xe6a(%rip),%rax
lea    0xe67(%rip),%rdi
cmove  %rax,%rdi
mov    %r14,%rsi
call   1040 <fputs@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"ride.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [9 x i8] c"ride.out\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [8 x i8] c"%6s %6s\00"
@.str.5 = [4 x i8] c"GO\0A\00"
@.str.6 = [6 x i8] c"STAY\0A\00"
define i32 @main() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca [7 x i8]
%4 = alloca [7 x i8]
%5 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %5, i32** %1
%6 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %6, i32** %2
%7 = load i32*, i32** %1
%8 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%10 = call i32 @fscanf(i32* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* %8, i8* %9)
%11 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%12 = call i64 @f(i8* %11)
%13 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%14 = call i64 @f(i8* %13)
%15 = icmp eq i64 %12, %14
%16 = zext i1 %15 to i64
%17 = select i1 %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0)
%18 = load i32*, i32** %2
%19 = call i32 @fputs(i8* %17, i32* %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"ride.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [9 x i8] c"ride.out\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [8 x i8] c"%6s %6s\00"
@.str.5 = [4 x i8] c"GO\0A\00"
@.str.6 = [6 x i8] c"STAY\0A\00"
define i32 @main() {
%1 = alloca [7 x i8]
%2 = alloca [7 x i8]
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%5 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 0
%7 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* %5, i8* %6)
%8 = call i64 @f(i8* %5)
%9 = call i64 @f(i8* %6)
%10 = icmp eq i64 %8, %9
%11 = select i1 %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0)
%12 = call i32 @fputs(i8* %11, i32* %4)
ret i32 0
}