user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x120,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x110(%rbp),%rax
  lea    D498(%rip),%r8
  mov    $0xd,%ecx
  lea    D194(%rip),%rdx
  mov    $0x80,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x13,-0x114(%rbp)
  je     L10
  mov    -0x114(%rbp),%eax
  mov    %eax,%ecx
  lea    D65(%rip),%rax
  mov    %rax,%rdx
  mov    $0x16,%esi
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L10:
  lea    -0x110(%rbp),%rax
  lea    D54(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L88
  lea    D194(%rip),%rax
  mov    %rax,%rcx
  lea    D398(%rip),%rax
  mov    %rax,%rdx
  mov    $0x16,%esi
  lea    D256(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L88:
  lea    -0x90(%rbp),%rax
  lea    D498(%rip),%r8
  mov    $0xd,%ecx
  lea    D194(%rip),%rdx
  mov    $0x80,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  mov    %eax,-0x114(%rbp)
  lea    -0x90(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L70
  lea    D194(%rip),%rax
  mov    %rax,%rcx
  lea    D334(%rip),%rax
  mov    %rax,%rdx
  mov    $0x16,%esi
  lea    D256(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L70:
  lea    D498(%rip),%r8
  mov    $0xd,%ecx
  lea    D194(%rip),%rax
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x13,-0x114(%rbp)
  je     L74
  lea    D56(%rip),%rax
  mov    %rax,%rcx
  lea    D65(%rip),%rax
  mov    %rax,%rdx
  mov    $0x19,%esi
  lea    D256(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L74:
  lea    -0x110(%rbp),%rax
  sub    $0x8,%rsp
  push   $0xffffffffffffffff
  mov    $0xffffffffffffffff,%r9
  lea    D498(%rip),%r8
  mov    $0xd,%ecx
  lea    D412(%rip),%rdx
  mov    $0x80,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  add    $0x10,%rsp
  mov    %eax,-0x114(%rbp)
  cmpl   $0x29,-0x114(%rbp)
  je     L87
  mov    -0x114(%rbp),%eax
  mov    %eax,%ecx
  lea    D222(%rip),%rax
  mov    %rax,%rdx
  mov    $0x1b,%esi
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L87:
  lea    -0x110(%rbp),%rax
  lea    D535(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L60
  lea    D412(%rip),%rax
  mov    %rax,%rcx
  lea    D187(%rip),%rax
  mov    %rax,%rdx
  mov    $0x1b,%esi
  lea    D256(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L60:
  lea    -0x90(%rbp),%rax
  sub    $0x8,%rsp
  push   $0xffffffffffffffff
  mov    $0xffffffffffffffff,%r9
  lea    D498(%rip),%r8
  mov    $0xd,%ecx
  lea    D412(%rip),%rdx
  mov    $0x80,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  add    $0x10,%rsp
  mov    %eax,-0x114(%rbp)
  lea    -0x90(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L34
  lea    D412(%rip),%rax
  mov    %rax,%rcx
  lea    D334(%rip),%rax
  mov    %rax,%rdx
  mov    $0x1b,%esi
  lea    D256(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L34:
  lea    -0x110(%rbp),%rax
  sub    $0x8,%rsp
  push   $0xffffffffffffffff
  mov    $0xffffffffffffffff,%r9
  lea    D498(%rip),%r8
  mov    $0xd,%ecx
  lea    D385(%rip),%rdx
  mov    $0x80,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  add    $0x10,%rsp
  mov    %eax,-0x114(%rbp)
  cmpl   $0xffffffff,-0x114(%rbp)
  je     L40
  mov    -0x114(%rbp),%eax
  mov    %eax,%ecx
  lea    D513(%rip),%rax
  mov    %rax,%rdx
  mov    $0x1d,%esi
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L40:
  lea    D498(%rip),%r8
  mov    $0xd,%ecx
  lea    D194(%rip),%rax
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x13,-0x114(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x110(%rbp),%rax
  mov    $0x539,%ecx
  lea    D212(%rip),%rdx
  mov    $0x4,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x3,-0x114(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x110(%rbp),%rax
  lea    D5(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x110(%rbp),%rax
  mov    $0x7,%edx
  lea    D287(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  lea    -0x110(%rbp),%rax
  mov    $0x539,%ecx
  lea    D212(%rip),%rdx
  mov    $0x4,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x4,-0x114(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x110(%rbp),%rax
  mov    $0x4,%edx
  lea    D5(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcmp@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x539,%ecx
  lea    D212(%rip),%rax
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x4,-0x114(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x110(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    %rdx,%rcx
  lea    D544(%rip),%rdx
  mov    $0x80,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  mov    $0xa,%ecx
  lea    D298(%rip),%rax
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x1,-0x114(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0xa,%ecx
  lea    D72(%rip),%rax
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x1,-0x114(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x110(%rbp),%rax
  mov    $0xa,%ecx
  lea    D298(%rip),%rdx
  mov    $0xa,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x1,-0x114(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x110(%rbp),%rax
  lea    D288(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x110(%rbp),%rax
  mov    $0xa,%ecx
  lea    D72(%rip),%rdx
  mov    $0xa,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x1,-0x114(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x110(%rbp),%rax
  lea    D176(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0xa,%ecx
  lea    D3(%rip),%rax
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x2,-0x114(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0xa,%ecx
  lea    D314(%rip),%rax
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x2,-0x114(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x110(%rbp),%rax
  mov    $0xa,%ecx
  lea    D3(%rip),%rdx
  mov    $0xa,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x2,-0x114(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x110(%rbp),%rax
  lea    D549(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x110(%rbp),%rax
  mov    $0xa,%ecx
  lea    D314(%rip),%rdx
  mov    $0xa,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ulz_snprintf@plt>
  mov    %eax,-0x114(%rbp)
  cmpl   $0x2,-0x114(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  lea    -0x110(%rbp),%rax
  lea    D425(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L68
  call   <__stack_chk_fail@plt>
L68:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D498
type: string
name: unpack_data
arguments: label: D194
type: string
name: unpack_data
arguments: label: D65
type: string
name: unpack_data
arguments: label: D91
type: string
name: unpack_data
arguments: label: D54
type: string
name: unpack_data
arguments: label: D398
type: string
name: unpack_data
arguments: label: D256
type: string
name: unpack_data
arguments: label: D334
type: string
name: unpack_data
arguments: label: D56
type: string
name: unpack_data
arguments: label: D412
type: string
name: unpack_data
arguments: label: D222
type: string
name: unpack_data
arguments: label: D535
type: string
name: unpack_data
arguments: label: D187
type: string
name: unpack_data
arguments: label: D385
type: string
name: unpack_data
arguments: label: D513
type: string
name: unpack_data
arguments: label: D212
type: string
name: unpack_data
arguments: label: D5
type: string
name: unpack_data
arguments: label: D287
type: string
name: unpack_data
arguments: label: D544
type: string
name: unpack_data
arguments: label: D298
type: string
name: unpack_data
arguments: label: D72
type: string
name: unpack_data
arguments: label: D288
type: string
name: unpack_data
arguments: label: D176
type: string
name: unpack_data
arguments: label: D3
type: string
name: unpack_data
arguments: label: D314
type: string
name: unpack_data
arguments: label: D549
type: string
name: unpack_data
arguments: label: D425
type: string

tool: D498: baz

tool: D194: [%.4d] foo bar %s


tool: D65: ret == 19

tool: D91: line %d: test failed. %s. want %d


tool: D54: [0013] foo bar baz


tool: D398: !strcmp(buf, "[0013] foo bar baz\n")

tool: D256: line %d: test failed. %s <%s


tool: D334: !strcmp(buf, buf2)

tool: 

tool: D412: [%d] foo bar %s%%%zu,%lld


tool: D222: ret == 41

tool: D535: [13] foo bar baz%18446744073709551615,-1


tool: D187: !strcmp(buf, "[13] foo bar baz%18446744073709551615,-1\n")

tool: D385: [%d] foo bar %s%%%zu,%lld
%

tool: D513: ret == -1

tool: D212: %d

tool: D5: 133

tool: D287: AAAAAA

tool: D544: %p

tool: D298: %x

tool: D72: %X

tool: D288: a

tool: D176: A

tool: D3: %.2x

tool: D314: %.2X

tool: D549: 0a

tool: D425: 0A

assistant: ```c
int main() {
  char buf[128], buf2[128];
  ssize_t ret;
  {
    ret = ulz_snprintf(buf, sizeof(buf), "[%.4d] foo bar %s\n", 13, "baz");
    {
      if (!(ret == 19))
        printf("line %d: test failed. %s. want %d\n", 22, "ret == 19", (int)ret);
    };
    if (!(19 == -1)) {
      {
        if (!(!strcmp(buf, "[0013] foo bar baz\n")))
          printf("line %d: test failed. %s <%s\n", 22, "!strcmp(buf, \"[0013] foo bar baz\\n\")", "[%.4d] foo bar %s\n");
      };
      ret = snprintf(buf2, sizeof(buf), "[%.4d] foo bar %s\n", 13, "baz");
      {
        if (!(!strcmp(buf, buf2)))
          printf("line %d: test failed. %s <%s\n", 22, "!strcmp(buf, buf2)", "[%.4d] foo bar %s\n");
      };
    }
  };
  ret = ulz_snprintf(NULL, 0, "[%.4d] foo bar %s\n", 13, "baz");
  {
    if (!(ret == 19))
      printf("line %d: test failed. %s <%s\n", 25, "ret == 19", "");
  };
  {
    ret = ulz_snprintf(buf, sizeof(buf), "[%d] foo bar %s%%%zu,%lld\n", 13, "baz", (size_t)0xFFFFFFFFFFFFFFFFL, 0xFFFFFFFFFFFFFFFFLL);
    {
      if (!(ret == 41))
        printf("line %d: test failed. %s. want %d\n", 27, "ret == 41", (int)ret);
    };
    if (!(41 == -1)) {
      {
        if (!(!strcmp(buf, "[13] foo bar baz%18446744073709551615,-1\n")))
          printf("line %d: test failed. %s <%s\n", 27, "!strcmp(buf, \"[13] foo bar baz%18446744073709551615,-1\\n\")", "[%d] foo bar %s%%%zu,%lld\n");
      };
      ret = snprintf(buf2, sizeof(buf), "[%d] foo bar %s%%%zu,%lld\n", 13, "baz", (size_t)0xFFFFFFFFFFFFFFFFL, 0xFFFFFFFFFFFFFFFFLL);
      {
        if (!(!strcmp(buf, buf2)))
          printf("line %d: test failed. %s <%s\n", 27, "!strcmp(buf, buf2)", "[%d] foo bar %s%%%zu,%lld\n");
      };
    }
  };
  {
    ret = ulz_snprintf(buf, sizeof(buf), "[%d] foo bar %s%%%zu,%lld\n%", 13, "baz", (size_t)0xFFFFFFFFFFFFFFFFL, 0xFFFFFFFFFFFFFFFFLL);
    {
      if (!(ret == -1))
        printf("line %d: test failed. %s. want %d\n", 29, "ret == -1", (int)ret);
    };
    if (!(-1 == -1)) {
      {
        if (!(!strcmp(buf, "")))
          printf("line %d: test failed. %s <%s\n", 29, "!strcmp(buf, \"\")", "[%d] foo bar %s%%%zu,%lld\n%");
      };
      ret = snprintf(buf2, sizeof(buf), "[%d] foo bar %s%%%zu,%lld\n%", 13, "baz", (size_t)0xFFFFFFFFFFFFFFFFL, 0xFFFFFFFFFFFFFFFFLL);
      {
        if (!(!strcmp(buf, buf2)))
          printf("line %d: test failed. %s <%s\n", 29, "!strcmp(buf, buf2)", "[%d] foo bar %s%%%zu,%lld\n%");
      };
    }
  };
  ret = ulz_snprintf(NULL, 0, "[%.4d] foo bar %s\n", 13, "baz");
  assert(ret == 19);
  ret = ulz_snprintf(buf, 4, "%d", 1337);
  assert(ret == 3);
  assert(!strcmp(buf, "133"));
  memcpy(buf, "AAAAAA", 6 + 1);
  ret = snprintf(buf, 4, "%d", 1337);
  assert(ret == 4);
  assert(!memcmp(buf, "133", 4));
  ret = ulz_snprintf(NULL, 0, "%d", 1337);
  assert(ret == 4);
  ret = ulz_snprintf(buf, sizeof(buf), "%p", buf);
  ret = ulz_snprintf(NULL, 0, "%x", 0xa);
  assert(ret == 1);
  ret = ulz_snprintf(NULL, 0, "%X", 0xa);
  assert(ret == 1);
  ret = ulz_snprintf(buf, 10, "%x", 0xa);
  assert(ret == 1);
  assert(!strcmp(buf, "a"));
  ret = ulz_snprintf(buf, 10, "%X", 0xa);
  assert(ret == 1);
  assert(!strcmp(buf, "A"));
  ret = ulz_snprintf(NULL, 0, "%.2x", 0xa);
  assert(ret == 2);
  ret = ulz_snprintf(NULL, 0, "%.2X", 0xa);
  assert(ret == 2);
  ret = ulz_snprintf(buf, 10, "%.2x", 0xa);
  assert(ret == 2);
  assert(!strcmp(buf, "0a"));
  ret = ulz_snprintf(buf, 10, "%.2X", 0xa);
  assert(ret == 2);
  assert(!strcmp(buf, "0A"));
  return 0;
}
```