PendingBoundary(s, Boundaries, BoundaryCt) char *s;
char **Boundaries;
int *BoundaryCt;
{
  int i;
  for (i = 0; i < *BoundaryCt; ++i) {
    if (!strncmp(s, Boundaries[i], strlen(Boundaries[i]))) {
      char Buf[2000];
      strcpy(Buf, Boundaries[i]);
      strcat(Buf, "--\n");
      if (!strcmp(Buf, s))
        *BoundaryCt = i;
      return (1);
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<PendingBoundary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jge    1237 <PendingBoundary+0xe7>
mov    -0x10(%rbp),%rax
mov    %rax,-0x810(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x808(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <strlen@plt>
mov    -0x810(%rbp),%rdi
mov    -0x808(%rbp),%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1224 <PendingBoundary+0xd4>
lea    -0x800(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1040 <strcpy@plt>
lea    -0x800(%rbp),%rdi
lea    0xe0f(%rip),%rsi
call   1070 <strcat@plt>
lea    -0x800(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1218 <PendingBoundary+0xc8>
mov    -0x24(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    123e <PendingBoundary+0xee>
jmp    1229 <PendingBoundary+0xd9>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    116e <PendingBoundary+0x1e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PendingBoundary>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x7d8,%rsp
mov    (%rdx),%ebp
test   %ebp,%ebp
jle    1197 <PendingBoundary+0x57>
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r12,%r13,8),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     119b <PendingBoundary+0x5b>
add    $0x1,%r13
cmp    %r13,%rbp
jne    1170 <PendingBoundary+0x30>
xor    %eax,%eax
jmp    11cf <PendingBoundary+0x8f>
mov    %rsp,%r12
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
movl   $0xa2d2d,(%rsp,%rax,1)
mov    %r12,%rdi
mov    %r15,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
jne    11ca <PendingBoundary+0x8a>
mov    %r13d,(%r14)
mov    $0x1,%eax
add    $0x7d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @PendingBoundary(i8* nocapture %0, i8** nocapture %1, i32* nocapture %2) {
%4 = alloca [2000 x i8]
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %30
7: ; preds = %3
%8 = zext i32 %5 to i64
br label %9
9: ; preds = %7, %27
%10 = phi i64 [ 0, %7 ], [ %28, %27 ]
%11 = getelementptr inbounds i8*, i8** %1, i64 %10
%12 = load i8*, i8** %11
%13 = tail call i64 @strlen(i8* dereferenceable(1) %12)
%14 = tail call i32 @strncmp(i8* %0, i8* %12, i64 %13)
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %27
16: ; preds = %9
%17 = getelementptr inbounds [2000 x i8], [2000 x i8]* %4, i64 0, i64 0
%18 = call i8* @strcpy(i8* %17, i8* dereferenceable(1) %12)
%19 = call i64 @strlen(i8* %17)
%20 = getelementptr [2000 x i8], [2000 x i8]* %4, i64 0, i64 %19
%21 = bitcast i8* %20 to i32*
store i32 666925, i32* %21
%22 = call i32 @strcmp(i8* %17, i8* dereferenceable(1) %0)
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %16
%25 = trunc i64 %10 to i32
store i32 %25, i32* %2
br label %26
26: ; preds = %24, %16
br label %30
27: ; preds = %9
%28 = add nuw nsw i64 %10, 1
%29 = icmp eq i64 %28, %8
br i1 %29, label %30, label %9
30: ; preds = %27, %3, %26
%31 = phi i32 [ 1, %26 ], [ 0, %3 ], [ 0, %27 ]
ret i32 %31
}