user: Translate the below assembly code into C programming language:

```asm
<str_contains>:
  endbr64
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  call   <strlen@plt>
  test   %eax,%eax
  jle    L50
  mov    %eax,%edx
  lea    -0x1(%rax),%eax
  cmp    $0xe,%eax
  jbe    L65
  mov    %edx,%ecx
  movd   %ebp,%xmm4
  movdqa D1(%rip),%xmm7
  mov    %rbx,%rax
  punpcklbw %xmm4,%xmm4
  shr    $0x4,%ecx
  pxor   %xmm1,%xmm1
  pxor   %xmm6,%xmm6
  sub    $0x1,%ecx
  punpcklwd %xmm4,%xmm4
  pxor   %xmm5,%xmm5
  shl    $0x4,%rcx
  pshufd $0x0,%xmm4,%xmm4
  lea    0x10(%rbx,%rcx,1),%rcx
  nopl   0x0(%rax,%rax,1)
L152:
  movdqu (%rax),%xmm0
  movdqa %xmm6,%xmm3
  add    $0x10,%rax
  pcmpeqb %xmm4,%xmm0
  pand   %xmm7,%xmm0
  pcmpgtb %xmm0,%xmm3
  movdqa %xmm0,%xmm2
  punpcklbw %xmm3,%xmm2
  punpckhbw %xmm3,%xmm0
  movdqa %xmm5,%xmm3
  pcmpgtw %xmm2,%xmm3
  movdqa %xmm2,%xmm8
  punpcklwd %xmm3,%xmm8
  punpckhwd %xmm3,%xmm2
  movdqa %xmm0,%xmm3
  paddd  %xmm8,%xmm1
  paddd  %xmm2,%xmm1
  movdqa %xmm5,%xmm2
  pcmpgtw %xmm0,%xmm2
  punpcklwd %xmm2,%xmm3
  punpckhwd %xmm2,%xmm0
  paddd  %xmm3,%xmm1
  paddd  %xmm0,%xmm1
  cmp    %rcx,%rax
  jne    L152
  movdqa %xmm1,%xmm0
  mov    %edx,%ecx
  psrldq $0x8,%xmm0
  and    $0xfffffff0,%ecx
  paddd  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm1
  movd   %xmm1,%eax
  test   $0xf,%dl
  je     L54
L185:
  movslq %ecx,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%eax
  lea    0x1(%rcx),%esi
  cmp    %edx,%esi
  jge    L54
  movslq %esi,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%eax
  lea    0x2(%rcx),%esi
  cmp    %esi,%edx
  jle    L54
  movslq %esi,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%eax
  lea    0x3(%rcx),%esi
  cmp    %esi,%edx
  jle    L54
  movslq %esi,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%eax
  lea    0x4(%rcx),%esi
  cmp    %esi,%edx
  jle    L54
  movslq %esi,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%eax
  lea    0x5(%rcx),%esi
  cmp    %esi,%edx
  jle    L54
  movslq %esi,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%eax
  lea    0x6(%rcx),%esi
  cmp    %esi,%edx
  jle    L54
  movslq %esi,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%eax
  lea    0x7(%rcx),%esi
  cmp    %esi,%edx
  jle    L54
  movslq %esi,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%eax
  lea    0x8(%rcx),%esi
  cmp    %esi,%edx
  jle    L54
  movslq %esi,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%eax
  lea    0x9(%rcx),%esi
  cmp    %esi,%edx
  jle    L54
  movslq %esi,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%eax
  lea    0xa(%rcx),%esi
  cmp    %esi,%edx
  jle    L54
  movslq %esi,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%eax
  lea    0xb(%rcx),%esi
  cmp    %esi,%edx
  jle    L54
  movslq %esi,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%eax
  lea    0xc(%rcx),%esi
  cmp    %esi,%edx
  jle    L54
  movslq %esi,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  movzbl %sil,%esi
  add    %esi,%eax
  lea    0xd(%rcx),%esi
  cmp    %esi,%edx
  jle    L54
  movslq %esi,%rsi
  cmp    %bpl,(%rbx,%rsi,1)
  sete   %sil
  add    $0xe,%ecx
  movzbl %sil,%esi
  add    %esi,%eax
  cmp    %ecx,%edx
  jle    L54
  movslq %ecx,%rcx
  xor    %edx,%edx
  cmp    %bpl,(%rbx,%rcx,1)
  sete   %dl
  add    %edx,%eax
L54:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L50:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  ret
L65:
  xor    %ecx,%ecx
  xor    %eax,%eax
  jmp    L185
```

tool_calls: name: read_data
arguments: tag: D1
type_infered: byte[16]

tool: {"D1": [0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01]}

assistant: ```c
int str_contains(char *str, char delim) {
  int count = 0;
  int len = strlen(str);
  for (int i = 0; i < len; i++) {
    if (str[i] == delim) {
      count++;
    }
  }
  return count;
}
```