user: 请从给定的汇编指令推导出C源代码：

```asm
<collision>:
  endbr64
  mov    %edi,%eax
  mov    %edx,%r10d
  mov    %ecx,%edx
  mov    $0x1,%ecx
  cmp    %edx,%edi
  je     L236
  mov    %esi,%ecx
  or     %r8d,%ecx
  jne    L26
  movslq %edi,%r8
  imul   $0x66666667,%r8,%r8
  sar    $0x22,%r8
  sar    $0x1f,%edi
  sub    %edi,%r8d
  movslq %edx,%rdi
  imul   $0x66666667,%rdi,%rdi
  sar    $0x22,%rdi
  mov    %edx,%r11d
  sar    $0x1f,%r11d
  sub    %r11d,%edi
  cmp    %edi,%r8d
  je     L247
  cmp    $0x1,%esi
  sete   %sil
  mov    $0x0,%ecx
L33:
  test   %sil,%sil
  je     L183
  test   %cl,%cl
  je     L183
  movslq %eax,%rcx
  imul   $0x66666667,%rcx,%rcx
  sar    $0x22,%rcx
  mov    %eax,%esi
  sar    $0x1f,%esi
  sub    %esi,%ecx
  lea    (%rcx,%rcx,4),%ecx
  add    %ecx,%ecx
  mov    %eax,%edi
  sub    %ecx,%edi
  movslq %edx,%rcx
  imul   $0x66666667,%rcx,%rcx
  sar    $0x22,%rcx
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%ecx
  lea    (%rcx,%rcx,4),%ecx
  add    %ecx,%ecx
  mov    %edx,%esi
  sub    %ecx,%esi
  mov    $0x0,%ecx
  cmp    %esi,%edi
  jne    L236
  movslq %eax,%rsi
  imul   $0x66666667,%rsi,%rsi
  sar    $0x22,%rsi
  sar    $0x1f,%eax
  sub    %eax,%esi
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  sar    $0x1f,%edx
  sub    %edx,%eax
  cmp    %eax,%esi
  jge    L138
  add    %esi,%r10d
  mov    $0x1,%ecx
  cmp    %r10d,%eax
  jl     L236
L138:
  mov    $0x0,%ecx
  cmp    %eax,%esi
  jle    L236
  add    %r9d,%eax
  cmp    %eax,%esi
  setl   %cl
  movzbl %cl,%ecx
  jmp    L236
L247:
  cmp    %edx,%eax
  jge    L29
  add    %eax,%r10d
  cmp    %edx,%r10d
  setg   %cl
  movzbl %cl,%ecx
  jmp    L236
L29:
  jle    L236
  add    %edx,%r9d
  cmp    %eax,%r9d
  setg   %cl
  movzbl %cl,%ecx
  jmp    L236
L26:
  cmp    $0x1,%r8d
  sete   %cl
  test   %esi,%esi
  jne    L118
  test   %cl,%cl
  je     L118
  movslq %edi,%rsi
  imul   $0x66666667,%rsi,%rsi
  sar    $0x22,%rsi
  mov    %edi,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%esi
  lea    (%rsi,%rsi,4),%ecx
  add    %ecx,%ecx
  mov    %edi,%esi
  sub    %ecx,%esi
  movslq %edx,%rdi
  imul   $0x66666667,%rdi,%rdi
  sar    $0x22,%rdi
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edi
  lea    (%rdi,%rdi,4),%ecx
  add    %ecx,%ecx
  mov    %edx,%edi
  sub    %ecx,%edi
  mov    $0x0,%ecx
  cmp    %edi,%esi
  jg     L236
  add    %r10d,%esi
  cmp    %esi,%edi
  jge    L236
  movslq %edx,%rsi
  imul   $0x66666667,%rsi,%rsi
  sar    $0x22,%rsi
  sar    $0x1f,%edx
  sub    %edx,%esi
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x22,%rdx
  sar    $0x1f,%eax
  sub    %eax,%edx
  cmp    %edx,%esi
  jg     L236
  add    %r9d,%esi
  cmp    %esi,%edx
  setl   %cl
  movzbl %cl,%ecx
L236:
  mov    %ecx,%eax
  ret
L118:
  cmp    $0x1,%esi
  sete   %sil
  test   %r8d,%r8d
  jne    L33
  test   %sil,%sil
  je     L33
  movslq %edx,%rsi
  imul   $0x66666667,%rsi,%rsi
  sar    $0x22,%rsi
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%esi
  lea    (%rsi,%rsi,4),%ecx
  add    %ecx,%ecx
  mov    %edx,%esi
  sub    %ecx,%esi
  movslq %eax,%rdi
  imul   $0x66666667,%rdi,%rdi
  sar    $0x22,%rdi
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edi
  lea    (%rdi,%rdi,4),%ecx
  add    %ecx,%ecx
  mov    %eax,%edi
  sub    %ecx,%edi
  mov    $0x0,%ecx
  cmp    %edi,%esi
  jg     L236
  add    %r9d,%esi
  cmp    %esi,%edi
  jge    L236
  movslq %eax,%rsi
  imul   $0x66666667,%rsi,%rsi
  sar    $0x22,%rsi
  sar    $0x1f,%eax
  sub    %eax,%esi
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  sar    $0x1f,%edx
  sub    %edx,%eax
  cmp    %eax,%esi
  jg     L236
  add    %r10d,%esi
  cmp    %esi,%eax
  setl   %cl
  movzbl %cl,%ecx
  jmp    L236
L183:
  mov    $0x0,%ecx
  jmp    L236
```

assistant: ```c
int collision(int ship1, int ship1D, int l1, int ship2, int ship2D, int l2) {
  if (ship1 == ship2)
    return 1;
  if (ship1D == 0 && ship2D == 0 && ship1 / 10 == ship2 / 10) {
    if (ship1 < ship2 && ship1 + l1 > ship2)
      return 1;
    if (ship1 > ship2 && ship2 + l2 > ship1)
      return 1;
    return 0;
  }
  if (ship1D == 0 && ship2D == 1) {
    if (ship1 % 10 <= ship2 % 10 && ship1 % 10 + l1 > ship2 % 10 && ship2 / 10 <= ship1 / 10 && ship2 / 10 + l2 > ship1 / 10)
      return 1;
    return 0;
  }
  if (ship1D == 1 && ship2D == 0) {
    if (ship2 % 10 <= ship1 % 10 && ship2 % 10 + l2 > ship1 % 10 && ship1 / 10 <= ship2 / 10 && ship1 / 10 + l1 > ship2 / 10)
      return 1;
    return 0;
  }
  if (ship1D == 1 && ship2D == 1 && ship1 % 10 == ship2 % 10) {
    if (ship1 / 10 < ship2 / 10 && ship1 / 10 + l1 > ship2 / 10)
      return 1;
    if (ship1 / 10 > ship2 / 10 && ship2 / 10 + l2 > ship1 / 10)
      return 1;
  }
  return 0;
}
```