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


x86 assembly (clang, -O0):
<PINT_dotconf_continue_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x2,-0x18(%rbp)
jae    1133 <PINT_dotconf_continue_line+0x33>
movl   $0x0,-0x4(%rbp)
jmp    11ba <PINT_dotconf_continue_line+0xba>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%eax
cmp    $0xa,%eax
je     115a <PINT_dotconf_continue_line+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    11ba <PINT_dotconf_continue_line+0xba>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
jne    1176 <PINT_dotconf_continue_line+0x76>
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     119d <PINT_dotconf_continue_line+0x9d>
movl   $0x0,-0x4(%rbp)
jmp    11ba <PINT_dotconf_continue_line+0xba>
mov    -0x20(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PINT_dotconf_continue_line>:
xor    %eax,%eax
cmp    $0x2,%rsi
jb     113d <PINT_dotconf_continue_line+0x3d>
lea    (%rdi,%rsi,1),%rcx
add    $0xffffffffffffffff,%rcx
cmpb   $0xa,(%rcx)
jne    113d <PINT_dotconf_continue_line+0x3d>
add    $0xffffffffffffffff,%rcx
xor    %edx,%edx
cmpb   $0xd,(%rcx)
sete   %dl
mov    %rcx,%rsi
sub    %rdx,%rsi
cmpb   $0x5c,(%rsi)
jne    113d <PINT_dotconf_continue_line+0x3d>
neg    %rdx
movb   $0x0,(%rcx,%rdx,1)
xor    %eax,%eax
cmpb   $0x5c,-0x1(%rcx,%rdx,1)
setne  %al
ret

LLVM IR (-O0):
define i32 @PINT_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
%10 = getelementptr inbounds i8, i8* %9, i64 -1
store i8* %10, i8** %6
%11 = load i64, i64* %5
%12 = icmp ult i64 %11, 2
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 0, i32* %3
br label %44
14: ; preds = %2
%15 = load i8*, i8** %6
%16 = getelementptr inbounds i8, i8* %15, i32 -1
store i8* %16, i8** %6
%17 = load i8, i8* %15
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 10
br i1 %19, label %20, label %21
20: ; preds = %14
store i32 0, i32* %3
br label %44
21: ; preds = %14
%22 = load i8*, i8** %6
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 13
br i1 %25, label %26, label %29
26: ; preds = %21
%27 = load i8*, i8** %6
%28 = getelementptr inbounds i8, i8* %27, i32 -1
store i8* %28, i8** %6
br label %29
29: ; preds = %26, %21
%30 = load i8*, i8** %6
%31 = getelementptr inbounds i8, i8* %30, i32 -1
store i8* %31, i8** %6
%32 = load i8, i8* %30
%33 = sext i8 %32 to i32
%34 = icmp ne i32 %33, 92
br i1 %34, label %35, label %36
35: ; preds = %29
store i32 0, i32* %3
br label %44
36: ; preds = %29
%37 = load i8*, i8** %6
%38 = getelementptr inbounds i8, i8* %37, i64 1
store i8 0, i8* %38
%39 = load i8*, i8** %6
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = icmp ne i32 %41, 92
%43 = zext i1 %42 to i32
store i32 %43, i32* %3
br label %44
44: ; preds = %36, %35, %20, %13
%45 = load i32, i32* %3
ret i32 %45
}

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