user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x370,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x368(%rbp)
  movl   $0x0,-0x364(%rbp)
  movl   $0x0,-0x36c(%rbp)
  movb   $0x0,-0x36d(%rbp)
  movb   $0x0,-0x36e(%rbp)
  lea    D83(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D136(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D87(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D140(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D70(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D62(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movb   $0x0,-0x36e(%rbp)
  jmp    L82
L68:
  lea    -0x1b0(%rbp),%rax
  mov    %rax,%rdi
  call   <getline_my@plt>
  movzbl -0x1b0(%rbp),%eax
  mov    %al,-0x36d(%rbp)
  movsbl -0x36d(%rbp),%eax
  cmp    $0x71,%eax
  je     L5
  cmp    $0x71,%eax
  jg     L150
  cmp    $0x34,%eax
  je     L137
  cmp    $0x34,%eax
  jg     L150
  cmp    $0x33,%eax
  je     L4
  cmp    $0x33,%eax
  jg     L150
  cmp    $0x31,%eax
  je     L100
  cmp    $0x32,%eax
  je     L92
  jmp    L150
L100:
  lea    -0x1b0(%rbp),%rax
  mov    $0x64,%esi
  mov    %rax,%rdi
  call   <clean_text@plt>
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x1b0(%rbp),%rax
  mov    %rax,%rdi
  call   <getline_my@plt>
  lea    -0x1b0(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi_2@plt>
  mov    %eax,-0x368(%rbp)
  mov    -0x368(%rbp),%eax
  mov    %eax,%esi
  lea    D126(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movb   $0x1,-0x36e(%rbp)
  jmp    L82
L92:
  lea    -0x1b0(%rbp),%rdx
  lea    -0x360(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <getarray_sort@plt>
  mov    %eax,-0x364(%rbp)
  mov    -0x364(%rbp),%edx
  lea    -0x360(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <shellsort@plt>
  lea    D105(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x36c(%rbp)
  jmp    L142
L104:
  mov    -0x36c(%rbp),%eax
  cltq
  mov    -0x360(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D106(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x36c(%rbp)
L142:
  mov    -0x36c(%rbp),%eax
  cmp    -0x364(%rbp),%eax
  jl     L104
  mov    $0xa,%edi
  call   <putchar@plt>
  movb   $0x1,-0x36e(%rbp)
  jmp    L82
L4:
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x1b0(%rbp),%rax
  mov    $0x64,%esi
  mov    %rax,%rdi
  call   <clean_text@plt>
  lea    -0x1b0(%rbp),%rax
  mov    %rax,%rdi
  call   <getline_my@plt>
  lea    -0x1b0(%rbp),%rax
  mov    %rax,%rdi
  call   <reverse_string@plt>
  lea    -0x1b0(%rbp),%rax
  mov    %rax,%rsi
  lea    D142(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movb   $0x1,-0x36e(%rbp)
  jmp    L82
L137:
  lea    D51(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x1d0(%rbp),%rax
  mov    $0x1e,%esi
  mov    %rax,%rdi
  call   <clean_text@plt>
  lea    -0x140(%rbp),%rax
  mov    $0x12c,%esi
  mov    %rax,%rdi
  call   <clean_text@plt>
  lea    -0x1d0(%rbp),%rax
  mov    %rax,%rdi
  call   <getline_my@plt>
  lea    -0x140(%rbp),%rdx
  lea    -0x1d0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <expand_my@plt>
  lea    -0x140(%rbp),%rax
  mov    %rax,%rsi
  lea    D145(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movb   $0x1,-0x36e(%rbp)
  jmp    L82
L5:
  movb   $0x1,-0x36e(%rbp)
  jmp    L82
L150:
  lea    D134(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  nop
L82:
  cmpb   $0x0,-0x36e(%rbp)
  je     L68
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L111
  call   <__stack_chk_fail@plt>
L111:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D83
data_type: string
name: read_data
arguments: data_label: D136
data_type: string
name: read_data
arguments: data_label: D87
data_type: string
name: read_data
arguments: data_label: D104
data_type: string
name: read_data
arguments: data_label: D140
data_type: string
name: read_data
arguments: data_label: D70
data_type: string
name: read_data
arguments: data_label: D62
data_type: string
name: read_data
arguments: data_label: D6
data_type: string
name: read_data
arguments: data_label: D126
data_type: string
name: read_data
arguments: data_label: D105
data_type: string
name: read_data
arguments: data_label: D106
data_type: string
name: read_data
arguments: data_label: D10
data_type: string
name: read_data
arguments: data_label: D142
data_type: string
name: read_data
arguments: data_label: D51
data_type: string
name: read_data
arguments: data_label: D145
data_type: string
name: read_data
arguments: data_label: D134
data_type: string

tool: D83: 



















































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

tool: D87: Variants :

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

tool: D140: 2. Shellsorting.

tool: D70: 3. Reverse string.

tool: D62: 4. Expand string.

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

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


tool: D105: After sorting array seems so:

tool: D106: %d,

tool: D10: Enter please line to reverse:

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


tool: D51: Enter please string:

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


tool: D134: Wrong input, try again.

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;
  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");
  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 'q':
      exit = 1;
      break;
    default:
      printf("Wrong input, try again.\n");
      break;
    };
  }
}
```