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

```asm
<sjf_algorithm>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  movq   $0x0,(%rsp)
  movq   $0x0,0x8(%rsp)
  movabs $0x6e697475706d6f43,%rax
  movabs $0x7420746961572067,%rdx
  mov    %rax,0x10(%rsp)
  mov    %rdx,0x18(%rsp)
  movabs $0xa73656d69,%rax
  mov    $0x0,%edx
  mov    %rax,0x20(%rsp)
  mov    %rdx,0x28(%rsp)
  movq   $0x0,0x30(%rsp)
  movq   $0x0,0x38(%rsp)
  movw   $0x0,0x40(%rsp)
  movabs $0x6e697475706d6f43,%rax
  movabs $0x61206e7275542067,%rdx
  mov    %rax,0x50(%rsp)
  mov    %rdx,0x58(%rsp)
  movabs $0x697420646e756f72,%rax
  mov    $0xa73656d,%edx
  mov    %rax,0x60(%rsp)
  mov    %rdx,0x68(%rsp)
  movq   $0x0,0x70(%rsp)
  movq   $0x0,0x78(%rsp)
  movw   $0x0,0x80(%rsp)
  cmpq   $0x0,(%rdi)
  je     L34
  mov    %rdi,%r14
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  mov    $0x0,%ebp
  lea    D12(%rip),%r15
  jmp    L37
L34:
  lea    D18(%rip),%rdi
  call   <puts@plt>
  jmp    L13
L14:
  add    %eax,%r12d
  mov    %rsp,%rdi
  mov    %ebp,%esi
  mov    $0x0,%eax
  call   <add_burst_time@plt>
  lea    0x8(%rsp),%rdi
  mov    %r12d,%esi
  mov    $0x0,%eax
  call   <add_burst_time@plt>
  mov    %r12d,%r8d
  mov    %ebp,%ecx
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    %ebx,%ebp
  add    $0x1,%r13d
L37:
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <findshortest@plt>
  mov    %eax,%ebx
  cmp    $0xffffffff,%eax
  jne    L14
L13:
  mov    %rsp,%rsi
  lea    0x10(%rsp),%rdi
  mov    $0x1,%edx
  mov    $0x0,%eax
  call   <output_summary@plt>
  lea    0x8(%rsp),%rsi
  lea    0x50(%rsp),%rdi
  mov    $0x1,%edx
  mov    $0x0,%eax
  call   <output_summary@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L12:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D12
datatype: string
name: unpack_data
arguments: label: D18
datatype: string

tool: D12: P%d			%d				%d				%d


tool: D18: Nothing in the list

assistant: ```c
void sjf_algorithm(struct times **list) {
  int processCounter = 1, startTime = 0, stopTime = 0, searching = 1, curShort = 0, counter = 0;
  struct times *visited = 0;
  struct times *temp;
  struct times *wait = 0;
  struct times *turnaround = 0;
  char waitMessage[50] = {"Computing Wait times\n"};
  char summaryMessage[50] = {"Computing Turn around times\n"};
  temp = *list;
  if (temp == 0) {
    printf("Nothing in the list\n");
  } else {
    while (searching == 1) {
      curShort = findshortest(list);
      if (curShort == -1) {
        searching = 0;
      } else {
        stopTime = stopTime + curShort;
        add_burst_time(&wait, startTime);
        add_burst_time(&turnaround, stopTime);
        printf("P%d\t\t\t%d\t\t\t\t\%d\t\t\t\t%d\n", counter, curShort, startTime, stopTime);
        startTime = startTime + curShort;
      }
      counter++;
    }
  }
  counter = 1;
  output_summary(waitMessage, &wait, counter);
  counter = 1;
  output_summary(summaryMessage, &turnaround, counter);
  printf("\n");
}
```