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

```asm
<check_valid>:
  endbr64
  push   %r12
  mov    %rsi,%r12
  lea    D26(%rip),%rsi
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x8,%rsp
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L132
  mov    $0x5,%esi
  mov    %r12,%rdi
  call   <is_length_valid@plt>
  test   %eax,%eax
  je     L79
L132:
  lea    D45(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L86
  mov    $0x5,%esi
  mov    %r12,%rdi
  call   <is_length_valid@plt>
  test   %eax,%eax
  je     L80
L86:
  lea    D23(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L56
  mov    $0x6,%esi
  mov    %r12,%rdi
  call   <is_length_valid@plt>
  test   %eax,%eax
  je     L80
L56:
  lea    D51(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L15
  mov    $0x9,%esi
  mov    %r12,%rdi
  call   <is_length_valid@plt>
  test   %eax,%eax
  je     L80
L15:
  lea    D2(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L6
L45:
  lea    D16(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L99
  add    $0x8,%rsp
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  ret
  nop
L6:
  mov    $0xb,%esi
  mov    %r12,%rdi
  call   <is_length_valid@plt>
  test   %eax,%eax
  jne    L45
L80:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L79:
  mov    $0x6,%esi
  mov    %r12,%rdi
  call   <is_length_valid@plt>
  test   %eax,%eax
  jne    L132
  mov    $0x9,%esi
  mov    %r12,%rdi
  call   <is_length_valid@plt>
  test   %eax,%eax
  jne    L132
  mov    $0xb,%esi
  mov    %r12,%rdi
  call   <is_length_valid@plt>
  test   %eax,%eax
  jne    L132
  jmp    L80
  nopl   0x0(%rax)
L99:
  mov    %r12,%rdi
  mov    $0x8,%esi
  call   <is_length_valid@plt>
  test   %eax,%eax
  setne  %al
  add    $0x8,%rsp
  movzbl %al,%eax
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D26
data_type: string
name: extract_symbolic_data
arguments: data_tag: D45
data_type: string
name: extract_symbolic_data
arguments: data_tag: D23
data_type: string
name: extract_symbolic_data
arguments: data_tag: D51
data_type: string
name: extract_symbolic_data
arguments: data_tag: D2
data_type: string
name: extract_symbolic_data
arguments: data_tag: D16
data_type: string

tool: D26: POSTNET

tool: D45: POSTNET-5

tool: D23: POSTNET-6

tool: D51: POSTNET-9

tool: D2: POSTNET-11

tool: D16: CEPNET

assistant: ```c
int check_valid(const char *type, const char *code) {
  if ((strcasecmp(type, "POSTNET") == 0))
    if (!is_length_valid(code, 5) && !is_length_valid(code, 6) && !is_length_valid(code, 9) && !is_length_valid(code, 11))
      return 0;
  if ((strcasecmp(type, "POSTNET-5") == 0))
    if (!is_length_valid(code, 5))
      return 0;
  if ((strcasecmp(type, "POSTNET-6") == 0))
    if (!is_length_valid(code, 6))
      return 0;
  if ((strcasecmp(type, "POSTNET-9") == 0))
    if (!is_length_valid(code, 9))
      return 0;
  if ((strcasecmp(type, "POSTNET-11") == 0))
    if (!is_length_valid(code, 11))
      return 0;
  if ((strcasecmp(type, "CEPNET") == 0))
    if (!is_length_valid(code, 8))
      return 0;
  return 1;
}
```