#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 dotconf_continue_line(char *buffer, size_t length) {
  char *cp1 = buffer + length;
  if (length < 2 || *(--cp1) != '\n')
    return 0;
  if (*(--cp1) == '\r' && length >= 3)
    cp1--;
  if (*cp1 != '\\')
    return 0;
  *cp1 = '\0';
  return (cp1 <= buffer || *(cp1 - 1) != '\\');
}


x86 assembly (clang, -O0):
<dotconf_continue_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x2,-0x18(%rbp)
jb     113f <dotconf_continue_line+0x3f>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
movsbl -0x1(%rax),%eax
cmp    $0xa,%eax
je     114b <dotconf_continue_line+0x4b>
movl   $0x0,-0x4(%rbp)
jmp    11d0 <dotconf_continue_line+0xd0>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
movsbl -0x1(%rax),%eax
cmp    $0xd,%eax
jne    117e <dotconf_continue_line+0x7e>
cmpq   $0x3,-0x18(%rbp)
jb     117e <dotconf_continue_line+0x7e>
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     119a <dotconf_continue_line+0x9a>
movl   $0x0,-0x4(%rbp)
jmp    11d0 <dotconf_continue_line+0xd0>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x20(%rbp),%rcx
mov    $0x1,%al
cmp    -0x10(%rbp),%rcx
mov    %al,-0x21(%rbp)
jbe    11c5 <dotconf_continue_line+0xc5>
mov    -0x20(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x5c,%eax
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dotconf_continue_line>:
xor    %eax,%eax
cmp    $0x2,%rsi
jb     114e <dotconf_continue_line+0x4e>
cmpb   $0xa,-0x1(%rdi,%rsi,1)
jne    114e <dotconf_continue_line+0x4e>
lea    (%rdi,%rsi,1),%rdx
add    $0xffffffffffffffff,%rdx
lea    -0x1(%rdx),%rcx
cmpb   $0xd,-0x1(%rdx)
sete   %r8b
cmp    $0x3,%rsi
setae  %dl
and    %r8b,%dl
movzbl %dl,%edx
sub    %rdx,%rcx
cmpb   $0x5c,(%rcx)
jne    114e <dotconf_continue_line+0x4e>
movb   $0x0,(%rcx)
mov    $0x1,%eax
cmp    %rdi,%rcx
jbe    114e <dotconf_continue_line+0x4e>
xor    %eax,%eax
cmpb   $0x5c,-0x1(%rcx)
setne  %al
ret

LLVM IR (-O0):
define i32 @dotconf_continue_line(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds i8, i8* %7, i64 %8
store i8* %9, i8** %6
%10 = load i64, i64* %5
%11 = icmp ult i64 %10, 2
br i1 %11, label %18, label %12
12: ; preds = %2
%13 = load i8*, i8** %6
%14 = getelementptr inbounds i8, i8* %13, i32 -1
store i8* %14, i8** %6
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 10
br i1 %17, label %18, label %19
18: ; preds = %12, %2
store i32 0, i32* %3
br label %51
19: ; preds = %12
%20 = load i8*, i8** %6
%21 = getelementptr inbounds i8, i8* %20, i32 -1
store i8* %21, i8** %6
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 13
br i1 %24, label %25, label %31
25: ; preds = %19
%26 = load i64, i64* %5
%27 = icmp uge i64 %26, 3
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = load i8*, i8** %6
%30 = getelementptr inbounds i8, i8* %29, i32 -1
store i8* %30, i8** %6
br label %31
31: ; preds = %28, %25, %19
%32 = load i8*, i8** %6
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp ne i32 %34, 92
br i1 %35, label %36, label %37
36: ; preds = %31
store i32 0, i32* %3
br label %51
37: ; preds = %31
%38 = load i8*, i8** %6
store i8 0, i8* %38
%39 = load i8*, i8** %6
%40 = load i8*, i8** %4
%41 = icmp ule i8* %39, %40
br i1 %41, label %48, label %42
42: ; preds = %37
%43 = load i8*, i8** %6
%44 = getelementptr inbounds i8, i8* %43, i64 -1
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp ne i32 %46, 92
br label %48
48: ; preds = %42, %37
%49 = phi i1 [ true, %37 ], [ %47, %42 ]
%50 = zext i1 %49 to i32
store i32 %50, i32* %3
br label %51
51: ; preds = %48, %36, %18
%52 = load i32, i32* %3
ret i32 %52
}

LLVM IR (-O2):
define i32 @dotconf_continue_line(i8* %0, i64 %1) {
%3 = icmp ult i64 %1, 2
br i1 %3, label %26, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %0, i64 %1
%6 = getelementptr inbounds i8, i8* %5, i64 -1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 10
br i1 %8, label %9, label %26
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 -1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 13
%13 = icmp ugt i64 %1, 2
%14 = and i1 %13, %12
%15 = sext i1 %14 to i64
%16 = getelementptr i8, i8* %10, i64 %15
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 92
br i1 %18, label %19, label %26
19: ; preds = %9
store i8 0, i8* %16
%20 = icmp ugt i8* %16, %0
br i1 %20, label %21, label %26
21: ; preds = %19
%22 = getelementptr inbounds i8, i8* %16, i64 -1
%23 = load i8, i8* %22
%24 = icmp ne i8 %23, 92
%25 = zext i1 %24 to i32
br label %26
26: ; preds = %19, %21, %9, %2, %4
%27 = phi i32 [ 0, %4 ], [ 0, %2 ], [ 0, %9 ], [ 1, %19 ], [ %25, %21 ]
ret i32 %27
}