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;
  short int wide = 0;
  char choise = 0;
  char exit = 0;
  double 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);
      if ((converted > 4294967295) || (converted < -4294967295))
        printf("Wrong input, try again ( digin must be < 4294967295 and > "
               "-4294967295 ) ;\n");
      else {
        printf("Getted converted = %20.20G;\n", converted);
        printf("And now input please wide of field:\n");
        clean_text(short_line, sizeof short_line);
        getline_my(short_line);
        wide = atoi_2(short_line);
        clean_text(long_line, 300);
        itoa_dw(converted, long_line, wide);
        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)
movw   $0x0,-0x35e(%rbp)
movb   $0x0,-0x35f(%rbp)
movb   $0x0,-0x360(%rbp)
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x0,-0x360(%rbp)
movsbl -0x360(%rbp),%eax
cmp    $0x0,%eax
jne    15eb <main+0x45b>
xor    %eax,%eax
lea    -0x70(%rbp),%rdi
call   1080 <getline_my@plt>
mov    -0x70(%rbp),%al
mov    %al,-0x35f(%rbp)
movsbl -0x35f(%rbp),%eax
mov    %eax,-0x36c(%rbp)
sub    $0x31,%eax
je     12ea <main+0x15a>
jmp    1286 <main+0xf6>
mov    -0x36c(%rbp),%eax
sub    $0x32,%eax
je     1344 <main+0x1b4>
jmp    129a <main+0x10a>
mov    -0x36c(%rbp),%eax
sub    $0x33,%eax
je     13e4 <main+0x254>
jmp    12ae <main+0x11e>
mov    -0x36c(%rbp),%eax
sub    $0x34,%eax
je     1436 <main+0x2a6>
jmp    12c2 <main+0x132>
mov    -0x36c(%rbp),%eax
sub    $0x35,%eax
je     14ae <main+0x31e>
jmp    12d6 <main+0x146>
mov    -0x36c(%rbp),%eax
sub    $0x71,%eax
je     15cc <main+0x43c>
jmp    15d8 <main+0x448>
lea    -0x70(%rbp),%rdi
mov    $0x64,%esi
mov    $0x0,%al
call   10b0 <clean_text@plt>
lea    0xdfd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1080 <getline_my@plt>
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1070 <atoi_2@plt>
mov    %eax,-0x354(%rbp)
mov    -0x354(%rbp),%esi
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x360(%rbp)
jmp    15e6 <main+0x456>
lea    -0x350(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x0,%al
call   1090 <getarray_sort@plt>
mov    %eax,-0x358(%rbp)
lea    -0x350(%rbp),%rdi
mov    -0x358(%rbp),%esi
mov    $0x0,%al
call   10a0 <shellsort@plt>
lea    0xdd0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x35c(%rbp)
mov    -0x35c(%rbp),%eax
cmp    -0x358(%rbp),%eax
jge    13ca <main+0x23a>
movslq -0x35c(%rbp),%rax
mov    -0x350(%rbp,%rax,4),%esi
lea    0xdb6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x35c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x35c(%rbp)
jmp    1388 <main+0x1f8>
lea    0xc71(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x360(%rbp)
jmp    15e6 <main+0x456>
lea    0xd7e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    $0x64,%esi
mov    $0x0,%al
call   10b0 <clean_text@plt>
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1080 <getline_my@plt>
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1040 <reverse_string@plt>
lea    -0x70(%rbp),%rsi
lea    0xd65(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x360(%rbp)
jmp    15e6 <main+0x456>
lea    0xd6e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0x1e,%esi
mov    $0x0,%al
call   10b0 <clean_text@plt>
lea    -0x1c0(%rbp),%rdi
mov    $0x12c,%esi
mov    $0x0,%al
call   10b0 <clean_text@plt>
lea    -0x90(%rbp),%rdi
mov    $0x0,%al
call   1080 <getline_my@plt>
lea    -0x90(%rbp),%rdi
lea    -0x1c0(%rbp),%rsi
mov    $0x0,%al
call   1030 <expand_my@plt>
lea    -0x1c0(%rbp),%rsi
lea    0xd26(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x360(%rbp)
jmp    15e6 <main+0x456>
lea    0xd2b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1080 <getline_my@plt>
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1070 <atoi_2@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x368(%rbp)
ff
movsd  -0x368(%rbp),%xmm0
ff
movsd  0xb12(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     150e <main+0x37e>
movsd  0xb08(%rip),%xmm0
ucomisd -0x368(%rbp),%xmm0
ff
jbe    1521 <main+0x391>
lea    0xd04(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    15c0 <main+0x430>
movsd  -0x368(%rbp),%xmm0
ff
lea    0xd34(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xd43(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0x1e,%esi
mov    $0x0,%al
call   10b0 <clean_text@plt>
lea    -0x90(%rbp),%rdi
mov    $0x0,%al
call   1080 <getline_my@plt>
lea    -0x90(%rbp),%rdi
mov    $0x0,%al
call   1070 <atoi_2@plt>
mov    %ax,-0x35e(%rbp)
lea    -0x1c0(%rbp),%rdi
mov    $0x12c,%esi
mov    $0x0,%al
call   10b0 <clean_text@plt>
movsd  -0x368(%rbp),%xmm0
ff
lea    -0x1c0(%rbp),%rdi
movswl -0x35e(%rbp),%esi
mov    $0x1,%al
call   1060 <itoa_dw@plt>
lea    -0x1c0(%rbp),%rsi
lea    0xced(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x360(%rbp)
jmp    15e6 <main+0x456>
movb   $0x1,-0x360(%rbp)
jmp    15e6 <main+0x456>
lea    0xcde(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1247 <main+0xb7>
add    $0x370,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x230,%rsp
lea    0xf07(%rip),%rdi
call   1060 <puts@plt>
lea    0xf2e(%rip),%rdi
call   1060 <puts@plt>
lea    0xf57(%rip),%rdi
call   1060 <puts@plt>
lea    0xf56(%rip),%rdi
call   1060 <puts@plt>
lea    0xf6b(%rip),%rdi
call   1060 <puts@plt>
lea    0xf70(%rip),%rdi
call   1060 <puts@plt>
lea    0xf77(%rip),%rdi
call   1060 <puts@plt>
lea    0xf7d(%rip),%rdi
call   1060 <puts@plt>
lea    0x30(%rsp),%rbx
lea    0x1041(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <getline_my@plt>
movsbl 0x30(%rsp),%ecx
lea    -0x31(%rcx),%eax
cmp    $0x4,%eax
jbe    125a <main+0xaa>
cmp    $0x71,%ecx
je     1474 <main+0x2c4>
mov    %r14,%rdi
call   1060 <puts@plt>
jmp    1230 <main+0x80>
lea    0xd9f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   10d0 <clean_text@plt>
lea    0xfba(%rip),%rdi
call   1060 <puts@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <getline_my@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <atoi_2@plt>
lea    0xd6f(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    1474 <main+0x2c4>
lea    0xa0(%rsp),%r14
lea    0x30(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   10b0 <getarray_sort@plt>
mov    %eax,%ebx
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10c0 <shellsort@plt>
lea    0xd53(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
test   %ebx,%ebx
jle    131a <main+0x16a>
mov    %ebx,%r15d
lea    0xd5c(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    0xa0(%rsp,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1300 <main+0x150>
mov    $0xa,%edi
call   1040 <putchar@plt>
jmp    1474 <main+0x2c4>
lea    0xef1(%rip),%rdi
call   1060 <puts@plt>
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   10d0 <clean_text@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <getline_my@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <reverse_string@plt>
lea    0xcf0(%rip),%rdi
mov    %rbx,%rsi
jmp    146d <main+0x2bd>
lea    0xe99(%rip),%rdi
call   1060 <puts@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1e,%esi
xor    %eax,%eax
call   10d0 <clean_text@plt>
lea    0xa0(%rsp),%r14
mov    %r14,%rdi
mov    $0x12c,%esi
xor    %eax,%eax
call   10d0 <clean_text@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <getline_my@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <expand_my@plt>
lea    0xcb6(%rip),%rdi
jmp    146a <main+0x2ba>
lea    0xde3(%rip),%rdi
call   1060 <puts@plt>
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <getline_my@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <atoi_2@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0xc9a(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
lea    0xdde(%rip),%rdi
call   1060 <puts@plt>
lea    0x10(%rsp),%rbx
mov    $0x1e,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   10d0 <clean_text@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <getline_my@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <atoi_2@plt>
mov    %eax,%ebx
lea    0xa0(%rsp),%r14
mov    %r14,%rdi
mov    $0x12c,%esi
xor    %eax,%eax
call   10d0 <clean_text@plt>
movswl %bx,%esi
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1080 <itoa_dw@plt>
lea    0xc49(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x230,%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 = [75 x i8] c"Wrong input, try again ( digin must be < 4294967295 and > -4294967295 ) ;\0A\00"
@.str.19 = [29 x i8] c"Getted converted = %20.20G;\0A\00"
@.str.20 = [37 x i8] c"And now input please wide of field:\0A\00"
@.str.21 = [23 x i8] c"Getted string is:\0A%s;\0A\00"
@.str.22 = [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 i16
%9 = alloca i8
%10 = alloca i8
%11 = alloca double
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i16 0, i16* %8
store i8 0, i8* %9
store i8 0, i8* %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
store i8 0, i8* %10
br label %20
20: ; preds = %125, %0
%21 = load i8, i8* %10
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %126
24: ; preds = %20
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%26 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %25)
%27 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%28 = load i8, i8* %27
store i8 %28, i8* %9
%29 = load i8, i8* %9
%30 = sext i8 %29 to i32
switch i32 %30, label %123 [
i32 49, label %31
i32 50, label %41
i32 51, label %64
i32 52, label %74
i32 53, label %87
i32 113, label %122
]
31: ; preds = %24
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%33 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %32, i32 100)
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0))
%35 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%36 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %35)
%37 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%38 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi_2 to i32 (i8*, ...)*)(i8* %37)
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* %10
br label %125
41: ; preds = %24
%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 (i32*, i8*, ...) bitcast (i32 (...)* @getarray_sort to i32 (i32*, i8*, ...)*)(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 (i32*, i32, ...) bitcast (i32 (...)* @shellsort to i32 (i32*, i32, ...)*)(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* %10
br label %125
64: ; preds = %24
%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 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %66, i32 100)
%68 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%69 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %68)
%70 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%71 = call i32 (i8*, ...) bitcast (i32 (...)* @reverse_string to i32 (i8*, ...)*)(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* %10
br label %125
74: ; preds = %24
%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 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %76, i32 30)
%78 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%79 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %78, i32 300)
%80 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%81 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(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 (i8*, i8*, ...) bitcast (i32 (...)* @expand_my to i32 (i8*, i8*, ...)*)(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* %10
br label %125
87: ; preds = %24
%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 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %89)
%91 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%92 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi_2 to i32 (i8*, ...)*)(i8* %91)
%93 = sitofp i32 %92 to double
store double %93, double* %11
%94 = load double, double* %11
%95 = fcmp ogt double %94, 0x41EFFFFFFFE00000
br i1 %95, label %99, label %96
96: ; preds = %87
%97 = load double, double* %11
%98 = fcmp olt double %97, 0xC1EFFFFFFFE00000
br i1 %98, label %99, label %101
99: ; preds = %96, %87
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.18, i64 0, i64 0))
br label %121
101: ; preds = %96
%102 = load double, double* %11
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0), double %102)
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.20, i64 0, i64 0))
%105 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%106 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i64, ...)*)(i8* %105, i64 30)
%107 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%108 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %107)
%109 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%110 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi_2 to i32 (i8*, ...)*)(i8* %109)
%111 = trunc i32 %110 to i16
store i16 %111, i16* %8
%112 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%113 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %112, i32 300)
%114 = load double, double* %11
%115 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%116 = load i16, i16* %8
%117 = sext i16 %116 to i32
%118 = call i32 (double, i8*, i32, ...) bitcast (i32 (...)* @itoa_dw to i32 (double, i8*, i32, ...)*)(double %114, i8* %115, i32 %117)
%119 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0), i8* %119)
br label %121
121: ; preds = %101, %99
store i8 1, i8* %10
br label %125
122: ; preds = %24
store i8 1, i8* %10
br label %125
123: ; preds = %24
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.22, i64 0, i64 0))
br label %125
125: ; preds = %123, %122, %121, %74, %64, %62, %31
br label %20
126: ; preds = %20
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.19 = [29 x i8] c"Getted converted = %20.20G;\0A\00"
@.str.21 = [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.23 = [53 x i8] c"Choose please what you want to do (press q to exit):\00"
@str.24 = [11 x i8] c"Variants :\00"
@str.25 = [33 x i8] c"1. Convert from char to integer.\00"
@str.26 = [17 x i8] c"2. Shellsorting.\00"
@str.27 = [19 x i8] c"3. Reverse string.\00"
@str.28 = [18 x i8] c"4. Expand string.\00"
@str.29 = [28 x i8] c"5. Convert digit to string.\00"
@str.30 = [56 x i8] c"Input please digit which you want to convert to string:\00"
@str.31 = [36 x i8] c"And now input please wide of field:\00"
@str.33 = [21 x i8] c"Enter please string:\00"
@str.34 = [30 x i8] c"Enter please line to reverse:\00"
@str.35 = [42 x i8] c"Input please chars to convert to integer:\00"
@str.36 = [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.23, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.24, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.25, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.26, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.27, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.28, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.29, i64 0, i64 0))
%17 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
br label %18
18: ; preds = %72, %0
%19 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %5)
%20 = load i8, i8* %5
%21 = sext i8 %20 to i32
switch i32 %21, label %72 [
i32 49, label %22
i32 50, label %28
i32 51, label %44
i32 52, label %50
i32 53, label %57
i32 113, label %74
]
22: ; preds = %18
%23 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %5, i32 100)
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.35, i64 0, i64 0))
%25 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %5)
%26 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi_2 to i32 (i8*, ...)*)(i8* %5)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i32 %26)
br label %74
28: ; preds = %18
%29 = call i32 (i32*, i8*, ...) bitcast (i32 (...)* @getarray_sort to i32 (i32*, i8*, ...)*)(i32* %17, i8* %5)
%30 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @shellsort to i32 (i32*, i32, ...)*)(i32* %17, i32 %29)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0))
%32 = icmp sgt i32 %29, 0
br i1 %32, label %33, label %42
33: ; preds = %28
%34 = zext i32 %29 to i64
br label %35
35: ; preds = %33, %35
%36 = phi i64 [ 0, %33 ], [ %40, %35 ]
%37 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %36
%38 = load i32, i32* %37
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 %38)
%40 = add nuw nsw i64 %36, 1
%41 = icmp eq i64 %40, %34
br i1 %41, label %42, label %35
42: ; preds = %35, %28
%43 = call i32 @putchar(i32 10)
br label %74
44: ; preds = %18
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.34, i64 0, i64 0))
%46 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %5, i32 100)
%47 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %5)
%48 = call i32 (i8*, ...) bitcast (i32 (...)* @reverse_string to i32 (i8*, ...)*)(i8* %5)
%49 = 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 %74
50: ; preds = %18
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.33, i64 0, i64 0))
%52 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %6, i32 30)
%53 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %7, i32 300)
%54 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %6)
%55 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @expand_my to i32 (i8*, i8*, ...)*)(i8* %6, i8* %7)
%56 = 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 %74
57: ; preds = %18
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.30, i64 0, i64 0))
%59 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %5)
%60 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi_2 to i32 (i8*, ...)*)(i8* %5)
%61 = sitofp i32 %60 to double
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0), double %61)
%63 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.31, i64 0, i64 0))
%64 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i64, ...)*)(i8* %6, i64 30)
%65 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %6)
%66 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi_2 to i32 (i8*, ...)*)(i8* %6)
%67 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %7, i32 300)
%68 = shl i32 %66, 16
%69 = ashr exact i32 %68, 16
%70 = call i32 (double, i8*, i32, ...) bitcast (i32 (...)* @itoa_dw to i32 (double, i8*, i32, ...)*)(double %61, i8* %7, i32 %69)
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0), i8* %7)
br label %74
72: ; preds = %18
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.36, i64 0, i64 0))
br label %18
74: ; preds = %18, %57, %50, %44, %42, %22
ret void
}