#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 char argv;

/* Variables and functions */
int atoi(char *);
int getline(char *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ printspaces(int);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  int start_column;
  int every_columns;
  int i;
  char line[100];
  int total;
  int index;
  int detab;
  int spaces;
  switch (argc) {
  case 1:
    start_column = 5;
    every_columns = 7;
    detab = 0;
    break;
  case 2:
    if (*argv[1] == '-') {
      start_column = atoi(argv[1] + 1);
      every_columns = 7;
    } else if (*argv[1] == '+') {
      every_columns = atoi(argv[1] + 1);
      start_column = 5;
    } else {
      printf("It needs to start with - or +\n");
      printf("Setting defaults start=5, every=7\n");
      start_column = 5;
      every_columns = 7;
    }
    detab = 0;
    break;
  case 3:
    if (*argv[1] == '-')
      start_column = atoi((argv[1]) + 1);
    else {
      printf("It needs to start with '-'\n");
      printf("Setting start at 5th column\n");
      start_column = 5;
    }
    if (*argv[2] == '+')
      every_columns = atoi(argv[2] + 1);
    else {
      printf("It needs to start with '+'\n");
      printf("Setting every tab every 7 columns\n");
      every_columns = 7;
    }
    detab = 0;
    break;
  case 4:
    if (*argv[1] == '-')
      start_column = atoi((argv[1]) + 1);
    else {
      printf("It needs to start with '-'\n");
      printf("Setting start at 5th column\n");
      start_column = 5;
    }
    if (*argv[2] == '+')
      every_columns = atoi(argv[2] + 1);
    else {
      printf("It needs to start with '+'\n");
      printf("Setting every tab every 7 columns\n");
      every_columns = 7;
    }
    if (strcmp(argv[3], "-d"))
      detab = 1;
    else
      detab = 0;
    break;
  default:
    printf("More arguments than required\n");
    printf("Format is of type: entab -m +n\n");
    return 0;
  }
  if (detab) {
    while ((total = getline(line, 100)) > 0) {
      spaces = 0;
      index = 0;
      for (i = 0; i < start_column - 1; ++i)
        putchar(line[i]);
      index = i;
      if (start_column > 8)
        spaces = 8 - ((start_column - 1) % 8);
      else
        spaces = 8 - (start_column - 1);
      printspaces(spaces);
      while (index < total) {
        for (i = 0; line[index + i] != '\0' && i < every_columns - 1; ++i)
          putchar(line[index + i]);
        if (line[index + i] == '\0')
          break;
        if (every_columns > 8)
          spaces = 8 - ((every_columns - 1) % 8);
        else
          spaces = 8 - (every_columns - 1);
        printspaces(spaces);
        index += i;
      }
    }
  } else {
    while ((total = getline(line, 100)) > 0) {
      index = 0;
      for (i = 0; i < start_column - 1; ++i)
        putchar(line[i]);
      index = i;
      putchar('\t');
      while (index < total) {
        for (i = 0; line[index + i] != '\0' && i < every_columns - 1; ++i)
          putchar(line[index + i]);
        if (line[index + i] == '\0')
          break;
        putchar('\t');
        index += i;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x98(%rbp)
sub    $0x3,%eax
ja     13e1 <main+0x281>
mov    -0x98(%rbp),%rax
lea    0xe61(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x5,-0x14(%rbp)
movl   $0x7,-0x18(%rbp)
movl   $0x0,-0x8c(%rbp)
jmp    1405 <main+0x2a5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    11f9 <main+0x99>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
add    $0x1,%rdi
call   1070 <atoi@plt>
mov    %eax,-0x14(%rbp)
movl   $0x7,-0x18(%rbp)
jmp    1258 <main+0xf8>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    122d <main+0xcd>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
add    $0x1,%rdi
call   1070 <atoi@plt>
mov    %eax,-0x18(%rbp)
movl   $0x5,-0x14(%rbp)
jmp    1253 <main+0xf3>
lea    0xddc(%rip),%rdi
call   1050 <printf@plt>
lea    0xdef(%rip),%rdi
call   1050 <printf@plt>
movl   $0x5,-0x14(%rbp)
movl   $0x7,-0x18(%rbp)
jmp    1258 <main+0xf8>
movl   $0x0,-0x8c(%rbp)
jmp    1405 <main+0x2a5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1294 <main+0x134>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
add    $0x1,%rdi
call   1070 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    12b3 <main+0x153>
lea    0xdb7(%rip),%rdi
call   1050 <printf@plt>
lea    0xdc7(%rip),%rdi
call   1050 <printf@plt>
movl   $0x5,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    12e0 <main+0x180>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
add    $0x1,%rdi
call   1070 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    12ff <main+0x19f>
lea    0xda4(%rip),%rdi
call   1050 <printf@plt>
lea    0xdb4(%rip),%rdi
call   1050 <printf@plt>
movl   $0x7,-0x18(%rbp)
movl   $0x0,-0x8c(%rbp)
jmp    1405 <main+0x2a5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    133b <main+0x1db>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
add    $0x1,%rdi
call   1070 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    135a <main+0x1fa>
lea    0xd10(%rip),%rdi
call   1050 <printf@plt>
lea    0xd20(%rip),%rdi
call   1050 <printf@plt>
movl   $0x5,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    1387 <main+0x227>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
add    $0x1,%rdi
call   1070 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    13a6 <main+0x246>
lea    0xcfd(%rip),%rdi
call   1050 <printf@plt>
lea    0xd0d(%rip),%rdi
call   1050 <printf@plt>
movl   $0x7,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xd15(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
je     13d2 <main+0x272>
movl   $0x1,-0x8c(%rbp)
jmp    13dc <main+0x27c>
movl   $0x0,-0x8c(%rbp)
jmp    1405 <main+0x2a5>
lea    0xce5(%rip),%rdi
call   1050 <printf@plt>
lea    0xcf7(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1719 <main+0x5b9>
cmpl   $0x0,-0x8c(%rbp)
je     15d5 <main+0x475>
jmp    1417 <main+0x2b7>
lea    -0x80(%rbp),%rdi
mov    $0x64,%esi
call   1080 <getline@plt>
mov    %eax,-0x84(%rbp)
cmp    $0x0,%eax
jle    15d0 <main+0x470>
movl   $0x0,-0x90(%rbp)
movl   $0x0,-0x88(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    147c <main+0x31c>
movslq -0x1c(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%edi
call   1030 <putchar@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    144f <main+0x2ef>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x88(%rbp)
cmpl   $0x8,-0x14(%rbp)
jle    14af <main+0x34f>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    $0x8,%eax
sub    %edx,%eax
mov    %eax,-0x90(%rbp)
jmp    14c2 <main+0x362>
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x8,%eax
sub    %ecx,%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%edi
call   1040 <printspaces@plt>
mov    -0x88(%rbp),%eax
cmp    -0x84(%rbp),%eax
jge    15cb <main+0x46b>
movl   $0x0,-0x1c(%rbp)
mov    -0x88(%rbp),%eax
add    -0x1c(%rbp),%eax
cltq
movsbl -0x80(%rbp,%rax,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x99(%rbp)
je     151b <main+0x3bb>
mov    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
setl   %al
mov    %al,-0x99(%rbp)
mov    -0x99(%rbp),%al
test   $0x1,%al
jne    152e <main+0x3ce>
jmp    1551 <main+0x3f1>
mov    -0x88(%rbp),%eax
add    -0x1c(%rbp),%eax
cltq
movsbl -0x80(%rbp,%rax,1),%edi
call   1030 <putchar@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    14e6 <main+0x386>
mov    -0x88(%rbp),%eax
add    -0x1c(%rbp),%eax
cltq
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x0,%eax
jne    156f <main+0x40f>
jmp    15cb <main+0x46b>
cmpl   $0x8,-0x18(%rbp)
jle    1599 <main+0x439>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    $0x8,%eax
sub    %edx,%eax
mov    %eax,-0x90(%rbp)
jmp    15ac <main+0x44c>
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x8,%eax
sub    %ecx,%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%edi
call   1040 <printspaces@plt>
mov    -0x1c(%rbp),%eax
add    -0x88(%rbp),%eax
mov    %eax,-0x88(%rbp)
jmp    14cd <main+0x36d>
jmp    1417 <main+0x2b7>
jmp    1712 <main+0x5b2>
jmp    15da <main+0x47a>
lea    -0x80(%rbp),%rdi
mov    $0x64,%esi
call   1080 <getline@plt>
mov    %eax,-0x84(%rbp)
cmp    $0x0,%eax
jle    170d <main+0x5ad>
movl   $0x0,-0x88(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1635 <main+0x4d5>
movslq -0x1c(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%edi
call   1030 <putchar@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1608 <main+0x4a8>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    -0x88(%rbp),%eax
cmp    -0x84(%rbp),%eax
jge    1708 <main+0x5a8>
movl   $0x0,-0x1c(%rbp)
mov    -0x88(%rbp),%eax
add    -0x1c(%rbp),%eax
cltq
movsbl -0x80(%rbp,%rax,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9a(%rbp)
je     1696 <main+0x536>
mov    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
setl   %al
mov    %al,-0x9a(%rbp)
mov    -0x9a(%rbp),%al
test   $0x1,%al
jne    16a9 <main+0x549>
jmp    16cc <main+0x56c>
mov    -0x88(%rbp),%eax
add    -0x1c(%rbp),%eax
cltq
movsbl -0x80(%rbp,%rax,1),%edi
call   1030 <putchar@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1661 <main+0x501>
mov    -0x88(%rbp),%eax
add    -0x1c(%rbp),%eax
cltq
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x0,%eax
jne    16ea <main+0x58a>
jmp    1708 <main+0x5a8>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    -0x1c(%rbp),%eax
add    -0x88(%rbp),%eax
mov    %eax,-0x88(%rbp)
jmp    1648 <main+0x4e8>
jmp    15da <main+0x47a>
jmp    1712 <main+0x5b2>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
add    $0xffffffff,%edi
cmp    $0x3,%edi
ja     11f1 <main+0x91>
mov    %rsi,%rbp
mov    $0x5,%eax
mov    %rax,0x8(%rsp)
mov    $0x7,%eax
mov    %rax,0x10(%rsp)
lea    0xe69(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    0x8(%rbp),%rdi
mov    (%rdi),%al
cmp    $0x2b,%al
je     1239 <main+0xd9>
cmp    $0x2d,%al
jne    13ef <main+0x28f>
add    $0x1,%rdi
call   1070 <atoi@plt>
mov    %rax,0x8(%rsp)
jmp    1407 <main+0x2a7>
mov    0x8(%rbp),%rdi
cmpb   $0x2d,(%rdi)
jne    120e <main+0xae>
add    $0x1,%rdi
call   1070 <atoi@plt>
jmp    122b <main+0xcb>
mov    0x8(%rbp),%rdi
cmpb   $0x2d,(%rdi)
jne    124c <main+0xec>
add    $0x1,%rdi
call   1070 <atoi@plt>
jmp    1269 <main+0x109>
lea    0xecf(%rip),%rdi
call   1050 <puts@plt>
lea    0xee0(%rip),%rdi
call   1050 <puts@plt>
jmp    14f2 <main+0x392>
lea    0xdfe(%rip),%rdi
call   1050 <puts@plt>
lea    0xe0d(%rip),%rdi
call   1050 <puts@plt>
mov    $0x5,%eax
mov    %rax,0x8(%rsp)
mov    0x10(%rbp),%rdi
cmpb   $0x2b,(%rdi)
jne    1282 <main+0x122>
add    $0x1,%rdi
call   1070 <atoi@plt>
mov    %rax,0x10(%rsp)
jmp    1407 <main+0x2a7>
lea    0xdc0(%rip),%rdi
call   1050 <puts@plt>
lea    0xdcf(%rip),%rdi
call   1050 <puts@plt>
mov    $0x5,%eax
mov    %rax,0x8(%rsp)
mov    0x10(%rbp),%rdi
cmpb   $0x2b,(%rdi)
jne    129a <main+0x13a>
add    $0x1,%rdi
call   1070 <atoi@plt>
jmp    12b7 <main+0x157>
lea    0xdc1(%rip),%rdi
call   1050 <puts@plt>
lea    0xdd0(%rip),%rdi
jmp    1402 <main+0x2a2>
lea    0xda9(%rip),%rdi
call   1050 <puts@plt>
lea    0xdb8(%rip),%rdi
call   1050 <puts@plt>
mov    $0x7,%eax
mov    %rax,0x10(%rsp)
mov    0x18(%rbp),%rdi
lea    0xd49(%rip),%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1407 <main+0x2a7>
lea    0x20(%rsp),%rdi
mov    $0x64,%esi
call   1080 <getline@plt>
test   %eax,%eax
jle    14f2 <main+0x392>
mov    %eax,%r13d
mov    0x10(%rsp),%rdx
lea    -0x1(%rdx),%eax
lea    -0x9(%rdx),%ecx
neg    %ecx
movslq %eax,%rbx
and    $0x7,%eax
mov    $0x8,%esi
mov    $0x8,%edi
sub    %eax,%edi
cmp    $0x9,%edx
cmovl  %ecx,%edi
mov    %edi,0x1c(%rsp)
mov    0x8(%rsp),%rdx
lea    -0x1(%rdx),%r15d
lea    -0x9(%rdx),%eax
neg    %eax
mov    %r15d,%ecx
and    $0x7,%ecx
sub    %ecx,%esi
cmp    $0x9,%edx
cmovl  %eax,%esi
mov    %esi,0x18(%rsp)
jmp    135a <main+0x1fa>
nopl   0x0(%rax)
lea    0x20(%rsp),%rdi
mov    $0x64,%esi
call   1080 <getline@plt>
mov    %eax,%r13d
test   %eax,%eax
jle    14f2 <main+0x392>
mov    $0x0,%r14d
cmpl   $0x2,0x8(%rsp)
jl     1386 <main+0x226>
xor    %ebp,%ebp
nopl   0x0(%rax)
movsbl 0x20(%rsp,%rbp,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1370 <main+0x210>
mov    %r15d,%r14d
mov    0x18(%rsp),%edi
nopw   0x0(%rax,%rax,1)
call   1040 <printspaces@plt>
cmp    %r13d,%r14d
jge    1340 <main+0x1e0>
mov    %r14d,%ecx
mov    0x20(%rsp,%rcx,1),%al
test   %al,%al
je     13e1 <main+0x281>
cmpl   $0x2,0x10(%rsp)
jl     13e1 <main+0x281>
lea    (%rsp,%rcx,1),%r12
add    $0x20,%r12
mov    $0x1,%ebp
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%r12,%rbp,1),%eax
add    $0x1,%r14d
test   %al,%al
je     13e1 <main+0x281>
lea    0x1(%rbp),%rcx
cmp    %rbx,%rbp
mov    %rcx,%rbp
jl     13c0 <main+0x260>
test   %al,%al
je     1340 <main+0x1e0>
mov    0x1c(%rsp),%edi
jmp    1390 <main+0x230>
lea    0xc91(%rip),%rdi
call   1050 <puts@plt>
lea    0xca3(%rip),%rdi
call   1050 <puts@plt>
lea    0x20(%rsp),%rdi
mov    $0x64,%esi
call   1080 <getline@plt>
test   %eax,%eax
jle    14f2 <main+0x392>
mov    %eax,%r12d
mov    0x8(%rsp),%rax
lea    -0x1(%rax),%r14d
mov    0x10(%rsp),%rax
add    $0xffffffff,%eax
movslq %eax,%rbp
jmp    145a <main+0x2fa>
nopw   0x0(%rax,%rax,1)
lea    0x20(%rsp),%rdi
mov    $0x64,%esi
call   1080 <getline@plt>
mov    %eax,%r12d
test   %eax,%eax
jle    14f2 <main+0x392>
mov    $0x0,%ebx
cmpl   $0x2,0x8(%rsp)
jl     1494 <main+0x334>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsbl 0x20(%rsp,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1470 <main+0x310>
mov    %r14d,%ebx
jmp    1494 <main+0x334>
nopl   0x0(%rax,%rax,1)
test   %al,%al
je     1440 <main+0x2e0>
mov    $0x9,%edi
call   1030 <putchar@plt>
cmp    %r12d,%ebx
jge    1440 <main+0x2e0>
mov    %ebx,%ecx
mov    0x20(%rsp,%rcx,1),%al
test   %al,%al
je     1490 <main+0x330>
cmpl   $0x2,0x10(%rsp)
jl     1490 <main+0x330>
lea    (%rsp,%rcx,1),%r15
add    $0x20,%r15
mov    $0x1,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%r15,%r13,1),%eax
add    $0x1,%ebx
test   %al,%al
je     1490 <main+0x330>
lea    0x1(%r13),%rcx
cmp    %rbp,%r13
mov    %rcx,%r13
jl     14d0 <main+0x370>
jmp    1490 <main+0x330>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.6 = [3 x i8] c"-d\00"
@str.12 = [27 x i8] c"It needs to start with '-'\00"
@str.13 = [28 x i8] c"Setting start at 5th column\00"
@str.14 = [27 x i8] c"It needs to start with '+'\00"
@str.15 = [34 x i8] c"Setting every tab every 7 columns\00"
@str.16 = [30 x i8] c"It needs to start with - or +\00"
@str.17 = [34 x i8] c"Setting defaults start=5, every=7\00"
@str.18 = [29 x i8] c"More arguments than required\00"
@str.19 = [31 x i8] c"Format is of type: entab -m +n\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
switch i32 %0, label %102 [
i32 1, label %5
i32 2, label %17
i32 3, label %30
i32 4, label %53
]
5: ; preds = %76, %21, %24, %27, %47, %50, %2
%6 = phi i32 [ 7, %2 ], [ %77, %76 ], [ %49, %47 ], [ 7, %50 ], [ 7, %21 ], [ 7, %27 ], [ %26, %24 ]
%7 = phi i32 [ 5, %2 ], [ %65, %76 ], [ %42, %47 ], [ %42, %50 ], [ %23, %21 ], [ 5, %27 ], [ 5, %24 ]
%8 = call i32 @getline(i8* %4, i32 100)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %191
10: ; preds = %5
%11 = add i32 %7, -1
%12 = icmp sgt i32 %7, 1
%13 = add nsw i32 %6, -1
%14 = icmp sgt i32 %6, 1
%15 = sext i32 %13 to i64
%16 = zext i32 %11 to i64
br label %148
17: ; preds = %2
%18 = getelementptr inbounds i8*, i8** %1, i64 1
%19 = load i8*, i8** %18
%20 = load i8, i8* %19
switch i8 %20, label %27 [
i8 45, label %21
i8 43, label %24
]
21: ; preds = %17
%22 = getelementptr inbounds i8, i8* %19, i64 1
%23 = tail call i32 @atoi(i8* %22)
br label %5
24: ; preds = %17
%25 = getelementptr inbounds i8, i8* %19, i64 1
%26 = tail call i32 @atoi(i8* %25)
br label %5
27: ; preds = %17
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.16, i64 0, i64 0))
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.17, i64 0, i64 0))
br label %5
30: ; preds = %2
%31 = getelementptr inbounds i8*, i8** %1, i64 1
%32 = load i8*, i8** %31
%33 = load i8, i8* %32
%34 = icmp eq i8 %33, 45
br i1 %34, label %35, label %38
35: ; preds = %30
%36 = getelementptr inbounds i8, i8* %32, i64 1
%37 = tail call i32 @atoi(i8* %36)
br label %41
38: ; preds = %30
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.12, i64 0, i64 0))
%40 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.13, i64 0, i64 0))
br label %41
41: ; preds = %38, %35
%42 = phi i32 [ %37, %35 ], [ 5, %38 ]
%43 = getelementptr inbounds i8*, i8** %1, i64 2
%44 = load i8*, i8** %43
%45 = load i8, i8* %44
%46 = icmp eq i8 %45, 43
br i1 %46, label %47, label %50
47: ; preds = %41
%48 = getelementptr inbounds i8, i8* %44, i64 1
%49 = tail call i32 @atoi(i8* %48)
br label %5
50: ; preds = %41
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.14, i64 0, i64 0))
%52 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.15, i64 0, i64 0))
br label %5
53: ; preds = %2
%54 = getelementptr inbounds i8*, i8** %1, i64 1
%55 = load i8*, i8** %54
%56 = load i8, i8* %55
%57 = icmp eq i8 %56, 45
br i1 %57, label %58, label %61
58: ; preds = %53
%59 = getelementptr inbounds i8, i8* %55, i64 1
%60 = tail call i32 @atoi(i8* %59)
br label %64
61: ; preds = %53
%62 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.12, i64 0, i64 0))
%63 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.13, i64 0, i64 0))
br label %64
64: ; preds = %61, %58
%65 = phi i32 [ %60, %58 ], [ 5, %61 ]
%66 = getelementptr inbounds i8*, i8** %1, i64 2
%67 = load i8*, i8** %66
%68 = load i8, i8* %67
%69 = icmp eq i8 %68, 43
br i1 %69, label %70, label %73
70: ; preds = %64
%71 = getelementptr inbounds i8, i8* %67, i64 1
%72 = tail call i32 @atoi(i8* %71)
br label %76
73: ; preds = %64
%74 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.14, i64 0, i64 0))
%75 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.15, i64 0, i64 0))
br label %76
76: ; preds = %73, %70
%77 = phi i32 [ %72, %70 ], [ 7, %73 ]
%78 = getelementptr inbounds i8*, i8** %1, i64 3
%79 = load i8*, i8** %78
%80 = tail call i32 @strcmp(i8* dereferenceable(1) %79, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%81 = icmp eq i32 %80, 0
br i1 %81, label %5, label %82
82: ; preds = %76
%83 = call i32 @getline(i8* %4, i32 100)
%84 = icmp sgt i32 %83, 0
br i1 %84, label %85, label %191
85: ; preds = %82
%86 = add i32 %65, -1
%87 = icmp sgt i32 %65, 1
%88 = icmp sgt i32 %65, 8
%89 = and i32 %86, 7
%90 = sub nuw nsw i32 8, %89
%91 = sub i32 9, %65
%92 = select i1 %88, i32 %90, i32 %91
%93 = add nsw i32 %77, -1
%94 = icmp sgt i32 %77, 1
%95 = icmp sgt i32 %77, 8
%96 = and i32 %93, 7
%97 = sub nuw nsw i32 8, %96
%98 = sub i32 9, %77
%99 = select i1 %95, i32 %97, i32 %98
%100 = sext i32 %93 to i64
%101 = zext i32 %86 to i64
br label %105
102: ; preds = %2
%103 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.18, i64 0, i64 0))
%104 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.19, i64 0, i64 0))
br label %191
105: ; preds = %85, %145
%106 = phi i32 [ %83, %85 ], [ %146, %145 ]
br i1 %87, label %107, label %114
107: ; preds = %105, %107
%108 = phi i64 [ %112, %107 ], [ 0, %105 ]
%109 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %108
%110 = load i8, i8* %109
%111 = call i32 @putchar(i8 signext %110)
%112 = add nuw nsw i64 %108, 1
%113 = icmp eq i64 %112, %101
br i1 %113, label %114, label %107
114: ; preds = %107, %105
%115 = phi i32 [ 0, %105 ], [ %86, %107 ]
%116 = call i32 @printspaces(i32 %92)
%117 = icmp slt i32 %115, %106
br i1 %117, label %118, label %145
118: ; preds = %114, %142
%119 = phi i32 [ %139, %142 ], [ %115, %114 ]
%120 = zext i32 %119 to i64
%121 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %120
%122 = load i8, i8* %121
%123 = icmp ne i8 %122, 0
%124 = select i1 %123, i1 %94, i1 false
br i1 %124, label %125, label %138
125: ; preds = %118, %125
%126 = phi i64 [ %129, %125 ], [ 0, %118 ]
%127 = phi i8 [ %132, %125 ], [ %122, %118 ]
%128 = call i32 @putchar(i8 signext %127)
%129 = add nuw nsw i64 %126, 1
%130 = add nuw nsw i64 %129, %120
%131 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %130
%132 = load i8, i8* %131
%133 = icmp ne i8 %132, 0
%134 = icmp slt i64 %129, %100
%135 = select i1 %133, i1 %134, i1 false
br i1 %135, label %125, label %136
136: ; preds = %125
%137 = trunc i64 %130 to i32
br label %138
138: ; preds = %136, %118
%139 = phi i32 [ %119, %118 ], [ %137, %136 ]
%140 = phi i8 [ %122, %118 ], [ %132, %136 ]
%141 = icmp eq i8 %140, 0
br i1 %141, label %145, label %142
142: ; preds = %138
%143 = call i32 @printspaces(i32 %99)
%144 = icmp slt i32 %139, %106
br i1 %144, label %118, label %145
145: ; preds = %142, %138, %114
%146 = call i32 @getline(i8* %4, i32 100)
%147 = icmp sgt i32 %146, 0
br i1 %147, label %105, label %191
148: ; preds = %10, %188
%149 = phi i32 [ %8, %10 ], [ %189, %188 ]
br i1 %12, label %150, label %157
150: ; preds = %148, %150
%151 = phi i64 [ %155, %150 ], [ 0, %148 ]
%152 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %151
%153 = load i8, i8* %152
%154 = call i32 @putchar(i8 signext %153)
%155 = add nuw nsw i64 %151, 1
%156 = icmp eq i64 %155, %16
br i1 %156, label %157, label %150
157: ; preds = %150, %148
%158 = phi i32 [ 0, %148 ], [ %11, %150 ]
%159 = call i32 @putchar(i8 signext 9)
%160 = icmp slt i32 %158, %149
br i1 %160, label %161, label %188
161: ; preds = %157, %185
%162 = phi i32 [ %182, %185 ], [ %158, %157 ]
%163 = zext i32 %162 to i64
%164 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %163
%165 = load i8, i8* %164
%166 = icmp ne i8 %165, 0
%167 = select i1 %166, i1 %14, i1 false
br i1 %167, label %168, label %181
168: ; preds = %161, %168
%169 = phi i64 [ %172, %168 ], [ 0, %161 ]
%170 = phi i8 [ %175, %168 ], [ %165, %161 ]
%171 = call i32 @putchar(i8 signext %170)
%172 = add nuw nsw i64 %169, 1
%173 = add nuw nsw i64 %172, %163
%174 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %173
%175 = load i8, i8* %174
%176 = icmp ne i8 %175, 0
%177 = icmp slt i64 %172, %15
%178 = select i1 %176, i1 %177, i1 false
br i1 %178, label %168, label %179
179: ; preds = %168
%180 = trunc i64 %173 to i32
br label %181
181: ; preds = %179, %161
%182 = phi i32 [ %162, %161 ], [ %180, %179 ]
%183 = phi i8 [ %165, %161 ], [ %175, %179 ]
%184 = icmp eq i8 %183, 0
br i1 %184, label %188, label %185
185: ; preds = %181
%186 = call i32 @putchar(i8 signext 9)
%187 = icmp slt i32 %182, %149
br i1 %187, label %161, label %188
188: ; preds = %185, %181, %157
%189 = call i32 @getline(i8* %4, i32 100)
%190 = icmp sgt i32 %189, 0
br i1 %190, label %148, label %191
191: ; preds = %145, %188, %82, %5, %102
ret i32 0
}