#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
char *indents(int, char *);
int /*<<< orphan*/ isdigit(char);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, ...);
int /*<<< orphan*/ stderr;
void HandleWidthHeight(char *S, char *Spew, int CIL, int CommLevel, int *p) {
  char wstr[500];
  char hstr[500];
  int i = 0;
  char Temp[1000];
  (*p)++;
  while (S[(*p)] != 'x') {
    if (!isdigit(S[(*p)])) {
      fprintf(stderr,
              "Error processing width portion of WxH specification in arg "
              "string \"%s\".  Expecting a digit and got \"%c\"\n",
              S, S[*p]);
      exit(1);
    }
    wstr[i++] = S[*p];
    (*p)++;
    if (i > 4) {
      fprintf(stderr,
              "Error processing width portion of WxH specification in arg "
              "string \"%s\".  Too many digits preceding the \"x\"",
              S);
      exit(1);
    }
  }
  wstr[i] = '\0';
  i = 0;
  (*p)++;
  while (S[*p] != '$') {
    if (!isdigit(S[*p])) {
      fprintf(stderr,
              "Error processing height portion of WxH specification in arg "
              "string \"%s\".  Expecting a digit and got \"%c\"\n",
              S, S[*p]);
      exit(1);
    }
    hstr[i++] = S[*p];
    (*p)++;
    if (i > 4) {
      fprintf(stderr,
              "Error processing height portion of WxH specification in arg "
              "string \"%s\".  Too many digits preceding the second \"$\"",
              S);
      exit(1);
    }
  }
  hstr[i] = '\0';
  Spew[0] = '\0';
  if (CommLevel == 4) {
    sprintf(Spew, "\n%s<box_width>%s</box_width>", indents(CIL + 1, Temp),
            wstr);
    sprintf(Spew, "%s\n%s<box_height>%s</box_height>", Spew,
            indents(CIL + 1, Temp), hstr);
  }
}


x86 assembly (clang, -O0):
<HandleWidthHeight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x830,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
movl   $0x0,-0x424(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x78,%eax
je     1255 <HandleWidthHeight+0x105>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    11eb <HandleWidthHeight+0x9b>
mov    0x2e22(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
movsbl (%rax,%rcx,1),%ecx
lea    0xe26(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x424(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x424(%rbp)
cltq
mov    %cl,-0x220(%rbp,%rax,1)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
cmpl   $0x4,-0x424(%rbp)
jle    1250 <HandleWidthHeight+0x100>
mov    0x2dae(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe2a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
jmp    1182 <HandleWidthHeight+0x32>
movslq -0x424(%rbp),%rax
movb   $0x0,-0x220(%rbp,%rax,1)
movl   $0x0,-0x424(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x24,%eax
je     134c <HandleWidthHeight+0x1fc>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    12e2 <HandleWidthHeight+0x192>
mov    0x2d2b(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
movsbl (%rax,%rcx,1),%ecx
lea    0xe03(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x424(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x424(%rbp)
cltq
mov    %cl,-0x420(%rbp,%rax,1)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
cmpl   $0x4,-0x424(%rbp)
jle    1347 <HandleWidthHeight+0x1f7>
mov    0x2cb7(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe08(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
jmp    1279 <HandleWidthHeight+0x129>
movslq -0x424(%rbp),%rax
movb   $0x0,-0x420(%rbp,%rax,1)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
cmpl   $0x4,-0x18(%rbp)
jne    13f6 <HandleWidthHeight+0x2a6>
mov    -0x10(%rbp),%rax
mov    %rax,-0x828(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
lea    -0x810(%rbp),%rsi
call   1040 <indents@plt>
mov    -0x828(%rbp),%rdi
mov    %rax,%rdx
lea    -0x220(%rbp),%rcx
lea    0xe10(%rip),%rsi
mov    $0x0,%al
call   1060 <sprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x820(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x818(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
lea    -0x810(%rbp),%rsi
call   1040 <indents@plt>
mov    -0x820(%rbp),%rdi
mov    -0x818(%rbp),%rdx
mov    %rax,%rcx
lea    -0x420(%rbp),%r8
lea    0xddf(%rip),%rsi
mov    $0x0,%al
call   1060 <sprintf@plt>
add    $0x830,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HandleWidthHeight>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x7f0,%rsp
mov    %r8,%rbp
mov    %ecx,%r12d
mov    %edx,%r15d
mov    %rsi,%r14
mov    %rdi,%rbx
movslq (%r8),%rcx
lea    0x1(%rcx),%rax
mov    %eax,(%r8)
mov    0x1(%rdi,%rcx,1),%cl
cmp    $0x78,%cl
jne    1188 <HandleWidthHeight+0x38>
xor    %ecx,%ecx
jmp    125c <HandleWidthHeight+0x10c>
movsbl %cl,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     13c5 <HandleWidthHeight+0x275>
movslq 0x0(%rbp),%rcx
mov    (%rbx,%rcx,1),%al
mov    %al,0x200(%rsp)
lea    0x1(%rcx),%rax
mov    %eax,0x0(%rbp)
mov    0x1(%rbx,%rcx,1),%dl
mov    $0x1,%ecx
cmp    $0x78,%dl
je     125c <HandleWidthHeight+0x10c>
movsbl %dl,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     13c5 <HandleWidthHeight+0x275>
movslq 0x0(%rbp),%rcx
mov    (%rbx,%rcx,1),%al
mov    %al,0x201(%rsp)
lea    0x1(%rcx),%rax
mov    %eax,0x0(%rbp)
mov    0x1(%rbx,%rcx,1),%dl
mov    $0x2,%ecx
cmp    $0x78,%dl
je     125c <HandleWidthHeight+0x10c>
movsbl %dl,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     13c5 <HandleWidthHeight+0x275>
movslq 0x0(%rbp),%rcx
mov    (%rbx,%rcx,1),%al
mov    %al,0x202(%rsp)
lea    0x1(%rcx),%rax
mov    %eax,0x0(%rbp)
mov    0x1(%rbx,%rcx,1),%dl
mov    $0x3,%ecx
cmp    $0x78,%dl
je     125c <HandleWidthHeight+0x10c>
movsbl %dl,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     13c5 <HandleWidthHeight+0x275>
movslq 0x0(%rbp),%rcx
mov    (%rbx,%rcx,1),%al
mov    %al,0x203(%rsp)
lea    0x1(%rcx),%rax
mov    %eax,0x0(%rbp)
mov    0x1(%rbx,%rcx,1),%dl
mov    $0x4,%ecx
cmp    $0x78,%dl
jne    13b9 <HandleWidthHeight+0x269>
movb   $0x0,0x200(%rsp,%rcx,1)
cltq
lea    0x1(%rax),%rcx
mov    %ecx,0x0(%rbp)
mov    0x1(%rbx,%rax,1),%al
cmp    $0x24,%al
jne    127c <HandleWidthHeight+0x12c>
xor    %eax,%eax
jmp    1343 <HandleWidthHeight+0x1f3>
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     13eb <HandleWidthHeight+0x29b>
movslq 0x0(%rbp),%rax
mov    (%rbx,%rax,1),%cl
mov    %cl,(%rsp)
lea    0x1(%rax),%rcx
mov    %ecx,0x0(%rbp)
mov    0x1(%rbx,%rax,1),%cl
mov    $0x1,%eax
cmp    $0x24,%cl
je     1343 <HandleWidthHeight+0x1f3>
movsbl %cl,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     13eb <HandleWidthHeight+0x29b>
movslq 0x0(%rbp),%rax
mov    (%rbx,%rax,1),%cl
mov    %cl,0x1(%rsp)
lea    0x1(%rax),%rcx
mov    %ecx,0x0(%rbp)
mov    0x1(%rbx,%rax,1),%cl
mov    $0x2,%eax
cmp    $0x24,%cl
je     1343 <HandleWidthHeight+0x1f3>
movsbl %cl,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     13eb <HandleWidthHeight+0x29b>
movslq 0x0(%rbp),%rax
mov    (%rbx,%rax,1),%cl
mov    %cl,0x2(%rsp)
lea    0x1(%rax),%rcx
mov    %ecx,0x0(%rbp)
mov    0x1(%rbx,%rax,1),%cl
mov    $0x3,%eax
cmp    $0x24,%cl
je     1343 <HandleWidthHeight+0x1f3>
movsbl %cl,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     13eb <HandleWidthHeight+0x29b>
movslq 0x0(%rbp),%rax
mov    (%rbx,%rax,1),%cl
mov    %cl,0x3(%rsp)
lea    0x1(%rax),%rcx
mov    %ecx,0x0(%rbp)
mov    0x1(%rbx,%rax,1),%cl
mov    $0x4,%eax
cmp    $0x24,%cl
jne    13df <HandleWidthHeight+0x28f>
movb   $0x0,(%rsp,%rax,1)
movb   $0x0,(%r14)
cmp    $0x4,%r12d
jne    13a9 <HandleWidthHeight+0x259>
add    $0x1,%r15d
lea    0x400(%rsp),%rbx
mov    %r15d,%edi
mov    %rbx,%rsi
call   1040 <indents@plt>
lea    0xe42(%rip),%rsi
lea    0x200(%rsp),%rcx
mov    %r14,%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   1060 <sprintf@plt>
mov    %r15d,%edi
mov    %rbx,%rsi
call   1040 <indents@plt>
lea    0xe38(%rip),%rsi
mov    %rsp,%r8
mov    %r14,%rdi
mov    %r14,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1060 <sprintf@plt>
add    $0x7f0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
movsbl %dl,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
jne    1417 <HandleWidthHeight+0x2c7>
mov    0x2c14(%rip),%rax
mov    (%rax),%edi
movslq 0x0(%rbp),%rax
movsbl (%rbx,%rax,1),%ecx
lea    0xc23(%rip),%rsi
jmp    1403 <HandleWidthHeight+0x2b3>
movsbl %cl,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
jne    142d <HandleWidthHeight+0x2dd>
mov    0x2bee(%rip),%rax
mov    (%rax),%edi
movslq 0x0(%rbp),%rax
movsbl (%rbx,%rax,1),%ecx
lea    0xcd1(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
addl   $0x1,0x0(%rbp)
mov    0x2bbe(%rip),%rax
mov    (%rax),%edi
lea    0xc3e(%rip),%rsi
jmp    1441 <HandleWidthHeight+0x2f1>
addl   $0x1,0x0(%rbp)
mov    0x2ba8(%rip),%rax
mov    (%rax),%edi
lea    0xcfd(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [105 x i8] c"Error processing width portion of WxH specification in arg string \22%s\22. Expecting a digit and got \22%c\22\0A\00"
@.str.1 = [107 x i8] c"Error processing width portion of WxH specification in arg string \22%s\22. Too many digits preceding the \22x\22\00"
@.str.2 = [106 x i8] c"Error processing height portion of WxH specification in arg string \22%s\22. Expecting a digit and got \22%c\22\0A\00"
@.str.3 = [115 x i8] c"Error processing height portion of WxH specification in arg string \22%s\22. Too many digits preceding the second \22$\22\00"
@.str.4 = [29 x i8] c"\0A%s<box_width>%s</box_width>\00"
@.str.5 = [33 x i8] c"%s\0A%s<box_height>%s</box_height>\00"
define void @HandleWidthHeight(i8* %0, i8* %1, i32 %2, i32 %3, i32* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca [500 x i8]
%12 = alloca [500 x i8]
%13 = alloca i32
%14 = alloca [1000 x i8]
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32* %4, i32** %10
store i32 0, i32* %13
%15 = load i32*, i32** %10
%16 = load i32, i32* %15
%17 = add nsw i32 %16, 1
store i32 %17, i32* %15
br label %18
18: ; preds = %69, %5
%19 = load i8*, i8** %6
%20 = load i32*, i32** %10
%21 = load i32, i32* %20
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %19, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 120
br i1 %26, label %27, label %70
27: ; preds = %18
%28 = load i8*, i8** %6
%29 = load i32*, i32** %10
%30 = load i32, i32* %29
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %28, i64 %31
%33 = load i8, i8* %32
%34 = call i32 @isdigit(i8 signext %33)
%35 = icmp ne i32 %34, 0
br i1 %35, label %48, label %36
36: ; preds = %27
%37 = load i32, i32* @stderr
%38 = load i8*, i8** %6
%39 = load i8*, i8** %6
%40 = load i32*, i32** %10
%41 = load i32, i32* %40
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8, i8* %39, i64 %42
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0), i8* %38, i32 %45)
%47 = call i32 @exit(i32 1)
unreachable
48: ; preds = %27
%49 = load i8*, i8** %6
%50 = load i32*, i32** %10
%51 = load i32, i32* %50
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8, i8* %49, i64 %52
%54 = load i8, i8* %53
%55 = load i32, i32* %13
%56 = add nsw i32 %55, 1
store i32 %56, i32* %13
%57 = sext i32 %55 to i64
%58 = getelementptr inbounds [500 x i8], [500 x i8]* %11, i64 0, i64 %57
store i8 %54, i8* %58
%59 = load i32*, i32** %10
%60 = load i32, i32* %59
%61 = add nsw i32 %60, 1
store i32 %61, i32* %59
%62 = load i32, i32* %13
%63 = icmp sgt i32 %62, 4
br i1 %63, label %64, label %69
64: ; preds = %48
%65 = load i32, i32* @stderr
%66 = load i8*, i8** %6
%67 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.1, i64 0, i64 0), i8* %66)
%68 = call i32 @exit(i32 1)
unreachable
69: ; preds = %48
br label %18
70: ; preds = %18
%71 = load i32, i32* %13
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [500 x i8], [500 x i8]* %11, i64 0, i64 %72
store i8 0, i8* %73
store i32 0, i32* %13
%74 = load i32*, i32** %10
%75 = load i32, i32* %74
%76 = add nsw i32 %75, 1
store i32 %76, i32* %74
br label %77
77: ; preds = %128, %70
%78 = load i8*, i8** %6
%79 = load i32*, i32** %10
%80 = load i32, i32* %79
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8, i8* %78, i64 %81
%83 = load i8, i8* %82
%84 = sext i8 %83 to i32
%85 = icmp ne i32 %84, 36
br i1 %85, label %86, label %129
86: ; preds = %77
%87 = load i8*, i8** %6
%88 = load i32*, i32** %10
%89 = load i32, i32* %88
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8, i8* %87, i64 %90
%92 = load i8, i8* %91
%93 = call i32 @isdigit(i8 signext %92)
%94 = icmp ne i32 %93, 0
br i1 %94, label %107, label %95
95: ; preds = %86
%96 = load i32, i32* @stderr
%97 = load i8*, i8** %6
%98 = load i8*, i8** %6
%99 = load i32*, i32** %10
%100 = load i32, i32* %99
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds i8, i8* %98, i64 %101
%103 = load i8, i8* %102
%104 = sext i8 %103 to i32
%105 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str.2, i64 0, i64 0), i8* %97, i32 %104)
%106 = call i32 @exit(i32 1)
unreachable
107: ; preds = %86
%108 = load i8*, i8** %6
%109 = load i32*, i32** %10
%110 = load i32, i32* %109
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds i8, i8* %108, i64 %111
%113 = load i8, i8* %112
%114 = load i32, i32* %13
%115 = add nsw i32 %114, 1
store i32 %115, i32* %13
%116 = sext i32 %114 to i64
%117 = getelementptr inbounds [500 x i8], [500 x i8]* %12, i64 0, i64 %116
store i8 %113, i8* %117
%118 = load i32*, i32** %10
%119 = load i32, i32* %118
%120 = add nsw i32 %119, 1
store i32 %120, i32* %118
%121 = load i32, i32* %13
%122 = icmp sgt i32 %121, 4
br i1 %122, label %123, label %128
123: ; preds = %107
%124 = load i32, i32* @stderr
%125 = load i8*, i8** %6
%126 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %124, i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str.3, i64 0, i64 0), i8* %125)
%127 = call i32 @exit(i32 1)
unreachable
128: ; preds = %107
br label %77
129: ; preds = %77
%130 = load i32, i32* %13
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [500 x i8], [500 x i8]* %12, i64 0, i64 %131
store i8 0, i8* %132
%133 = load i8*, i8** %7
%134 = getelementptr inbounds i8, i8* %133, i64 0
store i8 0, i8* %134
%135 = load i32, i32* %9
%136 = icmp eq i32 %135, 4
br i1 %136, label %137, label %153
137: ; preds = %129
%138 = load i8*, i8** %7
%139 = load i32, i32* %8
%140 = add nsw i32 %139, 1
%141 = getelementptr inbounds [1000 x i8], [1000 x i8]* %14, i64 0, i64 0
%142 = call i8* @indents(i32 %140, i8* %141)
%143 = getelementptr inbounds [500 x i8], [500 x i8]* %11, i64 0, i64 0
%144 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %138, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8* %142, i8* %143)
%145 = load i8*, i8** %7
%146 = load i8*, i8** %7
%147 = load i32, i32* %8
%148 = add nsw i32 %147, 1
%149 = getelementptr inbounds [1000 x i8], [1000 x i8]* %14, i64 0, i64 0
%150 = call i8* @indents(i32 %148, i8* %149)
%151 = getelementptr inbounds [500 x i8], [500 x i8]* %12, i64 0, i64 0
%152 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %145, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8* %146, i8* %150, i8* %151)
br label %153
153: ; preds = %137, %129
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [105 x i8] c"Error processing width portion of WxH specification in arg string \22%s\22. Expecting a digit and got \22%c\22\0A\00"
@.str.1 = [107 x i8] c"Error processing width portion of WxH specification in arg string \22%s\22. Too many digits preceding the \22x\22\00"
@.str.2 = [106 x i8] c"Error processing height portion of WxH specification in arg string \22%s\22. Expecting a digit and got \22%c\22\0A\00"
@.str.3 = [115 x i8] c"Error processing height portion of WxH specification in arg string \22%s\22. Too many digits preceding the second \22$\22\00"
@.str.4 = [29 x i8] c"\0A%s<box_width>%s</box_width>\00"
@.str.5 = [33 x i8] c"%s\0A%s<box_height>%s</box_height>\00"
define void @HandleWidthHeight(i8* %0, i8* %1, i32 %2, i32 %3, i32* nocapture %4) {
%6 = alloca [500 x i8]
%7 = alloca [500 x i8]
%8 = alloca [1000 x i8]
%9 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%10 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%11 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
store i32 %13, i32* %4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 120
br i1 %17, label %91, label %18
18: ; preds = %5
%19 = tail call i32 @isdigit(i8 signext %16)
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %30
21: ; preds = %82, %68, %54, %40, %18
%22 = load i32, i32* @stderr
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %0, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %27)
%29 = tail call i32 @exit(i32 1)
unreachable
30: ; preds = %18
%31 = load i32, i32* %4
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i8, i8* %0, i64 %32
%34 = load i8, i8* %33
store i8 %34, i8* %9
%35 = add nsw i32 %31, 1
store i32 %35, i32* %4
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8, i8* %0, i64 %36
%38 = load i8, i8* %37
%39 = icmp eq i8 %38, 120
br i1 %39, label %91, label %40
40: ; preds = %30
%41 = tail call i32 @isdigit(i8 signext %38)
%42 = icmp eq i32 %41, 0
br i1 %42, label %21, label %43
43: ; preds = %40
%44 = load i32, i32* %4
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8, i8* %0, i64 %45
%47 = load i8, i8* %46
%48 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 1
store i8 %47, i8* %48
%49 = add nsw i32 %44, 1
store i32 %49, i32* %4
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8, i8* %0, i64 %50
%52 = load i8, i8* %51
%53 = icmp eq i8 %52, 120
br i1 %53, label %91, label %54
54: ; preds = %43
%55 = tail call i32 @isdigit(i8 signext %52)
%56 = icmp eq i32 %55, 0
br i1 %56, label %21, label %57
57: ; preds = %54
%58 = load i32, i32* %4
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i8, i8* %0, i64 %59
%61 = load i8, i8* %60
%62 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 2
store i8 %61, i8* %62
%63 = add nsw i32 %58, 1
store i32 %63, i32* %4
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8, i8* %0, i64 %64
%66 = load i8, i8* %65
%67 = icmp eq i8 %66, 120
br i1 %67, label %91, label %68
68: ; preds = %57
%69 = tail call i32 @isdigit(i8 signext %66)
%70 = icmp eq i32 %69, 0
br i1 %70, label %21, label %71
71: ; preds = %68
%72 = load i32, i32* %4
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i8, i8* %0, i64 %73
%75 = load i8, i8* %74
%76 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 3
store i8 %75, i8* %76
%77 = add nsw i32 %72, 1
store i32 %77, i32* %4
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8, i8* %0, i64 %78
%80 = load i8, i8* %79
%81 = icmp eq i8 %80, 120
br i1 %81, label %91, label %82
82: ; preds = %71
%83 = tail call i32 @isdigit(i8 signext %80)
%84 = icmp eq i32 %83, 0
br i1 %84, label %21, label %85
85: ; preds = %82
%86 = load i32, i32* %4
%87 = add nsw i32 %86, 1
store i32 %87, i32* %4
%88 = load i32, i32* @stderr
%89 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%90 = tail call i32 @exit(i32 1)
unreachable
91: ; preds = %71, %57, %43, %30, %5
%92 = phi i64 [ 0, %5 ], [ 1, %30 ], [ 2, %43 ], [ 3, %57 ], [ 4, %71 ]
%93 = phi i32 [ %13, %5 ], [ %35, %30 ], [ %49, %43 ], [ %63, %57 ], [ %77, %71 ]
%94 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 %92
store i8 0, i8* %94
%95 = add nsw i32 %93, 1
store i32 %95, i32* %4
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i8, i8* %0, i64 %96
%98 = load i8, i8* %97
%99 = icmp eq i8 %98, 36
br i1 %99, label %173, label %100
100: ; preds = %91
%101 = tail call i32 @isdigit(i8 signext %98)
%102 = icmp eq i32 %101, 0
br i1 %102, label %103, label %112
103: ; preds = %164, %150, %136, %122, %100
%104 = load i32, i32* @stderr
%105 = load i32, i32* %4
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds i8, i8* %0, i64 %106
%108 = load i8, i8* %107
%109 = sext i8 %108 to i32
%110 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %104, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str.2, i64 0, i64 0), i8* %0, i32 %109)
%111 = tail call i32 @exit(i32 1)
unreachable
112: ; preds = %100
%113 = load i32, i32* %4
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds i8, i8* %0, i64 %114
%116 = load i8, i8* %115
store i8 %116, i8* %10
%117 = add nsw i32 %113, 1
store i32 %117, i32* %4
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i8, i8* %0, i64 %118
%120 = load i8, i8* %119
%121 = icmp eq i8 %120, 36
br i1 %121, label %173, label %122
122: ; preds = %112
%123 = tail call i32 @isdigit(i8 signext %120)
%124 = icmp eq i32 %123, 0
br i1 %124, label %103, label %125
125: ; preds = %122
%126 = load i32, i32* %4
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds i8, i8* %0, i64 %127
%129 = load i8, i8* %128
%130 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 1
store i8 %129, i8* %130
%131 = add nsw i32 %126, 1
store i32 %131, i32* %4
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds i8, i8* %0, i64 %132
%134 = load i8, i8* %133
%135 = icmp eq i8 %134, 36
br i1 %135, label %173, label %136
136: ; preds = %125
%137 = tail call i32 @isdigit(i8 signext %134)
%138 = icmp eq i32 %137, 0
br i1 %138, label %103, label %139
139: ; preds = %136
%140 = load i32, i32* %4
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds i8, i8* %0, i64 %141
%143 = load i8, i8* %142
%144 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 2
store i8 %143, i8* %144
%145 = add nsw i32 %140, 1
store i32 %145, i32* %4
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds i8, i8* %0, i64 %146
%148 = load i8, i8* %147
%149 = icmp eq i8 %148, 36
br i1 %149, label %173, label %150
150: ; preds = %139
%151 = tail call i32 @isdigit(i8 signext %148)
%152 = icmp eq i32 %151, 0
br i1 %152, label %103, label %153
153: ; preds = %150
%154 = load i32, i32* %4
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds i8, i8* %0, i64 %155
%157 = load i8, i8* %156
%158 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 3
store i8 %157, i8* %158
%159 = add nsw i32 %154, 1
store i32 %159, i32* %4
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds i8, i8* %0, i64 %160
%162 = load i8, i8* %161
%163 = icmp eq i8 %162, 36
br i1 %163, label %173, label %164
164: ; preds = %153
%165 = tail call i32 @isdigit(i8 signext %162)
%166 = icmp eq i32 %165, 0
br i1 %166, label %103, label %167
167: ; preds = %164
%168 = load i32, i32* %4
%169 = add nsw i32 %168, 1
store i32 %169, i32* %4
%170 = load i32, i32* @stderr
%171 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %170, i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%172 = tail call i32 @exit(i32 1)
unreachable
173: ; preds = %153, %139, %125, %112, %91
%174 = phi i64 [ 0, %91 ], [ 1, %112 ], [ 2, %125 ], [ 3, %139 ], [ 4, %153 ]
%175 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 %174
store i8 0, i8* %175
store i8 0, i8* %1
%176 = icmp eq i32 %3, 4
br i1 %176, label %177, label %183
177: ; preds = %173
%178 = add nsw i32 %2, 1
%179 = call i8* @indents(i32 %178, i8* %11)
%180 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %1, i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8* %179, i8* %9)
%181 = call i8* @indents(i32 %178, i8* %11)
%182 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %1, i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8* %1, i8* %181, i8* %10)
br label %183
183: ; preds = %177, %173
ret void
}