#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ snprintf(char *, size_t, char *, ...);
int /*<<< orphan*/ stderr;
void create_menu_item(char *buf, size_t bufsize, const char *mapping[],
                      int current_item) {
  int i, char_list_size = 0;
  static const char nothing[] = "";
  for (i = 0; mapping[i] != NULL; i++) {
    char_list_size++;
  }
  fprintf(stderr, "Trying to create menu\n");
  if (current_item == 0) {
    snprintf(buf, bufsize, "  > %s\n    %s\n    %s\n", (mapping[current_item]),
             ((char_list_size >= 2) ? mapping[current_item + 1] : nothing),
             ((char_list_size >= 3) ? mapping[current_item + 2] : nothing));
  } else if (current_item == char_list_size - 1 && char_list_size >= 3) {
    snprintf(
        buf, bufsize, "    %s\n    %s\n  > %s\n",
        ((current_item >= 2 && char_list_size > 2) ? mapping[current_item - 2]
                                                   : nothing),
        ((current_item >= 1 && char_list_size > 1) ? mapping[current_item - 1]
                                                   : nothing),
        (mapping[current_item]));
  } else if (current_item <= char_list_size) {
    snprintf(buf, bufsize, "    %s\n  > %s\n    %s\n",
             ((current_item > 0) ? mapping[current_item - 1] : nothing),
             (mapping[current_item]),
             ((current_item < char_list_size && mapping[current_item + 1])
                  ? mapping[current_item + 1]
                  : nothing));
  } else {
    snprintf(buf, bufsize, "    ERROR\n\n\n");
  }
}


x86 assembly (clang, -O0):
<create_menu_item>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1172 <create_menu_item+0x52>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1148 <create_menu_item+0x28>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
lea    0xe7f(%rip),%rsi
call   1040 <fprintf@plt>
cmpl   $0x0,-0x1c(%rbp)
jne    1248 <create_menu_item+0x128>
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x30(%rbp)
cmpl   $0x2,-0x24(%rbp)
jl     11d5 <create_menu_item+0xb5>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x48(%rbp)
jmp    11e5 <create_menu_item+0xc5>
lea    0xe24(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    11e5 <create_menu_item+0xc5>
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
cmpl   $0x3,-0x24(%rbp)
jl     1211 <create_menu_item+0xf1>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x58(%rbp)
jmp    1221 <create_menu_item+0x101>
lea    0xde8(%rip),%rax
mov    %rax,-0x58(%rbp)
jmp    1221 <create_menu_item+0x101>
mov    -0x50(%rbp),%r8
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdi
mov    -0x58(%rbp),%r9
lea    0xddc(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    144d <create_menu_item+0x32d>
mov    -0x1c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    1326 <create_menu_item+0x206>
cmpl   $0x3,-0x24(%rbp)
jl     1326 <create_menu_item+0x206>
mov    -0x8(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jl     12a1 <create_menu_item+0x181>
cmpl   $0x2,-0x24(%rbp)
jle    12a1 <create_menu_item+0x181>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x70(%rbp)
jmp    12b1 <create_menu_item+0x191>
lea    0xd58(%rip),%rax
mov    %rax,-0x70(%rbp)
jmp    12b1 <create_menu_item+0x191>
mov    -0x70(%rbp),%rax
mov    %rax,-0x78(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jl     12e7 <create_menu_item+0x1c7>
cmpl   $0x1,-0x24(%rbp)
jle    12e7 <create_menu_item+0x1c7>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x80(%rbp)
jmp    12f7 <create_menu_item+0x1d7>
lea    0xd12(%rip),%rax
mov    %rax,-0x80(%rbp)
jmp    12f7 <create_menu_item+0x1d7>
mov    -0x78(%rbp),%rcx
mov    -0x60(%rbp),%rsi
mov    -0x68(%rbp),%rdi
mov    -0x80(%rbp),%r8
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rdx
mov    (%rax,%rdx,8),%r9
lea    0xd14(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    1448 <create_menu_item+0x328>
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     142d <create_menu_item+0x30d>
mov    -0x8(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x88(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    136f <create_menu_item+0x24f>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x98(%rbp)
jmp    1382 <create_menu_item+0x262>
lea    0xc8a(%rip),%rax
mov    %rax,-0x98(%rbp)
jmp    1382 <create_menu_item+0x262>
mov    -0x98(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    13e4 <create_menu_item+0x2c4>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     13e4 <create_menu_item+0x2c4>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xb0(%rbp)
jmp    13f7 <create_menu_item+0x2d7>
lea    0xc15(%rip),%rax
mov    %rax,-0xb0(%rbp)
jmp    13f7 <create_menu_item+0x2d7>
mov    -0xa0(%rbp),%r8
mov    -0xa8(%rbp),%rcx
mov    -0x88(%rbp),%rsi
mov    -0x90(%rbp),%rdi
mov    -0xb0(%rbp),%r9
lea    0xc23(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    1443 <create_menu_item+0x323>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xc1e(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    1448 <create_menu_item+0x328>
jmp    144d <create_menu_item+0x32d>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_menu_item>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %ecx,%r12d
mov    %rdx,%r13
mov    %rsi,%r14
mov    %rdi,%r15
cmpq   $0x0,(%rdx)
je     114e <create_menu_item+0x2e>
xor    %ebx,%ebx
nopl   (%rax)
cmpq   $0x0,0x8(%r13,%rbx,8)
lea    0x1(%rbx),%rbx
jne    1140 <create_menu_item+0x20>
jmp    1150 <create_menu_item+0x30>
xor    %ebx,%ebx
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea1(%rip),%rsi
call   1040 <fprintf@plt>
test   %r12d,%r12d
je     1190 <create_menu_item+0x70>
cmp    $0x3,%ebx
jb     11ac <create_menu_item+0x8c>
lea    -0x1(%rbx),%eax
cmp    %r12d,%eax
jne    11ac <create_menu_item+0x8c>
cmp    $0x2,%r12d
jl     121c <create_menu_item+0xfc>
lea    -0x2(%r12),%eax
mov    0x0(%r13,%rax,8),%rcx
jmp    122c <create_menu_item+0x10c>
mov    0x0(%r13),%rcx
lea    0xe65(%rip),%r9
cmp    $0x2,%ebx
jb     11ce <create_menu_item+0xae>
mov    0x8(%r13),%r8
je     11d1 <create_menu_item+0xb1>
mov    0x10(%r13),%r9
jmp    11d1 <create_menu_item+0xb1>
cmp    %r12d,%ebx
jge    11da <create_menu_item+0xba>
lea    0xea2(%rip),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <snprintf@plt>
mov    %r9,%r8
lea    0xe40(%rip),%rdx
jmp    1245 <create_menu_item+0x125>
lea    0xe1f(%rip),%r9
mov    %r9,%rcx
test   %r12d,%r12d
jle    11f3 <create_menu_item+0xd3>
lea    -0x1(%r12),%eax
mov    0x0(%r13,%rax,8),%rcx
movslq %r12d,%rax
mov    0x0(%r13,%rax,8),%r8
cmp    %r12d,%ebx
jle    1213 <create_menu_item+0xf3>
mov    0x8(%r13,%rax,8),%rax
test   %rax,%rax
lea    0xdf1(%rip),%r9
cmovne %rax,%r9
lea    0xe2a(%rip),%rdx
jmp    1245 <create_menu_item+0x125>
lea    0xddd(%rip),%rcx
mov    %rcx,%r8
cmp    $0x1,%r12d
jne    1236 <create_menu_item+0x116>
lea    -0x1(%r12),%eax
mov    0x0(%r13,%rax,8),%r8
movslq %r12d,%rax
mov    0x0(%r13,%rax,8),%r9
lea    0xde9(%rip),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <snprintf@plt>

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

LLVM IR (-O2):
@create_menu_item.nothing = internal constant [1 x i8] zeroinitializer
@stderr = global i32 0
@.str = [23 x i8] c"Trying to create menu\0A\00"
@.str.1 = [22 x i8] c" > %s\0A %s\0A %s\0A\00"
@.str.2 = [22 x i8] c" %s\0A %s\0A > %s\0A\00"
@.str.3 = [22 x i8] c" %s\0A > %s\0A %s\0A\00"
@.str.4 = [13 x i8] c" ERROR\0A\0A\0A\00"
define void @create_menu_item(i8* nocapture writeonly %0, i64 %1, i8** nocapture %2, i32 %3) {
%5 = load i8*, i8** %2
%6 = icmp eq i8* %5, null
br i1 %6, label %15, label %7
7: ; preds = %4, %7
%8 = phi i64 [ %9, %7 ], [ 0, %4 ]
%9 = add nuw nsw i64 %8, 1
%10 = getelementptr inbounds i8*, i8** %2, i64 %9
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %7
13: ; preds = %7
%14 = trunc i64 %9 to i32
br label %15
15: ; preds = %13, %4
%16 = phi i32 [ 0, %4 ], [ %14, %13 ]
%17 = load i32, i32* @stderr
%18 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%19 = icmp eq i32 %3, 0
br i1 %19, label %20, label %34
20: ; preds = %15
%21 = load i8*, i8** %2
%22 = icmp ugt i32 %16, 1
br i1 %22, label %23, label %30
23: ; preds = %20
%24 = getelementptr inbounds i8*, i8** %2, i64 1
%25 = load i8*, i8** %24
%26 = icmp eq i32 %16, 2
br i1 %26, label %30, label %27
27: ; preds = %23
%28 = getelementptr inbounds i8*, i8** %2, i64 2
%29 = load i8*, i8** %28
br label %30
30: ; preds = %20, %23, %27
%31 = phi i8* [ %25, %27 ], [ %25, %23 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @create_menu_item.nothing, i64 0, i64 0), %20 ]
%32 = phi i8* [ %29, %27 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @create_menu_item.nothing, i64 0, i64 0), %23 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @create_menu_item.nothing, i64 0, i64 0), %20 ]
%33 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %21, i8* %31, i8* %32)
br label %88
34: ; preds = %15
%35 = add nsw i32 %16, -1
%36 = icmp eq i32 %35, %3
%37 = icmp ugt i32 %16, 2
%38 = and i1 %37, %36
br i1 %38, label %39, label %61
39: ; preds = %34
%40 = icmp sgt i32 %3, 1
br i1 %40, label %41, label %46
41: ; preds = %39
%42 = add nsw i32 %3, -2
%43 = zext i32 %42 to i64
%44 = getelementptr inbounds i8*, i8** %2, i64 %43
%45 = load i8*, i8** %44
br label %48
46: ; preds = %39
%47 = icmp eq i32 %3, 1
br i1 %47, label %48, label %54
48: ; preds = %41, %46
%49 = phi i8* [ %45, %41 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @create_menu_item.nothing, i64 0, i64 0), %46 ]
%50 = add nsw i32 %3, -1
%51 = zext i32 %50 to i64
%52 = getelementptr inbounds i8*, i8** %2, i64 %51
%53 = load i8*, i8** %52
br label %54
54: ; preds = %46, %48
%55 = phi i8* [ %49, %48 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @create_menu_item.nothing, i64 0, i64 0), %46 ]
%56 = phi i8* [ %53, %48 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @create_menu_item.nothing, i64 0, i64 0), %46 ]
%57 = sext i32 %3 to i64
%58 = getelementptr inbounds i8*, i8** %2, i64 %57
%59 = load i8*, i8** %58
%60 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %55, i8* %56, i8* %59)
br label %88
61: ; preds = %34
%62 = icmp slt i32 %16, %3
br i1 %62, label %86, label %63
63: ; preds = %61
%64 = icmp sgt i32 %3, 0
br i1 %64, label %65, label %70
65: ; preds = %63
%66 = add nsw i32 %3, -1
%67 = zext i32 %66 to i64
%68 = getelementptr inbounds i8*, i8** %2, i64 %67
%69 = load i8*, i8** %68
br label %70
70: ; preds = %63, %65
%71 = phi i8* [ %69, %65 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @create_menu_item.nothing, i64 0, i64 0), %63 ]
%72 = sext i32 %3 to i64
%73 = getelementptr inbounds i8*, i8** %2, i64 %72
%74 = load i8*, i8** %73
%75 = icmp sgt i32 %16, %3
br i1 %75, label %76, label %83
76: ; preds = %70
%77 = add nsw i32 %3, 1
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8*, i8** %2, i64 %78
%80 = load i8*, i8** %79
%81 = icmp eq i8* %80, null
%82 = select i1 %81, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @create_menu_item.nothing, i64 0, i64 0), i8* %80
br label %83
83: ; preds = %76, %70
%84 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @create_menu_item.nothing, i64 0, i64 0), %70 ], [ %82, %76 ]
%85 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* %71, i8* %74, i8* %84)
br label %88
86: ; preds = %61
%87 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
br label %88
88: ; preds = %54, %86, %83, %30
ret void
}