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

```asm
<Call_C_Arg_Foreign_D>:
  endbr64
  push   %r13
  push   %r12
  lea    0x0(,%rdx,8),%r12d
  push   %rbx
  mov    %edi,%ebx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  test   %esi,%esi
  je     L189
  cmp    $0x7,%ebx
  ja     L154
  lea    D411(%rip),%rdx
  mov    %rsp,%r13
  movslq (%rdx,%rbx,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
L189:
  cmp    $0x7,%ebx
  ja     L93
  lea    D8(%rip),%rdx
  mov    %rsp,%r13
  movslq (%rdx,%rbx,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   (%rax)
  lea    D363(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  cs nopw 0x0(%rax,%rax,1)
L37:
  lea    D169(%rip),%rsi
  lea    D216(%rip),%rdi
  xor    %eax,%eax
  call   <Inst_Printf@plt>
  mov    %r12d,%ecx
  mov    %r13,%rdx
  xor    %eax,%eax
  lea    D272(%rip),%rsi
  lea    D437(%rip),%rdi
  call   <Inst_Printf@plt>
L77:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L128
  add    $0x10,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D123(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L37
  lea    D5(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L37
  nopl   0x0(%rax,%rax,1)
  lea    D455(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L37
  nopl   0x0(%rax,%rax,1)
  lea    D132(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L37
  nopl   0x0(%rax,%rax,1)
  lea    D502(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L37
  nopl   0x0(%rax,%rax,1)
  lea    D58(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L37
  nopl   0x0(%rax,%rax,1)
  lea    D307(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L37
  nopl   0x0(%rax,%rax,1)
  lea    D467(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  cs nopw 0x0(%rax,%rax,1)
L201:
  mov    %r13,%rdx
  lea    D539(%rip),%rsi
  lea    D216(%rip),%rdi
  xor    %eax,%eax
  call   <Inst_Printf@plt>
  mov    %r12d,%r8d
  mov    %r13,%rcx
  mov    %r13,%rdx
  lea    D494(%rip),%rsi
  lea    D64(%rip),%rdi
  xor    %eax,%eax
  call   <Inst_Printf@plt>
  jmp    L77
  nopl   0x0(%rax,%rax,1)
  lea    D168(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L201
  nopl   0x0(%rax,%rax,1)
  lea    D149(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L201
  nopl   0x0(%rax,%rax,1)
  lea    D265(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L201
  nopl   0x0(%rax,%rax,1)
  lea    D429(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L201
  nopl   0x0(%rax,%rax,1)
  lea    D441(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L201
  nopl   0x0(%rax,%rax,1)
  lea    D263(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L201
  nopl   0x0(%rax,%rax,1)
  lea    D11(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  jmp    L201
L93:
  mov    %rsp,%r13
  lea    D470(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  lea    D169(%rip),%rsi
  lea    D216(%rip),%rdi
  xor    %eax,%eax
  call   <Inst_Printf@plt>
  xor    %eax,%eax
  mov    %r12d,%ecx
  mov    %r13,%rdx
  lea    D272(%rip),%rsi
  lea    D437(%rip),%rdi
  call   <Inst_Printf@plt>
  cmp    $0x7,%ebx
  jle    L77
  lea    -0x40(,%rbx,8),%ecx
  mov    %r13,%rdx
  lea    D92(%rip),%rsi
  xor    %eax,%eax
  lea    D150(%rip),%rdi
  call   <Inst_Printf@plt>
  jmp    L77
L154:
  mov    %rsp,%r13
  lea    D233(%rip),%rdx
  lea    D359(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  mov    %r13,%rdx
  lea    D539(%rip),%rsi
  xor    %eax,%eax
  lea    D216(%rip),%rdi
  call   <Inst_Printf@plt>
  xor    %eax,%eax
  mov    %r12d,%r8d
  mov    %r13,%rcx
  mov    %r13,%rdx
  lea    D494(%rip),%rsi
  lea    D64(%rip),%rdi
  call   <Inst_Printf@plt>
  cmp    $0x7,%ebx
  jle    L77
  lea    -0x40(,%rbx,8),%ecx
  mov    %r13,%rdx
  lea    D92(%rip),%rsi
  xor    %eax,%eax
  lea    D358(%rip),%rdi
  call   <Inst_Printf@plt>
  jmp    L77
L128:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D363
type_infered: string
name: disassemble_data
arguments: tag: D359
type_infered: string
name: disassemble_data
arguments: tag: D169
type_infered: string
name: disassemble_data
arguments: tag: D216
type_infered: string
name: disassemble_data
arguments: tag: D272
type_infered: string
name: disassemble_data
arguments: tag: D437
type_infered: string
name: disassemble_data
arguments: tag: D123
type_infered: string
name: disassemble_data
arguments: tag: D5
type_infered: string
name: disassemble_data
arguments: tag: D455
type_infered: string
name: disassemble_data
arguments: tag: D132
type_infered: string
name: disassemble_data
arguments: tag: D502
type_infered: string
name: disassemble_data
arguments: tag: D58
type_infered: string
name: disassemble_data
arguments: tag: D307
type_infered: string
name: disassemble_data
arguments: tag: D467
type_infered: string
name: disassemble_data
arguments: tag: D539
type_infered: string
name: disassemble_data
arguments: tag: D494
type_infered: string
name: disassemble_data
arguments: tag: D64
type_infered: string
name: disassemble_data
arguments: tag: D168
type_infered: string
name: disassemble_data
arguments: tag: D149
type_infered: string
name: disassemble_data
arguments: tag: D265
type_infered: string
name: disassemble_data
arguments: tag: D429
type_infered: string
name: disassemble_data
arguments: tag: D441
type_infered: string
name: disassemble_data
arguments: tag: D263
type_infered: string
name: disassemble_data
arguments: tag: D11
type_infered: string
name: disassemble_data
arguments: tag: D470
type_infered: string
name: disassemble_data
arguments: tag: D92
type_infered: string
name: disassemble_data
arguments: tag: D150
type_infered: string
name: disassemble_data
arguments: tag: D233
type_infered: string
name: disassemble_data
arguments: tag: D358
type_infered: string

tool: D363: $f18

tool: D359: %s

tool: D169: $25,pl_foreign_double

tool: D216: la

tool: D272: %s,%d($25)

tool: D437: l.d

tool: D123: $f17

tool: D5: $f16

tool: D455: $f15

tool: D132: $f14

tool: D502: $f13

tool: D58: $f12

tool: D307: $f19

tool: D467: $10

tool: D539: %s,pl_foreign_double

tool: D494: %s,%s,%d

tool: D64: addu

tool: D168: $9

tool: D149: $8

tool: D265: $7

tool: D429: $6

tool: D441: $5

tool: D263: $4

tool: D11: $11

tool: D470: $f1

tool: D92: %s,%d($sp)

tool: D150: s.d

tool: D233: $24

tool: D358: sw

assistant: ```c
int Call_C_Arg_Foreign_D(int offset, int adr_of, int index) {
  char dest[8];
  if (adr_of) {
    switch (offset) {
    case 0:
      sprintf(dest, "%s", "$4");
      break;
    case 1:
      sprintf(dest, "%s", "$5");
      break;
    case 2:
      sprintf(dest, "%s", "$6");
      break;
    case 3:
      sprintf(dest, "%s", "$7");
      break;
    case 4:
      sprintf(dest, "%s", "$8");
      break;
    case 5:
      sprintf(dest, "%s", "$9");
      break;
    case 6:
      sprintf(dest, "%s", "$10");
      break;
    case 7:
      sprintf(dest, "%s", "$11");
      break;
    default:
      sprintf(dest, "%s", "$24");
      break;
    }
    Inst_Printf("la", "%s,pl_foreign_double", dest);
    Inst_Printf("addu", "%s,%s,%d", dest, dest, index * 8);
    if (offset > 7) {
      Inst_Printf("sw", "%s,%d($sp)", dest, (offset - 8) * 8);
    }
    return 1;
  } else {
    switch (offset) {
    case 0:
      sprintf(dest, "%s", "$f12");
      break;
    case 1:
      sprintf(dest, "%s", "$f13");
      break;
    case 2:
      sprintf(dest, "%s", "$f14");
      break;
    case 3:
      sprintf(dest, "%s", "$f15");
      break;
    case 4:
      sprintf(dest, "%s", "$f16");
      break;
    case 5:
      sprintf(dest, "%s", "$f17");
      break;
    case 6:
      sprintf(dest, "%s", "$f18");
      break;
    case 7:
      sprintf(dest, "%s", "$f19");
      break;
    default:
      sprintf(dest, "%s", "$f1");
      break;
    }
    Inst_Printf("la", "$25,pl_foreign_double");
    Inst_Printf("l.d", "%s,%d($25)", dest, index * 8);
    if (offset > 7) {
      Inst_Printf("s.d", "%s,%d($sp)", dest, (offset - 8) * 8);
    }
    return 1;
  }
}
```