user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<acceptData>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  movl   $0x0,-0x4(%rbp)
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L43:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D57(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0xffffffff,%eax
  je     L105
  cmpl   $0x1d,-0x4(%rbp)
  jle    L43
L105:
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0xffffffff,%eax
  jne    L44
  subl   $0x1,-0x4(%rbp)
L44:
  mov    -0x28(%rbp),%rax
  mov    -0x4(%rbp),%edx
  mov    %edx,(%rax)
  jmp    L106
L46:
  lea    D88(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x28(%rbp),%rax
  movl   $0x0,(%rax)
  movl   $0x0,-0x4(%rbp)
  lea    D92(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L84:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D57(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0xffffffff,%eax
  je     L47
  cmpl   $0x1d,-0x4(%rbp)
  jle    L84
L47:
  mov    -0x4(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
L106:
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <validateID@plt>
  test   %rax,%rax
  jne    L46
  movl   $0x0,-0x4(%rbp)
  lea    D75(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L19:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D57(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x4(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jl     L19
  jmp    L58
L72:
  movl   $0x0,-0x4(%rbp)
  lea    D84(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L34:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D57(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x4(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jl     L34
L58:
  mov    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <validatePrefs@plt>
  test   %rax,%rax
  jne    L72
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D43
data_type: string
name: read_data
arguments: data_label: D57
data_type: string
name: read_data
arguments: data_label: D88
data_type: string
name: read_data
arguments: data_label: D92
data_type: string
name: read_data
arguments: data_label: D75
data_type: string
name: read_data
arguments: data_label: D84
data_type: string
name: read_data
arguments: data_label: D31
data_type: string

tool: D43: 
Enter up to 30 student ID numbers or -1 to exit: 

tool: D57: %d

tool: D88: 
Error! All student ID numbers must be unique!

tool: D92: 

Enter up to 30 student ID numbers or -1 to exit: 

tool: D75: Enter lunch preferences for the class: 

tool: D84: 
Invalid preference entered! Please try again!!

tool: D31: 

Enter lunch preferences for the class:

assistant: ```c
void acceptData(int studID[], int prefer[], int *actualSize) {
  int i = 0;
  printf("\nEnter up to 30 student ID numbers or -1 to exit: ");
  do {
    scanf("%d", &studID[i]);
    i++;
  } while (studID[i - 1] != -1 && i < 30);
  if (studID[i - 1] == -1)
    i--;
  *actualSize = i;
  while (validateID(studID, actualSize)) {
    printf("\nError! All student ID numbers must be unique!");
    *actualSize = 0;
    i = 0;
    printf("\n\nEnter up to 30 student ID numbers or -1 to exit: ");
    do {
      scanf("%d", &studID[i]);
      i++;
    } while (studID[i - 1] != -1 && i < 30);
    *actualSize = i - 1;
  }
  i = 0;
  printf("Enter lunch preferences for the class: ");
  do {
    scanf("%d", &prefer[i]);
    i++;
  } while (i < *actualSize);
  while (validatePrefs(prefer, actualSize)) {
    i = 0;
    printf("\nInvalid preference entered! Please try again!!");
    printf("\n\nEnter lunch preferences for the class:");
    do {
      scanf("%d", &prefer[i]);
      i++;
    } while (i < *actualSize);
  }
  return;
}
```