user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<get_argument_value>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,%eax
  mov    %al,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x20(%rbp)
  movb   $0x1,-0x21(%rbp)
  movsbl -0x38(%rbp),%edx
  mov    -0x40(%rbp),%rcx
  mov    -0x34(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <argument_is_set@plt>
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jne    L39
  mov    $0xffffffff,%eax
  jmp    L57
L46:
  movzbl -0x21(%rbp),%eax
  add    $0x1,%eax
  mov    %al,-0x21(%rbp)
L39:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  movsbq -0x21(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x38(%rbp)
  jne    L46
  jmp    L43
L99:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  movsbl -0x21(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x20(%rbp),%eax
  add    %ecx,%eax
  cltq
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x20(%rbp),%eax
  cltq
  mov    %dl,-0x12(%rbp,%rax,1)
  addl   $0x1,-0x20(%rbp)
L43:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  movsbl -0x21(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x20(%rbp),%eax
  add    %ecx,%eax
  cltq
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <char_to_int@plt>
  cmp    $0xffffffff,%eax
  jne    L99
  cmpl   $0x0,-0x20(%rbp)
  jne    L25
  jmp    L101
L51:
  mov    -0x1c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%eax
  cltq
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x20(%rbp),%eax
  cltq
  mov    %dl,-0x12(%rbp,%rax,1)
  addl   $0x1,-0x20(%rbp)
L101:
  mov    -0x1c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%eax
  cltq
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <char_to_int@plt>
  cmp    $0xffffffff,%eax
  jne    L51
L25:
  cmpl   $0x0,-0x20(%rbp)
  jne    L30
  mov    $0xffffffff,%eax
  jmp    L57
L30:
  mov    -0x20(%rbp),%eax
  cltq
  movb   $0x0,-0x12(%rbp,%rax,1)
  lea    -0x12(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
L57:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L93
  call   <__stack_chk_fail@plt>
L93:
  leave
  ret
```

assistant: ```c
int get_argument_value(int args_count, char *args[], char arg) {
  int index_arg_value_str = (0);
  int arg_value;
  char arg_value_str[(10)];
  char char_pos = 1;
  int arg_pos = argument_is_set(args_count, args, arg);
  if (arg_pos == (0)) {
    return (-1);
  }
  while (args[arg_pos][char_pos] != arg) {
    char_pos++;
  }
  while (char_to_int(args[arg_pos][(index_arg_value_str + (char_pos + 1))]) != (-1)) {
    arg_value_str[index_arg_value_str] = args[arg_pos][(index_arg_value_str + (char_pos + 1))];
    index_arg_value_str++;
  }
  if (index_arg_value_str == (0)) {
    while (char_to_int(args[(arg_pos + 1)][index_arg_value_str]) != (-1)) {
      arg_value_str[index_arg_value_str] = args[(arg_pos + 1)][index_arg_value_str];
      index_arg_value_str++;
    }
  }
  if (index_arg_value_str == (0))
    return (-1);
  arg_value_str[index_arg_value_str] = ('\0');
  arg_value = atoi(arg_value_str);
  return arg_value;
}
```