#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 *skip_until_colon(char *str) {
  while (*str) {
    if (*str == ':') {
      while (*++str == ' ')
        ;
      return str;
    } else
      str++;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<skip_until_colon>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1169 <skip_until_colon+0x69>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    1158 <skip_until_colon+0x58>
jmp    112a <skip_until_colon+0x2a>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl 0x1(%rax),%eax
cmp    $0x20,%eax
jne    114b <skip_until_colon+0x4b>
jmp    112a <skip_until_colon+0x2a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1171 <skip_until_colon+0x71>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <skip_until_colon+0x8>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_until_colon>:
movzbl (%rdi),%eax
test   %al,%al
je     112e <skip_until_colon+0x2e>
cmp    $0x3a,%al
je     1120 <skip_until_colon+0x20>
add    $0x1,%rdi
jmp    1100 <skip_until_colon>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x1(%rdi),%rax
cmpb   $0x20,0x1(%rdi)
mov    %rax,%rdi
je     1120 <skip_until_colon+0x20>
ret
xor    %eax,%eax
ret

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

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