user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<collide_polygon_rectangle>:
  endbr64
  push   %r15
  mov    %r8d,%r15d
  push   %r14
  mov    %edi,%r14d
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %r9d,%ebp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x98,%rsp
  mov    %edi,0x2c(%rsp)
  mov    %ecx,0x20(%rsp)
  mov    %r8d,0x24(%rsp)
  mov    %r9d,0x28(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  test   %edi,%edi
  setg   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    0xd0(%rsp),%eax
  mov    %ebx,%edx
  mov    %ebx,0x40(%rsp)
  add    %ebp,%edx
  mov    %r15d,0x44(%rsp)
  add    %r15d,%eax
  mov    %edx,0x48(%rsp)
  mov    %eax,0x5c(%rsp)
  mov    %eax,0x64(%rsp)
  mov    %eax,0x6c(%rsp)
  mov    %eax,0x74(%rsp)
  lea    -0x1(%r14),%eax
  mov    %r15d,0x4c(%rsp)
  mov    %edx,0x50(%rsp)
  mov    %r15d,0x54(%rsp)
  mov    %edx,0x58(%rsp)
  mov    %edx,0x60(%rsp)
  mov    %ebx,0x68(%rsp)
  mov    %ebx,0x70(%rsp)
  mov    %ebx,0x78(%rsp)
  mov    %r15d,0x7c(%rsp)
  mov    %eax,0xc(%rsp)
  test   %r14d,%r14d
  jle    L36
  movslq %r14d,%rax
  xor    %r15d,%r15d
  lea    0x30(%rsp),%rbx
  mov    %rax,0x18(%rsp)
  lea    0x40(%rsp),%rax
  lea    0x80(%rsp),%rbp
  mov    %rax,0x10(%rsp)
L11:
  movslq 0xc(%rsp),%rax
  mov    0x10(%rsp),%r14
  mov    %r15d,0xc(%rsp)
  mov    (%r12,%rax,4),%edx
  mov    0x0(%r13,%rax,4),%eax
  mov    %eax,0x34(%rsp)
  mov    (%r12,%r15,4),%eax
  mov    %edx,0x30(%rsp)
  mov    %eax,0x38(%rsp)
  mov    0x0(%r13,%r15,4),%eax
  mov    %eax,0x3c(%rsp)
L39:
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <lines_intersect@plt>
  test   %rax,%rax
  jne    L44
  add    $0x10,%r14
  cmp    %r14,%rbp
  jne    L39
  add    $0x1,%r15
  cmp    0x18(%rsp),%r15
  jne    L11
L36:
  mov    0x24(%rsp),%r15d
  mov    0x20(%rsp),%ebx
  mov    0xd0(%rsp),%r9d
  mov    0x28(%rsp),%r8d
  mov    0x0(%r13),%esi
  mov    (%r12),%edi
  mov    %r15d,%ecx
  mov    %ebx,%edx
  call   <point_in_rectangle@plt>
  test   %rax,%rax
  je     L61
  nopl   (%rax)
L44:
  mov    $0x1,%eax
L64:
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L14
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L61:
  mov    0x2c(%rsp),%edx
  mov    %r13,%r8
  mov    %r12,%rcx
  mov    %r15d,%esi
  mov    %ebx,%edi
  call   <point_in_polygon@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  jmp    L64
L14:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int collide_polygon_rectangle(int n, int *xs, int *ys, int rx, int ry, int w, int h) {
  assert(n > 0);
  int polygon_line[2][2];
  int rectangle_lines[4][2][2] = {{{rx, ry}, {rx + w, ry}}, {{rx + w, ry}, {rx + w, ry + h}}, {{rx + w, ry + h}, {rx, ry + h}}, {{rx, ry + h}, {rx, ry}}};
  int polygon_index, rectangle_index;
  int old_polygon_index = n - 1;
  for (polygon_index = 0; polygon_index < n; ++polygon_index) {
    polygon_line[0][0] = xs[old_polygon_index];
    polygon_line[0][1] = ys[old_polygon_index];
    polygon_line[1][0] = xs[polygon_index];
    polygon_line[1][1] = ys[polygon_index];
    for (rectangle_index = 0; rectangle_index < 4; ++rectangle_index) {
      if (lines_intersect(polygon_line, rectangle_lines[rectangle_index])) {
        return (1);
      }
    }
    old_polygon_index = polygon_index;
  }
  if (point_in_rectangle(xs[0], ys[0], rx, ry, w, h)) {
    return (1);
  }
  if (point_in_polygon(rx, ry, n, xs, ys)) {
    return (1);
  }
  return (0);
}
```