#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_leading_whitespace(char *);
char *get_field(char *line) {
  char *i;
  for (i = line; *i != '\0' && *i != ':';)
    i++;
  if (*i == ':') {
    i++;
    return skip_leading_whitespace(i);
  }
  return i;
}


x86 assembly (clang, -O0):
<get_field>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     1149 <get_field+0x39>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1159 <get_field+0x49>
jmp    116a <get_field+0x5a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1124 <get_field+0x14>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    1198 <get_field+0x88>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <skip_leading_whitespace@plt>
mov    %rax,-0x8(%rbp)
jmp    11a0 <get_field+0x90>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_field>:
movzbl (%rdi),%eax
test   %al,%al
je     1124 <get_field+0x14>
add    $0x1,%rdi
cmp    $0x3a,%al
jne    1110 <get_field>
jmp    1030 <skip_leading_whitespace@plt>
mov    %rdi,%rax
ret

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

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