user: What would the C source look like for the assembly code provided here:

```asm
<mapPanorama>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %edi,-0x84(%rbp)
  mov    %esi,-0x88(%rbp)
  mov    %rdx,-0x90(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x60(%rbp)
  movq   $0x0,-0x58(%rbp)
  movq   $0x0,-0x50(%rbp)
  movq   $0x0,-0x48(%rbp)
  movq   $0x0,-0x40(%rbp)
  movq   $0x0,-0x38(%rbp)
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  movl   $0x2,-0x5c(%rbp)
  movl   $0x4,-0x58(%rbp)
  movl   $0x6,-0x54(%rbp)
  movl   $0x8,-0x50(%rbp)
  movl   $0xc,-0x4c(%rbp)
  movl   $0x10,-0x48(%rbp)
  movl   $0x14,-0x44(%rbp)
  movl   $0x18,-0x40(%rbp)
  movl   $0x2,-0x34(%rbp)
  movl   $0x4,-0x30(%rbp)
  movl   $0x8,-0x2c(%rbp)
  movl   $0xc,-0x28(%rbp)
  movl   $0x9,-0x68(%rbp)
  movl   $0x5,-0x64(%rbp)
  cmpl   $0x0,-0x84(%rbp)
  jle    L10
  mov    $0x1,%eax
  jmp    L26
L10:
  mov    $0xffffffff,%eax
L26:
  mov    %eax,-0x70(%rbp)
  mov    -0x84(%rbp),%eax
  imul   -0x70(%rbp),%eax
  mov    %eax,-0x84(%rbp)
  mov    D9(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x78(%rbp)
  movl   $0x0,-0x74(%rbp)
  movl   $0x0,-0x7c(%rbp)
  jmp    L46
L45:
  mov    -0x7c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x88(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  mov    -0x60(%rbp,%rax,4),%edx
  mov    -0x84(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    %eax,-0x6c(%rbp)
  mov    -0x6c(%rbp),%eax
  cmp    -0x78(%rbp),%eax
  jge    L7
  mov    -0x6c(%rbp),%eax
  mov    %eax,-0x78(%rbp)
  mov    -0x7c(%rbp),%eax
  mov    %eax,-0x74(%rbp)
L7:
  addl   $0x1,-0x7c(%rbp)
L46:
  mov    -0x88(%rbp),%eax
  cltq
  mov    -0x68(%rbp,%rax,4),%eax
  cmp    %eax,-0x7c(%rbp)
  jl     L45
  mov    -0x90(%rbp),%rax
  mov    -0x78(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x88(%rbp),%eax
  cltq
  mov    -0x68(%rbp,%rax,4),%eax
  sub    $0x1,%eax
  movslq %eax,%rcx
  mov    -0x88(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  mov    -0x60(%rbp,%rax,4),%ecx
  mov    -0x74(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x88(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  add    %rsi,%rax
  mov    -0x60(%rbp,%rax,4),%eax
  imul   -0x70(%rbp),%eax
  add    %ecx,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L39
  call   <__stack_chk_fail@plt>
L39:
  leave
  ret
```

assistant: ```c
int mapPanorama(int nrgVal, int ampRes, int *quantError) {
  int i;
  int min_val, val;
  int panTable[2][10] = {{0, 2, 4, 6, 8, 12, 16, 20, 24}, {0, 2, 4, 8, 12}};
  int maxIndex[2] = {9, 5};
  int panIndex;
  int sign;
  ;
  ;
  ;
  sign = nrgVal > 0 ? 1 : -1;
  ;
  nrgVal = sign * nrgVal;
  ;
  min_val = INT_MAX;
  panIndex = 0;
  ;
  ;
  for (i = 0; i < maxIndex[ampRes]; i++) {
    ;
    ;
    val = abs(nrgVal - panTable[ampRes][i]);
    ;
    ;
    if (val < min_val) {
      ;
      min_val = val;
      panIndex = i;
    }
  };
  *quantError = min_val;
  ;
  ;
  ;
  ;
  return panTable[ampRes][maxIndex[ampRes] - 1] + sign * panTable[ampRes][panIndex];
}
```