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

```asm
<test>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r12d
  mov    %esi,%r13d
  test   %edi,%edi
  jle    L166
  mov    $0x1,%ebx
L53:
  mov    $0x1,%edi
  call   <hash@plt>
  mov    $0x1,%edi
  call   <hash@plt>
  mov    %ebx,%edi
  call   <hash@plt>
  add    $0x1,%ebx
  cmp    %r12d,%ebx
  jle    L53
  mov    $0x1,%ebx
L151:
  mov    $0x1,%edi
  call   <hash@plt>
  mov    $0x2,%edi
  call   <hash@plt>
  mov    %ebx,%edi
  call   <hash@plt>
  add    $0x1,%ebx
  cmp    %ebx,%r12d
  jge    L151
L166:
  mov    $0x3,%ebp
  cmp    $0x3,%r12d
  jg     L32
  cmp    $0x1,%r12d
  jle    L96
  jmp    L17
L165:
  mov    %r14d,%ebp
L32:
  mov    $0x1,%ebx
  cmp    $0x1,%ebp
  jle    L55
L38:
  mov    $0x1,%edi
  call   <hash@plt>
  mov    %ebp,%edi
  call   <hash@plt>
  mov    %ebx,%edi
  call   <hash@plt>
  add    $0x1,%ebx
  cmp    %ebp,%ebx
  jne    L38
L55:
  mov    $0x1,%edi
  call   <hash@plt>
  mov    %ebp,%edi
  call   <hash@plt>
  mov    %ebp,%edi
  call   <hash@plt>
  mov    $0x2,%edi
  call   <hash@plt>
  mov    %ebp,%edi
  call   <hash@plt>
  mov    %ebp,%edi
  call   <hash@plt>
  lea    0x1(%rbp),%r14d
  cmp    %r14d,%r12d
  jl     L165
  mov    %r14d,%ebx
L24:
  mov    $0x1,%edi
  call   <hash@plt>
  mov    %ebp,%edi
  call   <hash@plt>
  mov    %ebx,%edi
  call   <hash@plt>
  add    $0x1,%ebx
  cmp    %ebx,%r12d
  jge    L24
  cmp    %r14d,%r12d
  jne    L165
L17:
  mov    $0x1,%ebx
L44:
  mov    $0x1,%edi
  call   <hash@plt>
  mov    %r12d,%edi
  call   <hash@plt>
  mov    %ebx,%edi
  call   <hash@plt>
  add    $0x1,%ebx
  cmp    %ebx,%r12d
  jg     L44
L96:
  mov    $0x1,%edi
  call   <hash@plt>
  mov    %r12d,%edi
  call   <hash@plt>
  mov    %r12d,%edi
  call   <hash@plt>
  mov    $0x2,%edi
  call   <hash@plt>
  mov    %r12d,%edi
  call   <hash@plt>
  mov    %r12d,%edi
  call   <hash@plt>
  lea    0x1(%r12),%ebp
  mov    %ebp,%r14d
  cmp    %r13d,%ebp
  jle    L137
L134:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L72:
  mov    $0x1,%edi
  call   <hash@plt>
  mov    %ebp,%edi
  call   <hash@plt>
  mov    %ebx,%edi
  call   <hash@plt>
  add    $0x1,%ebx
  cmp    %r14d,%ebx
  jne    L72
L30:
  mov    $0x2,%edi
  call   <hash@plt>
  mov    %ebp,%edi
  call   <hash@plt>
  mov    %ebp,%edi
  call   <hash@plt>
  add    $0x1,%ebp
  cmp    %ebp,%r13d
  jl     L134
L137:
  mov    $0x1,%ebx
  test   %r12d,%r12d
  jg     L72
  jmp    L30
```

assistant: ```c
void test(int M, int N) {
  int i, j;
  for (i = 1; i <= 2; i++) {
    for (j = 1; j <= M; j++) {
      {
        hash(1);
        hash(i);
        hash(j);
      };
    }
  }
  for (i = 3; i <= M - 1; i++) {
    for (j = 1; j <= i - 1; j++) {
      {
        hash(1);
        hash(i);
        hash(j);
      };
    }
    {
      hash(1);
      hash(i);
      hash(i);
    };
    {
      hash(2);
      hash(i);
      hash(i);
    };
    for (j = i + 1; j <= M; j++) {
      {
        hash(1);
        hash(i);
        hash(j);
      };
    }
  }
  for (j = 1; j <= M - 1; j++) {
    {
      hash(1);
      hash(M);
      hash(j);
    };
  }
  {
    hash(1);
    hash(M);
    hash(M);
  };
  {
    hash(2);
    hash(M);
    hash(M);
  };
  for (i = M + 1; i <= N; i++) {
    for (j = 1; j <= M; j++) {
      {
        hash(1);
        hash(i);
        hash(j);
      };
    }
    {
      hash(2);
      hash(i);
      hash(i);
    };
  }
}
```