#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 */
char *get_quote_prefix();
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ strncmp(char const *, char const *, int /*<<< orphan*/);
int isquote(const char *line) {
  const char *lp;
  const char *quote_prefix = get_quote_prefix();
  if (!line)
    return (0);
  if (*quote_prefix) {
    return !strncmp(quote_prefix, line, strlen(quote_prefix));
  }
  if (*line == '>')
    return 1;
  lp = line;
  while (*lp && (*lp == ' ' || *lp == '\t'))
    lp++;
  if (!(*lp))
    return 0;
  if (*lp == '>')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isquote>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <get_quote_prefix@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115e <isquote+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1269 <isquote+0x139>
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     11a8 <isquote+0x78>
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1269 <isquote+0x139>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3e,%eax
jne    11c4 <isquote+0x94>
movl   $0x1,-0x4(%rbp)
jmp    1269 <isquote+0x139>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x31(%rbp)
je     120c <isquote+0xdc>
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x32(%rbp)
je     1206 <isquote+0xd6>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x32(%rbp)
mov    -0x32(%rbp),%al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
test   $0x1,%al
jne    121c <isquote+0xec>
jmp    122d <isquote+0xfd>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    11cc <isquote+0x9c>
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1246 <isquote+0x116>
movl   $0x0,-0x4(%rbp)
jmp    1269 <isquote+0x139>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3e,%eax
jne    1262 <isquote+0x132>
movl   $0x1,-0x4(%rbp)
jmp    1269 <isquote+0x139>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isquote>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
xor    %r14d,%r14d
xor    %eax,%eax
call   1050 <get_quote_prefix@plt>
test   %rbx,%rbx
je     1196 <isquote+0x66>
mov    %rax,%rbp
cmpb   $0x0,(%rax)
je     116e <isquote+0x3e>
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %r14d,%r14d
test   %eax,%eax
sete   %r14b
jmp    1196 <isquote+0x66>
mov    (%rbx),%al
mov    $0x1,%r14d
cmp    $0x3e,%al
jne    1183 <isquote+0x53>
jmp    1196 <isquote+0x66>
nopl   0x0(%rax)
movzbl (%rbx),%eax
add    $0x1,%rbx
cmp    $0x9,%al
je     1180 <isquote+0x50>
cmp    $0x20,%al
je     1180 <isquote+0x50>
cmp    $0x3e,%al
je     1196 <isquote+0x66>
xor    %r14d,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isquote(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
%6 = call i8* (...) @get_quote_prefix()
store i8* %6, i8** %5
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %10, label %9
9: ; preds = %1
store i32 0, i32* %2
br label %65
10: ; preds = %1
%11 = load i8*, i8** %5
%12 = load i8, i8* %11
%13 = icmp ne i8 %12, 0
br i1 %13, label %14, label %23
14: ; preds = %10
%15 = load i8*, i8** %5
%16 = load i8*, i8** %3
%17 = load i8*, i8** %5
%18 = call i32 @strlen(i8* %17)
%19 = call i32 @strncmp(i8* %15, i8* %16, i32 %18)
%20 = icmp ne i32 %19, 0
%21 = xor i1 %20, true
%22 = zext i1 %21 to i32
store i32 %22, i32* %2
br label %65
23: ; preds = %10
%24 = load i8*, i8** %3
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 62
br i1 %27, label %28, label %29
28: ; preds = %23
store i32 1, i32* %2
br label %65
29: ; preds = %23
%30 = load i8*, i8** %3
store i8* %30, i8** %4
br label %31
31: ; preds = %50, %29
%32 = load i8*, i8** %4
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %48
36: ; preds = %31
%37 = load i8*, i8** %4
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = icmp eq i32 %39, 32
br i1 %40, label %46, label %41
41: ; preds = %36
%42 = load i8*, i8** %4
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = icmp eq i32 %44, 9
br label %46
46: ; preds = %41, %36
%47 = phi i1 [ true, %36 ], [ %45, %41 ]
br label %48
48: ; preds = %46, %31
%49 = phi i1 [ false, %31 ], [ %47, %46 ]
br i1 %49, label %50, label %53
50: ; preds = %48
%51 = load i8*, i8** %4
%52 = getelementptr inbounds i8, i8* %51, i32 1
store i8* %52, i8** %4
br label %31
53: ; preds = %48
%54 = load i8*, i8** %4
%55 = load i8, i8* %54
%56 = icmp ne i8 %55, 0
br i1 %56, label %58, label %57
57: ; preds = %53
store i32 0, i32* %2
br label %65
58: ; preds = %53
%59 = load i8*, i8** %4
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %61, 62
br i1 %62, label %63, label %64
63: ; preds = %58
store i32 1, i32* %2
br label %65
64: ; preds = %58
store i32 0, i32* %2
br label %65
65: ; preds = %64, %63, %57, %28, %14, %9
%66 = load i32, i32* %2
ret i32 %66
}

LLVM IR (-O2):
define i32 @isquote(i8* %0) {
%2 = tail call i8* (...) @get_quote_prefix()
%3 = icmp eq i8* %0, null
br i1 %3, label %22, label %4
4: ; preds = %1
%5 = load i8, i8* %2
%6 = icmp eq i8 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %4
%8 = tail call i32 @strlen(i8* %2)
%9 = tail call i32 @strncmp(i8* %2, i8* %0, i32 %8)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
br label %22
12: ; preds = %4
%13 = load i8, i8* %0
%14 = icmp eq i8 %13, 62
br i1 %14, label %22, label %15
15: ; preds = %12, %18
%16 = phi i8 [ %20, %18 ], [ %13, %12 ]
%17 = phi i8* [ %19, %18 ], [ %0, %12 ]
switch i8 %16, label %22 [
i8 9, label %18
i8 32, label %18
i8 62, label %21
]
18: ; preds = %15, %15
%19 = getelementptr inbounds i8, i8* %17, i64 1
%20 = load i8, i8* %19
br label %15
21: ; preds = %15
br label %22
22: ; preds = %15, %21, %12, %1, %7
%23 = phi i32 [ %11, %7 ], [ 0, %1 ], [ 1, %12 ], [ 1, %21 ], [ 0, %15 ]
ret i32 %23
}