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

```asm
<main>:
  endbr64
  push   %r15
  lea    D29(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    D33(%rip),%rbx
  sub    $0xb8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x1c(%rsp),%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  lea    D41(%rip),%rdi
  call   <puts@plt>
  mov    0x1c(%rsp),%r11d
  test   %r11d,%r11d
  jle    L20
  lea    0x80(%rsp),%rax
  lea    0x50(%rsp),%rbp
  xor    %r15d,%r15d
  mov    %rax,(%rsp)
  lea    D66(%rip),%r14
  lea    0x20(%rsp),%r13
  lea    D49(%rip),%r12
  nopl   (%rax)
L104:
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x0(%r13,%r15,4),%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  add    $0x4,%rbp
  call   <scanf@plt>
  mov    -0x4(%rbp),%eax
  mov    (%rsp),%rdx
  mov    0x1c(%rsp),%r11d
  mov    %eax,(%rdx,%r15,4)
  add    $0x1,%r15
  cmp    %r15d,%r11d
  jg     L104
L20:
  pxor   %xmm1,%xmm1
  movl   $0x270f,0x74(%rsp)
  movapd %xmm1,%xmm0
  test   %r11d,%r11d
  je     L92
  pxor   %xmm1,%xmm1
  mov    $0x270f,%edx
  xor    %esi,%esi
  xor    %ebx,%ebx
  movapd %xmm1,%xmm0
  movslq %r11d,%r9
  lea    0x20(%rsp),%r8
  nopl   0x0(%rax,%rax,1)
L106:
  xor    %eax,%eax
  mov    $0x9,%edi
  test   %r11d,%r11d
  jle    L22
  nopl   0x0(%rax)
L86:
  cmp    %esi,(%r8,%rax,4)
  jg     L16
  mov    0x50(%rsp,%rax,4),%ecx
  cmp    %edx,%ecx
  jge    L16
  test   %ecx,%ecx
  setg   %r10b
  test   %r10b,%r10b
  cmovne %ecx,%edx
  cmovne %eax,%edi
L16:
  add    $0x1,%rax
  cmp    %rax,%r9
  jne    L86
L22:
  sub    $0x1,%edx
  movslq %edi,%rdi
  add    $0x1,%esi
  mov    %edx,0x50(%rsp,%rdi,4)
  test   %edx,%edx
  jne    L69
  pxor   %xmm2,%xmm2
  pxor   %xmm3,%xmm3
  pxor   %xmm4,%xmm4
  add    $0x1,%ebx
  cvtsi2sd %esi,%xmm2
  cvtsi2sdl 0x20(%rsp,%rdi,4),%xmm3
  cvtsi2sdl 0x80(%rsp,%rdi,4),%xmm4
  addsd  %xmm2,%xmm0
  addsd  %xmm2,%xmm1
  subsd  %xmm3,%xmm0
  subsd  %xmm3,%xmm1
  subsd  %xmm4,%xmm0
L69:
  cmp    %r11d,%ebx
  je     L92
  mov    0x74(%rsp),%edx
  jmp    L106
  nopl   0x0(%rax,%rax,1)
L92:
  pxor   %xmm2,%xmm2
  lea    D63(%rip),%rdi
  mov    $0x1,%eax
  movsd  %xmm1,0x8(%rsp)
  cvtsi2sd %r11d,%xmm2
  divsd  %xmm2,%xmm0
  movsd  %xmm2,(%rsp)
  cvtsd2ss %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  call   <printf@plt>
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  pxor   %xmm0,%xmm0
  mov    $0x1,%eax
  lea    D21(%rip),%rdi
  divsd  %xmm2,%xmm1
  cvtsd2ss %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  call   <printf@plt>
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L98
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L98:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D29
datatype: string
name: retrieve_data
arguments: data_label: D33
datatype: string
name: retrieve_data
arguments: data_label: D41
datatype: string
name: retrieve_data
arguments: data_label: D66
datatype: string
name: retrieve_data
arguments: data_label: D49
datatype: string
name: retrieve_data
arguments: data_label: D63
datatype: string
name: retrieve_data
arguments: data_label: D21
datatype: string

tool: D29: 
Enter the Total Number of Processes:	

tool: D33: %d

tool: D41: 
Enter Details of 

tool: D66: 
Enter Arrival Time:	

tool: D49: Enter Burst Time:	

tool: D63: 

Average Waiting Time:	%lf


tool: D21: 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);
}
```