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

/* Variables and functions */
int False;
int True;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(char *);
char *strchr(char *, char);
int /*<<< orphan*/ strcmp(char const *, char *);
char *strdup(char const *);
int string_columns(char *, int, int);
char *strip(char *);
int strlen(char const *);
int tab_to(int /*<<< orphan*/ *, int, int);
void write_entry(FILE *out, const char *key, const char *value) {
  char *v = strdup(value ? value : "");
  char *v2 = v;
  char *nl = 0;
  int col;
  Bool programs_p = (!strcmp(key, "programs"));
  int tab = (programs_p ? 32 : 16);
  Bool first = True;
  fprintf(out, "%s:", key);
  col = strlen(key) + 1;
  if (strlen(key) > 14)
    col = tab_to(out, col, 20);
  while (1) {
    if (!programs_p)
      v2 = strip(v2);
    nl = strchr(v2, '\n');
    if (nl)
      *nl = 0;
    if (first && programs_p) {
      col = tab_to(out, col, 77);
      fprintf(out, " \\\n");
      col = 0;
    }
    if (first)
      first = False;
    else {
      col = tab_to(out, col, 75);
      fprintf(out, " \\n\\\n");
      col = 0;
    }
    if (!programs_p)
      col = tab_to(out, col, tab);
    if (programs_p && string_columns(v2, strlen(v2), col) + col > 75) {
      int L = strlen(v2);
      int start = 0;
      int end = start;
      while (start < L) {
        while (v2[end] == ' ' || v2[end] == '\t')
          end++;
        while (v2[end] != ' ' && v2[end] != '\t' && v2[end] != '\n' &&
               v2[end] != 0)
          end++;
        if (string_columns(v2 + start, (end - start), col) >= 74) {
          col = tab_to(out, col, 75);
          fprintf(out, "   \\\n");
          col = tab_to(out, 0, tab + 2);
          while (v2[start] == ' ' || v2[start] == '\t')
            start++;
        }
        col = string_columns(v2 + start, (end - start), col);
        while (start < end)
          fputc(v2[start++], out);
      }
    } else {
      fprintf(out, "%s", v2);
      col += string_columns(v2, strlen(v2), col);
    }
    if (nl)
      v2 = nl + 1;
    else
      break;
  }
  fprintf(out, "\n");
  free(v);
}


x86 assembly (clang, -O0):
<write_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     11cc <write_entry+0x2c>
mov    -0x18(%rbp),%rax
mov    %rax,-0x58(%rbp)
jmp    11dc <write_entry+0x3c>
lea    0xe45(%rip),%rax
mov    %rax,-0x58(%rbp)
jmp    11dc <write_entry+0x3c>
mov    -0x58(%rbp),%rdi
call   10c0 <strdup@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xdfc(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edx
mov    $0x10,%eax
mov    $0x20,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x3c(%rbp)
mov    0x2daa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xdbf(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0xe,%eax
jle    1286 <write_entry+0xe6>
mov    -0x8(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    $0x14,%edx
call   1040 <tab_to@plt>
mov    %eax,-0x34(%rbp)
jmp    128b <write_entry+0xeb>
cmpl   $0x0,-0x38(%rbp)
jne    12a2 <write_entry+0x102>
mov    -0x28(%rbp),%rdi
call   1070 <strip@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0xa,%esi
call   1060 <strchr@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     12c6 <write_entry+0x126>
mov    -0x30(%rbp),%rax
movb   $0x0,(%rax)
cmpl   $0x0,-0x40(%rbp)
je     1307 <write_entry+0x167>
cmpl   $0x0,-0x38(%rbp)
je     1307 <write_entry+0x167>
mov    -0x8(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    $0x4d,%edx
call   1040 <tab_to@plt>
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xd1c(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x0,-0x40(%rbp)
je     1322 <write_entry+0x182>
mov    0x2cd0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
jmp    134f <write_entry+0x1af>
mov    -0x8(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    $0x4b,%edx
call   1040 <tab_to@plt>
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xccc(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x0,-0x38(%rbp)
jne    136b <write_entry+0x1cb>
mov    -0x8(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x3c(%rbp),%edx
call   1040 <tab_to@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x38(%rbp)
je     15a3 <write_entry+0x403>
mov    -0x28(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x60(%rbp),%rdi
mov    %eax,%esi
mov    -0x34(%rbp),%edx
call   1090 <string_columns@plt>
add    -0x34(%rbp),%eax
cmp    $0x4b,%eax
jle    15a3 <write_entry+0x403>
mov    -0x28(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    159e <write_entry+0x3fe>
jmp    13ca <write_entry+0x22a>
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x61(%rbp)
je     13f9 <write_entry+0x259>
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x61(%rbp)
mov    -0x61(%rbp),%al
test   $0x1,%al
jne    1409 <write_entry+0x269>
jmp    1417 <write_entry+0x277>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    13ca <write_entry+0x22a>
jmp    141c <write_entry+0x27c>
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x62(%rbp)
je     147f <write_entry+0x2df>
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0x62(%rbp)
je     147f <write_entry+0x2df>
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x62(%rbp)
je     147f <write_entry+0x2df>
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x62(%rbp)
mov    -0x62(%rbp),%al
test   $0x1,%al
jne    148f <write_entry+0x2ef>
jmp    149d <write_entry+0x2fd>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    141c <write_entry+0x27c>
mov    -0x28(%rbp),%rdi
movslq -0x48(%rbp),%rax
add    %rax,%rdi
mov    -0x4c(%rbp),%esi
sub    -0x48(%rbp),%esi
mov    -0x34(%rbp),%edx
call   1090 <string_columns@plt>
cmp    $0x4a,%eax
jl     154b <write_entry+0x3ab>
mov    -0x8(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    $0x4b,%edx
call   1040 <tab_to@plt>
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xb35(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x3c(%rbp),%edx
add    $0x2,%edx
xor    %esi,%esi
call   1040 <tab_to@plt>
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x63(%rbp)
je     1528 <write_entry+0x388>
mov    -0x28(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x63(%rbp)
mov    -0x63(%rbp),%al
test   $0x1,%al
jne    1538 <write_entry+0x398>
jmp    1546 <write_entry+0x3a6>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    14f9 <write_entry+0x359>
jmp    154b <write_entry+0x3ab>
mov    -0x28(%rbp),%rdi
movslq -0x48(%rbp),%rax
add    %rax,%rdi
mov    -0x4c(%rbp),%esi
sub    -0x48(%rbp),%esi
mov    -0x34(%rbp),%edx
call   1090 <string_columns@plt>
mov    %eax,-0x34(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    1599 <write_entry+0x3f9>
mov    -0x28(%rbp),%rax
mov    -0x48(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x48(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1080 <fputc@plt>
jmp    1567 <write_entry+0x3c7>
jmp    13b9 <write_entry+0x219>
jmp    15de <write_entry+0x43e>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rdx
lea    0xa67(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x70(%rbp),%rdi
mov    %eax,%esi
mov    -0x34(%rbp),%edx
call   1090 <string_columns@plt>
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     15fa <write_entry+0x45a>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    15ff <write_entry+0x45f>
jmp    1604 <write_entry+0x464>
jmp    128b <write_entry+0xeb>
mov    -0x8(%rbp),%rdi
lea    0xa08(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_entry>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
test   %rdx,%rdx
lea    0xe3a(%rip),%rdi
cmovne %rdx,%rdi
call   10e0 <strdup@plt>
mov    %rax,0x30(%rsp)
lea    0xe0d(%rip),%rsi
mov    %r14,%rdi
call   10b0 <strcmp@plt>
mov    %eax,%r12d
xor    %eax,%eax
test   %r12d,%r12d
sete   %al
shl    $0x4,%eax
add    $0x10,%eax
mov    %eax,0xc(%rsp)
mov    0x2dc9(%rip),%rax
mov    (%rax),%ebx
lea    0xde9(%rip),%rsi
mov    %r15,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    %eax,%ebp
add    $0x1,%ebp
mov    %r14,%rdi
call   1050 <strlen@plt>
cmp    $0xf,%eax
jl     1258 <write_entry+0x98>
mov    %r15,%rdi
mov    %ebp,%esi
mov    $0x14,%edx
call   1040 <tab_to@plt>
jmp    125a <write_entry+0x9a>
mov    %ebp,%eax
mov    0xc(%rsp),%ecx
or     $0x2,%ecx
mov    %ecx,0x24(%rsp)
movabs $0x100000601,%r13
mov    0x30(%rsp),%r14
mov    %r15,0x10(%rsp)
mov    %r12d,0x20(%rsp)
jmp    12d1 <write_entry+0x111>
mov    %r15,%rdi
mov    0xc(%rsp),%edx
call   1040 <tab_to@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %r15,%rsi
call   1070 <fputs@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    %r14,%rdi
mov    %eax,%esi
mov    %ebp,%edx
call   10a0 <string_columns@plt>
add    %eax,%ebp
mov    %ebp,%eax
mov    0x40(%rsp),%rcx
lea    0x1(%rcx),%r14
test   %rcx,%rcx
mov    0x10(%rsp),%r15
mov    0x20(%rsp),%r12d
mov    0x28(%rsp),%ebx
je     156d <write_entry+0x3ad>
mov    %eax,%ebp
test   %r12d,%r12d
je     12e3 <write_entry+0x123>
mov    %r14,%rdi
call   1080 <strip@plt>
mov    %rax,%r14
mov    %r14,%rdi
mov    $0xa,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     12f8 <write_entry+0x138>
movb   $0x0,(%rax)
mov    %rax,0x40(%rsp)
test   %ebx,%ebx
mov    %ebp,%esi
je     1330 <write_entry+0x170>
test   %r12d,%r12d
jne    1330 <write_entry+0x170>
mov    %r15,%rdi
mov    $0x4d,%edx
call   1040 <tab_to@plt>
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xcef(%rip),%rdi
mov    %r15,%rcx
call   10d0 <fwrite@plt>
xor    %esi,%esi
test   %ebx,%ebx
je     1340 <write_entry+0x180>
mov    0x2cad(%rip),%rax
mov    (%rax),%ebp
jmp    136a <write_entry+0x1aa>
nop
mov    %r15,%rdi
mov    $0x4b,%edx
call   1040 <tab_to@plt>
mov    $0x5,%esi
mov    $0x1,%edx
lea    0xcaf(%rip),%rdi
mov    %r15,%rcx
call   10d0 <fwrite@plt>
xor    %esi,%esi
xor    %ebp,%ebp
test   %r12d,%r12d
mov    %ebp,0x28(%rsp)
jne    1280 <write_entry+0xc0>
mov    %r14,%rdi
mov    %r14,%r12
mov    %esi,%r14d
call   1050 <strlen@plt>
mov    %r12,%rdi
mov    %eax,%esi
mov    %r14d,%edx
call   10a0 <string_columns@plt>
add    %r14d,%eax
cmp    $0x4c,%eax
jl     1557 <write_entry+0x397>
mov    %r12,0x18(%rsp)
mov    %r12,%rdi
call   1050 <strlen@plt>
mov    %eax,0x2c(%rsp)
test   %eax,%eax
jle    1565 <write_entry+0x3a5>
xor    %edx,%edx
xor    %r15d,%r15d
movabs $0x100000000,%rsi
mov    %r14d,%eax
jmp    13ef <write_entry+0x22f>
nopl   0x0(%rax,%rax,1)
cmp    0x2c(%rsp),%r15d
movabs $0x100000000,%rsi
movabs $0x100000601,%r13
jge    12b1 <write_entry+0xf1>
mov    %rdx,%rdi
shl    $0x20,%rdi
movslq %edx,%rbp
mov    0x18(%rsp),%rbx
lea    (%rbx,%rbp,1),%rcx
sub    %r15d,%ebp
mov    %edx,%r12d
jmp    141e <write_entry+0x25e>
nopw   0x0(%rax,%rax,1)
add    %rsi,%rdi
add    $0x1,%rcx
add    $0x1,%ebp
add    $0x1,%r12d
movzbl (%rcx),%edx
cmp    $0x9,%dl
je     1410 <write_entry+0x250>
cmp    $0x20,%dl
je     1410 <write_entry+0x250>
sar    $0x20,%rdi
jmp    144b <write_entry+0x28b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdi
add    $0x1,%ebp
add    $0x1,%r12d
movzbl (%rbx,%rdi,1),%ecx
cmp    $0x20,%rcx
ja     1440 <write_entry+0x280>
bt     %rcx,%r13
jae    1440 <write_entry+0x280>
movslq %r15d,%r13
lea    (%rbx,%r13,1),%r14
mov    %rdi,0x38(%rsp)
mov    %edi,%ebx
sub    %r15d,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
mov    %eax,0x8(%rsp)
call   10a0 <string_columns@plt>
cmp    $0x4a,%eax
jl     14f0 <write_entry+0x330>
mov    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    0x8(%rsp),%esi
mov    $0x4b,%edx
call   1040 <tab_to@plt>
mov    $0x5,%esi
mov    $0x1,%edx
lea    0xb6b(%rip),%rdi
mov    %rbx,%rcx
call   10d0 <fwrite@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    0x24(%rsp),%edx
call   1040 <tab_to@plt>
mov    %eax,%edx
shl    $0x20,%r13
movabs $0x100000000,%rcx
jmp    14de <write_entry+0x31e>
add    %rcx,%r13
add    $0x1,%r15d
add    $0xffffffff,%ebp
add    $0x1,%r14
movzbl (%r14),%eax
cmp    $0x20,%al
je     14d0 <write_entry+0x310>
cmp    $0x9,%al
je     14d0 <write_entry+0x310>
sar    $0x20,%r13
jmp    14f6 <write_entry+0x336>
mov    %ebx,%ebp
mov    0x8(%rsp),%edx
mov    0x18(%rsp),%rax
lea    (%rax,%r13,1),%r14
mov    %r14,%rdi
mov    %ebp,%esi
call   10a0 <string_columns@plt>
mov    0x38(%rsp),%rdx
cmp    %edx,%r15d
jge    13d0 <write_entry+0x210>
mov    %eax,0x8(%rsp)
sub    %r13d,%r12d
xor    %ebp,%ebp
mov    0x10(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl (%r14,%rbp,1),%edi
mov    %rbx,%rsi
call   1090 <fputc@plt>
add    $0x1,%rbp
cmp    %ebp,%r12d
jne    1530 <write_entry+0x370>
mov    0x38(%rsp),%rdx
mov    %edx,%r15d
mov    0x8(%rsp),%eax
jmp    13d0 <write_entry+0x210>
mov    %r14d,%ecx
mov    %r14d,%ebp
mov    %r12,%r14
jmp    128e <write_entry+0xce>
mov    %r14d,%eax
jmp    12b1 <write_entry+0xf1>
mov    $0xa,%edi
mov    %r15,%rsi
call   1090 <fputc@plt>
mov    0x30(%rsp),%rdi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [9 x i8] c"programs\00"
@True = global i32 0
@.str.2 = [4 x i8] c"%s:\00"
@.str.3 = [4 x i8] c" \\\0A\00"
@False = global i32 0
@.str.4 = [6 x i8] c" \\n\\\0A\00"
@.str.5 = [6 x i8] c" \\\0A\00"
@.str.6 = [3 x i8] c"%s\00"
@.str.7 = [2 x i8] c"\0A\00"
define void @write_entry(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%17 = load i8*, i8** %6
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %21
19: ; preds = %3
%20 = load i8*, i8** %6
br label %22
21: ; preds = %3
br label %22
22: ; preds = %21, %19
%23 = phi i8* [ %20, %19 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %21 ]
%24 = call i8* @strdup(i8* %23)
store i8* %24, i8** %7
%25 = load i8*, i8** %7
store i8* %25, i8** %8
store i8* null, i8** %9
%26 = load i8*, i8** %5
%27 = call i32 @strcmp(i8* %26, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%28 = icmp ne i32 %27, 0
%29 = xor i1 %28, true
%30 = zext i1 %29 to i32
store i32 %30, i32* %11
%31 = load i32, i32* %11
%32 = icmp ne i32 %31, 0
%33 = zext i1 %32 to i64
%34 = select i1 %32, i32 32, i32 16
store i32 %34, i32* %12
%35 = load i32, i32* @True
store i32 %35, i32* %13
%36 = load i32*, i32** %4
%37 = load i8*, i8** %5
%38 = call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %37)
%39 = load i8*, i8** %5
%40 = call i32 @strlen(i8* %39)
%41 = add nsw i32 %40, 1
store i32 %41, i32* %10
%42 = load i8*, i8** %5
%43 = call i32 @strlen(i8* %42)
%44 = icmp sgt i32 %43, 14
br i1 %44, label %45, label %49
45: ; preds = %22
%46 = load i32*, i32** %4
%47 = load i32, i32* %10
%48 = call i32 @tab_to(i32* %46, i32 %47, i32 20)
store i32 %48, i32* %10
br label %49
49: ; preds = %45, %22
br label %50
50: ; preds = %49, %260
%51 = load i32, i32* %11
%52 = icmp ne i32 %51, 0
br i1 %52, label %56, label %53
53: ; preds = %50
%54 = load i8*, i8** %8
%55 = call i8* @strip(i8* %54)
store i8* %55, i8** %8
br label %56
56: ; preds = %53, %50
%57 = load i8*, i8** %8
%58 = call i8* @strchr(i8* %57, i8 signext 10)
store i8* %58, i8** %9
%59 = load i8*, i8** %9
%60 = icmp ne i8* %59, null
br i1 %60, label %61, label %63
61: ; preds = %56
%62 = load i8*, i8** %9
store i8 0, i8* %62
br label %63
63: ; preds = %61, %56
%64 = load i32, i32* %13
%65 = icmp ne i32 %64, 0
br i1 %65, label %66, label %75
66: ; preds = %63
%67 = load i32, i32* %11
%68 = icmp ne i32 %67, 0
br i1 %68, label %69, label %75
69: ; preds = %66
%70 = load i32*, i32** %4
%71 = load i32, i32* %10
%72 = call i32 @tab_to(i32* %70, i32 %71, i32 77)
store i32 %72, i32* %10
%73 = load i32*, i32** %4
%74 = call i32 (i32*, i8*, ...) @fprintf(i32* %73, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %10
br label %75
75: ; preds = %69, %66, %63
%76 = load i32, i32* %13
%77 = icmp ne i32 %76, 0
br i1 %77, label %78, label %80
78: ; preds = %75
%79 = load i32, i32* @False
store i32 %79, i32* %13
br label %86
80: ; preds = %75
%81 = load i32*, i32** %4
%82 = load i32, i32* %10
%83 = call i32 @tab_to(i32* %81, i32 %82, i32 75)
store i32 %83, i32* %10
%84 = load i32*, i32** %4
%85 = call i32 (i32*, i8*, ...) @fprintf(i32* %84, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %10
br label %86
86: ; preds = %80, %78
%87 = load i32, i32* %11
%88 = icmp ne i32 %87, 0
br i1 %88, label %94, label %89
89: ; preds = %86
%90 = load i32*, i32** %4
%91 = load i32, i32* %10
%92 = load i32, i32* %12
%93 = call i32 @tab_to(i32* %90, i32 %91, i32 %92)
store i32 %93, i32* %10
br label %94
94: ; preds = %89, %86
%95 = load i32, i32* %11
%96 = icmp ne i32 %95, 0
br i1 %96, label %97, label %242
97: ; preds = %94
%98 = load i8*, i8** %8
%99 = load i8*, i8** %8
%100 = call i32 @strlen(i8* %99)
%101 = load i32, i32* %10
%102 = call i32 @string_columns(i8* %98, i32 %100, i32 %101)
%103 = load i32, i32* %10
%104 = add nsw i32 %102, %103
%105 = icmp sgt i32 %104, 75
br i1 %105, label %106, label %242
106: ; preds = %97
%107 = load i8*, i8** %8
%108 = call i32 @strlen(i8* %107)
store i32 %108, i32* %14
store i32 0, i32* %15
%109 = load i32, i32* %15
store i32 %109, i32* %16
br label %110
110: ; preds = %240, %106
%111 = load i32, i32* %15
%112 = load i32, i32* %14
%113 = icmp slt i32 %111, %112
br i1 %113, label %114, label %241
114: ; preds = %110
br label %115
115: ; preds = %133, %114
%116 = load i8*, i8** %8
%117 = load i32, i32* %16
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i8, i8* %116, i64 %118
%120 = load i8, i8* %119
%121 = sext i8 %120 to i32
%122 = icmp eq i32 %121, 32
br i1 %122, label %131, label %123
123: ; preds = %115
%124 = load i8*, i8** %8
%125 = load i32, i32* %16
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i8, i8* %124, i64 %126
%128 = load i8, i8* %127
%129 = sext i8 %128 to i32
%130 = icmp eq i32 %129, 9
br label %131
131: ; preds = %123, %115
%132 = phi i1 [ true, %115 ], [ %130, %123 ]
br i1 %132, label %133, label %136
133: ; preds = %131
%134 = load i32, i32* %16
%135 = add nsw i32 %134, 1
store i32 %135, i32* %16
br label %115
136: ; preds = %131
br label %137
137: ; preds = %171, %136
%138 = load i8*, i8** %8
%139 = load i32, i32* %16
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds i8, i8* %138, i64 %140
%142 = load i8, i8* %141
%143 = sext i8 %142 to i32
%144 = icmp ne i32 %143, 32
br i1 %144, label %145, label %169
145: ; preds = %137
%146 = load i8*, i8** %8
%147 = load i32, i32* %16
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds i8, i8* %146, i64 %148
%150 = load i8, i8* %149
%151 = sext i8 %150 to i32
%152 = icmp ne i32 %151, 9
br i1 %152, label %153, label %169
153: ; preds = %145
%154 = load i8*, i8** %8
%155 = load i32, i32* %16
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds i8, i8* %154, i64 %156
%158 = load i8, i8* %157
%159 = sext i8 %158 to i32
%160 = icmp ne i32 %159, 10
br i1 %160, label %161, label %169
161: ; preds = %153
%162 = load i8*, i8** %8
%163 = load i32, i32* %16
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds i8, i8* %162, i64 %164
%166 = load i8, i8* %165
%167 = sext i8 %166 to i32
%168 = icmp ne i32 %167, 0
br label %169
169: ; preds = %161, %153, %145, %137
%170 = phi i1 [ false, %153 ], [ false, %145 ], [ false, %137 ], [ %168, %161 ]
br i1 %170, label %171, label %174
171: ; preds = %169
%172 = load i32, i32* %16
%173 = add nsw i32 %172, 1
store i32 %173, i32* %16
br label %137
174: ; preds = %169
%175 = load i8*, i8** %8
%176 = load i32, i32* %15
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds i8, i8* %175, i64 %177
%179 = load i32, i32* %16
%180 = load i32, i32* %15
%181 = sub nsw i32 %179, %180
%182 = load i32, i32* %10
%183 = call i32 @string_columns(i8* %178, i32 %181, i32 %182)
%184 = icmp sge i32 %183, 74
br i1 %184, label %185, label %217
185: ; preds = %174
%186 = load i32*, i32** %4
%187 = load i32, i32* %10
%188 = call i32 @tab_to(i32* %186, i32 %187, i32 75)
store i32 %188, i32* %10
%189 = load i32*, i32** %4
%190 = call i32 (i32*, i8*, ...) @fprintf(i32* %189, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%191 = load i32*, i32** %4
%192 = load i32, i32* %12
%193 = add nsw i32 %192, 2
%194 = call i32 @tab_to(i32* %191, i32 0, i32 %193)
store i32 %194, i32* %10
br label %195
195: ; preds = %213, %185
%196 = load i8*, i8** %8
%197 = load i32, i32* %15
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds i8, i8* %196, i64 %198
%200 = load i8, i8* %199
%201 = sext i8 %200 to i32
%202 = icmp eq i32 %201, 32
br i1 %202, label %211, label %203
203: ; preds = %195
%204 = load i8*, i8** %8
%205 = load i32, i32* %15
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds i8, i8* %204, i64 %206
%208 = load i8, i8* %207
%209 = sext i8 %208 to i32
%210 = icmp eq i32 %209, 9
br label %211
211: ; preds = %203, %195
%212 = phi i1 [ true, %195 ], [ %210, %203 ]
br i1 %212, label %213, label %216
213: ; preds = %211
%214 = load i32, i32* %15
%215 = add nsw i32 %214, 1
store i32 %215, i32* %15
br label %195
216: ; preds = %211
br label %217
217: ; preds = %216, %174
%218 = load i8*, i8** %8
%219 = load i32, i32* %15
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds i8, i8* %218, i64 %220
%222 = load i32, i32* %16
%223 = load i32, i32* %15
%224 = sub nsw i32 %222, %223
%225 = load i32, i32* %10
%226 = call i32 @string_columns(i8* %221, i32 %224, i32 %225)
store i32 %226, i32* %10
br label %227
227: ; preds = %231, %217
%228 = load i32, i32* %15
%229 = load i32, i32* %16
%230 = icmp slt i32 %228, %229
br i1 %230, label %231, label %240
231: ; preds = %227
%232 = load i8*, i8** %8
%233 = load i32, i32* %15
%234 = add nsw i32 %233, 1
store i32 %234, i32* %15
%235 = sext i32 %233 to i64
%236 = getelementptr inbounds i8, i8* %232, i64 %235
%237 = load i8, i8* %236
%238 = load i32*, i32** %4
%239 = call i32 @fputc(i8 signext %237, i32* %238)
br label %227
240: ; preds = %227
br label %110
241: ; preds = %110
br label %253
242: ; preds = %97, %94
%243 = load i32*, i32** %4
%244 = load i8*, i8** %8
%245 = call i32 (i32*, i8*, ...) @fprintf(i32* %243, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %244)
%246 = load i8*, i8** %8
%247 = load i8*, i8** %8
%248 = call i32 @strlen(i8* %247)
%249 = load i32, i32* %10
%250 = call i32 @string_columns(i8* %246, i32 %248, i32 %249)
%251 = load i32, i32* %10
%252 = add nsw i32 %251, %250
store i32 %252, i32* %10
br label %253
253: ; preds = %242, %241
%254 = load i8*, i8** %9
%255 = icmp ne i8* %254, null
br i1 %255, label %256, label %259
256: ; preds = %253
%257 = load i8*, i8** %9
%258 = getelementptr inbounds i8, i8* %257, i64 1
store i8* %258, i8** %8
br label %260
259: ; preds = %253
br label %261
260: ; preds = %256
br label %50
261: ; preds = %259
%262 = load i32*, i32** %4
%263 = call i32 (i32*, i8*, ...) @fprintf(i32* %262, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%264 = load i8*, i8** %7
%265 = call i32 @free(i8* %264)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [9 x i8] c"programs\00"
@True = global i32 0
@.str.2 = [4 x i8] c"%s:\00"
@.str.3 = [4 x i8] c" \\\0A\00"
@False = global i32 0
@.str.4 = [6 x i8] c" \\n\\\0A\00"
@.str.5 = [6 x i8] c" \\\0A\00"
define void @write_entry(i32* %0, i8* %1, i8* %2) {
%4 = icmp eq i8* %2, null
%5 = select i1 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %2
%6 = tail call i8* @strdup(i8* %5)
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i32 32, i32 16
%10 = load i32, i32* @True
%11 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%12 = tail call i32 @strlen(i8* %1)
%13 = add nsw i32 %12, 1
%14 = tail call i32 @strlen(i8* %1)
%15 = icmp sgt i32 %14, 14
br i1 %15, label %16, label %18
16: ; preds = %3
%17 = tail call i32 @tab_to(i32* %0, i32 %13, i32 20)
br label %18
18: ; preds = %16, %3
%19 = phi i32 [ %17, %16 ], [ %13, %3 ]
%20 = or i32 %9, 2
br label %21
21: ; preds = %126, %18
%22 = phi i32 [ %19, %18 ], [ %127, %126 ]
%23 = phi i32 [ %10, %18 ], [ %47, %126 ]
%24 = phi i8* [ %6, %18 ], [ %128, %126 ]
br i1 %8, label %27, label %25
25: ; preds = %21
%26 = tail call i8* @strip(i8* %24)
br label %27
27: ; preds = %25, %21
%28 = phi i8* [ %24, %21 ], [ %26, %25 ]
%29 = tail call i8* @strchr(i8* dereferenceable(1) %28, i8 signext 10)
%30 = icmp eq i8* %29, null
br i1 %30, label %32, label %31
31: ; preds = %27
store i8 0, i8* %29
br label %32
32: ; preds = %31, %27
%33 = icmp ne i32 %23, 0
%34 = select i1 %33, i1 %8, i1 false
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = tail call i32 @tab_to(i32* %0, i32 %22, i32 77)
%37 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %38
38: ; preds = %35, %32
%39 = phi i32 [ 0, %35 ], [ %22, %32 ]
br i1 %33, label %40, label %42
40: ; preds = %38
%41 = load i32, i32* @False
br label %45
42: ; preds = %38
%43 = tail call i32 @tab_to(i32* %0, i32 %39, i32 75)
%44 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i64 5, i64 1, i32* %0)
br label %45
45: ; preds = %42, %40
%46 = phi i32 [ %39, %40 ], [ 0, %42 ]
%47 = phi i32 [ %41, %40 ], [ 0, %42 ]
br i1 %8, label %50, label %48
48: ; preds = %45
%49 = tail call i32 @tab_to(i32* %0, i32 %46, i32 %9)
br label %120
50: ; preds = %45
%51 = tail call i32 @strlen(i8* %28)
%52 = tail call i32 @string_columns(i8* %28, i32 %51, i32 %46)
%53 = add nsw i32 %52, %46
%54 = icmp sgt i32 %53, 75
br i1 %54, label %55, label %120
55: ; preds = %50
%56 = tail call i32 @strlen(i8* %28)
%57 = icmp sgt i32 %56, 0
br i1 %57, label %61, label %126
58: ; preds = %112, %104
%59 = phi i32 [ %108, %104 ], [ %83, %112 ]
%60 = icmp slt i32 %59, %56
br i1 %60, label %61, label %126
61: ; preds = %55, %58
%62 = phi i64 [ %77, %58 ], [ 0, %55 ]
%63 = phi i32 [ %59, %58 ], [ 0, %55 ]
%64 = phi i32 [ %110, %58 ], [ %46, %55 ]
%65 = shl i64 %62, 32
%66 = ashr exact i64 %65, 32
br label %67
67: ; preds = %61, %74
%68 = phi i64 [ %66, %61 ], [ %75, %74 ]
%69 = getelementptr inbounds i8, i8* %28, i64 %68
%70 = load i8, i8* %69
switch i8 %70, label %71 [
i8 32, label %74
i8 9, label %74
]
71: ; preds = %67
%72 = shl i64 %68, 32
%73 = ashr exact i64 %72, 32
br label %76
74: ; preds = %67, %67
%75 = add i64 %68, 1
br label %67
76: ; preds = %71, %80
%77 = phi i64 [ %73, %71 ], [ %81, %80 ]
%78 = getelementptr inbounds i8, i8* %28, i64 %77
%79 = load i8, i8* %78
switch i8 %79, label %80 [
i8 32, label %82
i8 9, label %82
i8 10, label %82
i8 0, label %82
]
80: ; preds = %76
%81 = add i64 %77, 1
br label %76
82: ; preds = %76, %76, %76, %76
%83 = trunc i64 %77 to i32
%84 = sext i32 %63 to i64
%85 = getelementptr inbounds i8, i8* %28, i64 %84
%86 = sub nsw i32 %83, %63
%87 = tail call i32 @string_columns(i8* %85, i32 %86, i32 %64)
%88 = icmp sgt i32 %87, 73
br i1 %88, label %89, label %104
89: ; preds = %82
%90 = tail call i32 @tab_to(i32* %0, i32 %64, i32 75)
%91 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i64 5, i64 1, i32* %0)
%92 = tail call i32 @tab_to(i32* %0, i32 0, i32 %20)
br label %93
93: ; preds = %97, %89
%94 = phi i64 [ %98, %97 ], [ %84, %89 ]
%95 = getelementptr inbounds i8, i8* %28, i64 %94
%96 = load i8, i8* %95
switch i8 %96, label %99 [
i8 32, label %97
i8 9, label %97
]
97: ; preds = %93, %93
%98 = add i64 %94, 1
br label %93
99: ; preds = %93
%100 = trunc i64 %94 to i32
%101 = shl i64 %94, 32
%102 = ashr exact i64 %101, 32
%103 = sub nsw i32 %83, %100
br label %104
104: ; preds = %99, %82
%105 = phi i32 [ %103, %99 ], [ %86, %82 ]
%106 = phi i64 [ %102, %99 ], [ %84, %82 ]
%107 = phi i32 [ %92, %99 ], [ %64, %82 ]
%108 = phi i32 [ %100, %99 ], [ %63, %82 ]
%109 = getelementptr inbounds i8, i8* %28, i64 %106
%110 = tail call i32 @string_columns(i8* %109, i32 %105, i32 %107)
%111 = icmp slt i32 %108, %83
br i1 %111, label %112, label %58
112: ; preds = %104, %112
%113 = phi i64 [ %114, %112 ], [ %106, %104 ]
%114 = add nsw i64 %113, 1
%115 = getelementptr inbounds i8, i8* %28, i64 %113
%116 = load i8, i8* %115
%117 = tail call i32 @fputc(i8 signext %116, i32* %0)
%118 = trunc i64 %114 to i32
%119 = icmp eq i32 %118, %83
br i1 %119, label %58, label %112
120: ; preds = %48, %50
%121 = phi i32 [ %46, %50 ], [ %49, %48 ]
%122 = tail call i32 @fputs(i8* %28, i32* %0)
%123 = tail call i32 @strlen(i8* %28)
%124 = tail call i32 @string_columns(i8* %28, i32 %123, i32 %121)
%125 = add nsw i32 %124, %121
br label %126
126: ; preds = %58, %55, %120
%127 = phi i32 [ %125, %120 ], [ %46, %55 ], [ %110, %58 ]
%128 = getelementptr inbounds i8, i8* %29, i64 1
br i1 %30, label %129, label %21
129: ; preds = %126
%130 = tail call i32 bitcast (i32 (i8, i32*)* @fputc to i32 (i32, i32*)*)(i32 10, i32* %0)
%131 = tail call i32 @free(i8* %6)
ret void
}