user: 请将以下的汇编代码转换成C语言代码：

```asm
<get_value>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x2c(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x24(%rbp)
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L37
L97:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x52,%al
  jne    L3
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  addl   $0x8,-0x2c(%rbp)
  jmp    L79
L14:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x28(%rbp),%eax
  cltq
  mov    %dl,-0x20(%rbp,%rax,1)
  addl   $0x1,-0x28(%rbp)
  addl   $0x1,-0x2c(%rbp)
L79:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L115
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L14
L115:
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <atol@plt>
  mov    -0x38(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x20(%rbp),%rax
  mov    $0x14,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  movl   $0x0,-0x28(%rbp)
  addl   $0x1,-0x24(%rbp)
  jmp    L37
L3:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x54,%al
  jne    L123
  addl   $0x8,-0x2c(%rbp)
  jmp    L109
L84:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x28(%rbp),%eax
  cltq
  mov    %dl,-0x20(%rbp,%rax,1)
  addl   $0x1,-0x28(%rbp)
  addl   $0x1,-0x2c(%rbp)
L109:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L108
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L84
L108:
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <atol@plt>
  mov    -0x40(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x20(%rbp),%rax
  mov    $0x14,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  movl   $0x0,-0x28(%rbp)
  addl   $0x1,-0x24(%rbp)
  jmp    L37
L123:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x2c(%rbp)
L37:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L97
  mov    -0x24(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L117
  call   <__stack_chk_fail@plt>
L117:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D7
datatype: string
name: unpack_data
arguments: label: D45
datatype: string
name: unpack_data
arguments: label: D8
datatype: string
name: unpack_data
arguments: label: D44
datatype: string

tool: D7: buf is %c


tool: D45: find R

tool: D8: Rx is %ld


tool: D44: Tx is %ld


assistant: ```c
int get_value(long int *Rx, long int *Tx, char *buf) {
  int index = 0;
  char temp[20] = {'\0'};
  int num_len = 0;
  int return_value = 0;
  printf("buf is %c\r\n", *buf);
  while (*(buf + index) != '\0') {
    if (*(buf + index) == 'R') {
      printf("find R\r\n");
      index += 8;
      while (('0' - 1) < *(buf + index) && *(buf + index) < ('9' + 1)) {
        temp[num_len] = buf[index];
        num_len++;
        index++;
      }
      *Rx = atol(temp);
      printf("Rx is %ld\r\n", *Rx);
      memset(temp, '\0', 20);
      num_len = 0;
      return_value++;
      continue;
    } else if (*(buf + index) == 'T') {
      index += 8;
      while (('0' - 1) < *(buf + index) && *(buf + index) < ('9' + 1)) {
        temp[num_len] = *(buf + index);
        num_len++;
        index++;
      }
      *Tx = atol(temp);
      printf("Tx is %ld\r\n", *Tx);
      memset(temp, '\0', 20);
      num_len = 0;
      return_value++;
      continue;
    }
    printf("buf is %c\r\n", *(buf + index));
    index++;
  }
  return return_value;
}
```