#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 */
scalar_t__ isspace(char);
char *_move_past_whitespace(char *buf) {
  if (!buf) {
    ;
    return NULL;
  }
  while (*buf != '\0' && isspace(*buf))
    buf++;
  return buf;
}


x86 assembly (clang, -O0):
<_move_past_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <_move_past_whitespace+0x24>
movq   $0x0,-0x8(%rbp)
jmp    118d <_move_past_whitespace+0x7d>
jmp    1139 <_move_past_whitespace+0x29>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1164 <_move_past_whitespace+0x54>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1174 <_move_past_whitespace+0x64>
jmp    1185 <_move_past_whitespace+0x75>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1139 <_move_past_whitespace+0x29>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_move_past_whitespace>:
push   %rbx
test   %rdi,%rdi
je     113b <_move_past_whitespace+0x2b>
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     113d <_move_past_whitespace+0x2d>
nop
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     113d <_move_past_whitespace+0x2d>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <_move_past_whitespace+0x10>
jmp    113d <_move_past_whitespace+0x2d>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @_move_past_whitespace(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %3, %11
%7 = phi i8 [ %13, %11 ], [ %4, %3 ]
%8 = phi i8* [ %12, %11 ], [ %0, %3 ]
%9 = tail call i64 @isspace(i8 signext %7)
%10 = icmp eq i64 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %11, %6, %3, %1
%16 = phi i8* [ null, %1 ], [ %0, %3 ], [ %12, %11 ], [ %8, %6 ]
ret i8* %16
}