#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 */
typedef int ssize_t;

/* Variables and functions */
int FNM_NOMATCH;
int convert_flags(char const *);
char *escape(char const *, size_t *, char **);
int /*<<< orphan*/ feof(int /*<<< orphan*/);
char *flag_output(int);
int fnmatch(char const *, char const *, int);
int /*<<< orphan*/ free(char *);
int getline(char **, size_t *, int /*<<< orphan*/);
char *next_input(char **, int, int);
int /*<<< orphan*/ printf(char *, ...);
char *sprintf(char *, char *, int);
int /*<<< orphan*/ stdin;
scalar_t__ str_has_funk(char const *, char);
int /*<<< orphan*/ str_isalpha(char const *);
scalar_t__ strcasecmp(char const *, char *);
scalar_t__ strcmp(char const *, char *);
int strtol(char const *, char **, int /*<<< orphan*/);
int main(void) {
  char *linebuf = NULL;
  size_t linebuflen = 0;
  int ntests = 0;
  int nfailed = 0;
  int nskipped = 0;
  char *escinput = NULL;
  size_t escinputlen = 0;
  char *escpattern = NULL;
  size_t escpatternlen = 0;
  int nr = 0;
  while (!feof(stdin)) {
    ssize_t n = getline(&linebuf, &linebuflen, stdin);
    char *cp;
    const char *locale;
    const char *input;
    const char *pattern;
    const char *result_str;
    int result;
    const char *flags;
    int flags_val;
    int fnmres;
    char numbuf[24];
    if (n == -1)
      break;
    if (n == 0)
      continue;
    cp = linebuf;
    locale = next_input(&cp, 1, 0);
    if (locale == NULL)
      continue;
    input = next_input(&cp, 0, 0);
    if (input == NULL)
      continue;
    pattern = next_input(&cp, 0, 0);
    if (pattern == NULL)
      continue;
    result_str = next_input(&cp, 0, 0);
    if (result_str == NULL)
      continue;
    if (strcmp(result_str, "0") == 0)
      result = 0;
    else if (strcasecmp(result_str, "NOMATCH") == 0)
      result = FNM_NOMATCH;
    else {
      char *endp;
      result = strtol(result_str, &endp, 0);
      if (*endp != '\0')
        continue;
    }
    flags = next_input(&cp, 0, 1);
    if (flags == NULL)
      flags = "";
    flags_val = convert_flags(flags);
    if (flags_val == -1)
      continue;
    ++ntests;
    if (!str_isalpha(pattern) || !str_isalpha(input)) {
      ++nskipped;
      printf("%3d: fnmatch (\"%s\", \"%s\"): SKIP multibyte test (requires "
             "locale support)\n",
             ++nr, pattern, input);
      continue;
    }
    if (str_has_funk(pattern, '.') || str_has_funk(input, '.')) {
      ++nskipped;
      printf("%3d: fnmatch (\"%s\", \"%s\"): SKIP collating symbol test "
             "(requires locale support)\n",
             ++nr, pattern, input);
      continue;
    }
    if (str_has_funk(pattern, '=') || str_has_funk(input, '=')) {
      ++nskipped;
      printf("%3d: fnmatch (\"%s\", \"%s\"): SKIP equivalence class test "
             "(requires locale support)\n",
             ++nr, pattern, input);
      continue;
    }
    fnmres = fnmatch(pattern, input, flags_val);
    printf("%3d: fnmatch (\"%s\", \"%s\", %s) = %s%c", ++nr,
           escape(pattern, &escpatternlen, &escpattern),
           escape(input, &escinputlen, &escinput), flag_output(flags_val),
           (fnmres == 0 ? "0"
                        : (fnmres == FNM_NOMATCH
                               ? "FNM_NOMATCH"
                               : (sprintf(numbuf, "%d", fnmres), numbuf))),
           (fnmres != 0) != (result != 0) ? ' ' : '\n');
    if ((fnmres != 0) != (result != 0)) {
      printf("(FAIL, expected %s) ***\n",
             result == 0 ? "0"
                         : (result == FNM_NOMATCH
                                ? "FNM_NOMATCH"
                                : (sprintf(numbuf, "%d", result), numbuf)));
      ++nfailed;
    }
  }
  printf("=====================\n%3d tests, %3d failed, %3d skipped\n", ntests,
         nfailed, nskipped);
  free(escpattern);
  free(escinput);
  free(linebuf);
  return nfailed != 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    0x2d8b(%rip),%rax
mov    (%rax),%edi
call   10a0 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1271 <main+0x81>
jmp    172c <main+0x53c>
mov    0x2d68(%rip),%rax
mov    (%rax),%edx
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   10e0 <getline@plt>
mov    %eax,-0x50(%rbp)
cmpl   $0xffffffff,-0x50(%rbp)
jne    1299 <main+0xa9>
jmp    172c <main+0x53c>
cmpl   $0x0,-0x50(%rbp)
jne    12a8 <main+0xb8>
jmp    124e <main+0x5e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x58(%rbp)
lea    -0x58(%rbp),%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   10d0 <next_input@plt>
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x60(%rbp)
jne    12d4 <main+0xe4>
jmp    124e <main+0x5e>
lea    -0x58(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   10d0 <next_input@plt>
mov    %rax,-0x68(%rbp)
cmpq   $0x0,-0x68(%rbp)
jne    12f5 <main+0x105>
jmp    124e <main+0x5e>
lea    -0x58(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   10d0 <next_input@plt>
mov    %rax,-0x70(%rbp)
cmpq   $0x0,-0x70(%rbp)
jne    1316 <main+0x126>
jmp    124e <main+0x5e>
lea    -0x58(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   10d0 <next_input@plt>
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x78(%rbp)
jne    1337 <main+0x147>
jmp    124e <main+0x5e>
mov    -0x78(%rbp),%rdi
lea    0xcbe(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    135d <main+0x16d>
movl   $0x0,-0x7c(%rbp)
jmp    13bf <main+0x1cf>
mov    -0x78(%rbp),%rdi
lea    0xdb0(%rip),%rsi
call   1060 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1388 <main+0x198>
mov    0x2c6a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x7c(%rbp)
jmp    13ba <main+0x1ca>
mov    -0x78(%rbp),%rdi
lea    -0xb8(%rbp),%rsi
xor    %edx,%edx
call   10b0 <strtol@plt>
mov    %eax,-0x7c(%rbp)
mov    -0xb8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     13b5 <main+0x1c5>
jmp    124e <main+0x5e>
jmp    13ba <main+0x1ca>
jmp    13bf <main+0x1cf>
lea    -0x58(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   10d0 <next_input@plt>
mov    %rax,-0x88(%rbp)
cmpq   $0x0,-0x88(%rbp)
jne    13f2 <main+0x202>
lea    0xc60(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rdi
call   1030 <convert_flags@plt>
mov    %eax,-0x8c(%rbp)
cmpl   $0xffffffff,-0x8c(%rbp)
jne    1416 <main+0x226>
jmp    124e <main+0x5e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x70(%rbp),%rdi
call   10c0 <str_isalpha@plt>
cmp    $0x0,%eax
je     1443 <main+0x253>
mov    -0x68(%rbp),%rdi
call   10c0 <str_isalpha@plt>
cmp    $0x0,%eax
jne    1470 <main+0x280>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x4c(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x4c(%rbp)
mov    -0x70(%rbp),%rdx
mov    -0x68(%rbp),%rcx
lea    0xb9e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    124e <main+0x5e>
mov    -0x70(%rbp),%rdi
mov    $0x2e,%esi
call   1050 <str_has_funk@plt>
cmp    $0x0,%rax
jne    14a0 <main+0x2b0>
mov    -0x68(%rbp),%rdi
mov    $0x2e,%esi
call   1050 <str_has_funk@plt>
cmp    $0x0,%rax
je     14cd <main+0x2dd>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x4c(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x4c(%rbp)
mov    -0x70(%rbp),%rdx
mov    -0x68(%rbp),%rcx
lea    0xb8b(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    124e <main+0x5e>
mov    -0x70(%rbp),%rdi
mov    $0x3d,%esi
call   1050 <str_has_funk@plt>
cmp    $0x0,%rax
jne    14fd <main+0x30d>
mov    -0x68(%rbp),%rdi
mov    $0x3d,%esi
call   1050 <str_has_funk@plt>
cmp    $0x0,%rax
je     152a <main+0x33a>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x4c(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x4c(%rbp)
mov    -0x70(%rbp),%rdx
mov    -0x68(%rbp),%rcx
lea    0xb7f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    124e <main+0x5e>
mov    -0x70(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0x8c(%rbp),%edx
call   1080 <fnmatch@plt>
mov    %eax,-0x90(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
mov    %eax,-0x4c(%rbp)
mov    -0x70(%rbp),%rdi
lea    -0x48(%rbp),%rsi
lea    -0x40(%rbp),%rdx
call   1110 <escape@plt>
mov    %rax,-0xd0(%rbp)
mov    -0x68(%rbp),%rdi
lea    -0x38(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1110 <escape@plt>
mov    %rax,-0xc8(%rbp)
mov    -0x8c(%rbp),%edi
call   1100 <flag_output@plt>
mov    %rax,-0xc0(%rbp)
cmpl   $0x0,-0x90(%rbp)
jne    15b4 <main+0x3c4>
lea    0xa58(%rip),%rax
mov    %rax,-0xe0(%rbp)
jmp    1611 <main+0x421>
mov    -0x90(%rbp),%eax
mov    0x2a27(%rip),%rcx
cmp    (%rcx),%eax
jne    15dc <main+0x3ec>
lea    0xb44(%rip),%rax
mov    %rax,-0xe8(%rbp)
jmp    1603 <main+0x413>
lea    -0xb0(%rbp),%rdi
mov    -0x90(%rbp),%edx
lea    0xb30(%rip),%rsi
call   10f0 <sprintf@plt>
lea    -0xb0(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0xe8(%rbp),%rax
mov    %rax,-0xe0(%rbp)
mov    -0xc0(%rbp),%r8
mov    -0xc8(%rbp),%rcx
mov    -0xd0(%rbp),%rdx
mov    -0xd4(%rbp),%esi
mov    -0xe0(%rbp),%r9
cmpl   $0x0,-0x90(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%r10d
cmpl   $0x0,-0x7c(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%r11d
mov    $0xa,%eax
mov    $0x20,%edi
cmp    %r11d,%r10d
cmovne %edi,%eax
lea    0xa88(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1070 <printf@plt>
cmpl   $0x0,-0x90(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0x7c(%rbp)
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     1727 <main+0x537>
cmpl   $0x0,-0x7c(%rbp)
jne    16b2 <main+0x4c2>
lea    0x95a(%rip),%rax
mov    %rax,-0xf0(%rbp)
jmp    1709 <main+0x519>
mov    -0x7c(%rbp),%eax
mov    0x292c(%rip),%rcx
cmp    (%rcx),%eax
jne    16d7 <main+0x4e7>
lea    0xa49(%rip),%rax
mov    %rax,-0xf8(%rbp)
jmp    16fb <main+0x50b>
lea    -0xb0(%rbp),%rdi
mov    -0x7c(%rbp),%edx
lea    0xa38(%rip),%rsi
call   10f0 <sprintf@plt>
lea    -0xb0(%rbp),%rax
mov    %rax,-0xf8(%rbp)
mov    -0xf8(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rsi
lea    0xa0c(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    124e <main+0x5e>
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x24(%rbp),%ecx
lea    0xa00(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x40(%rbp),%rdi
call   1040 <free@plt>
mov    -0x30(%rbp),%rdi
call   1040 <free@plt>
mov    -0x10(%rbp),%rdi
call   1040 <free@plt>
cmpl   $0x0,-0x20(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
movq   $0x0,0x30(%rsp)
movq   $0x0,0x20(%rsp)
movq   $0x0,0x48(%rsp)
movq   $0x0,0x68(%rsp)
movq   $0x0,0x40(%rsp)
movq   $0x0,0x60(%rsp)
mov    0x2da2(%rip),%r15
mov    (%r15),%edi
call   10a0 <feof@plt>
movl   $0x0,0x14(%rsp)
mov    $0x0,%r14d
movl   $0x0,0x2c(%rsp)
test   %eax,%eax
je     12b1 <main+0xc1>
lea    0xed5(%rip),%rdi
mov    0x2c(%rsp),%esi
mov    %r14d,%edx
mov    0x14(%rsp),%ecx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x40(%rsp),%rdi
call   1040 <free@plt>
mov    0x48(%rsp),%rdi
call   1040 <free@plt>
mov    0x30(%rsp),%rdi
call   1040 <free@plt>
xor    %eax,%eax
test   %r14d,%r14d
setne  %al
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x30(%rsp),%rbx
lea    0x20(%rsp),%rbp
lea    0x18(%rsp),%r13
movl   $0x0,0x2c(%rsp)
xor    %r14d,%r14d
movl   $0x0,0x14(%rsp)
movl   $0x0,0xc(%rsp)
jmp    1320 <main+0x130>
addl   $0x1,0x14(%rsp)
mov    0xc(%rsp),%esi
add    $0x1,%esi
lea    0xd12(%rip),%rdi
mov    %esi,0xc(%rsp)
mov    %r13,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x10(%rsp),%r14d
lea    0x20(%rsp),%rbp
lea    0x18(%rsp),%r13
mov    (%r15),%edi
call   10a0 <feof@plt>
test   %eax,%eax
jne    1260 <main+0x70>
mov    (%r15),%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10e0 <getline@plt>
test   %eax,%eax
je     1310 <main+0x120>
cmp    $0xffffffff,%eax
je     1260 <main+0x70>
mov    0x30(%rsp),%rax
mov    %rax,0x18(%rsp)
mov    %r13,%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   10d0 <next_input@plt>
test   %rax,%rax
je     1310 <main+0x120>
mov    %r13,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <next_input@plt>
test   %rax,%rax
je     1310 <main+0x120>
mov    %rax,%r12
mov    %r13,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <next_input@plt>
mov    %r13,%rdi
test   %rax,%rax
je     13e8 <main+0x1f8>
mov    %rax,%r13
mov    %r14d,0x10(%rsp)
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <next_input@plt>
test   %rax,%rax
je     1301 <main+0x111>
mov    %rax,%rbp
mov    %rax,%rdi
lea    0xc58(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     13f5 <main+0x205>
mov    %rbp,%rdi
lea    0xd5c(%rip),%rsi
call   1060 <strcasecmp@plt>
test   %rax,%rax
je     13fa <main+0x20a>
mov    %rbp,%rdi
lea    0x58(%rsp),%rsi
xor    %edx,%edx
call   10b0 <strtol@plt>
mov    %eax,%r14d
mov    0x58(%rsp),%rax
cmpb   $0x0,(%rax)
jne    1301 <main+0x111>
jmp    1404 <main+0x214>
lea    0x20(%rsp),%rbp
mov    %rdi,%r13
jmp    1310 <main+0x120>
xor    %r14d,%r14d
jmp    1404 <main+0x214>
mov    0x2be7(%rip),%rax
mov    (%rax),%r14d
lea    0x18(%rsp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   10d0 <next_input@plt>
test   %rax,%rax
lea    0xc2c(%rip),%rcx
cmove  %rcx,%rax
mov    %rax,%rdi
call   1030 <convert_flags@plt>
cmp    $0xffffffff,%eax
je     1301 <main+0x111>
mov    %eax,%ebp
addl   $0x1,0x2c(%rsp)
mov    %r13,%rdi
call   10c0 <str_isalpha@plt>
test   %eax,%eax
je     12dd <main+0xed>
mov    %r12,%rdi
call   10c0 <str_isalpha@plt>
test   %eax,%eax
je     12dd <main+0xed>
mov    %r13,%rdi
mov    $0x2e,%esi
call   1050 <str_has_funk@plt>
test   %rax,%rax
jne    147f <main+0x28f>
mov    %r12,%rdi
mov    $0x2e,%esi
call   1050 <str_has_funk@plt>
test   %rax,%rax
je     1497 <main+0x2a7>
addl   $0x1,0x14(%rsp)
mov    0xc(%rsp),%esi
add    $0x1,%esi
lea    0xbba(%rip),%rdi
jmp    12f0 <main+0x100>
mov    %r13,%rdi
mov    $0x3d,%esi
call   1050 <str_has_funk@plt>
test   %rax,%rax
jne    14bb <main+0x2cb>
mov    %r12,%rdi
mov    $0x3d,%esi
call   1050 <str_has_funk@plt>
test   %rax,%rax
je     14d3 <main+0x2e3>
addl   $0x1,0x14(%rsp)
mov    0xc(%rsp),%esi
add    $0x1,%esi
lea    0xbcf(%rip),%rdi
jmp    12f0 <main+0x100>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
call   1080 <fnmatch@plt>
mov    %eax,0x3c(%rsp)
addl   $0x1,0xc(%rsp)
mov    %r13,%rdi
lea    0x60(%rsp),%rsi
lea    0x40(%rsp),%rdx
call   1110 <escape@plt>
mov    %rax,0x50(%rsp)
mov    %r12,%rdi
lea    0x68(%rsp),%rsi
lea    0x48(%rsp),%rdx
call   1110 <escape@plt>
mov    %rax,%r12
mov    %ebp,%edi
call   1100 <flag_output@plt>
mov    0x3c(%rsp),%ecx
mov    %rax,%rbp
lea    0xad6(%rip),%r9
test   %ecx,%ecx
je     1564 <main+0x374>
lea    0xbdf(%rip),%r9
mov    0x2aac(%rip),%rax
cmp    (%rax),%ecx
je     1564 <main+0x374>
mov    %r14d,%r13d
lea    0x70(%rsp),%rdi
lea    0xbd1(%rip),%rsi
mov    %ecx,%r14d
mov    %ecx,%edx
call   10f0 <sprintf@plt>
mov    %r14d,%ecx
lea    0x70(%rsp),%r9
mov    %r13d,%r14d
test   %ecx,%ecx
sete   %al
test   %r14d,%r14d
setne  %r13b
xor    %al,%r13b
mov    $0x20,%eax
mov    $0xa,%ecx
cmovne %ecx,%eax
mov    %eax,(%rsp)
lea    0xb65(%rip),%rdi
mov    0xc(%rsp),%esi
mov    0x50(%rsp),%rdx
mov    %r12,%rcx
mov    %rbp,%r8
xor    %eax,%eax
call   1070 <printf@plt>
test   %r13b,%r13b
jne    1301 <main+0x111>
lea    0xa50(%rip),%rsi
test   %r14d,%r14d
mov    %r14d,%edx
mov    0x10(%rsp),%r14d
lea    0x20(%rsp),%rbp
lea    0x18(%rsp),%r13
je     15f0 <main+0x400>
lea    0xb46(%rip),%rsi
mov    0x2a13(%rip),%rax
cmp    (%rax),%edx
je     15f0 <main+0x400>
lea    0x70(%rsp),%r12
mov    %r12,%rdi
lea    0xb38(%rip),%rsi
call   10f0 <sprintf@plt>
mov    %r12,%rsi
lea    0xb2c(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x1,%r14d
jmp    1310 <main+0x120>

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

LLVM IR (-O2):
@stdin = global i32 0
@.str = [2 x i8] c"0\00"
@.str.1 = [8 x i8] c"NOMATCH\00"
@FNM_NOMATCH = global i32 0
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [74 x i8] c"%3d: fnmatch (\22%s\22, \22%s\22): SKIP multibyte test (requires locale support)\0A\00"
@.str.4 = [81 x i8] c"%3d: fnmatch (\22%s\22, \22%s\22): SKIP collating symbol test (requires locale support)\0A\00"
@.str.5 = [82 x i8] c"%3d: fnmatch (\22%s\22, \22%s\22): SKIP equivalence class test (requires locale support)\0A\00"
@.str.6 = [37 x i8] c"%3d: fnmatch (\22%s\22, \22%s\22, %s) = %s%c\00"
@.str.7 = [12 x i8] c"FNM_NOMATCH\00"
@.str.8 = [3 x i8] c"%d\00"
@.str.9 = [25 x i8] c"(FAIL, expected %s) ***\0A\00"
@.str.10 = [58 x i8] c"=====================\0A%3d tests, %3d failed, %3d skipped\0A\00"
define i32 @main() {
%1 = alloca i8*
%2 = alloca i64
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca [24 x i8]
%9 = alloca i8*
%10 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%11 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%12 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%13 = bitcast i64* %4 to i8*
store i64 0, i64* %4
%14 = bitcast i8** %5 to i8*
store i8* null, i8** %5
%15 = bitcast i64* %6 to i8*
store i64 0, i64* %6
%16 = load i32, i32* @stdin
%17 = call i32 @feof(i32 %16)
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %132
19: ; preds = %0
%20 = bitcast i8** %7 to i8*
%21 = getelementptr inbounds [24 x i8], [24 x i8]* %8, i64 0, i64 0
%22 = bitcast i8** %9 to i8*
br label %23
23: ; preds = %19, %124
%24 = phi i32 [ 0, %19 ], [ %128, %124 ]
%25 = phi i32 [ 0, %19 ], [ %127, %124 ]
%26 = phi i32 [ 0, %19 ], [ %126, %124 ]
%27 = phi i32 [ 0, %19 ], [ %125, %124 ]
%28 = load i32, i32* @stdin
%29 = call i32 @getline(i8** %1, i64* %2, i32 %28)
switch i32 %29, label %31 [
i32 -1, label %30
i32 0, label %124
]
30: ; preds = %23
br label %132
31: ; preds = %23
%32 = load i8*, i8** %1
store i8* %32, i8** %7
%33 = call i8* @next_input(i8** %7, i32 1, i32 0)
%34 = icmp eq i8* %33, null
br i1 %34, label %124, label %35
35: ; preds = %31
%36 = call i8* @next_input(i8** %7, i32 0, i32 0)
%37 = icmp eq i8* %36, null
br i1 %37, label %124, label %38
38: ; preds = %35
%39 = call i8* @next_input(i8** %7, i32 0, i32 0)
%40 = icmp eq i8* %39, null
br i1 %40, label %124, label %41
41: ; preds = %38
%42 = call i8* @next_input(i8** %7, i32 0, i32 0)
%43 = icmp eq i8* %42, null
br i1 %43, label %124, label %44
44: ; preds = %41
%45 = call i64 @strcmp(i8* %42, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%46 = icmp eq i64 %45, 0
br i1 %46, label %57, label %47
47: ; preds = %44
%48 = call i64 @strcasecmp(i8* %42, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = load i32, i32* @FNM_NOMATCH
br label %57
52: ; preds = %47
%53 = call i32 @strtol(i8* %42, i8** %9, i32 0)
%54 = load i8*, i8** %9
%55 = load i8, i8* %54
%56 = icmp eq i8 %55, 0
br i1 %56, label %57, label %124
57: ; preds = %44, %50, %52
%58 = phi i32 [ %51, %50 ], [ %53, %52 ], [ 0, %44 ]
%59 = call i8* @next_input(i8** %7, i32 0, i32 1)
%60 = icmp eq i8* %59, null
%61 = select i1 %60, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* %59
%62 = call i32 @convert_flags(i8* %61)
%63 = icmp eq i32 %62, -1
br i1 %63, label %124, label %64
64: ; preds = %57
%65 = add nsw i32 %24, 1
%66 = call i32 @str_isalpha(i8* %39)
%67 = icmp eq i32 %66, 0
br i1 %67, label %71, label %68
68: ; preds = %64
%69 = call i32 @str_isalpha(i8* %36)
%70 = icmp eq i32 %69, 0
br i1 %70, label %71, label %75
71: ; preds = %68, %64
%72 = add nsw i32 %26, 1
%73 = add nsw i32 %27, 1
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str.3, i64 0, i64 0), i32 %73, i8* %39, i8* %36)
br label %124
75: ; preds = %68
%76 = call i64 @str_has_funk(i8* %39, i8 signext 46)
%77 = icmp eq i64 %76, 0
br i1 %77, label %78, label %81
78: ; preds = %75
%79 = call i64 @str_has_funk(i8* %36, i8 signext 46)
%80 = icmp eq i64 %79, 0
br i1 %80, label %85, label %81
81: ; preds = %78, %75
%82 = add nsw i32 %26, 1
%83 = add nsw i32 %27, 1
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.4, i64 0, i64 0), i32 %83, i8* %39, i8* %36)
br label %124
85: ; preds = %78
%86 = call i64 @str_has_funk(i8* %39, i8 signext 61)
%87 = icmp eq i64 %86, 0
br i1 %87, label %88, label %91
88: ; preds = %85
%89 = call i64 @str_has_funk(i8* %36, i8 signext 61)
%90 = icmp eq i64 %89, 0
br i1 %90, label %95, label %91
91: ; preds = %88, %85
%92 = add nsw i32 %26, 1
%93 = add nsw i32 %27, 1
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @.str.5, i64 0, i64 0), i32 %93, i8* %39, i8* %36)
br label %124
95: ; preds = %88
%96 = call i32 @fnmatch(i8* %39, i8* %36, i32 %62)
%97 = add nsw i32 %27, 1
%98 = call i8* @escape(i8* %39, i64* %6, i8** %5)
%99 = call i8* @escape(i8* %36, i64* %4, i8** %3)
%100 = call i8* @flag_output(i32 %62)
%101 = icmp eq i32 %96, 0
br i1 %101, label %107, label %102
102: ; preds = %95
%103 = load i32, i32* @FNM_NOMATCH
%104 = icmp eq i32 %96, %103
br i1 %104, label %107, label %105
105: ; preds = %102
%106 = call i8* @sprintf(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 %96)
br label %107
107: ; preds = %105, %102, %95
%108 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %95 ], [ %21, %105 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), %102 ]
%109 = icmp ne i32 %58, 0
%110 = xor i1 %109, %101
%111 = select i1 %110, i32 10, i32 32
%112 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i32 %97, i8* %98, i8* %99, i8* %100, i8* %108, i32 %111)
br i1 %110, label %124, label %113
113: ; preds = %107
%114 = icmp eq i32 %58, 0
br i1 %114, label %120, label %115
115: ; preds = %113
%116 = load i32, i32* @FNM_NOMATCH
%117 = icmp eq i32 %58, %116
br i1 %117, label %120, label %118
118: ; preds = %115
%119 = call i8* @sprintf(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 %58)
br label %120
120: ; preds = %118, %115, %113
%121 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %113 ], [ %21, %118 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), %115 ]
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i8* %121)
%123 = add nsw i32 %25, 1
br label %124
124: ; preds = %23, %107, %120, %57, %41, %38, %35, %31, %52, %91, %81, %71
%125 = phi i32 [ %83, %81 ], [ %93, %91 ], [ %73, %71 ], [ %27, %52 ], [ %27, %31 ], [ %27, %35 ], [ %27, %38 ], [ %27, %41 ], [ %27, %57 ], [ %97, %120 ], [ %97, %107 ], [ %27, %23 ]
%126 = phi i32 [ %82, %81 ], [ %92, %91 ], [ %72, %71 ], [ %26, %52 ], [ %26, %31 ], [ %26, %35 ], [ %26, %38 ], [ %26, %41 ], [ %26, %57 ], [ %26, %120 ], [ %26, %107 ], [ %26, %23 ]
%127 = phi i32 [ %25, %81 ], [ %25, %91 ], [ %25, %71 ], [ %25, %52 ], [ %25, %31 ], [ %25, %35 ], [ %25, %38 ], [ %25, %41 ], [ %25, %57 ], [ %123, %120 ], [ %25, %107 ], [ %25, %23 ]
%128 = phi i32 [ %65, %81 ], [ %65, %91 ], [ %65, %71 ], [ %24, %52 ], [ %24, %31 ], [ %24, %35 ], [ %24, %38 ], [ %24, %41 ], [ %24, %57 ], [ %65, %120 ], [ %65, %107 ], [ %24, %23 ]
%129 = load i32, i32* @stdin
%130 = call i32 @feof(i32 %129)
%131 = icmp eq i32 %130, 0
br i1 %131, label %23, label %132
132: ; preds = %124, %0, %30
%133 = phi i32 [ %26, %30 ], [ 0, %0 ], [ %126, %124 ]
%134 = phi i32 [ %25, %30 ], [ 0, %0 ], [ %127, %124 ]
%135 = phi i32 [ %24, %30 ], [ 0, %0 ], [ %128, %124 ]
%136 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.10, i64 0, i64 0), i32 %135, i32 %134, i32 %133)
%137 = load i8*, i8** %5
%138 = call i32 @free(i8* %137)
%139 = load i8*, i8** %3
%140 = call i32 @free(i8* %139)
%141 = load i8*, i8** %1
%142 = call i32 @free(i8* %141)
%143 = icmp ne i32 %134, 0
%144 = zext i1 %143 to i32
ret i32 %144
}