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

```asm
<f_set_hex>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %ecx,-0x38(%rbp)
  mov    %r8,-0x50(%rbp)
  mov    %r9,-0x58(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  mov    0x20(%rbp),%rax
  mov    %rax,-0x70(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x0,-0x34(%rbp)
  jns    L26
  mov    $0x0,%eax
  jmp    L194
L26:
  mov    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  js     L167
  cmpl   $0x8,-0x14(%rbp)
  jle    L25
L167:
  mov    -0x60(%rbp),%rax
  mov    %rax,%rsi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <fatal_error@plt>
L25:
  cmpl   $0x0,-0x24(%rbp)
  jg     L215
  lea    D40(%rip),%rax
  mov    %rax,%rsi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <fatal_error@plt>
L215:
  cmpl   $0x0,-0x14(%rbp)
  jne    L9
  movl   $0x10,-0x1c(%rbp)
  jmp    L166
L9:
  cmpl   $0x8,-0x14(%rbp)
  jne    L129
  movl   $0x4,-0x1c(%rbp)
  jmp    L166
L129:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <uint4@plt>
  mov    %eax,-0x1c(%rbp)
L166:
  mov    -0x70(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L184
L16:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L184
  movl   $0x1,-0x18(%rbp)
  jmp    L77
L184:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L16
L77:
  cmpl   $0x0,-0x18(%rbp)
  je     L15
  lea    -0x2c(%rbp),%rcx
  lea    -0x28(%rbp),%rdx
  mov    -0x70(%rbp),%rax
  lea    D5(%rip),%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    %eax,-0x20(%rbp)
  jmp    L7
L28:
  mov    -0x24(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jle    L185
  mov    -0x60(%rbp),%rax
  mov    %rax,%rsi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  call   <fatal_error@plt>
L185:
  mov    -0x28(%rbp),%ecx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rsi
  mov    -0x24(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x24(%rbp)
  cltq
  sub    $0x1,%rax
  add    %rsi,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x2c(%rbp),%eax
  cltq
  add    %rax,-0x70(%rbp)
  lea    -0x2c(%rbp),%rcx
  lea    -0x28(%rbp),%rdx
  mov    -0x70(%rbp),%rax
  lea    D14(%rip),%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    %eax,-0x20(%rbp)
L7:
  cmpl   $0x1,-0x20(%rbp)
  je     L28
  jmp    L55
L15:
  lea    -0x2c(%rbp),%rcx
  lea    -0x28(%rbp),%rdx
  mov    -0x70(%rbp),%rax
  lea    D26(%rip),%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    %eax,-0x20(%rbp)
  jmp    L174
L61:
  mov    -0x24(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jle    L17
  mov    -0x60(%rbp),%rax
  mov    %rax,%rsi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  call   <fatal_error@plt>
L17:
  mov    -0x28(%rbp),%ecx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rsi
  mov    -0x24(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x24(%rbp)
  cltq
  sub    $0x1,%rax
  add    %rsi,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x2c(%rbp),%eax
  cltq
  add    %rax,-0x70(%rbp)
  lea    -0x2c(%rbp),%rcx
  lea    -0x28(%rbp),%rdx
  mov    -0x70(%rbp),%rax
  lea    D26(%rip),%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    %eax,-0x20(%rbp)
L174:
  cmpl   $0x1,-0x20(%rbp)
  je     L61
L55:
  mov    $0x0,%eax
L194:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L131
  call   <__stack_chk_fail@plt>
L131:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D35
datatype: string
name: disassemble_data
arguments: data_tag: D40
datatype: string
name: disassemble_data
arguments: data_tag: D8
datatype: string
name: disassemble_data
arguments: data_tag: D5
datatype: string
name: disassemble_data
arguments: data_tag: D13
datatype: string
name: disassemble_data
arguments: data_tag: D14
datatype: string
name: disassemble_data
arguments: data_tag: D26
datatype: string

tool: D35: set_byte: bad section number %s

tool: 

tool: D8: set_hex: octet number must >= 1

tool: D5: %x%n

tool: D13: set_byte out of bounds section %s

tool: D14: :%x%n

tool: D26: %2x%n

assistant: ```c
int f_set_hex(int mode, unsigned char **sec, float *data, unsigned int ndata, char *inv_out, void **local, const char *arg1, const char *arg2, const char *arg3) {
  int i, j, k, m, seclen, has_colon;
  unsigned int val;
  const char *str;
  if (mode < 0)
    return 0;
  i = atoi(arg1);
  j = atoi(arg2);
  if (i < 0 || i > 8)
    fatal_error("set_byte: bad section number %s", arg1);
  if (j <= 0)
    fatal_error("set_hex: octet number must >= 1", "");
  if (i == 0)
    seclen = 16;
  else if (i == 8)
    seclen = 4;
  else
    seclen = uint4(sec[i]);
  str = arg3;
  has_colon = 0;
  while (*str) {
    if (*str++ == ':') {
      has_colon = 1;
      break;
    }
  }
  if (has_colon) {
    k = sscanf(arg3, "%x%n", &val, &m);
    while (k == 1) {
      if (j > seclen)
        fatal_error("set_byte out of bounds section %s", arg1);
      sec[i][j++ - 1] = val;
      arg3 += m;
      k = sscanf(arg3, ":%x%n", &val, &m);
    }
  } else {
    k = sscanf(arg3, "%2x%n", &val, &m);
    while (k == 1) {
      if (j > seclen)
        fatal_error("set_byte out of bounds section %s", arg1);
      sec[i][j++ - 1] = val;
      arg3 += m;
      k = sscanf(arg3, "%2x%n", &val, &m);
    }
  }
  return 0;
}
```