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
  sub    $0x88,%rsp
  mov    %r8,0x20(%rsp)
  mov    (%rsi),%r8d
  mov    %rsi,0x38(%rsp)
  mov    %rdx,0x18(%rsp)
  mov    %rcx,0x8(%rsp)
  mov    %r9,0x28(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  test   %r8d,%r8d
  jle    L119
  mov    0x18(%rsp),%rax
  lea    0x50(%rsp),%rbx
  mov    %rdi,%r14
  movl   $0xffffffff,0x40(%rsp)
  movl   $0x0,0x14(%rsp)
  lea    0x70(%rsp),%r15
  mov    %rbx,0x30(%rsp)
  mov    (%rax),%eax
L69:
  mov    0x14(%rsp),%esi
  mov    %eax,%edx
  mov    $0xffffffff,%r13d
  xor    %ebp,%ebp
  mov    %esi,%ebx
  mov    %esi,0x44(%rsp)
  add    $0x1,%esi
  mov    %esi,0x14(%rsp)
  lea    -0x1(%rbx),%esi
  mov    %esi,0x4c(%rsp)
  test   %eax,%eax
  jle    L220
  nopl   (%rax)
L214:
  mov    0x8(%rsp),%rsi
  mov    %ebp,0x48(%rsp)
  mov    %ebp,%r10d
  add    $0x1,%ebp
  mov    (%rsi),%ecx
  test   %ecx,%ecx
  jle    L143
  test   %ebx,%ebx
  setg   %r12b
  test   %r10d,%r10d
  setg   %al
  xor    %r9d,%r9d
  and    %eax,%r12d
  nopl   0x0(%rax,%rax,1)
L37:
  mov    %edx,%ecx
  mov    %ebx,%edi
  imul   %r8d,%ecx
  sub    $0x1,%r8d
  imul   %edx,%edi
  imul   %r9d,%ecx
  lea    (%rdi,%r10,1),%esi
  add    %ecx,%esi
  movslq %esi,%rsi
  mov    (%r14,%rsi,4),%eax
  test   %r12b,%r12b
  je     L118
  mov    0x40(%rsp),%r11d
  imul   %edx,%r11d
  add    %r13d,%r11d
  add    %ecx,%r11d
  mov    %r11d,0x50(%rsp)
  lea    (%rdi,%r13,1),%r11d
  add    %ecx,%r11d
  cmp    %r8d,%ebx
  jge    L76
L245:
  mov    %r11d,0x54(%rsp)
  mov    0x14(%rsp),%r11d
  imul   %edx,%r11d
  add    %r13d,%r11d
  add    %ecx,%r11d
  mov    %r11d,0x58(%rsp)
  mov    0x44(%rsp),%r11d
  test   %r11d,%r11d
  jne    L26
L219:
  mov    %eax,0x5c(%rsp)
  cmp    %r8d,%ebx
  jge    L202
  mov    0x14(%rsp),%r8d
  mov    %eax,0x64(%rsp)
  imul   %edx,%r8d
  add    %r10d,%r8d
  add    %ecx,%r8d
  mov    %r8d,0x60(%rsp)
  lea    -0x1(%rdx),%r8d
  cmp    %r10d,%r8d
  jle    L0
  add    %ebp,%edi
  add    %ecx,%edi
L157:
  imul   0x14(%rsp),%edx
  add    %ebp,%edx
  add    %ecx,%edx
L166:
  mov    %edx,0x6c(%rsp)
  xor    %r8d,%r8d
  mov    %edi,0x68(%rsp)
  mov    0x30(%rsp),%rdi
  nopl   0x0(%rax,%rax,1)
L130:
  movslq (%rdi),%rdx
  mov    (%r14,%rdx,4),%edx
  sub    %eax,%edx
  mov    %edx,%ecx
  neg    %ecx
  cmovns %ecx,%edx
  cmp    %edx,%r8d
  cmovl  %edx,%r8d
  add    $0x4,%rdi
  cmp    %rdi,%r15
  jne    L130
  mov    0x20(%rsp),%rax
  add    (%rax),%r8d
  mov    $0xff,%eax
  cmp    %eax,%r8d
  cmovg  %eax,%r8d
  mov    0x28(%rsp),%rax
  add    $0x1,%r9d
  mov    %r8d,(%rax,%rsi,4)
  mov    0x8(%rsp),%rax
  cmp    %r9d,(%rax)
  mov    0x18(%rsp),%rax
  jle    L269
  mov    (%rax),%edx
  mov    0x38(%rsp),%rax
  mov    (%rax),%r8d
  jmp    L37
  nopl   0x0(%rax,%rax,1)
L70:
  mov    %eax,0x64(%rsp)
L0:
  mov    %eax,%edi
  mov    %eax,%edx
  jmp    L166
  nopl   (%rax)
L118:
  mov    0x48(%rsp),%r11d
  mov    %eax,0x50(%rsp)
  test   %r11d,%r11d
  jne    L44
  mov    %eax,%r11d
L135:
  mov    %r11d,0x54(%rsp)
  mov    0x44(%rsp),%r11d
  mov    %eax,0x58(%rsp)
  test   %r11d,%r11d
  je     L219
L155:
  mov    0x40(%rsp),%r11d
  imul   %edx,%r11d
  add    %r10d,%r11d
  add    %ecx,%r11d
  mov    %r11d,0x5c(%rsp)
  cmp    %r8d,%ebx
  jl     L55
  mov    %eax,0x60(%rsp)
L1:
  lea    -0x1(%rdx),%r11d
  cmp    %r10d,%r11d
  jle    L70
  mov    0x4c(%rsp),%r11d
  add    %ebp,%edi
  add    %ecx,%edi
  imul   %edx,%r11d
  add    %ebp,%r11d
  add    %ecx,%r11d
  mov    %r11d,0x64(%rsp)
  cmp    %r8d,%ebx
  jl     L157
  mov    %eax,%edx
  jmp    L166
  nopw   0x0(%rax,%rax,1)
L76:
  mov    %r11d,0x54(%rsp)
  mov    %eax,0x58(%rsp)
  jmp    L155
  nopl   0x0(%rax,%rax,1)
L202:
  sub    $0x1,%edx
  mov    %eax,0x60(%rsp)
  mov    %eax,0x64(%rsp)
  cmp    %edx,%r10d
  jge    L0
  add    %ebp,%edi
  mov    %eax,%edx
  add    %ecx,%edi
  jmp    L166
L26:
  mov    0x40(%rsp),%r11d
  imul   %edx,%r11d
  add    %r10d,%r11d
  add    %ecx,%r11d
  mov    %r11d,0x5c(%rsp)
L55:
  mov    0x14(%rsp),%r11d
  imul   %edx,%r11d
  add    %r10d,%r11d
  add    %ecx,%r11d
  mov    %r11d,0x60(%rsp)
  jmp    L1
  nopl   0x0(%rax)
L269:
  mov    0x38(%rsp),%rsi
  mov    (%rax),%eax
  mov    (%rsi),%r8d
  mov    %eax,%edx
L143:
  add    $0x1,%r13d
  cmp    %eax,%ebp
  jl     L214
L220:
  addl   $0x1,0x40(%rsp)
  cmp    %r8d,0x14(%rsp)
  jl     L69
L119:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L44:
  lea    (%rdi,%r13,1),%r11d
  add    %ecx,%r11d
  cmp    %r8d,%ebx
  jge    L135
  jmp    L245
L7:
  call   <__stack_chk_fail@plt>
```

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