#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 */
char *_is_nospcrlfcl(char const *);
char const *_is_middle(char const *peek) {
  if (!(peek = _is_nospcrlfcl(peek)))
    return NULL;
  while (*peek && (*peek == ':' || _is_nospcrlfcl(peek)))
    peek++;
  return peek;
}


x86 assembly (clang, -O0):
<_is_middle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_is_nospcrlfcl@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1140 <_is_middle+0x30>
movq   $0x0,-0x8(%rbp)
jmp    11b1 <_is_middle+0xa1>
jmp    1145 <_is_middle+0x35>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1188 <_is_middle+0x78>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x3a,%ecx
mov    %al,-0x12(%rbp)
je     1182 <_is_middle+0x72>
mov    -0x10(%rbp),%rdi
call   1030 <_is_nospcrlfcl@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1198 <_is_middle+0x88>
jmp    11a9 <_is_middle+0x99>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1145 <_is_middle+0x35>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_middle>:
push   %rbx
call   1030 <_is_nospcrlfcl@plt>
test   %rax,%rax
je     113e <_is_middle+0x2e>
mov    %rax,%rbx
jmp    1124 <_is_middle+0x14>
add    $0x1,%rbx
movzbl (%rbx),%eax
cmp    $0x3a,%al
je     1120 <_is_middle+0x10>
test   %al,%al
je     1140 <_is_middle+0x30>
mov    %rbx,%rdi
call   1030 <_is_nospcrlfcl@plt>
test   %rax,%rax
jne    1120 <_is_middle+0x10>
jmp    1140 <_is_middle+0x30>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_is_middle(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i8* @_is_nospcrlfcl(i8* %4)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* null, i8** %2
br label %32
8: ; preds = %1
br label %9
9: ; preds = %27, %8
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %25
14: ; preds = %9
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 58
br i1 %18, label %23, label %19
19: ; preds = %14
%20 = load i8*, i8** %3
%21 = call i8* @_is_nospcrlfcl(i8* %20)
%22 = icmp ne i8* %21, null
br label %23
23: ; preds = %19, %14
%24 = phi i1 [ true, %14 ], [ %22, %19 ]
br label %25
25: ; preds = %23, %9
%26 = phi i1 [ false, %9 ], [ %24, %23 ]
br i1 %26, label %27, label %30
27: ; preds = %25
%28 = load i8*, i8** %3
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %3
br label %9
30: ; preds = %25
%31 = load i8*, i8** %3
store i8* %31, i8** %2
br label %32
32: ; preds = %30, %7
%33 = load i8*, i8** %2
ret i8* %33
}

LLVM IR (-O2):
define i8* @_is_middle(i8* %0) {
%2 = tail call i8* @_is_nospcrlfcl(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %12, label %4
4: ; preds = %1, %10
%5 = phi i8* [ %11, %10 ], [ %2, %1 ]
%6 = load i8, i8* %5
switch i8 %6, label %7 [
i8 0, label %12
i8 58, label %10
]
7: ; preds = %4
%8 = tail call i8* @_is_nospcrlfcl(i8* %5)
%9 = icmp eq i8* %8, null
br i1 %9, label %12, label %10
10: ; preds = %4, %7
%11 = getelementptr inbounds i8, i8* %5, i64 1
br label %4
12: ; preds = %7, %4, %1
%13 = phi i8* [ null, %1 ], [ %5, %4 ], [ %5, %7 ]
ret i8* %13
}