user: 请从给定的汇编指令推导出C源代码：

```asm
<searchttl>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  call   <strlen@plt>
  mov    %rsp,%rcx
  add    $0x1,%eax
  cltq
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L47
L86:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L86
L47:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L42
L133:
  lea    D4(%rip),%rsi
  mov    %r13,%rdi
  mov    %rsp,%r12
  call   <strstr@plt>
  test   %rax,%rax
  je     L15
  movzbl 0x4(%rax),%edx
  lea    0x4(%rax),%rsi
  cmp    $0x3a,%dl
  je     L15
  test   %dl,%dl
  je     L15
  mov    $0x1,%edx
  nopl   0x0(%rax)
L62:
  movzbl 0x4(%rax,%rdx,1),%ecx
  movslq %edx,%rbx
  add    $0x1,%rdx
  test   %cl,%cl
  je     L103
  cmp    $0x3a,%cl
  jne    L62
L103:
  mov    %ebx,%edx
  mov    %r12,%rdi
  call   <strncpy@plt>
  movb   $0x0,(%r12,%rbx,1)
  mov    $0x64,%esi
  mov    %r12,%rdi
  xor    %ebx,%ebx
  call   <strchr@plt>
  test   %rax,%rax
  je     L35
  movb   $0x0,(%rax)
  mov    %r12,%rdi
  lea    0x1(%rax),%r13
  mov    %r13,%r12
  call   <atoi@plt>
  imul   $0x15180,%eax,%ebx
L35:
  mov    $0x68,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L43
  movb   $0x0,(%rax)
  mov    %r12,%rdi
  lea    0x1(%rax),%r13
  mov    %r13,%r12
  call   <atoi@plt>
  imul   $0xe10,%eax,%eax
  add    %eax,%ebx
L43:
  mov    $0x6d,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L85
  movb   $0x0,(%rax)
  mov    %r12,%rdi
  lea    0x1(%rax),%r13
  mov    %r13,%r12
  call   <atoi@plt>
  imul   $0x3c,%eax,%eax
  add    %eax,%ebx
L85:
  mov    $0x73,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L132
  movb   $0x0,(%rax)
L132:
  mov    %r12,%rdi
  call   <atoi@plt>
  add    %ebx,%eax
L78:
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L52
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
  xchg   %ax,%ax
L15:
  mov    $0xa8c0,%eax
  jmp    L78
  nopw   0x0(%rax,%rax,1)
L42:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L133
L52:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D4
type_infered: string

tool: D4: ttl=

assistant: ```c
uint32_t searchttl(char *str) {
  char buf[strlen(str) + 1];
  char *cptr, *dptr;
  uint32_t time;
  int i;
  dptr = strstr(str, "ttl=");
  if (dptr == NULL)
    return 43200;
  ;
  dptr += 4;
  i = 0;
  while (dptr[i] != '\0' && dptr[i] != ':')
    i++;
  if (i == 0)
    return 43200;
  strncpy(buf, dptr, i);
  buf[i] = '\0';
  time = 0;
  dptr = buf;
  cptr = strchr(dptr, 'd');
  if (cptr != NULL) {
    *cptr = '\0';
    cptr++;
    time += atoi(dptr) * 60 * 60 * 24;
    dptr = cptr;
  }
  cptr = strchr(dptr, 'h');
  if (cptr != NULL) {
    *cptr = '\0';
    cptr++;
    time += atoi(dptr) * 60 * 60;
    dptr = cptr;
  }
  cptr = strchr(dptr, 'm');
  if (cptr != NULL) {
    *cptr = '\0';
    cptr++;
    time += atoi(dptr) * 60;
    dptr = cptr;
  }
  cptr = strchr(dptr, 's');
  if (cptr != NULL)
    *cptr = '\0';
  time += atoi(dptr);
  return time;
}
```