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;
  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);
        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    0xe42(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x0,-0x35e(%rbp)
movsbl -0x35e(%rbp),%eax
cmp    $0x0,%eax
jne    1597 <main+0x407>
xor    %eax,%eax
lea    -0x70(%rbp),%rdi
call   1080 <getline_my@plt>
mov    -0x70(%rbp),%al
mov    %al,-0x35d(%rbp)
movsbl -0x35d(%rbp),%eax
mov    %eax,-0x36c(%rbp)
sub    $0x31,%eax
je     12e1 <main+0x151>
jmp    127d <main+0xed>
mov    -0x36c(%rbp),%eax
sub    $0x32,%eax
je     133b <main+0x1ab>
jmp    1291 <main+0x101>
mov    -0x36c(%rbp),%eax
sub    $0x33,%eax
je     13db <main+0x24b>
jmp    12a5 <main+0x115>
mov    -0x36c(%rbp),%eax
sub    $0x34,%eax
je     142d <main+0x29d>
jmp    12b9 <main+0x129>
mov    -0x36c(%rbp),%eax
sub    $0x35,%eax
je     14a5 <main+0x315>
jmp    12cd <main+0x13d>
mov    -0x36c(%rbp),%eax
sub    $0x71,%eax
je     1578 <main+0x3e8>
jmp    1584 <main+0x3f4>
lea    -0x70(%rbp),%rdi
mov    $0x64,%esi
mov    $0x0,%al
call   10b0 <clean_text@plt>
lea    0xe06(%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    0xe01(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x35e(%rbp)
jmp    1592 <main+0x402>
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    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x35c(%rbp)
mov    -0x35c(%rbp),%eax
cmp    -0x358(%rbp),%eax
jge    13c1 <main+0x231>
movslq -0x35c(%rbp),%rax
mov    -0x350(%rbp,%rax,4),%esi
lea    0xdbf(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x35c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x35c(%rbp)
jmp    137f <main+0x1ef>
lea    0xc7a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x35e(%rbp)
jmp    1592 <main+0x402>
lea    0xd87(%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    0xd6e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x35e(%rbp)
jmp    1592 <main+0x402>
lea    0xd77(%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    0xd2f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x35e(%rbp)
jmp    1592 <main+0x402>
lea    0xd34(%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  0xb1b(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1505 <main+0x375>
movsd  0xb11(%rip),%xmm0
ucomisd -0x368(%rbp),%xmm0
ff
jbe    1518 <main+0x388>
lea    0xd0d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    156c <main+0x3dc>
movsd  -0x368(%rbp),%xmm0
ff
lea    0xd3d(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    -0x1c0(%rbp),%rdi
mov    $0x12c,%esi
mov    $0x0,%al
call   10b0 <clean_text@plt>
movsd  -0x368(%rbp),%xmm0
ff
lea    -0x1c0(%rbp),%rdi
mov    $0x1,%al
call   1060 <itoa_dw@plt>
lea    -0x1c0(%rbp),%rsi
lea    0xd1c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x1,-0x35e(%rbp)
jmp    1592 <main+0x402>
movb   $0x1,-0x35e(%rbp)
jmp    1592 <main+0x402>
lea    0xd0d(%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    $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    0x10(%rsp),%rbx
lea    0x101d(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <getline_my@plt>
movsbl 0x10(%rsp),%ecx
lea    -0x31(%rcx),%eax
cmp    $0x4,%eax
jbe    125a <main+0xaa>
cmp    $0x71,%ecx
je     143b <main+0x28b>
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    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   10d0 <clean_text@plt>
lea    0xf96(%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    143b <main+0x28b>
lea    0xa0(%rsp),%r14
lea    0x10(%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    143b <main+0x28b>
lea    0xecd(%rip),%rdi
call   1060 <puts@plt>
lea    0x10(%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
jmp    1431 <main+0x281>
lea    0xe78(%rip),%rdi
call   1060 <puts@plt>
lea    0x80(%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
mov    %r14,%rsi
jmp    1434 <main+0x284>
lea    0xde3(%rip),%rdi
call   1060 <puts@plt>
lea    0x10(%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    0xa0(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x12c,%esi
xor    %eax,%eax
call   10d0 <clean_text@plt>
movsd  0x8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1080 <itoa_dw@plt>
lea    0xc82(%rip),%rdi
mov    %rbx,%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 = [23 x i8] c"Getted string is:\0A%s;\0A\00"
@.str.21 = [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 double
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 = %114, %0
%20 = load i8, i8* %9
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %115
23: ; preds = %19
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%25 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(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 %112 [
i32 49, label %30
i32 50, label %40
i32 51, label %63
i32 52, label %73
i32 53, label %86
i32 113, label %111
]
30: ; preds = %23
%31 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%32 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(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 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %34)
%36 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%37 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi_2 to i32 (i8*, ...)*)(i8* %36)
store i32 %37, i32* %5
%38 = load i32, i32* %5
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i32 %38)
store i8 1, i8* %9
br label %114
40: ; preds = %23
%41 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
%42 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%43 = call i32 (i32*, i8*, ...) bitcast (i32 (...)* @getarray_sort to i32 (i32*, i8*, ...)*)(i32* %41, i8* %42)
store i32 %43, i32* %6
%44 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
%45 = load i32, i32* %6
%46 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @shellsort to i32 (i32*, i32, ...)*)(i32* %44, i32 %45)
%47 = 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 %48
48: ; preds = %58, %40
%49 = load i32, i32* %7
%50 = load i32, i32* %6
%51 = icmp slt i32 %49, %50
br i1 %51, label %52, label %61
52: ; preds = %48
%53 = load i32, i32* %7
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %54
%56 = load i32, i32* %55
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 %56)
br label %58
58: ; preds = %52
%59 = load i32, i32* %7
%60 = add nsw i32 %59, 1
store i32 %60, i32* %7
br label %48
61: ; preds = %48
%62 = 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 %114
63: ; preds = %23
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.13, i64 0, i64 0))
%65 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%66 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %65, i32 100)
%67 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%68 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %67)
%69 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%70 = call i32 (i8*, ...) bitcast (i32 (...)* @reverse_string to i32 (i8*, ...)*)(i8* %69)
%71 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0), i8* %71)
store i8 1, i8* %9
br label %114
73: ; preds = %23
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.15, i64 0, i64 0))
%75 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%76 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %75, i32 30)
%77 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%78 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %77, i32 300)
%79 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%80 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %79)
%81 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%82 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%83 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @expand_my to i32 (i8*, i8*, ...)*)(i8* %81, i8* %82)
%84 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.16, i64 0, i64 0), i8* %84)
store i8 1, i8* %9
br label %114
86: ; preds = %23
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.17, i64 0, i64 0))
%88 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%89 = call i32 (i8*, ...) bitcast (i32 (...)* @getline_my to i32 (i8*, ...)*)(i8* %88)
%90 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%91 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi_2 to i32 (i8*, ...)*)(i8* %90)
%92 = sitofp i32 %91 to double
store double %92, double* %10
%93 = load double, double* %10
%94 = fcmp ogt double %93, 0x41EFFFFFFFE00000
br i1 %94, label %98, label %95
95: ; preds = %86
%96 = load double, double* %10
%97 = fcmp olt double %96, 0xC1EFFFFFFFE00000
br i1 %97, label %98, label %100
98: ; preds = %95, %86
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.18, i64 0, i64 0))
br label %110
100: ; preds = %95
%101 = load double, double* %10
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0), double %101)
%103 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%104 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %103, i32 300)
%105 = load double, double* %10
%106 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%107 = call i32 (double, i8*, ...) bitcast (i32 (...)* @itoa_dw to i32 (double, i8*, ...)*)(double %105, i8* %106)
%108 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0), i8* %108)
br label %110
110: ; preds = %100, %98
store i8 1, i8* %9
br label %114
111: ; preds = %23
store i8 1, i8* %9
br label %114
112: ; preds = %23
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.21, i64 0, i64 0))
br label %114
114: ; preds = %112, %111, %110, %73, %63, %61, %30
br label %19
115: ; 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.19 = [29 x i8] c"Getted converted = %20.20G;\0A\00"
@.str.20 = [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.22 = [53 x i8] c"Choose please what you want to do (press q to exit):\00"
@str.23 = [11 x i8] c"Variants :\00"
@str.24 = [33 x i8] c"1. Convert from char to integer.\00"
@str.25 = [17 x i8] c"2. Shellsorting.\00"
@str.26 = [19 x i8] c"3. Reverse string.\00"
@str.27 = [18 x i8] c"4. Expand string.\00"
@str.28 = [28 x i8] c"5. Convert digit to string.\00"
@str.29 = [56 x i8] c"Input please digit which you want to convert to string:\00"
@str.31 = [21 x i8] c"Enter please string:\00"
@str.32 = [30 x i8] c"Enter please line to reverse:\00"
@str.33 = [42 x i8] c"Input please chars to convert to integer:\00"
@str.34 = [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.22, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.23, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.24, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.25, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.26, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.27, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.28, i64 0, i64 0))
%17 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
br label %18
18: ; preds = %66, %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 %66 [
i32 49, label %22
i32 50, label %28
i32 51, label %44
i32 52, label %50
i32 53, label %57
i32 113, label %68
]
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.33, 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 %68
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 %68
44: ; preds = %18
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.32, 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 %68
50: ; preds = %18
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.31, 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 %68
57: ; preds = %18
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.29, 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 (i8*, i32, ...) bitcast (i32 (...)* @clean_text to i32 (i8*, i32, ...)*)(i8* %7, i32 300)
%64 = call i32 (double, i8*, ...) bitcast (i32 (...)* @itoa_dw to i32 (double, i8*, ...)*)(double %61, i8* %7)
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0), i8* %7)
br label %68
66: ; preds = %18
%67 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.34, i64 0, i64 0))
br label %18
68: ; preds = %18, %57, %50, %44, %42, %22
ret void
}