user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r12
  lea    D52(%rip),%rdi
  push   %rbp
  push   %rbx
  lea    D59(%rip),%rbx
  sub    $0x360,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x358(%rsp)
  xor    %eax,%eax
  lea    0x1b0(%rsp),%rbp
  call   <puts@plt>
  lea    D11(%rip),%rdi
  call   <puts@plt>
  lea    D120(%rip),%rdi
  call   <puts@plt>
  lea    D53(%rip),%rdi
  call   <puts@plt>
  lea    D89(%rip),%rdi
  call   <puts@plt>
  lea    D164(%rip),%rdi
  call   <puts@plt>
  lea    D58(%rip),%rdi
  call   <puts@plt>
  lea    D189(%rip),%rdi
  call   <puts@plt>
L1:
  mov    %rbp,%rdi
  call   <getline_my@plt>
  movzbl 0x1b0(%rsp),%eax
  cmp    $0x35,%al
  jg     L54
  cmp    $0x30,%al
  jle    L2
  sub    $0x32,%eax
  cmp    $0x3,%al
  ja     L19
  lea    D47(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
L54:
  cmp    $0x71,%al
  jne    L2
L24:
  mov    0x358(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L120
  add    $0x360,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  lea    D147(%rip),%rdi
  call   <puts@plt>
  mov    $0x64,%esi
  mov    %rbp,%rdi
  call   <clean_text@plt>
  mov    %rbp,%rdi
  call   <getline_my@plt>
  mov    %rbp,%rdi
  call   <reverse_string@plt>
  mov    %rbp,%rsi
  lea    D63(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L24
  lea    D38(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <getline_my@plt>
  mov    %rbp,%rdi
  lea    0x220(%rsp),%rbp
  call   <atoi_2@plt>
  mov    %rbp,%rdi
  mov    $0x12c,%esi
  mov    %rax,%rbx
  call   <clean_text@plt>
  movswl %bx,%edi
  mov    %rbp,%rsi
  call   <itoa_dw@plt>
  mov    %rbp,%rsi
  lea    D43(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L24
  lea    0x190(%rsp),%r12
  lea    D50(%rip),%rdi
  call   <puts@plt>
  lea    0x220(%rsp),%rbp
  mov    %r12,%rdi
  mov    $0x1e,%esi
  call   <clean_text@plt>
  mov    $0x12c,%esi
  mov    %rbp,%rdi
  call   <clean_text@plt>
  mov    %r12,%rdi
  call   <getline_my@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <expand_my@plt>
  mov    %rbp,%rsi
  lea    D61(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L24
  mov    %rsp,%rbx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <getarray_sort@plt>
  mov    %rbx,%rdi
  mov    %eax,%esi
  mov    %eax,%ebp
  call   <shellsort@plt>
  xor    %eax,%eax
  lea    D6(%rip),%rdi
  call   <printf@plt>
  test   %ebp,%ebp
  jle    L27
  lea    -0x1(%rbp),%eax
  lea    D139(%rip),%rbp
  lea    0x4(%rsp,%rax,4),%r12
  cs nopw 0x0(%rax,%rax,1)
L67:
  mov    (%rbx),%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x4,%rbx
  call   <printf@plt>
  cmp    %r12,%rbx
  jne    L67
L27:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L24
L19:
  mov    $0x64,%esi
  mov    %rbp,%rdi
  call   <clean_text@plt>
  lea    D66(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <getline_my@plt>
  mov    %rbp,%rdi
  call   <atoi_2@plt>
  lea    D149(%rip),%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L24
L2:
  mov    %rbx,%rdi
  call   <puts@plt>
  jmp    L1
L120:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D52
type: string
name: retrieve_data
arguments: label: D59
type: string
name: retrieve_data
arguments: label: D11
type: string
name: retrieve_data
arguments: label: D120
type: string
name: retrieve_data
arguments: label: D53
type: string
name: retrieve_data
arguments: label: D89
type: string
name: retrieve_data
arguments: label: D164
type: string
name: retrieve_data
arguments: label: D58
type: string
name: retrieve_data
arguments: label: D189
type: string
name: retrieve_data
arguments: label: D147
type: string
name: retrieve_data
arguments: label: D63
type: string
name: retrieve_data
arguments: label: D38
type: string
name: retrieve_data
arguments: label: D43
type: string
name: retrieve_data
arguments: label: D50
type: string
name: retrieve_data
arguments: label: D61
type: string
name: retrieve_data
arguments: label: D6
type: string
name: retrieve_data
arguments: label: D139
type: string
name: retrieve_data
arguments: label: D66
type: string
name: retrieve_data
arguments: label: D149
type: string

tool: D52: 



















































tool: D59: Wrong input, try again.

tool: D11: Choose please what you want to do (press q to exit):

tool: D120: Variants :

tool: D53: 1. Convert from char to integer.

tool: D89: 2. Shellsorting.

tool: D164: 3. Reverse string.

tool: D58: 4. Expand string.

tool: D189: 5. Convert digit to string.

tool: D147: Enter please line to reverse:

tool: D63: After reverse string seens so:
%s


tool: D38: Input please digit which you want to convert to string:

tool: D43: Getted string is:
%s;


tool: D50: Enter please string:

tool: D61: After expand line seems so:%s


tool: D6: After sorting array seems so:

tool: D139: %d,

tool: D66: Input please chars to convert to integer:

tool: D149: Getted digit from char = %d;


assistant: ```c
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;
    };
  }
}
```