#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*/ assert(int /*<<< orphan*/);
unsigned int strlen(char *);
scalar_t__ strspn(char *, char *);
char *strstr(char *, char *);
char *app_property_name_check(char *line, char *prop) {
  unsigned pl = 0;
  assert(line != NULL);
  assert(prop != NULL);
  pl = strlen(prop);
  if ((strstr(line, prop) == line) && (strspn(&line[pl], " =\t") > 0))
    return &line[pl];
  else
    return NULL;
}


x86 assembly (clang, -O0):
<app_property_name_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <strstr@plt>
cmp    -0x10(%rbp),%rax
jne    11d1 <app_property_name_check+0x91>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%eax
add    %rax,%rdi
lea    0xe51(%rip),%rsi
call   1040 <strspn@plt>
cmp    $0x0,%rax
jle    11d1 <app_property_name_check+0x91>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    11d9 <app_property_name_check+0x99>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<app_property_name_check>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1060 <assert@plt>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1060 <assert@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
jne    11a3 <app_property_name_check+0x63>
mov    %ebp,%eax
add    %rax,%r14
lea    0xe6a(%rip),%rsi
mov    %r14,%rdi
call   1050 <strspn@plt>
test   %rax,%rax
jg     11a6 <app_property_name_check+0x66>
xor    %r14d,%r14d
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c" =\09\00"
define i8* @app_property_name_check(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 0, i32* %6
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i8*, i8** %5
%12 = icmp ne i8* %11, null
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i8*, i8** %5
%16 = call i32 @strlen(i8* %15)
store i32 %16, i32* %6
%17 = load i8*, i8** %4
%18 = load i8*, i8** %5
%19 = call i8* @strstr(i8* %17, i8* %18)
%20 = load i8*, i8** %4
%21 = icmp eq i8* %19, %20
br i1 %21, label %22, label %34
22: ; preds = %2
%23 = load i8*, i8** %4
%24 = load i32, i32* %6
%25 = zext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %23, i64 %25
%27 = call i64 @strspn(i8* %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%28 = icmp sgt i64 %27, 0
br i1 %28, label %29, label %34
29: ; preds = %22
%30 = load i8*, i8** %4
%31 = load i32, i32* %6
%32 = zext i32 %31 to i64
%33 = getelementptr inbounds i8, i8* %30, i64 %32
store i8* %33, i8** %3
br label %35
34: ; preds = %22, %2
store i8* null, i8** %3
br label %35
35: ; preds = %34, %29
%36 = load i8*, i8** %3
ret i8* %36
}

LLVM IR (-O2):
@.str = [4 x i8] c" =\09\00"
define i8* @app_property_name_check(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i8* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @strlen(i8* %1)
%10 = tail call i64 bitcast (i32 (i8*)* @strlen to i64 (i8*)*)(i8* %1)
%11 = tail call i32 @strncmp(i8* %0, i8* %1, i64 %10)
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = zext i32 %9 to i64
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = tail call i64 @strspn(i8* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%17 = icmp sgt i64 %16, 0
br i1 %17, label %19, label %18
18: ; preds = %13, %2
br label %19
19: ; preds = %13, %18
%20 = phi i8* [ null, %18 ], [ %15, %13 ]
ret i8* %20
}