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

```asm
<get_operand_regtype_str>:
  endbr64
  push   %r15
  lea    D15(%rip),%r15
  push   %r14
  mov    %edi,%r14d
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  xor    %esi,%esi
  push   %rbx
  mov    %rbp,%rdi
  lea    D5(%rip),%rbx
  sub    $0x18,%rsp
  call   <memset@plt>
  jmp    L27
  nopl   (%rax)
L91:
  mov    %r15,%rdi
  call   <strlen@plt>
  mov    %rbp,%rdi
  mov    %eax,%r13d
  call   <strlen@plt>
  mov    %eax,0x8(%rsp)
  test   %r12d,%r12d
  je     L41
  lea    -0x1(%r12),%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  sub    %r13d,%r12d
  mov    %edx,0xc(%rsp)
  call   <strncat@plt>
  mov    0xc(%rsp),%edx
  cmp    %edx,%r13d
  jl     L41
  mov    0x8(%rsp),%ecx
  xor    %r12d,%r12d
  lea    (%rcx,%rdx,1),%eax
  cltq
  movb   $0x0,0x0(%rbp,%rax,1)
  nopl   (%rax)
L41:
  mov    0x8(%rbx),%r15
  add    $0x10,%rbx
  test   %r15,%r15
  je     L92
L27:
  mov    %r14d,%eax
  and    (%rbx),%eax
  je     L41
  cmpb   $0x0,0x0(%rbp)
  je     L91
  lea    D11(%rip),%rdi
  call   <strlen@plt>
  mov    %rbp,%rdi
  mov    %eax,%r13d
  call   <strlen@plt>
  test   %r12d,%r12d
  jne    L8
  mov    %r15,%rdi
  add    $0x10,%rbx
  call   <strlen@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    -0x8(%rbx),%r15
  test   %r15,%r15
  jne    L27
L92:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L8:
  lea    -0x1(%r12),%edx
  lea    D11(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,0xc(%rsp)
  mov    %edx,0x8(%rsp)
  call   <strncat@plt>
  mov    0x8(%rsp),%edx
  cmp    %edx,%r13d
  jl     L71
  mov    0xc(%rsp),%ecx
  mov    %r15,%rdi
  xor    %r12d,%r12d
  lea    (%rcx,%rdx,1),%eax
  cltq
  movb   $0x0,0x0(%rbp,%rax,1)
  call   <strlen@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  jmp    L41
  nopl   0x0(%rax,%rax,1)
L71:
  sub    %r13d,%r12d
  jmp    L91
```

tool_calls: name: disassemble_data
arguments: tag: D15
type_infered: string
name: disassemble_data
arguments: tag: D11
type_infered: string

tool: D15: reg_gen

tool: D11:  

assistant: ```c
void get_operand_regtype_str(int regtype, char *str, int len) {
  static struct {
    const char *name;
    int value;
  } operand_regtypes[] = {
      {"reg_gen", 0x00001}, {"reg_in", 0x00002}, {"reg_out", 0x00004}, {"reg_local", 0x00008}, {"reg_fpu", 0x00010}, {"reg_seg", 0x00020}, {"reg_simd", 0x00040}, {"reg_sys", 0x00080}, {"reg_sp", 0x00100}, {"reg_fp", 0x00200}, {"reg_pc", 0x00400}, {"reg_retaddr", 0x00800}, {"reg_cond", 0x01000}, {"reg_zero", 0x02000}, {"reg_ret", 0x04000}, {"reg_src", 0x10000}, {"reg_dest", 0x20000}, {"reg_count", 0x40000}, {NULL, 0},
  };
  unsigned int i;
  memset(str, 0, len);
  for (i = 0; operand_regtypes[i].name; i++) {
    if (!(regtype & operand_regtypes[i].value))
      continue;
    if (str[0]) {
      do {
        int _i = strlen(" "), _blen = strlen(str), _len = len - 1;
        if (len) {
          strncat(str, " ", _len);
          if (_len <= _i) {
            str[_blen + _len] = '\0';
            len = 0;
          } else {
            len -= _i;
          }
        }
      } while (0);
    }
    do {
      int _i = strlen(operand_regtypes[i].name), _blen = strlen(str), _len = len - 1;
      if (len) {
        strncat(str, operand_regtypes[i].name, _len);
        if (_len <= _i) {
          str[_blen + _len] = '\0';
          len = 0;
        } else {
          len -= _i;
        }
      }
    } while (0);
  }
}
```