user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    $0x4,%esi
  mov    $0x32,%edi
  call   <calloc@plt>
  mov    %rax,%r14
  mov    $0x0,%eax
  call   <refresh@plt>
  lea    D103(%rip),%rdi
  call   <printf@plt>
  lea    D167(%rip),%r13
  lea    D94(%rip),%r12
  lea    D154(%rip),%rbp
  lea    D180(%rip),%rbx
  jmp    L11
L3:
  cmp    $0x4,%eax
  jne    L91
  lea    D87(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L105
  mov    $0x0,%eax
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L37:
  lea    D121(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  call   <check@plt>
  test   %eax,%eax
  jne    L6
  lea    D118(%rip),%rdi
  call   <printf@plt>
  lea    D148(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  jmp    L91
L6:
  lea    0x14(%rsp),%rdx
  lea    0x10(%rsp),%rsi
  lea    D171(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    %r14,%rdx
  mov    0x14(%rsp),%esi
  mov    0x10(%rsp),%edi
  call   <insert@plt>
  jmp    L91
L58:
  lea    D133(%rip),%rdi
  call   <printf@plt>
  lea    D148(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  jmp    L91
L5:
  lea    D182(%rip),%rdi
  call   <printf@plt>
  mov    %r14,%rdi
  call   <display@plt>
  lea    D148(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    $0x0,%eax
  call   <getchar@plt>
L91:
  mov    $0x0,%eax
  call   <refresh@plt>
L11:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <printf@plt>
  lea    D128(%rip),%rdi
  call   <printf@plt>
  lea    D164(%rip),%rdi
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  lea    D9(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  cmp    $0x3,%eax
  je     L5
  jg     L3
  cmp    $0x1,%eax
  je     L37
  cmp    $0x2,%eax
  jne    L91
  lea    D63(%rip),%rdi
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  lea    D9(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    $0x0,%eax
  call   <check@plt>
  cmp    $0x1,%eax
  je     L58
  mov    %r14,%rsi
  mov    0x10(%rsp),%edi
  call   <delete@plt>
  jmp    L91
L105:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D103
data_type: string
name: read_data
arguments: label: D167
data_type: string
name: read_data
arguments: label: D94
data_type: string
name: read_data
arguments: label: D154
data_type: string
name: read_data
arguments: label: D180
data_type: string
name: read_data
arguments: label: D87
data_type: string
name: read_data
arguments: label: D121
data_type: string
name: read_data
arguments: label: D118
data_type: string
name: read_data
arguments: label: D148
data_type: string
name: read_data
arguments: label: D171
data_type: string
name: read_data
arguments: label: D133
data_type: string
name: read_data
arguments: label: D182
data_type: string
name: read_data
arguments: label: D128
data_type: string
name: read_data
arguments: label: D164
data_type: string
name: read_data
arguments: label: D9
data_type: string
name: read_data
arguments: label: D63
data_type: string

tool: D103:           WELCOME TO OUR PROGRAM


tool: D167:           Please choose from available options:-


tool: D94: ****************************************************


tool: D154:      ENTER 1 TO INSERT


tool: D180:      Enter 2 To delete


tool: D87: Thanks for using program


tool: D121: Enter position and value to be inserted :  

tool: D118: Array is full


tool: D148: Enter a character to continue :

tool: D171: %d %d

tool: D133: Array is empty


tool: D182: Elements of arrays are as follows


tool: D128:      ENTER 3 TO displaqy


tool: D164:      Enter 4 To exit


tool: D9: %d

tool: D63: Enter position from which we need to perform deletion: 


assistant: ```c
int main() {
  int *ARR = calloc(50, sizeof(int));
  int i, pos, val;
  refresh();
  printf("          WELCOME TO OUR PROGRAM\n");
  while (1) {
    printf("          Please choose from available options:-\n");
    printf("****************************************************\n");
    printf("     ENTER 1 TO INSERT\n");
    printf("     Enter 2 To delete\n");
    printf("     ENTER 3 TO displaqy\n");
    printf("     Enter 4 To exit\n");
    scanf("%d", &i);
    switch (i) {
    case 1:
      printf("Enter position and value to be inserted :  ");
      int flag = check();
      if (flag == 0) {
        printf("Array is full\n");
        printf("Enter a character to continue :");
        getchar();
        getchar();
        break;
      }
      scanf("%d %d", &pos, &val);
      insert(pos, val, ARR);
      break;
    case 2:
      printf("Enter position from which we need to perform deletion: \n");
      scanf("%d", &pos);
      int flag1 = check();
      if (flag1 == 1) {
        printf("Array is empty\n");
        printf("Enter a character to continue :");
        getchar();
        getchar();
        break;
      }
      delete (pos, ARR);
      break;
    case 3:
      printf("Elements of arrays are as follows\n");
      display(ARR);
      printf("Enter a character to continue :");
      getchar();
      getchar();
      break;
    case 4:
      printf("Thanks for using program\n");
      return 0;
    }
    refresh();
  }
  return 0;
}
```