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

```asm
<lines_intersect>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x28,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %rdx,-0x88(%rbp)
  mov    %rcx,-0x90(%rbp)
  mov    %r8,-0x98(%rbp)
  mov    %r9,-0xa0(%rbp)
  mov    -0x90(%rbp),%rax
  sub    -0x80(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  mov    -0x78(%rbp),%rax
  sub    -0x88(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x88(%rbp),%rax
  imul   -0x80(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x78(%rbp),%rax
  imul   -0x90(%rbp),%rax
  mov    %rax,%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x68(%rbp),%rax
  imul   -0x98(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x60(%rbp),%rax
  imul   -0xa0(%rbp),%rax
  add    %rax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x68(%rbp),%rax
  imul   0x10(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x60(%rbp),%rax
  imul   0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x48(%rbp)
  cmpq   $0x0,-0x50(%rbp)
  je     L86
  cmpq   $0x0,-0x48(%rbp)
  je     L86
  mov    -0x50(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  xor    %rdx,%rax
  test   %rax,%rax
  js     L86
  mov    $0x0,%eax
  jmp    L123
L86:
  mov    0x18(%rbp),%rax
  sub    -0xa0(%rbp),%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x98(%rbp),%rax
  sub    0x10(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  mov    0x10(%rbp),%rax
  imul   -0xa0(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x98(%rbp),%rax
  imul   0x18(%rbp),%rax
  mov    %rax,%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x40(%rbp),%rax
  imul   -0x78(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  imul   -0x80(%rbp),%rax
  add    %rax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x40(%rbp),%rax
  imul   -0x88(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  imul   -0x90(%rbp),%rax
  add    %rax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  je     L154
  cmpq   $0x0,-0x20(%rbp)
  je     L154
  mov    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  xor    %rdx,%rax
  test   %rax,%rax
  js     L154
  mov    $0x0,%eax
  jmp    L123
L154:
  mov    -0x68(%rbp),%rax
  imul   -0x38(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x40(%rbp),%rax
  imul   -0x60(%rbp),%rax
  mov    %rax,%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L18
  mov    $0x2,%eax
  jmp    L123
L18:
  cmpq   $0x0,-0x18(%rbp)
  jns    L138
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdx
  shr    $0x3f,%rdx
  add    %rdx,%rax
  sar    %rax
  neg    %rax
  jmp    L143
L138:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdx
  shr    $0x3f,%rdx
  add    %rdx,%rax
  sar    %rax
L143:
  mov    %rax,-0x10(%rbp)
  mov    -0x60(%rbp),%rax
  imul   -0x30(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  imul   -0x58(%rbp),%rax
  mov    %rax,%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jns    L40
  mov    -0x8(%rbp),%rax
  sub    -0x10(%rbp),%rax
  jmp    L142
L40:
  mov    -0x8(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
L142:
  cqto
  idivq  -0x18(%rbp)
  mov    %rax,%rdx
  mov    0x20(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x40(%rbp),%rax
  imul   -0x58(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x68(%rbp),%rax
  imul   -0x30(%rbp),%rax
  mov    %rax,%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jns    L34
  mov    -0x8(%rbp),%rax
  sub    -0x10(%rbp),%rax
  jmp    L57
L34:
  mov    -0x8(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
L57:
  cqto
  idivq  -0x18(%rbp)
  mov    %rax,%rdx
  mov    0x28(%rbp),%rax
  mov    %rdx,(%rax)
  mov    $0x1,%eax
L123:
  leave
  ret
```

assistant: ```c
int lines_intersect(long x1, long y1, long x2, long y2, long x3, long y3, long x4, long y4, long *x, long *y) {
  long a1, a2, b1, b2, c1, c2;
  long r1, r2, r3, r4;
  long denom, offset, num;
  a1 = y2 - y1;
  b1 = x1 - x2;
  c1 = x2 * y1 - x1 * y2;
  r3 = a1 * x3 + b1 * y3 + c1;
  r4 = a1 * x4 + b1 * y4 + c1;
  if (r3 != 0 && r4 != 0 && (((long)((unsigned long)r3 ^ (unsigned long)r4)) >= 0))
    return (0);
  a2 = y4 - y3;
  b2 = x3 - x4;
  c2 = x4 * y3 - x3 * y4;
  r1 = a2 * x1 + b2 * y1 + c2;
  r2 = a2 * x2 + b2 * y2 + c2;
  if (r1 != 0 && r2 != 0 && (((long)((unsigned long)r1 ^ (unsigned long)r2)) >= 0))
    return (0);
  denom = a1 * b2 - a2 * b1;
  if (denom == 0)
    return (2);
  offset = denom < 0 ? -denom / 2 : denom / 2;
  num = b1 * c2 - b2 * c1;
  *x = (num < 0 ? num - offset : num + offset) / denom;
  num = a2 * c1 - a1 * c2;
  *y = (num < 0 ? num - offset : num + offset) / denom;
  return (1);
}
```