#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 */
void *atoi_2(char *);
int /*<<< orphan*/ clean_text(char *, int);
int /*<<< orphan*/ expand_my(char *, char *);
int getarray_sort(int *, char *);
int /*<<< orphan*/ getline_my(char *);
int /*<<< orphan*/ itoa_dw(short, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ reverse_string(char *);
int /*<<< orphan*/ shellsort(int *, int);
void main() {
  char line[100];
  char short_line[30];
  char long_line[300];
  int sort[100];
  int digit = 0;
  int len = 0;
  int i = 0;
  char choise = 0;
  char exit = 0;
  short int converted;
  printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
         "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
  printf("Choose please what you want to do (press q to exit):\n");
  printf("Variants :\n");
  printf("1. Convert from char to integer.\n");
  printf("2. Shellsorting.\n");
  printf("3. Reverse string.\n");
  printf("4. Expand string.\n");
  printf("5. Convert digit to string.\n");
  exit = 0;
  while (exit == 0) {
    getline_my(line);
    choise = line[0];
    switch (choise) {
    case '1':
      clean_text(line, 100);
      printf("Input please chars to convert to integer:\n");
      getline_my(line);
      digit = atoi_2(line);
      printf("Getted digit from char = %d;\n", digit);
      exit = 1;
      break;
    case '2':
      len = getarray_sort(sort, line);
      shellsort(sort, len);
      printf("After sorting array seems so:");
      for (i = 0; i < len; ++i) {
        printf("%d,", sort[i]);
      };
      printf("\n");
      exit = 1;
      break;
    case '3':
      printf("Enter please line to reverse:\n");
      clean_text(line, 100);
      getline_my(line);
      reverse_string(line);
      printf("After reverse string seens so:\n%s\n", line);
      exit = 1;
      break;
    case '4':
      printf("Enter please string:\n");
      clean_text(short_line, 30);
      clean_text(long_line, 300);
      getline_my(short_line);
      expand_my(short_line, long_line);
      printf("After expand line seems so:%s\n", long_line);
      exit = 1;
      break;
    case '5':
      printf("Input please digit which you want to convert to string:\n");
      getline_my(line);
      converted = atoi_2(line);
      clean_text(long_line, 300);
      itoa_dw(converted, long_line);
      printf("Getted string is:\n%s;\n", long_line);
      exit = 1;
      break;
    case 'q':
      exit = 1;
      break;
    default:
      printf("Wrong input, try again.\n");
      break;
    };
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x370,%rsp
movl   $0x0,-0x354(%rbp)
movl   $0x0,-0x358(%rbp)
movl   $0x0,-0x35c(%rbp)
movb   $0x0,-0x35d(%rbp)
movb   $0x0,-0x35e(%rbp)
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x0,-0x35e(%rbp)
movsbl -0x35e(%rbp),%eax
cmp    $0x0,%eax
jne    1519 <main+0x389>
lea    -0x70(%rbp),%rdi
call   1080 <getline_my@plt>
mov    -0x70(%rbp),%al
mov    %al,-0x35d(%rbp)
movsbl -0x35d(%rbp),%eax
mov    %eax,-0x364(%rbp)
sub    $0x31,%eax
je     12df <main+0x14f>
jmp    127b <main+0xeb>
mov    -0x364(%rbp),%eax
sub    $0x32,%eax
je     1333 <main+0x1a3>
jmp    128f <main+0xff>
mov    -0x364(%rbp),%eax
sub    $0x33,%eax
je     13cf <main+0x23f>
jmp    12a3 <main+0x113>
mov    -0x364(%rbp),%eax
sub    $0x34,%eax
je     141b <main+0x28b>
jmp    12b7 <main+0x127>
mov    -0x364(%rbp),%eax
sub    $0x35,%eax
je     148b <main+0x2fb>
jmp    12cb <main+0x13b>
mov    -0x364(%rbp),%eax
sub    $0x71,%eax
je     14fa <main+0x36a>
jmp    1506 <main+0x376>
lea    -0x70(%rbp),%rdi
mov    $0x64,%esi
call   10b0 <clean_text@plt>
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1080 <getline_my@plt>
lea    -0x70(%rbp),%rdi
call   1070 <atoi_2@plt>
mov    %eax,-0x354(%rbp)
mov    -0x354(%rbp),%esi
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x35e(%rbp)
jmp    1514 <main+0x384>
lea    -0x350(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1090 <getarray_sort@plt>
mov    %eax,-0x358(%rbp)
lea    -0x350(%rbp),%rdi
mov    -0x358(%rbp),%esi
call   10a0 <shellsort@plt>
lea    0xdd5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x35c(%rbp)
mov    -0x35c(%rbp),%eax
cmp    -0x358(%rbp),%eax
jge    13b5 <main+0x225>
movslq -0x35c(%rbp),%rax
mov    -0x350(%rbp,%rax,4),%esi
lea    0xdbb(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x35c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x35c(%rbp)
jmp    1373 <main+0x1e3>
lea    0xc76(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x35e(%rbp)
jmp    1514 <main+0x384>
lea    0xd83(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    $0x64,%esi
call   10b0 <clean_text@plt>
lea    -0x70(%rbp),%rdi
call   1080 <getline_my@plt>
lea    -0x70(%rbp),%rdi
call   1040 <reverse_string@plt>
lea    -0x70(%rbp),%rsi
lea    0xd70(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x35e(%rbp)
jmp    1514 <main+0x384>
lea    0xd79(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0x1e,%esi
call   10b0 <clean_text@plt>
lea    -0x1c0(%rbp),%rdi
mov    $0x12c,%esi
call   10b0 <clean_text@plt>
lea    -0x90(%rbp),%rdi
call   1080 <getline_my@plt>
lea    -0x90(%rbp),%rdi
lea    -0x1c0(%rbp),%rsi
call   1030 <expand_my@plt>
lea    -0x1c0(%rbp),%rsi
lea    0xd39(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x35e(%rbp)
jmp    1514 <main+0x384>
lea    0xd3e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1080 <getline_my@plt>
lea    -0x70(%rbp),%rdi
call   1070 <atoi_2@plt>
mov    %ax,-0x360(%rbp)
lea    -0x1c0(%rbp),%rdi
mov    $0x12c,%esi
call   10b0 <clean_text@plt>
mov    -0x360(%rbp),%ax
lea    -0x1c0(%rbp),%rsi
movswl %ax,%edi
call   1060 <itoa_dw@plt>
lea    -0x1c0(%rbp),%rsi
lea    0xd22(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x35e(%rbp)
jmp    1514 <main+0x384>
movb   $0x1,-0x35e(%rbp)
jmp    1514 <main+0x384>
lea    0xd13(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    123e <main+0xae>
add    $0x370,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x220,%rsp
lea    0xeea(%rip),%rdi
call   1060 <puts@plt>
lea    0xf11(%rip),%rdi
call   1060 <puts@plt>
lea    0xf3a(%rip),%rdi
call   1060 <puts@plt>
lea    0xf39(%rip),%rdi
call   1060 <puts@plt>
lea    0xf4e(%rip),%rdi
call   1060 <puts@plt>
lea    0xf53(%rip),%rdi
call   1060 <puts@plt>
lea    0xf5a(%rip),%rdi
call   1060 <puts@plt>
lea    0xf60(%rip),%rdi
call   1060 <puts@plt>
mov    %rsp,%rbx
lea    0x1002(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   10a0 <getline_my@plt>
movsbl (%rsp),%ecx
lea    -0x31(%rcx),%eax
cmp    $0x4,%eax
jbe    1257 <main+0xa7>
cmp    $0x71,%ecx
je     13f6 <main+0x246>
mov    %r14,%rdi
call   1060 <puts@plt>
jmp    1230 <main+0x80>
lea    0xda2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   10d0 <clean_text@plt>
lea    0xf80(%rip),%rdi
call   1060 <puts@plt>
mov    %rbx,%rdi
call   10a0 <getline_my@plt>
mov    %rbx,%rdi
call   1090 <atoi_2@plt>
lea    0xd7a(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    13f6 <main+0x246>
lea    0x90(%rsp),%r14
mov    %rsp,%rsi
mov    %r14,%rdi
call   10b0 <getarray_sort@plt>
mov    %eax,%ebx
mov    %r14,%rdi
mov    %eax,%esi
call   10c0 <shellsort@plt>
lea    0xd64(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
test   %ebx,%ebx
jle    130a <main+0x15a>
mov    %ebx,%r15d
lea    0xd6d(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x90(%rsp,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    12f0 <main+0x140>
mov    $0xa,%edi
call   1040 <putchar@plt>
jmp    13f6 <main+0x246>
lea    0xec0(%rip),%rdi
call   1060 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   10d0 <clean_text@plt>
mov    %rbx,%rdi
call   10a0 <getline_my@plt>
mov    %rbx,%rdi
call   1050 <reverse_string@plt>
lea    0xd08(%rip),%rdi
mov    %rbx,%rsi
jmp    13ef <main+0x23f>
lea    0xe70(%rip),%rdi
call   1060 <puts@plt>
lea    0x70(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1e,%esi
call   10d0 <clean_text@plt>
lea    0x90(%rsp),%r14
mov    %r14,%rdi
mov    $0x12c,%esi
call   10d0 <clean_text@plt>
mov    %rbx,%rdi
call   10a0 <getline_my@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <expand_my@plt>
lea    0xcd6(%rip),%rdi
jmp    13ec <main+0x23c>
lea    0xde9(%rip),%rdi
call   1060 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   10a0 <getline_my@plt>
mov    %rbx,%rdi
call   1090 <atoi_2@plt>
mov    %rax,%rbx
lea    0x90(%rsp),%r14
mov    %r14,%rdi
mov    $0x12c,%esi
call   10d0 <clean_text@plt>
movswl %bx,%edi
mov    %r14,%rsi
call   1080 <itoa_dw@plt>
lea    0xcaa(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x220,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [52 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\00"
@.str.1 = [54 x i8] c"Choose please what you want to do (press q to exit):\0A\00"
@.str.2 = [12 x i8] c"Variants :\0A\00"
@.str.3 = [34 x i8] c"1. Convert from char to integer.\0A\00"
@.str.4 = [18 x i8] c"2. Shellsorting.\0A\00"
@.str.5 = [20 x i8] c"3. Reverse string.\0A\00"
@.str.6 = [19 x i8] c"4. Expand string.\0A\00"
@.str.7 = [29 x i8] c"5. Convert digit to string.\0A\00"
@.str.8 = [43 x i8] c"Input please chars to convert to integer:\0A\00"
@.str.9 = [30 x i8] c"Getted digit from char = %d;\0A\00"
@.str.10 = [30 x i8] c"After sorting array seems so:\00"
@.str.11 = [4 x i8] c"%d,\00"
@.str.12 = [2 x i8] c"\0A\00"
@.str.13 = [31 x i8] c"Enter please line to reverse:\0A\00"
@.str.14 = [35 x i8] c"After reverse string seens so:\0A%s\0A\00"
@.str.15 = [22 x i8] c"Enter please string:\0A\00"
@.str.16 = [31 x i8] c"After expand line seems so:%s\0A\00"
@.str.17 = [57 x i8] c"Input please digit which you want to convert to string:\0A\00"
@.str.18 = [23 x i8] c"Getted string is:\0A%s;\0A\00"
@.str.19 = [25 x i8] c"Wrong input, try again.\0A\00"
define void @main() {
%1 = alloca [100 x i8]
%2 = alloca [30 x i8]
%3 = alloca [300 x i8]
%4 = alloca [100 x i32]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i16
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i8 0, i8* %8
store i8 0, i8* %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
store i8 0, i8* %9
br label %19
19: ; preds = %104, %0
%20 = load i8, i8* %9
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %105
23: ; preds = %19
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%25 = call i32 @getline_my(i8* %24)
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%27 = load i8, i8* %26
store i8 %27, i8* %8
%28 = load i8, i8* %8
%29 = sext i8 %28 to i32
switch i32 %29, label %102 [
i32 49, label %30
i32 50, label %41
i32 51, label %64
i32 52, label %74
i32 53, label %87
i32 113, label %101
]
30: ; preds = %23
%31 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%32 = call i32 @clean_text(i8* %31, i32 100)
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0))
%34 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%35 = call i32 @getline_my(i8* %34)
%36 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%37 = call i8* @atoi_2(i8* %36)
%38 = ptrtoint i8* %37 to i32
store i32 %38, i32* %5
%39 = load i32, i32* %5
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i32 %39)
store i8 1, i8* %9
br label %104
41: ; preds = %23
%42 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
%43 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%44 = call i32 @getarray_sort(i32* %42, i8* %43)
store i32 %44, i32* %6
%45 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
%46 = load i32, i32* %6
%47 = call i32 @shellsort(i32* %45, i32 %46)
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %7
br label %49
49: ; preds = %59, %41
%50 = load i32, i32* %7
%51 = load i32, i32* %6
%52 = icmp slt i32 %50, %51
br i1 %52, label %53, label %62
53: ; preds = %49
%54 = load i32, i32* %7
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %55
%57 = load i32, i32* %56
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 %57)
br label %59
59: ; preds = %53
%60 = load i32, i32* %7
%61 = add nsw i32 %60, 1
store i32 %61, i32* %7
br label %49
62: ; preds = %49
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
store i8 1, i8* %9
br label %104
64: ; preds = %23
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.13, i64 0, i64 0))
%66 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%67 = call i32 @clean_text(i8* %66, i32 100)
%68 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%69 = call i32 @getline_my(i8* %68)
%70 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%71 = call i32 @reverse_string(i8* %70)
%72 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0), i8* %72)
store i8 1, i8* %9
br label %104
74: ; preds = %23
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.15, i64 0, i64 0))
%76 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%77 = call i32 @clean_text(i8* %76, i32 30)
%78 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%79 = call i32 @clean_text(i8* %78, i32 300)
%80 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%81 = call i32 @getline_my(i8* %80)
%82 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%83 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%84 = call i32 @expand_my(i8* %82, i8* %83)
%85 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.16, i64 0, i64 0), i8* %85)
store i8 1, i8* %9
br label %104
87: ; preds = %23
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.17, i64 0, i64 0))
%89 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%90 = call i32 @getline_my(i8* %89)
%91 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%92 = call i8* @atoi_2(i8* %91)
%93 = ptrtoint i8* %92 to i16
store i16 %93, i16* %10
%94 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%95 = call i32 @clean_text(i8* %94, i32 300)
%96 = load i16, i16* %10
%97 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%98 = call i32 @itoa_dw(i16 signext %96, i8* %97)
%99 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0), i8* %99)
store i8 1, i8* %9
br label %104
101: ; preds = %23
store i8 1, i8* %9
br label %104
102: ; preds = %23
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.19, i64 0, i64 0))
br label %104
104: ; preds = %102, %101, %87, %74, %64, %62, %30
br label %19
105: ; preds = %19
ret void
}

LLVM IR (-O2):
@.str.9 = [30 x i8] c"Getted digit from char = %d;\0A\00"
@.str.10 = [30 x i8] c"After sorting array seems so:\00"
@.str.11 = [4 x i8] c"%d,\00"
@.str.14 = [35 x i8] c"After reverse string seens so:\0A%s\0A\00"
@.str.16 = [31 x i8] c"After expand line seems so:%s\0A\00"
@.str.18 = [23 x i8] c"Getted string is:\0A%s;\0A\00"
@str = [51 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\00"
@str.20 = [53 x i8] c"Choose please what you want to do (press q to exit):\00"
@str.21 = [11 x i8] c"Variants :\00"
@str.22 = [33 x i8] c"1. Convert from char to integer.\00"
@str.23 = [17 x i8] c"2. Shellsorting.\00"
@str.24 = [19 x i8] c"3. Reverse string.\00"
@str.25 = [18 x i8] c"4. Expand string.\00"
@str.26 = [28 x i8] c"5. Convert digit to string.\00"
@str.27 = [56 x i8] c"Input please digit which you want to convert to string:\00"
@str.28 = [21 x i8] c"Enter please string:\00"
@str.29 = [30 x i8] c"Enter please line to reverse:\00"
@str.30 = [42 x i8] c"Input please chars to convert to integer:\00"
@str.31 = [24 x i8] c"Wrong input, try again.\00"
define void @main() {
%1 = alloca [100 x i8]
%2 = alloca [30 x i8]
%3 = alloca [300 x i8]
%4 = alloca [100 x i32]
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%8 = bitcast [100 x i32]* %4 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.21, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.22, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.23, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.24, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.25, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.26, i64 0, i64 0))
%17 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
br label %18
18: ; preds = %68, %0
%19 = call i32 @getline_my(i8* %5)
%20 = load i8, i8* %5
%21 = sext i8 %20 to i32
switch i32 %21, label %68 [
i32 49, label %22
i32 50, label %30
i32 51, label %46
i32 52, label %52
i32 53, label %59
i32 113, label %70
]
22: ; preds = %18
%23 = call i32 @clean_text(i8* %5, i32 100)
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.30, i64 0, i64 0))
%25 = call i32 @getline_my(i8* %5)
%26 = call i8* @atoi_2(i8* %5)
%27 = ptrtoint i8* %26 to i64
%28 = trunc i64 %27 to i32
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i32 %28)
br label %70
30: ; preds = %18
%31 = call i32 @getarray_sort(i32* %17, i8* %5)
%32 = call i32 @shellsort(i32* %17, i32 %31)
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0))
%34 = icmp sgt i32 %31, 0
br i1 %34, label %35, label %44
35: ; preds = %30
%36 = zext i32 %31 to i64
br label %37
37: ; preds = %35, %37
%38 = phi i64 [ 0, %35 ], [ %42, %37 ]
%39 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %38
%40 = load i32, i32* %39
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 %40)
%42 = add nuw nsw i64 %38, 1
%43 = icmp eq i64 %42, %36
br i1 %43, label %44, label %37
44: ; preds = %37, %30
%45 = call i32 @putchar(i32 10)
br label %70
46: ; preds = %18
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.29, i64 0, i64 0))
%48 = call i32 @clean_text(i8* %5, i32 100)
%49 = call i32 @getline_my(i8* %5)
%50 = call i32 @reverse_string(i8* %5)
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0), i8* %5)
br label %70
52: ; preds = %18
%53 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.28, i64 0, i64 0))
%54 = call i32 @clean_text(i8* %6, i32 30)
%55 = call i32 @clean_text(i8* %7, i32 300)
%56 = call i32 @getline_my(i8* %6)
%57 = call i32 @expand_my(i8* %6, i8* %7)
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.16, i64 0, i64 0), i8* %7)
br label %70
59: ; preds = %18
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.27, i64 0, i64 0))
%61 = call i32 @getline_my(i8* %5)
%62 = call i8* @atoi_2(i8* %5)
%63 = ptrtoint i8* %62 to i64
%64 = trunc i64 %63 to i16
%65 = call i32 @clean_text(i8* %7, i32 300)
%66 = call i32 @itoa_dw(i16 signext %64, i8* %7)
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0), i8* %7)
br label %70
68: ; preds = %18
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.31, i64 0, i64 0))
br label %18
70: ; preds = %18, %59, %52, %46, %44, %22
ret void
}