user: Demonstrate the C code that generates the assembly output below:

```asm
<string_to_key>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x1,-0x28(%rbp)
  mov    $0x0,%eax
  call   <Getc@plt>
  mov    %eax,-0x20(%rbp)
  mov    $0x0,%eax
  call   <Getc@plt>
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x65,-0x20(%rbp)
  je     L191
  cmpl   $0x65,-0x20(%rbp)
  jg     L197
  cmpl   $0x3,-0x20(%rbp)
  je     L65
  cmpl   $0x3,-0x20(%rbp)
  jg     L197
  cmpl   $0x2,-0x20(%rbp)
  je     L160
  cmpl   $0x2,-0x20(%rbp)
  jg     L197
  cmpl   $0x0,-0x20(%rbp)
  je     L230
  cmpl   $0x1,-0x20(%rbp)
  je     L141
  jmp    L197
L230:
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x9,%edi
  call   <putchar@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <hash_algs@plt>
  jmp    L34
L141:
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x9,%edi
  call   <putchar@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <hash_algs@plt>
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x8,%edi
  call   <dump@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L34
L160:
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L34
L65:
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x9,%edi
  call   <putchar@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <hash_algs@plt>
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x8,%edi
  call   <dump@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0x0,%eax
  call   <Getc@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  and    $0xf,%eax
  lea    0x10(%rax),%edx
  mov    -0x14(%rbp),%eax
  sar    $0x4,%eax
  add    $0x6,%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D107(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L34
L191:
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L184
L76:
  mov    $0x0,%eax
  call   <Getc@plt>
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  cltq
  mov    %dl,-0xc(%rbp,%rax,1)
  addl   $0x1,-0x24(%rbp)
L184:
  cmpl   $0x3,-0x24(%rbp)
  jle    L76
  lea    -0xc(%rbp),%rax
  mov    $0x3,%edx
  lea    D114(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcmp@plt>
  test   %eax,%eax
  jne    L171
  movzbl -0x9(%rbp),%eax
  movsbl %al,%eax
  add    $0x3e8,%eax
  mov    %eax,-0x20(%rbp)
  cmpl   $0x3e9,-0x20(%rbp)
  je     L110
  cmpl   $0x3ea,-0x20(%rbp)
  je     L236
  jmp    L164
L110:
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D129(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L111
L236:
  mov    $0x0,%eax
  call   <Getc@plt>
  mov    %eax,-0x18(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D71(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x18(%rbp),%eax
  mov    %eax,%edi
  call   <dump@plt>
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L111
L164:
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D51(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L111
L171:
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D77(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L34
L111:
  jmp    L34
L197:
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L34:
  mov    -0x28(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L61
  call   <__stack_chk_fail@plt>
L61:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D135
type: string
name: unpack_data
arguments: data_tag: D125
type: string
name: unpack_data
arguments: data_tag: D54
type: string
name: unpack_data
arguments: data_tag: D55
type: string
name: unpack_data
arguments: data_tag: D2
type: string
name: unpack_data
arguments: data_tag: D107
type: string
name: unpack_data
arguments: data_tag: D114
type: string
name: unpack_data
arguments: data_tag: D129
type: string
name: unpack_data
arguments: data_tag: D71
type: string
name: unpack_data
arguments: data_tag: D18
type: string
name: unpack_data
arguments: data_tag: D51
type: string
name: unpack_data
arguments: data_tag: D77
type: string
name: unpack_data
arguments: data_tag: D11
type: string

tool: D135: 	Simple string-to-key(s2k %d):


tool: D125: 	Salted string-to-key(s2k %d):


tool: D54: 		Salt - 

tool: D55: 	Reserved string-to-key(s2k %d)


tool: D2: 	Iterated and salted string-to-key(s2k %d):


tool: D107: 		Count - %d(coded count %d)


tool: D114: GNU

tool: D129: 	GnuPG gnu-dummy (s2k %d)


tool: D71: 	GnuPG gnu-divert-to-card (s2k %d)
	Serial Number: 

tool: 

tool: D51: 	GnuPG unknown extension (s2k %d)


tool: D77: 	Private/experimental string-to-key(s2k %d)


tool: D11: 	Unknown string-to-key(s2k %d)


assistant: ```c
extern int string_to_key(void) {
  int has_iv = 1;
  int type = Getc();
  int hash = Getc();
  switch (type) {
  case 0:
    printf("\tSimple string-to-key(s2k %d):\n", type);
    printf("\t");
    hash_algs(hash);
    break;
  case 1:
    printf("\tSalted string-to-key(s2k %d):\n", type);
    printf("\t");
    hash_algs(hash);
    printf("\t\tSalt - ");
    dump(8);
    printf("\n");
    break;
  case 2:
    printf("\tReserved string-to-key(s2k %d)\n", type);
    break;
  case 3:
    printf("\tIterated and salted string-to-key(s2k %d):\n", type);
    printf("\t");
    hash_algs(hash);
    printf("\t\tSalt - ");
    dump(8);
    printf("\n");
    {
      int count, c = Getc();
      count = (16 + (c & 15)) << ((c >> 4) + 6);
      printf("\t\tCount - %d(coded count %d)\n", count, c);
    }
    break;
  case 101:
    has_iv = 0;
    {
      char temp[4];
      int j, snlen;
      for (j = 0; j < 4; j++)
        temp[j] = Getc();
      if (!memcmp(temp, "GNU", 3)) {
        type = 1000 + temp[3];
        switch (type) {
        case 1001:
          printf("\tGnuPG gnu-dummy (s2k %d)\n", type);
          break;
        case 1002:
          snlen = Getc();
          printf("\tGnuPG gnu-divert-to-card (s2k %d)\n\tSerial Number: ", type);
          dump(snlen);
          puts("");
          break;
        default:
          printf("\tGnuPG unknown extension (s2k %d)\n", type);
          break;
        }
      } else {
        printf("\tPrivate/experimental string-to-key(s2k %d)\n", type);
      }
    }
    break;
  default:
    printf("\tUnknown string-to-key(s2k %d)\n", type);
  }
  return has_iv;
}
```