#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 */
int /*<<< orphan*/ SkipColorCodes(char const **, char *);
scalar_t__ isspace(char const);
void SkipWhiteSpace(const char **text, char *lastColor) {
  while (**text) {
    SkipColorCodes(text, lastColor);
    if (**text != '\n' && isspace(**text))
      (*text)++;
    else
      break;
  }
}


x86 assembly (clang, -O0):
<SkipWhiteSpace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmpb   $0x0,(%rax)
je     1196 <SkipWhiteSpace+0x76>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <SkipColorCodes@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     118c <SkipWhiteSpace+0x6c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     118c <SkipWhiteSpace+0x6c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1191 <SkipWhiteSpace+0x71>
jmp    1196 <SkipWhiteSpace+0x76>
jmp    1130 <SkipWhiteSpace+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SkipWhiteSpace>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%rax
cmpb   $0x0,(%rax)
je     1172 <SkipWhiteSpace+0x52>
mov    %rsi,%r14
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <SkipColorCodes@plt>
mov    (%rbx),%rax
movzbl (%rax),%eax
cmp    $0xa,%al
je     1172 <SkipWhiteSpace+0x52>
movsbl %al,%edi
call   1040 <isspace@plt>
test   %rax,%rax
je     1172 <SkipWhiteSpace+0x52>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
cmpb   $0x0,0x1(%rax)
jne    1140 <SkipWhiteSpace+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @SkipWhiteSpace(i8** %0, i8* %1) {
%3 = load i8*, i8** %0
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %19, label %6
6: ; preds = %2, %14
%7 = tail call i32 @SkipColorCodes(i8** %0, i8* %1)
%8 = load i8*, i8** %0
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 10
br i1 %10, label %19, label %11
11: ; preds = %6
%12 = tail call i64 @isspace(i8 signext %9)
%13 = icmp eq i64 %12, 0
br i1 %13, label %19, label %14
14: ; preds = %11
%15 = load i8*, i8** %0
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8* %16, i8** %0
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %6
19: ; preds = %14, %11, %6, %2
ret void
}