#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 EOF;
int fuzix_isalnum(int);
int fuzix_isalpha(int);
int fuzix_isascii(int);
int fuzix_isblank(int);
int fuzix_iscntrl(int);
int fuzix_isdigit(int);
int fuzix_isgraph(int);
int fuzix_islower(int);
int fuzix_isprint(int);
int fuzix_ispunct(int);
int fuzix_isspace(int);
int fuzix_isupper(int);
int fuzix_isxdigit(int);
int fuzix_tolower(int);
int fuzix_toupper(int);
int /*<<< orphan*/ printf(char *, ...);
int sys_isalnum(int);
int sys_isalpha(int);
int sys_isascii(int);
int sys_isblank(int);
int sys_iscntrl(int);
int sys_isdigit(int);
int sys_isgraph(int);
int sys_islower(int);
int sys_isprint(int);
int sys_ispunct(int);
int sys_isspace(int);
int sys_isupper(int);
int sys_isxdigit(int);
int sys_tolower(int);
int sys_toupper(int);
void test(int i) {
  if (!!sys_isalnum(i) != !!fuzix_isalnum(i))
    printf("FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\n", "isalnum", i,
           sys_isalnum(i), "isalnum", i, fuzix_isalnum(i));
  if (!!sys_isalpha(i) != !!fuzix_isalpha(i))
    printf("FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\n", "isalpha", i,
           sys_isalpha(i), "isalpha", i, fuzix_isalpha(i));
  if (!!sys_isascii(i) != !!fuzix_isascii(i))
    printf("FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\n", "isascii", i,
           sys_isascii(i), "isascii", i, fuzix_isascii(i));
  if (!!sys_isblank(i) != !!fuzix_isblank(i))
    printf("FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\n", "isblank", i,
           sys_isblank(i), "isblank", i, fuzix_isblank(i));
  if (!!sys_iscntrl(i) != !!fuzix_iscntrl(i))
    printf("FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\n", "iscntrl", i,
           sys_iscntrl(i), "iscntrl", i, fuzix_iscntrl(i));
  if (!!sys_isdigit(i) != !!fuzix_isdigit(i))
    printf("FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\n", "isdigit", i,
           sys_isdigit(i), "isdigit", i, fuzix_isdigit(i));
  if (!!sys_isgraph(i) != !!fuzix_isgraph(i))
    printf("FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\n", "isgraph", i,
           sys_isgraph(i), "isgraph", i, fuzix_isgraph(i));
  if (!!sys_islower(i) != !!fuzix_islower(i))
    printf("FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\n", "islower", i,
           sys_islower(i), "islower", i, fuzix_islower(i));
  if (!!sys_isprint(i) != !!fuzix_isprint(i))
    printf("FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\n", "isprint", i,
           sys_isprint(i), "isprint", i, fuzix_isprint(i));
  if (!!sys_ispunct(i) != !!fuzix_ispunct(i))
    printf("FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\n", "ispunct", i,
           sys_ispunct(i), "ispunct", i, fuzix_ispunct(i));
  if (!!sys_isspace(i) != !!fuzix_isspace(i))
    printf("FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\n", "isspace", i,
           sys_isspace(i), "isspace", i, fuzix_isspace(i));
  if (!!sys_isupper(i) != !!fuzix_isupper(i))
    printf("FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\n", "isupper", i,
           sys_isupper(i), "isupper", i, fuzix_isupper(i));
  if (!!sys_isxdigit(i) != !!fuzix_isxdigit(i))
    printf("FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\n", "isxdigit", i,
           sys_isxdigit(i), "isxdigit", i, fuzix_isxdigit(i));
  if (i != EOF) {
    if (sys_tolower(i) != fuzix_tolower(i))
      printf("FAIL sys_tolower(%d)=%d; fuzix_tolower(%d)=%d\n", i,
             sys_tolower(i), i, fuzix_tolower(i));
    if (sys_toupper(i) != fuzix_toupper(i))
      printf("FAIL sys_toupper(%d)=%d; fuzix_toupper(%d)=%d\n", i,
             sys_toupper(i), i, fuzix_toupper(i));
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1090 <sys_isalnum@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1140 <fuzix_isalnum@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     1383 <test+0x93>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
call   1090 <sys_isalnum@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1140 <fuzix_isalnum@plt>
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%r9d
lea    0xc91(%rip),%rdi
lea    0xcaf(%rip),%r8
mov    %r8,%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%edi
call   1170 <sys_isalpha@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   11a0 <fuzix_isalpha@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     1408 <test+0x118>
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%edi
call   1170 <sys_isalpha@plt>
mov    %eax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
call   11a0 <fuzix_isalpha@plt>
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%r9d
lea    0xc0c(%rip),%rdi
lea    0xc32(%rip),%r8
mov    %r8,%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%edi
call   10e0 <sys_isascii@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x28(%rbp)
mov    -0x4(%rbp),%edi
call   10f0 <fuzix_isascii@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     148d <test+0x19d>
mov    -0x4(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x4(%rbp),%edi
call   10e0 <sys_isascii@plt>
mov    %eax,-0x30(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x4(%rbp),%edi
call   10f0 <fuzix_isascii@plt>
mov    -0x34(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    -0x2c(%rbp),%r9d
lea    0xb87(%rip),%rdi
lea    0xbb5(%rip),%r8
mov    %r8,%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%edi
call   1110 <sys_isblank@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x38(%rbp)
mov    -0x4(%rbp),%edi
call   1130 <fuzix_isblank@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     1512 <test+0x222>
mov    -0x4(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x4(%rbp),%edi
call   1110 <sys_isblank@plt>
mov    %eax,-0x40(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x4(%rbp),%edi
call   1130 <fuzix_isblank@plt>
mov    -0x44(%rbp),%edx
mov    -0x40(%rbp),%ecx
mov    -0x3c(%rbp),%r9d
lea    0xb02(%rip),%rdi
lea    0xb38(%rip),%r8
mov    %r8,%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%edi
call   1070 <sys_iscntrl@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x48(%rbp)
mov    -0x4(%rbp),%edi
call   1160 <fuzix_iscntrl@plt>
mov    %eax,%ecx
mov    -0x48(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     1597 <test+0x2a7>
mov    -0x4(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x4(%rbp),%edi
call   1070 <sys_iscntrl@plt>
mov    %eax,-0x50(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4(%rbp),%edi
call   1160 <fuzix_iscntrl@plt>
mov    -0x54(%rbp),%edx
mov    -0x50(%rbp),%ecx
mov    -0x4c(%rbp),%r9d
lea    0xa7d(%rip),%rdi
lea    0xabb(%rip),%r8
mov    %r8,%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%edi
call   11c0 <sys_isdigit@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x58(%rbp)
mov    -0x4(%rbp),%edi
call   1080 <fuzix_isdigit@plt>
mov    %eax,%ecx
mov    -0x58(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     161c <test+0x32c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x4(%rbp),%edi
call   11c0 <sys_isdigit@plt>
mov    %eax,-0x60(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x4(%rbp),%edi
call   1080 <fuzix_isdigit@plt>
mov    -0x64(%rbp),%edx
mov    -0x60(%rbp),%ecx
mov    -0x5c(%rbp),%r9d
lea    0x9f8(%rip),%rdi
lea    0xa3e(%rip),%r8
mov    %r8,%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%edi
call   1030 <sys_isgraph@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x68(%rbp)
mov    -0x4(%rbp),%edi
call   1100 <fuzix_isgraph@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     16a1 <test+0x3b1>
mov    -0x4(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sys_isgraph@plt>
mov    %eax,-0x70(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x4(%rbp),%edi
call   1100 <fuzix_isgraph@plt>
mov    -0x74(%rbp),%edx
mov    -0x70(%rbp),%ecx
mov    -0x6c(%rbp),%r9d
lea    0x973(%rip),%rdi
lea    0x9c1(%rip),%r8
mov    %r8,%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%edi
call   1200 <sys_islower@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x78(%rbp)
mov    -0x4(%rbp),%edi
call   1180 <fuzix_islower@plt>
mov    %eax,%ecx
mov    -0x78(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     172c <test+0x43c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x4(%rbp),%edi
call   1200 <sys_islower@plt>
mov    %eax,-0x80(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x4(%rbp),%edi
call   1180 <fuzix_islower@plt>
mov    -0x84(%rbp),%edx
mov    -0x80(%rbp),%ecx
mov    -0x7c(%rbp),%r9d
lea    0x8e8(%rip),%rdi
lea    0x93e(%rip),%r8
mov    %r8,%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%edi
call   1210 <sys_isprint@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x88(%rbp)
mov    -0x4(%rbp),%edi
call   1150 <fuzix_isprint@plt>
mov    %eax,%ecx
mov    -0x88(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     17c9 <test+0x4d9>
mov    -0x4(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    -0x4(%rbp),%edi
call   1210 <sys_isprint@plt>
mov    %eax,-0x90(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x4(%rbp),%edi
call   1150 <fuzix_isprint@plt>
mov    -0x94(%rbp),%edx
mov    -0x90(%rbp),%ecx
mov    -0x8c(%rbp),%r9d
lea    0x84b(%rip),%rdi
lea    0x8a9(%rip),%r8
mov    %r8,%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%edi
call   10d0 <sys_ispunct@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x98(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <fuzix_ispunct@plt>
mov    %eax,%ecx
mov    -0x98(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     1866 <test+0x576>
mov    -0x4(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x4(%rbp),%edi
call   10d0 <sys_ispunct@plt>
mov    %eax,-0xa0(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <fuzix_ispunct@plt>
mov    -0xa4(%rbp),%edx
mov    -0xa0(%rbp),%ecx
mov    -0x9c(%rbp),%r9d
lea    0x7ae(%rip),%rdi
lea    0x814(%rip),%r8
mov    %r8,%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%edi
call   1120 <sys_isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xa8(%rbp)
mov    -0x4(%rbp),%edi
call   11f0 <fuzix_isspace@plt>
mov    %eax,%ecx
mov    -0xa8(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     1903 <test+0x613>
mov    -0x4(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0x4(%rbp),%edi
call   1120 <sys_isspace@plt>
mov    %eax,-0xb0(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xac(%rbp)
mov    -0x4(%rbp),%edi
call   11f0 <fuzix_isspace@plt>
mov    -0xb4(%rbp),%edx
mov    -0xb0(%rbp),%ecx
mov    -0xac(%rbp),%r9d
lea    0x711(%rip),%rdi
lea    0x77f(%rip),%r8
mov    %r8,%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%edi
call   1190 <sys_isupper@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xb8(%rbp)
mov    -0x4(%rbp),%edi
call   11b0 <fuzix_isupper@plt>
mov    %eax,%ecx
mov    -0xb8(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     19a0 <test+0x6b0>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc4(%rbp)
mov    -0x4(%rbp),%edi
call   1190 <sys_isupper@plt>
mov    %eax,-0xc0(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    -0x4(%rbp),%edi
call   11b0 <fuzix_isupper@plt>
mov    -0xc4(%rbp),%edx
mov    -0xc0(%rbp),%ecx
mov    -0xbc(%rbp),%r9d
lea    0x674(%rip),%rdi
lea    0x6ea(%rip),%r8
mov    %r8,%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%edi
call   11d0 <sys_isxdigit@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc8(%rbp)
mov    -0x4(%rbp),%edi
call   11e0 <fuzix_isxdigit@plt>
mov    %eax,%ecx
mov    -0xc8(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
je     1a3d <test+0x74d>
mov    -0x4(%rbp),%eax
mov    %eax,-0xd4(%rbp)
mov    -0x4(%rbp),%edi
call   11d0 <sys_isxdigit@plt>
mov    %eax,-0xd0(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xcc(%rbp)
mov    -0x4(%rbp),%edi
call   11e0 <fuzix_isxdigit@plt>
mov    -0xd4(%rbp),%edx
mov    -0xd0(%rbp),%ecx
mov    -0xcc(%rbp),%r9d
lea    0x5d7(%rip),%rdi
lea    0x655(%rip),%r8
mov    %r8,%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x25a1(%rip),%rcx
cmp    (%rcx),%eax
je     1b36 <test+0x846>
mov    -0x4(%rbp),%edi
call   1060 <sys_tolower@plt>
mov    %eax,-0xd8(%rbp)
mov    -0x4(%rbp),%edi
call   10b0 <fuzix_tolower@plt>
mov    %eax,%ecx
mov    -0xd8(%rbp),%eax
cmp    %ecx,%eax
je     1ac0 <test+0x7d0>
mov    -0x4(%rbp),%eax
mov    %eax,-0xe4(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <sys_tolower@plt>
mov    %eax,-0xe0(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xdc(%rbp)
mov    -0x4(%rbp),%edi
call   10b0 <fuzix_tolower@plt>
mov    -0xe4(%rbp),%esi
mov    -0xe0(%rbp),%edx
mov    -0xdc(%rbp),%ecx
mov    %eax,%r8d
lea    0x5d5(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <sys_toupper@plt>
mov    %eax,-0xe8(%rbp)
mov    -0x4(%rbp),%edi
call   10a0 <fuzix_toupper@plt>
mov    %eax,%ecx
mov    -0xe8(%rbp),%eax
cmp    %ecx,%eax
je     1b31 <test+0x841>
mov    -0x4(%rbp),%eax
mov    %eax,-0xf4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <sys_toupper@plt>
mov    %eax,-0xf0(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xec(%rbp)
mov    -0x4(%rbp),%edi
call   10a0 <fuzix_toupper@plt>
mov    -0xf4(%rbp),%esi
mov    -0xf0(%rbp),%edx
mov    -0xec(%rbp),%ecx
mov    %eax,%r8d
lea    0x593(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
jmp    1b36 <test+0x846>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1090 <sys_isalnum@plt>
test   %eax,%eax
sete   %bpl
mov    %ebx,%edi
call   1140 <fuzix_isalnum@plt>
test   %eax,%eax
setne  %al
xor    %bpl,%al
jne    1343 <test+0x53>
mov    %ebx,%edi
call   1090 <sys_isalnum@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1140 <fuzix_isalnum@plt>
mov    %eax,(%rsp)
lea    0xcd5(%rip),%rdi
lea    0xcf3(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %rsi,%r8
mov    %ebx,%r9d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %ebx,%edi
call   1170 <sys_isalpha@plt>
test   %eax,%eax
sete   %bpl
mov    %ebx,%edi
call   11a0 <fuzix_isalpha@plt>
test   %eax,%eax
setne  %al
xor    %bpl,%al
jne    1393 <test+0xa3>
mov    %ebx,%edi
call   1170 <sys_isalpha@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   11a0 <fuzix_isalpha@plt>
mov    %eax,(%rsp)
lea    0xc85(%rip),%rdi
lea    0xcab(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %rsi,%r8
mov    %ebx,%r9d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %ebx,%edi
call   10e0 <sys_isascii@plt>
test   %eax,%eax
sete   %bpl
mov    %ebx,%edi
call   10f0 <fuzix_isascii@plt>
test   %eax,%eax
setne  %al
xor    %bpl,%al
jne    13e3 <test+0xf3>
mov    %ebx,%edi
call   10e0 <sys_isascii@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   10f0 <fuzix_isascii@plt>
mov    %eax,(%rsp)
lea    0xc35(%rip),%rdi
lea    0xc63(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %rsi,%r8
mov    %ebx,%r9d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %ebx,%edi
call   1110 <sys_isblank@plt>
test   %eax,%eax
sete   %bpl
mov    %ebx,%edi
call   1130 <fuzix_isblank@plt>
test   %eax,%eax
setne  %al
xor    %bpl,%al
jne    1433 <test+0x143>
mov    %ebx,%edi
call   1110 <sys_isblank@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1130 <fuzix_isblank@plt>
mov    %eax,(%rsp)
lea    0xbe5(%rip),%rdi
lea    0xc1b(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %rsi,%r8
mov    %ebx,%r9d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %ebx,%edi
call   1070 <sys_iscntrl@plt>
test   %eax,%eax
sete   %bpl
mov    %ebx,%edi
call   1160 <fuzix_iscntrl@plt>
test   %eax,%eax
setne  %al
xor    %bpl,%al
jne    1483 <test+0x193>
mov    %ebx,%edi
call   1070 <sys_iscntrl@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1160 <fuzix_iscntrl@plt>
mov    %eax,(%rsp)
lea    0xb95(%rip),%rdi
lea    0xbd3(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %rsi,%r8
mov    %ebx,%r9d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %ebx,%edi
call   11c0 <sys_isdigit@plt>
test   %eax,%eax
sete   %bpl
mov    %ebx,%edi
call   1080 <fuzix_isdigit@plt>
test   %eax,%eax
setne  %al
xor    %bpl,%al
jne    14d3 <test+0x1e3>
mov    %ebx,%edi
call   11c0 <sys_isdigit@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1080 <fuzix_isdigit@plt>
mov    %eax,(%rsp)
lea    0xb45(%rip),%rdi
lea    0xb8b(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %rsi,%r8
mov    %ebx,%r9d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %ebx,%edi
call   1030 <sys_isgraph@plt>
test   %eax,%eax
sete   %bpl
mov    %ebx,%edi
call   1100 <fuzix_isgraph@plt>
test   %eax,%eax
setne  %al
xor    %bpl,%al
jne    1523 <test+0x233>
mov    %ebx,%edi
call   1030 <sys_isgraph@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1100 <fuzix_isgraph@plt>
mov    %eax,(%rsp)
lea    0xaf5(%rip),%rdi
lea    0xb43(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %rsi,%r8
mov    %ebx,%r9d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %ebx,%edi
call   1200 <sys_islower@plt>
test   %eax,%eax
sete   %bpl
mov    %ebx,%edi
call   1180 <fuzix_islower@plt>
test   %eax,%eax
setne  %al
xor    %bpl,%al
jne    1573 <test+0x283>
mov    %ebx,%edi
call   1200 <sys_islower@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1180 <fuzix_islower@plt>
mov    %eax,(%rsp)
lea    0xaa5(%rip),%rdi
lea    0xafb(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %rsi,%r8
mov    %ebx,%r9d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %ebx,%edi
call   1210 <sys_isprint@plt>
test   %eax,%eax
sete   %bpl
mov    %ebx,%edi
call   1150 <fuzix_isprint@plt>
test   %eax,%eax
setne  %al
xor    %bpl,%al
jne    15c3 <test+0x2d3>
mov    %ebx,%edi
call   1210 <sys_isprint@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1150 <fuzix_isprint@plt>
mov    %eax,(%rsp)
lea    0xa55(%rip),%rdi
lea    0xab3(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %rsi,%r8
mov    %ebx,%r9d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %ebx,%edi
call   10d0 <sys_ispunct@plt>
test   %eax,%eax
sete   %bpl
mov    %ebx,%edi
call   1050 <fuzix_ispunct@plt>
test   %eax,%eax
setne  %al
xor    %bpl,%al
jne    1613 <test+0x323>
mov    %ebx,%edi
call   10d0 <sys_ispunct@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1050 <fuzix_ispunct@plt>
mov    %eax,(%rsp)
lea    0xa05(%rip),%rdi
lea    0xa6b(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %rsi,%r8
mov    %ebx,%r9d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %ebx,%edi
call   1120 <sys_isspace@plt>
test   %eax,%eax
sete   %bpl
mov    %ebx,%edi
call   11f0 <fuzix_isspace@plt>
test   %eax,%eax
setne  %al
xor    %bpl,%al
jne    1663 <test+0x373>
mov    %ebx,%edi
call   1120 <sys_isspace@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   11f0 <fuzix_isspace@plt>
mov    %eax,(%rsp)
lea    0x9b5(%rip),%rdi
lea    0xa23(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %rsi,%r8
mov    %ebx,%r9d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %ebx,%edi
call   1190 <sys_isupper@plt>
test   %eax,%eax
sete   %bpl
mov    %ebx,%edi
call   11b0 <fuzix_isupper@plt>
test   %eax,%eax
setne  %al
xor    %bpl,%al
jne    16b3 <test+0x3c3>
mov    %ebx,%edi
call   1190 <sys_isupper@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   11b0 <fuzix_isupper@plt>
mov    %eax,(%rsp)
lea    0x965(%rip),%rdi
lea    0x9db(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %rsi,%r8
mov    %ebx,%r9d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %ebx,%edi
call   11d0 <sys_isxdigit@plt>
test   %eax,%eax
sete   %bpl
mov    %ebx,%edi
call   11e0 <fuzix_isxdigit@plt>
test   %eax,%eax
setne  %al
xor    %bpl,%al
jne    1703 <test+0x413>
mov    %ebx,%edi
call   11d0 <sys_isxdigit@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   11e0 <fuzix_isxdigit@plt>
mov    %eax,(%rsp)
lea    0x915(%rip),%rdi
lea    0x993(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %rsi,%r8
mov    %ebx,%r9d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    0x28de(%rip),%rax
cmp    %ebx,(%rax)
je     175d <test+0x46d>
mov    %ebx,%edi
call   1060 <sys_tolower@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   10b0 <fuzix_tolower@plt>
cmp    %eax,%ebp
je     1749 <test+0x459>
mov    %ebx,%edi
call   1060 <sys_tolower@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   10b0 <fuzix_tolower@plt>
lea    0x955(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %ebx,%edi
call   1040 <sys_toupper@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   10a0 <fuzix_toupper@plt>
cmp    %eax,%ebp
jne    1764 <test+0x474>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebx,%edi
call   1040 <sys_toupper@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   10a0 <fuzix_toupper@plt>
lea    0x942(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    10c0 <printf@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\0A\00"
@.str.1 = [8 x i8] c"isalnum\00"
@.str.2 = [8 x i8] c"isalpha\00"
@.str.3 = [8 x i8] c"isascii\00"
@.str.4 = [8 x i8] c"isblank\00"
@.str.5 = [8 x i8] c"iscntrl\00"
@.str.6 = [8 x i8] c"isdigit\00"
@.str.7 = [8 x i8] c"isgraph\00"
@.str.8 = [8 x i8] c"islower\00"
@.str.9 = [8 x i8] c"isprint\00"
@.str.10 = [8 x i8] c"ispunct\00"
@.str.11 = [8 x i8] c"isspace\00"
@.str.12 = [8 x i8] c"isupper\00"
@.str.13 = [9 x i8] c"isxdigit\00"
@EOF = global i32 0
@.str.14 = [47 x i8] c"FAIL sys_tolower(%d)=%d; fuzix_tolower(%d)=%d\0A\00"
@.str.15 = [47 x i8] c"FAIL sys_toupper(%d)=%d; fuzix_toupper(%d)=%d\0A\00"
define void @test(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sys_isalnum(i32 %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
%9 = load i32, i32* %2
%10 = call i32 @fuzix_isalnum(i32 %9)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
%15 = icmp ne i32 %8, %14
br i1 %15, label %16, label %24
16: ; preds = %1
%17 = load i32, i32* %2
%18 = load i32, i32* %2
%19 = call i32 @sys_isalnum(i32 %18)
%20 = load i32, i32* %2
%21 = load i32, i32* %2
%22 = call i32 @fuzix_isalnum(i32 %21)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32 %19, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %20, i32 %22)
br label %24
24: ; preds = %16, %1
%25 = load i32, i32* %2
%26 = call i32 @sys_isalpha(i32 %25)
%27 = icmp ne i32 %26, 0
%28 = xor i1 %27, true
%29 = xor i1 %28, true
%30 = zext i1 %29 to i32
%31 = load i32, i32* %2
%32 = call i32 @fuzix_isalpha(i32 %31)
%33 = icmp ne i32 %32, 0
%34 = xor i1 %33, true
%35 = xor i1 %34, true
%36 = zext i1 %35 to i32
%37 = icmp ne i32 %30, %36
br i1 %37, label %38, label %46
38: ; preds = %24
%39 = load i32, i32* %2
%40 = load i32, i32* %2
%41 = call i32 @sys_isalpha(i32 %40)
%42 = load i32, i32* %2
%43 = load i32, i32* %2
%44 = call i32 @fuzix_isalpha(i32 %43)
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %39, i32 %41, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %42, i32 %44)
br label %46
46: ; preds = %38, %24
%47 = load i32, i32* %2
%48 = call i32 @sys_isascii(i32 %47)
%49 = icmp ne i32 %48, 0
%50 = xor i1 %49, true
%51 = xor i1 %50, true
%52 = zext i1 %51 to i32
%53 = load i32, i32* %2
%54 = call i32 @fuzix_isascii(i32 %53)
%55 = icmp ne i32 %54, 0
%56 = xor i1 %55, true
%57 = xor i1 %56, true
%58 = zext i1 %57 to i32
%59 = icmp ne i32 %52, %58
br i1 %59, label %60, label %68
60: ; preds = %46
%61 = load i32, i32* %2
%62 = load i32, i32* %2
%63 = call i32 @sys_isascii(i32 %62)
%64 = load i32, i32* %2
%65 = load i32, i32* %2
%66 = call i32 @fuzix_isascii(i32 %65)
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %61, i32 %63, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %64, i32 %66)
br label %68
68: ; preds = %60, %46
%69 = load i32, i32* %2
%70 = call i32 @sys_isblank(i32 %69)
%71 = icmp ne i32 %70, 0
%72 = xor i1 %71, true
%73 = xor i1 %72, true
%74 = zext i1 %73 to i32
%75 = load i32, i32* %2
%76 = call i32 @fuzix_isblank(i32 %75)
%77 = icmp ne i32 %76, 0
%78 = xor i1 %77, true
%79 = xor i1 %78, true
%80 = zext i1 %79 to i32
%81 = icmp ne i32 %74, %80
br i1 %81, label %82, label %90
82: ; preds = %68
%83 = load i32, i32* %2
%84 = load i32, i32* %2
%85 = call i32 @sys_isblank(i32 %84)
%86 = load i32, i32* %2
%87 = load i32, i32* %2
%88 = call i32 @fuzix_isblank(i32 %87)
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %83, i32 %85, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %86, i32 %88)
br label %90
90: ; preds = %82, %68
%91 = load i32, i32* %2
%92 = call i32 @sys_iscntrl(i32 %91)
%93 = icmp ne i32 %92, 0
%94 = xor i1 %93, true
%95 = xor i1 %94, true
%96 = zext i1 %95 to i32
%97 = load i32, i32* %2
%98 = call i32 @fuzix_iscntrl(i32 %97)
%99 = icmp ne i32 %98, 0
%100 = xor i1 %99, true
%101 = xor i1 %100, true
%102 = zext i1 %101 to i32
%103 = icmp ne i32 %96, %102
br i1 %103, label %104, label %112
104: ; preds = %90
%105 = load i32, i32* %2
%106 = load i32, i32* %2
%107 = call i32 @sys_iscntrl(i32 %106)
%108 = load i32, i32* %2
%109 = load i32, i32* %2
%110 = call i32 @fuzix_iscntrl(i32 %109)
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 %105, i32 %107, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 %108, i32 %110)
br label %112
112: ; preds = %104, %90
%113 = load i32, i32* %2
%114 = call i32 @sys_isdigit(i32 %113)
%115 = icmp ne i32 %114, 0
%116 = xor i1 %115, true
%117 = xor i1 %116, true
%118 = zext i1 %117 to i32
%119 = load i32, i32* %2
%120 = call i32 @fuzix_isdigit(i32 %119)
%121 = icmp ne i32 %120, 0
%122 = xor i1 %121, true
%123 = xor i1 %122, true
%124 = zext i1 %123 to i32
%125 = icmp ne i32 %118, %124
br i1 %125, label %126, label %134
126: ; preds = %112
%127 = load i32, i32* %2
%128 = load i32, i32* %2
%129 = call i32 @sys_isdigit(i32 %128)
%130 = load i32, i32* %2
%131 = load i32, i32* %2
%132 = call i32 @fuzix_isdigit(i32 %131)
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 %127, i32 %129, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 %130, i32 %132)
br label %134
134: ; preds = %126, %112
%135 = load i32, i32* %2
%136 = call i32 @sys_isgraph(i32 %135)
%137 = icmp ne i32 %136, 0
%138 = xor i1 %137, true
%139 = xor i1 %138, true
%140 = zext i1 %139 to i32
%141 = load i32, i32* %2
%142 = call i32 @fuzix_isgraph(i32 %141)
%143 = icmp ne i32 %142, 0
%144 = xor i1 %143, true
%145 = xor i1 %144, true
%146 = zext i1 %145 to i32
%147 = icmp ne i32 %140, %146
br i1 %147, label %148, label %156
148: ; preds = %134
%149 = load i32, i32* %2
%150 = load i32, i32* %2
%151 = call i32 @sys_isgraph(i32 %150)
%152 = load i32, i32* %2
%153 = load i32, i32* %2
%154 = call i32 @fuzix_isgraph(i32 %153)
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %149, i32 %151, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %152, i32 %154)
br label %156
156: ; preds = %148, %134
%157 = load i32, i32* %2
%158 = call i32 @sys_islower(i32 %157)
%159 = icmp ne i32 %158, 0
%160 = xor i1 %159, true
%161 = xor i1 %160, true
%162 = zext i1 %161 to i32
%163 = load i32, i32* %2
%164 = call i32 @fuzix_islower(i32 %163)
%165 = icmp ne i32 %164, 0
%166 = xor i1 %165, true
%167 = xor i1 %166, true
%168 = zext i1 %167 to i32
%169 = icmp ne i32 %162, %168
br i1 %169, label %170, label %178
170: ; preds = %156
%171 = load i32, i32* %2
%172 = load i32, i32* %2
%173 = call i32 @sys_islower(i32 %172)
%174 = load i32, i32* %2
%175 = load i32, i32* %2
%176 = call i32 @fuzix_islower(i32 %175)
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %171, i32 %173, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %174, i32 %176)
br label %178
178: ; preds = %170, %156
%179 = load i32, i32* %2
%180 = call i32 @sys_isprint(i32 %179)
%181 = icmp ne i32 %180, 0
%182 = xor i1 %181, true
%183 = xor i1 %182, true
%184 = zext i1 %183 to i32
%185 = load i32, i32* %2
%186 = call i32 @fuzix_isprint(i32 %185)
%187 = icmp ne i32 %186, 0
%188 = xor i1 %187, true
%189 = xor i1 %188, true
%190 = zext i1 %189 to i32
%191 = icmp ne i32 %184, %190
br i1 %191, label %192, label %200
192: ; preds = %178
%193 = load i32, i32* %2
%194 = load i32, i32* %2
%195 = call i32 @sys_isprint(i32 %194)
%196 = load i32, i32* %2
%197 = load i32, i32* %2
%198 = call i32 @fuzix_isprint(i32 %197)
%199 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 %193, i32 %195, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 %196, i32 %198)
br label %200
200: ; preds = %192, %178
%201 = load i32, i32* %2
%202 = call i32 @sys_ispunct(i32 %201)
%203 = icmp ne i32 %202, 0
%204 = xor i1 %203, true
%205 = xor i1 %204, true
%206 = zext i1 %205 to i32
%207 = load i32, i32* %2
%208 = call i32 @fuzix_ispunct(i32 %207)
%209 = icmp ne i32 %208, 0
%210 = xor i1 %209, true
%211 = xor i1 %210, true
%212 = zext i1 %211 to i32
%213 = icmp ne i32 %206, %212
br i1 %213, label %214, label %222
214: ; preds = %200
%215 = load i32, i32* %2
%216 = load i32, i32* %2
%217 = call i32 @sys_ispunct(i32 %216)
%218 = load i32, i32* %2
%219 = load i32, i32* %2
%220 = call i32 @fuzix_ispunct(i32 %219)
%221 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i32 %215, i32 %217, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i32 %218, i32 %220)
br label %222
222: ; preds = %214, %200
%223 = load i32, i32* %2
%224 = call i32 @sys_isspace(i32 %223)
%225 = icmp ne i32 %224, 0
%226 = xor i1 %225, true
%227 = xor i1 %226, true
%228 = zext i1 %227 to i32
%229 = load i32, i32* %2
%230 = call i32 @fuzix_isspace(i32 %229)
%231 = icmp ne i32 %230, 0
%232 = xor i1 %231, true
%233 = xor i1 %232, true
%234 = zext i1 %233 to i32
%235 = icmp ne i32 %228, %234
br i1 %235, label %236, label %244
236: ; preds = %222
%237 = load i32, i32* %2
%238 = load i32, i32* %2
%239 = call i32 @sys_isspace(i32 %238)
%240 = load i32, i32* %2
%241 = load i32, i32* %2
%242 = call i32 @fuzix_isspace(i32 %241)
%243 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i32 %237, i32 %239, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i32 %240, i32 %242)
br label %244
244: ; preds = %236, %222
%245 = load i32, i32* %2
%246 = call i32 @sys_isupper(i32 %245)
%247 = icmp ne i32 %246, 0
%248 = xor i1 %247, true
%249 = xor i1 %248, true
%250 = zext i1 %249 to i32
%251 = load i32, i32* %2
%252 = call i32 @fuzix_isupper(i32 %251)
%253 = icmp ne i32 %252, 0
%254 = xor i1 %253, true
%255 = xor i1 %254, true
%256 = zext i1 %255 to i32
%257 = icmp ne i32 %250, %256
br i1 %257, label %258, label %266
258: ; preds = %244
%259 = load i32, i32* %2
%260 = load i32, i32* %2
%261 = call i32 @sys_isupper(i32 %260)
%262 = load i32, i32* %2
%263 = load i32, i32* %2
%264 = call i32 @fuzix_isupper(i32 %263)
%265 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %259, i32 %261, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %262, i32 %264)
br label %266
266: ; preds = %258, %244
%267 = load i32, i32* %2
%268 = call i32 @sys_isxdigit(i32 %267)
%269 = icmp ne i32 %268, 0
%270 = xor i1 %269, true
%271 = xor i1 %270, true
%272 = zext i1 %271 to i32
%273 = load i32, i32* %2
%274 = call i32 @fuzix_isxdigit(i32 %273)
%275 = icmp ne i32 %274, 0
%276 = xor i1 %275, true
%277 = xor i1 %276, true
%278 = zext i1 %277 to i32
%279 = icmp ne i32 %272, %278
br i1 %279, label %280, label %288
280: ; preds = %266
%281 = load i32, i32* %2
%282 = load i32, i32* %2
%283 = call i32 @sys_isxdigit(i32 %282)
%284 = load i32, i32* %2
%285 = load i32, i32* %2
%286 = call i32 @fuzix_isxdigit(i32 %285)
%287 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0), i32 %281, i32 %283, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0), i32 %284, i32 %286)
br label %288
288: ; preds = %280, %266
%289 = load i32, i32* %2
%290 = load i32, i32* @EOF
%291 = icmp ne i32 %289, %290
br i1 %291, label %292, label %321
292: ; preds = %288
%293 = load i32, i32* %2
%294 = call i32 @sys_tolower(i32 %293)
%295 = load i32, i32* %2
%296 = call i32 @fuzix_tolower(i32 %295)
%297 = icmp ne i32 %294, %296
br i1 %297, label %298, label %306
298: ; preds = %292
%299 = load i32, i32* %2
%300 = load i32, i32* %2
%301 = call i32 @sys_tolower(i32 %300)
%302 = load i32, i32* %2
%303 = load i32, i32* %2
%304 = call i32 @fuzix_tolower(i32 %303)
%305 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.14, i64 0, i64 0), i32 %299, i32 %301, i32 %302, i32 %304)
br label %306
306: ; preds = %298, %292
%307 = load i32, i32* %2
%308 = call i32 @sys_toupper(i32 %307)
%309 = load i32, i32* %2
%310 = call i32 @fuzix_toupper(i32 %309)
%311 = icmp ne i32 %308, %310
br i1 %311, label %312, label %320
312: ; preds = %306
%313 = load i32, i32* %2
%314 = load i32, i32* %2
%315 = call i32 @sys_toupper(i32 %314)
%316 = load i32, i32* %2
%317 = load i32, i32* %2
%318 = call i32 @fuzix_toupper(i32 %317)
%319 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.15, i64 0, i64 0), i32 %313, i32 %315, i32 %316, i32 %318)
br label %320
320: ; preds = %312, %306
br label %321
321: ; preds = %320, %288
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"FAIL sys_%s(%d)=%d; fuzix_%s(%d)=%d\0A\00"
@.str.1 = [8 x i8] c"isalnum\00"
@.str.2 = [8 x i8] c"isalpha\00"
@.str.3 = [8 x i8] c"isascii\00"
@.str.4 = [8 x i8] c"isblank\00"
@.str.5 = [8 x i8] c"iscntrl\00"
@.str.6 = [8 x i8] c"isdigit\00"
@.str.7 = [8 x i8] c"isgraph\00"
@.str.8 = [8 x i8] c"islower\00"
@.str.9 = [8 x i8] c"isprint\00"
@.str.10 = [8 x i8] c"ispunct\00"
@.str.11 = [8 x i8] c"isspace\00"
@.str.12 = [8 x i8] c"isupper\00"
@.str.13 = [9 x i8] c"isxdigit\00"
@EOF = global i32 0
@.str.14 = [47 x i8] c"FAIL sys_tolower(%d)=%d; fuzix_tolower(%d)=%d\0A\00"
@.str.15 = [47 x i8] c"FAIL sys_toupper(%d)=%d; fuzix_toupper(%d)=%d\0A\00"
define void @test(i32 %0) {
%2 = tail call i32 @sys_isalnum(i32 %0)
%3 = icmp eq i32 %2, 0
%4 = tail call i32 @fuzix_isalnum(i32 %0)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %3, %5
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = tail call i32 @sys_isalnum(i32 %0)
%9 = tail call i32 @fuzix_isalnum(i32 %0)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %9)
br label %11
11: ; preds = %7, %1
%12 = tail call i32 @sys_isalpha(i32 %0)
%13 = icmp eq i32 %12, 0
%14 = tail call i32 @fuzix_isalpha(i32 %0)
%15 = icmp ne i32 %14, 0
%16 = xor i1 %13, %15
br i1 %16, label %21, label %17
17: ; preds = %11
%18 = tail call i32 @sys_isalpha(i32 %0)
%19 = tail call i32 @fuzix_isalpha(i32 %0)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %0, i32 %18, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %0, i32 %19)
br label %21
21: ; preds = %17, %11
%22 = tail call i32 @sys_isascii(i32 %0)
%23 = icmp eq i32 %22, 0
%24 = tail call i32 @fuzix_isascii(i32 %0)
%25 = icmp ne i32 %24, 0
%26 = xor i1 %23, %25
br i1 %26, label %31, label %27
27: ; preds = %21
%28 = tail call i32 @sys_isascii(i32 %0)
%29 = tail call i32 @fuzix_isascii(i32 %0)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %0, i32 %28, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %0, i32 %29)
br label %31
31: ; preds = %27, %21
%32 = tail call i32 @sys_isblank(i32 %0)
%33 = icmp eq i32 %32, 0
%34 = tail call i32 @fuzix_isblank(i32 %0)
%35 = icmp ne i32 %34, 0
%36 = xor i1 %33, %35
br i1 %36, label %41, label %37
37: ; preds = %31
%38 = tail call i32 @sys_isblank(i32 %0)
%39 = tail call i32 @fuzix_isblank(i32 %0)
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %0, i32 %38, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %0, i32 %39)
br label %41
41: ; preds = %37, %31
%42 = tail call i32 @sys_iscntrl(i32 %0)
%43 = icmp eq i32 %42, 0
%44 = tail call i32 @fuzix_iscntrl(i32 %0)
%45 = icmp ne i32 %44, 0
%46 = xor i1 %43, %45
br i1 %46, label %51, label %47
47: ; preds = %41
%48 = tail call i32 @sys_iscntrl(i32 %0)
%49 = tail call i32 @fuzix_iscntrl(i32 %0)
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 %0, i32 %48, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 %0, i32 %49)
br label %51
51: ; preds = %47, %41
%52 = tail call i32 @sys_isdigit(i32 %0)
%53 = icmp eq i32 %52, 0
%54 = tail call i32 @fuzix_isdigit(i32 %0)
%55 = icmp ne i32 %54, 0
%56 = xor i1 %53, %55
br i1 %56, label %61, label %57
57: ; preds = %51
%58 = tail call i32 @sys_isdigit(i32 %0)
%59 = tail call i32 @fuzix_isdigit(i32 %0)
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 %0, i32 %58, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 %0, i32 %59)
br label %61
61: ; preds = %57, %51
%62 = tail call i32 @sys_isgraph(i32 %0)
%63 = icmp eq i32 %62, 0
%64 = tail call i32 @fuzix_isgraph(i32 %0)
%65 = icmp ne i32 %64, 0
%66 = xor i1 %63, %65
br i1 %66, label %71, label %67
67: ; preds = %61
%68 = tail call i32 @sys_isgraph(i32 %0)
%69 = tail call i32 @fuzix_isgraph(i32 %0)
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %0, i32 %68, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %0, i32 %69)
br label %71
71: ; preds = %67, %61
%72 = tail call i32 @sys_islower(i32 %0)
%73 = icmp eq i32 %72, 0
%74 = tail call i32 @fuzix_islower(i32 %0)
%75 = icmp ne i32 %74, 0
%76 = xor i1 %73, %75
br i1 %76, label %81, label %77
77: ; preds = %71
%78 = tail call i32 @sys_islower(i32 %0)
%79 = tail call i32 @fuzix_islower(i32 %0)
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %0, i32 %78, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %0, i32 %79)
br label %81
81: ; preds = %77, %71
%82 = tail call i32 @sys_isprint(i32 %0)
%83 = icmp eq i32 %82, 0
%84 = tail call i32 @fuzix_isprint(i32 %0)
%85 = icmp ne i32 %84, 0
%86 = xor i1 %83, %85
br i1 %86, label %91, label %87
87: ; preds = %81
%88 = tail call i32 @sys_isprint(i32 %0)
%89 = tail call i32 @fuzix_isprint(i32 %0)
%90 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 %0, i32 %88, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 %0, i32 %89)
br label %91
91: ; preds = %87, %81
%92 = tail call i32 @sys_ispunct(i32 %0)
%93 = icmp eq i32 %92, 0
%94 = tail call i32 @fuzix_ispunct(i32 %0)
%95 = icmp ne i32 %94, 0
%96 = xor i1 %93, %95
br i1 %96, label %101, label %97
97: ; preds = %91
%98 = tail call i32 @sys_ispunct(i32 %0)
%99 = tail call i32 @fuzix_ispunct(i32 %0)
%100 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i32 %0, i32 %98, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i32 %0, i32 %99)
br label %101
101: ; preds = %97, %91
%102 = tail call i32 @sys_isspace(i32 %0)
%103 = icmp eq i32 %102, 0
%104 = tail call i32 @fuzix_isspace(i32 %0)
%105 = icmp ne i32 %104, 0
%106 = xor i1 %103, %105
br i1 %106, label %111, label %107
107: ; preds = %101
%108 = tail call i32 @sys_isspace(i32 %0)
%109 = tail call i32 @fuzix_isspace(i32 %0)
%110 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i32 %0, i32 %108, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i32 %0, i32 %109)
br label %111
111: ; preds = %107, %101
%112 = tail call i32 @sys_isupper(i32 %0)
%113 = icmp eq i32 %112, 0
%114 = tail call i32 @fuzix_isupper(i32 %0)
%115 = icmp ne i32 %114, 0
%116 = xor i1 %113, %115
br i1 %116, label %121, label %117
117: ; preds = %111
%118 = tail call i32 @sys_isupper(i32 %0)
%119 = tail call i32 @fuzix_isupper(i32 %0)
%120 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %0, i32 %118, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %0, i32 %119)
br label %121
121: ; preds = %117, %111
%122 = tail call i32 @sys_isxdigit(i32 %0)
%123 = icmp eq i32 %122, 0
%124 = tail call i32 @fuzix_isxdigit(i32 %0)
%125 = icmp ne i32 %124, 0
%126 = xor i1 %123, %125
br i1 %126, label %131, label %127
127: ; preds = %121
%128 = tail call i32 @sys_isxdigit(i32 %0)
%129 = tail call i32 @fuzix_isxdigit(i32 %0)
%130 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0), i32 %0, i32 %128, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0), i32 %0, i32 %129)
br label %131
131: ; preds = %127, %121
%132 = load i32, i32* @EOF
%133 = icmp eq i32 %132, %0
br i1 %133, label %150, label %134
134: ; preds = %131
%135 = tail call i32 @sys_tolower(i32 %0)
%136 = tail call i32 @fuzix_tolower(i32 %0)
%137 = icmp eq i32 %135, %136
br i1 %137, label %142, label %138
138: ; preds = %134
%139 = tail call i32 @sys_tolower(i32 %0)
%140 = tail call i32 @fuzix_tolower(i32 %0)
%141 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.14, i64 0, i64 0), i32 %0, i32 %139, i32 %0, i32 %140)
br label %142
142: ; preds = %138, %134
%143 = tail call i32 @sys_toupper(i32 %0)
%144 = tail call i32 @fuzix_toupper(i32 %0)
%145 = icmp eq i32 %143, %144
br i1 %145, label %150, label %146
146: ; preds = %142
%147 = tail call i32 @sys_toupper(i32 %0)
%148 = tail call i32 @fuzix_toupper(i32 %0)
%149 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.15, i64 0, i64 0), i32 %0, i32 %147, i32 %0, i32 %148)
br label %150
150: ; preds = %142, %146, %131
ret void
}