const char *skipcond(p)
register const char *p;
{
  register int iflevel;
  iflevel = 1;
  for (;;)
    switch (*++p) {
    case '?':
      iflevel++;
      break;
    case ':':
      if (iflevel == 1)
        return (p);
      break;
    case '.':
      if (--iflevel == 0)
        return (p);
      break;
    case '\\':
      ++p;
      break;
    case '\0':
      return (p - 1);
    }
}


x86 assembly (clang, -O0):
<skipcond>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl 0x1(%rax),%eax
mov    %eax,-0x18(%rbp)
test   %eax,%eax
je     11d5 <skipcond+0xd5>
jmp    1132 <skipcond+0x32>
mov    -0x18(%rbp),%eax
sub    $0x2e,%eax
je     11a0 <skipcond+0xa0>
jmp    1143 <skipcond+0x43>
mov    -0x18(%rbp),%eax
sub    $0x3a,%eax
je     1184 <skipcond+0x84>
jmp    1154 <skipcond+0x54>
mov    -0x18(%rbp),%eax
sub    $0x3f,%eax
je     1176 <skipcond+0x76>
jmp    1165 <skipcond+0x65>
mov    -0x18(%rbp),%eax
sub    $0x5c,%eax
je     11c4 <skipcond+0xc4>
jmp    11e6 <skipcond+0xe6>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11e6 <skipcond+0xe6>
cmpl   $0x1,-0x14(%rbp)
jne    119b <skipcond+0x9b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11eb <skipcond+0xeb>
jmp    11e6 <skipcond+0xe6>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    11bf <skipcond+0xbf>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11eb <skipcond+0xeb>
jmp    11e6 <skipcond+0xe6>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    11e6 <skipcond+0xe6>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    11eb <skipcond+0xeb>
jmp    110f <skipcond+0xf>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipcond>:
mov    $0x1,%ecx
mov    %rdi,%rax
jmp    1119 <skipcond+0x19>
nopw   0x0(%rax,%rax,1)
cmp    $0x5c,%edx
jne    1143 <skipcond+0x43>
add    $0x2,%rax
lea    0x1(%rax),%rdi
movsbl 0x1(%rax),%edx
cmp    $0x3e,%edx
jg     1110 <skipcond+0x10>
cmp    $0x3a,%edx
jne    1135 <skipcond+0x35>
mov    %rdi,%rax
cmp    $0x1,%ecx
jne    1119 <skipcond+0x19>
jmp    1158 <skipcond+0x58>
test   %edx,%edx
je     1158 <skipcond+0x58>
mov    %rdi,%rax
cmp    $0x2e,%edx
jne    1119 <skipcond+0x19>
jmp    1150 <skipcond+0x50>
mov    %rdi,%rax
cmp    $0x3f,%edx
jne    1119 <skipcond+0x19>
add    $0x1,%ecx
jmp    1105 <skipcond+0x5>
mov    %rdi,%rax
add    $0xffffffff,%ecx
jne    1105 <skipcond+0x5>
ret

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

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