#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*/ mudstrlcat(char *, char *, int);
char *one_argument(char const *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
int strlen(char *);
void extract_area_names(const char *inp, char *out) {
  char buf[1024], *pbuf = buf;
  int len;
  *out = '\0';
  while (inp && *inp) {
    inp = one_argument(inp, buf);
    if ((len = strlen(buf)) >= 5 && !strcmp(".are", pbuf + len - 4)) {
      if (*out)
        mudstrlcat(out, " ", 1024);
      mudstrlcat(out, buf, 1024);
    }
  }
}


x86 assembly (clang, -O0):
<extract_area_names>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rax
mov    %rax,-0x418(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x41d(%rbp)
je     118e <extract_area_names+0x4e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x41d(%rbp)
mov    -0x41d(%rbp),%al
test   $0x1,%al
jne    11a1 <extract_area_names+0x61>
jmp    1236 <extract_area_names+0xf6>
mov    -0x8(%rbp),%rdi
lea    -0x410(%rbp),%rsi
call   1050 <one_argument@plt>
mov    %rax,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x41c(%rbp)
cmp    $0x5,%eax
jl     1231 <extract_area_names+0xf1>
mov    -0x418(%rbp),%rsi
movslq -0x41c(%rbp),%rax
add    %rax,%rsi
add    $0xfffffffffffffffc,%rsi
lea    0xe14(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1231 <extract_area_names+0xf1>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     121c <extract_area_names+0xdc>
mov    -0x10(%rbp),%rdi
lea    0xdf3(%rip),%rsi
mov    $0x400,%edx
call   1060 <mudstrlcat@plt>
mov    -0x10(%rbp),%rdi
lea    -0x410(%rbp),%rsi
mov    $0x400,%edx
call   1060 <mudstrlcat@plt>
jmp    1168 <extract_area_names+0x28>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_area_names>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x400,%rsp
movb   $0x0,(%rsi)
test   %rdi,%rdi
je     11e3 <extract_area_names+0xa3>
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
lea    0xe94(%rip),%r12
lea    0xe92(%rip),%r13
jmp    1195 <extract_area_names+0x55>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x400,%edx
call   1060 <mudstrlcat@plt>
cs nopw 0x0(%rax,%rax,1)
nop
test   %rbx,%rbx
je     11e3 <extract_area_names+0xa3>
cmpb   $0x0,(%rbx)
je     11e3 <extract_area_names+0xa3>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <one_argument@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1030 <strlen@plt>
cmp    $0x5,%eax
jl     1190 <extract_area_names+0x50>
mov    %eax,%eax
lea    (%rsp,%rax,1),%rsi
add    $0xfffffffffffffffc,%rsi
mov    %r12,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    1190 <extract_area_names+0x50>
cmpb   $0x0,(%r14)
je     1175 <extract_area_names+0x35>
mov    %r14,%rdi
mov    %r13,%rsi
mov    $0x400,%edx
call   1060 <mudstrlcat@plt>
jmp    1175 <extract_area_names+0x35>
add    $0x400,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c".are\00"
@.str.1 = [2 x i8] c" \00"
define void @extract_area_names(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1024 x i8]
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
store i8* %8, i8** %6
%9 = load i8*, i8** %4
store i8 0, i8* %9
br label %10
10: ; preds = %46, %2
%11 = load i8*, i8** %3
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %13, %10
%19 = phi i1 [ false, %10 ], [ %17, %13 ]
br i1 %19, label %20, label %47
20: ; preds = %18
%21 = load i8*, i8** %3
%22 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%23 = call i8* @one_argument(i8* %21, i8* %22)
store i8* %23, i8** %3
%24 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%25 = call i32 @strlen(i8* %24)
store i32 %25, i32* %7
%26 = icmp sge i32 %25, 5
br i1 %26, label %27, label %46
27: ; preds = %20
%28 = load i8*, i8** %6
%29 = load i32, i32* %7
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %28, i64 %30
%32 = getelementptr inbounds i8, i8* %31, i64 -4
%33 = call i32 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %32)
%34 = icmp ne i32 %33, 0
br i1 %34, label %46, label %35
35: ; preds = %27
%36 = load i8*, i8** %4
%37 = load i8, i8* %36
%38 = icmp ne i8 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %35
%40 = load i8*, i8** %4
%41 = call i32 @mudstrlcat(i8* %40, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1024)
br label %42
42: ; preds = %39, %35
%43 = load i8*, i8** %4
%44 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%45 = call i32 @mudstrlcat(i8* %43, i8* %44, i32 1024)
br label %46
46: ; preds = %42, %27, %20
br label %10
47: ; preds = %18
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c".are\00"
@.str.1 = [2 x i8] c" \00"
define void @extract_area_names(i8* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
store i8 0, i8* %1
%5 = icmp eq i8* %0, null
br i1 %5, label %29, label %6
6: ; preds = %2, %27
%7 = phi i8* [ %11, %27 ], [ %0, %2 ]
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %29, label %10
10: ; preds = %6
%11 = call i8* @one_argument(i8* %7, i8* %4)
%12 = call i32 @strlen(i8* %4)
%13 = icmp sgt i32 %12, 4
br i1 %13, label %14, label %27
14: ; preds = %10
%15 = zext i32 %12 to i64
%16 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %15
%17 = getelementptr inbounds i8, i8* %16, i64 -4
%18 = call i32 @strcmp(i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %17)
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %27
20: ; preds = %14
%21 = load i8, i8* %1
%22 = icmp eq i8 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = call i32 @mudstrlcat(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1024)
br label %25
25: ; preds = %23, %20
%26 = call i32 @mudstrlcat(i8* %1, i8* %4, i32 1024)
br label %27
27: ; preds = %25, %14, %10
%28 = icmp eq i8* %11, null
br i1 %28, label %29, label %6
29: ; preds = %6, %27, %2
ret void
}