user: Converte this assembly snippet into its equivalent C code:

```asm
<get_first_winning_move>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %ecx,%eax
  mov    %r8d,%r10d
  mov    0x10(%rbp),%r8d
  mov    0x18(%rbp),%ecx
  mov    %di,-0x4(%rbp)
  mov    %si,-0x8(%rbp)
  mov    %dx,-0xc(%rbp)
  mov    %ax,-0x10(%rbp)
  mov    %r10d,%eax
  mov    %ax,-0x14(%rbp)
  mov    %r9d,%eax
  mov    %ax,-0x18(%rbp)
  mov    %r8d,%eax
  mov    %ax,-0x1c(%rbp)
  mov    %ecx,%eax
  mov    %ax,-0x20(%rbp)
  cmpw   $0x0,-0x4(%rbp)
  je     L1626
  cmpw   $0x0,-0x14(%rbp)
  jne    L1626
  cmpw   $0x0,-0x18(%rbp)
  jne    L1626
  cmpw   $0x0,-0x1c(%rbp)
  je     L1626
  cmpw   $0x0,-0x20(%rbp)
  jne    L1626
  movswl -0x4(%rbp),%eax
  lea    0x4(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L2119
  mov    $0x0,%eax
  jmp    L1770
L2119:
  movswl -0x4(%rbp),%eax
  lea    0x5(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L2064
  movzwl -0x4(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L2064
  mov    $0x1,%eax
  jmp    L1770
L2064:
  movswl -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L3243
  movzwl -0x4(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L3243
  mov    $0x2,%eax
  jmp    L1770
L3243:
  movswl -0x4(%rbp),%eax
  lea    -0x3(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L475
  movzwl -0x4(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L475
  cmpw   $0x8,-0x4(%rbp)
  jle    L475
  mov    $0x3,%eax
  jmp    L1770
L475:
  movswl -0x4(%rbp),%eax
  lea    -0x4(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L2125
  cmpw   $0x8,-0x4(%rbp)
  jle    L2125
  mov    $0x4,%eax
  jmp    L1770
L2125:
  movswl -0x4(%rbp),%eax
  lea    -0x5(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L2848
  movzwl -0x4(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L2848
  cmpw   $0x8,-0x4(%rbp)
  jle    L2848
  mov    $0x5,%eax
  jmp    L1770
L2848:
  movswl -0x4(%rbp),%eax
  lea    -0x1(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L3158
  movzwl -0x4(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L3158
  mov    $0x6,%eax
  jmp    L1770
L3158:
  movswl -0x4(%rbp),%eax
  lea    0x3(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L1626
  movzwl -0x4(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L1626
  mov    $0x7,%eax
  jmp    L1770
L1626:
  cmpw   $0x0,-0x4(%rbp)
  je     L1866
  cmpw   $0x0,-0x14(%rbp)
  jne    L1866
  cmpw   $0x0,-0x18(%rbp)
  jne    L1866
  cmpw   $0x0,-0x1c(%rbp)
  jne    L1866
  cmpw   $0x0,-0x20(%rbp)
  je     L1866
  movswl -0x4(%rbp),%eax
  lea    0x4(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L1045
  mov    $0x0,%eax
  jmp    L1770
L1045:
  movswl -0x4(%rbp),%eax
  lea    0x5(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L2382
  movzwl -0x4(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L2382
  mov    $0x1,%eax
  jmp    L1770
L2382:
  movswl -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L3073
  movzwl -0x4(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L3073
  mov    $0x2,%eax
  jmp    L1770
L3073:
  movswl -0x4(%rbp),%eax
  lea    -0x3(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L3179
  movzwl -0x4(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L3179
  cmpw   $0x8,-0x4(%rbp)
  jle    L3179
  mov    $0x3,%eax
  jmp    L1770
L3179:
  movswl -0x4(%rbp),%eax
  lea    -0x4(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L2319
  cmpw   $0x8,-0x4(%rbp)
  jle    L2319
  mov    $0x4,%eax
  jmp    L1770
L2319:
  movswl -0x4(%rbp),%eax
  lea    -0x5(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L1126
  movzwl -0x4(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L1126
  cmpw   $0x8,-0x4(%rbp)
  jle    L1126
  mov    $0x5,%eax
  jmp    L1770
L1126:
  movswl -0x4(%rbp),%eax
  lea    -0x1(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L1486
  movzwl -0x4(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L1486
  mov    $0x6,%eax
  jmp    L1770
L1486:
  movswl -0x4(%rbp),%eax
  lea    0x3(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L1866
  movzwl -0x4(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L1866
  mov    $0x7,%eax
  jmp    L1770
L1866:
  cmpw   $0x0,-0x8(%rbp)
  je     L2010
  cmpw   $0x0,-0x14(%rbp)
  je     L2010
  cmpw   $0x0,-0x18(%rbp)
  jne    L2010
  cmpw   $0x0,-0x1c(%rbp)
  jne    L2010
  cmpw   $0x0,-0x20(%rbp)
  jne    L2010
  movswl -0x8(%rbp),%eax
  lea    0x4(%rax),%edx
  movswl -0x14(%rbp),%eax
  cmp    %eax,%edx
  jne    L2491
  mov    $0x8,%eax
  jmp    L1770
L2491:
  movswl -0x8(%rbp),%eax
  lea    0x5(%rax),%edx
  movswl -0x14(%rbp),%eax
  cmp    %eax,%edx
  jne    L1390
  movzwl -0x8(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L1390
  mov    $0x9,%eax
  jmp    L1770
L1390:
  movswl -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  movswl -0x14(%rbp),%eax
  cmp    %eax,%edx
  jne    L2199
  movzwl -0x8(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L2199
  mov    $0xa,%eax
  jmp    L1770
L2199:
  movswl -0x8(%rbp),%eax
  lea    -0x3(%rax),%edx
  movswl -0x14(%rbp),%eax
  cmp    %eax,%edx
  jne    L2812
  movzwl -0x8(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L2812
  cmpw   $0x8,-0x8(%rbp)
  jle    L2812
  mov    $0xb,%eax
  jmp    L1770
L2812:
  movswl -0x8(%rbp),%eax
  lea    -0x4(%rax),%edx
  movswl -0x14(%rbp),%eax
  cmp    %eax,%edx
  jne    L2188
  cmpw   $0x8,-0x8(%rbp)
  jle    L2188
  mov    $0xc,%eax
  jmp    L1770
L2188:
  movswl -0x8(%rbp),%eax
  lea    -0x5(%rax),%edx
  movswl -0x14(%rbp),%eax
  cmp    %eax,%edx
  jne    L608
  movzwl -0x8(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L608
  cmpw   $0x8,-0x8(%rbp)
  jle    L608
  mov    $0xd,%eax
  jmp    L1770
L608:
  movswl -0x8(%rbp),%eax
  lea    -0x1(%rax),%edx
  movswl -0x14(%rbp),%eax
  cmp    %eax,%edx
  jne    L99
  movzwl -0x8(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L99
  mov    $0xe,%eax
  jmp    L1770
L99:
  movswl -0x8(%rbp),%eax
  lea    0x3(%rax),%edx
  movswl -0x14(%rbp),%eax
  cmp    %eax,%edx
  jne    L2010
  movzwl -0x8(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L2010
  mov    $0xf,%eax
  jmp    L1770
L2010:
  cmpw   $0x0,-0x8(%rbp)
  je     L853
  cmpw   $0x0,-0x14(%rbp)
  jne    L853
  cmpw   $0x0,-0x18(%rbp)
  jne    L853
  cmpw   $0x0,-0x1c(%rbp)
  jne    L853
  cmpw   $0x0,-0x20(%rbp)
  je     L853
  movswl -0x8(%rbp),%eax
  lea    0x4(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L2758
  mov    $0x8,%eax
  jmp    L1770
L2758:
  movswl -0x8(%rbp),%eax
  lea    0x5(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L633
  movzwl -0x8(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L633
  mov    $0x9,%eax
  jmp    L1770
L633:
  movswl -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L425
  movzwl -0x8(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L425
  mov    $0xa,%eax
  jmp    L1770
L425:
  movswl -0x8(%rbp),%eax
  lea    -0x3(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L392
  movzwl -0x8(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L392
  cmpw   $0x8,-0x8(%rbp)
  jle    L392
  mov    $0xb,%eax
  jmp    L1770
L392:
  movswl -0x8(%rbp),%eax
  lea    -0x4(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L694
  cmpw   $0x8,-0x8(%rbp)
  jle    L694
  mov    $0xc,%eax
  jmp    L1770
L694:
  movswl -0x8(%rbp),%eax
  lea    -0x5(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L2822
  movzwl -0x8(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L2822
  cmpw   $0x8,-0x8(%rbp)
  jle    L2822
  mov    $0xd,%eax
  jmp    L1770
L2822:
  movswl -0x8(%rbp),%eax
  lea    -0x1(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L720
  movzwl -0x8(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L720
  mov    $0xe,%eax
  jmp    L1770
L720:
  movswl -0x8(%rbp),%eax
  lea    0x3(%rax),%edx
  movswl -0x20(%rbp),%eax
  cmp    %eax,%edx
  jne    L853
  movzwl -0x8(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L853
  mov    $0xf,%eax
  jmp    L1770
L853:
  cmpw   $0x0,-0xc(%rbp)
  je     L1079
  cmpw   $0x0,-0x14(%rbp)
  jne    L1079
  cmpw   $0x0,-0x18(%rbp)
  je     L1079
  cmpw   $0x0,-0x1c(%rbp)
  jne    L1079
  cmpw   $0x0,-0x20(%rbp)
  jne    L1079
  movswl -0xc(%rbp),%eax
  lea    0x4(%rax),%edx
  movswl -0x18(%rbp),%eax
  cmp    %eax,%edx
  jne    L172
  mov    $0x10,%eax
  jmp    L1770
L172:
  movswl -0xc(%rbp),%eax
  lea    0x5(%rax),%edx
  movswl -0x18(%rbp),%eax
  cmp    %eax,%edx
  jne    L1120
  movzwl -0xc(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L1120
  mov    $0x11,%eax
  jmp    L1770
L1120:
  movswl -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  movswl -0x18(%rbp),%eax
  cmp    %eax,%edx
  jne    L2103
  movzwl -0xc(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L2103
  mov    $0x12,%eax
  jmp    L1770
L2103:
  movswl -0xc(%rbp),%eax
  lea    -0x3(%rax),%edx
  movswl -0x18(%rbp),%eax
  cmp    %eax,%edx
  jne    L2895
  movzwl -0xc(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L2895
  cmpw   $0x8,-0xc(%rbp)
  jle    L2895
  mov    $0x13,%eax
  jmp    L1770
L2895:
  movswl -0xc(%rbp),%eax
  lea    -0x4(%rax),%edx
  movswl -0x18(%rbp),%eax
  cmp    %eax,%edx
  jne    L1999
  cmpw   $0x8,-0xc(%rbp)
  jle    L1999
  mov    $0x14,%eax
  jmp    L1770
L1999:
  movswl -0xc(%rbp),%eax
  lea    -0x5(%rax),%edx
  movswl -0x18(%rbp),%eax
  cmp    %eax,%edx
  jne    L296
  movzwl -0xc(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L296
  cmpw   $0x8,-0xc(%rbp)
  jle    L296
  mov    $0x15,%eax
  jmp    L1770
L296:
  movswl -0xc(%rbp),%eax
  lea    -0x1(%rax),%edx
  movswl -0x18(%rbp),%eax
  cmp    %eax,%edx
  jne    L2280
  movzwl -0xc(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L2280
  mov    $0x16,%eax
  jmp    L1770
L2280:
  movswl -0xc(%rbp),%eax
  lea    0x3(%rax),%edx
  movswl -0x18(%rbp),%eax
  cmp    %eax,%edx
  jne    L1079
  movzwl -0xc(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L1079
  mov    $0x17,%eax
  jmp    L1770
L1079:
  cmpw   $0x0,-0x10(%rbp)
  je     L1470
  cmpw   $0x0,-0x14(%rbp)
  jne    L1470
  cmpw   $0x0,-0x18(%rbp)
  jne    L1470
  cmpw   $0x0,-0x1c(%rbp)
  je     L1470
  cmpw   $0x0,-0x20(%rbp)
  jne    L1470
  movswl -0x10(%rbp),%eax
  lea    0x4(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L615
  mov    $0x18,%eax
  jmp    L1770
L615:
  movswl -0x10(%rbp),%eax
  lea    0x5(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L2369
  movzwl -0x10(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L2369
  mov    $0x19,%eax
  jmp    L1770
L2369:
  movswl -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L1461
  movzwl -0x10(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L1461
  mov    $0x1a,%eax
  jmp    L1770
L1461:
  movswl -0x10(%rbp),%eax
  lea    -0x3(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L1873
  movzwl -0x10(%rbp),%eax
  and    $0x3,%eax
  test   %ax,%ax
  je     L1873
  cmpw   $0x8,-0x10(%rbp)
  jle    L1873
  mov    $0x1b,%eax
  jmp    L1770
L1873:
  movswl -0x10(%rbp),%eax
  lea    -0x4(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L442
  cmpw   $0x8,-0x10(%rbp)
  jle    L442
  mov    $0x1c,%eax
  jmp    L1770
L442:
  movswl -0x10(%rbp),%eax
  lea    -0x5(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L1603
  movzwl -0x10(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L1603
  cmpw   $0x8,-0x10(%rbp)
  jle    L1603
  mov    $0x1d,%eax
  jmp    L1770
L1603:
  movswl -0x10(%rbp),%eax
  lea    -0x1(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L20
  movzwl -0x10(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L20
  mov    $0x1e,%eax
  jmp    L1770
L20:
  movswl -0x10(%rbp),%eax
  lea    0x3(%rax),%edx
  movswl -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L1470
  movzwl -0x10(%rbp),%eax
  mov    %eax,%edx
  sar    $0xf,%dx
  shr    $0xe,%dx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  cmp    $0x1,%ax
  je     L1470
  mov    $0x1f,%eax
  jmp    L1770
L1470:
  cmpw   $0x11,-0x4(%rbp)
  jne    L2400
  cmpw   $0x15,-0x14(%rbp)
  je     L2400
  cmpw   $0x15,-0x18(%rbp)
  jne    L277
L2400:
  cmpw   $0x12,-0x4(%rbp)
  jne    L1781
  cmpw   $0x16,-0x14(%rbp)
  je     L1781
  cmpw   $0x16,-0x18(%rbp)
  jne    L277
L1781:
  cmpw   $0x13,-0x4(%rbp)
  jne    L1205
  cmpw   $0x17,-0x14(%rbp)
  je     L1205
  cmpw   $0x17,-0x18(%rbp)
  jne    L277
L1205:
  cmpw   $0x14,-0x4(%rbp)
  jne    L1714
  cmpw   $0x18,-0x14(%rbp)
  je     L1714
  cmpw   $0x18,-0x18(%rbp)
  je     L1714
L277:
  mov    $0x0,%eax
  jmp    L1770
L1714:
  cmpw   $0x11,-0x4(%rbp)
  jne    L561
  cmpw   $0x16,-0x14(%rbp)
  je     L561
  cmpw   $0x16,-0x18(%rbp)
  jne    L2583
L561:
  cmpw   $0x12,-0x4(%rbp)
  jne    L3090
  cmpw   $0x17,-0x14(%rbp)
  je     L3090
  cmpw   $0x17,-0x18(%rbp)
  jne    L2583
L3090:
  cmpw   $0x13,-0x4(%rbp)
  jne    L1269
  cmpw   $0x18,-0x14(%rbp)
  je     L1269
  cmpw   $0x18,-0x18(%rbp)
  je     L1269
L2583:
  mov    $0x1,%eax
  jmp    L1770
L1269:
  cmpw   $0x12,-0x4(%rbp)
  jne    L1334
  cmpw   $0x15,-0x14(%rbp)
  je     L1334
  cmpw   $0x15,-0x18(%rbp)
  jne    L2667
L1334:
  cmpw   $0x13,-0x4(%rbp)
  jne    L1517
  cmpw   $0x16,-0x14(%rbp)
  je     L1517
  cmpw   $0x16,-0x18(%rbp)
  jne    L2667
L1517:
  cmpw   $0x14,-0x4(%rbp)
  jne    L1545
  cmpw   $0x17,-0x14(%rbp)
  je     L1545
  cmpw   $0x17,-0x18(%rbp)
  je     L1545
L2667:
  mov    $0x7,%eax
  jmp    L1770
L1545:
  cmpw   $0x11,-0x8(%rbp)
  jne    L2911
  cmpw   $0x15,-0x18(%rbp)
  je     L2911
  cmpw   $0x15,-0x1c(%rbp)
  jne    L1690
L2911:
  cmpw   $0x12,-0x8(%rbp)
  jne    L1498
  cmpw   $0x16,-0x18(%rbp)
  je     L1498
  cmpw   $0x16,-0x1c(%rbp)
  jne    L1690
L1498:
  cmpw   $0x13,-0x8(%rbp)
  jne    L2261
  cmpw   $0x17,-0x18(%rbp)
  je     L2261
  cmpw   $0x17,-0x1c(%rbp)
  jne    L1690
L2261:
  cmpw   $0x14,-0x8(%rbp)
  jne    L1588
  cmpw   $0x18,-0x18(%rbp)
  je     L1588
  cmpw   $0x18,-0x1c(%rbp)
  je     L1588
L1690:
  mov    $0x8,%eax
  jmp    L1770
L1588:
  cmpw   $0x11,-0x8(%rbp)
  jne    L130
  cmpw   $0x16,-0x18(%rbp)
  je     L130
  cmpw   $0x16,-0x1c(%rbp)
  jne    L1745
L130:
  cmpw   $0x12,-0x8(%rbp)
  jne    L2212
  cmpw   $0x17,-0x18(%rbp)
  je     L2212
  cmpw   $0x17,-0x1c(%rbp)
  jne    L1745
L2212:
  cmpw   $0x13,-0x8(%rbp)
  jne    L2527
  cmpw   $0x18,-0x18(%rbp)
  je     L2527
  cmpw   $0x18,-0x1c(%rbp)
  je     L2527
L1745:
  mov    $0x9,%eax
  jmp    L1770
L2527:
  cmpw   $0x12,-0x8(%rbp)
  jne    L684
  cmpw   $0x15,-0x18(%rbp)
  je     L684
  cmpw   $0x15,-0x1c(%rbp)
  jne    L432
L684:
  cmpw   $0x13,-0x8(%rbp)
  jne    L1693
  cmpw   $0x16,-0x18(%rbp)
  je     L1693
  cmpw   $0x16,-0x1c(%rbp)
  jne    L432
L1693:
  cmpw   $0x14,-0x8(%rbp)
  jne    L12
  cmpw   $0x17,-0x18(%rbp)
  je     L12
  cmpw   $0x17,-0x1c(%rbp)
  je     L12
L432:
  mov    $0xf,%eax
  jmp    L1770
L12:
  cmpw   $0x11,-0xc(%rbp)
  jne    L274
  cmpw   $0x15,-0x14(%rbp)
  je     L274
  cmpw   $0x15,-0x1c(%rbp)
  je     L274
  cmpw   $0x15,-0x20(%rbp)
  jne    L2580
L274:
  cmpw   $0x12,-0xc(%rbp)
  jne    L805
  cmpw   $0x16,-0x14(%rbp)
  je     L805
  cmpw   $0x16,-0x1c(%rbp)
  je     L805
  cmpw   $0x16,-0x20(%rbp)
  jne    L2580
L805:
  cmpw   $0x13,-0xc(%rbp)
  jne    L1780
  cmpw   $0x17,-0x14(%rbp)
  je     L1780
  cmpw   $0x17,-0x1c(%rbp)
  je     L1780
  cmpw   $0x17,-0x20(%rbp)
  jne    L2580
L1780:
  cmpw   $0x14,-0xc(%rbp)
  jne    L278
  cmpw   $0x18,-0x14(%rbp)
  je     L278
  cmpw   $0x18,-0x1c(%rbp)
  je     L278
  cmpw   $0x18,-0x20(%rbp)
  je     L278
L2580:
  mov    $0x10,%eax
  jmp    L1770
L278:
  cmpw   $0x11,-0xc(%rbp)
  jne    L44
  cmpw   $0x16,-0x14(%rbp)
  je     L44
  cmpw   $0x16,-0x1c(%rbp)
  je     L44
  cmpw   $0x16,-0x20(%rbp)
  jne    L1492
L44:
  cmpw   $0x12,-0xc(%rbp)
  jne    L34
  cmpw   $0x17,-0x14(%rbp)
  je     L34
  cmpw   $0x17,-0x1c(%rbp)
  je     L34
  cmpw   $0x17,-0x20(%rbp)
  jne    L1492
L34:
  cmpw   $0x13,-0xc(%rbp)
  jne    L2116
  cmpw   $0x18,-0x14(%rbp)
  je     L2116
  cmpw   $0x18,-0x1c(%rbp)
  je     L2116
  cmpw   $0x18,-0x20(%rbp)
  je     L2116
L1492:
  mov    $0x11,%eax
  jmp    L1770
L2116:
  cmpw   $0x12,-0xc(%rbp)
  jne    L670
  cmpw   $0x15,-0x14(%rbp)
  je     L670
  cmpw   $0x15,-0x1c(%rbp)
  je     L670
  cmpw   $0x15,-0x20(%rbp)
  jne    L3092
L670:
  cmpw   $0x13,-0xc(%rbp)
  jne    L45
  cmpw   $0x16,-0x14(%rbp)
  je     L45
  cmpw   $0x16,-0x1c(%rbp)
  je     L45
  cmpw   $0x16,-0x20(%rbp)
  jne    L3092
L45:
  cmpw   $0x14,-0xc(%rbp)
  jne    L1005
  cmpw   $0x17,-0x14(%rbp)
  je     L1005
  cmpw   $0x17,-0x1c(%rbp)
  je     L1005
  cmpw   $0x17,-0x20(%rbp)
  je     L1005
L3092:
  mov    $0x17,%eax
  jmp    L1770
L1005:
  cmpw   $0x11,-0x10(%rbp)
  jne    L669
  cmpw   $0x15,-0x14(%rbp)
  je     L669
  cmpw   $0x15,-0x18(%rbp)
  je     L669
  cmpw   $0x15,-0x20(%rbp)
  jne    L2854
L669:
  cmpw   $0x12,-0x10(%rbp)
  jne    L1689
  cmpw   $0x16,-0x14(%rbp)
  je     L1689
  cmpw   $0x16,-0x18(%rbp)
  je     L1689
  cmpw   $0x16,-0x20(%rbp)
  jne    L2854
L1689:
  cmpw   $0x13,-0x10(%rbp)
  jne    L1578
  cmpw   $0x17,-0x14(%rbp)
  je     L1578
  cmpw   $0x17,-0x18(%rbp)
  je     L1578
  cmpw   $0x17,-0x20(%rbp)
  jne    L2854
L1578:
  cmpw   $0x14,-0x10(%rbp)
  jne    L2441
  cmpw   $0x18,-0x14(%rbp)
  je     L2441
  cmpw   $0x18,-0x18(%rbp)
  je     L2441
  cmpw   $0x18,-0x20(%rbp)
  je     L2441
L2854:
  mov    $0x18,%eax
  jmp    L1770
L2441:
  cmpw   $0x11,-0x10(%rbp)
  jne    L2829
  cmpw   $0x16,-0x14(%rbp)
  je     L2829
  cmpw   $0x16,-0x18(%rbp)
  je     L2829
  cmpw   $0x16,-0x20(%rbp)
  jne    L2145
L2829:
  cmpw   $0x12,-0x10(%rbp)
  jne    L2171
  cmpw   $0x17,-0x14(%rbp)
  je     L2171
  cmpw   $0x17,-0x18(%rbp)
  je     L2171
  cmpw   $0x17,-0x20(%rbp)
  jne    L2145
L2171:
  cmpw   $0x13,-0x10(%rbp)
  jne    L589
  cmpw   $0x18,-0x14(%rbp)
  je     L589
  cmpw   $0x18,-0x18(%rbp)
  je     L589
  cmpw   $0x18,-0x20(%rbp)
  je     L589
L2145:
  mov    $0x19,%eax
  jmp    L1770
L589:
  cmpw   $0x12,-0x10(%rbp)
  jne    L1179
  cmpw   $0x15,-0x14(%rbp)
  je     L1179
  cmpw   $0x15,-0x18(%rbp)
  je     L1179
  cmpw   $0x15,-0x20(%rbp)
  jne    L2861
L1179:
  cmpw   $0x13,-0x10(%rbp)
  jne    L2344
  cmpw   $0x16,-0x14(%rbp)
  je     L2344
  cmpw   $0x16,-0x18(%rbp)
  je     L2344
  cmpw   $0x16,-0x20(%rbp)
  jne    L2861
L2344:
  cmpw   $0x14,-0x10(%rbp)
  jne    L368
  cmpw   $0x17,-0x14(%rbp)
  je     L368
  cmpw   $0x17,-0x18(%rbp)
  je     L368
  cmpw   $0x17,-0x20(%rbp)
  je     L368
L2861:
  mov    $0x1f,%eax
  jmp    L1770
L368:
  mov    $0xffffffff,%eax
L1770:
  pop    %rbp
  ret
```

assistant: ```c
short get_first_winning_move(short a, short b, short c, short d, short e, short f, short g, short h) {
  if (a != 0 && e == 0 && f == 0 && g != 0 && h == 0) {
    if (a + 4 == g)
      return 0;
    if (a + 5 == g && a % 4 != 0)
      return 1;
    if (a + 1 == g && a % 4 != 0)
      return 2;
    if (a - 3 == g && a % 4 != 0 && 8 < a)
      return 3;
    if (a - 4 == g && 8 < a)
      return 4;
    if (a - 5 == g && a % 4 != 1 && 8 < a)
      return 5;
    if (a - 1 == g && a % 4 != 1)
      return 6;
    if (a + 3 == g && a % 4 != 1)
      return 7;
  }
  if (a != 0 && e == 0 && f == 0 && g == 0 && h != 0) {
    if (a + 4 == h)
      return 0;
    if (a + 5 == h && a % 4 != 0)
      return 1;
    if (a + 1 == h && a % 4 != 0)
      return 2;
    if (a - 3 == h && a % 4 != 0 && 8 < a)
      return 3;
    if (a - 4 == h && 8 < a)
      return 4;
    if (a - 5 == h && a % 4 != 1 && 8 < a)
      return 5;
    if (a - 1 == h && a % 4 != 1)
      return 6;
    if (a + 3 == h && a % 4 != 1)
      return 7;
  }
  if (b != 0 && e != 0 && f == 0 && g == 0 && h == 0) {
    if (b + 4 == e)
      return 8;
    if (b + 5 == e && b % 4 != 0)
      return 9;
    if (b + 1 == e && b % 4 != 0)
      return 10;
    if (b - 3 == e && b % 4 != 0 && 8 < b)
      return 11;
    if (b - 4 == e && 8 < b)
      return 12;
    if (b - 5 == e && b % 4 != 1 && 8 < b)
      return 13;
    if (b - 1 == e && b % 4 != 1)
      return 14;
    if (b + 3 == e && b % 4 != 1)
      return 15;
  }
  if (b != 0 && e == 0 && f == 0 && g == 0 && h != 0) {
    if (b + 4 == h)
      return 8;
    if (b + 5 == h && b % 4 != 0)
      return 9;
    if (b + 1 == h && b % 4 != 0)
      return 10;
    if (b - 3 == h && b % 4 != 0 && 8 < b)
      return 11;
    if (b - 4 == h && 8 < b)
      return 12;
    if (b - 5 == h && b % 4 != 1 && 8 < b)
      return 13;
    if (b - 1 == h && b % 4 != 1)
      return 14;
    if (b + 3 == h && b % 4 != 1)
      return 15;
  }
  if (c != 0 && e == 0 && f != 0 && g == 0 && h == 0) {
    if (c + 4 == f)
      return 16;
    if (c + 5 == f && c % 4 != 0)
      return 17;
    if (c + 1 == f && c % 4 != 0)
      return 18;
    if (c - 3 == f && c % 4 != 0 && 8 < c)
      return 19;
    if (c - 4 == f && 8 < c)
      return 20;
    if (c - 5 == f && c % 4 != 1 && 8 < c)
      return 21;
    if (c - 1 == f && c % 4 != 1)
      return 22;
    if (c + 3 == f && c % 4 != 1)
      return 23;
  }
  if (d != 0 && e == 0 && f == 0 && g != 0 && h == 0) {
    if (d + 4 == g)
      return 24;
    if (d + 5 == g && d % 4 != 0)
      return 25;
    if (d + 1 == g && d % 4 != 0)
      return 26;
    if (d - 3 == g && d % 4 != 0 && 8 < d)
      return 27;
    if (d - 4 == g && 8 < d)
      return 28;
    if (d - 5 == g && d % 4 != 1 && 8 < d)
      return 29;
    if (d - 1 == g && d % 4 != 1)
      return 30;
    if (d + 3 == g && d % 4 != 1)
      return 31;
  }
  if ((a == 17 && e != 21 && f != 21) || (a == 18 && e != 22 && f != 22) || (a == 19 && e != 23 && f != 23) || (a == 20 && e != 24 && f != 24))
    return 0;
  if ((a == 17 && e != 22 && f != 22) || (a == 18 && e != 23 && f != 23) || (a == 19 && e != 24 && f != 24))
    return 1;
  if ((a == 18 && e != 21 && f != 21) || (a == 19 && e != 22 && f != 22) || (a == 20 && e != 23 && f != 23))
    return 7;
  if ((b == 17 && f != 21 && g != 21) || (b == 18 && f != 22 && g != 22) || (b == 19 && f != 23 && g != 23) || (b == 20 && f != 24 && g != 24))
    return 8;
  if ((b == 17 && f != 22 && g != 22) || (b == 18 && f != 23 && g != 23) || (b == 19 && f != 24 && g != 24))
    return 9;
  if ((b == 18 && f != 21 && g != 21) || (b == 19 && f != 22 && g != 22) || (b == 20 && f != 23 && g != 23))
    return 15;
  if ((c == 17 && e != 21 && g != 21 && h != 21) || (c == 18 && e != 22 && g != 22 && h != 22) || (c == 19 && e != 23 && g != 23 && h != 23) || (c == 20 && e != 24 && g != 24 && h != 24))
    return 16;
  if ((c == 17 && e != 22 && g != 22 && h != 22) || (c == 18 && e != 23 && g != 23 && h != 23) || (c == 19 && e != 24 && g != 24 && h != 24))
    return 17;
  if ((c == 18 && e != 21 && g != 21 && h != 21) || (c == 19 && e != 22 && g != 22 && h != 22) || (c == 20 && e != 23 && g != 23 && h != 23))
    return 23;
  if ((d == 17 && e != 21 && f != 21 && h != 21) || (d == 18 && e != 22 && f != 22 && h != 22) || (d == 19 && e != 23 && f != 23 && h != 23) || (d == 20 && e != 24 && f != 24 && h != 24))
    return 24;
  if ((d == 17 && e != 22 && f != 22 && h != 22) || (d == 18 && e != 23 && f != 23 && h != 23) || (d == 19 && e != 24 && f != 24 && h != 24))
    return 25;
  if ((d == 18 && e != 21 && f != 21 && h != 21) || (d == 19 && e != 22 && f != 22 && h != 22) || (d == 20 && e != 23 && f != 23 && h != 23))
    return 31;
  return -1;
}
```