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

```asm
<bytemapmag>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %rdi,%r15
  mov    %esi,0xa8(%rsp)
  mov    %edx,0xc0(%rsp)
  test   %rdi,%rdi
  je     L912
  mov    %esi,%r13d
  mov    %edx,%esi
  mov    %ecx,%r14d
  test   %r13d,%r13d
  setle  %dl
  test   %esi,%esi
  setle  %al
  or     %al,%dl
  mov    %dl,0x7b(%rsp)
  jne    L247
  mov    %r13d,%edx
  imul   %esi,%r13d
  cmp    $0x186a0,%r13d
  jg     L420
  lea    -0x1(%rcx),%eax
  movq   $0x0,0xa0(%rsp)
  cmp    $0x9,%eax
  ja     L823
  mov    %edx,%r13d
  mov    %edx,%ebx
  imul   %ecx,%ebx
  mov    %ebx,%ebp
  imul   %ecx,%ebp
  imul   %ebp,%esi
  mov    %esi,%edi
  call   <malloc@plt>
  mov    %rax,0x90(%rsp)
  mov    %rax,0xa0(%rsp)
  test   %rax,%rax
  je     L823
  movslq %ebp,%rax
  mov    %rax,0xb8(%rsp)
  movq   $0x0,0xb0(%rsp)
  movl   $0xffffffff,0xac(%rsp)
  movl   $0x0,0x2c(%rsp)
  mov    $0x2,%eax
  sub    %r13d,%eax
  mov    %eax,0xc4(%rsp)
  mov    $0x1,%eax
  sub    %r13d,%eax
  mov    %eax,0xc8(%rsp)
  lea    0x1(%r13),%eax
  mov    %eax,0xcc(%rsp)
  movslq %r14d,%rax
  mov    %rax,0x98(%rsp)
  movslq %ebx,%rax
  mov    %rax,0x68(%rsp)
  jmp    L438
L306:
  mov    %r10d,0x24(%rsp)
  movzbl 0x7b(%rsp),%ebp
  jmp    L734
L22:
  mov    %r12d,%edi
  cmp    $0x1,%r12d
  je     L1021
  cmp    $0x2,%r12d
  jne    L397
  mov    %esi,%r9d
  sub    %ecx,%r9d
  mov    %r9d,%edi
  neg    %edi
  cmovs  %r9d,%edi
  cmp    $0x40,%edi
  jg     L978
  sub    %edx,%esi
  mov    %esi,%edx
  neg    %edx
  cmovs  %esi,%edx
  cmp    $0x40,%edx
  jle    L978
  sub    %eax,%ecx
  mov    %ecx,%eax
  neg    %eax
  cmovs  %ecx,%eax
  cmp    $0x40,%eax
  jle    L978
  mov    0x10(%rsp),%rax
  mov    %r8b,(%rax)
  jmp    L978
L1021:
  mov    %edx,%r9d
  sub    %esi,%r9d
  mov    %r9d,%r8d
  neg    %r8d
  cmovs  %r9d,%r8d
  cmp    $0x40,%r8d
  jg     L1025
  mov    %edx,%r9d
  sub    %eax,%r9d
  mov    %r9d,%r8d
  neg    %r8d
  cmovs  %r9d,%r8d
  cmp    $0x40,%r8d
  jle    L1025
  mov    %esi,%r9d
  sub    %ecx,%r9d
  mov    %r9d,%r8d
  neg    %r8d
  cmovs  %r9d,%r8d
  cmp    $0x40,%r8d
  jle    L1025
  mov    0x10(%rsp),%r9
  mov    %sil,(%r9)
L1025:
  cmp    $0x3,%edi
  jne    L978
  mov    %eax,%r8d
  sub    %edx,%r8d
  mov    %r8d,%edi
  neg    %edi
  cmovs  %r8d,%edi
  cmp    $0x40,%edi
  jg     L978
  sub    %ecx,%eax
  mov    %eax,%ecx
  neg    %ecx
  cmovs  %eax,%ecx
  cmp    $0x40,%ecx
  jle    L978
  mov    %edx,%eax
  sub    %esi,%eax
  mov    %eax,%ecx
  neg    %ecx
  cmovs  %eax,%ecx
  cmp    $0x40,%ecx
  jle    L978
  mov    0x10(%rsp),%rax
  mov    %dl,(%rax)
  jmp    L978
L397:
  cmp    $0x4,%r12d
  jne    L1025
  mov    %ecx,%r8d
  sub    %eax,%r8d
  mov    %r8d,%edi
  neg    %edi
  cmovs  %r8d,%edi
  cmp    $0x40,%edi
  jg     L978
  sub    %esi,%ecx
  mov    %ecx,%esi
  neg    %esi
  cmovs  %ecx,%esi
  cmp    $0x40,%esi
  jle    L978
  sub    %edx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  cmp    $0x40,%edx
  jle    L978
  mov    0x10(%rsp),%rax
  mov    %r9b,(%rax)
  jmp    L978
L407:
  mov    %edx,%ebp
  sub    %esi,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jg     L254
  mov    %edx,%ebp
  sub    %eax,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L254
  mov    %esi,%ebp
  sub    %ecx,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L254
  mov    0x10(%rsp),%rdi
  mov    %dl,(%rdi)
L254:
  cmpl   $0x4,0x28(%rsp)
  jne    L267
  mov    %eax,%ebp
  sub    %edx,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jg     L264
  mov    %eax,%ebp
  sub    %ecx,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L264
  mov    %edx,%ebp
  sub    %esi,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L129
  mov    %r10d,%edi
  sub    0x24(%rsp),%edi
  mov    %edi,%ebp
  neg    %ebp
  cmovs  %edi,%ebp
  cmp    $0x40,%ebp
  jle    L662
L14:
  mov    0x10(%rsp),%rdi
  mov    %dl,(%rdi)
  jmp    L662
L162:
  mov    %esi,%ebp
  sub    %ecx,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L941
L267:
  cmpl   $0x6,0x28(%rsp)
  jne    L304
  mov    %esi,%r9d
  sub    %ecx,%r9d
  mov    %r9d,%edi
  neg    %edi
  cmovs  %r9d,%edi
  cmp    $0x40,%edi
  jg     L472
  mov    %esi,%r9d
  sub    %edx,%r9d
  mov    %r9d,%edi
  neg    %edi
  cmovs  %r9d,%edi
  cmp    $0x40,%edi
  jle    L472
  mov    %ecx,%r9d
  sub    %eax,%r9d
  mov    %r9d,%edi
  neg    %edi
  cmovs  %r9d,%edi
  cmp    $0x40,%edi
  jle    L192
  mov    %r10d,%r9d
  sub    0x50(%rsp),%r9d
  mov    %r9d,%edi
  neg    %edi
  cmovs  %r9d,%edi
  cmp    $0x40,%edi
  jle    L703
L313:
  mov    0x10(%rsp),%rdi
  mov    %r8b,(%rdi)
  jmp    L703
L941:
  mov    %esi,%ebp
  sub    %edx,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L267
  mov    %ecx,%ebp
  sub    %eax,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L267
  mov    %r10d,%edi
  sub    0x24(%rsp),%edi
  mov    %edi,%ebp
  neg    %ebp
  cmovs  %edi,%ebp
  cmp    $0x40,%ebp
  jle    L267
  jmp    L721
L1003:
  cmpl   $0x3,0x28(%rsp)
  jne    L254
  mov    %esi,%ebp
  sub    %ecx,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jg     L304
  mov    %esi,%ebp
  sub    %edx,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L304
  mov    %ecx,%ebp
  sub    %eax,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L304
  mov    0x10(%rsp),%rdi
  mov    %r8b,(%rdi)
L304:
  cmpl   $0x7,0x28(%rsp)
  jne    L662
  mov    %eax,%r8d
  sub    %edx,%r8d
  mov    %r8d,%edi
  neg    %edi
  cmovs  %r8d,%edi
  cmp    $0x40,%edi
  jg     L978
  sub    %ecx,%eax
  mov    %eax,%ecx
  neg    %ecx
  cmovs  %eax,%ecx
  cmp    $0x40,%ecx
  jle    L978
  mov    %edx,%eax
  sub    %esi,%eax
  mov    %eax,%ecx
  neg    %ecx
  cmovs  %eax,%ecx
  cmp    $0x40,%ecx
  jle    L978
  mov    0x10(%rsp),%rax
  mov    %dl,(%rax)
  jmp    L978
L264:
  mov    %edx,%ebp
  sub    %esi,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L129
L662:
  cmpl   $0x8,0x28(%rsp)
  jne    L703
  mov    %ecx,%r8d
  sub    %eax,%r8d
  mov    %r8d,%edi
  neg    %edi
  cmovs  %r8d,%edi
  cmp    $0x40,%edi
  jg     L906
  mov    %ecx,%r8d
  sub    %esi,%r8d
  mov    %r8d,%edi
  neg    %edi
  cmovs  %r8d,%edi
  cmp    $0x40,%edi
  jle    L906
  mov    %eax,%r8d
  sub    %edx,%r8d
  mov    %r8d,%edi
  neg    %edi
  cmovs  %r8d,%edi
  cmp    $0x40,%edi
  jle    L624
  mov    %r10d,%eax
  sub    %r13d,%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  cmp    $0x40,%edx
  jle    L978
L677:
  mov    0x10(%rsp),%rax
  mov    %r9b,(%rax)
  jmp    L978
L129:
  mov    %edx,%ebp
  sub    %eax,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L662
  mov    %esi,%ebp
  sub    %ecx,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L662
  mov    %r10d,%ebp
  sub    %r13d,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L662
  jmp    L14
L472:
  mov    %ecx,%r9d
  sub    %eax,%r9d
  mov    %r9d,%edi
  neg    %edi
  cmovs  %r9d,%edi
  cmp    $0x40,%edi
  jle    L192
L703:
  cmpl   $0x9,0x28(%rsp)
  jne    L978
  mov    %ecx,%r9d
  sub    %eax,%r9d
  mov    %r9d,%edi
  neg    %edi
  cmovs  %r9d,%edi
  cmp    $0x40,%edi
  jg     L978
  sub    %esi,%ecx
  mov    %ecx,%esi
  neg    %esi
  cmovs  %ecx,%esi
  cmp    $0x40,%esi
  jle    L978
  sub    %edx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  cmp    $0x40,%edx
  jle    L978
  mov    0x10(%rsp),%rax
  mov    %r8b,(%rax)
  jmp    L978
L192:
  mov    %ecx,%r9d
  sub    %esi,%r9d
  mov    %r9d,%edi
  neg    %edi
  cmovs  %r9d,%edi
  cmp    $0x40,%edi
  jle    L703
  mov    %eax,%r9d
  sub    %edx,%r9d
  mov    %r9d,%edi
  neg    %edi
  cmovs  %r9d,%edi
  cmp    $0x40,%edi
  jle    L703
  mov    %r10d,%edi
  sub    0x40(%rsp),%edi
  mov    %edi,%r9d
  neg    %r9d
  cmovs  %edi,%r9d
  cmp    $0x40,%r9d
  jle    L703
  jmp    L313
L906:
  mov    %eax,%r8d
  sub    %edx,%r8d
  mov    %r8d,%edi
  neg    %edi
  cmovs  %r8d,%edi
  cmp    $0x40,%edi
  jle    L624
L978:
  add    $0x1,%r15
  add    $0x1,%r12d
  cmp    0x20(%rsp),%r12d
  je     L217
L212:
  mov    %r15,0x10(%rsp)
  movzbl 0x7a(%rsp),%eax
  mov    %al,(%r15)
  mov    %r10d,%edx
  test   %r11d,%r11d
  jle    L565
  mov    0x8(%rsp),%rax
  movzbl (%rax),%edx
L565:
  mov    0x8(%rsp),%rax
  movzbl 0x2(%rax),%r8d
  movzbl %r8b,%ecx
  cmpl   $0x0,0x2c(%rsp)
  jle    L952
  mov    0x30(%rsp),%rbp
  movzbl (%rbx,%rbp,1),%esi
  mov    %r14,%rdi
  movzbl (%rbx,%r14,1),%r9d
  movzbl %r9b,%eax
  test   %r11d,%r11d
  jle    L306
  movzbl -0x1(%rbx,%rbp,1),%ebp
  mov    %ebp,0x24(%rsp)
  mov    $0x1,%ebp
L734:
  mov    0x38(%rsp),%r13
  movzbl (%rbx,%r13,1),%r13d
  mov    %r13d,0x40(%rsp)
L134:
  mov    %r10d,%r13d
  test   %bpl,%bpl
  je     L411
  movzbl -0x1(%rbx,%rdi,1),%ebp
  mov    %ebp,%r13d
L411:
  movzbl 0x1(%rbx,%rdi,1),%edi
  mov    0x1c(%rsp),%ebp
  cmp    $0x2,%ebp
  je     L22
  cmp    $0x3,%ebp
  jne    L978
  movzbl %dil,%edi
  mov    %edi,0x50(%rsp)
  mov    %r12d,0x28(%rsp)
  cmp    $0x1,%r12d
  je     L407
  cmp    $0x2,%r12d
  jne    L1003
  mov    %edx,%ebp
  sub    %esi,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jg     L162
  mov    %edx,%ebp
  sub    %eax,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L162
  mov    %esi,%ebp
  sub    %ecx,%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L941
  mov    %r10d,%ebp
  sub    0x40(%rsp),%ebp
  mov    %ebp,%edi
  neg    %edi
  cmovs  %ebp,%edi
  cmp    $0x40,%edi
  jle    L267
L721:
  mov    0x10(%rsp),%rdi
  mov    %sil,(%rdi)
  jmp    L267
L624:
  sub    %ecx,%eax
  mov    %eax,%ecx
  neg    %ecx
  cmovs  %eax,%ecx
  cmp    $0x40,%ecx
  jle    L978
  sub    %esi,%edx
  mov    %edx,%eax
  neg    %eax
  cmovs  %edx,%eax
  cmp    $0x40,%eax
  jle    L978
  mov    %r10d,%eax
  sub    0x50(%rsp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  cmp    $0x40,%edx
  jle    L978
  jmp    L677
L217:
  addl   $0x1,0x44(%rsp)
  mov    0x44(%rsp),%eax
  mov    0x1c(%rsp),%esi
  add    %esi,0x20(%rsp)
  mov    0x68(%rsp),%rcx
  add    %rcx,0x48(%rsp)
  add    %esi,0x54(%rsp)
  cmp    %eax,%esi
  je     L557
L971:
  mov    0x54(%rsp),%r12d
  mov    0x48(%rsp),%r15
  mov    0x58(%rsp),%rax
  mov    %rax,0x8(%rsp)
  mov    0x60(%rsp),%r14
  jmp    L212
L557:
  mov    %r11d,%ebp
  add    $0x1,%ebp
  addq   $0x1,0x70(%rsp)
  addl   $0x1,0x7c(%rsp)
  addl   $0x1,0x80(%rsp)
  addl   $0x1,0x84(%rsp)
  mov    0x98(%rsp),%rdx
  add    %rdx,0x88(%rsp)
  cmp    %ebp,0xa8(%rsp)
  jle    L730
L487:
  mov    0x70(%rsp),%rax
  mov    %rax,0x58(%rsp)
  movzbl 0x1(%rax),%eax
  mov    %al,0x7a(%rsp)
  movzbl %al,%r13d
  mov    0x1c(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x20(%rsp)
  mov    0x90(%rsp),%rax
  add    0x88(%rsp),%rax
  mov    %rax,0x48(%rsp)
  movl   $0x1,0x54(%rsp)
  movl   $0x0,0x44(%rsp)
  movslq 0x84(%rsp),%rax
  mov    %rax,0x60(%rsp)
  movslq 0x80(%rsp),%rax
  mov    %rax,0x30(%rsp)
  movslq 0x7c(%rsp),%rax
  mov    %rax,0x38(%rsp)
  mov    %ebp,%r11d
  mov    %r13d,%r10d
  jmp    L971
L730:
  mov    %rbx,%r15
  mov    0x1c(%rsp),%r14d
  mov    0xa8(%rsp),%edx
  lea    -0x1(%rdx),%eax
  test   %edx,%edx
  mov    $0x0,%edx
  cmovle %edx,%eax
  mov    0xac(%rsp),%edx
  lea    0x1(%rdx,%rax,1),%eax
  mov    %eax,0xac(%rsp)
  addl   $0x1,0x2c(%rsp)
  mov    0x2c(%rsp),%eax
  mov    0xb8(%rsp),%rbx
  add    %rbx,0xb0(%rsp)
  cmp    %eax,0xc0(%rsp)
  jle    L823
L438:
  mov    0xac(%rsp),%edx
  movslq %edx,%rax
  add    %r15,%rax
  mov    %rax,0x70(%rsp)
  mov    0xc4(%rsp),%eax
  add    %edx,%eax
  mov    %eax,0x7c(%rsp)
  mov    0xc8(%rsp),%eax
  add    %edx,%eax
  mov    %eax,0x80(%rsp)
  mov    0xcc(%rsp),%eax
  add    %edx,%eax
  mov    %eax,0x84(%rsp)
  mov    0xb0(%rsp),%rax
  mov    %rax,0x88(%rsp)
  mov    $0x0,%r13d
  mov    %r13d,%ebp
  mov    %r15,%rbx
  mov    %r14d,0x1c(%rsp)
  jmp    L487
L912:
  mov    %rdi,0xa0(%rsp)
  jmp    L823
L247:
  movq   $0x0,0xa0(%rsp)
L823:
  mov    0xa0(%rsp),%rax
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L420:
  movq   $0x0,0xa0(%rsp)
  jmp    L823
L952:
  mov    %r14,%rdi
  movzbl (%rbx,%r14,1),%r9d
  movzbl %r9b,%eax
  test   %r11d,%r11d
  setg   %bpl
  mov    %r10d,0x24(%rsp)
  mov    %r10d,%esi
  mov    %r10d,0x40(%rsp)
  jmp    L134
```

assistant: ```c
unsigned char *bytemapmag(unsigned char *bytemap, int width, int height, int magstep) {
  unsigned char *magnified = NULL;
  int irow, icol, mrow = 0, mcol = 0;
  int imap = (-1), byteval = 0;
  int isAdvMAME = 1;
  int icell[10], bmmdiff = 64;
  if (bytemap == NULL)
    goto end_of_job;
  if (width < 1 || height < 1)
    goto end_of_job;
  if (width * height > 100000)
    goto end_of_job;
  if (magstep < 1 || magstep > 10)
    goto end_of_job;
  if ((magnified = (unsigned char *)(malloc(magstep * width * magstep * height))) != NULL)
    for (irow = 0; irow < height; irow++)
      for (icol = 0; icol < width; icol++) {
        int imag1 = (icol + irow * (width * magstep)) * magstep;
        imap++;
        byteval = (int)(bytemap[imap]);
        for (mrow = 0; mrow < magstep; mrow++)
          for (mcol = 0; mcol < magstep; mcol++) {
            int idup = mcol + mrow * (width * magstep);
            int imag = imag1 + idup;
            magnified[imag] = (unsigned char)(byteval);
            if (isAdvMAME) {
              int mcell = 1 + mcol + magstep * mrow;
              icell[5] = byteval, icell[4] = (icol > 0 ? (int)(bytemap[imap - 1]) : byteval), icell[6] = (icol < width ? (int)(bytemap[imap + 1]) : byteval), icell[2] = (irow > 0 ? (int)(bytemap[imap - width]) : byteval), icell[8] = (irow < height ? (int)(bytemap[imap + width]) : byteval), icell[1] = (irow > 0 && icol > 0 ? (int)(bytemap[imap - width - 1]) : byteval), icell[3] = (irow > 0 && icol < width ? (int)(bytemap[imap - width + 1]) : byteval), icell[7] = (irow < height && icol > 0 ? (int)(bytemap[imap + width - 1]) : byteval), icell[9] = (irow < height && icol < width ? (int)(bytemap[imap + width + 1]) : byteval);
              switch (magstep) {
              default:
                break;
              case 2:
                if (mcell == 1)
                  if ((((((icell[4] - icell[2])) >= 0 ? ((icell[4] - icell[2])) : (-((icell[4] - icell[2])))) <= bmmdiff)) && !(((((icell[4] - icell[8])) >= 0 ? ((icell[4] - icell[8])) : (-((icell[4] - icell[8])))) <= bmmdiff)) && !(((((icell[2] - icell[6])) >= 0 ? ((icell[2] - icell[6])) : (-((icell[2] - icell[6])))) <= bmmdiff)))
                    magnified[imag] = icell[2];
                if (mcell == 2)
                  if ((((((icell[2] - icell[6])) >= 0 ? ((icell[2] - icell[6])) : (-((icell[2] - icell[6])))) <= bmmdiff)) && !(((((icell[2] - icell[4])) >= 0 ? ((icell[2] - icell[4])) : (-((icell[2] - icell[4])))) <= bmmdiff)) && !(((((icell[6] - icell[8])) >= 0 ? ((icell[6] - icell[8])) : (-((icell[6] - icell[8])))) <= bmmdiff)))
                    magnified[imag] = icell[6];
                if (mcell == 4)
                  if ((((((icell[6] - icell[8])) >= 0 ? ((icell[6] - icell[8])) : (-((icell[6] - icell[8])))) <= bmmdiff)) && !(((((icell[6] - icell[2])) >= 0 ? ((icell[6] - icell[2])) : (-((icell[6] - icell[2])))) <= bmmdiff)) && !(((((icell[8] - icell[4])) >= 0 ? ((icell[8] - icell[4])) : (-((icell[8] - icell[4])))) <= bmmdiff)))
                    magnified[imag] = icell[8];
                if (mcell == 3)
                  if ((((((icell[8] - icell[4])) >= 0 ? ((icell[8] - icell[4])) : (-((icell[8] - icell[4])))) <= bmmdiff)) && !(((((icell[8] - icell[6])) >= 0 ? ((icell[8] - icell[6])) : (-((icell[8] - icell[6])))) <= bmmdiff)) && !(((((icell[4] - icell[2])) >= 0 ? ((icell[4] - icell[2])) : (-((icell[4] - icell[2])))) <= bmmdiff)))
                    magnified[imag] = icell[4];
                break;
              case 3:
                if (mcell == 1)
                  if ((((((icell[4] - icell[2])) >= 0 ? ((icell[4] - icell[2])) : (-((icell[4] - icell[2])))) <= bmmdiff)) && !(((((icell[4] - icell[8])) >= 0 ? ((icell[4] - icell[8])) : (-((icell[4] - icell[8])))) <= bmmdiff)) && !(((((icell[2] - icell[6])) >= 0 ? ((icell[2] - icell[6])) : (-((icell[2] - icell[6])))) <= bmmdiff)))
                    magnified[imag] = icell[4];
                if (mcell == 2)
                  if (((((((icell[4] - icell[2])) >= 0 ? ((icell[4] - icell[2])) : (-((icell[4] - icell[2])))) <= bmmdiff)) && !(((((icell[4] - icell[8])) >= 0 ? ((icell[4] - icell[8])) : (-((icell[4] - icell[8])))) <= bmmdiff)) && !(((((icell[2] - icell[6])) >= 0 ? ((icell[2] - icell[6])) : (-((icell[2] - icell[6])))) <= bmmdiff)) && !(((((icell[5] - icell[3])) >= 0 ? ((icell[5] - icell[3])) : (-((icell[5] - icell[3])))) <= bmmdiff))) || ((((((icell[2] - icell[6])) >= 0 ? ((icell[2] - icell[6])) : (-((icell[2] - icell[6])))) <= bmmdiff)) && !(((((icell[2] - icell[4])) >= 0 ? ((icell[2] - icell[4])) : (-((icell[2] - icell[4])))) <= bmmdiff)) && !(((((icell[6] - icell[8])) >= 0 ? ((icell[6] - icell[8])) : (-((icell[6] - icell[8])))) <= bmmdiff)) && !(((((icell[5] - icell[1])) >= 0 ? ((icell[5] - icell[1])) : (-((icell[5] - icell[1])))) <= bmmdiff))))
                    magnified[imag] = icell[2];
                if (mcell == 3)
                  if ((((((icell[2] - icell[6])) >= 0 ? ((icell[2] - icell[6])) : (-((icell[2] - icell[6])))) <= bmmdiff)) && !(((((icell[2] - icell[4])) >= 0 ? ((icell[2] - icell[4])) : (-((icell[2] - icell[4])))) <= bmmdiff)) && !(((((icell[6] - icell[8])) >= 0 ? ((icell[6] - icell[8])) : (-((icell[6] - icell[8])))) <= bmmdiff)))
                    magnified[imag] = icell[6];
                if (mcell == 4)
                  if (((((((icell[8] - icell[4])) >= 0 ? ((icell[8] - icell[4])) : (-((icell[8] - icell[4])))) <= bmmdiff)) && !(((((icell[8] - icell[6])) >= 0 ? ((icell[8] - icell[6])) : (-((icell[8] - icell[6])))) <= bmmdiff)) && !(((((icell[4] - icell[2])) >= 0 ? ((icell[4] - icell[2])) : (-((icell[4] - icell[2])))) <= bmmdiff)) && !(((((icell[5] - icell[1])) >= 0 ? ((icell[5] - icell[1])) : (-((icell[5] - icell[1])))) <= bmmdiff))) || ((((((icell[4] - icell[2])) >= 0 ? ((icell[4] - icell[2])) : (-((icell[4] - icell[2])))) <= bmmdiff)) && !(((((icell[4] - icell[8])) >= 0 ? ((icell[4] - icell[8])) : (-((icell[4] - icell[8])))) <= bmmdiff)) && !(((((icell[2] - icell[6])) >= 0 ? ((icell[2] - icell[6])) : (-((icell[2] - icell[6])))) <= bmmdiff)) && !(((((icell[5] - icell[7])) >= 0 ? ((icell[5] - icell[7])) : (-((icell[5] - icell[7])))) <= bmmdiff))))
                    magnified[imag] = icell[4];
                if (mcell == 6)
                  if (((((((icell[2] - icell[6])) >= 0 ? ((icell[2] - icell[6])) : (-((icell[2] - icell[6])))) <= bmmdiff)) && !(((((icell[2] - icell[4])) >= 0 ? ((icell[2] - icell[4])) : (-((icell[2] - icell[4])))) <= bmmdiff)) && !(((((icell[6] - icell[8])) >= 0 ? ((icell[6] - icell[8])) : (-((icell[6] - icell[8])))) <= bmmdiff)) && !(((((icell[5] - icell[9])) >= 0 ? ((icell[5] - icell[9])) : (-((icell[5] - icell[9])))) <= bmmdiff))) || ((((((icell[6] - icell[8])) >= 0 ? ((icell[6] - icell[8])) : (-((icell[6] - icell[8])))) <= bmmdiff)) && !(((((icell[6] - icell[2])) >= 0 ? ((icell[6] - icell[2])) : (-((icell[6] - icell[2])))) <= bmmdiff)) && !(((((icell[8] - icell[4])) >= 0 ? ((icell[8] - icell[4])) : (-((icell[8] - icell[4])))) <= bmmdiff)) && !(((((icell[5] - icell[3])) >= 0 ? ((icell[5] - icell[3])) : (-((icell[5] - icell[3])))) <= bmmdiff))))
                    magnified[imag] = icell[6];
                if (mcell == 7)
                  if ((((((icell[8] - icell[4])) >= 0 ? ((icell[8] - icell[4])) : (-((icell[8] - icell[4])))) <= bmmdiff)) && !(((((icell[8] - icell[6])) >= 0 ? ((icell[8] - icell[6])) : (-((icell[8] - icell[6])))) <= bmmdiff)) && !(((((icell[4] - icell[2])) >= 0 ? ((icell[4] - icell[2])) : (-((icell[4] - icell[2])))) <= bmmdiff)))
                    magnified[imag] = icell[4];
                if (mcell == 8)
                  if (((((((icell[6] - icell[8])) >= 0 ? ((icell[6] - icell[8])) : (-((icell[6] - icell[8])))) <= bmmdiff)) && !(((((icell[6] - icell[2])) >= 0 ? ((icell[6] - icell[2])) : (-((icell[6] - icell[2])))) <= bmmdiff)) && !(((((icell[8] - icell[4])) >= 0 ? ((icell[8] - icell[4])) : (-((icell[8] - icell[4])))) <= bmmdiff)) && !(((((icell[5] - icell[7])) >= 0 ? ((icell[5] - icell[7])) : (-((icell[5] - icell[7])))) <= bmmdiff))) || ((((((icell[8] - icell[4])) >= 0 ? ((icell[8] - icell[4])) : (-((icell[8] - icell[4])))) <= bmmdiff)) && !(((((icell[8] - icell[6])) >= 0 ? ((icell[8] - icell[6])) : (-((icell[8] - icell[6])))) <= bmmdiff)) && !(((((icell[4] - icell[2])) >= 0 ? ((icell[4] - icell[2])) : (-((icell[4] - icell[2])))) <= bmmdiff)) && !(((((icell[5] - icell[9])) >= 0 ? ((icell[5] - icell[9])) : (-((icell[5] - icell[9])))) <= bmmdiff))))
                    magnified[imag] = icell[8];
                if (mcell == 9)
                  if ((((((icell[6] - icell[8])) >= 0 ? ((icell[6] - icell[8])) : (-((icell[6] - icell[8])))) <= bmmdiff)) && !(((((icell[6] - icell[2])) >= 0 ? ((icell[6] - icell[2])) : (-((icell[6] - icell[2])))) <= bmmdiff)) && !(((((icell[8] - icell[4])) >= 0 ? ((icell[8] - icell[4])) : (-((icell[8] - icell[4])))) <= bmmdiff)))
                    magnified[imag] = icell[6];
                break;
              }
            }
          }
      }
end_of_job:
  return (magnified);
}
```