#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*/ DEBUG(char *);
scalar_t__ cmp(char *, char *);
char *get_string(char *, char *, int);
int /*<<< orphan*/ locate_room(char *, int /*<<< orphan*/, char *);
void parse_view(char *line) {
  char name[256], buf[256];
  DEBUG("parse_view");
  if (cmp("You see *", line))
    return;
  line = get_string(line + 8, name, 256);
  line = get_string(line, buf, 256);
  if (cmp("at", buf))
    return;
  locate_room(line, 0, name);
}


x86 assembly (clang, -O0):
<parse_view>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <DEBUG@plt>
mov    -0x8(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1050 <cmp@plt>
cmp    $0x0,%rax
je     117a <parse_view+0x3a>
jmp    11e4 <parse_view+0xa4>
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
lea    -0x110(%rbp),%rsi
mov    $0x100,%edx
call   1040 <get_string@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x210(%rbp),%rsi
mov    $0x100,%edx
call   1040 <get_string@plt>
mov    %rax,-0x8(%rbp)
lea    -0x210(%rbp),%rsi
lea    0xe57(%rip),%rdi
call   1050 <cmp@plt>
cmp    $0x0,%rax
je     11d2 <parse_view+0x92>
jmp    11e4 <parse_view+0xa4>
mov    -0x8(%rbp),%rdi
lea    -0x110(%rbp),%rdx
xor    %esi,%esi
call   1060 <locate_room@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_view>:
push   %r14
push   %rbx
sub    $0x208,%rsp
mov    %rdi,%rbx
lea    0xeac(%rip),%rdi
call   1030 <DEBUG@plt>
lea    0xeab(%rip),%rdi
mov    %rbx,%rsi
call   1050 <cmp@plt>
test   %rax,%rax
jne    11bd <parse_view+0x7d>
add    $0x8,%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    $0x100,%edx
call   1040 <get_string@plt>
lea    0x100(%rsp),%rbx
mov    %rax,%rdi
mov    %rbx,%rsi
mov    $0x100,%edx
call   1040 <get_string@plt>
mov    %rax,%r14
lea    0xe72(%rip),%rdi
mov    %rbx,%rsi
call   1050 <cmp@plt>
test   %rax,%rax
jne    11bd <parse_view+0x7d>
mov    %rsp,%rdx
mov    %r14,%rdi
xor    %esi,%esi
call   1060 <locate_room@plt>
add    $0x208,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [11 x i8] c"parse_view\00"
@.str.1 = [10 x i8] c"You see *\00"
@.str.2 = [3 x i8] c"at\00"
define void @parse_view(i8* %0) {
%2 = alloca i8*
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
store i8* %0, i8** %2
%5 = call i32 @DEBUG(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = call i64 @cmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
br label %26
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 8
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%14 = call i8* @get_string(i8* %12, i8* %13, i32 256)
store i8* %14, i8** %2
%15 = load i8*, i8** %2
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%17 = call i8* @get_string(i8* %15, i8* %16, i32 256)
store i8* %17, i8** %2
%18 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%19 = call i64 @cmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %18)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %10
br label %26
22: ; preds = %10
%23 = load i8*, i8** %2
%24 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%25 = call i32 @locate_room(i8* %23, i32 0, i8* %24)
br label %26
26: ; preds = %22, %21, %9
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"parse_view\00"
@.str.1 = [10 x i8] c"You see *\00"
@.str.2 = [3 x i8] c"at\00"
define void @parse_view(i8* %0) {
%2 = alloca [256 x i8]
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%6 = tail call i32 @DEBUG(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%7 = tail call i64 @cmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %1
%10 = getelementptr inbounds i8, i8* %0, i64 8
%11 = call i8* @get_string(i8* %10, i8* %4, i32 256)
%12 = call i8* @get_string(i8* %11, i8* %5, i32 256)
%13 = call i64 @cmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %9
%16 = call i32 @locate_room(i8* %12, i32 0, i8* %4)
br label %17
17: ; preds = %9, %1, %15
ret void
}