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

```asm
<checkaddline>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %esi,%ebx
  mov    %edx,%ebp
  movslq %edx,%rax
  lea    (%rax,%rax,8),%r12
  shl    $0x4,%r12
  add    %rdi,%r12
  movslq %esi,%rdx
  movl   $0x1,(%r12,%rdx,4)
  lea    (%rdx,%rdx,8),%r13
  shl    $0x4,%r13
  mov    %rdi,0x8(%rsp)
  lea    (%rdi,%r13,1),%r15
  movl   $0x1,(%r15,%rax,4)
  mov    %esi,%r14d
  sub    %ebp,%r14d
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <min@plt>
  movslq %eax,%rdi
  imul   $0x2aaaaaab,%rdi,%rdi
  shr    $0x20,%rdi
  sar    $0x1f,%eax
  sub    %eax,%edi
  call   <floor@plt>
  lea    0x1(%r14),%eax
  test   $0xfffffffd,%eax
  jne    L290
  mov    $0x0,%edx
  cmp    $0x5,%ebx
  jle    L150
  lea    -0x6(%rbp),%eax
  movslq %eax,%rdx
  mov    0x8(%rsp),%rcx
  lea    (%rcx,%rdx,4),%rcx
  mov    $0x0,%edx
  cmpl   $0x1,-0x360(%r13,%rcx,1)
  je     L44
L150:
  cmp    $0x1d,%ebx
  jg     L131
  lea    0x6(%rbp),%eax
  movslq %eax,%rcx
  mov    0x8(%rsp),%rsi
  lea    (%rsi,%rcx,4),%rcx
  cmpl   $0x1,0x360(%r13,%rcx,1)
  je     L140
L131:
  test   %edx,%edx
  sete   %al
  movzbl %al,%eax
L128:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L44:
  lea    -0x6(%rbx),%ecx
  movslq %ecx,%rcx
  cmpl   $0x1,(%r15,%rcx,4)
  jne    L150
  cltq
  cmpl   $0x1,(%r12,%rax,4)
  jne    L150
  movslq %ebp,%rax
  mov    (%r15,%rax,4),%edx
  cmp    $0x1,%edx
  je     L150
  movslq %ebx,%rax
  cmpl   $0x1,(%r12,%rax,4)
  sete   %dl
  movzbl %dl,%edx
  jmp    L150
L140:
  lea    0x6(%rbx),%ecx
  movslq %ecx,%rcx
  cmpl   $0x1,(%r15,%rcx,4)
  jne    L131
  cltq
  cmpl   $0x1,(%r12,%rax,4)
  jne    L131
  movslq %ebp,%rbp
  mov    $0x0,%eax
  cmpl   $0x1,(%r15,%rbp,4)
  je     L128
  movslq %ebx,%rbx
  cmpl   $0x1,(%r12,%rbx,4)
  jne    L131
  jmp    L128
L290:
  cmp    $0xfffffffa,%r14d
  je     L254
  cmp    $0x6,%r14d
  jne    L128
L254:
  lea    0x5(%rbx),%eax
  mov    $0x0,%edx
  cmp    $0xa,%eax
  jbe    L224
  lea    -0x1(%rbp),%eax
  movslq %eax,%rdx
  mov    0x8(%rsp),%rsi
  lea    (%rsi,%rdx,4),%rcx
  mov    $0x0,%edx
  cmpl   $0x1,-0x90(%r13,%rcx,1)
  je     L179
L224:
  lea    0x6(%rbx),%eax
  cmp    $0xa,%eax
  jbe    L149
  lea    0x1(%rbp),%eax
  movslq %eax,%rcx
  mov    0x8(%rsp),%rsi
  lea    (%rsi,%rcx,4),%rcx
  cmpl   $0x1,0x90(%r13,%rcx,1)
  je     L15
L149:
  test   %edx,%edx
  sete   %al
  movzbl %al,%eax
  jmp    L128
L179:
  lea    -0x1(%rbx),%ecx
  movslq %ecx,%rcx
  cmpl   $0x1,(%r15,%rcx,4)
  jne    L224
  cltq
  cmpl   $0x1,(%r12,%rax,4)
  jne    L224
  movslq %ebp,%rax
  mov    (%r15,%rax,4),%edx
  cmp    $0x1,%edx
  je     L224
  movslq %ebx,%rax
  cmpl   $0x1,(%r12,%rax,4)
  sete   %dl
  movzbl %dl,%edx
  jmp    L224
L15:
  lea    0x1(%rbx),%ecx
  movslq %ecx,%rcx
  cmpl   $0x1,(%r15,%rcx,4)
  jne    L149
  cltq
  cmpl   $0x1,(%r12,%rax,4)
  jne    L149
  movslq %ebp,%rbp
  mov    $0x0,%eax
  cmpl   $0x1,(%r15,%rbp,4)
  je     L128
  movslq %ebx,%rbx
  cmpl   $0x1,(%r12,%rbx,4)
  jne    L149
  jmp    L128
```

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;
    }
  }
}
```