#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 */
scalar_t__ malloc(int);
char *mapper(int);
int num_to_array(int *, int);
scalar_t__ pow(int, int);
scalar_t__ should_add_conjunction(int *, int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *, ...);
char *number_to_words(int num, char *separator) {
  if (num < 0 || num > 9999) {
    return "Number out of range";
  }
  if (num <= 20) {
    return mapper(num);
  }
  char *word = (char *)malloc(100 * sizeof(char));
  int place, arr[5], i = num_to_array(arr, num);
  for (int j = i - 1; j >= 0; j--) {
    if (arr[j] == 0) {
      continue;
    }
    place = (int)pow(10, j);
    if (place <= 10) {
      if (j == 0) {
        snprintf(word, 100, "%s%s", word, mapper(arr[j]));
        break;
      }
      int tens = arr[j] * place;
      int ones = arr[j - 1];
      if ((tens + ones) <= 20) {
        snprintf(word, 100, "%s%s", word, mapper(tens + ones));
      } else if (ones != 0) {
        snprintf(word, 100, "%s%s%s%s", word, mapper(tens), separator,
                 mapper(ones));
      } else {
        snprintf(word, 100, "%s%s", word, mapper(tens));
      }
      --j;
    } else {
      snprintf(word, 100, "%s%s%s%s", word, mapper(arr[j]), separator,
               mapper(place));
      if (num == arr[j] * place) {
        return word;
      }
      snprintf(word, 100, "%s%s", word, separator);
      if (place == 100 && should_add_conjunction(arr, j)) {
        snprintf(word, 100, "%s%s%s", word, "and", separator);
      }
    }
  }
  return word;
}


x86 assembly (clang, -O0):
<number_to_words>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1189 <number_to_words+0x29>
cmpl   $0x270f,-0xc(%rbp)
jle    1199 <number_to_words+0x39>
lea    0xe70(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14a3 <number_to_words+0x343>
cmpl   $0x14,-0xc(%rbp)
jg     11b4 <number_to_words+0x54>
mov    -0xc(%rbp),%edi
call   1050 <mapper@plt>
mov    %rax,-0x8(%rbp)
jmp    14a3 <number_to_words+0x343>
mov    $0x64,%edi
call   1060 <malloc@plt>
mov    %rax,-0x20(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1070 <num_to_array@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
jl     149b <number_to_words+0x33b>
movslq -0x48(%rbp),%rax
cmpl   $0x0,-0x40(%rbp,%rax,4)
jne    11f8 <number_to_words+0x98>
jmp    148d <number_to_words+0x32d>
mov    -0x48(%rbp),%esi
mov    $0xa,%edi
call   1080 <pow@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xa,-0x24(%rbp)
jg     138a <number_to_words+0x22a>
cmpl   $0x0,-0x48(%rbp)
jne    125c <number_to_words+0xfc>
mov    -0x20(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x58(%rbp)
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%edi
call   1050 <mapper@plt>
mov    -0x60(%rbp),%rdi
mov    -0x58(%rbp),%rcx
mov    %rax,%r8
mov    $0x64,%esi
lea    0xdc8(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
jmp    149b <number_to_words+0x33b>
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x48(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x40(%rbp,%rax,4),%eax
mov    %eax,-0x50(%rbp)
mov    -0x4c(%rbp),%eax
add    -0x50(%rbp),%eax
cmp    $0x14,%eax
jg     12c7 <number_to_words+0x167>
mov    -0x20(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x4c(%rbp),%edi
add    -0x50(%rbp),%edi
call   1050 <mapper@plt>
mov    -0x70(%rbp),%rdi
mov    -0x68(%rbp),%rcx
mov    %rax,%r8
mov    $0x64,%esi
lea    0xd5d(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
jmp    137c <number_to_words+0x21c>
cmpl   $0x0,-0x50(%rbp)
je     1335 <number_to_words+0x1d5>
mov    -0x20(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x4c(%rbp),%edi
call   1050 <mapper@plt>
mov    %rax,-0x80(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x50(%rbp),%edi
call   1050 <mapper@plt>
mov    -0x90(%rbp),%rdi
mov    -0x88(%rbp),%rcx
mov    -0x80(%rbp),%r8
mov    -0x78(%rbp),%r9
mov    $0x64,%esi
lea    0xcef(%rip),%rdx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1040 <snprintf@plt>
jmp    1377 <number_to_words+0x217>
mov    -0x20(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x4c(%rbp),%edi
call   1050 <mapper@plt>
mov    -0xa0(%rbp),%rdi
mov    -0x98(%rbp),%rcx
mov    %rax,%r8
mov    $0x64,%esi
lea    0xca8(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
jmp    137c <number_to_words+0x21c>
mov    -0x48(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x48(%rbp)
jmp    1488 <number_to_words+0x328>
mov    -0x20(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0xb8(%rbp)
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%edi
call   1050 <mapper@plt>
mov    %rax,-0xb0(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x24(%rbp),%edi
call   1050 <mapper@plt>
mov    -0xc0(%rbp),%rdi
mov    -0xb8(%rbp),%rcx
mov    -0xb0(%rbp),%r8
mov    -0xa8(%rbp),%r9
mov    $0x64,%esi
lea    0xc25(%rip),%rdx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1040 <snprintf@plt>
mov    -0xc(%rbp),%eax
movslq -0x48(%rbp),%rcx
mov    -0x40(%rbp,%rcx,4),%ecx
imul   -0x24(%rbp),%ecx
cmp    %ecx,%eax
jne    141e <number_to_words+0x2be>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    14a3 <number_to_words+0x343>
mov    -0x20(%rbp),%rdi
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    $0x64,%esi
lea    0xbe2(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
cmpl   $0x64,-0x24(%rbp)
jne    1483 <number_to_words+0x323>
lea    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%esi
call   1030 <should_add_conjunction@plt>
cmp    $0x0,%rax
je     1483 <number_to_words+0x323>
mov    -0x20(%rbp),%rdi
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%r9
mov    $0x64,%esi
lea    0xba1(%rip),%rdx
lea    0xba1(%rip),%r8
mov    $0x0,%al
call   1040 <snprintf@plt>
jmp    1488 <number_to_words+0x328>
jmp    148d <number_to_words+0x32d>
mov    -0x48(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x48(%rbp)
jmp    11da <number_to_words+0x7a>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_to_words>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
cmp    $0x270f,%edi
jbe    118f <number_to_words+0x2f>
lea    0xe83(%rip),%rbx
mov    %rbx,%rax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %edi,%r14d
cmp    $0x14,%edi
ja     11ad <number_to_words+0x4d>
mov    %r14d,%edi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <mapper@plt>
mov    %rsi,%rbp
mov    $0x64,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
lea    0x10(%rsp),%rdi
mov    %r14d,%esi
call   1070 <num_to_array@plt>
test   %eax,%eax
jle    117d <number_to_words+0x1d>
mov    %eax,%r12d
mov    %rbp,0x8(%rsp)
jmp    11e8 <number_to_words+0x88>
nopl   0x0(%rax,%rax,1)
mov    %r13d,%r12d
test   %r12d,%r12d
jle    117d <number_to_words+0x1d>
lea    -0x1(%r12),%r13d
cmpl   $0x0,0x10(%rsp,%r13,4)
je     11e0 <number_to_words+0x80>
mov    $0xa,%edi
mov    %r13d,%esi
call   1080 <pow@plt>
mov    %rax,%r15
cmp    $0xa,%r15d
jg     1260 <number_to_words+0x100>
mov    0x10(%rsp,%r13,4),%edi
test   %r13d,%r13d
je     1371 <number_to_words+0x211>
imul   %r15d,%edi
add    $0xfffffffe,%r12d
mov    0x10(%rsp,%r12,4),%ebp
lea    (%rdi,%rbp,1),%eax
cmp    $0x14,%eax
jg     1313 <number_to_words+0x1b3>
mov    %eax,%edi
call   1050 <mapper@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
lea    0xdd0(%rip),%rdx
mov    %rbx,%rcx
mov    %rax,%r8
jmp    1365 <number_to_words+0x205>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x10(%rsp,%r13,4),%edi
call   1050 <mapper@plt>
mov    %rax,%rbp
mov    %r15d,%edi
call   1050 <mapper@plt>
mov    %rax,(%rsp)
mov    %rbx,%rdi
mov    $0x64,%esi
lea    0xd8c(%rip),%rdx
mov    %rbx,%rcx
mov    %rbp,%r8
mov    0x8(%rsp),%rbp
mov    %rbp,%r9
xor    %eax,%eax
call   1040 <snprintf@plt>
mov    0x10(%rsp,%r13,4),%eax
imul   %r15d,%eax
cmp    %r14d,%eax
je     117d <number_to_words+0x1d>
mov    %rbx,%rdi
mov    $0x64,%esi
lea    0xd5a(%rip),%rdx
mov    %rbx,%rcx
mov    %rbp,%r8
xor    %eax,%eax
call   1040 <snprintf@plt>
cmp    $0x64,%r15d
jne    11e0 <number_to_words+0x80>
lea    0x10(%rsp),%rdi
mov    %r13d,%esi
call   1030 <should_add_conjunction@plt>
test   %rax,%rax
je     11e0 <number_to_words+0x80>
mov    %rbx,%rdi
mov    $0x64,%esi
lea    0xd1c(%rip),%rdx
mov    %rbx,%rcx
lea    0xd19(%rip),%r8
mov    %rbp,%r9
xor    %eax,%eax
call   1040 <snprintf@plt>
jmp    11e0 <number_to_words+0x80>
call   1050 <mapper@plt>
mov    %rax,%r15
test   %ebp,%ebp
je     1350 <number_to_words+0x1f0>
mov    %ebp,%edi
call   1050 <mapper@plt>
mov    %rax,(%rsp)
mov    %rbx,%rdi
mov    $0x64,%esi
lea    0xcdb(%rip),%rdx
mov    %rbx,%rcx
mov    %r15,%r8
mov    0x8(%rsp),%r9
xor    %eax,%eax
call   1040 <snprintf@plt>
jmp    11e3 <number_to_words+0x83>
mov    %rbx,%rdi
mov    $0x64,%esi
lea    0xcb9(%rip),%rdx
mov    %rbx,%rcx
mov    %r15,%r8
xor    %eax,%eax
call   1040 <snprintf@plt>
jmp    11e3 <number_to_words+0x83>
call   1050 <mapper@plt>
lea    0xc9b(%rip),%rdx
mov    %rbx,%rdi
mov    $0x64,%esi
mov    %rbx,%rcx
mov    %rax,%r8
xor    %eax,%eax
call   1040 <snprintf@plt>
jmp    117d <number_to_words+0x1d>

LLVM IR (-O0):
@.str = [20 x i8] c"Number out of range\00"
@.str.1 = [5 x i8] c"%s%s\00"
@.str.2 = [9 x i8] c"%s%s%s%s\00"
@.str.3 = [7 x i8] c"%s%s%s\00"
@.str.4 = [4 x i8] c"and\00"
define i8* @number_to_words(i32 %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca [5 x i32]
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %2
%16 = load i32, i32* %4
%17 = icmp sgt i32 %16, 9999
br i1 %17, label %18, label %19
18: ; preds = %15, %2
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8** %3
br label %153
19: ; preds = %15
%20 = load i32, i32* %4
%21 = icmp sle i32 %20, 20
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32, i32* %4
%24 = call i8* @mapper(i32 %23)
store i8* %24, i8** %3
br label %153
25: ; preds = %19
%26 = call i64 @malloc(i32 100)
%27 = inttoptr i64 %26 to i8*
store i8* %27, i8** %6
%28 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 0
%29 = load i32, i32* %4
%30 = call i32 @num_to_array(i32* %28, i32 %29)
store i32 %30, i32* %9
%31 = load i32, i32* %9
%32 = sub nsw i32 %31, 1
store i32 %32, i32* %10
br label %33
33: ; preds = %148, %25
%34 = load i32, i32* %10
%35 = icmp sge i32 %34, 0
br i1 %35, label %36, label %151
36: ; preds = %33
%37 = load i32, i32* %10
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 %38
%40 = load i32, i32* %39
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %43
42: ; preds = %36
br label %148
43: ; preds = %36
%44 = load i32, i32* %10
%45 = call i64 @pow(i32 10, i32 %44)
%46 = trunc i64 %45 to i32
store i32 %46, i32* %7
%47 = load i32, i32* %7
%48 = icmp sle i32 %47, 10
br i1 %48, label %49, label %107
49: ; preds = %43
%50 = load i32, i32* %10
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %61
52: ; preds = %49
%53 = load i8*, i8** %6
%54 = load i8*, i8** %6
%55 = load i32, i32* %10
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 %56
%58 = load i32, i32* %57
%59 = call i8* @mapper(i32 %58)
%60 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %53, i32 100, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %54, i8* %59)
br label %151
61: ; preds = %49
%62 = load i32, i32* %10
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 %63
%65 = load i32, i32* %64
%66 = load i32, i32* %7
%67 = mul nsw i32 %65, %66
store i32 %67, i32* %11
%68 = load i32, i32* %10
%69 = sub nsw i32 %68, 1
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 %70
%72 = load i32, i32* %71
store i32 %72, i32* %12
%73 = load i32, i32* %11
%74 = load i32, i32* %12
%75 = add nsw i32 %73, %74
%76 = icmp sle i32 %75, 20
br i1 %76, label %77, label %85
77: ; preds = %61
%78 = load i8*, i8** %6
%79 = load i8*, i8** %6
%80 = load i32, i32* %11
%81 = load i32, i32* %12
%82 = add nsw i32 %80, %81
%83 = call i8* @mapper(i32 %82)
%84 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %78, i32 100, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %79, i8* %83)
br label %104
85: ; preds = %61
%86 = load i32, i32* %12
%87 = icmp ne i32 %86, 0
br i1 %87, label %88, label %97
88: ; preds = %85
%89 = load i8*, i8** %6
%90 = load i8*, i8** %6
%91 = load i32, i32* %11
%92 = call i8* @mapper(i32 %91)
%93 = load i8*, i8** %5
%94 = load i32, i32* %12
%95 = call i8* @mapper(i32 %94)
%96 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %89, i32 100, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %90, i8* %92, i8* %93, i8* %95)
br label %103
97: ; preds = %85
%98 = load i8*, i8** %6
%99 = load i8*, i8** %6
%100 = load i32, i32* %11
%101 = call i8* @mapper(i32 %100)
%102 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %98, i32 100, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %99, i8* %101)
br label %103
103: ; preds = %97, %88
br label %104
104: ; preds = %103, %77
%105 = load i32, i32* %10
%106 = add nsw i32 %105, -1
store i32 %106, i32* %10
br label %147
107: ; preds = %43
%108 = load i8*, i8** %6
%109 = load i8*, i8** %6
%110 = load i32, i32* %10
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 %111
%113 = load i32, i32* %112
%114 = call i8* @mapper(i32 %113)
%115 = load i8*, i8** %5
%116 = load i32, i32* %7
%117 = call i8* @mapper(i32 %116)
%118 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %108, i32 100, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %109, i8* %114, i8* %115, i8* %117)
%119 = load i32, i32* %4
%120 = load i32, i32* %10
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 %121
%123 = load i32, i32* %122
%124 = load i32, i32* %7
%125 = mul nsw i32 %123, %124
%126 = icmp eq i32 %119, %125
br i1 %126, label %127, label %129
127: ; preds = %107
%128 = load i8*, i8** %6
store i8* %128, i8** %3
br label %153
129: ; preds = %107
%130 = load i8*, i8** %6
%131 = load i8*, i8** %6
%132 = load i8*, i8** %5
%133 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %130, i32 100, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %131, i8* %132)
%134 = load i32, i32* %7
%135 = icmp eq i32 %134, 100
br i1 %135, label %136, label %146
136: ; preds = %129
%137 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 0
%138 = load i32, i32* %10
%139 = call i64 @should_add_conjunction(i32* %137, i32 %138)
%140 = icmp ne i64 %139, 0
br i1 %140, label %141, label %146
141: ; preds = %136
%142 = load i8*, i8** %6
%143 = load i8*, i8** %6
%144 = load i8*, i8** %5
%145 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %142, i32 100, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %143, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %144)
br label %146
146: ; preds = %141, %136, %129
br label %147
147: ; preds = %146, %104
br label %148
148: ; preds = %147, %42
%149 = load i32, i32* %10
%150 = add nsw i32 %149, -1
store i32 %150, i32* %10
br label %33
151: ; preds = %52, %33
%152 = load i8*, i8** %6
store i8* %152, i8** %3
br label %153
153: ; preds = %151, %127, %22, %18
%154 = load i8*, i8** %3
ret i8* %154
}

LLVM IR (-O2):
@.str = [20 x i8] c"Number out of range\00"
@.str.1 = [5 x i8] c"%s%s\00"
@.str.2 = [9 x i8] c"%s%s%s%s\00"
@.str.3 = [7 x i8] c"%s%s%s\00"
@.str.4 = [4 x i8] c"and\00"
define i8* @number_to_words(i32 %0, i8* %1) {
%3 = alloca [5 x i32]
%4 = icmp ugt i32 %0, 9999
br i1 %4, label %72, label %5
5: ; preds = %2
%6 = icmp ult i32 %0, 21
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i8* @mapper(i32 %0)
br label %72
9: ; preds = %5
%10 = tail call i64 @malloc(i32 100)
%11 = inttoptr i64 %10 to i8*
%12 = bitcast [5 x i32]* %3 to i8*
%13 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%14 = call i32 @num_to_array(i32* %13, i32 %0)
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %71
16: ; preds = %9, %68
%17 = phi i32 [ %69, %68 ], [ %14, %9 ]
%18 = add nsw i32 %17, -1
%19 = zext i32 %18 to i64
%20 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = icmp eq i32 %21, 0
br i1 %22, label %68, label %23
23: ; preds = %16
%24 = call i64 @pow(i32 10, i32 %18)
%25 = trunc i64 %24 to i32
%26 = icmp slt i32 %25, 11
br i1 %26, label %27, label %52
27: ; preds = %23
%28 = icmp eq i32 %18, 0
%29 = load i32, i32* %20
br i1 %28, label %30, label %33
30: ; preds = %27
%31 = call i8* @mapper(i32 %29)
%32 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %11, i32 100, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %11, i8* %31)
br label %71
33: ; preds = %27
%34 = mul nsw i32 %29, %25
%35 = add nsw i32 %17, -2
%36 = zext i32 %35 to i64
%37 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %36
%38 = load i32, i32* %37
%39 = add nsw i32 %34, %38
%40 = icmp slt i32 %39, 21
br i1 %40, label %41, label %44
41: ; preds = %33
%42 = call i8* @mapper(i32 %39)
%43 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %11, i32 100, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %11, i8* %42)
br label %68
44: ; preds = %33
%45 = icmp eq i32 %38, 0
%46 = call i8* @mapper(i32 %34)
br i1 %45, label %50, label %47
47: ; preds = %44
%48 = call i8* @mapper(i32 %38)
%49 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %11, i32 100, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %11, i8* %46, i8* %1, i8* %48)
br label %68
50: ; preds = %44
%51 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %11, i32 100, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %11, i8* %46)
br label %68
52: ; preds = %23
%53 = load i32, i32* %20
%54 = call i8* @mapper(i32 %53)
%55 = call i8* @mapper(i32 %25)
%56 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %11, i32 100, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %11, i8* %54, i8* %1, i8* %55)
%57 = load i32, i32* %20
%58 = mul nsw i32 %57, %25
%59 = icmp eq i32 %58, %0
br i1 %59, label %71, label %60
60: ; preds = %52
%61 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %11, i32 100, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %11, i8* %1)
%62 = icmp eq i32 %25, 100
br i1 %62, label %63, label %68
63: ; preds = %60
%64 = call i64 @should_add_conjunction(i32* %13, i32 %18)
%65 = icmp eq i64 %64, 0
br i1 %65, label %68, label %66
66: ; preds = %63
%67 = call i32 (i8*, i32, i8*, i8*, i8*, ...) @snprintf(i8* %11, i32 100, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %1)
br label %68
68: ; preds = %41, %50, %47, %66, %63, %60, %16
%69 = phi i32 [ %18, %16 ], [ %18, %66 ], [ %18, %63 ], [ %18, %60 ], [ %35, %47 ], [ %35, %50 ], [ %35, %41 ]
%70 = icmp sgt i32 %69, 0
br i1 %70, label %16, label %71
71: ; preds = %52, %68, %9, %30
br label %72
72: ; preds = %2, %71, %7
%73 = phi i8* [ %8, %7 ], [ %11, %71 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), %2 ]
ret i8* %73
}