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

```asm
<homogeneityEdgeDetection>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    (%rsi),%r10d
  mov    %rsi,-0x18(%rsp)
  mov    %rdx,-0x10(%rsp)
  mov    %rcx,-0x38(%rsp)
  mov    %r8,-0x28(%rsp)
  mov    %r9,-0x20(%rsp)
  test   %r10d,%r10d
  jle    L49
  mov    (%rdx),%r14d
  movl   $0xffffffff,-0x40(%rsp)
  mov    %r10d,%r9d
  movl   $0x0,-0x2c(%rsp)
  mov    %r14d,%r15d
  mov    %rdi,%r14
L168:
  mov    -0x2c(%rsp),%eax
  mov    %eax,-0x4(%rsp)
  mov    %eax,%r13d
  add    $0x1,%eax
  mov    %eax,-0x2c(%rsp)
  test   %r15d,%r15d
  jle    L101
  mov    -0x38(%rsp),%rax
  movl   $0x0,-0x48(%rsp)
  mov    %r9d,%edx
  mov    -0x48(%rsp),%esi
  movl   $0xffffffff,-0x8(%rsp)
  mov    (%rax),%eax
  movl   $0x0,-0x44(%rsp)
  add    $0x1,%esi
  mov    %esi,-0x30(%rsp)
  test   %eax,%eax
  jle    L10
  nop
L142:
  mov    -0x44(%rsp),%r11d
  test   %r13d,%r13d
  setg   %cl
  test   %r11d,%r11d
  setg   %al
  xor    %r12d,%r12d
  and    %eax,%ecx
  mov    %cl,-0x39(%rsp)
  jmp    L227
  nop
L69:
  mov    -0x40(%rsp),%edi
  mov    -0x8(%rsp),%ebx
  imul   %r15d,%edi
  lea    0x0(%rbp,%rbx,1),%r11d
  add    %ecx,%r11d
  add    %ebx,%edi
  add    %ecx,%edi
  cmp    %edx,%r13d
  jge    L104
L87:
  mov    -0x2c(%rsp),%r10d
  mov    -0x4(%rsp),%r9d
  imul   %r15d,%r10d
  add    -0x8(%rsp),%r10d
  add    %ecx,%r10d
  test   %r9d,%r9d
  jne    L184
L16:
  cmp    %edx,%r13d
  jge    L205
  mov    -0x2c(%rsp),%r9d
  lea    -0x1(%r15),%edx
  mov    %eax,%r8d
  imul   %r15d,%r9d
  add    -0x48(%rsp),%r9d
  add    %ecx,%r9d
  cmp    -0x44(%rsp),%edx
  jle    L166
  mov    -0x30(%rsp),%ebx
  lea    0x0(%rbp,%rbx,1),%edx
  mov    %eax,%ebx
  add    %ecx,%edx
L136:
  imul   -0x2c(%rsp),%r15d
  add    -0x30(%rsp),%r15d
  lea    (%r15,%rcx,1),%ebp
L58:
  movslq %edi,%rdi
  movslq %r11d,%r11
  movslq %r10d,%r10
  movslq %r8d,%r8
  mov    (%r14,%rdi,4),%ecx
  mov    (%r14,%r11,4),%r11d
  movslq %r9d,%r9
  movslq %ebx,%rbx
  mov    (%r14,%r10,4),%r10d
  mov    (%r14,%r8,4),%r8d
  movslq %edx,%rdx
  movslq %ebp,%rbp
  sub    %eax,%ecx
  mov    %ecx,%edi
  neg    %edi
  cmovs  %ecx,%edi
  sub    %eax,%r11d
  mov    %r11d,%ecx
  neg    %ecx
  cmovs  %r11d,%ecx
  cmp    %ecx,%edi
  cmovge %edi,%ecx
  sub    %eax,%r10d
  mov    %r10d,%edi
  neg    %edi
  cmovs  %r10d,%edi
  cmp    %edi,%ecx
  cmovge %ecx,%edi
  sub    %eax,%r8d
  mov    %r8d,%ecx
  neg    %ecx
  cmovs  %r8d,%ecx
  mov    (%r14,%r9,4),%r8d
  cmp    %ecx,%edi
  cmovge %edi,%ecx
  sub    %eax,%r8d
  mov    %r8d,%edi
  neg    %edi
  cmovs  %r8d,%edi
  mov    (%r14,%rbx,4),%r8d
  cmp    %edi,%ecx
  cmovge %ecx,%edi
  sub    %eax,%r8d
  mov    %r8d,%ecx
  neg    %ecx
  cmovs  %r8d,%ecx
  cmp    %ecx,%edi
  cmovge %edi,%ecx
  mov    (%r14,%rdx,4),%edi
  sub    %eax,%edi
  mov    %edi,%edx
  neg    %edx
  cmovs  %edi,%edx
  cmp    %edx,%ecx
  cmovge %ecx,%edx
  mov    (%r14,%rbp,4),%ecx
  sub    %eax,%ecx
  mov    %ecx,%eax
  neg    %eax
  cmovs  %ecx,%eax
  cmp    %eax,%edx
  cmovl  %eax,%edx
  mov    -0x28(%rsp),%rax
  add    (%rax),%edx
  mov    $0xff,%eax
  cmp    %eax,%edx
  cmovg  %eax,%edx
  mov    -0x20(%rsp),%rax
  add    $0x1,%r12d
  mov    %edx,(%rax,%rsi,4)
  mov    -0x38(%rsp),%rax
  mov    (%rax),%eax
  cmp    %r12d,%eax
  jle    L215
  mov    -0x10(%rsp),%rax
  mov    (%rax),%r15d
  mov    -0x18(%rsp),%rax
  mov    (%rax),%edx
L227:
  mov    %r15d,%ecx
  mov    %r13d,%ebp
  mov    -0x48(%rsp),%eax
  imul   %edx,%ecx
  sub    $0x1,%edx
  imul   %r15d,%ebp
  imul   %r12d,%ecx
  lea    0x0(%rbp,%rax,1),%esi
  add    %ecx,%esi
  cmp    %edx,%r13d
  movslq %esi,%rsi
  setl   -0x3a(%rsp)
  cmpb   $0x0,-0x39(%rsp)
  mov    (%r14,%rsi,4),%eax
  jne    L69
  mov    -0x44(%rsp),%r10d
  test   %r10d,%r10d
  jne    L29
  mov    %eax,%r11d
L100:
  mov    -0x4(%rsp),%r8d
  mov    %eax,%edi
  mov    %eax,%r10d
  test   %r8d,%r8d
  je     L16
L104:
  mov    -0x40(%rsp),%r8d
  mov    %eax,%r10d
  imul   %r15d,%r8d
  add    -0x48(%rsp),%r8d
  add    %ecx,%r8d
  cmp    %edx,%r13d
  jl     L218
  mov    %eax,%r9d
L45:
  lea    -0x1(%r15),%edx
  cmp    -0x44(%rsp),%edx
  jle    L166
  mov    -0x40(%rsp),%ebx
  mov    -0x30(%rsp),%edx
  imul   %r15d,%ebx
  add    %edx,%ebx
  add    %ebp,%edx
  mov    %eax,%ebp
  add    %ecx,%ebx
  add    %ecx,%edx
  cmpb   $0x0,-0x3a(%rsp)
  jne    L136
  jmp    L58
  nopl   0x0(%rax)
L205:
  sub    $0x1,%r15d
  cmp    %r15d,-0x44(%rsp)
  jl     L179
  mov    %eax,%r9d
  mov    %eax,%r8d
L166:
  mov    %eax,%edx
  mov    %eax,%ebx
  mov    %eax,%ebp
  jmp    L58
L184:
  mov    -0x40(%rsp),%r8d
  imul   %r15d,%r8d
  add    -0x48(%rsp),%r8d
  add    %ecx,%r8d
L218:
  mov    -0x2c(%rsp),%r9d
  imul   %r15d,%r9d
  add    -0x48(%rsp),%r9d
  add    %ecx,%r9d
  jmp    L45
L179:
  mov    -0x30(%rsp),%ebx
  mov    %eax,%r9d
  mov    %eax,%r8d
  lea    0x0(%rbp,%rbx,1),%edx
  mov    %eax,%ebx
  mov    %eax,%ebp
  add    %ecx,%edx
  jmp    L58
  nopl   0x0(%rax)
L215:
  mov    -0x10(%rsp),%rsi
  mov    (%rsi),%r15d
  mov    -0x18(%rsp),%rsi
  mov    (%rsi),%edx
  cmp    -0x30(%rsp),%r15d
  jle    L10
  mov    -0x30(%rsp),%esi
  addl   $0x1,-0x44(%rsp)
  addl   $0x1,-0x8(%rsp)
  mov    %esi,-0x48(%rsp)
  add    $0x1,%esi
  mov    %esi,-0x30(%rsp)
  test   %eax,%eax
  jg     L142
L10:
  mov    %edx,%r9d
L101:
  addl   $0x1,-0x40(%rsp)
  cmp    %r9d,-0x2c(%rsp)
  jl     L168
L49:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L29:
  mov    -0x8(%rsp),%ebx
  lea    0x0(%rbp,%rbx,1),%r11d
  add    %ecx,%r11d
  cmp    %edx,%r13d
  jge    L100
  mov    %eax,%edi
  jmp    L87
```

assistant: ```c
void homogeneityEdgeDetection(int *image, int *width, int *height, int *depth, int *bias, int *ret) {
  int x, y, d, i;
  int max, value;
  for (x = 0; x < *width; x++) {
    for (y = 0; y < *height; y++) {
      for (d = 0; d < *depth; d++) {
        int current = image[((*height) * (x) + (y) + (*width) * (*height) * (d))];
        int n[8];
        n[0] = (x - 1 < 0 || y - 1 < 0) ? current : ((*height) * (x - 1) + (y - 1) + (*width) * (*height) * (d));
        n[1] = (y - 1 < 0) ? current : ((*height) * (x) + (y - 1) + (*width) * (*height) * (d));
        n[2] = (x + 1 > *width - 1 || y - 1 < 0) ? current : ((*height) * (x + 1) + (y - 1) + (*width) * (*height) * (d));
        n[3] = (x - 1 < 0) ? current : ((*height) * (x - 1) + (y) + (*width) * (*height) * (d));
        n[4] = (x + 1 > *width - 1) ? current : ((*height) * (x + 1) + (y) + (*width) * (*height) * (d));
        n[5] = (x - 1 < 0 || y + 1 > *height - 1) ? current : ((*height) * (x - 1) + (y + 1) + (*width) * (*height) * (d));
        n[6] = (y + 1 > *height - 1) ? current : ((*height) * (x) + (y + 1) + (*width) * (*height) * (d));
        n[7] = (x + 1 > *width - 1 || y + 1 > *height - 1) ? current : ((*height) * (x + 1) + (y + 1) + (*width) * (*height) * (d));
        max = 0;
        for (i = 0; i < 8; i++) {
          value = abs(image[n[i]] - current);
          if (value > max) {
            max = value;
          }
        }
        ret[((*height) * (x) + (y) + (*width) * (*height) * (d))] = (max + *bias) >= (255) ? (255) : (max + *bias);
      }
    }
  }
}
```