#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 /*<<< orphan*/ mm;
typedef int /*<<< orphan*/ match;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcasecmp(char *, char *);
int strtol(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  unsigned char match[256];
  int i, max;
  int filt, mask, mode;
  int mam, manm;
  if (argc < 2) {
    printf("missing operation mode\n");
    exit(1);
  }
  if (!strcasecmp(argv[1], "MATCH")) {
    if (argc < 3) {
      printf("no matches given\n");
      exit(1);
    }
    memset(match, 0, sizeof(match));
    printf("searching filter settings for:");
    for (i = 2; i < argc; i++) {
      int l = strtol(argv[i], 0, 0);
      if (l < 0 || l > 255) {
        printf("allowed range 0-255 / 0x00-0xFF\n");
        exit(1);
      }
      match[l] = 1;
      printf(" 0x%02x", l);
    }
    printf("\n");
    max = 5;
    int mode = 0;
    for (mask = 0; mask < 256; mask++) {
      mam = mask & (~mode);
      manm = mask & ~(~mode);
      for (filt = 0; filt < 256; filt++) {
        int ok = 1, miss = 0;
        unsigned char mm[256];
        memset(mm, 0, sizeof(mm));
        for (i = 0; i < 256; i++) {
          int xxor = filt ^ i;
          if ((mam & xxor) || (manm && !(manm & xxor))) {
            if (match[i] != 0) {
              ok = 0;
              miss = 0;
              break;
            }
          } else {
            if (match[i] != 1) {
              ok = 0;
              miss++;
              mm[i] = 1;
              if (miss > max)
                break;
            }
          }
        }
        if (ok) {
          printf("found exact settings filt=%02x mask=%02x mode=%02x\n", filt,
                 mask, mode);
          exit(0);
        } else if (miss > 0 && miss <= max) {
          printf("mismatching");
          for (i = 0; i < 256; i++)
            if (mm[i])
              printf(" %02x", i);
          printf(" - settings filt=%02x mask=%02x mode=%02x\n", filt, mask,
                 mode);
          max = miss;
        }
      }
    }
    printf("no exact settings found\n");
    exit(1);
  } else if (!strcasecmp(argv[1], "TEST")) {
    if (argc < 5) {
      printf("missing arguments\n");
      exit(1);
    }
    filt = strtol(argv[2], 0, 0);
    if (filt < 0 || filt > 255) {
      printf("filter range 0-255 exceeded\n");
      exit(1);
    }
    mask = strtol(argv[3], 0, 0);
    if (mask < 0 || mask > 255) {
      printf("mask range 0-255 exceeded\n");
      exit(1);
    }
    mode = strtol(argv[4], 0, 0);
    if (mode < 0 || mode > 255) {
      printf("mode range 0-255 exceeded\n");
      exit(1);
    }
    printf("settings file=%02x mask=%02x mode=%02x\n", filt, mask, mode);
    mam = mask & (~mode);
    manm = mask & ~(~mode);
    printf("matching:");
    for (i = 0; i < 256; i++) {
      int xxor = filt ^ i;
      if ((mam & xxor) || (manm && !(manm & xxor))) {
      } else
        printf(" %02x", i);
    }
    printf("\n");
  } else {
    printf("unknown operation mode\n");
  }
  exit(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x250,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    118b <main+0x3b>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe7e(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1587 <main+0x437>
cmpl   $0x3,-0x8(%rbp)
jge    11ca <main+0x7a>
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1050 <memset@plt>
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x2,-0x114(%rbp)
mov    -0x114(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    128e <main+0x13e>
mov    -0x10(%rbp),%rax
movslq -0x114(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1060 <strtol@plt>
mov    %eax,-0x130(%rbp)
cmpl   $0x0,-0x130(%rbp)
jl     123f <main+0xef>
cmpl   $0xff,-0x130(%rbp)
jle    1257 <main+0x107>
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
movslq -0x130(%rbp),%rax
movb   $0x1,-0x110(%rbp,%rax,1)
01
mov    -0x130(%rbp),%esi
lea    0xdfd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x114(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
jmp    11f5 <main+0xa5>
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x5,-0x118(%rbp)
movl   $0x0,-0x134(%rbp)
movl   $0x0,-0x120(%rbp)
cmpl   $0x100,-0x120(%rbp)
jge    156f <main+0x41f>
mov    -0x120(%rbp),%eax
mov    -0x134(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x128(%rbp)
mov    -0x120(%rbp),%eax
mov    -0x134(%rbp),%ecx
xor    $0xffffffff,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x12c(%rbp)
movl   $0x0,-0x11c(%rbp)
cmpl   $0x100,-0x11c(%rbp)
jge    1556 <main+0x406>
movl   $0x1,-0x138(%rbp)
movl   $0x0,-0x13c(%rbp)
lea    -0x240(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1050 <memset@plt>
movl   $0x0,-0x114(%rbp)
cmpl   $0x100,-0x114(%rbp)
jge    144f <main+0x2ff>
mov    -0x11c(%rbp),%eax
xor    -0x114(%rbp),%eax
mov    %eax,-0x244(%rbp)
mov    -0x128(%rbp),%eax
and    -0x244(%rbp),%eax
cmp    $0x0,%eax
jne    139f <main+0x24f>
cmpl   $0x0,-0x12c(%rbp)
je     13d5 <main+0x285>
mov    -0x12c(%rbp),%eax
and    -0x244(%rbp),%eax
cmp    $0x0,%eax
jne    13d5 <main+0x285>
movslq -0x114(%rbp),%rax
movzbl -0x110(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     13d0 <main+0x280>
movl   $0x0,-0x138(%rbp)
movl   $0x0,-0x13c(%rbp)
jmp    144f <main+0x2ff>
jmp    1436 <main+0x2e6>
movslq -0x114(%rbp),%rax
movzbl -0x110(%rbp,%rax,1),%eax
ff
cmp    $0x1,%eax
je     1431 <main+0x2e1>
movl   $0x0,-0x138(%rbp)
mov    -0x13c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x13c(%rbp)
movslq -0x114(%rbp),%rax
movb   $0x1,-0x240(%rbp,%rax,1)
01
mov    -0x13c(%rbp),%eax
cmp    -0x118(%rbp),%eax
jle    142c <main+0x2dc>
jmp    144f <main+0x2ff>
jmp    1431 <main+0x2e1>
jmp    1436 <main+0x2e6>
jmp    143b <main+0x2eb>
mov    -0x114(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
jmp    1346 <main+0x1f6>
cmpl   $0x0,-0x138(%rbp)
je     1483 <main+0x333>
mov    -0x11c(%rbp),%esi
mov    -0x120(%rbp),%edx
mov    -0x134(%rbp),%ecx
lea    0xc03(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>
cmpl   $0x0,-0x13c(%rbp)
jle    1538 <main+0x3e8>
mov    -0x13c(%rbp),%eax
cmp    -0x118(%rbp),%eax
jg     1538 <main+0x3e8>
lea    0xc03(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x114(%rbp)
cmpl   $0x100,-0x114(%rbp)
jge    150c <main+0x3bc>
movslq -0x114(%rbp),%rax
cmpb   $0x0,-0x240(%rbp,%rax,1)
je     14f3 <main+0x3a3>
mov    -0x114(%rbp),%esi
lea    0xbcc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14f8 <main+0x3a8>
mov    -0x114(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
jmp    14ba <main+0x36a>
mov    -0x11c(%rbp),%esi
mov    -0x120(%rbp),%edx
mov    -0x134(%rbp),%ecx
lea    0xb99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x13c(%rbp),%eax
mov    %eax,-0x118(%rbp)
jmp    153d <main+0x3ed>
jmp    1542 <main+0x3f2>
mov    -0x11c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x11c(%rbp)
jmp    1305 <main+0x1b5>
jmp    155b <main+0x40b>
mov    -0x120(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x120(%rbp)
jmp    12ba <main+0x16a>
lea    0xb73(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xb6c(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    17b1 <main+0x661>
cmpl   $0x5,-0x8(%rbp)
jge    15c6 <main+0x476>
lea    0xb52(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1060 <strtol@plt>
mov    %eax,-0x11c(%rbp)
cmpl   $0x0,-0x11c(%rbp)
jl     15fa <main+0x4aa>
cmpl   $0xff,-0x11c(%rbp)
jle    1612 <main+0x4c2>
lea    0xb19(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1060 <strtol@plt>
mov    %eax,-0x120(%rbp)
cmpl   $0x0,-0x120(%rbp)
jl     1646 <main+0x4f6>
cmpl   $0xff,-0x120(%rbp)
jle    165e <main+0x50e>
lea    0xaea(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1060 <strtol@plt>
mov    %eax,-0x124(%rbp)
cmpl   $0x0,-0x124(%rbp)
jl     1692 <main+0x542>
cmpl   $0xff,-0x124(%rbp)
jle    16aa <main+0x55a>
lea    0xab9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x11c(%rbp),%esi
mov    -0x120(%rbp),%edx
mov    -0x124(%rbp),%ecx
lea    0xaaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x120(%rbp),%eax
mov    -0x124(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x128(%rbp)
mov    -0x120(%rbp),%eax
mov    -0x124(%rbp),%ecx
xor    $0xffffffff,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x12c(%rbp)
lea    0xa93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x114(%rbp)
cmpl   $0x100,-0x114(%rbp)
jge    179e <main+0x64e>
mov    -0x11c(%rbp),%eax
xor    -0x114(%rbp),%eax
mov    %eax,-0x248(%rbp)
mov    -0x128(%rbp),%eax
and    -0x248(%rbp),%eax
cmp    $0x0,%eax
jne    176c <main+0x61c>
cmpl   $0x0,-0x12c(%rbp)
je     1771 <main+0x621>
mov    -0x12c(%rbp),%eax
and    -0x248(%rbp),%eax
cmp    $0x0,%eax
jne    1771 <main+0x621>
jmp    1785 <main+0x635>
mov    -0x114(%rbp),%esi
lea    0x93a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    178a <main+0x63a>
mov    -0x114(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
jmp    1713 <main+0x5c3>
lea    0x8c9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    17bf <main+0x66f>
lea    0x9e7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    17c4 <main+0x674>
mov    $0x1,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x208,%rsp
cmp    $0x1,%edi
jg     1192 <main+0x22>
lea    0x100a(%rip),%rdi
jmp    13c4 <main+0x254>
mov    %rsi,%r15
mov    %edi,%ebp
mov    0x8(%rsi),%r14
lea    0xe5e(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    11bf <main+0x4f>
cmp    $0x2,%ebp
ja     11eb <main+0x7b>
lea    0xf53(%rip),%rdi
jmp    13c4 <main+0x254>
lea    0xed8(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    1397 <main+0x227>
cmp    $0x4,%ebp
ja     13a0 <main+0x230>
lea    0xf88(%rip),%rdi
jmp    13c4 <main+0x254>
lea    0x100(%rsp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1070 <memset@plt>
lea    0xe00(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebp,%ebx
mov    $0x2,%ebp
lea    0xe0a(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbp,8),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1080 <strtol@plt>
cmp    $0x100,%eax
jae    13bd <main+0x24d>
mov    %eax,%ecx
movb   $0x1,0x100(%rsp,%rcx,1)
01
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1220 <main+0xb0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x5,%r15d
lea    0xdff(%rip),%r13
xor    %ebx,%ebx
jmp    128f <main+0x11f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x100,%ebx
je     14b4 <main+0x344>
xor    %ebp,%ebp
jmp    12c2 <main+0x152>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xdcc(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r12d,%r15d
add    $0x1,%ebp
cmp    $0x100,%ebp
je     1280 <main+0x110>
xor    %r14d,%r14d
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1070 <memset@plt>
xor    %eax,%eax
xor    %ecx,%ecx
add    $0x1,%r14
jmp    12f2 <main+0x182>
xchg   %ax,%ax
cmp    $0x1,%dl
jne    130b <main+0x19b>
add    $0x1,%r14
cmp    $0x101,%r14
je     1330 <main+0x1c0>
lea    -0x1(%r14),%esi
xor    %ebp,%esi
movzbl 0xff(%rsp,%r14,1),%edx
test   %ebx,%esi
je     12e0 <main+0x170>
test   %dl,%dl
je     12e5 <main+0x175>
jmp    12b7 <main+0x147>
lea    0x1(%rax),%r12d
movb   $0x1,-0x1(%rsp,%r14,1)
cmp    %r15d,%eax
jge    133c <main+0x1cc>
mov    $0x1,%cl
mov    %r12d,%eax
cmp    $0x100,%r14
jne    12d8 <main+0x168>
jmp    133c <main+0x1cc>
nopw   0x0(%rax,%rax,1)
mov    %eax,%r12d
test   $0x1,%cl
je     13d3 <main+0x263>
test   %r12d,%r12d
jle    12b7 <main+0x147>
cmp    %r15d,%r12d
jg     12b7 <main+0x147>
lea    0xd0c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %r15d,%r15d
jmp    1381 <main+0x211>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r15
cmp    $0x100,%r15
je     12a0 <main+0x130>
cmpb   $0x0,(%rsp,%r15,1)
je     1370 <main+0x200>
mov    %r13,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1370 <main+0x200>
lea    0xde2(%rip),%rdi
jmp    13c4 <main+0x254>
mov    0x10(%r15),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1080 <strtol@plt>
cmp    $0x100,%eax
jb     13ee <main+0x27e>
lea    0xd97(%rip),%rdi
jmp    13c4 <main+0x254>
lea    0xd29(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
lea    0xc53(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>
mov    %eax,%r12d
mov    0x18(%r15),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1080 <strtol@plt>
cmp    $0x100,%eax
jb     140e <main+0x29e>
lea    0xd2c(%rip),%rdi
jmp    13c4 <main+0x254>
mov    %eax,%r14d
mov    0x20(%r15),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1080 <strtol@plt>
cmp    $0x100,%eax
jb     142e <main+0x2be>
lea    0xcf2(%rip),%rdi
jmp    13c4 <main+0x254>
mov    %eax,%r15d
lea    0xc6b(%rip),%rdi
mov    %r12d,%esi
mov    %r14d,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15d,%ebp
not    %ebp
and    %r14d,%ebp
and    %r14d,%r15d
lea    0xc72(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc06(%rip),%r14
xor    %ebx,%ebx
jmp    148b <main+0x31b>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebx
cmp    $0x100,%ebx
je     14a0 <main+0x330>
mov    %ebx,%eax
xor    %r12d,%eax
test   %eax,%ebp
jne    1480 <main+0x310>
test   %r15d,%r15d
je     146b <main+0x2fb>
and    %r15d,%eax
je     1480 <main+0x310>
jmp    146b <main+0x2fb>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
lea    0xc1a(%rip),%rdi
jmp    13c4 <main+0x254>

LLVM IR (-O0):
@.str = [24 x i8] c"missing operation mode\0A\00"
@.str.1 = [6 x i8] c"MATCH\00"
@.str.2 = [18 x i8] c"no matches given\0A\00"
@.str.3 = [31 x i8] c"searching filter settings for:\00"
@.str.4 = [33 x i8] c"allowed range 0-255 / 0x00-0xFF\0A\00"
@.str.5 = [8 x i8] c" 0x%02x\00"
@.str.6 = [2 x i8] c"\0A\00"
@.str.7 = [52 x i8] c"found exact settings filt=%02x mask=%02x mode=%02x\0A\00"
@.str.8 = [12 x i8] c"mismatching\00"
@.str.9 = [6 x i8] c" %02x\00"
@.str.10 = [43 x i8] c" - settings filt=%02x mask=%02x mode=%02x\0A\00"
@.str.11 = [25 x i8] c"no exact settings found\0A\00"
@.str.12 = [5 x i8] c"TEST\00"
@.str.13 = [19 x i8] c"missing arguments\0A\00"
@.str.14 = [29 x i8] c"filter range 0-255 exceeded\0A\00"
@.str.15 = [27 x i8] c"mask range 0-255 exceeded\0A\00"
@.str.16 = [27 x i8] c"mode range 0-255 exceeded\0A\00"
@.str.17 = [40 x i8] c"settings file=%02x mask=%02x mode=%02x\0A\00"
@.str.18 = [10 x i8] c"matching:\00"
@.str.19 = [24 x i8] c"unknown operation mode\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [256 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca [256 x i8]
%19 = alloca i32
%20 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%21 = load i32, i32* %4
%22 = icmp slt i32 %21, 2
br i1 %22, label %23, label %26
23: ; preds = %2
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%25 = call i32 @exit(i32 1)
unreachable
26: ; preds = %2
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = call i32 @strcasecmp(i8* %29, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%31 = icmp ne i32 %30, 0
br i1 %31, label %194, label %32
32: ; preds = %26
%33 = load i32, i32* %4
%34 = icmp slt i32 %33, 3
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%37 = call i32 @exit(i32 1)
unreachable
38: ; preds = %32
%39 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%40 = call i32 @memset(i8* %39, i32 0, i32 256)
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
store i32 2, i32* %7
br label %42
42: ; preds = %67, %38
%43 = load i32, i32* %7
%44 = load i32, i32* %4
%45 = icmp slt i32 %43, %44
br i1 %45, label %46, label %70
46: ; preds = %42
%47 = load i8**, i8*** %5
%48 = load i32, i32* %7
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8*, i8** %47, i64 %49
%51 = load i8*, i8** %50
%52 = call i32 @strtol(i8* %51, i32 0, i32 0)
store i32 %52, i32* %14
%53 = load i32, i32* %14
%54 = icmp slt i32 %53, 0
br i1 %54, label %58, label %55
55: ; preds = %46
%56 = load i32, i32* %14
%57 = icmp sgt i32 %56, 255
br i1 %57, label %58, label %61
58: ; preds = %55, %46
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%60 = call i32 @exit(i32 1)
unreachable
61: ; preds = %55
%62 = load i32, i32* %14
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 %63
store i8 1, i8* %64
%65 = load i32, i32* %14
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 %65)
br label %67
67: ; preds = %61
%68 = load i32, i32* %7
%69 = add nsw i32 %68, 1
store i32 %69, i32* %7
br label %42
70: ; preds = %42
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32 5, i32* %8
store i32 0, i32* %15
store i32 0, i32* %10
br label %72
72: ; preds = %188, %70
%73 = load i32, i32* %10
%74 = icmp slt i32 %73, 256
br i1 %74, label %75, label %191
75: ; preds = %72
%76 = load i32, i32* %10
%77 = load i32, i32* %15
%78 = xor i32 %77, -1
%79 = and i32 %76, %78
store i32 %79, i32* %12
%80 = load i32, i32* %10
%81 = load i32, i32* %15
%82 = xor i32 %81, -1
%83 = xor i32 %82, -1
%84 = and i32 %80, %83
store i32 %84, i32* %13
store i32 0, i32* %9
br label %85
85: ; preds = %184, %75
%86 = load i32, i32* %9
%87 = icmp slt i32 %86, 256
br i1 %87, label %88, label %187
88: ; preds = %85
store i32 1, i32* %16
store i32 0, i32* %17
%89 = getelementptr inbounds [256 x i8], [256 x i8]* %18, i64 0, i64 0
%90 = call i32 @memset(i8* %89, i32 0, i32 256)
store i32 0, i32* %7
br label %91
91: ; preds = %139, %88
%92 = load i32, i32* %7
%93 = icmp slt i32 %92, 256
br i1 %93, label %94, label %142
94: ; preds = %91
%95 = load i32, i32* %9
%96 = load i32, i32* %7
%97 = xor i32 %95, %96
store i32 %97, i32* %19
%98 = load i32, i32* %12
%99 = load i32, i32* %19
%100 = and i32 %98, %99
%101 = icmp ne i32 %100, 0
br i1 %101, label %110, label %102
102: ; preds = %94
%103 = load i32, i32* %13
%104 = icmp ne i32 %103, 0
br i1 %104, label %105, label %119
105: ; preds = %102
%106 = load i32, i32* %13
%107 = load i32, i32* %19
%108 = and i32 %106, %107
%109 = icmp ne i32 %108, 0
br i1 %109, label %119, label %110
110: ; preds = %105, %94
%111 = load i32, i32* %7
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 %112
%114 = load i8, i8* %113
%115 = zext i8 %114 to i32
%116 = icmp ne i32 %115, 0
br i1 %116, label %117, label %118
117: ; preds = %110
store i32 0, i32* %16
store i32 0, i32* %17
br label %142
118: ; preds = %110
br label %138
119: ; preds = %105, %102
%120 = load i32, i32* %7
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 %121
%123 = load i8, i8* %122
%124 = zext i8 %123 to i32
%125 = icmp ne i32 %124, 1
br i1 %125, label %126, label %137
126: ; preds = %119
store i32 0, i32* %16
%127 = load i32, i32* %17
%128 = add nsw i32 %127, 1
store i32 %128, i32* %17
%129 = load i32, i32* %7
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [256 x i8], [256 x i8]* %18, i64 0, i64 %130
store i8 1, i8* %131
%132 = load i32, i32* %17
%133 = load i32, i32* %8
%134 = icmp sgt i32 %132, %133
br i1 %134, label %135, label %136
135: ; preds = %126
br label %142
136: ; preds = %126
br label %137
137: ; preds = %136, %119
br label %138
138: ; preds = %137, %118
br label %139
139: ; preds = %138
%140 = load i32, i32* %7
%141 = add nsw i32 %140, 1
store i32 %141, i32* %7
br label %91
142: ; preds = %135, %117, %91
%143 = load i32, i32* %16
%144 = icmp ne i32 %143, 0
br i1 %144, label %145, label %151
145: ; preds = %142
%146 = load i32, i32* %9
%147 = load i32, i32* %10
%148 = load i32, i32* %15
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.7, i64 0, i64 0), i32 %146, i32 %147, i32 %148)
%150 = call i32 @exit(i32 0)
unreachable
151: ; preds = %142
%152 = load i32, i32* %17
%153 = icmp sgt i32 %152, 0
br i1 %153, label %154, label %182
154: ; preds = %151
%155 = load i32, i32* %17
%156 = load i32, i32* %8
%157 = icmp sle i32 %155, %156
br i1 %157, label %158, label %182
158: ; preds = %154
%159 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %7
br label %160
160: ; preds = %173, %158
%161 = load i32, i32* %7
%162 = icmp slt i32 %161, 256
br i1 %162, label %163, label %176
163: ; preds = %160
%164 = load i32, i32* %7
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [256 x i8], [256 x i8]* %18, i64 0, i64 %165
%167 = load i8, i8* %166
%168 = icmp ne i8 %167, 0
br i1 %168, label %169, label %172
169: ; preds = %163
%170 = load i32, i32* %7
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %170)
br label %172
172: ; preds = %169, %163
br label %173
173: ; preds = %172
%174 = load i32, i32* %7
%175 = add nsw i32 %174, 1
store i32 %175, i32* %7
br label %160
176: ; preds = %160
%177 = load i32, i32* %9
%178 = load i32, i32* %10
%179 = load i32, i32* %15
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.10, i64 0, i64 0), i32 %177, i32 %178, i32 %179)
%181 = load i32, i32* %17
store i32 %181, i32* %8
br label %182
182: ; preds = %176, %154, %151
br label %183
183: ; preds = %182
br label %184
184: ; preds = %183
%185 = load i32, i32* %9
%186 = add nsw i32 %185, 1
store i32 %186, i32* %9
br label %85
187: ; preds = %85
br label %188
188: ; preds = %187
%189 = load i32, i32* %10
%190 = add nsw i32 %189, 1
store i32 %190, i32* %10
br label %72
191: ; preds = %72
%192 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))
%193 = call i32 @exit(i32 1)
unreachable
194: ; preds = %26
%195 = load i8**, i8*** %5
%196 = getelementptr inbounds i8*, i8** %195, i64 1
%197 = load i8*, i8** %196
%198 = call i32 @strcasecmp(i8* %197, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%199 = icmp ne i32 %198, 0
br i1 %199, label %289, label %200
200: ; preds = %194
%201 = load i32, i32* %4
%202 = icmp slt i32 %201, 5
br i1 %202, label %203, label %206
203: ; preds = %200
%204 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0))
%205 = call i32 @exit(i32 1)
unreachable
206: ; preds = %200
%207 = load i8**, i8*** %5
%208 = getelementptr inbounds i8*, i8** %207, i64 2
%209 = load i8*, i8** %208
%210 = call i32 @strtol(i8* %209, i32 0, i32 0)
store i32 %210, i32* %9
%211 = load i32, i32* %9
%212 = icmp slt i32 %211, 0
br i1 %212, label %216, label %213
213: ; preds = %206
%214 = load i32, i32* %9
%215 = icmp sgt i32 %214, 255
br i1 %215, label %216, label %219
216: ; preds = %213, %206
%217 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0))
%218 = call i32 @exit(i32 1)
unreachable
219: ; preds = %213
%220 = load i8**, i8*** %5
%221 = getelementptr inbounds i8*, i8** %220, i64 3
%222 = load i8*, i8** %221
%223 = call i32 @strtol(i8* %222, i32 0, i32 0)
store i32 %223, i32* %10
%224 = load i32, i32* %10
%225 = icmp slt i32 %224, 0
br i1 %225, label %229, label %226
226: ; preds = %219
%227 = load i32, i32* %10
%228 = icmp sgt i32 %227, 255
br i1 %228, label %229, label %232
229: ; preds = %226, %219
%230 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0))
%231 = call i32 @exit(i32 1)
unreachable
232: ; preds = %226
%233 = load i8**, i8*** %5
%234 = getelementptr inbounds i8*, i8** %233, i64 4
%235 = load i8*, i8** %234
%236 = call i32 @strtol(i8* %235, i32 0, i32 0)
store i32 %236, i32* %11
%237 = load i32, i32* %11
%238 = icmp slt i32 %237, 0
br i1 %238, label %242, label %239
239: ; preds = %232
%240 = load i32, i32* %11
%241 = icmp sgt i32 %240, 255
br i1 %241, label %242, label %245
242: ; preds = %239, %232
%243 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.16, i64 0, i64 0))
%244 = call i32 @exit(i32 1)
unreachable
245: ; preds = %239
%246 = load i32, i32* %9
%247 = load i32, i32* %10
%248 = load i32, i32* %11
%249 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.17, i64 0, i64 0), i32 %246, i32 %247, i32 %248)
%250 = load i32, i32* %10
%251 = load i32, i32* %11
%252 = xor i32 %251, -1
%253 = and i32 %250, %252
store i32 %253, i32* %12
%254 = load i32, i32* %10
%255 = load i32, i32* %11
%256 = xor i32 %255, -1
%257 = xor i32 %256, -1
%258 = and i32 %254, %257
store i32 %258, i32* %13
%259 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
store i32 0, i32* %7
br label %260
260: ; preds = %284, %245
%261 = load i32, i32* %7
%262 = icmp slt i32 %261, 256
br i1 %262, label %263, label %287
263: ; preds = %260
%264 = load i32, i32* %9
%265 = load i32, i32* %7
%266 = xor i32 %264, %265
store i32 %266, i32* %20
%267 = load i32, i32* %12
%268 = load i32, i32* %20
%269 = and i32 %267, %268
%270 = icmp ne i32 %269, 0
br i1 %270, label %279, label %271
271: ; preds = %263
%272 = load i32, i32* %13
%273 = icmp ne i32 %272, 0
br i1 %273, label %274, label %280
274: ; preds = %271
%275 = load i32, i32* %13
%276 = load i32, i32* %20
%277 = and i32 %275, %276
%278 = icmp ne i32 %277, 0
br i1 %278, label %280, label %279
279: ; preds = %274, %263
br label %283
280: ; preds = %274, %271
%281 = load i32, i32* %7
%282 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %281)
br label %283
283: ; preds = %280, %279
br label %284
284: ; preds = %283
%285 = load i32, i32* %7
%286 = add nsw i32 %285, 1
store i32 %286, i32* %7
br label %260
287: ; preds = %260
%288 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %291
289: ; preds = %194
%290 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.19, i64 0, i64 0))
br label %291
291: ; preds = %289, %287
br label %292
292: ; preds = %291
%293 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"MATCH\00"
@.str.3 = [31 x i8] c"searching filter settings for:\00"
@.str.5 = [8 x i8] c" 0x%02x\00"
@.str.7 = [52 x i8] c"found exact settings filt=%02x mask=%02x mode=%02x\0A\00"
@.str.8 = [12 x i8] c"mismatching\00"
@.str.9 = [6 x i8] c" %02x\00"
@.str.10 = [43 x i8] c" - settings filt=%02x mask=%02x mode=%02x\0A\00"
@.str.12 = [5 x i8] c"TEST\00"
@.str.17 = [40 x i8] c"settings file=%02x mask=%02x mode=%02x\0A\00"
@.str.18 = [10 x i8] c"matching:\00"
@str = [24 x i8] c"no exact settings found\00"
@str.20 = [32 x i8] c"allowed range 0-255 / 0x00-0xFF\00"
@str.21 = [17 x i8] c"no matches given\00"
@str.22 = [26 x i8] c"mode range 0-255 exceeded\00"
@str.23 = [26 x i8] c"mask range 0-255 exceeded\00"
@str.24 = [28 x i8] c"filter range 0-255 exceeded\00"
@str.25 = [18 x i8] c"missing arguments\00"
@str.26 = [23 x i8] c"unknown operation mode\00"
@str.27 = [23 x i8] c"missing operation mode\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%6 = icmp slt i32 %0, 2
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.27, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = tail call i32 @strcasecmp(i8* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %109
15: ; preds = %10
%16 = icmp ult i32 %0, 3
br i1 %16, label %17, label %20
17: ; preds = %15
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.21, i64 0, i64 0))
%19 = tail call i32 @exit(i32 1)
unreachable
20: ; preds = %15
%21 = call i32 @memset(i8* %5, i32 0, i32 256)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%23 = zext i32 %0 to i64
br label %24
24: ; preds = %20, %33
%25 = phi i64 [ 2, %20 ], [ %37, %33 ]
%26 = getelementptr inbounds i8*, i8** %1, i64 %25
%27 = load i8*, i8** %26
%28 = call i32 @strtol(i8* %27, i32 0, i32 0)
%29 = icmp ugt i32 %28, 255
br i1 %29, label %30, label %33
30: ; preds = %24
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.20, i64 0, i64 0))
%32 = call i32 @exit(i32 1)
unreachable
33: ; preds = %24
%34 = zext i32 %28 to i64
%35 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %34
store i8 1, i8* %35
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 %28)
%37 = add nuw nsw i64 %25, 1
%38 = icmp eq i64 %37, %23
br i1 %38, label %39, label %24
39: ; preds = %33
%40 = call i32 @putchar(i32 10)
%41 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
br label %42
42: ; preds = %39, %103
%43 = phi i32 [ 5, %39 ], [ %100, %103 ]
%44 = phi i32 [ 0, %39 ], [ %104, %103 ]
br label %45
45: ; preds = %42, %99
%46 = phi i32 [ %43, %42 ], [ %100, %99 ]
%47 = phi i32 [ 0, %42 ], [ %101, %99 ]
%48 = call i32 @memset(i8* %41, i32 0, i32 256)
br label %49
49: ; preds = %65, %45
%50 = phi i64 [ 0, %45 ], [ %69, %65 ]
%51 = phi i32 [ 0, %45 ], [ %66, %65 ]
%52 = phi i1 [ false, %45 ], [ true, %65 ]
br label %53
53: ; preds = %49, %72
%54 = phi i64 [ %73, %72 ], [ %50, %49 ]
%55 = trunc i64 %54 to i32
%56 = xor i32 %47, %55
%57 = and i32 %56, %44
%58 = icmp eq i32 %57, 0
%59 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %54
%60 = load i8, i8* %59
br i1 %58, label %63, label %61
61: ; preds = %53
%62 = icmp eq i8 %60, 0
br i1 %62, label %72, label %99
63: ; preds = %53
%64 = icmp eq i8 %60, 1
br i1 %64, label %72, label %65
65: ; preds = %63
%66 = add nuw nsw i32 %51, 1
%67 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 %54
store i8 1, i8* %67
%68 = icmp sge i32 %51, %46
%69 = add nuw nsw i64 %54, 1
%70 = icmp eq i64 %69, 256
%71 = select i1 %68, i1 true, i1 %70
br i1 %71, label %79, label %49
72: ; preds = %63, %61
%73 = add nuw nsw i64 %54, 1
%74 = icmp eq i64 %73, 256
br i1 %74, label %75, label %53
75: ; preds = %72
br i1 %52, label %79, label %76
76: ; preds = %75
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.7, i64 0, i64 0), i32 %47, i32 %44, i32 0)
%78 = call i32 @exit(i32 0)
unreachable
79: ; preds = %65, %75
%80 = phi i32 [ %51, %75 ], [ %66, %65 ]
%81 = icmp slt i32 %80, 1
%82 = icmp sgt i32 %80, %46
%83 = select i1 %81, i1 true, i1 %82
br i1 %83, label %99, label %84
84: ; preds = %79
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
br label %86
86: ; preds = %84, %94
%87 = phi i64 [ 0, %84 ], [ %95, %94 ]
%88 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 %87
%89 = load i8, i8* %88
%90 = icmp eq i8 %89, 0
br i1 %90, label %94, label %91
91: ; preds = %86
%92 = trunc i64 %87 to i32
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %92)
br label %94
94: ; preds = %86, %91
%95 = add nuw nsw i64 %87, 1
%96 = icmp eq i64 %95, 256
br i1 %96, label %97, label %86
97: ; preds = %94
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.10, i64 0, i64 0), i32 %47, i32 %44, i32 0)
br label %99
99: ; preds = %61, %79, %97
%100 = phi i32 [ %80, %97 ], [ %46, %79 ], [ %46, %61 ]
%101 = add nuw nsw i32 %47, 1
%102 = icmp eq i32 %101, 256
br i1 %102, label %103, label %45
103: ; preds = %99
%104 = add nuw nsw i32 %44, 1
%105 = icmp eq i32 %104, 256
br i1 %105, label %106, label %42
106: ; preds = %103
%107 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%108 = call i32 @exit(i32 1)
unreachable
109: ; preds = %10
%110 = tail call i32 @strcasecmp(i8* %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%111 = icmp eq i32 %110, 0
br i1 %111, label %112, label %164
112: ; preds = %109
%113 = icmp ult i32 %0, 5
br i1 %113, label %114, label %117
114: ; preds = %112
%115 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.25, i64 0, i64 0))
%116 = tail call i32 @exit(i32 1)
unreachable
117: ; preds = %112
%118 = getelementptr inbounds i8*, i8** %1, i64 2
%119 = load i8*, i8** %118
%120 = tail call i32 @strtol(i8* %119, i32 0, i32 0)
%121 = icmp ugt i32 %120, 255
br i1 %121, label %122, label %125
122: ; preds = %117
%123 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.24, i64 0, i64 0))
%124 = tail call i32 @exit(i32 1)
unreachable
125: ; preds = %117
%126 = getelementptr inbounds i8*, i8** %1, i64 3
%127 = load i8*, i8** %126
%128 = tail call i32 @strtol(i8* %127, i32 0, i32 0)
%129 = icmp ugt i32 %128, 255
br i1 %129, label %130, label %133
130: ; preds = %125
%131 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.23, i64 0, i64 0))
%132 = tail call i32 @exit(i32 1)
unreachable
133: ; preds = %125
%134 = getelementptr inbounds i8*, i8** %1, i64 4
%135 = load i8*, i8** %134
%136 = tail call i32 @strtol(i8* %135, i32 0, i32 0)
%137 = icmp ugt i32 %136, 255
br i1 %137, label %138, label %141
138: ; preds = %133
%139 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.22, i64 0, i64 0))
%140 = tail call i32 @exit(i32 1)
unreachable
141: ; preds = %133
%142 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.17, i64 0, i64 0), i32 %120, i32 %128, i32 %136)
%143 = xor i32 %136, -1
%144 = and i32 %128, %143
%145 = and i32 %136, %128
%146 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%147 = icmp ne i32 %145, 0
br label %148
148: ; preds = %141, %159
%149 = phi i32 [ 0, %141 ], [ %160, %159 ]
%150 = xor i32 %149, %120
%151 = and i32 %144, %150
%152 = icmp eq i32 %151, 0
br i1 %152, label %153, label %159
153: ; preds = %148
%154 = and i32 %150, %145
%155 = icmp eq i32 %154, 0
%156 = select i1 %147, i1 %155, i1 false
br i1 %156, label %159, label %157
157: ; preds = %153
%158 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %149)
br label %159
159: ; preds = %153, %148, %157
%160 = add nuw nsw i32 %149, 1
%161 = icmp eq i32 %160, 256
br i1 %161, label %162, label %148
162: ; preds = %159
%163 = tail call i32 @putchar(i32 10)
br label %166
164: ; preds = %109
%165 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.26, i64 0, i64 0))
br label %166
166: ; preds = %162, %164
%167 = tail call i32 @exit(i32 1)
unreachable
}