user: What is the c source code of the assembly code below?

```asm
<url_protocol>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  call   <strlen@plt>
  xor    %esi,%esi
  mov    %rbp,%rdi
  mov    %eax,%r12d
  mov    %eax,%edx
  call   <memset@plt>
  movslq %r12d,%rsi
  xor    %eax,%eax
  test   %r12d,%r12d
  jg     L125
  jmp    L2
  nopl   0x0(%rax)
L184:
  add    $0x1,%rax
  cmp    %rax,%rsi
  je     L2
L125:
  cmpb   $0x3a,(%rbx,%rax,1)
  mov    %eax,%edx
  mov    %eax,%ecx
  jne    L184
  test   %eax,%eax
  je     L2
  lea    0x1(%rbx),%r8
  mov    %rbp,%rdi
  lea    -0x1(%rax),%esi
  sub    %r8,%rdi
  cmp    $0xe,%rdi
  jbe    L55
  cmp    $0x6,%esi
  jbe    L55
  cmp    $0xe,%esi
  jbe    L62
  mov    %eax,%esi
  xor    %eax,%eax
  shr    $0x4,%esi
  shl    $0x4,%rsi
  nopl   0x0(%rax,%rax,1)
L142:
  movdqu (%rbx,%rax,1),%xmm0
  movups %xmm0,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %rsi,%rax
  jne    L142
  mov    %edx,%esi
  and    $0xfffffff0,%esi
  mov    %esi,%eax
  cmp    %edx,%esi
  je     L153
  sub    %esi,%edx
  lea    -0x1(%rdx),%edi
  cmp    $0x6,%edi
  jbe    L53
L104:
  mov    (%rbx,%rsi,1),%rdi
  mov    %rdi,0x0(%rbp,%rsi,1)
  mov    %edx,%esi
  and    $0xfffffff8,%esi
  add    %esi,%eax
  cmp    %esi,%edx
  je     L153
L53:
  movslq %eax,%rdx
  movzbl (%rbx,%rdx,1),%esi
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x1(%rax),%edx
  cmp    %edx,%ecx
  jle    L153
  movslq %edx,%rdx
  movzbl (%rbx,%rdx,1),%esi
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x2(%rax),%edx
  cmp    %edx,%ecx
  jle    L153
  movslq %edx,%rdx
  movzbl (%rbx,%rdx,1),%esi
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x3(%rax),%edx
  cmp    %edx,%ecx
  jle    L153
  movslq %edx,%rdx
  movzbl (%rbx,%rdx,1),%esi
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x4(%rax),%edx
  cmp    %edx,%ecx
  jle    L153
  movslq %edx,%rdx
  movzbl (%rbx,%rdx,1),%esi
  mov    %sil,0x0(%rbp,%rdx,1)
  lea    0x5(%rax),%edx
  cmp    %edx,%ecx
  jle    L153
  movslq %edx,%rdx
  add    $0x6,%eax
  movzbl (%rbx,%rdx,1),%esi
  mov    %sil,0x0(%rbp,%rdx,1)
  cmp    %eax,%ecx
  jle    L153
  cltq
  movzbl (%rbx,%rax,1),%edx
  mov    %dl,0x0(%rbp,%rax,1)
L153:
  cmp    $0x4,%ecx
  jg     L2
  test   %ecx,%ecx
  je     L2
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L2:
  pop    %rbx
  mov    %rbp,%rdi
  lea    D9(%rip),%rsi
  pop    %rbp
  pop    %r12
  jmp    1070 <strcpy@plt>
L55:
  xor    %edx,%edx
  nopl   (%rax)
L148:
  movzbl (%rbx,%rdx,1),%esi
  mov    %sil,0x0(%rbp,%rdx,1)
  add    $0x1,%rdx
  cmp    %rax,%rdx
  jne    L148
  jmp    L153
L62:
  xor    %esi,%esi
  xor    %eax,%eax
  jmp    L104
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D9
data_type: string

tool: D9: http

assistant: ```c
void url_protocol(char *url, char *protocol) {
  int i = 0, len, protocol_end = 0, k = 0;
  len = strlen(url);
  memset(protocol, '\0', len);
  for (i = 0; i < len; i++) {
    if (url[i] == ':') {
      protocol_end = i;
      break;
    }
  }
  for (i = 0; i < protocol_end; i++) {
    protocol[k] = url[i];
    k++;
  }
  if (protocol_end > 4 || protocol_end == 0) {
    strcpy(protocol, "http");
  }
}
```