user: What is the c source code of the assembly code below?

```asm
<manhattan_distance_erode_1D>:
  endbr64
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  imul   %esi,%ebx
  test   %ebx,%ebx
  je     L35
  mov    %edx,%r10d
  test   %esi,%esi
  je     L29
  cmp    %ebx,%esi
  mov    %ebx,%r9d
  lea    (%rdx,%rsi,1),%r11d
  mov    %rdi,%r8
  cmovbe %esi,%r9d
  xor    %ecx,%ecx
  jmp    L7
  nopw   0x0(%rax,%rax,1)
L101:
  movl   $0x0,(%r8)
L111:
  add    $0x1,%ecx
  add    $0x4,%r8
  cmp    %ecx,%r9d
  jbe    L50
L7:
  mov    (%r8),%edx
  test   %edx,%edx
  jne    L101
  mov    %ecx,%eax
  xor    %edx,%edx
  mov    %r11d,(%r8)
  div    %esi
  test   %edx,%edx
  je     L111
  lea    -0x1(%rcx),%eax
  mov    (%rdi,%rax,4),%eax
  add    $0x1,%eax
  cmp    %r11d,%eax
  cmova  %r11d,%eax
  add    $0x1,%ecx
  add    $0x4,%r8
  mov    %eax,-0x4(%r8)
  cmp    %ecx,%r9d
  ja     L7
L50:
  cmp    %ebx,%ecx
  jb     L100
  nopl   0x0(%rax,%rax,1)
L73:
  cmp    $0x1,%ebx
  jne    L35
  cmp    $0x1,%r10d
  jbe    L59
  mov    %esi,%eax
  mov    (%rdi),%edx
  mov    (%rdi,%rax,4),%eax
  add    $0x1,%eax
  cmp    %edx,%eax
  cmova  %edx,%eax
  mov    %eax,(%rdi)
L59:
  cmp    $0x1,%esi
  ja     L143
L35:
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  ret
  nopl   (%rax)
L29:
  xor    %ecx,%ecx
L100:
  mov    %ecx,%r11d
  lea    (%r10,%rsi,1),%ebp
  sub    %esi,%r11d
  jmp    L70
  cs nopw 0x0(%rax,%rax,1)
L144:
  movl   $0x0,(%r9)
L128:
  add    $0x1,%ecx
  add    $0x1,%r11d
  cmp    %ebx,%ecx
  jae    L73
L70:
  mov    %ecx,%eax
  lea    (%rdi,%rax,4),%r9
  mov    (%r9),%eax
  test   %eax,%eax
  jne    L144
  mov    %r11d,%eax
  mov    %ebp,(%r9)
  mov    (%rdi,%rax,4),%r8d
  mov    %ecx,%eax
  add    $0x1,%r8d
  cmp    %ebp,%r8d
  cmova  %ebp,%r8d
  xor    %edx,%edx
  div    %esi
  mov    %r8d,(%r9)
  test   %edx,%edx
  je     L128
  lea    -0x1(%rcx),%eax
  mov    (%rdi,%rax,4),%eax
  add    $0x1,%eax
  cmp    %r8d,%eax
  cmova  %r8d,%eax
  mov    %eax,(%r9)
  jmp    L128
  cs nopw 0x0(%rax,%rax,1)
L143:
  mov    0x4(%rdi),%eax
  mov    (%rdi),%edx
  pop    %rbx
  pop    %rbp
  add    $0x1,%eax
  cmp    %edx,%eax
  cmova  %edx,%eax
  mov    %eax,(%rdi)
  mov    $0x1,%eax
  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;
}
```