#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 */
typedef struct TYPE_7__ TYPE_1__;

/* Type definitions */
struct TYPE_7__ {
  int we_wordc;
  int /*<<< orphan*/ *we_wordv;
  scalar_t__ we_offs;
};
typedef TYPE_1__ wordexp_t;

/* Variables and functions */
int WRDE_NOSPACE;
int do_parse_glob(int /*<<< orphan*/, char **, size_t *, size_t *, TYPE_1__ *,
                  char const *, char const *);
int parse_backslash(char **, size_t *, size_t *, char const *, size_t *);
int parse_dollars(char **, size_t *, size_t *, char const *, size_t *, int,
                  TYPE_1__ *, char const *, char const *, int);
int parse_qtd_backslash(char **, size_t *, size_t *, char const *, size_t *);
scalar_t__ strchr(char const *, char const);
char *w_addchar(char *, size_t *, size_t *, char const);
int w_addword(TYPE_1__ *, char *);
char *w_newword(size_t *, size_t *);
int /*<<< orphan*/ wordfree(TYPE_1__ *);
int parse_glob(char **word, size_t *word_length, size_t *max_length,
               const char *words, size_t *offset, int flags,
               wordexp_t *pwordexp, const char *ifs, const char *ifs_white) {
  int error = WRDE_NOSPACE;
  int quoted = 0;
  int i;
  wordexp_t glob_list;
  glob_list.we_wordc = 0;
  glob_list.we_wordv = NULL;
  glob_list.we_offs = 0;
  for (; words[*offset] != '\0'; ++*offset) {
    if ((ifs && strchr(ifs, words[*offset])) ||
        (!ifs && strchr(" \t\n", words[*offset])))
      break;
    if (words[*offset] == '\'') {
      if (quoted == 0) {
        quoted = 1;
        continue;
      } else if (quoted == 1) {
        quoted = 0;
        continue;
      }
    } else if (words[*offset] == '"') {
      if (quoted == 0) {
        quoted = 2;
        continue;
      } else if (quoted == 2) {
        quoted = 0;
        continue;
      }
    }
    if (quoted != 1 && words[*offset] == '$') {
      error = parse_dollars(word, word_length, max_length, words, offset, flags,
                            &glob_list, ifs, ifs_white, quoted == 2);
      if (error)
        goto tidy_up;
      continue;
    } else if (words[*offset] == '\\') {
      if (quoted)
        error =
            parse_qtd_backslash(word, word_length, max_length, words, offset);
      else
        error = parse_backslash(word, word_length, max_length, words, offset);
      if (error)
        goto tidy_up;
      continue;
    }
    *word = w_addchar(*word, word_length, max_length, words[*offset]);
    if (*word == NULL)
      goto tidy_up;
  }
  --*offset;
  error = w_addword(&glob_list, *word);
  *word = w_newword(word_length, max_length);
  for (i = 0; error == 0 && i < glob_list.we_wordc; i++)
    error = do_parse_glob(glob_list.we_wordv[i], word, word_length, max_length,
                          pwordexp, ifs, ifs_white);
tidy_up:
  wordfree(&glob_list);
  return error;
}


x86 assembly (clang, -O0):
<parse_glob>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x78,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9d,-0x34(%rbp)
mov    0x2e24(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x58(%rbp)
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rcx),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1452 <parse_glob+0x2c2>
cmpq   $0x0,0x18(%rbp)
je     122c <parse_glob+0x9c>
mov    0x18(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rcx),%rcx
movsbl (%rax,%rcx,1),%esi
call   1050 <strchr@plt>
cmp    $0x0,%rax
jne    125c <parse_glob+0xcc>
cmpq   $0x0,0x18(%rbp)
jne    1261 <parse_glob+0xd1>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rcx),%rcx
lea    0xdb7(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1050 <strchr@plt>
cmp    $0x0,%rax
je     1261 <parse_glob+0xd1>
jmp    1452 <parse_glob+0x2c2>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rcx),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x27,%eax
jne    12af <parse_glob+0x11f>
cmpl   $0x0,-0x3c(%rbp)
jne    128f <parse_glob+0xff>
movl   $0x1,-0x3c(%rbp)
jmp    143f <parse_glob+0x2af>
cmpl   $0x1,-0x3c(%rbp)
jne    12a5 <parse_glob+0x115>
movl   $0x0,-0x3c(%rbp)
jmp    143f <parse_glob+0x2af>
jmp    12aa <parse_glob+0x11a>
jmp    1302 <parse_glob+0x172>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rcx),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x22,%eax
jne    12fd <parse_glob+0x16d>
cmpl   $0x0,-0x3c(%rbp)
jne    12dd <parse_glob+0x14d>
movl   $0x2,-0x3c(%rbp)
jmp    143f <parse_glob+0x2af>
cmpl   $0x2,-0x3c(%rbp)
jne    12f3 <parse_glob+0x163>
movl   $0x0,-0x3c(%rbp)
jmp    143f <parse_glob+0x2af>
jmp    12f8 <parse_glob+0x168>
jmp    12fd <parse_glob+0x16d>
jmp    1302 <parse_glob+0x172>
cmpl   $0x1,-0x3c(%rbp)
je     1382 <parse_glob+0x1f2>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rcx),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x24,%eax
jne    1382 <parse_glob+0x1f2>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x34(%rbp),%r9d
mov    0x18(%rbp),%r11
mov    0x20(%rbp),%r10
cmpl   $0x2,-0x3c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
lea    -0x58(%rbp),%rbx
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1060 <parse_dollars@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x38(%rbp)
je     137d <parse_glob+0x1ed>
jmp    14fe <parse_glob+0x36e>
jmp    143f <parse_glob+0x2af>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rcx),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5c,%eax
jne    13f5 <parse_glob+0x265>
cmpl   $0x0,-0x3c(%rbp)
je     13c5 <parse_glob+0x235>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1030 <parse_qtd_backslash@plt>
mov    %eax,-0x38(%rbp)
jmp    13e1 <parse_glob+0x251>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1070 <parse_backslash@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x38(%rbp)
je     13f0 <parse_glob+0x260>
jmp    14fe <parse_glob+0x36e>
jmp    143f <parse_glob+0x2af>
jmp    13fa <parse_glob+0x26a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rcx),%rcx
movsbl (%rax,%rcx,1),%ecx
call   1040 <w_addchar@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    143a <parse_glob+0x2aa>
jmp    14fe <parse_glob+0x36e>
jmp    143f <parse_glob+0x2af>
mov    -0x30(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    11e7 <parse_glob+0x57>
mov    -0x30(%rbp),%rax
mov    (%rax),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    -0x58(%rbp),%rdi
call   10b0 <w_addword@plt>
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1080 <w_newword@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x40(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x38(%rbp)
mov    %al,-0x59(%rbp)
jne    14ac <parse_glob+0x31c>
mov    -0x40(%rbp),%eax
cmp    -0x58(%rbp),%eax
setl   %al
mov    %al,-0x59(%rbp)
mov    -0x59(%rbp),%al
test   $0x1,%al
jne    14bc <parse_glob+0x32c>
jmp    14f9 <parse_glob+0x369>
mov    -0x50(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    0x10(%rbp),%r8
mov    0x18(%rbp),%r9
mov    0x20(%rbp),%rax
mov    %rax,(%rsp)
call   1090 <do_parse_glob@plt>
mov    %eax,-0x38(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1491 <parse_glob+0x301>
jmp    14fe <parse_glob+0x36e>
lea    -0x58(%rbp),%rdi
call   10a0 <wordfree@plt>
mov    -0x38(%rbp),%eax
add    $0x78,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_glob>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9d,0x1c(%rsp)
mov    %r8,%rbx
mov    %rcx,%r15
mov    %rdx,0x10(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rdi,%r13
mov    0x78(%rsp),%rbp
mov    0x2e26(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
movl   $0x0,0x20(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x28(%rsp)
mov    (%r8),%rcx
mov    (%r15,%rcx,1),%al
test   %al,%al
je     1382 <parse_glob+0x1f2>
xor    %r14d,%r14d
jmp    1235 <parse_glob+0xa5>
nopl   0x0(%rax)
mov    0x0(%r13),%rdi
movsbl %al,%ecx
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
call   1040 <w_addchar@plt>
mov    %rax,0x0(%r13)
mov    0x4(%rsp),%r12d
test   %rax,%rax
je     141d <parse_glob+0x28d>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movzbl 0x1(%r15,%rax,1),%eax
test   %al,%al
mov    0x78(%rsp),%rbp
je     137f <parse_glob+0x1ef>
movsbl %al,%esi
test   %rbp,%rbp
je     1250 <parse_glob+0xc0>
mov    %rbp,%rdi
jmp    1257 <parse_glob+0xc7>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0xda9(%rip),%rdi
call   1050 <strchr@plt>
test   %rax,%rax
jne    137f <parse_glob+0x1ef>
mov    (%rbx),%rax
movzbl (%r15,%rax,1),%eax
cmp    $0x22,%al
je     1290 <parse_glob+0x100>
cmp    $0x27,%al
jne    12b0 <parse_glob+0x120>
test   %r14d,%r14d
je     131a <parse_glob+0x18a>
cmp    $0x1,%r14d
je     12a3 <parse_glob+0x113>
jmp    11f0 <parse_glob+0x60>
nopl   0x0(%rax)
test   %r14d,%r14d
je     1325 <parse_glob+0x195>
cmp    $0x2,%r14d
jne    11f0 <parse_glob+0x60>
xor    %r14d,%r14d
jmp    1218 <parse_glob+0x88>
nopl   0x0(%rax,%rax,1)
cmp    $0x1,%r14d
jne    12c0 <parse_glob+0x130>
cmp    $0x5c,%al
jne    11f0 <parse_glob+0x60>
jmp    1335 <parse_glob+0x1a5>
cmp    $0x5c,%al
je     1330 <parse_glob+0x1a0>
cmp    $0x24,%al
jne    11f0 <parse_glob+0x60>
xor    %eax,%eax
cmp    $0x2,%r14d
sete   %al
mov    %r13,%rdi
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %r15,%rcx
mov    %rbx,%r8
mov    0x1c(%rsp),%r9d
push   %rax
push   0x88(%rsp)
push   %rbp
lea    0x38(%rsp),%rax
push   %rax
call   1060 <parse_dollars@plt>
add    $0x20,%rsp
movl   $0x0,0x4(%rsp)
test   %eax,%eax
je     1218 <parse_glob+0x88>
jmp    1439 <parse_glob+0x2a9>
mov    $0x1,%r14d
jmp    1218 <parse_glob+0x88>
mov    $0x2,%r14d
jmp    1218 <parse_glob+0x88>
test   %r14d,%r14d
je     1365 <parse_glob+0x1d5>
mov    %r13,%rdi
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %r15,%rcx
mov    %rbx,%r8
call   1030 <parse_qtd_backslash@plt>
mov    %eax,%r12d
movl   $0x0,0x4(%rsp)
test   %eax,%eax
je     1218 <parse_glob+0x88>
jmp    141d <parse_glob+0x28d>
mov    %r13,%rdi
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %r15,%rcx
mov    %rbx,%r8
call   1070 <parse_backslash@plt>
jmp    134d <parse_glob+0x1bd>
mov    (%rbx),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,(%rbx)
mov    0x0(%r13),%rsi
lea    0x20(%rsp),%rdi
call   10b0 <w_addword@plt>
mov    %eax,%r12d
mov    0x8(%rsp),%rdi
mov    0x10(%rsp),%rsi
call   1080 <w_newword@plt>
mov    %rax,0x0(%r13)
test   %r12d,%r12d
jne    141d <parse_glob+0x28d>
cmpl   $0x0,0x20(%rsp)
jle    141d <parse_glob+0x28d>
mov    0x70(%rsp),%rbx
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x28(%rsp),%rax
mov    -0x4(%rax,%rbp,4),%edi
sub    $0x8,%rsp
mov    %r13,%rsi
mov    0x10(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    %rbx,%r8
mov    0x80(%rsp),%r9
push   0x88(%rsp)
call   1090 <do_parse_glob@plt>
add    $0x10,%rsp
mov    %eax,%r12d
test   %eax,%eax
jne    141d <parse_glob+0x28d>
lea    0x1(%rbp),%rax
movslq 0x20(%rsp),%rcx
cmp    %rcx,%rbp
mov    %rax,%rbp
jl     13d0 <parse_glob+0x240>
lea    0x20(%rsp),%rdi
call   10a0 <wordfree@plt>
mov    %r12d,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %eax,%r12d
jmp    141d <parse_glob+0x28d>

LLVM IR (-O0):
%struct.TYPE_7__ = type { i32, i32*, i64 }
@WRDE_NOSPACE = global i32 0
@.str = [4 x i8] c" \09\0A\00"
define i32 @parse_glob(i8** %0, i64* %1, i64* %2, i8* %3, i64* %4, i32 %5, %struct.TYPE_7__* %6, i8* %7, i8* %8) {
%10 = alloca i8**
%11 = alloca i64*
%12 = alloca i64*
%13 = alloca i8*
%14 = alloca i64*
%15 = alloca i32
%16 = alloca %struct.TYPE_7__*
%17 = alloca i8*
%18 = alloca i8*
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca %struct.TYPE_7__
store i8** %0, i8*** %10
store i64* %1, i64** %11
store i64* %2, i64** %12
store i8* %3, i8** %13
store i64* %4, i64** %14
store i32 %5, i32* %15
store %struct.TYPE_7__* %6, %struct.TYPE_7__** %16
store i8* %7, i8** %17
store i8* %8, i8** %18
%23 = load i32, i32* @WRDE_NOSPACE
store i32 %23, i32* %19
store i32 0, i32* %20
%24 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %22, i32 0, i32 0
store i32 0, i32* %24
%25 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %22, i32 0, i32 1
store i32* null, i32** %25
%26 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %22, i32 0, i32 2
store i64 0, i64* %26
br label %27
27: ; preds = %172, %9
%28 = load i8*, i8** %13
%29 = load i64*, i64** %14
%30 = load i64, i64* %29
%31 = getelementptr inbounds i8, i8* %28, i64 %30
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %176
35: ; preds = %27
%36 = load i8*, i8** %17
%37 = icmp ne i8* %36, null
br i1 %37, label %38, label %47
38: ; preds = %35
%39 = load i8*, i8** %17
%40 = load i8*, i8** %13
%41 = load i64*, i64** %14
%42 = load i64, i64* %41
%43 = getelementptr inbounds i8, i8* %40, i64 %42
%44 = load i8, i8* %43
%45 = call i64 @strchr(i8* %39, i8 signext %44)
%46 = icmp ne i64 %45, 0
br i1 %46, label %58, label %47
47: ; preds = %38, %35
%48 = load i8*, i8** %17
%49 = icmp ne i8* %48, null
br i1 %49, label %59, label %50
50: ; preds = %47
%51 = load i8*, i8** %13
%52 = load i64*, i64** %14
%53 = load i64, i64* %52
%54 = getelementptr inbounds i8, i8* %51, i64 %53
%55 = load i8, i8* %54
%56 = call i64 @strchr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %55)
%57 = icmp ne i64 %56, 0
br i1 %57, label %58, label %59
58: ; preds = %50, %38
br label %176
59: ; preds = %50, %47
%60 = load i8*, i8** %13
%61 = load i64*, i64** %14
%62 = load i64, i64* %61
%63 = getelementptr inbounds i8, i8* %60, i64 %62
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = icmp eq i32 %65, 39
br i1 %66, label %67, label %77
67: ; preds = %59
%68 = load i32, i32* %20
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %71
70: ; preds = %67
store i32 1, i32* %20
br label %172
71: ; preds = %67
%72 = load i32, i32* %20
%73 = icmp eq i32 %72, 1
br i1 %73, label %74, label %75
74: ; preds = %71
store i32 0, i32* %20
br label %172
75: ; preds = %71
br label %76
76: ; preds = %75
br label %96
77: ; preds = %59
%78 = load i8*, i8** %13
%79 = load i64*, i64** %14
%80 = load i64, i64* %79
%81 = getelementptr inbounds i8, i8* %78, i64 %80
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = icmp eq i32 %83, 34
br i1 %84, label %85, label %95
85: ; preds = %77
%86 = load i32, i32* %20
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %89
88: ; preds = %85
store i32 2, i32* %20
br label %172
89: ; preds = %85
%90 = load i32, i32* %20
%91 = icmp eq i32 %90, 2
br i1 %91, label %92, label %93
92: ; preds = %89
store i32 0, i32* %20
br label %172
93: ; preds = %89
br label %94
94: ; preds = %93
br label %95
95: ; preds = %94, %77
br label %96
96: ; preds = %95, %76
%97 = load i32, i32* %20
%98 = icmp ne i32 %97, 1
br i1 %98, label %99, label %124
99: ; preds = %96
%100 = load i8*, i8** %13
%101 = load i64*, i64** %14
%102 = load i64, i64* %101
%103 = getelementptr inbounds i8, i8* %100, i64 %102
%104 = load i8, i8* %103
%105 = sext i8 %104 to i32
%106 = icmp eq i32 %105, 36
br i1 %106, label %107, label %124
107: ; preds = %99
%108 = load i8**, i8*** %10
%109 = load i64*, i64** %11
%110 = load i64*, i64** %12
%111 = load i8*, i8** %13
%112 = load i64*, i64** %14
%113 = load i32, i32* %15
%114 = load i8*, i8** %17
%115 = load i8*, i8** %18
%116 = load i32, i32* %20
%117 = icmp eq i32 %116, 2
%118 = zext i1 %117 to i32
%119 = call i32 @parse_dollars(i8** %108, i64* %109, i64* %110, i8* %111, i64* %112, i32 %113, %struct.TYPE_7__* %22, i8* %114, i8* %115, i32 %118)
store i32 %119, i32* %19
%120 = load i32, i32* %19
%121 = icmp ne i32 %120, 0
br i1 %121, label %122, label %123
122: ; preds = %107
br label %215
123: ; preds = %107
br label %172
124: ; preds = %99, %96
%125 = load i8*, i8** %13
%126 = load i64*, i64** %14
%127 = load i64, i64* %126
%128 = getelementptr inbounds i8, i8* %125, i64 %127
%129 = load i8, i8* %128
%130 = sext i8 %129 to i32
%131 = icmp eq i32 %130, 92
br i1 %131, label %132, label %154
132: ; preds = %124
%133 = load i32, i32* %20
%134 = icmp ne i32 %133, 0
br i1 %134, label %135, label %142
135: ; preds = %132
%136 = load i8**, i8*** %10
%137 = load i64*, i64** %11
%138 = load i64*, i64** %12
%139 = load i8*, i8** %13
%140 = load i64*, i64** %14
%141 = call i32 @parse_qtd_backslash(i8** %136, i64* %137, i64* %138, i8* %139, i64* %140)
store i32 %141, i32* %19
br label %149
142: ; preds = %132
%143 = load i8**, i8*** %10
%144 = load i64*, i64** %11
%145 = load i64*, i64** %12
%146 = load i8*, i8** %13
%147 = load i64*, i64** %14
%148 = call i32 @parse_backslash(i8** %143, i64* %144, i64* %145, i8* %146, i64* %147)
store i32 %148, i32* %19
br label %149
149: ; preds = %142, %135
%150 = load i32, i32* %19
%151 = icmp ne i32 %150, 0
br i1 %151, label %152, label %153
152: ; preds = %149
br label %215
153: ; preds = %149
br label %172
154: ; preds = %124
br label %155
155: ; preds = %154
%156 = load i8**, i8*** %10
%157 = load i8*, i8** %156
%158 = load i64*, i64** %11
%159 = load i64*, i64** %12
%160 = load i8*, i8** %13
%161 = load i64*, i64** %14
%162 = load i64, i64* %161
%163 = getelementptr inbounds i8, i8* %160, i64 %162
%164 = load i8, i8* %163
%165 = call i8* @w_addchar(i8* %157, i64* %158, i64* %159, i8 signext %164)
%166 = load i8**, i8*** %10
store i8* %165, i8** %166
%167 = load i8**, i8*** %10
%168 = load i8*, i8** %167
%169 = icmp eq i8* %168, null
br i1 %169, label %170, label %171
170: ; preds = %155
br label %215
171: ; preds = %155
br label %172
172: ; preds = %171, %153, %123, %92, %88, %74, %70
%173 = load i64*, i64** %14
%174 = load i64, i64* %173
%175 = add i64 %174, 1
store i64 %175, i64* %173
br label %27
176: ; preds = %58, %27
%177 = load i64*, i64** %14
%178 = load i64, i64* %177
%179 = add i64 %178, -1
store i64 %179, i64* %177
%180 = load i8**, i8*** %10
%181 = load i8*, i8** %180
%182 = call i32 @w_addword(%struct.TYPE_7__* %22, i8* %181)
store i32 %182, i32* %19
%183 = load i64*, i64** %11
%184 = load i64*, i64** %12
%185 = call i8* @w_newword(i64* %183, i64* %184)
%186 = load i8**, i8*** %10
store i8* %185, i8** %186
store i32 0, i32* %21
br label %187
187: ; preds = %211, %176
%188 = load i32, i32* %19
%189 = icmp eq i32 %188, 0
br i1 %189, label %190, label %195
190: ; preds = %187
%191 = load i32, i32* %21
%192 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %22, i32 0, i32 0
%193 = load i32, i32* %192
%194 = icmp slt i32 %191, %193
br label %195
195: ; preds = %190, %187
%196 = phi i1 [ false, %187 ], [ %194, %190 ]
br i1 %196, label %197, label %214
197: ; preds = %195
%198 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %22, i32 0, i32 1
%199 = load i32*, i32** %198
%200 = load i32, i32* %21
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds i32, i32* %199, i64 %201
%203 = load i32, i32* %202
%204 = load i8**, i8*** %10
%205 = load i64*, i64** %11
%206 = load i64*, i64** %12
%207 = load %struct.TYPE_7__*, %struct.TYPE_7__** %16
%208 = load i8*, i8** %17
%209 = load i8*, i8** %18
%210 = call i32 @do_parse_glob(i32 %203, i8** %204, i64* %205, i64* %206, %struct.TYPE_7__* %207, i8* %208, i8* %209)
store i32 %210, i32* %19
br label %211
211: ; preds = %197
%212 = load i32, i32* %21
%213 = add nsw i32 %212, 1
store i32 %213, i32* %21
br label %187
214: ; preds = %195
br label %215
215: ; preds = %214, %170, %152, %122
%216 = call i32 @wordfree(%struct.TYPE_7__* %22)
%217 = load i32, i32* %19
ret i32 %217
}

LLVM IR (-O2):
%struct.TYPE_7__ = type { i32, i32*, i64 }
@WRDE_NOSPACE = global i32 0
@.str = [4 x i8] c" \09\0A\00"
define i32 @parse_glob(i8** %0, i64* %1, i64* %2, i8* %3, i64* %4, i32 %5, %struct.TYPE_7__* %6, i8* %7, i8* %8) {
%10 = alloca %struct.TYPE_7__
%11 = load i32, i32* @WRDE_NOSPACE
%12 = bitcast %struct.TYPE_7__* %10 to i8*
%13 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %10, i64 0, i32 0
store i32 0, i32* %13
%14 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %10, i64 0, i32 1
%15 = bitcast i32** %14 to i8*
%16 = load i64, i64* %4
%17 = getelementptr inbounds i8, i8* %3, i64 %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 0
br i1 %19, label %73, label %20
20: ; preds = %9
%21 = icmp eq i8* %7, null
br label %22
22: ; preds = %20, %63
%23 = phi i8 [ %18, %20 ], [ %69, %63 ]
%24 = phi i32 [ 0, %20 ], [ %65, %63 ]
%25 = phi i32 [ %11, %20 ], [ %64, %63 ]
br i1 %21, label %29, label %26
26: ; preds = %22
%27 = call i64 @strchr(i8* %7, i8 signext %23)
%28 = icmp eq i64 %27, 0
br i1 %28, label %32, label %71
29: ; preds = %22
%30 = call i64 @strchr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %23)
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %71
32: ; preds = %26, %29
%33 = load i64, i64* %4
%34 = getelementptr inbounds i8, i8* %3, i64 %33
%35 = load i8, i8* %34
switch i8 %35, label %40 [
i8 39, label %36
i8 34, label %38
]
36: ; preds = %32
switch i32 %24, label %59 [
i32 0, label %63
i32 1, label %37
]
37: ; preds = %36
br label %63
38: ; preds = %32
switch i32 %24, label %59 [
i32 0, label %63
i32 2, label %39
]
39: ; preds = %38
br label %63
40: ; preds = %32
%41 = icmp eq i32 %24, 1
br i1 %41, label %48, label %42
42: ; preds = %40
switch i8 %35, label %59 [
i8 36, label %43
i8 92, label %50
]
43: ; preds = %42
%44 = icmp eq i32 %24, 2
%45 = zext i1 %44 to i32
%46 = call i32 @parse_dollars(i8** %0, i64* %1, i64* %2, i8* %3, i64* %4, i32 %5, %struct.TYPE_7__* %10, i8* %7, i8* %8, i32 %45)
%47 = icmp eq i32 %46, 0
br i1 %47, label %63, label %95
48: ; preds = %40
%49 = icmp eq i8 %35, 92
br i1 %49, label %52, label %59
50: ; preds = %42
%51 = icmp eq i32 %24, 0
br i1 %51, label %54, label %52
52: ; preds = %48, %50
%53 = call i32 @parse_qtd_backslash(i8** %0, i64* %1, i64* %2, i8* %3, i64* %4)
br label %56
54: ; preds = %50
%55 = call i32 @parse_backslash(i8** %0, i64* %1, i64* %2, i8* %3, i64* %4)
br label %56
56: ; preds = %54, %52
%57 = phi i32 [ %53, %52 ], [ %55, %54 ]
%58 = icmp eq i32 %57, 0
br i1 %58, label %63, label %95
59: ; preds = %42, %36, %38, %48
%60 = load i8*, i8** %0
%61 = call i8* @w_addchar(i8* %60, i64* %1, i64* %2, i8 signext %35)
store i8* %61, i8** %0
%62 = icmp eq i8* %61, null
br i1 %62, label %95, label %63
63: ; preds = %38, %36, %59, %56, %43, %39, %37
%64 = phi i32 [ %25, %37 ], [ 0, %43 ], [ 0, %56 ], [ %25, %59 ], [ %25, %39 ], [ %25, %36 ], [ %25, %38 ]
%65 = phi i32 [ 0, %37 ], [ %24, %43 ], [ %24, %56 ], [ %24, %59 ], [ 0, %39 ], [ 1, %36 ], [ 2, %38 ]
%66 = load i64, i64* %4
%67 = add i64 %66, 1
store i64 %67, i64* %4
%68 = getelementptr inbounds i8, i8* %3, i64 %67
%69 = load i8, i8* %68
%70 = icmp eq i8 %69, 0
br i1 %70, label %71, label %22
71: ; preds = %26, %29, %63
%72 = load i64, i64* %4
br label %73
73: ; preds = %71, %9
%74 = phi i64 [ %72, %71 ], [ %16, %9 ]
%75 = add i64 %74, -1
store i64 %75, i64* %4
%76 = load i8*, i8** %0
%77 = call i32 @w_addword(%struct.TYPE_7__* %10, i8* %76)
%78 = call i8* @w_newword(i64* %1, i64* %2)
store i8* %78, i8** %0
%79 = icmp eq i32 %77, 0
%80 = load i32, i32* %13
%81 = icmp sgt i32 %80, 0
%82 = select i1 %79, i1 %81, i1 false
br i1 %82, label %83, label %95
83: ; preds = %73, %83
%84 = phi i64 [ %89, %83 ], [ 0, %73 ]
%85 = load i32*, i32** %14
%86 = getelementptr inbounds i32, i32* %85, i64 %84
%87 = load i32, i32* %86
%88 = call i32 @do_parse_glob(i32 %87, i8** %0, i64* %1, i64* %2, %struct.TYPE_7__* %6, i8* %7, i8* %8)
%89 = add nuw nsw i64 %84, 1
%90 = icmp eq i32 %88, 0
%91 = load i32, i32* %13
%92 = sext i32 %91 to i64
%93 = icmp slt i64 %89, %92
%94 = select i1 %90, i1 %93, i1 false
br i1 %94, label %83, label %95
95: ; preds = %59, %56, %43, %83, %73
%96 = phi i32 [ %77, %73 ], [ %88, %83 ], [ %25, %59 ], [ %57, %56 ], [ %46, %43 ]
%97 = call i32 @wordfree(%struct.TYPE_7__* %10)
ret i32 %96
}