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

```asm
<plotOptimizedEllipse>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %edx,-0x3c(%rbp)
  mov    %ecx,-0x40(%rbp)
  mov    -0x3c(%rbp),%eax
  neg    %eax
  cltq
  mov    %rax,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  mov    -0x40(%rbp),%eax
  cltq
  mov    %rax,-0x8(%rbp)
  mov    -0x30(%rbp),%rax
  add    %rax,%rax
  add    $0x1,%rax
  imul   -0x8(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  imul   %rdx,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x30(%rbp),%rax
  imul   %rax,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
L35:
  mov    -0x28(%rbp),%rax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%ecx
  mov    -0x34(%rbp),%eax
  mov    -0x30(%rbp),%rdx
  sub    %edx,%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <setPixel@plt>
  mov    -0x28(%rbp),%rax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  mov    %eax,%ecx
  mov    -0x34(%rbp),%eax
  add    %ecx,%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <setPixel@plt>
  mov    -0x38(%rbp),%eax
  mov    -0x28(%rbp),%rdx
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  mov    %eax,%ecx
  mov    -0x34(%rbp),%eax
  add    %ecx,%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <setPixel@plt>
  mov    -0x38(%rbp),%eax
  mov    -0x28(%rbp),%rdx
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x34(%rbp),%eax
  mov    -0x30(%rbp),%rdx
  sub    %edx,%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <setPixel@plt>
  mov    -0x10(%rbp),%rax
  add    %rax,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jl     L9
  addq   $0x1,-0x30(%rbp)
  mov    -0x40(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x40(%rbp),%eax
  cltq
  imul   %rdx,%rax
  add    %rax,%rax
  add    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  add    %rax,-0x10(%rbp)
L9:
  mov    -0x8(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jg     L21
  addq   $0x1,-0x28(%rbp)
  mov    -0x3c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  imul   %rdx,%rax
  add    %rax,%rax
  add    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  add    %rax,-0x10(%rbp)
L21:
  cmpq   $0x0,-0x30(%rbp)
  jle    L35
  jmp    L41
L29:
  mov    -0x28(%rbp),%rax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <setPixel@plt>
  mov    -0x38(%rbp),%eax
  mov    -0x28(%rbp),%rdx
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <setPixel@plt>
L41:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    -0x40(%rbp),%edx
  movslq %edx,%rdx
  cmp    %rdx,%rax
  jl     L29
  nop
  nop
  leave
  ret
```

assistant: ```c
void plotOptimizedEllipse(int xm, int ym, int a, int b) {
  long x = -a, y = 0;
  long e2 = b, dx = (1 + 2 * x) * e2 * e2;
  long dy = x * x, err = dx + dy;
  do {
    setPixel(xm - x, ym + y);
    setPixel(xm + x, ym + y);
    setPixel(xm + x, ym - y);
    setPixel(xm - x, ym - y);
    e2 = 2 * err;
    if (e2 >= dx) {
      x++;
      err += dx += 2 * (long)b * b;
    }
    if (e2 <= dy) {
      y++;
      err += dy += 2 * (long)a * a;
    }
  } while (x <= 0);
  while (y++ < b) {
    setPixel(xm, ym + y);
    setPixel(xm, ym - y);
  }
}
```