#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 *eat_blank(char *);
char *config_read_word(char *line, char **next) {
  char *word;
  line = eat_blank(line);
  word = line;
  while (*line && (*line != ' ') && (*line != '\t') && (*line != '\n'))
    line++;
  *next = line;
  return word;
}


x86 assembly (clang, -O0):
<config_read_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <eat_blank@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     1184 <config_read_word+0x74>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x19(%rbp)
je     1184 <config_read_word+0x74>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0x19(%rbp)
je     1184 <config_read_word+0x74>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1194 <config_read_word+0x84>
jmp    11a5 <config_read_word+0x95>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1135 <config_read_word+0x25>
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_read_word>:
push   %rbx
mov    %rsi,%rbx
call   1030 <eat_blank@plt>
movabs $0x100000601,%rdx
mov    %rax,%rcx
jmp    1134 <config_read_word+0x24>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rcx
movzbl (%rcx),%esi
cmp    $0x20,%rsi
ja     1130 <config_read_word+0x20>
bt     %rsi,%rdx
jae    1130 <config_read_word+0x20>
mov    %rcx,(%rbx)
pop    %rbx
ret

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

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