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

```asm
<xfrm_fill_key>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    %rdx,%r13
  mov    %rcx,%rbp
  mov    $0x40,%edx
  lea    D287(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L16
L470:
  movl   $0x0,0x0(%rbp)
  mov    $0x0,%esi
L186:
  mov    %r12,%rdi
  call   <randomize_buffer@plt>
  mov    $0x0,%eax
L365:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L16:
  mov    $0x40,%edx
  lea    D3(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L470
  mov    $0x40,%edx
  lea    D266(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L106
  movl   $0x40,0x0(%rbp)
L391:
  mov    0x0(%rbp),%esi
  mov    %esi,%eax
  cmp    %r13,%rax
  jbe    L186
  mov    $0x0,%eax
  call   <getpid@plt>
  mov    %eax,%esi
  mov    $0x33d,%edx
  lea    D74(%rip),%rdi
  call   <ksft_print_msg@plt>
  mov    $0xffffffff,%eax
  jmp    L365
L106:
  mov    $0x40,%edx
  lea    D99(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L285
  movl   $0x80,0x0(%rbp)
  jmp    L391
L285:
  mov    $0x40,%edx
  lea    D241(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L494
  movl   $0x80,0x0(%rbp)
  jmp    L391
L494:
  mov    $0x40,%edx
  lea    D172(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L147
  movl   $0x80,0x0(%rbp)
  jmp    L391
L147:
  mov    $0x40,%edx
  lea    D126(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L131
  movl   $0x80,0x0(%rbp)
  jmp    L391
L131:
  mov    $0x40,%edx
  lea    D106(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L95
  movl   $0x80,0x0(%rbp)
  jmp    L391
L95:
  mov    $0x40,%edx
  lea    D247(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L388
  movl   $0xa0,0x0(%rbp)
  jmp    L391
L388:
  mov    $0x40,%edx
  lea    D223(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L99
  movl   $0xa0,0x0(%rbp)
  jmp    L391
L99:
  mov    $0x40,%edx
  lea    D8(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L227
  movl   $0xc0,0x0(%rbp)
  jmp    L391
L227:
  mov    $0x40,%edx
  lea    D0(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L278
  movl   $0x100,0x0(%rbp)
  jmp    L391
L278:
  mov    $0x40,%edx
  lea    D120(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L351
  movl   $0x100,0x0(%rbp)
  jmp    L391
L351:
  mov    $0x40,%edx
  lea    D18(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L111
  movl   $0x100,0x0(%rbp)
  jmp    L391
L111:
  mov    $0x40,%edx
  lea    D65(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L485
  movl   $0x100,0x0(%rbp)
  jmp    L391
L485:
  mov    $0x40,%edx
  lea    D239(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L52
  movl   $0x120,0x0(%rbp)
  jmp    L391
L52:
  mov    $0x40,%edx
  lea    D158(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L265
  movl   $0x180,0x0(%rbp)
  jmp    L391
L265:
  mov    $0x40,%edx
  lea    D277(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L479
  movl   $0x1c0,0x0(%rbp)
  jmp    L391
L479:
  mov    $0x40,%edx
  lea    D104(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L258
  movl   $0x200,0x0(%rbp)
  jmp    L391
L258:
  mov    $0x40,%edx
  lea    D35(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L413
  movl   $0xa0,0x0(%rbp)
  jmp    L391
L413:
  mov    $0x40,%edx
  lea    D268(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L460
  movl   $0xa0,0x0(%rbp)
  jmp    L391
L460:
  mov    $0x40,%edx
  lea    D70(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L458
  movl   $0x98,0x0(%rbp)
  jmp    L391
L458:
  mov    $0x40,%edx
  lea    D45(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L141
  movl   $0xe0,0x0(%rbp)
  jmp    L391
L141:
  mov    $0x40,%edx
  lea    D276(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L116
  movl   $0xe0,0x0(%rbp)
  jmp    L391
L116:
  mov    $0x40,%edx
  lea    D108(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L418
  movl   $0xd8,0x0(%rbp)
  jmp    L391
L418:
  mov    $0x40,%edx
  lea    D171(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L402
  movl   $0x120,0x0(%rbp)
  jmp    L391
L402:
  mov    $0x40,%edx
  lea    D15(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L50
  movl   $0x120,0x0(%rbp)
  jmp    L391
L50:
  mov    $0x40,%edx
  lea    D56(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L443
  movl   $0x118,0x0(%rbp)
  jmp    L391
L443:
  mov    $0x40,%edx
  lea    D87(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L470
  jmp    L391
```

tool_calls: name: retrieve_data
arguments: tag: D287
data_type: string
name: retrieve_data
arguments: tag: D3
data_type: string
name: retrieve_data
arguments: tag: D266
data_type: string
name: retrieve_data
arguments: tag: D74
data_type: string
name: retrieve_data
arguments: tag: D99
data_type: string
name: retrieve_data
arguments: tag: D241
data_type: string
name: retrieve_data
arguments: tag: D172
data_type: string
name: retrieve_data
arguments: tag: D126
data_type: string
name: retrieve_data
arguments: tag: D106
data_type: string
name: retrieve_data
arguments: tag: D247
data_type: string
name: retrieve_data
arguments: tag: D223
data_type: string
name: retrieve_data
arguments: tag: D8
data_type: string
name: retrieve_data
arguments: tag: D0
data_type: string
name: retrieve_data
arguments: tag: D120
data_type: string
name: retrieve_data
arguments: tag: D18
data_type: string
name: retrieve_data
arguments: tag: D65
data_type: string
name: retrieve_data
arguments: tag: D239
data_type: string
name: retrieve_data
arguments: tag: D158
data_type: string
name: retrieve_data
arguments: tag: D277
data_type: string
name: retrieve_data
arguments: tag: D104
data_type: string
name: retrieve_data
arguments: tag: D35
data_type: string
name: retrieve_data
arguments: tag: D268
data_type: string
name: retrieve_data
arguments: tag: D70
data_type: string
name: retrieve_data
arguments: tag: D45
data_type: string
name: retrieve_data
arguments: tag: D276
data_type: string
name: retrieve_data
arguments: tag: D108
data_type: string
name: retrieve_data
arguments: tag: D171
data_type: string
name: retrieve_data
arguments: tag: D15
data_type: string
name: retrieve_data
arguments: tag: D56
data_type: string
name: retrieve_data
arguments: tag: D87
data_type: string

tool: D287: digest_null

tool: D3: ecb(cipher_null)

tool: D266: cbc(des)

tool: D74: %d[%u] Can't pack a key - too big for buffer


tool: D99: hmac(md5)

tool: D241: cmac(aes)

tool: D172: xcbc(aes)

tool: D126: cbc(cast5)

tool: D106: cbc(serpent)

tool: D247: hmac(sha1)

tool: D223: hmac(rmd160)

tool: D8: cbc(des3_ede)

tool: D0: hmac(sha256)

tool: D120: cbc(aes)

tool: D18: cbc(camellia)

tool: D65: cbc(twofish)

tool: D239: rfc3686(ctr(aes))

tool: D158: hmac(sha384)

tool: D277: cbc(blowfish)

tool: D104: hmac(sha512)

tool: D35: rfc4106(gcm(aes))-128

tool: D268: rfc4543(gcm(aes))-128

tool: D70: rfc4309(ccm(aes))-128

tool: D45: rfc4106(gcm(aes))-192

tool: D276: rfc4543(gcm(aes))-192

tool: D108: rfc4309(ccm(aes))-192

tool: D171: rfc4106(gcm(aes))-256

tool: D15: rfc4543(gcm(aes))-256

tool: D56: rfc4309(ccm(aes))-256

tool: D87: rfc7539(chacha20,poly1305)-128

assistant: ```c
int xfrm_fill_key(char *name, char *buf, size_t buf_len, unsigned int *key_len) {
  if (strncmp(name, "digest_null", 64) == 0)
    *key_len = 0;
  else if (strncmp(name, "ecb(cipher_null)", 64) == 0)
    *key_len = 0;
  else if (strncmp(name, "cbc(des)", 64) == 0)
    *key_len = 64;
  else if (strncmp(name, "hmac(md5)", 64) == 0)
    *key_len = 128;
  else if (strncmp(name, "cmac(aes)", 64) == 0)
    *key_len = 128;
  else if (strncmp(name, "xcbc(aes)", 64) == 0)
    *key_len = 128;
  else if (strncmp(name, "cbc(cast5)", 64) == 0)
    *key_len = 128;
  else if (strncmp(name, "cbc(serpent)", 64) == 0)
    *key_len = 128;
  else if (strncmp(name, "hmac(sha1)", 64) == 0)
    *key_len = 160;
  else if (strncmp(name, "hmac(rmd160)", 64) == 0)
    *key_len = 160;
  else if (strncmp(name, "cbc(des3_ede)", 64) == 0)
    *key_len = 192;
  else if (strncmp(name, "hmac(sha256)", 64) == 0)
    *key_len = 256;
  else if (strncmp(name, "cbc(aes)", 64) == 0)
    *key_len = 256;
  else if (strncmp(name, "cbc(camellia)", 64) == 0)
    *key_len = 256;
  else if (strncmp(name, "cbc(twofish)", 64) == 0)
    *key_len = 256;
  else if (strncmp(name, "rfc3686(ctr(aes))", 64) == 0)
    *key_len = 288;
  else if (strncmp(name, "hmac(sha384)", 64) == 0)
    *key_len = 384;
  else if (strncmp(name, "cbc(blowfish)", 64) == 0)
    *key_len = 448;
  else if (strncmp(name, "hmac(sha512)", 64) == 0)
    *key_len = 512;
  else if (strncmp(name, "rfc4106(gcm(aes))-128", 64) == 0)
    *key_len = 160;
  else if (strncmp(name, "rfc4543(gcm(aes))-128", 64) == 0)
    *key_len = 160;
  else if (strncmp(name, "rfc4309(ccm(aes))-128", 64) == 0)
    *key_len = 152;
  else if (strncmp(name, "rfc4106(gcm(aes))-192", 64) == 0)
    *key_len = 224;
  else if (strncmp(name, "rfc4543(gcm(aes))-192", 64) == 0)
    *key_len = 224;
  else if (strncmp(name, "rfc4309(ccm(aes))-192", 64) == 0)
    *key_len = 216;
  else if (strncmp(name, "rfc4106(gcm(aes))-256", 64) == 0)
    *key_len = 288;
  else if (strncmp(name, "rfc4543(gcm(aes))-256", 64) == 0)
    *key_len = 288;
  else if (strncmp(name, "rfc4309(ccm(aes))-256", 64) == 0)
    *key_len = 280;
  else if (strncmp(name, "rfc7539(chacha20,poly1305)-128", 64) == 0)
    *key_len = 0;
  if (*key_len > buf_len) {
    ksft_print_msg("%d[%u] "
                   "Can't pack a key - too big for buffer"
                   "\n",
                   getpid(), 829);
    return -1;
  }
  randomize_buffer(buf, *key_len);
  return 0;
}
```