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

```asm
<ipmi_test>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x140,%rsp
  mov    %edi,-0x134(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D94(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x12c(%rbp)
  movl   $0x0,-0x128(%rbp)
  movl   $0x1,-0x12c(%rbp)
  jmp    L61
L149:
  mov    -0x12c(%rbp),%ecx
  mov    -0x134(%rbp),%eax
  mov    $0x2,%edx
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <lseek@plt>
  lea    -0x120(%rbp),%rcx
  mov    -0x134(%rbp),%eax
  mov    $0x110,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,-0x124(%rbp)
  mov    -0x12c(%rbp),%eax
  mov    %eax,%esi
  lea    D147(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x128(%rbp)
  jmp    L67
L32:
  mov    -0x128(%rbp),%eax
  cltq
  movzbl -0x120(%rbp,%rax,1),%eax
  movzbl %al,%eax
  mov    %eax,%esi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x128(%rbp)
L67:
  mov    -0x128(%rbp),%eax
  cmp    -0x124(%rbp),%eax
  jl     L32
  mov    -0x124(%rbp),%eax
  mov    %eax,%esi
  lea    D67(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x12c(%rbp)
L61:
  cmpl   $0x13,-0x12c(%rbp)
  jle    L149
  movl   $0x1,-0x12c(%rbp)
  jmp    L109
L23:
  mov    -0x12c(%rbp),%ecx
  mov    -0x134(%rbp),%eax
  mov    $0x2,%edx
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <lseek@plt>
  lea    -0x120(%rbp),%rcx
  mov    -0x134(%rbp),%eax
  mov    $0x110,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,-0x124(%rbp)
  mov    -0x12c(%rbp),%eax
  mov    %eax,%esi
  lea    D112(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x128(%rbp)
  jmp    L130
L65:
  mov    -0x128(%rbp),%eax
  cltq
  movzbl -0x120(%rbp,%rax,1),%eax
  movzbl %al,%eax
  mov    %eax,%esi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x128(%rbp)
L130:
  mov    -0x128(%rbp),%eax
  cmp    -0x124(%rbp),%eax
  jl     L65
  mov    -0x124(%rbp),%eax
  mov    %eax,%esi
  lea    D67(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x12c(%rbp)
L109:
  cmpl   $0x13,-0x12c(%rbp)
  jle    L23
  mov    -0x134(%rbp),%eax
  mov    $0x2,%edx
  mov    $0x0,%esi
  mov    %eax,%edi
  call   <lseek@plt>
  lea    -0x120(%rbp),%rcx
  mov    -0x134(%rbp),%eax
  mov    $0x110,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,-0x124(%rbp)
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x128(%rbp)
  jmp    L112
L29:
  mov    -0x128(%rbp),%eax
  cltq
  movzbl -0x120(%rbp,%rax,1),%eax
  movzbl %al,%eax
  mov    %eax,%esi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x128(%rbp)
L112:
  mov    -0x128(%rbp),%eax
  cmp    -0x124(%rbp),%eax
  jl     L29
  mov    -0x124(%rbp),%eax
  mov    %eax,%esi
  lea    D67(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x134(%rbp),%eax
  mov    $0x2,%edx
  mov    $0x0,%esi
  mov    %eax,%edi
  call   <lseek@plt>
  lea    -0x120(%rbp),%rcx
  mov    -0x134(%rbp),%eax
  mov    $0x110,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,-0x124(%rbp)
  lea    D126(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x128(%rbp)
  jmp    L105
L113:
  mov    -0x128(%rbp),%eax
  cltq
  movzbl -0x120(%rbp,%rax,1),%eax
  movzbl %al,%eax
  mov    %eax,%esi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x128(%rbp)
L105:
  mov    -0x128(%rbp),%eax
  cmp    -0x124(%rbp),%eax
  jl     L113
  mov    -0x124(%rbp),%eax
  mov    %eax,%esi
  lea    D67(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x134(%rbp),%eax
  mov    $0x2,%edx
  mov    $0x0,%esi
  mov    %eax,%edi
  call   <lseek@plt>
  lea    -0x120(%rbp),%rcx
  mov    -0x134(%rbp),%eax
  mov    $0x110,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,-0x124(%rbp)
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x128(%rbp)
  jmp    L120
L107:
  mov    -0x128(%rbp),%eax
  cltq
  movzbl -0x120(%rbp,%rax,1),%eax
  movzbl %al,%eax
  mov    %eax,%esi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x128(%rbp)
L120:
  mov    -0x128(%rbp),%eax
  cmp    -0x124(%rbp),%eax
  jl     L107
  mov    -0x124(%rbp),%eax
  mov    %eax,%esi
  lea    D67(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L51
  call   <__stack_chk_fail@plt>
L51:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D94
data_type: string
name: extract_symbolic_data
arguments: label: D147
data_type: string
name: extract_symbolic_data
arguments: label: D45
data_type: string
name: extract_symbolic_data
arguments: label: D67
data_type: string
name: extract_symbolic_data
arguments: label: D112
data_type: string
name: extract_symbolic_data
arguments: label: D47
data_type: string
name: extract_symbolic_data
arguments: label: D126
data_type: string
name: extract_symbolic_data
arguments: label: D38
data_type: string

tool: D94: ==IPMI RAW TEST==

tool: D147: IPMI Sensor Reading ID %d: 

tool: D45: %x 

tool: D67: Error Code: %d


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

tool: D47: IPMI Dell Reset Energy: 

tool: D126: IPMI Dell Cumulative Energy: 

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