#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ isspace(char const);
int /*<<< orphan*/ printf(char *, ...);
int strlen(char const *);
void print_spec_indented_and_max_length(const char *str, int len, int Num,
                                        const char *AddToEnd) {
  int notfirsttime = 0;
  int slen = strlen(str);
  int lo = 0, hi = 0;
  int i;
  int NumRet = 0, k;
  while (hi < slen) {
    hi = lo + len;
    if (hi >= slen) {
      for (i = 1; i < Num; i++) {
        printf("    ");
      }
      for (lo += notfirsttime; lo < slen; lo++)
        printf("%c", str[lo]);
      printf("%s\n", AddToEnd);
      return;
    }
    while (!(isspace(str[hi])) && hi > lo)
      hi--;
    if (hi == lo) {
      hi = lo + len;
      while (!(isspace(str[hi])) && hi < slen)
        hi++;
    }
    for (i = 1; i < Num; i++) {
      printf("    ");
    }
    for (lo += notfirsttime; lo < hi; lo++) {
      printf("%c", str[lo]);
      if (str[lo] == '\n') {
        for (NumRet = 0, k = lo; str[k] == '\n'; k++) {
          NumRet++;
        }
        for (i = 0; i < NumRet - 2; i++) {
          printf("\n");
        }
        for (i = 1; i < Num; i++) {
          printf("    ");
        }
        lo = k - 2;
        hi -= lo;
      }
    }
    printf("\n");
    notfirsttime = 1;
  }
}


x86 assembly (clang, -O0):
<print_spec_indented_and_max_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1417 <print_spec_indented_and_max_length+0x2e7>
mov    -0x24(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x20(%rbp),%eax
jl     1212 <print_spec_indented_and_max_length+0xe2>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11be <print_spec_indented_and_max_length+0x8e>
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1196 <print_spec_indented_and_max_length+0x66>
mov    -0x1c(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    11fb <print_spec_indented_and_max_length+0xcb>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe1f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11c7 <print_spec_indented_and_max_length+0x97>
mov    -0x18(%rbp),%rsi
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1417 <print_spec_indented_and_max_length+0x2e7>
jmp    1217 <print_spec_indented_and_max_length+0xe7>
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <isspace@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x35(%rbp)
jne    1244 <print_spec_indented_and_max_length+0x114>
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
setg   %al
mov    %al,-0x35(%rbp)
mov    -0x35(%rbp),%al
test   $0x1,%al
jne    1254 <print_spec_indented_and_max_length+0x124>
jmp    1262 <print_spec_indented_and_max_length+0x132>
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
jmp    1217 <print_spec_indented_and_max_length+0xe7>
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jne    12c7 <print_spec_indented_and_max_length+0x197>
mov    -0x24(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <isspace@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x36(%rbp)
jne    12a4 <print_spec_indented_and_max_length+0x174>
mov    -0x28(%rbp),%eax
cmp    -0x20(%rbp),%eax
setl   %al
mov    %al,-0x36(%rbp)
mov    -0x36(%rbp),%al
test   $0x1,%al
jne    12b4 <print_spec_indented_and_max_length+0x184>
jmp    12c2 <print_spec_indented_and_max_length+0x192>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1277 <print_spec_indented_and_max_length+0x147>
jmp    12c7 <print_spec_indented_and_max_length+0x197>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    12f6 <print_spec_indented_and_max_length+0x1c6>
lea    0xd1f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12ce <print_spec_indented_and_max_length+0x19e>
mov    -0x1c(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    13fd <print_spec_indented_and_max_length+0x2cd>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xce7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    13ea <print_spec_indented_and_max_length+0x2ba>
movl   $0x0,-0x30(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1373 <print_spec_indented_and_max_length+0x243>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1347 <print_spec_indented_and_max_length+0x217>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x30(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    13a7 <print_spec_indented_and_max_length+0x277>
lea    0xc78(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    137a <print_spec_indented_and_max_length+0x24a>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    13d6 <print_spec_indented_and_max_length+0x2a6>
lea    0xc3f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    13ae <print_spec_indented_and_max_length+0x27e>
mov    -0x34(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x28(%rbp)
jmp    13ef <print_spec_indented_and_max_length+0x2bf>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12ff <print_spec_indented_and_max_length+0x1cf>
lea    0xc06(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x1c(%rbp)
jmp    116e <print_spec_indented_and_max_length+0x3e>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_spec_indented_and_max_length>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rcx,0x28(%rsp)
mov    %edx,%r15d
mov    %rsi,0x20(%rsp)
mov    %rdi,%r12
call   1050 <strlen@plt>
test   %eax,%eax
jle    1364 <print_spec_indented_and_max_length+0x214>
mov    %eax,%ebx
mov    %eax,%eax
mov    %rax,0x18(%rsp)
mov    0x20(%rsp),%rax
mov    %eax,%ecx
not    %ecx
mov    %ecx,0x10(%rsp)
add    $0xffffffff,%eax
mov    %rax,0x30(%rsp)
lea    -0x1(%r15),%eax
mov    %eax,0x4(%rsp)
lea    0x1(%r12),%rax
mov    %rax,0x40(%rsp)
xor    %r13d,%r13d
xor    %ebp,%ebp
mov    %r12,0x8(%rsp)
mov    %r15,0x38(%rsp)
mov    %ebx,0x14(%rsp)
jmp    11e1 <print_spec_indented_and_max_length+0x91>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%ebp
mov    0x14(%rsp),%ebx
cmp    %ebx,%r12d
mov    0x8(%rsp),%r12
jge    1364 <print_spec_indented_and_max_length+0x214>
mov    0x20(%rsp),%rax
add    %r13d,%eax
cmp    %ebx,%eax
jge    1373 <print_spec_indented_and_max_length+0x223>
mov    %ebp,(%rsp)
movslq %eax,%r15
movslq %r13d,%r14
mov    0x10(%rsp),%ebp
mov    %r15,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r12,%rbx,1),%edi
call   1070 <isspace@plt>
add    $0x1,%ebp
test   %eax,%eax
jne    122d <print_spec_indented_and_max_length+0xdd>
lea    -0x1(%rbx),%rax
cmp    %r14,%rbx
mov    %rax,%rbx
jg     1210 <print_spec_indented_and_max_length+0xc0>
test   %ebp,%ebp
mov    0x18(%rsp),%rbx
je     1250 <print_spec_indented_and_max_length+0x100>
mov    %r13d,%r12d
sub    %ebp,%r12d
lea    0xdbd(%rip),%rbp
mov    (%rsp),%r14d
jmp    12a0 <print_spec_indented_and_max_length+0x150>
nopl   0x0(%rax)
mov    0x30(%rsp),%rax
lea    (%rax,%r13,1),%r12d
lea    0xda0(%rip),%rbp
mov    (%rsp),%r14d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rsp),%rax
movsbl (%rax,%r15,1),%edi
call   1070 <isspace@plt>
add    $0x1,%r12d
test   %eax,%eax
jne    12a0 <print_spec_indented_and_max_length+0x150>
lea    0x1(%r15),%rax
cmp    %rbx,%r15
mov    %rax,%r15
jl     1270 <print_spec_indented_and_max_length+0x120>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x38(%rsp),%r15
cmp    $0x2,%r15d
jl     12bf <print_spec_indented_and_max_length+0x16f>
mov    0x4(%rsp),%ebx
nop
mov    %rbp,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0xffffffff,%ebx
jne    12b0 <print_spec_indented_and_max_length+0x160>
add    %r14d,%r13d
jmp    12e5 <print_spec_indented_and_max_length+0x195>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
sub    %r13d,%r12d
sub    %r14d,%r13d
add    $0xfffffffe,%r13d
add    %r14d,%r12d
add    $0x2,%r12d
add    $0x1,%r13d
cmp    %r12d,%r13d
jge    11c0 <print_spec_indented_and_max_length+0x70>
movslq %r13d,%rbp
mov    0x8(%rsp),%rbx
movsbl (%rbx,%rbp,1),%edi
call   1030 <putchar@plt>
cmpb   $0xa,(%rbx,%rbp,1)
jne    12e1 <print_spec_indented_and_max_length+0x191>
add    0x40(%rsp),%rbp
xor    %r14d,%r14d
nopl   (%rax)
mov    %r14d,%ebx
lea    -0x1(%rbx),%r14d
cmpb   $0xa,0x0(%rbp)
lea    0x1(%rbp),%rbp
je     1310 <print_spec_indented_and_max_length+0x1c0>
mov    %r14d,%eax
not    %eax
cmp    $0x2,%eax
jb     133f <print_spec_indented_and_max_length+0x1ef>
not    %ebx
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1330 <print_spec_indented_and_max_length+0x1e0>
mov    0x4(%rsp),%ebx
cmp    $0x2,%r15d
lea    0xcb2(%rip),%rbp
jl     12d0 <print_spec_indented_and_max_length+0x180>
mov    %rbp,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0xffffffff,%ebx
jne    1350 <print_spec_indented_and_max_length+0x200>
jmp    12d0 <print_spec_indented_and_max_length+0x180>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmp    $0x2,%r15d
jl     13a0 <print_spec_indented_and_max_length+0x250>
add    $0xffffffff,%r15d
lea    0xc7c(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0xffffffff,%r15d
jne    1390 <print_spec_indented_and_max_length+0x240>
add    %ebp,%r13d
cmp    %ebx,%r13d
mov    0x18(%rsp),%rbp
jge    13c3 <print_spec_indented_and_max_length+0x273>
movslq %r13d,%rbx
movsbl (%r12,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbp,%rbx
jl     13b0 <print_spec_indented_and_max_length+0x260>
mov    0x28(%rsp),%rdi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [5 x i8] c" \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @print_spec_indented_and_max_length(i8* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
store i32 0, i32* %9
%16 = load i8*, i8** %5
%17 = call i32 @strlen(i8* %16)
store i32 %17, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %14
br label %18
18: ; preds = %185, %4
%19 = load i32, i32* %12
%20 = load i32, i32* %10
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %187
22: ; preds = %18
%23 = load i32, i32* %11
%24 = load i32, i32* %6
%25 = add nsw i32 %23, %24
store i32 %25, i32* %12
%26 = load i32, i32* %12
%27 = load i32, i32* %10
%28 = icmp sge i32 %26, %27
br i1 %28, label %29, label %61
29: ; preds = %22
store i32 1, i32* %13
br label %30
30: ; preds = %36, %29
%31 = load i32, i32* %13
%32 = load i32, i32* %7
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %39
34: ; preds = %30
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %36
36: ; preds = %34
%37 = load i32, i32* %13
%38 = add nsw i32 %37, 1
store i32 %38, i32* %13
br label %30
39: ; preds = %30
%40 = load i32, i32* %9
%41 = load i32, i32* %11
%42 = add nsw i32 %41, %40
store i32 %42, i32* %11
br label %43
43: ; preds = %55, %39
%44 = load i32, i32* %11
%45 = load i32, i32* %10
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %58
47: ; preds = %43
%48 = load i8*, i8** %5
%49 = load i32, i32* %11
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8, i8* %48, i64 %50
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %53)
br label %55
55: ; preds = %47
%56 = load i32, i32* %11
%57 = add nsw i32 %56, 1
store i32 %57, i32* %11
br label %43
58: ; preds = %43
%59 = load i8*, i8** %8
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %59)
br label %187
61: ; preds = %22
br label %62
62: ; preds = %76, %61
%63 = load i8*, i8** %5
%64 = load i32, i32* %12
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i8, i8* %63, i64 %65
%67 = load i8, i8* %66
%68 = call i32 @isspace(i8 signext %67)
%69 = icmp ne i32 %68, 0
br i1 %69, label %74, label %70
70: ; preds = %62
%71 = load i32, i32* %12
%72 = load i32, i32* %11
%73 = icmp sgt i32 %71, %72
br label %74
74: ; preds = %70, %62
%75 = phi i1 [ false, %62 ], [ %73, %70 ]
br i1 %75, label %76, label %79
76: ; preds = %74
%77 = load i32, i32* %12
%78 = add nsw i32 %77, -1
store i32 %78, i32* %12
br label %62
79: ; preds = %74
%80 = load i32, i32* %12
%81 = load i32, i32* %11
%82 = icmp eq i32 %80, %81
br i1 %82, label %83, label %105
83: ; preds = %79
%84 = load i32, i32* %11
%85 = load i32, i32* %6
%86 = add nsw i32 %84, %85
store i32 %86, i32* %12
br label %87
87: ; preds = %101, %83
%88 = load i8*, i8** %5
%89 = load i32, i32* %12
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8, i8* %88, i64 %90
%92 = load i8, i8* %91
%93 = call i32 @isspace(i8 signext %92)
%94 = icmp ne i32 %93, 0
br i1 %94, label %99, label %95
95: ; preds = %87
%96 = load i32, i32* %12
%97 = load i32, i32* %10
%98 = icmp slt i32 %96, %97
br label %99
99: ; preds = %95, %87
%100 = phi i1 [ false, %87 ], [ %98, %95 ]
br i1 %100, label %101, label %104
101: ; preds = %99
%102 = load i32, i32* %12
%103 = add nsw i32 %102, 1
store i32 %103, i32* %12
br label %87
104: ; preds = %99
br label %105
105: ; preds = %104, %79
store i32 1, i32* %13
br label %106
106: ; preds = %112, %105
%107 = load i32, i32* %13
%108 = load i32, i32* %7
%109 = icmp slt i32 %107, %108
br i1 %109, label %110, label %115
110: ; preds = %106
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %112
112: ; preds = %110
%113 = load i32, i32* %13
%114 = add nsw i32 %113, 1
store i32 %114, i32* %13
br label %106
115: ; preds = %106
%116 = load i32, i32* %9
%117 = load i32, i32* %11
%118 = add nsw i32 %117, %116
store i32 %118, i32* %11
br label %119
119: ; preds = %182, %115
%120 = load i32, i32* %11
%121 = load i32, i32* %12
%122 = icmp slt i32 %120, %121
br i1 %122, label %123, label %185
123: ; preds = %119
%124 = load i8*, i8** %5
%125 = load i32, i32* %11
%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 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %129)
%131 = load i8*, i8** %5
%132 = load i32, i32* %11
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds i8, i8* %131, i64 %133
%135 = load i8, i8* %134
%136 = sext i8 %135 to i32
%137 = icmp eq i32 %136, 10
br i1 %137, label %138, label %181
138: ; preds = %123
store i32 0, i32* %14
%139 = load i32, i32* %11
store i32 %139, i32* %15
br label %140
140: ; preds = %151, %138
%141 = load i8*, i8** %5
%142 = load i32, i32* %15
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds i8, i8* %141, i64 %143
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = icmp eq i32 %146, 10
br i1 %147, label %148, label %154
148: ; preds = %140
%149 = load i32, i32* %14
%150 = add nsw i32 %149, 1
store i32 %150, i32* %14
br label %151
151: ; preds = %148
%152 = load i32, i32* %15
%153 = add nsw i32 %152, 1
store i32 %153, i32* %15
br label %140
154: ; preds = %140
store i32 0, i32* %13
br label %155
155: ; preds = %162, %154
%156 = load i32, i32* %13
%157 = load i32, i32* %14
%158 = sub nsw i32 %157, 2
%159 = icmp slt i32 %156, %158
br i1 %159, label %160, label %165
160: ; preds = %155
%161 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %162
162: ; preds = %160
%163 = load i32, i32* %13
%164 = add nsw i32 %163, 1
store i32 %164, i32* %13
br label %155
165: ; preds = %155
store i32 1, i32* %13
br label %166
166: ; preds = %172, %165
%167 = load i32, i32* %13
%168 = load i32, i32* %7
%169 = icmp slt i32 %167, %168
br i1 %169, label %170, label %175
170: ; preds = %166
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %172
172: ; preds = %170
%173 = load i32, i32* %13
%174 = add nsw i32 %173, 1
store i32 %174, i32* %13
br label %166
175: ; preds = %166
%176 = load i32, i32* %15
%177 = sub nsw i32 %176, 2
store i32 %177, i32* %11
%178 = load i32, i32* %11
%179 = load i32, i32* %12
%180 = sub nsw i32 %179, %178
store i32 %180, i32* %12
br label %181
181: ; preds = %175, %123
br label %182
182: ; preds = %181
%183 = load i32, i32* %11
%184 = add nsw i32 %183, 1
store i32 %184, i32* %11
br label %119
185: ; preds = %119
%186 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %9
br label %18
187: ; preds = %58, %18
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c" \00"
define void @print_spec_indented_and_max_length(i8* %0, i32 %1, i32 %2, i8* nocapture %3) {
%5 = tail call i32 @strlen(i8* %0)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %118
7: ; preds = %4
%8 = icmp sgt i32 %2, 1
%9 = zext i32 %5 to i64
br label %10
10: ; preds = %7, %113
%11 = phi i32 [ 0, %7 ], [ %114, %113 ]
%12 = phi i32 [ 0, %7 ], [ 1, %113 ]
%13 = add i32 %11, %1
%14 = icmp slt i32 %13, %5
br i1 %14, label %15, label %18
15: ; preds = %10
%16 = sext i32 %13 to i64
%17 = sext i32 %11 to i64
br label %39
18: ; preds = %10
br i1 %8, label %19, label %24
19: ; preds = %18, %19
%20 = phi i32 [ %22, %19 ], [ 1, %18 ]
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%22 = add nuw nsw i32 %20, 1
%23 = icmp eq i32 %22, %2
br i1 %23, label %24, label %19
24: ; preds = %19, %18
%25 = add i32 %11, %12
%26 = icmp slt i32 %25, %5
br i1 %26, label %27, label %37
27: ; preds = %24
%28 = sext i32 %25 to i64
br label %29
29: ; preds = %27, %29
%30 = phi i64 [ %28, %27 ], [ %35, %29 ]
%31 = getelementptr inbounds i8, i8* %0, i64 %30
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = tail call i32 @putchar(i32 %33)
%35 = add nsw i64 %30, 1
%36 = icmp slt i64 %35, %9
br i1 %36, label %29, label %37
37: ; preds = %29, %24
%38 = tail call i32 @puts(i8* dereferenceable(1) %3)
br label %118
39: ; preds = %15, %39
%40 = phi i64 [ %16, %15 ], [ %47, %39 ]
%41 = getelementptr inbounds i8, i8* %0, i64 %40
%42 = load i8, i8* %41
%43 = tail call i32 @isspace(i8 signext %42)
%44 = icmp eq i32 %43, 0
%45 = icmp sgt i64 %40, %17
%46 = select i1 %44, i1 %45, i1 false
%47 = add nsw i64 %40, -1
br i1 %46, label %39, label %48
48: ; preds = %39
%49 = trunc i64 %40 to i32
%50 = icmp eq i32 %11, %49
br i1 %50, label %51, label %62
51: ; preds = %48, %51
%52 = phi i64 [ %59, %51 ], [ %16, %48 ]
%53 = getelementptr inbounds i8, i8* %0, i64 %52
%54 = load i8, i8* %53
%55 = tail call i32 @isspace(i8 signext %54)
%56 = icmp eq i32 %55, 0
%57 = icmp slt i64 %52, %9
%58 = select i1 %56, i1 %57, i1 false
%59 = add nsw i64 %52, 1
br i1 %58, label %51, label %60
60: ; preds = %51
%61 = trunc i64 %52 to i32
br label %62
62: ; preds = %60, %48
%63 = phi i32 [ %49, %48 ], [ %61, %60 ]
br i1 %8, label %64, label %69
64: ; preds = %62, %64
%65 = phi i32 [ %67, %64 ], [ 1, %62 ]
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%67 = add nuw nsw i32 %65, 1
%68 = icmp eq i32 %67, %2
br i1 %68, label %69, label %64
69: ; preds = %64, %62
%70 = add nsw i32 %11, %12
%71 = icmp slt i32 %70, %63
br i1 %71, label %72, label %113
72: ; preds = %69, %108
%73 = phi i32 [ %110, %108 ], [ %63, %69 ]
%74 = phi i32 [ %111, %108 ], [ %70, %69 ]
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i8, i8* %0, i64 %75
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
%79 = tail call i32 @putchar(i32 %78)
%80 = load i8, i8* %76
%81 = icmp eq i8 %80, 10
br i1 %81, label %86, label %108
82: ; preds = %86
%83 = trunc i64 %90 to i32
%84 = add nsw i32 %88, -1
%85 = icmp ugt i32 %88, 1
br i1 %85, label %95, label %94
86: ; preds = %72, %86
%87 = phi i64 [ %90, %86 ], [ %75, %72 ]
%88 = phi i32 [ %89, %86 ], [ 0, %72 ]
%89 = add nuw nsw i32 %88, 1
%90 = add i64 %87, 1
%91 = getelementptr inbounds i8, i8* %0, i64 %90
%92 = load i8, i8* %91
%93 = icmp eq i8 %92, 10
br i1 %93, label %86, label %82
94: ; preds = %95, %82
br i1 %8, label %100, label %105
95: ; preds = %82, %95
%96 = phi i32 [ %98, %95 ], [ 0, %82 ]
%97 = tail call i32 @putchar(i32 10)
%98 = add nuw nsw i32 %96, 1
%99 = icmp eq i32 %98, %84
br i1 %99, label %94, label %95
100: ; preds = %94, %100
%101 = phi i32 [ %103, %100 ], [ 1, %94 ]
%102 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%103 = add nuw nsw i32 %101, 1
%104 = icmp eq i32 %103, %2
br i1 %104, label %105, label %100
105: ; preds = %100, %94
%106 = add nsw i32 %83, -2
%107 = sub nsw i32 %73, %106
br label %108
108: ; preds = %72, %105
%109 = phi i32 [ %106, %105 ], [ %74, %72 ]
%110 = phi i32 [ %107, %105 ], [ %73, %72 ]
%111 = add nsw i32 %109, 1
%112 = icmp slt i32 %111, %110
br i1 %112, label %72, label %113
113: ; preds = %108, %69
%114 = phi i32 [ %70, %69 ], [ %111, %108 ]
%115 = phi i32 [ %63, %69 ], [ %110, %108 ]
%116 = tail call i32 @putchar(i32 10)
%117 = icmp slt i32 %115, %5
br i1 %117, label %10, label %118
118: ; preds = %113, %4, %37
ret void
}