user: Converte this assembly snippet into its equivalent C code:

```asm
<nor_image>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,0x10(%rsp)
  mov    %rcx,(%rsp)
  test   %rcx,%rcx
  jle    L292
  mov    %r8,%r15
  mov    %r8,%rbx
  mov    %r8,%r12
  mov    %edx,%r13d
  and    $0xfffffffffffffff8,%r15
  movd   %r13d,%xmm3
  lea    (%rbx,%rbx,1),%rdx
  shr    $0x3,%r12
  lea    0x1(%r15),%eax
  movslq %r15d,%r14
  punpcklwd %xmm3,%xmm3
  shl    $0x4,%r12
  cltq
  add    %r14,%r14
  pshufd $0x0,%xmm3,%xmm3
  xor    %ebp,%ebp
  mov    %rax,0x18(%rsp)
  lea    (%rax,%rax,1),%rcx
  lea    0x2(%r15),%eax
  cltq
  mov    %rax,0x20(%rsp)
  lea    (%rax,%rax,1),%r8
  lea    0x3(%r15),%eax
  cltq
  mov    %rax,0x28(%rsp)
  lea    (%rax,%rax,1),%r9
  lea    0x4(%r15),%eax
  cltq
  mov    %rax,0x40(%rsp)
  lea    (%rax,%rax,1),%r10
  lea    0x5(%r15),%eax
  cltq
  mov    %rax,0x70(%rsp)
  add    %rax,%rax
  mov    %rax,0x78(%rsp)
  lea    0x6(%r15),%eax
  cltq
  mov    %rax,0x80(%rsp)
  add    %rax,%rax
  mov    %rax,0x88(%rsp)
  mov    %r15,%rax
  mov    %r14,%r15
  mov    %rdx,%r14
  mov    %rax,%rdx
  nopw   0x0(%rax,%rax,1)
L231:
  imul   $0xcccccccd,%ebp,%eax
  mov    %ebp,%esi
  ror    %eax
  cmp    $0x19999999,%eax
  jbe    L31
L302:
  test   %rbx,%rbx
  jle    L257
  mov    0x8(%rsp),%rax
  mov    (%rax,%rbp,8),%rsi
  mov    0x10(%rsp),%rax
  mov    (%rax,%rbp,8),%rax
  lea    0x2(%rsi),%r11
  mov    %rax,%rdi
  sub    %r11,%rdi
  cmp    $0xc,%rdi
  jbe    L310
  lea    -0x1(%rbx),%rdi
  cmp    $0x6,%rdi
  jbe    L310
  movdqa %xmm3,%xmm2
  xor    %edi,%edi
  pxor   %xmm1,%xmm1
  nopl   0x0(%rax)
L312:
  movdqu (%rsi,%rdi,1),%xmm0
  movdqu (%rax,%rdi,1),%xmm4
  por    %xmm4,%xmm0
  pcmpeqw %xmm1,%xmm0
  pand   %xmm2,%xmm0
  movups %xmm0,(%rax,%rdi,1)
  add    $0x10,%rdi
  cmp    %r12,%rdi
  jne    L312
  cmp    %rdx,%rbx
  je     L257
  movzwl (%rsi,%r15,1),%edi
  lea    (%rax,%r15,1),%r11
  test   %di,%di
  jne    L252
  cmpw   $0x0,(%r11)
  cmove  %r13d,%edi
L13:
  mov    %di,(%r11)
  cmp    %rbx,0x18(%rsp)
  jge    L257
  movzwl (%rsi,%rcx,1),%edi
  lea    (%rax,%rcx,1),%r11
  test   %di,%di
  jne    L4
  cmpw   $0x0,(%r11)
  cmove  %r13d,%edi
L116:
  mov    %di,(%r11)
  cmp    0x20(%rsp),%rbx
  jle    L257
  movzwl (%rsi,%r8,1),%edi
  lea    (%rax,%r8,1),%r11
  test   %di,%di
  jne    L242
  cmpw   $0x0,(%r11)
  cmove  %r13d,%edi
L269:
  mov    %di,(%r11)
  cmp    0x28(%rsp),%rbx
  jle    L257
  movzwl (%rsi,%r9,1),%edi
  lea    (%rax,%r9,1),%r11
  test   %di,%di
  jne    L40
  cmpw   $0x0,(%r11)
  cmove  %r13d,%edi
L38:
  mov    %di,(%r11)
  cmp    0x40(%rsp),%rbx
  jle    L257
  movzwl (%rsi,%r10,1),%edi
  lea    (%rax,%r10,1),%r11
  test   %di,%di
  jne    L204
  cmpw   $0x0,(%r11)
  cmove  %r13d,%edi
L247:
  mov    %di,(%r11)
  cmp    0x70(%rsp),%rbx
  jle    L257
  mov    0x78(%rsp),%r11
  movzwl (%rsi,%r11,1),%edi
  add    %rax,%r11
  test   %di,%di
  jne    L284
  cmpw   $0x0,(%r11)
  cmove  %r13d,%edi
L275:
  mov    %di,(%r11)
  cmp    0x80(%rsp),%rbx
  jle    L257
  mov    0x88(%rsp),%rdi
  movzwl (%rsi,%rdi,1),%esi
  add    %rdi,%rax
  test   %si,%si
  je     L99
  xor    %esi,%esi
L71:
  mov    %si,(%rax)
L257:
  add    $0x1,%rbp
  cmp    (%rsp),%rbp
  jne    L231
L292:
  add    $0x98,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L252:
  xor    %edi,%edi
  jmp    L13
  nopw   0x0(%rax,%rax,1)
L4:
  xor    %edi,%edi
  jmp    L116
  nopw   0x0(%rax,%rax,1)
L31:
  lea    D0(%rip),%rdi
  xor    %eax,%eax
  mov    %r10,0x68(%rsp)
  mov    %r9,0x60(%rsp)
  mov    %r8,0x58(%rsp)
  mov    %rdx,0x50(%rsp)
  mov    %rcx,0x48(%rsp)
  movaps %xmm3,0x30(%rsp)
  call   <printf@plt>
  mov    0x68(%rsp),%r10
  mov    0x60(%rsp),%r9
  mov    0x58(%rsp),%r8
  mov    0x50(%rsp),%rdx
  mov    0x48(%rsp),%rcx
  movdqa 0x30(%rsp),%xmm3
  jmp    L302
L242:
  xor    %edi,%edi
  jmp    L269
  nopw   0x0(%rax,%rax,1)
L40:
  xor    %edi,%edi
  jmp    L38
  nopw   0x0(%rax,%rax,1)
L204:
  xor    %edi,%edi
  jmp    L247
  nopw   0x0(%rax,%rax,1)
L284:
  xor    %edi,%edi
  jmp    L275
  nopw   0x0(%rax,%rax,1)
L99:
  cmpw   $0x0,(%rax)
  cmove  %r13d,%esi
  jmp    L71
  nopl   (%rax)
L310:
  xor    %edi,%edi
  jmp    L185
  nopl   0x0(%rax)
L62:
  cmpw   $0x0,(%rax,%rdi,1)
  cmove  %r13d,%r11d
L248:
  mov    %r11w,(%rax,%rdi,1)
  add    $0x2,%rdi
  cmp    %rdi,%r14
  je     L257
L185:
  movzwl (%rsi,%rdi,1),%r11d
  test   %r11w,%r11w
  je     L62
  xor    %r11d,%r11d
  jmp    L248
```

tool_calls: name: unpack_data
arguments: data_label: D0
type: string

tool: D0:  %d

assistant: ```c
int nor_image(the_image, out_image, value, rows, cols)
short **the_image, **out_image, value;
long cols, rows;
{
  int i, j;
  for (i = 0; i < rows; i++) {
    if ((i % 10) == 0)
      printf(" %d", i);
    for (j = 0; j < cols; j++) {
      if (the_image[i][j] == 0 && out_image[i][j] == 0)
        out_image[i][j] = value;
      else
        out_image[i][j] = 0;
    }
  }
  return (1);
}
```