void HandleNewSimpleTok(char c, char *Spew, char *CloseTags, int CIL,
                        const char *xmltag, int CommLevel, int p,
                        char *InnerClose) {
  char Temp[1000];
  if (CommLevel == 4) {
    printf("%s<%s>\n", indents(CIL, Temp), xmltag);
    printf("%s<box_subtext>", indents(CIL + 1, Temp));
    sprintf(InnerClose, "</box_subtext>", indents(CIL + 1, Temp));
    sprintf(CloseTags, "\n%s</%s>\n", indents(CIL, Temp), xmltag);
    sprintf(Spew, "%c", c);
  } else if (p > 0) {
    sprintf(Spew, " %c", c);
  } else {
    sprintf(Spew, "%c", c);
  }
}


x86 assembly (clang, -O0):
<HandleNewSimpleTok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %dil,%al
mov    0x18(%rbp),%rdi
mov    0x10(%rbp),%edi
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpl   $0x4,-0x2c(%rbp)
jne    1236 <HandleNewSimpleTok+0x106>
mov    -0x1c(%rbp),%edi
lea    -0x420(%rbp),%rsi
mov    $0x0,%al
call   1030 <indents@plt>
mov    %eax,%esi
mov    -0x28(%rbp),%rdx
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%edi
add    $0x1,%edi
lea    -0x420(%rbp),%rsi
mov    $0x0,%al
call   1030 <indents@plt>
mov    %eax,%esi
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x18(%rbp),%rax
mov    %rax,-0x430(%rbp)
mov    -0x1c(%rbp),%edi
add    $0x1,%edi
lea    -0x420(%rbp),%rsi
mov    $0x0,%al
call   1030 <indents@plt>
mov    -0x430(%rbp),%rdi
mov    %eax,%edx
lea    0xe3b(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x428(%rbp)
mov    -0x1c(%rbp),%edi
lea    -0x420(%rbp),%rsi
mov    $0x0,%al
call   1030 <indents@plt>
mov    -0x428(%rbp),%rdi
mov    %eax,%edx
mov    -0x28(%rbp),%rcx
lea    0xe13(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rdi
movsbl -0x1(%rbp),%edx
lea    0xe08(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    1276 <HandleNewSimpleTok+0x146>
cmpl   $0x0,0x10(%rbp)
jle    125b <HandleNewSimpleTok+0x12b>
mov    -0x10(%rbp),%rdi
movsbl -0x1(%rbp),%edx
lea    0xde2(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    1271 <HandleNewSimpleTok+0x141>
mov    -0x10(%rbp),%rdi
movsbl -0x1(%rbp),%edx
lea    0xdc8(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
jmp    1276 <HandleNewSimpleTok+0x146>
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HandleNewSimpleTok>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3f8,%rsp
mov    %rsi,%rbx
mov    %edi,%r14d
cmp    $0x4,%r9d
jne    11f3 <HandleNewSimpleTok+0xc3>
mov    %r8,%r12
mov    %ecx,%ebp
mov    0x438(%rsp),%rax
mov    %rax,(%rsp)
lea    0x10(%rsp),%r13
mov    %ecx,%edi
mov    %r13,%rsi
xor    %eax,%eax
mov    %rdx,0x8(%rsp)
call   1030 <indents@plt>
lea    0xe81(%rip),%rdi
mov    %eax,%esi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1(%rbp),%r15d
mov    %r15d,%edi
mov    %r13,%rsi
xor    %eax,%eax
call   1030 <indents@plt>
lea    0xe65(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15d,%edi
mov    %r13,%rsi
xor    %eax,%eax
call   1030 <indents@plt>
lea    0xe58(%rip),%rsi
mov    (%rsp),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    %ebp,%edi
mov    %r13,%rsi
xor    %eax,%eax
call   1030 <indents@plt>
lea    0xe47(%rip),%rsi
mov    0x8(%rsp),%rdi
mov    %eax,%edx
mov    %r12,%rcx
xor    %eax,%eax
call   1050 <sprintf@plt>
jmp    1223 <HandleNewSimpleTok+0xf3>
cmpl   $0x0,0x430(%rsp)
jle    1223 <HandleNewSimpleTok+0xf3>
movsbl %r14b,%edx
lea    0xe29(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
add    $0x3f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <sprintf@plt>
mov    %r14b,(%rbx)
movb   $0x0,0x1(%rbx)
add    $0x3f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%s<%s>\0A\00"
@.str.1 = [16 x i8] c"%s<box_subtext>\00"
@.str.2 = [15 x i8] c"</box_subtext>\00"
@.str.3 = [10 x i8] c"\0A%s</%s>\0A\00"
@.str.4 = [3 x i8] c"%c\00"
@.str.5 = [4 x i8] c" %c\00"
define void @HandleNewSimpleTok(i8 signext %0, i8* %1, i8* %2, i32 %3, i8* %4, i32 %5, i32 %6, i8* %7) {
%9 = alloca i8
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i8*
%17 = alloca [1000 x i8]
store i8 %0, i8* %9
store i8* %1, i8** %10
store i8* %2, i8** %11
store i32 %3, i32* %12
store i8* %4, i8** %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i8* %7, i8** %16
%18 = load i32, i32* %14
%19 = icmp eq i32 %18, 4
br i1 %19, label %20, label %47
20: ; preds = %8
%21 = load i32, i32* %12
%22 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%23 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @indents to i32 (i32, i8*, ...)*)(i32 %21, i8* %22)
%24 = load i8*, i8** %13
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %23, i8* %24)
%26 = load i32, i32* %12
%27 = add nsw i32 %26, 1
%28 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%29 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @indents to i32 (i32, i8*, ...)*)(i32 %27, i8* %28)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%31 = load i8*, i8** %16
%32 = load i32, i32* %12
%33 = add nsw i32 %32, 1
%34 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%35 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @indents to i32 (i32, i8*, ...)*)(i32 %33, i8* %34)
%36 = call i32 (i8*, i8*, ...) @sprintf(i8* %31, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %35)
%37 = load i8*, i8** %11
%38 = load i32, i32* %12
%39 = getelementptr inbounds [1000 x i8], [1000 x i8]* %17, i64 0, i64 0
%40 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @indents to i32 (i32, i8*, ...)*)(i32 %38, i8* %39)
%41 = load i8*, i8** %13
%42 = call i32 (i8*, i8*, ...) @sprintf(i8* %37, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %40, i8* %41)
%43 = load i8*, i8** %10
%44 = load i8, i8* %9
%45 = sext i8 %44 to i32
%46 = call i32 (i8*, i8*, ...) @sprintf(i8* %43, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %45)
br label %61
47: ; preds = %8
%48 = load i32, i32* %15
%49 = icmp sgt i32 %48, 0
br i1 %49, label %50, label %55
50: ; preds = %47
%51 = load i8*, i8** %10
%52 = load i8, i8* %9
%53 = sext i8 %52 to i32
%54 = call i32 (i8*, i8*, ...) @sprintf(i8* %51, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %53)
br label %60
55: ; preds = %47
%56 = load i8*, i8** %10
%57 = load i8, i8* %9
%58 = sext i8 %57 to i32
%59 = call i32 (i8*, i8*, ...) @sprintf(i8* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %58)
br label %60
60: ; preds = %55, %50
br label %61
61: ; preds = %60, %20
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s<%s>\0A\00"
@.str.1 = [16 x i8] c"%s<box_subtext>\00"
@.str.2 = [15 x i8] c"</box_subtext>\00"
@.str.3 = [10 x i8] c"\0A%s</%s>\0A\00"
@.str.5 = [4 x i8] c" %c\00"
define void @HandleNewSimpleTok(i8 signext %0, i8* nocapture writeonly %1, i8* nocapture writeonly %2, i32 %3, i8* %4, i32 %5, i32 %6, i8* nocapture writeonly %7) {
%9 = alloca [1000 x i8]
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
%11 = icmp eq i32 %5, 4
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @indents to i32 (i32, i8*, ...)*)(i32 %3, i8* %10)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %13, i8* %4)
%15 = add nsw i32 %3, 1
%16 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @indents to i32 (i32, i8*, ...)*)(i32 %15, i8* %10)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @indents to i32 (i32, i8*, ...)*)(i32 %15, i8* %10)
%19 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %7, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %18)
%20 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @indents to i32 (i32, i8*, ...)*)(i32 %3, i8* %10)
%21 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %20, i8* %4)
store i8 %0, i8* %1
%22 = getelementptr i8, i8* %1, i64 1
store i8 0, i8* %22
br label %30
23: ; preds = %8
%24 = icmp sgt i32 %6, 0
br i1 %24, label %25, label %28
25: ; preds = %23
%26 = sext i8 %0 to i32
%27 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %26)
br label %30
28: ; preds = %23
store i8 %0, i8* %1
%29 = getelementptr i8, i8* %1, i64 1
store i8 0, i8* %29
br label %30
30: ; preds = %25, %28, %12
ret void
}