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

```asm
<write_fru_data>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdx,0x10(%rsp)
  mov    %r8b,0xf(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  mov    %dil,0x60(%rsp)
  test   %ecx,%ecx
  jle    L107
  movsbl %r8b,%eax
  mov    %ecx,%ebp
  mov    %esi,%r12d
  xor    %ebx,%ebx
  mov    %eax,0x38(%rsp)
  lea    0x63(%rsp),%rax
  mov    $0x10,%r15d
  lea    0x60(%rsp),%r13
  mov    %rax,0x30(%rsp)
  lea    0x4b(%rsp),%rax
  mov    %rax,0x18(%rsp)
  lea    0x4c(%rsp),%rax
  mov    %rax,0x20(%rsp)
  lea    0x50(%rsp),%rax
  mov    %rax,0x28(%rsp)
  nopl   0x0(%rax)
L99:
  lea    (%rbx,%r15,1),%edx
  mov    %ebp,%eax
  mov    0x30(%rsp),%rdi
  movslq %ebx,%rsi
  sub    %ebx,%eax
  cmp    %ebp,%edx
  mov    %r12w,0x61(%rsp)
  cmovg  %eax,%r15d
  add    0x10(%rsp),%rsi
  mov    %r15d,%edx
  call   <memcpy@plt>
  cmpb   $0x0,0xf(%rsp)
  jne    L71
L92:
  sub    $0x8,%rsp
  lea    0x3(%r15),%edx
  mov    %r13,%rsi
  mov    $0xa12,%edi
  movl   $0x10,0x54(%rsp)
  mov    0x40(%rsp),%eax
  movzbl %dl,%edx
  push   %rax
  mov    0x28(%rsp),%r9
  mov    0x30(%rsp),%r8
  mov    0x38(%rsp),%rcx
  call   <ipmi_cmd_mc@plt>
  mov    %eax,%r14d
  pop    %rax
  pop    %rdx
  test   %r14d,%r14d
  je     L102
L24:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L60
  add    $0x98,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L102:
  movzbl 0x4b(%rsp),%eax
  test   %al,%al
  je     L82
  movzbl %al,%r14d
  jmp    L24
  nop
L82:
  cmpb   $0x0,0xf(%rsp)
  je     L98
  movzbl 0x50(%rsp),%edx
  mov    %ebx,%esi
  lea    D7(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L98:
  add    %r15d,%ebx
  add    %r15d,%r12d
  cmp    %ebx,%ebp
  jg     L99
  jmp    L24
  nopl   0x0(%rax)
L71:
  mov    %ebx,%esi
  lea    0x3(%r15),%edx
  lea    D24(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %r14d,%r14d
  lea    0x2(%r15),%eax
  mov    %ebx,0x3c(%rsp)
  mov    %r14,%rbx
  mov    %eax,%r14d
  nopl   (%rax)
L87:
  movzbl 0x0(%r13,%rbx,1),%esi
  lea    D9(%rip),%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %ebx,%r14d
  jge    L87
  mov    $0xa,%edi
  mov    0x3c(%rsp),%ebx
  call   <putchar@plt>
  jmp    L92
L107:
  mov    $0xffffffff,%r14d
  jmp    L24
L60:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D7
type: string
name: unpack_data
arguments: data_tag: D24
type: string
name: unpack_data
arguments: data_tag: D9
type: string

tool: D7: write_fru_data[%d]: %d bytes written


tool: D24: write_fru_data[%d] (len=%d): 

tool: D9: %02x 

assistant: ```c
int write_fru_data(unsigned char id, unsigned short offset, unsigned char *data, int dlen, char fdebug) {
  int ret = -1;
  int chunk;
  unsigned short fruoff;
  unsigned char req[25];
  unsigned char resp[16];
  int sresp;
  unsigned char cc;
  int i, j;
  req[0] = id;
  fruoff = offset;
  chunk = 16;
  for (i = 0; i < dlen; i += chunk) {
    req[1] = fruoff & 0x00ff;
    req[2] = (fruoff & 0xff00) >> 8;
    if ((i + chunk) > dlen)
      chunk = dlen - i;
    memcpy(&req[3], &data[i], chunk);
    if (fdebug) {
      printf("write_fru_data[%d] (len=%d): ", i, chunk + 3);
      for (j = 0; j < chunk + 3; j++)
        printf("%02x ", req[j]);
      printf("\n");
    }
    sresp = sizeof(resp);
    ret = ipmi_cmd_mc((0x12 | (0x0a << 8)), req, (unsigned char)(chunk + 3), resp, &sresp, &cc, fdebug);
    if ((ret == 0) && (cc != 0))
      ret = cc & 0x00ff;
    if (fdebug && ret == 0)
      printf("write_fru_data[%d]: %d bytes written\n", i, resp[0]);
    if (ret != 0)
      break;
    fruoff += chunk;
  }
  return (ret);
}
```