#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 *secGetStringPart(char const *, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void getHeaderFieldBody(char **cpp_output, const char *ccp_input) {
  size_t i_offset_token;
  for (i_offset_token = 0; ccp_input[i_offset_token] != ':'; ++i_offset_token)
    ;
  *cpp_output =
      secGetStringPart(ccp_input, i_offset_token + 1, strlen(ccp_input));
}


x86 assembly (clang, -O0):
<getHeaderFieldBody>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3a,%eax
je     1163 <getHeaderFieldBody+0x43>
jmp    1152 <getHeaderFieldBody+0x32>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1138 <getHeaderFieldBody+0x18>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1040 <secGetStringPart@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getHeaderFieldBody>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   (%rax)
cmpb   $0x3a,(%r15,%rbx,1)
lea    0x1(%rbx),%rbx
jne    1130 <getHeaderFieldBody+0x10>
mov    %r15,%rdi
call   1030 <strlen@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <secGetStringPart@plt>
mov    %rax,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @getHeaderFieldBody(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
%5 = alloca i64
store i8** %0, i8*** %3
store i8* %1, i8** %4
store i64 0, i64* %5
br label %6
6: ; preds = %14, %2
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds i8, i8* %7, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 58
br i1 %12, label %13, label %17
13: ; preds = %6
br label %14
14: ; preds = %13
%15 = load i64, i64* %5
%16 = add i64 %15, 1
store i64 %16, i64* %5
br label %6
17: ; preds = %6
%18 = load i8*, i8** %4
%19 = load i64, i64* %5
%20 = add i64 %19, 1
%21 = load i8*, i8** %4
%22 = call i32 @strlen(i8* %21)
%23 = call i8* @secGetStringPart(i8* %18, i64 %20, i32 %22)
%24 = load i8**, i8*** %3
store i8* %23, i8** %24
ret void
}

LLVM IR (-O2):
define void @getHeaderFieldBody(i8** nocapture writeonly %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ 0, %2 ], [ %8, %3 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 58
%8 = add i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = tail call i32 @strlen(i8* %1)
%11 = tail call i8* @secGetStringPart(i8* %1, i64 %8, i32 %10)
store i8* %11, i8** %0
ret void
}