user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<manhattan_distance_erode_1D>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  movl   $0x0,-0x4(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L36
L78:
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L51
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  jmp    L21
L51:
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,(%rax)
  mov    -0x1c(%rbp),%eax
  cmp    %eax,-0x4(%rbp)
  jb     L50
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x1c(%rbp),%ecx
  mov    -0x4(%rbp),%edx
  sub    %ecx,%edx
  mov    %edx,%edx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  add    $0x1,%edx
  mov    -0x4(%rbp),%ecx
  lea    0x0(,%rcx,4),%rsi
  mov    -0x18(%rbp),%rcx
  add    %rsi,%rcx
  cmp    %edx,%eax
  cmova  %edx,%eax
  mov    %eax,(%rcx)
L50:
  mov    -0x1c(%rbp),%ecx
  mov    -0x4(%rbp),%eax
  mov    $0x0,%edx
  div    %ecx
  mov    %edx,%eax
  test   %eax,%eax
  je     L21
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x4(%rbp),%edx
  sub    $0x1,%edx
  mov    %edx,%edx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  add    $0x1,%edx
  mov    -0x4(%rbp),%ecx
  lea    0x0(,%rcx,4),%rsi
  mov    -0x18(%rbp),%rcx
  add    %rsi,%rcx
  cmp    %edx,%eax
  cmova  %edx,%eax
  mov    %eax,(%rcx)
L21:
  addl   $0x1,-0x4(%rbp)
L36:
  mov    -0x20(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  cmp    %eax,-0x4(%rbp)
  jb     L78
  mov    -0x20(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  jmp    L23
L97:
  mov    -0x1c(%rbp),%edi
  mov    -0x4(%rbp),%eax
  mov    $0x0,%edx
  div    %edi
  lea    0x1(%rax),%edx
  mov    -0x20(%rbp),%eax
  cmp    %eax,%edx
  jae    L37
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x1c(%rbp),%ecx
  mov    -0x4(%rbp),%edx
  add    %ecx,%edx
  mov    %edx,%edx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  add    $0x1,%edx
  mov    -0x4(%rbp),%ecx
  lea    0x0(,%rcx,4),%rsi
  mov    -0x18(%rbp),%rcx
  add    %rsi,%rcx
  cmp    %edx,%eax
  cmova  %edx,%eax
  mov    %eax,(%rcx)
L37:
  mov    -0x1c(%rbp),%ecx
  mov    -0x4(%rbp),%eax
  mov    $0x0,%edx
  div    %ecx
  mov    %edx,%eax
  lea    0x1(%rax),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jae    L90
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x4(%rbp),%edx
  add    $0x1,%edx
  mov    %edx,%edx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  add    $0x1,%edx
  mov    -0x4(%rbp),%ecx
  lea    0x0(,%rcx,4),%rsi
  mov    -0x18(%rbp),%rcx
  add    %rsi,%rcx
  cmp    %edx,%eax
  cmova  %edx,%eax
  mov    %eax,(%rcx)
L90:
  subl   $0x1,-0x4(%rbp)
L23:
  cmpl   $0x0,-0x4(%rbp)
  je     L97
  mov    $0x1,%eax
  pop    %rbp
  ret
```

assistant: ```c
int manhattan_distance_erode_1D(unsigned int *image_data_uint, int width, int height) {
  unsigned int idx = 0;
  for (idx = 0; idx < (height * width); idx++) {
    if (image_data_uint[idx])
      image_data_uint[idx] = 0;
    else {
      image_data_uint[idx] = height + width;
      if ((idx / width) > 0)
        image_data_uint[idx] = ((image_data_uint[idx]) <= (image_data_uint[idx - width] + 1) ? (image_data_uint[idx]) : (image_data_uint[idx - width] + 1));
      if ((idx % width) > 0)
        image_data_uint[idx] = ((image_data_uint[idx]) <= (image_data_uint[idx - 1] + 1) ? (image_data_uint[idx]) : (image_data_uint[idx - 1] + 1));
    }
  }
  for (idx = (height * width) - 1; idx <= 0; idx--) {
    if ((idx / width) + 1 < height)
      image_data_uint[idx] = ((image_data_uint[idx]) <= (image_data_uint[idx + width] + 1) ? (image_data_uint[idx]) : (image_data_uint[idx + width] + 1));
    if ((idx % width) + 1 < width)
      image_data_uint[idx] = ((image_data_uint[idx]) <= (image_data_uint[idx + 1] + 1) ? (image_data_uint[idx]) : (image_data_uint[idx + 1] + 1));
  }
  return 1;
}
```