user: What would the C source look like for the assembly code provided here?

```asm
<xfrm_fill_key>:
  endbr64
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %rsi,%r12
  lea    D5(%rip),%rsi
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rdx,%rbx
  mov    $0x40,%edx
  sub    $0x8,%rsp
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L68
L55:
  movl   $0x0,0x0(%r13)
  xor    %esi,%esi
L347:
  mov    %r12,%rdi
  call   <randomize_buffer@plt>
  xor    %eax,%eax
L175:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nop
L68:
  mov    $0x40,%edx
  lea    D260(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L55
  mov    $0x40,%edx
  lea    D70(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L186
  movl   $0x40,0x0(%r13)
  mov    $0x40,%eax
  mov    $0x40,%esi
L384:
  cmp    %rax,%rbx
  jae    L347
  xor    %eax,%eax
  call   <getpid@plt>
  mov    $0x33d,%edx
  lea    D151(%rip),%rdi
  mov    %eax,%esi
  call   <ksft_print_msg@plt>
  mov    $0xffffffff,%eax
  jmp    L175
  nopw   0x0(%rax,%rax,1)
L186:
  mov    $0x40,%edx
  lea    D221(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L126
L19:
  movl   $0x80,0x0(%r13)
  mov    $0x80,%eax
  mov    $0x80,%esi
  jmp    L384
  nopl   (%rax)
L126:
  mov    $0x40,%edx
  lea    D281(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L19
  mov    $0x40,%edx
  lea    D228(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L19
  mov    $0x40,%edx
  lea    D83(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L19
  mov    $0x40,%edx
  lea    D176(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L19
  mov    $0x40,%edx
  lea    D271(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L45
L401:
  movl   $0xa0,0x0(%r13)
  mov    $0xa0,%eax
  mov    $0xa0,%esi
  jmp    L384
L45:
  mov    $0x40,%edx
  lea    D244(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L401
  mov    $0x40,%edx
  lea    D220(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L305
  movl   $0xc0,0x0(%r13)
  mov    $0xc0,%eax
  mov    $0xc0,%esi
  jmp    L384
L305:
  mov    $0x40,%edx
  lea    D269(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L240
L349:
  movl   $0x100,0x0(%r13)
  mov    $0x100,%eax
  mov    $0x100,%esi
  jmp    L384
L240:
  mov    $0x40,%edx
  lea    D200(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L349
  mov    $0x40,%edx
  lea    D185(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L349
  mov    $0x40,%edx
  lea    D222(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L349
  mov    $0x40,%edx
  lea    D80(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L309
L377:
  movl   $0x120,0x0(%r13)
  mov    $0x120,%eax
  mov    $0x120,%esi
  jmp    L384
L309:
  mov    $0x40,%edx
  lea    D166(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L213
  movl   $0x180,0x0(%r13)
  mov    $0x180,%eax
  mov    $0x180,%esi
  jmp    L384
L213:
  mov    $0x40,%edx
  lea    D113(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L364
  movl   $0x1c0,0x0(%r13)
  mov    $0x1c0,%eax
  mov    $0x1c0,%esi
  jmp    L384
L364:
  mov    $0x40,%edx
  lea    D74(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L307
  movl   $0x200,0x0(%r13)
  mov    $0x200,%eax
  mov    $0x200,%esi
  jmp    L384
L307:
  mov    $0x40,%edx
  lea    D29(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L401
  mov    $0x40,%edx
  lea    D257(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L401
  mov    $0x40,%edx
  lea    D90(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L288
  movl   $0x98,0x0(%r13)
  mov    $0x98,%eax
  mov    $0x98,%esi
  jmp    L384
L288:
  mov    $0x40,%edx
  lea    D180(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L148
L139:
  movl   $0xe0,0x0(%r13)
  mov    $0xe0,%eax
  mov    $0xe0,%esi
  jmp    L384
L148:
  mov    $0x40,%edx
  lea    D149(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L139
  mov    $0x40,%edx
  lea    D154(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L256
  movl   $0xd8,0x0(%r13)
  mov    $0xd8,%eax
  mov    $0xd8,%esi
  jmp    L384
L256:
  mov    $0x40,%edx
  lea    D60(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L377
  mov    $0x40,%edx
  lea    D28(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L377
  mov    $0x40,%edx
  lea    D296(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L107
  movl   $0x118,0x0(%r13)
  mov    $0x118,%eax
  mov    $0x118,%esi
  jmp    L384
L107:
  mov    $0x40,%edx
  lea    D289(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L55
  mov    0x0(%r13),%eax
  mov    %rax,%rsi
  jmp    L384
```

tool_calls: name: unpack_data
arguments: data_tag: D5
type: string
name: unpack_data
arguments: data_tag: D260
type: string
name: unpack_data
arguments: data_tag: D70
type: string
name: unpack_data
arguments: data_tag: D151
type: string
name: unpack_data
arguments: data_tag: D221
type: string
name: unpack_data
arguments: data_tag: D281
type: string
name: unpack_data
arguments: data_tag: D228
type: string
name: unpack_data
arguments: data_tag: D83
type: string
name: unpack_data
arguments: data_tag: D176
type: string
name: unpack_data
arguments: data_tag: D271
type: string
name: unpack_data
arguments: data_tag: D244
type: string
name: unpack_data
arguments: data_tag: D220
type: string
name: unpack_data
arguments: data_tag: D269
type: string
name: unpack_data
arguments: data_tag: D200
type: string
name: unpack_data
arguments: data_tag: D185
type: string
name: unpack_data
arguments: data_tag: D222
type: string
name: unpack_data
arguments: data_tag: D80
type: string
name: unpack_data
arguments: data_tag: D166
type: string
name: unpack_data
arguments: data_tag: D113
type: string
name: unpack_data
arguments: data_tag: D74
type: string
name: unpack_data
arguments: data_tag: D29
type: string
name: unpack_data
arguments: data_tag: D257
type: string
name: unpack_data
arguments: data_tag: D90
type: string
name: unpack_data
arguments: data_tag: D180
type: string
name: unpack_data
arguments: data_tag: D149
type: string
name: unpack_data
arguments: data_tag: D154
type: string
name: unpack_data
arguments: data_tag: D60
type: string
name: unpack_data
arguments: data_tag: D28
type: string
name: unpack_data
arguments: data_tag: D296
type: string
name: unpack_data
arguments: data_tag: D289
type: string

tool: D5: digest_null

tool: D260: ecb(cipher_null)

tool: D70: cbc(des)

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


tool: D221: hmac(md5)

tool: D281: cmac(aes)

tool: D228: xcbc(aes)

tool: D83: cbc(cast5)

tool: D176: cbc(serpent)

tool: D271: hmac(sha1)

tool: D244: hmac(rmd160)

tool: D220: cbc(des3_ede)

tool: D269: hmac(sha256)

tool: D200: cbc(aes)

tool: D185: cbc(camellia)

tool: D222: cbc(twofish)

tool: D80: rfc3686(ctr(aes))

tool: D166: hmac(sha384)

tool: D113: cbc(blowfish)

tool: D74: hmac(sha512)

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

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

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

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

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

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

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

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

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

tool: D289: 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;
}
```