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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xb8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  lea    D94(%rip),%rdi
  call   <printf@plt>
  lea    0x1c(%rsp),%rsi
  lea    D82(%rip),%rdi
  call   <scanf@plt>
  lea    D86(%rip),%rdi
  call   <puts@plt>
  mov    0x1c(%rsp),%r10d
  test   %r10d,%r10d
  jle    L84
  lea    0x50(%rsp),%rbp
  mov    $0x0,%ebx
  lea    D17(%rip),%r15
  lea    0x20(%rsp),%r14
  lea    D82(%rip),%r12
  lea    D0(%rip),%r13
L69:
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    (%r14,%rbx,4),%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  mov    0x0(%rbp),%eax
  mov    %eax,0x80(%rsp,%rbx,4)
  mov    0x1c(%rsp),%r10d
  add    $0x1,%rbx
  add    $0x4,%rbp
  cmp    %ebx,%r10d
  jg     L69
L84:
  movl   $0x270f,0x74(%rsp)
  mov    D96(%rip),%rbp
  movq   %rbp,%xmm0
  test   %r10d,%r10d
  je     L42
  mov    D96(%rip),%rbp
  movq   %rbp,%xmm0
  mov    $0x0,%edi
  mov    $0x0,%ebx
  mov    %r10d,%r9d
  lea    0x20(%rsp),%r8
  jmp    L110
L65:
  add    $0x1,%rax
  cmp    %r9,%rax
  je     L118
L6:
  cmp    %edi,(%r8,%rax,4)
  jg     L65
  mov    0x50(%rsp,%rax,4),%esi
  movslq %edx,%r11
  cmp    0x50(%rsp,%r11,4),%esi
  jge    L65
  test   %esi,%esi
  cmovg  %eax,%edx
  jmp    L65
L118:
  movslq %edx,%rcx
  mov    0x50(%rsp,%rcx,4),%eax
  sub    $0x1,%eax
  mov    %eax,0x50(%rsp,%rcx,4)
  jne    L106
  add    $0x1,%ebx
  lea    0x1(%rdi),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  pxor   %xmm2,%xmm2
  cvtsi2sdl 0x20(%rsp,%rcx,4),%xmm2
  addsd  %xmm1,%xmm0
  subsd  %xmm2,%xmm0
  pxor   %xmm3,%xmm3
  cvtsi2sdl 0x80(%rsp,%rcx,4),%xmm3
  subsd  %xmm3,%xmm0
  movq   %rbp,%xmm4
  addsd  %xmm4,%xmm1
  subsd  %xmm2,%xmm1
  movq   %xmm1,%rbp
L106:
  add    $0x1,%edi
  cmp    %r10d,%ebx
  je     L42
L110:
  mov    $0x0,%eax
  mov    $0x9,%edx
  test   %r10d,%r10d
  jg     L6
  jmp    L118
L42:
  pxor   %xmm5,%xmm5
  cvtsi2sd %r10d,%xmm5
  movsd  %xmm5,0x8(%rsp)
  divsd  %xmm5,%xmm0
  cvtsd2ss %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  lea    D49(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movq   %rbp,%xmm0
  divsd  0x8(%rsp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  lea    D80(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L58
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L58:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D94
type: string
name: read_data
arguments: label: D82
type: string
name: read_data
arguments: label: D86
type: string
name: read_data
arguments: label: D17
type: string
name: read_data
arguments: label: D0
type: string
name: read_data
arguments: label: D96
type: f64
name: read_data
arguments: label: D49
type: string
name: read_data
arguments: label: D80
type: string

tool: D94: 
Enter the Total Number of Processes:	

tool: D82: %d

tool: D86: 
Enter Details of 

tool: D17: 
Enter Arrival Time:	

tool: D0: Enter Burst Time:	

tool: D96: 0

tool: D49: 

Average Waiting Time:	%lf


tool: D80: Average Turnaround Time:	%lf


assistant: ```c
void main() {
  int arrival_time[10], burst_time[10], temp[10];
  int i, smallest, count = 0, time, limit;
  double wait_time = 0, turnaround_time = 0, end;
  float average_waiting_time, average_turnaround_time;
  printf("\nEnter the Total Number of Processes:\t");
  scanf("%d", &limit);
  printf("\nEnter Details of \n");
  for (i = 0; i < limit; i++) {
    printf("\nEnter Arrival Time:\t");
    scanf("%d", &arrival_time[i]);
    printf("Enter Burst Time:\t");
    scanf("%d", &burst_time[i]);
    temp[i] = burst_time[i];
  }
  burst_time[9] = 9999;
  for (time = 0; count != limit; time++) {
    smallest = 9;
    for (i = 0; i < limit; i++) {
      if (arrival_time[i] <= time && burst_time[i] < burst_time[smallest] && burst_time[i] > 0) {
        smallest = i;
      }
    }
    burst_time[smallest]--;
    if (burst_time[smallest] == 0) {
      count++;
      end = time + 1;
      wait_time = wait_time + end - arrival_time[smallest] - temp[smallest];
      turnaround_time = turnaround_time + end - arrival_time[smallest];
    }
  }
  average_waiting_time = wait_time / limit;
  average_turnaround_time = turnaround_time / limit;
  printf("\n\nAverage Waiting Time:\t%lf\n", average_waiting_time);
  printf("Average Turnaround Time:\t%lf\n", average_turnaround_time);
}
```