user: 请从给定的汇编指令推导出C源代码：

```asm
<f_set_byte>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x28(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    %r9,-0x48(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x50(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x58(%rbp)
  mov    0x20(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x0,-0x24(%rbp)
  jns    L41
  mov    $0x0,%eax
  jmp    L127
L41:
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x18(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  js     L26
  cmpl   $0x8,-0xc(%rbp)
  jle    L9
L26:
  mov    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D57(%rip),%rax
  mov    %rax,%rdi
  call   <fatal_error@plt>
L9:
  cmpl   $0x0,-0x18(%rbp)
  jg     L5
  lea    D37(%rip),%rax
  mov    %rax,%rsi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <fatal_error@plt>
L5:
  cmpl   $0x0,-0xc(%rbp)
  jne    L122
  movl   $0x10,-0x10(%rbp)
  jmp    L42
L122:
  cmpl   $0x8,-0xc(%rbp)
  jne    L48
  movl   $0x4,-0x10(%rbp)
  jmp    L42
L48:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <uint4@plt>
  mov    %eax,-0x10(%rbp)
L42:
  lea    -0x20(%rbp),%rcx
  lea    -0x1c(%rbp),%rdx
  mov    -0x60(%rbp),%rax
  lea    D53(%rip),%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L50
L4:
  mov    -0x18(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jle    L43
  mov    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  call   <fatal_error@plt>
L43:
  mov    -0x1c(%rbp),%ecx
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rsi
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  cltq
  sub    $0x1,%rax
  add    %rsi,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x20(%rbp),%eax
  cltq
  add    %rax,-0x60(%rbp)
  lea    -0x20(%rbp),%rcx
  lea    -0x1c(%rbp),%rdx
  mov    -0x60(%rbp),%rax
  lea    D32(%rip),%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  mov    %eax,-0x14(%rbp)
L50:
  cmpl   $0x1,-0x14(%rbp)
  je     L4
  mov    $0x0,%eax
L127:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L21
  call   <__stack_chk_fail@plt>
L21:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D57
data_type: string
name: unpack_data
arguments: tag: D37
data_type: string
name: unpack_data
arguments: tag: D35
data_type: string
name: unpack_data
arguments: tag: D53
data_type: string
name: unpack_data
arguments: tag: D12
data_type: string
name: unpack_data
arguments: tag: D32
data_type: string

tool: D57: set_byte: bad section number %s

tool: 

tool: D35: set_byte: octet number must >= 1

tool: D53: %u%n

tool: D12: set_byte out of bounds section %s

tool: D32: :%u%n

assistant: ```c
int f_set_byte(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;
  unsigned int val;
  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_byte: octet number must >= 1", "");
  if (i == 0)
    seclen = 16;
  else if (i == 8)
    seclen = 4;
  else
    seclen = uint4(sec[i]);
  k = sscanf(arg3, "%u%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, ":%u%n", &val, &m);
  }
  return 0;
}
```