user: Please show me the C implementation that matches the assembly code listed below:

```asm
<test_null_term>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x220,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x218(%rsp)
  xor    %eax,%eax
  movl   $0x74736574,0x7(%rsp)
  movl   $0x74736574,0xb(%rsp)
  movb   $0x0,0xf(%rsp)
  call   <smaz_build_trie@plt>
  mov    %rax,%rbx
  lea    0x10(%rsp),%rbp
  lea    0x7(%rsp),%rsi
  mov    $0x100,%r8d
  mov    %rbp,%rcx
  mov    $0x4,%edx
  mov    %rax,%rdi
  call   <smaz_compress@plt>
  mov    %eax,%esi
  lea    0x110(%rsp),%rdx
  mov    $0x100,%ecx
  mov    %rbp,%rdi
  call   <smaz_decompress@plt>
  cmp    $0x4,%eax
  jne    L70
L71:
  movzbl 0x113(%rsp),%esi
  cmp    $0x74,%sil
  jne    L68
L65:
  lea    0xb(%rsp),%r12
  mov    %r12,%rdi
  call   <strlen@plt>
  lea    0x10(%rsp),%rbp
  lea    0x1(%rax),%edx
  mov    $0x100,%r8d
  mov    %rbp,%rcx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <smaz_compress@plt>
  mov    %eax,%esi
  lea    0x110(%rsp),%rdx
  mov    $0x100,%ecx
  mov    %rbp,%rdi
  call   <smaz_decompress@plt>
  mov    %eax,%ebp
  cmp    $0x5,%eax
  jne    L2
L72:
  movzbl 0x114(%rsp),%esi
  test   %sil,%sil
  jne    L73
L64:
  mov    %rbx,%rdi
  call   <smaz_free_trie@plt>
  lea    D59(%rip),%rdi
  call   <puts@plt>
  mov    0x218(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L67
  add    $0x220,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L70:
  mov    %eax,%edx
  mov    $0x4,%esi
  lea    D38(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L71
L68:
  movsbl %sil,%esi
  mov    $0x74,%edx
  lea    D12(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L65
L2:
  mov    %eax,%edx
  mov    $0x5,%esi
  lea    D38(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x110(%rsp),%rsi
  mov    %ebp,%edx
  lea    D53(%rip),%rdi
  call   <hexDump@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L72
L73:
  movsbl %sil,%esi
  lea    D54(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L64
L67:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D59
datatype: string
name: disassemble_data
arguments: data_label: D38
datatype: string
name: disassemble_data
arguments: data_label: D12
datatype: string
name: disassemble_data
arguments: data_label: D53
datatype: string
name: disassemble_data
arguments: data_label: D54
datatype: string

tool: D59: TEST PASSED :)

tool: D38: Error: Expected return size: %d, got %d


tool: D12: Error: Incorrect final char on string: %c, expected %c


tool: D53: out

tool: D54: Error: Incorrect final char on string: %c, expected \0


assistant: ```c
void test_null_term() {
  char comp_out[256];
  char decomp_out[256];
  char no_null_str[4] = "test";
  char null_term_str[] = "test";
  int comprlen = 0;
  int decomprlen = 0;
  struct SmazBranch *trie;
  trie = smaz_build_trie();
  comprlen = smaz_compress(trie, no_null_str, 4, comp_out, 256);
  decomprlen = smaz_decompress(comp_out, comprlen, decomp_out, 256);
  if (decomprlen != 4) {
    printf("Error: Expected return size: %d, got %d\n", 4, decomprlen);
    exit(1);
  }
  if (decomp_out[3] != 't') {
    printf("Error: Incorrect final char on string: %c, expected %c\n", decomp_out[3], 't');
    exit(1);
  }
  comprlen = smaz_compress(trie, null_term_str, strlen(null_term_str) + 1, comp_out, 256);
  decomprlen = smaz_decompress(comp_out, comprlen, decomp_out, 256);
  if (decomprlen != 5) {
    printf("Error: Expected return size: %d, got %d\n", 5, decomprlen);
    hexDump("out", &decomp_out, decomprlen);
    exit(1);
  }
  if (decomp_out[4] != 0) {
    printf("Error: Incorrect final char on string: %c, expected \\0\n", decomp_out[4]);
    exit(1);
  }
  smaz_free_trie(trie);
  printf("TEST PASSED :)\n");
}
```