#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*/ point(int);
int ifline(char *s) {
  if (!point((int)s))
    return (0);
  if (s[0] == '\\')
    s++;
  if (s[1])
    return (0);
  if (s[0] == '_')
    return ('-');
  if (s[0] == '=')
    return ('=');
  return (0);
}


x86 assembly (clang, -O0):
<ifline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1030 <point@plt>
cmp    $0x0,%eax
jne    113c <ifline+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    11b1 <ifline+0xa1>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    1158 <ifline+0x48>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,0x1(%rax)
je     1172 <ifline+0x62>
movl   $0x0,-0x4(%rbp)
jmp    11b1 <ifline+0xa1>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
jne    118e <ifline+0x7e>
movl   $0x2d,-0x4(%rbp)
jmp    11b1 <ifline+0xa1>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
jne    11aa <ifline+0x9a>
movl   $0x3d,-0x4(%rbp)
jmp    11b1 <ifline+0xa1>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ifline>:
push   %rbx
mov    %rdi,%rbx
call   1030 <point@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1130 <ifline+0x20>
xor    %ecx,%ecx
cmpb   $0x5c,(%rbx)
sete   %cl
cmpb   $0x0,0x1(%rbx,%rcx,1)
je     1132 <ifline+0x22>
pop    %rbx
ret
mov    (%rbx,%rcx,1),%al
xor    %ecx,%ecx
cmp    $0x3d,%al
mov    $0x3d,%edx
cmovne %ecx,%edx
cmp    $0x5f,%al
mov    $0x2d,%eax
cmovne %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ifline(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = ptrtoint i8* %4 to i32
%6 = call i32 @point(i32 %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %1
store i32 0, i32* %2
br label %39
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 92
br i1 %14, label %15, label %18
15: ; preds = %9
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %3
br label %18
18: ; preds = %15, %9
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i64 1
%21 = load i8, i8* %20
%22 = icmp ne i8 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %18
store i32 0, i32* %2
br label %39
24: ; preds = %18
%25 = load i8*, i8** %3
%26 = getelementptr inbounds i8, i8* %25, i64 0
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 95
br i1 %29, label %30, label %31
30: ; preds = %24
store i32 45, i32* %2
br label %39
31: ; preds = %24
%32 = load i8*, i8** %3
%33 = getelementptr inbounds i8, i8* %32, i64 0
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 61
br i1 %36, label %37, label %38
37: ; preds = %31
store i32 61, i32* %2
br label %39
38: ; preds = %31
store i32 0, i32* %2
br label %39
39: ; preds = %38, %37, %30, %23, %8
%40 = load i32, i32* %2
ret i32 %40
}

LLVM IR (-O2):
define i32 @ifline(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @point(i32 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %20, label %6
6: ; preds = %1
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 92
%9 = zext i1 %8 to i64
%10 = getelementptr i8, i8* %0, i64 %9
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %20
14: ; preds = %6
%15 = load i8, i8* %10
%16 = icmp eq i8 %15, 61
%17 = select i1 %16, i32 61, i32 0
%18 = icmp eq i8 %15, 95
%19 = select i1 %18, i32 45, i32 %17
br label %20
20: ; preds = %14, %6, %1
%21 = phi i32 [ 0, %1 ], [ 0, %6 ], [ %19, %14 ]
ret i32 %21
}