char *next_conversion(str)
char *str;
{
  char *match();
  while (*str && *str != '%') {
    switch (*str++) {
    case '\'':
      str = match('\'', str) + 1;
      break;
    case '"':
      str = match('"', str) + 1;
      break;
    }
  }
  return (*str == '%' ? str : (char *)0);
}


x86 assembly (clang, -O0):
<next_conversion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1141 <next_conversion+0x31>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1151 <next_conversion+0x41>
jmp    11bf <next_conversion+0xaf>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x10(%rbp)
sub    $0x22,%eax
je     11a2 <next_conversion+0x92>
jmp    1174 <next_conversion+0x64>
mov    -0x10(%rbp),%eax
sub    $0x27,%eax
jne    11ba <next_conversion+0xaa>
jmp    1185 <next_conversion+0x75>
mov    -0x8(%rbp),%rsi
mov    $0x27,%edi
mov    $0x0,%al
call   1030 <match@plt>
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    11ba <next_conversion+0xaa>
mov    -0x8(%rbp),%rsi
mov    $0x22,%edi
mov    $0x0,%al
call   1030 <match@plt>
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <next_conversion+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    11dc <next_conversion+0xcc>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    11e7 <next_conversion+0xd7>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    11e7 <next_conversion+0xd7>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_conversion>:
push   %rax
mov    %rdi,%rax
jmp    1133 <next_conversion+0x23>
cs nopw 0x0(%rax,%rax,1)
mov    $0x22,%edi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <match@plt>
add    $0x1,%rax
movsbl (%rax),%edi
test   %edi,%edi
je     1150 <next_conversion+0x40>
cmp    $0x25,%dil
je     1150 <next_conversion+0x40>
add    $0x1,%rax
cmp    $0x27,%edi
je     1125 <next_conversion+0x15>
cmp    $0x22,%edi
je     1120 <next_conversion+0x10>
jmp    1133 <next_conversion+0x23>
xor    %ecx,%ecx
cmp    $0x25,%dil
cmove  %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @next_conversion(i8* %0) {
br label %2
2: ; preds = %13, %1
%3 = phi i8* [ %0, %1 ], [ %14, %13 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %15
i8 37, label %15
]
5: ; preds = %2
%6 = sext i8 %4 to i32
%7 = getelementptr inbounds i8, i8* %3, i64 1
switch i32 %6, label %13 [
i32 39, label %9
i32 34, label %8
]
8: ; preds = %5
br label %9
9: ; preds = %5, %8
%10 = phi i32 [ 34, %8 ], [ %6, %5 ]
%11 = tail call i8* (i32, i8*, ...) bitcast (i8* (...)* @match to i8* (i32, i8*, ...)*)(i32 %10, i8* %7)
%12 = getelementptr inbounds i8, i8* %11, i64 1
br label %13
13: ; preds = %9, %5
%14 = phi i8* [ %7, %5 ], [ %12, %9 ]
br label %2
15: ; preds = %2, %2
%16 = icmp eq i8 %4, 37
%17 = select i1 %16, i8* %3, i8* null
ret i8* %17
}