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

```asm
<lengthOfLongestSubstring>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x440,%rsp
  mov    %rdi,-0x438(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x428(%rbp)
  movl   $0x0,-0x41c(%rbp)
  movl   $0x0,-0x420(%rbp)
  cmpq   $0x0,-0x438(%rbp)
  je     L1
  mov    -0x438(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L117
L1:
  mov    $0x0,%eax
  jmp    L47
L117:
  movl   $0x0,-0x428(%rbp)
  jmp    L120
L130:
  mov    -0x428(%rbp),%eax
  cltq
  movl   $0xffffffff,-0x410(%rbp,%rax,4)
  addl   $0x1,-0x428(%rbp)
L120:
  cmpl   $0xff,-0x428(%rbp)
  jle    L130
  movl   $0x0,-0x428(%rbp)
  jmp    L82
L96:
  addl   $0x1,-0x428(%rbp)
L82:
  mov    -0x428(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x438(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L96
  mov    -0x428(%rbp),%eax
  mov    %eax,-0x41c(%rbp)
  mov    -0x41c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x418(%rbp)
  mov    -0x418(%rbp),%rax
  movl   $0x1,(%rax)
  mov    -0x438(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cltq
  movl   $0x0,-0x410(%rbp,%rax,4)
  movl   $0x0,-0x424(%rbp)
  movl   $0x1,-0x428(%rbp)
  jmp    L145
L122:
  mov    -0x428(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x438(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cltq
  mov    -0x410(%rbp,%rax,4),%eax
  cmp    %eax,-0x424(%rbp)
  jle    L75
  mov    -0x428(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x418(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x428(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x418(%rbp),%rax
  add    %rcx,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L127
L75:
  mov    -0x428(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x438(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cltq
  mov    -0x410(%rbp,%rax,4),%eax
  add    $0x1,%eax
  mov    %eax,-0x424(%rbp)
  mov    -0x428(%rbp),%eax
  sub    -0x424(%rbp),%eax
  mov    %eax,%edx
  mov    -0x428(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x418(%rbp),%rax
  add    %rcx,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
L127:
  mov    -0x428(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x438(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cltq
  mov    -0x428(%rbp),%edx
  mov    %edx,-0x410(%rbp,%rax,4)
  addl   $0x1,-0x428(%rbp)
L145:
  mov    -0x428(%rbp),%eax
  cmp    -0x41c(%rbp),%eax
  jl     L122
  movl   $0x0,-0x428(%rbp)
  jmp    L138
L8:
  mov    -0x428(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x418(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x420(%rbp)
  jge    L133
  mov    -0x428(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x418(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x420(%rbp)
L133:
  addl   $0x1,-0x428(%rbp)
L138:
  mov    -0x428(%rbp),%eax
  cmp    -0x41c(%rbp),%eax
  jl     L8
  mov    -0x420(%rbp),%eax
L47:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L108
  call   <__stack_chk_fail@plt>
L108:
  leave
  ret
```

assistant: ```c
int lengthOfLongestSubstring(char *s) {
  int tag[256];
  int i = 0;
  int length = 0;
  int *ret;
  int cur;
  int max = 0;
  if (!s || !s[0]) {
    return 0;
  }
  for (i = 0; i < 256; i++) {
    tag[i] = -1;
  }
  i = 0;
  while (s[i]) {
    i++;
  }
  length = i;
  ret = (int *)malloc(sizeof(int) * length);
  ret[0] = 1;
  tag[s[0]] = 0;
  cur = 0;
  for (i = 1; i < length; i++) {
    if (tag[s[i]] < cur) {
      ret[i] = ret[i - 1] + 1;
    } else {
      cur = tag[s[i]] + 1;
      ret[i] = i - cur + 1;
    }
    tag[s[i]] = i;
  }
  for (i = 0; i < length; i++) {
    if (ret[i] > max) {
      max = ret[i];
    }
  }
  return max;
}
```