user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x100,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0xe0(%rbp),%rax
  mov    %rax,%rsi
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0xfd(%rbp),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0xfc(%rbp),%rax
  mov    %rax,%rsi
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0x70(%rbp),%rax
  mov    %rax,%rsi
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0xe0(%rbp),%rax
  mov    %rax,%rdi
  call   <length@plt>
  mov    %eax,-0xec(%rbp)
  lea    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <length@plt>
  mov    %eax,-0xe8(%rbp)
  movl   $0x0,-0xf4(%rbp)
  mov    -0xfc(%rbp),%ecx
  movzbl -0xfd(%rbp),%eax
  movsbl %al,%edx
  mov    -0xec(%rbp),%esi
  lea    -0xe0(%rbp),%rax
  mov    %rax,%rdi
  call   <check_char@plt>
  mov    %eax,-0xe4(%rbp)
  movl   $0x0,-0xf8(%rbp)
  jmp    L39
L60:
  mov    -0xf8(%rbp),%eax
  cltq
  movzbl -0xe0(%rbp,%rax,1),%edx
  movzbl -0x70(%rbp),%eax
  cmp    %al,%dl
  jne    L73
  movl   $0x0,-0xf0(%rbp)
  jmp    L11
L54:
  mov    -0xf8(%rbp),%edx
  mov    -0xf0(%rbp),%eax
  add    %edx,%eax
  cltq
  movzbl -0xe0(%rbp,%rax,1),%edx
  mov    -0xf0(%rbp),%eax
  cltq
  movzbl -0x70(%rbp,%rax,1),%eax
  cmp    %al,%dl
  jne    L9
  movl   $0x1,-0xf4(%rbp)
  jmp    L85
L9:
  movl   $0x0,-0xf4(%rbp)
L85:
  addl   $0x1,-0xf0(%rbp)
L11:
  mov    -0xf0(%rbp),%eax
  cmp    -0xe8(%rbp),%eax
  jl     L54
L73:
  cmpl   $0x1,-0xf4(%rbp)
  je     L3
  addl   $0x1,-0xf8(%rbp)
L39:
  mov    -0xec(%rbp),%eax
  sub    -0xe8(%rbp),%eax
  cmp    %eax,-0xf8(%rbp)
  jl     L60
  jmp    L105
L3:
  nop
L105:
  mov    -0xe4(%rbp),%edx
  mov    -0xf4(%rbp),%eax
  add    %edx,%eax
  cmp    $0x1,%eax
  jne    L103
  lea    D59(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L110
L103:
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L110:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L118
  call   <__stack_chk_fail@plt>
L118:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D31
type_infered: string
name: disassemble_data
arguments: tag: D10
type_infered: string
name: disassemble_data
arguments: tag: D40
type_infered: string
name: disassemble_data
arguments: tag: D59
type_infered: string
name: disassemble_data
arguments: tag: D33
type_infered: string

tool: D31: %s 

tool: D10: %c

tool: D40: %d

tool: D59: YES

tool: D33: NO

assistant: ```c
int main() {
  int n, i;
  char ch;
  char str[101];
  char sub[101];
  scanf("%s ", str);
  scanf("%c", &ch);
  scanf("%d", &n);
  scanf("%s ", sub);
  int l1 = length(str);
  int l2 = length(sub);
  int flag2 = 0;
  int flag1 = check_char(str, l1, ch, n);
  int j;
  for (i = 0; i < l1 - l2; i++) {
    if (str[i] == sub[0]) {
      for (j = 0; j < l2; j++) {
        if (str[i + j] == sub[j])
          flag2 = 1;
        else
          flag2 = 0;
      }
    }
    if (flag2 == 1)
      break;
  }
  if ((flag1 + flag2) == 1)
    printf("YES");
  else
    printf("NO");
  return 0;
}
```