user: Translate the below assembly code into C programming language:

```asm
<checkaddline>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  movl   $0x1,(%rdx,%rax,4)
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  shl    $0x3,%rax
  add    %rcx,%rax
  shl    $0x4,%rax
  mov    %rax,%rcx
  mov    -0x18(%rbp),%rax
  add    %rax,%rcx
  mov    -0x1c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%edx
  mov    -0x20(%rbp),%eax
  cltq
  mov    %edx,(%rcx,%rax,4)
  mov    -0x1c(%rbp),%eax
  sub    -0x20(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <min@plt>
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x2aaaaaab,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,%edi
  call   <floor@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0xffffffff,-0xc(%rbp)
  je     L11
  cmpl   $0x1,-0xc(%rbp)
  jne    L263
L11:
  movl   $0x0,-0x10(%rbp)
  cmpl   $0x5,-0x1c(%rbp)
  jle    L60
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    -0x360(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  sub    $0x6,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L60
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  sub    $0x6,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L60
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  sub    $0x6,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L60
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  je     L120
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L60
L120:
  movl   $0x1,-0x10(%rbp)
L60:
  cmpl   $0x1d,-0x1c(%rbp)
  jg     L91
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x360(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  add    $0x6,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L91
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  add    $0x6,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L91
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  add    $0x6,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L91
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  je     L227
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L91
L227:
  movl   $0x1,-0x10(%rbp)
L91:
  cmpl   $0x0,-0x10(%rbp)
  je     L80
  mov    $0x0,%eax
  jmp    L321
L80:
  mov    $0x1,%eax
  jmp    L321
L263:
  cmpl   $0xfffffffa,-0xc(%rbp)
  je     L204
  cmpl   $0x6,-0xc(%rbp)
  jne    L321
L204:
  movl   $0x0,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  add    $0x5,%eax
  cmp    $0xa,%eax
  jbe    L286
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    -0x90(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L286
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L286
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L286
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  je     L45
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L286
L45:
  movl   $0x1,-0x10(%rbp)
L286:
  mov    -0x1c(%rbp),%eax
  add    $0x6,%eax
  cmp    $0xa,%eax
  jbe    L312
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  add    $0x1,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L312
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  add    $0x1,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L312
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  add    $0x1,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L312
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  je     L242
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  cmp    $0x1,%eax
  jne    L312
L242:
  movl   $0x1,-0x10(%rbp)
L312:
  cmpl   $0x0,-0x10(%rbp)
  je     L67
  mov    $0x0,%eax
  jmp    L321
L67:
  mov    $0x1,%eax
  jmp    L321
L321:
  leave
  ret
```

assistant: ```c
int checkaddline(int madhugrid[36][36], int tempp1, int tempp2) {
  int t, temp, flag, tmp;
  madhugrid[tempp1][tempp2] = madhugrid[tempp2][tempp1] = 1;
  t = tempp1 - tempp2;
  temp = min(tempp1, tempp2);
  tmp = floor(temp / 6);
  if (t == -1 || t == 1) {
    flag = 0;
    if (tempp1 > 5 && madhugrid[tempp1 - 6][tempp2 - 6] == 1 && madhugrid[tempp1][tempp1 - 6] == 1 && madhugrid[tempp2][tempp2 - 6] == 1) {
      if ((madhugrid[tempp1][tempp2] == 1 || madhugrid[tempp2][tempp1] == 1)) {
        flag = 1;
      }
    }
    if (tempp1 < 30 && madhugrid[tempp1 + 6][tempp2 + 6] == 1 && madhugrid[tempp1][tempp1 + 6] == 1 && madhugrid[tempp2][tempp2 + 6] == 1) {
      if ((madhugrid[tempp1][tempp2] == 1 || madhugrid[tempp2][tempp1] == 1)) {
        flag = 1;
      }
    }
    if (flag) {
      return 0;
    } else {
      return 1;
    }
  } else if (t == -6 || t == 6) {
    flag = 0;
    if (tempp1 / 6 != 0 && madhugrid[tempp1 - 1][tempp2 - 1] == 1 && madhugrid[tempp1][tempp1 - 1] == 1 && madhugrid[tempp2][tempp2 - 1] == 1) {
      if ((madhugrid[tempp1][tempp2] == 1 || madhugrid[tempp2][tempp1] == 1)) {
        flag = 1;
      }
    }
    if ((tempp1 + 1) / 6 != 0 && madhugrid[tempp1 + 1][tempp2 + 1] == 1 && madhugrid[tempp1][tempp1 + 1] == 1 && madhugrid[tempp2][tempp2 + 1] == 1) {
      if ((madhugrid[tempp1][tempp2] == 1 || madhugrid[tempp2][tempp1] == 1)) {
        flag = 1;
      }
    }
    if (flag) {
      return 0;
    } else {
      return 1;
    }
  }
}
```