user: What would the C source look like for the assembly code provided here?

```asm
<imgngbs>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    -0x28(%rbp),%rax
  imul   -0x30(%rbp),%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  movq   $0x0,-0x18(%rbp)
  mov    -0x18(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  add    $0x1,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0x2,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x20(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0xffffffffffffffff,(%rax)
  mov    -0x30(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    -0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  sub    $0x1,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0x2,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x20(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0xffffffffffffffff,(%rax)
  mov    -0x28(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x30(%rbp),%rax
  imul   %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  add    $0x1,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0x2,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x20(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0xffffffffffffffff,(%rax)
  mov    -0x28(%rbp),%rax
  imul   -0x30(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    -0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  sub    $0x1,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0x2,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x20(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0xffffffffffffffff,(%rax)
  movq   $0x1,-0x8(%rbp)
  jmp    L9
L50:
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    -0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  add    $0x1,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x20(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  sub    $0x1,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x28(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0x3,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x30(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0xffffffffffffffff,(%rax)
  addq   $0x1,-0x8(%rbp)
L9:
  mov    -0x30(%rbp),%rax
  sub    $0x1,%rax
  cmp    %rax,-0x8(%rbp)
  jb     L50
  movq   $0x1,-0x8(%rbp)
  jmp    L17
L34:
  mov    -0x28(%rbp),%rax
  sub    $0x1,%rax
  imul   -0x30(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    -0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  add    $0x1,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x20(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  sub    $0x1,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x28(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0x3,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x30(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0xffffffffffffffff,(%rax)
  addq   $0x1,-0x8(%rbp)
L17:
  mov    -0x30(%rbp),%rax
  sub    $0x1,%rax
  cmp    %rax,-0x8(%rbp)
  jb     L34
  movq   $0x1,-0x10(%rbp)
  jmp    L113
L85:
  mov    -0x10(%rbp),%rax
  imul   -0x30(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  add    $0x1,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x20(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x28(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0x3,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x30(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0xffffffffffffffff,(%rax)
  addq   $0x1,-0x10(%rbp)
L113:
  mov    -0x28(%rbp),%rax
  sub    $0x1,%rax
  cmp    %rax,-0x10(%rbp)
  jb     L85
  movq   $0x1,-0x10(%rbp)
  jmp    L62
L108:
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  imul   -0x30(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    -0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    -0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  sub    $0x1,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x20(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x28(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0x3,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x30(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0xffffffffffffffff,(%rax)
  addq   $0x1,-0x10(%rbp)
L62:
  mov    -0x28(%rbp),%rax
  sub    $0x1,%rax
  cmp    %rax,-0x10(%rbp)
  jb     L108
  movq   $0x1,-0x10(%rbp)
  jmp    L97
L42:
  movq   $0x1,-0x8(%rbp)
  jmp    L33
L83:
  mov    -0x10(%rbp),%rax
  imul   -0x30(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    -0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    -0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x20(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    0x1(%rcx),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x28(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  add    $0x1,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x30(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  sub    $0x1,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x38(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x40(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  sub    -0x30(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0x5,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x4,%rax
  lea    0x48(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movq   $0xffffffffffffffff,(%rax)
  addq   $0x1,-0x8(%rbp)
L33:
  mov    -0x30(%rbp),%rax
  sub    $0x1,%rax
  cmp    %rax,-0x8(%rbp)
  jb     L83
  addq   $0x1,-0x10(%rbp)
L97:
  mov    -0x28(%rbp),%rax
  sub    $0x1,%rax
  cmp    %rax,-0x10(%rbp)
  jb     L42
  mov    -0x38(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
  nop
  leave
  ret
```

assistant: ```c
void imgngbs(size_t s0, size_t s1, size_t **ngbs) {
  size_t ind, i, j;
  size_t *n, numngb;
  assert((n = malloc(s0 * s1 * 10 * sizeof *n)) != NULL);
  ind = 0;
  n[ind * 10 + 1] = ind + s1 + 1;
  n[ind * 10 + 2] = ind + 1;
  n[ind * 10 + 3] = ind + s1;
  n[ind * 10] = 2;
  n[ind * 10 + 4] = -1;
  ;
  ind = s1 - 1;
  n[ind * 10 + 1] = ind + s1 - 1;
  n[ind * 10 + 2] = ind - 1;
  n[ind * 10 + 3] = ind + s1;
  n[ind * 10] = 2;
  n[ind * 10 + 4] = -1;
  ;
  ind = (s0 - 1) * s1;
  n[ind * 10 + 1] = ind - s1 + 1;
  n[ind * 10 + 2] = ind + 1;
  n[ind * 10 + 3] = ind - s1;
  n[ind * 10] = 2;
  n[ind * 10 + 4] = -1;
  ;
  ind = s0 * s1 - 1;
  n[ind * 10 + 1] = ind - s1 - 1;
  n[ind * 10 + 2] = ind - 1;
  n[ind * 10 + 3] = ind - s1;
  n[ind * 10] = 2;
  n[ind * 10 + 4] = -1;
  ;
  for (j = 1; j < s1 - 1; j++) {
    ind = j;
    n[ind * 10 + 1] = ind + s1 + 1;
    n[ind * 10 + 2] = ind + s1 - 1;
    n[ind * 10 + 3] = ind + 1;
    n[ind * 10 + 4] = ind - 1;
    n[ind * 10 + 5] = ind + s1;
    n[ind * 10] = 3;
    n[ind * 10 + 6] = -1;
    ;
  }
  for (j = 1; j < s1 - 1; j++) {
    ind = (s0 - 1) * s1 + j;
    n[ind * 10 + 1] = ind - s1 + 1;
    n[ind * 10 + 2] = ind - s1 - 1;
    n[ind * 10 + 3] = ind + 1;
    n[ind * 10 + 4] = ind - 1;
    n[ind * 10 + 5] = ind - s1;
    n[ind * 10] = 3;
    n[ind * 10 + 6] = -1;
    ;
  }
  for (i = 1; i < s0 - 1; i++) {
    ind = i * s1;
    n[ind * 10 + 1] = ind - s1 + 1;
    n[ind * 10 + 2] = ind + s1 + 1;
    n[ind * 10 + 3] = ind + 1;
    n[ind * 10 + 4] = ind + s1;
    n[ind * 10 + 5] = ind - s1;
    n[ind * 10] = 3;
    n[ind * 10 + 6] = -1;
    ;
  }
  for (i = 1; i < s0 - 1; i++) {
    ind = (i + 1) * s1 - 1;
    n[ind * 10 + 1] = ind - s1 - 1;
    n[ind * 10 + 2] = ind + s1 - 1;
    n[ind * 10 + 3] = ind - 1;
    n[ind * 10 + 4] = ind + s1;
    n[ind * 10 + 5] = ind - s1;
    n[ind * 10] = 3;
    n[ind * 10 + 6] = -1;
    ;
  }
  for (i = 1; i < s0 - 1; i++)
    for (j = 1; j < s1 - 1; j++) {
      ind = i * s1 + j;
      n[ind * 10 + 1] = ind - s1 - 1;
      n[ind * 10 + 2] = ind - s1 + 1;
      n[ind * 10 + 3] = ind + s1 - 1;
      n[ind * 10 + 4] = ind + s1 + 1;
      n[ind * 10 + 5] = ind + 1;
      n[ind * 10 + 6] = ind - 1;
      n[ind * 10 + 7] = ind + s1;
      n[ind * 10 + 8] = ind - s1;
      n[ind * 10] = 5;
      n[ind * 10 + 9] = -1;
    }
  if (0) {
    for (i = 0; i < s0; i++)
      for (j = 0; j < s1; j++) {
        printf("%lu: ", i * s1 + j);
        numngb = n[(i * s1 + j) * 10];
        ;
        do
          printf("%lu, ", n[(i * s1 + j) * 10 + numngb]);
        while (n[(i * s1 + j) * 10 + ++numngb] != (size_t)(-1));
        printf("\b\b.\n");
      }
  }
  *ngbs = n;
}
```