#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);
scalar_t__ expandf(char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *strrchr(char *, char);
int main(int argc, char *argv[]) {
  char format[16384];
  char command[256], *ptr, program[256];
  int c, i, j, k, n;
  int expand = 0;
  int wei_flag = 0;
  int debug = 0;
  if (ptr = strrchr(argv[0], '/'))
    ptr++;
  else
    ptr = argv[0];
  strcpy(program, ptr);
  for (k = 0, i = 1; i < argc; i++) {
    if (*argv[i] == '-') {
      strcpy(command, argv[i]);
      ptr = command;
      while (c = *ptr++)
        switch (c) {
        case 'e':
          expand++;
          break;
        case 'w':
          wei_flag++;
          break;
        case 'd':
          debug++;
          break;
        }
    } else
      switch (k) {
      case 0:
        strcpy(format, argv[i]);
        k++;
        break;
      }
  }
  if (k < 1) {
    printf("Usage:\t%s <format>\n", program);
    printf("e.g.,\t%s "
           "\"2x3-2+1-2+2-2+1-1+2-1+1-1+1-1+2-1+1-1+1-2+2-1+1-1+2-2+1-2+2-\"\n",
           program);
    printf("\toptions\n");
    printf("\t-w\tconvert {'x' '+' '-'} to {0.0 1.0 -1.0}\n");
    printf("\t-e\texpand on single line\n");
    exit(1);
  }
  n = strlen(format);
  if (expandf(format, 16384))
    exit(-1);
  n = strlen(format);
  for (i = 0; i < n; i++) {
    if (wei_flag) {
      switch (format[i]) {
      case '+':
        printf("1.0");
        break;
      case '-':
        printf("-1.0");
        break;
      default:
        printf("0.0");
        break;
      }
    } else {
      printf("%c", format[i]);
    }
    if (!expand)
      printf("\n");
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4250,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x4238(%rbp)
movl   $0x0,-0x423c(%rbp)
movl   $0x0,-0x4240(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x2f,%esi
call   1060 <strrchr@plt>
mov    %rax,-0x4118(%rbp)
cmp    $0x0,%rax
je     11d0 <main+0x70>
mov    -0x4118(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x4118(%rbp)
jmp    11de <main+0x7e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x4118(%rbp)
lea    -0x4220(%rbp),%rdi
mov    -0x4118(%rbp),%rsi
call   1030 <strcpy@plt>
movl   $0x0,-0x4230(%rbp)
movl   $0x1,-0x4228(%rbp)
mov    -0x4228(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    135d <main+0x1fd>
mov    -0x10(%rbp),%rax
movslq -0x4228(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1302 <main+0x1a2>
lea    -0x4110(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x4228(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
lea    -0x4110(%rbp),%rax
mov    %rax,-0x4118(%rbp)
mov    -0x4118(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x4118(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x4224(%rbp)
cmp    $0x0,%eax
je     12fd <main+0x19d>
mov    -0x4224(%rbp),%eax
mov    %eax,-0x4244(%rbp)
sub    $0x64,%eax
je     12e9 <main+0x189>
jmp    1299 <main+0x139>
mov    -0x4244(%rbp),%eax
sub    $0x65,%eax
je     12c1 <main+0x161>
jmp    12ad <main+0x14d>
mov    -0x4244(%rbp),%eax
sub    $0x77,%eax
je     12d5 <main+0x175>
jmp    12f8 <main+0x198>
mov    -0x4238(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4238(%rbp)
jmp    12f8 <main+0x198>
mov    -0x423c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x423c(%rbp)
jmp    12f8 <main+0x198>
mov    -0x4240(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4240(%rbp)
jmp    1258 <main+0xf8>
jmp    1344 <main+0x1e4>
mov    -0x4230(%rbp),%eax
test   %eax,%eax
jne    133f <main+0x1df>
jmp    1315 <main+0x1b5>
lea    -0x4010(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x4228(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
mov    -0x4230(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4230(%rbp)
jmp    1344 <main+0x1e4>
jmp    1349 <main+0x1e9>
mov    -0x4228(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4228(%rbp)
jmp    1205 <main+0xa5>
cmpl   $0x1,-0x4230(%rbp)
jge    13c8 <main+0x268>
lea    -0x4220(%rbp),%rsi
lea    0xc88(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x4220(%rbp),%rsi
lea    0xc87(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcc2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcbe(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcdd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
lea    -0x4010(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x4234(%rbp)
lea    -0x4010(%rbp),%rdi
mov    $0x4000,%esi
call   1070 <expandf@plt>
cmp    $0x0,%rax
je     13ff <main+0x29f>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
lea    -0x4010(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x4234(%rbp)
movl   $0x0,-0x4228(%rbp)
mov    -0x4228(%rbp),%eax
cmp    -0x4234(%rbp),%eax
jge    14fb <main+0x39b>
cmpl   $0x0,-0x423c(%rbp)
je     14aa <main+0x34a>
movslq -0x4228(%rbp),%rax
movsbl -0x4010(%rbp,%rax,1),%eax
ff
mov    %eax,-0x4248(%rbp)
sub    $0x2b,%eax
je     1471 <main+0x311>
jmp    145d <main+0x2fd>
mov    -0x4248(%rbp),%eax
sub    $0x2d,%eax
je     1484 <main+0x324>
jmp    1497 <main+0x337>
lea    0xc38(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14a5 <main+0x345>
lea    0xc24(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14a5 <main+0x345>
lea    0xc16(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14c7 <main+0x367>
movslq -0x4228(%rbp),%rax
movsbl -0x4010(%rbp,%rax,1),%esi
ff
lea    0xbf8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x0,-0x4238(%rbp)
jne    14e2 <main+0x382>
lea    0xb80(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14e7 <main+0x387>
mov    -0x4228(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4228(%rbp)
jmp    141b <main+0x2bb>
xor    %edi,%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4208,%rsp
mov    %rsi,%r12
mov    %edi,%r14d
mov    (%rsi),%rbp
mov    %rbp,%rdi
mov    $0x2f,%esi
call   1080 <strrchr@plt>
lea    0x1(%rax),%rsi
test   %rax,%rax
cmove  %rbp,%rsi
lea    0x100(%rsp),%rdi
call   1040 <strcpy@plt>
cmp    $0x2,%r14d
jl     1254 <main+0xd4>
mov    %r14d,%r15d
xor    %ebp,%ebp
mov    $0x1,%r13d
xor    %ebx,%ebx
xor    %r14d,%r14d
jmp    11f4 <main+0x74>
nopl   0x0(%rax,%rax,1)
test   %r14d,%r14d
je     1240 <main+0xc0>
mov    $0x1,%r14d
add    $0x1,%r13
cmp    %r15,%r13
je     124f <main+0xcf>
mov    (%r12,%r13,8),%rsi
cmpb   $0x2d,(%rsi)
jne    11e0 <main+0x60>
mov    %rsp,%rdi
call   1040 <strcpy@plt>
mov    (%rsp),%cl
test   %cl,%cl
je     11eb <main+0x6b>
lea    0x1(%rsp),%rax
jmp    122e <main+0xae>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ebp
movzbl (%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
je     11eb <main+0x6b>
movsbl %cl,%ecx
cmp    $0x77,%ecx
je     1220 <main+0xa0>
cmp    $0x65,%ecx
jne    1223 <main+0xa3>
add    $0x1,%ebx
jmp    1223 <main+0xa3>
lea    0x200(%rsp),%rdi
call   1040 <strcpy@plt>
jmp    11e5 <main+0x65>
test   %r14d,%r14d
jg     12ac <main+0x12c>
lea    0xda5(%rip),%rdi
lea    0x100(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xda0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xde1(%rip),%rdi
call   1050 <puts@plt>
lea    0xdde(%rip),%rdi
call   1050 <puts@plt>
lea    0xdfe(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
lea    0x200(%rsp),%r14
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    %r14,%rdi
mov    $0x4000,%esi
call   1090 <expandf@plt>
test   %rax,%rax
jne    136a <main+0x1ea>
lea    0x200(%rsp),%rdi
call   1060 <strlen@plt>
test   %eax,%eax
jle    1374 <main+0x1f4>
mov    %eax,%r13d
lea    0xd6d(%rip),%r15
lea    0xd6a(%rip),%r12
xor    %r14d,%r14d
jmp    1309 <main+0x189>
nopl   (%rax)
add    $0x1,%r14
cmp    %r14,%r13
je     1374 <main+0x1f4>
movsbl 0x200(%rsp,%r14,1),%edi
test   %ebp,%ebp
je     1330 <main+0x1b0>
cmp    $0x2d,%edi
je     1340 <main+0x1c0>
cmp    $0x2b,%edi
jne    1350 <main+0x1d0>
mov    %r15,%rdi
jmp    1353 <main+0x1d3>
cs nopw 0x0(%rax,%rax,1)
nop
call   1030 <putchar@plt>
test   %ebx,%ebx
jne    1300 <main+0x180>
jmp    135e <main+0x1de>
nopl   0x0(%rax,%rax,1)
lea    0xd16(%rip),%rdi
jmp    1353 <main+0x1d3>
nopl   0x0(%rax)
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
test   %ebx,%ebx
jne    1300 <main+0x180>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1300 <main+0x180>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
xor    %edi,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Usage:\09%s <format>\0A\00"
@.str.1 = [73 x i8] c"e.g.,\09%s \222x3-2+1-2+2-2+1-1+2-1+1-1+1-1+2-1+1-1+1-2+2-1+1-1+2-2+1-2+2-\22\0A\00"
@.str.2 = [10 x i8] c"\09options\0A\00"
@.str.3 = [45 x i8] c"\09-w\09convert {'x' '+' '-'} to {0.0 1.0 -1.0}\0A\00"
@.str.4 = [27 x i8] c"\09-e\09expand on single line\0A\00"
@.str.5 = [4 x i8] c"1.0\00"
@.str.6 = [5 x i8] c"-1.0\00"
@.str.7 = [4 x i8] c"0.0\00"
@.str.8 = [3 x i8] c"%c\00"
@.str.9 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [16384 x i8]
%7 = alloca [256 x i8]
%8 = alloca i8*
%9 = alloca [256 x i8]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i8* @strrchr(i8* %20, i8 signext 47)
store i8* %21, i8** %8
%22 = icmp ne i8* %21, null
br i1 %22, label %23, label %26
23: ; preds = %2
%24 = load i8*, i8** %8
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %8
br label %30
26: ; preds = %2
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 0
%29 = load i8*, i8** %28
store i8* %29, i8** %8
br label %30
30: ; preds = %26, %23
%31 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%32 = load i8*, i8** %8
%33 = call i32 @strcpy(i8* %31, i8* %32)
store i32 0, i32* %13
store i32 1, i32* %11
br label %34
34: ; preds = %89, %30
%35 = load i32, i32* %11
%36 = load i32, i32* %4
%37 = icmp slt i32 %35, %36
br i1 %37, label %38, label %92
38: ; preds = %34
%39 = load i8**, i8*** %5
%40 = load i32, i32* %11
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i8*, i8** %39, i64 %41
%43 = load i8*, i8** %42
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %45, 45
br i1 %46, label %47, label %75
47: ; preds = %38
%48 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%49 = load i8**, i8*** %5
%50 = load i32, i32* %11
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8*, i8** %49, i64 %51
%53 = load i8*, i8** %52
%54 = call i32 @strcpy(i8* %48, i8* %53)
%55 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
store i8* %55, i8** %8
br label %56
56: ; preds = %73, %47
%57 = load i8*, i8** %8
%58 = getelementptr inbounds i8, i8* %57, i32 1
store i8* %58, i8** %8
%59 = load i8, i8* %57
%60 = sext i8 %59 to i32
store i32 %60, i32* %10
%61 = icmp ne i32 %60, 0
br i1 %61, label %62, label %74
62: ; preds = %56
%63 = load i32, i32* %10
switch i32 %63, label %73 [
i32 101, label %64
i32 119, label %67
i32 100, label %70
]
64: ; preds = %62
%65 = load i32, i32* %15
%66 = add nsw i32 %65, 1
store i32 %66, i32* %15
br label %73
67: ; preds = %62
%68 = load i32, i32* %16
%69 = add nsw i32 %68, 1
store i32 %69, i32* %16
br label %73
70: ; preds = %62
%71 = load i32, i32* %17
%72 = add nsw i32 %71, 1
store i32 %72, i32* %17
br label %73
73: ; preds = %62, %70, %67, %64
br label %56
74: ; preds = %56
br label %88
75: ; preds = %38
%76 = load i32, i32* %13
switch i32 %76, label %87 [
i32 0, label %77
]
77: ; preds = %75
%78 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 0
%79 = load i8**, i8*** %5
%80 = load i32, i32* %11
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8*, i8** %79, i64 %81
%83 = load i8*, i8** %82
%84 = call i32 @strcpy(i8* %78, i8* %83)
%85 = load i32, i32* %13
%86 = add nsw i32 %85, 1
store i32 %86, i32* %13
br label %87
87: ; preds = %75, %77
br label %88
88: ; preds = %87, %74
br label %89
89: ; preds = %88
%90 = load i32, i32* %11
%91 = add nsw i32 %90, 1
store i32 %91, i32* %11
br label %34
92: ; preds = %34
%93 = load i32, i32* %13
%94 = icmp slt i32 %93, 1
br i1 %94, label %95, label %104
95: ; preds = %92
%96 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %96)
%98 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0), i8* %98)
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%103 = call i32 @exit(i32 1)
unreachable
104: ; preds = %92
%105 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 0
%106 = call i32 @strlen(i8* %105)
store i32 %106, i32* %14
%107 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 0
%108 = call i64 @expandf(i8* %107, i32 16384)
%109 = icmp ne i64 %108, 0
br i1 %109, label %110, label %112
110: ; preds = %104
%111 = call i32 @exit(i32 -1)
unreachable
112: ; preds = %104
%113 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 0
%114 = call i32 @strlen(i8* %113)
store i32 %114, i32* %14
store i32 0, i32* %11
br label %115
115: ; preds = %148, %112
%116 = load i32, i32* %11
%117 = load i32, i32* %14
%118 = icmp slt i32 %116, %117
br i1 %118, label %119, label %151
119: ; preds = %115
%120 = load i32, i32* %16
%121 = icmp ne i32 %120, 0
br i1 %121, label %122, label %135
122: ; preds = %119
%123 = load i32, i32* %11
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 %124
%126 = load i8, i8* %125
%127 = sext i8 %126 to i32
switch i32 %127, label %132 [
i32 43, label %128
i32 45, label %130
]
128: ; preds = %122
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %134
130: ; preds = %122
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %134
132: ; preds = %122
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %134
134: ; preds = %132, %130, %128
br label %142
135: ; preds = %119
%136 = load i32, i32* %11
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds [16384 x i8], [16384 x i8]* %6, i64 0, i64 %137
%139 = load i8, i8* %138
%140 = sext i8 %139 to i32
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 %140)
br label %142
142: ; preds = %135, %134
%143 = load i32, i32* %15
%144 = icmp ne i32 %143, 0
br i1 %144, label %147, label %145
145: ; preds = %142
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %147
147: ; preds = %145, %142
br label %148
148: ; preds = %147
%149 = load i32, i32* %11
%150 = add nsw i32 %149, 1
store i32 %150, i32* %11
br label %115
151: ; preds = %115
%152 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [20 x i8] c"Usage:\09%s <format>\0A\00"
@.str.1 = [73 x i8] c"e.g.,\09%s \222x3-2+1-2+2-2+1-1+2-1+1-1+1-1+2-1+1-1+1-2+2-1+1-1+2-2+1-2+2-\22\0A\00"
@.str.5 = [4 x i8] c"1.0\00"
@.str.6 = [5 x i8] c"-1.0\00"
@.str.7 = [4 x i8] c"0.0\00"
@str = [9 x i8] c"\09options\00"
@str.10 = [44 x i8] c"\09-w\09convert {'x' '+' '-'} to {0.0 1.0 -1.0}\00"
@str.11 = [26 x i8] c"\09-e\09expand on single line\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [16384 x i8]
%4 = alloca [256 x i8]
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [16384 x i8], [16384 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%9 = load i8*, i8** %1
%10 = tail call i8* @strrchr(i8* dereferenceable(1) %9, i8 signext 47)
%11 = icmp eq i8* %10, null
%12 = getelementptr inbounds i8, i8* %10, i64 1
%13 = select i1 %11, i8* %9, i8* %12
%14 = call i32 @strcpy(i8* %8, i8* %13)
%15 = icmp sgt i32 %0, 1
br i1 %15, label %16, label %60
16: ; preds = %2
%17 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 1
%18 = zext i32 %0 to i64
br label %19
19: ; preds = %16, %52
%20 = phi i64 [ 1, %16 ], [ %56, %52 ]
%21 = phi i32 [ 0, %16 ], [ %55, %52 ]
%22 = phi i32 [ 0, %16 ], [ %54, %52 ]
%23 = phi i32 [ 0, %16 ], [ %53, %52 ]
%24 = getelementptr inbounds i8*, i8** %1, i64 %20
%25 = load i8*, i8** %24
%26 = load i8, i8* %25
%27 = icmp eq i8 %26, 45
br i1 %27, label %28, label %48
28: ; preds = %19
%29 = call i32 @strcpy(i8* %7, i8* %25)
%30 = load i8, i8* %7
%31 = icmp eq i8 %30, 0
br i1 %31, label %52, label %32
32: ; preds = %28, %42
%33 = phi i8 [ %46, %42 ], [ %30, %28 ]
%34 = phi i8* [ %45, %42 ], [ %17, %28 ]
%35 = phi i32 [ %44, %42 ], [ %21, %28 ]
%36 = phi i32 [ %43, %42 ], [ %22, %28 ]
%37 = sext i8 %33 to i32
switch i32 %37, label %42 [
i32 101, label %38
i32 119, label %40
]
38: ; preds = %32
%39 = add nsw i32 %36, 1
br label %42
40: ; preds = %32
%41 = add nsw i32 %35, 1
br label %42
42: ; preds = %32, %40, %38
%43 = phi i32 [ %36, %40 ], [ %39, %38 ], [ %36, %32 ]
%44 = phi i32 [ %41, %40 ], [ %35, %38 ], [ %35, %32 ]
%45 = getelementptr inbounds i8, i8* %34, i64 1
%46 = load i8, i8* %34
%47 = icmp eq i8 %46, 0
br i1 %47, label %52, label %32
48: ; preds = %19
%49 = icmp eq i32 %23, 0
br i1 %49, label %50, label %52
50: ; preds = %48
%51 = call i32 @strcpy(i8* %6, i8* %25)
br label %52
52: ; preds = %42, %28, %48, %50
%53 = phi i32 [ 1, %50 ], [ 1, %48 ], [ %23, %28 ], [ %23, %42 ]
%54 = phi i32 [ %22, %50 ], [ %22, %48 ], [ %22, %28 ], [ %43, %42 ]
%55 = phi i32 [ %21, %50 ], [ %21, %48 ], [ %21, %28 ], [ %44, %42 ]
%56 = add nuw nsw i64 %20, 1
%57 = icmp eq i64 %56, %18
br i1 %57, label %58, label %19
58: ; preds = %52
%59 = icmp slt i32 %53, 1
br i1 %59, label %60, label %67
60: ; preds = %2, %58
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %8)
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%63 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%64 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.10, i64 0, i64 0))
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.11, i64 0, i64 0))
%66 = call i32 @exit(i32 1)
unreachable
67: ; preds = %58
%68 = call i32 @strlen(i8* %6)
%69 = call i64 @expandf(i8* %6, i32 16384)
%70 = icmp eq i64 %69, 0
br i1 %70, label %73, label %71
71: ; preds = %67
%72 = call i32 @exit(i32 -1)
unreachable
73: ; preds = %67
%74 = call i32 @strlen(i8* %6)
%75 = icmp sgt i32 %74, 0
br i1 %75, label %76, label %100
76: ; preds = %73
%77 = icmp eq i32 %55, 0
%78 = icmp eq i32 %54, 0
%79 = zext i32 %74 to i64
br label %80
80: ; preds = %76, %97
%81 = phi i64 [ 0, %76 ], [ %98, %97 ]
%82 = getelementptr inbounds [16384 x i8], [16384 x i8]* %3, i64 0, i64 %81
%83 = load i8, i8* %82
%84 = sext i8 %83 to i32
br i1 %77, label %92, label %85
85: ; preds = %80
switch i32 %84, label %90 [
i32 43, label %86
i32 45, label %88
]
86: ; preds = %85
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %94
88: ; preds = %85
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %94
90: ; preds = %85
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %94
92: ; preds = %80
%93 = call i32 @putchar(i32 %84)
br label %94
94: ; preds = %86, %88, %90, %92
br i1 %78, label %95, label %97
95: ; preds = %94
%96 = call i32 @putchar(i32 10)
br label %97
97: ; preds = %94, %95
%98 = add nuw nsw i64 %81, 1
%99 = icmp eq i64 %98, %79
br i1 %99, label %100, label %80
100: ; preds = %97, %73
%101 = call i32 @exit(i32 0)
unreachable
}