#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 */
scalar_t__ isspace(char);
char *memmem(char *, int, char *, int);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int absent_excludes(char *buf, char *lobegin, char *loend) {
  char *cp;
  char buf1[255];
  char buf2[255];
  strcpy(buf2, buf);
  cp = buf2 + strlen(buf2) - 1;
  while (isspace(*cp)) {
    *cp = '\0';
    cp--;
  }
  strcpy(buf1, "\n");
  strcat(buf1, buf2);
  if (lobegin) {
    cp = memmem(lobegin, loend - lobegin, buf1, strlen(buf1));
    if (cp)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<absent_excludes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x250,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
lea    -0x230(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x230(%rbp),%rax
mov    %rax,-0x238(%rbp)
lea    -0x230(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x238(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%edi
call   1050 <isspace@plt>
cmp    $0x0,%rax
je     11d6 <absent_excludes+0x86>
mov    -0x28(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x28(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x28(%rbp)
jmp    11a8 <absent_excludes+0x58>
lea    -0x130(%rbp),%rdi
lea    0xe1c(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x130(%rbp),%rdi
lea    -0x230(%rbp),%rsi
call   1070 <strcat@plt>
cmpq   $0x0,-0x18(%rbp)
je     1278 <absent_excludes+0x128>
mov    -0x18(%rbp),%rax
mov    %rax,-0x250(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x244(%rbp)
lea    -0x130(%rbp),%rax
mov    %rax,-0x240(%rbp)
lea    -0x130(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x250(%rbp),%rdi
mov    -0x244(%rbp),%esi
mov    -0x240(%rbp),%rdx
mov    %eax,%ecx
call   1060 <memmem@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1273 <absent_excludes+0x123>
movl   $0x0,-0x4(%rbp)
jmp    127f <absent_excludes+0x12f>
jmp    1278 <absent_excludes+0x128>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x250,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<absent_excludes>:
push   %r15
push   %r14
push   %rbx
sub    $0x200,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
movslq %eax,%rbx
movsbl -0x1(%rsp,%rbx,1),%edi
call   1050 <isspace@plt>
test   %rax,%rax
je     11b5 <absent_excludes+0x65>
add    %rsp,%rbx
add    $0xffffffffffffffff,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movb   $0x0,(%rbx)
movsbl -0x1(%rbx),%edi
add    $0xffffffffffffffff,%rbx
call   1050 <isspace@plt>
test   %rax,%rax
jne    11a0 <absent_excludes+0x50>
lea    0xe44(%rip),%rsi
lea    0x100(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1070 <strcat@plt>
test   %r15,%r15
je     1209 <absent_excludes+0xb9>
sub    %r15d,%r14d
lea    0x100(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %r15,%rdi
mov    %r14d,%esi
mov    %rbx,%rdx
mov    %eax,%ecx
call   1060 <memmem@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    120e <absent_excludes+0xbe>
mov    $0x1,%eax
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @absent_excludes(i8* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [255 x i8]
%10 = alloca [255 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%11 = getelementptr inbounds [255 x i8], [255 x i8]* %10, i64 0, i64 0
%12 = load i8*, i8** %5
%13 = call i32 @strcpy(i8* %11, i8* %12)
%14 = getelementptr inbounds [255 x i8], [255 x i8]* %10, i64 0, i64 0
%15 = getelementptr inbounds [255 x i8], [255 x i8]* %10, i64 0, i64 0
%16 = call i32 @strlen(i8* %15)
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %14, i64 %17
%19 = getelementptr inbounds i8, i8* %18, i64 -1
store i8* %19, i8** %8
br label %20
20: ; preds = %25, %3
%21 = load i8*, i8** %8
%22 = load i8, i8* %21
%23 = call i64 @isspace(i8 signext %22)
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %29
25: ; preds = %20
%26 = load i8*, i8** %8
store i8 0, i8* %26
%27 = load i8*, i8** %8
%28 = getelementptr inbounds i8, i8* %27, i32 -1
store i8* %28, i8** %8
br label %20
29: ; preds = %20
%30 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%31 = call i32 @strcpy(i8* %30, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%32 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%33 = getelementptr inbounds [255 x i8], [255 x i8]* %10, i64 0, i64 0
%34 = call i32 @strcat(i8* %32, i8* %33)
%35 = load i8*, i8** %6
%36 = icmp ne i8* %35, null
br i1 %36, label %37, label %53
37: ; preds = %29
%38 = load i8*, i8** %6
%39 = load i8*, i8** %7
%40 = load i8*, i8** %6
%41 = ptrtoint i8* %39 to i64
%42 = ptrtoint i8* %40 to i64
%43 = sub i64 %41, %42
%44 = trunc i64 %43 to i32
%45 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%46 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%47 = call i32 @strlen(i8* %46)
%48 = call i8* @memmem(i8* %38, i32 %44, i8* %45, i32 %47)
store i8* %48, i8** %8
%49 = load i8*, i8** %8
%50 = icmp ne i8* %49, null
br i1 %50, label %51, label %52
51: ; preds = %37
store i32 0, i32* %4
br label %54
52: ; preds = %37
br label %53
53: ; preds = %52, %29
store i32 1, i32* %4
br label %54
54: ; preds = %53, %51
%55 = load i32, i32* %4
ret i32 %55
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define i32 @absent_excludes(i8* %0, i8* %1, i8* %2) {
%4 = alloca [255 x i8]
%5 = alloca [255 x i8]
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%8 = call i32 @strcpy(i8* %7, i8* %0)
%9 = call i32 @strlen(i8* %7)
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 %10
%12 = getelementptr inbounds i8, i8* %11, i64 -1
%13 = load i8, i8* %12
%14 = call i64 @isspace(i8 signext %13)
%15 = icmp eq i64 %14, 0
br i1 %15, label %22, label %16
16: ; preds = %3, %16
%17 = phi i8* [ %18, %16 ], [ %12, %3 ]
store i8 0, i8* %17
%18 = getelementptr inbounds i8, i8* %17, i64 -1
%19 = load i8, i8* %18
%20 = call i64 @isspace(i8 signext %19)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %16
22: ; preds = %16, %3
%23 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%24 = call i32 @strcat(i8* %6, i8* %7)
%25 = icmp eq i8* %1, null
br i1 %25, label %34, label %26
26: ; preds = %22
%27 = ptrtoint i8* %2 to i64
%28 = ptrtoint i8* %1 to i64
%29 = sub i64 %27, %28
%30 = trunc i64 %29 to i32
%31 = call i32 @strlen(i8* %6)
%32 = call i8* @memmem(i8* %1, i32 %30, i8* %6, i32 %31)
%33 = icmp eq i8* %32, null
br i1 %33, label %34, label %35
34: ; preds = %26, %22
br label %35
35: ; preds = %26, %34
%36 = phi i32 [ 1, %34 ], [ 0, %26 ]
ret i32 %36
}