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

```asm
<ipmi_test>:
  endbr64
  push   %r15
  mov    $0x1,%r15d
  push   %r14
  push   %r13
  mov    %edi,%r13d
  lea    D89(%rip),%rdi
  push   %r12
  push   %rbp
  lea    D36(%rip),%rbp
  push   %rbx
  sub    $0x138,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r12
  call   <puts@plt>
  nopl   0x0(%rax)
L53:
  mov    $0x2,%edx
  mov    %r15d,%esi
  mov    %r13d,%edi
  call   <lseek@plt>
  mov    $0x110,%edx
  mov    %r12,%rsi
  mov    %r13d,%edi
  call   <read@plt>
  mov    %r15d,%esi
  lea    D122(%rip),%rdi
  mov    %eax,0xc(%rsp)
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <printf@plt>
  mov    %ebx,%eax
  test   %ebx,%ebx
  jle    L106
  sub    $0x1,%eax
  mov    %r12,%r14
  lea    0x11(%rsp,%rax,1),%rbx
  nopl   0x0(%rax,%rax,1)
L59:
  movzbl (%r14),%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%r14
  call   <printf@plt>
  cmp    %rbx,%r14
  jne    L59
L106:
  mov    0xc(%rsp),%esi
  lea    D136(%rip),%rdi
  xor    %eax,%eax
  add    $0x1,%r15d
  call   <printf@plt>
  cmp    $0x14,%r15d
  jne    L53
  mov    $0x1,%r15d
  lea    D36(%rip),%rbp
  nopl   0x0(%rax)
L42:
  mov    $0x2,%edx
  mov    %r15d,%esi
  mov    %r13d,%edi
  call   <lseek@plt>
  mov    $0x110,%edx
  mov    %r12,%rsi
  mov    %r13d,%edi
  call   <read@plt>
  mov    %r15d,%esi
  lea    D32(%rip),%rdi
  mov    %eax,0xc(%rsp)
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <printf@plt>
  mov    %ebx,%eax
  test   %ebx,%ebx
  jle    L89
  sub    $0x1,%eax
  mov    %r12,%r14
  lea    0x11(%rsp,%rax,1),%rbx
L68:
  movzbl (%r14),%esi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%r14
  call   <printf@plt>
  cmp    %rbx,%r14
  jne    L68
L89:
  mov    0xc(%rsp),%esi
  lea    D136(%rip),%rdi
  xor    %eax,%eax
  add    $0x1,%r15d
  call   <printf@plt>
  cmp    $0x14,%r15d
  jne    L42
  xor    %esi,%esi
  mov    $0x2,%edx
  mov    %r13d,%edi
  call   <lseek@plt>
  mov    %r13d,%edi
  mov    $0x110,%edx
  mov    %r12,%rsi
  call   <read@plt>
  lea    D143(%rip),%rdi
  mov    %eax,%r14d
  xor    %eax,%eax
  call   <printf@plt>
  test   %r14d,%r14d
  jle    L45
  lea    -0x1(%r14),%eax
  mov    %r12,%r15
  lea    D36(%rip),%rbx
  lea    0x11(%rsp,%rax,1),%rbp
  nopl   0x0(%rax,%rax,1)
L27:
  movzbl (%r15),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%r15
  call   <printf@plt>
  cmp    %rbp,%r15
  jne    L27
L45:
  mov    %r14d,%esi
  lea    D136(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %esi,%esi
  mov    $0x2,%edx
  mov    %r13d,%edi
  call   <lseek@plt>
  mov    %r13d,%edi
  mov    $0x110,%edx
  mov    %r12,%rsi
  call   <read@plt>
  lea    D111(%rip),%rdi
  mov    %eax,%r14d
  xor    %eax,%eax
  call   <printf@plt>
  test   %r14d,%r14d
  jle    L17
  lea    -0x1(%r14),%eax
  mov    %r12,%r15
  lea    D36(%rip),%rbx
  lea    0x11(%rsp,%rax,1),%rbp
L126:
  movzbl (%r15),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%r15
  call   <printf@plt>
  cmp    %rbp,%r15
  jne    L126
L17:
  mov    %r14d,%esi
  lea    D136(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %esi,%esi
  mov    $0x2,%edx
  mov    %r13d,%edi
  call   <lseek@plt>
  mov    %r13d,%edi
  mov    $0x110,%edx
  mov    %r12,%rsi
  call   <read@plt>
  lea    D23(%rip),%rdi
  mov    %eax,%ebp
  xor    %eax,%eax
  call   <printf@plt>
  test   %ebp,%ebp
  jle    L61
  lea    -0x1(%rbp),%eax
  lea    D36(%rip),%rbx
  lea    0x11(%rsp,%rax,1),%r13
  nopw   0x0(%rax,%rax,1)
L92:
  movzbl (%r12),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%r12
  call   <printf@plt>
  cmp    %r12,%r13
  jne    L92
L61:
  xor    %eax,%eax
  mov    %ebp,%esi
  lea    D136(%rip),%rdi
  call   <printf@plt>
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L57
  add    $0x138,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L57:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D89
type_infered: string
name: parse_data
arguments: data_label: D36
type_infered: string
name: parse_data
arguments: data_label: D122
type_infered: string
name: parse_data
arguments: data_label: D136
type_infered: string
name: parse_data
arguments: data_label: D32
type_infered: string
name: parse_data
arguments: data_label: D143
type_infered: string
name: parse_data
arguments: data_label: D111
type_infered: string
name: parse_data
arguments: data_label: D23
type_infered: string

tool: D89: ==IPMI RAW TEST==

tool: D36: %x 

tool: D122: IPMI Sensor Reading ID %d: 

tool: D136: Error Code: %d


tool: D32: IPMI Get SDR Record ID %d: 

tool: D143: IPMI Dell Reset Energy: 

tool: D111: IPMI Dell Cumulative Energy: 

tool: D23: IPMI Dell Current Power: 

assistant: ```c
void ipmi_test(int fildes) {
  printf("==IPMI RAW TEST==\n");
  unsigned char data[272];
  int size;
  int i = 0;
  int j = 0;
  for (i = 1; i < 20; i++) {
    lseek(fildes, 0x0001000000000000 | i, 2);
    size = read(fildes, data, sizeof(data));
    printf("IPMI Sensor Reading ID %d: ", i);
    for (j = 0; j < size; j++) {
      printf("%x ", data[j]);
    }
    printf("Error Code: %d\n", size);
  }
  for (i = 1; i < 20; i++) {
    lseek(fildes, 0x0000000000000000 | i, 2);
    size = read(fildes, data, sizeof(data));
    printf("IPMI Get SDR Record ID %d: ", i);
    for (j = 0; j < size; j++) {
      printf("%x ", data[j]);
    }
    printf("Error Code: %d\n", size);
  }
  lseek(fildes, 0x0002000000000000, 2);
  size = read(fildes, data, sizeof(data));
  printf("IPMI Dell Reset Energy: ");
  for (j = 0; j < size; j++) {
    printf("%x ", data[j]);
  }
  printf("Error Code: %d\n", size);
  lseek(fildes, 0x0003000000000000, 2);
  size = read(fildes, data, sizeof(data));
  printf("IPMI Dell Cumulative Energy: ");
  for (j = 0; j < size; j++) {
    printf("%x ", data[j]);
  }
  printf("Error Code: %d\n", size);
  lseek(fildes, 0x0004000000000000, 2);
  size = read(fildes, data, sizeof(data));
  printf("IPMI Dell Current Power: ");
  for (j = 0; j < size; j++) {
    printf("%x ", data[j]);
  }
  printf("Error Code: %d\n", size);
}
```