user: What is the c source code of the assembly code below?

```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    L87
  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)
L88:
  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    L14
L1:
  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     L114
L74:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L100
  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)
L114:
  movzbl 0x4b(%rsp),%eax
  test   %al,%al
  je     L47
  movzbl %al,%r14d
  jmp    L74
  nop
L47:
  cmpb   $0x0,0xf(%rsp)
  je     L55
  movzbl 0x50(%rsp),%edx
  mov    %ebx,%esi
  lea    D9(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L55:
  add    %r15d,%ebx
  add    %r15d,%r12d
  cmp    %ebx,%ebp
  jg     L88
  jmp    L74
  nopl   0x0(%rax)
L14:
  mov    %ebx,%esi
  lea    0x3(%r15),%edx
  lea    D3(%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)
L61:
  movzbl 0x0(%r13,%rbx,1),%esi
  lea    D1(%rip),%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %ebx,%r14d
  jge    L61
  mov    $0xa,%edi
  mov    0x3c(%rsp),%ebx
  call   <putchar@plt>
  jmp    L1
L87:
  mov    $0xffffffff,%r14d
  jmp    L74
L100:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D9
data_type: string
name: retrieve_data
arguments: data_label: D3
data_type: string
name: retrieve_data
arguments: data_label: D1
data_type: string

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


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

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