user: 请将以下的汇编代码转换成C语言代码：

```asm
<alcon2009_draw_rectangle>:
  endbr64
  push   %r15
  mov    %rdi,%rax
  mov    %edx,%r11d
  mov    %esi,%edi
  push   %r14
  mov    %ecx,%r10d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x38(%rsp),%r15d
  movzbl 0x40(%rsp),%edx
  movzbl 0x48(%rsp),%ecx
  movzbl 0x50(%rsp),%esi
  mov    %r9d,-0x20(%rsp)
  cmp    %r15d,%r8d
  jg     L171
  mov    %r9d,%r14d
  mov    %r8d,%r9d
  lea    -0x2(%r10),%r13d
  not    %r9d
  lea    0x1(%r14),%ebp
  shr    $0x1f,%r9d
  cmp    %r11d,%r8d
  setl   %r12b
  and    %r9d,%r12d
  mov    %r10d,%r9d
  not    %r9d
  shr    $0x1f,%r9d
  cmp    %edi,%r10d
  setl   %bl
  and    %r9d,%ebx
  mov    %r14d,%r9d
  not    %r9d
  mov    %bl,-0x18(%rsp)
  shr    $0x1f,%r9d
  cmp    %edi,%r14d
  setl   %bl
  and    %r9d,%ebx
  mov    %r10d,%r9d
  neg    %r9d
  mov    %bl,-0x14(%rsp)
  lea    -0x1(%r10),%ebx
  shr    $0x1f,%r9d
  cmp    %ebx,%edi
  setg   %bl
  and    %r9d,%ebx
  mov    %ebp,%r9d
  not    %r9d
  mov    %bl,-0x10(%rsp)
  shr    $0x1f,%r9d
  cmp    %edi,%ebp
  setl   %bl
  and    %r9d,%ebx
  mov    %r13d,%r9d
  not    %r9d
  mov    %bl,-0xc(%rsp)
  lea    0x2(%r14),%ebx
  shr    $0x1f,%r9d
  cmp    %edi,%r13d
  setl   %r13b
  and    %r9d,%r13d
  mov    %ebx,%r9d
  not    %r9d
  mov    %r13b,-0x25(%rsp)
  shr    $0x1f,%r9d
  cmp    %ebx,%edi
  setg   %bl
  add    $0x3,%r14d
  and    %r9d,%ebx
  mov    %r14d,-0x1c(%rsp)
  mov    %bl,-0x28(%rsp)
  lea    -0x3(%r10),%ebx
  mov    %ebx,%r9d
  mov    %ebx,-0x24(%rsp)
  not    %r9d
  shr    $0x1f,%r9d
  cmp    %edi,%ebx
  setl   %bl
  and    %r9d,%ebx
  mov    %r14d,%r9d
  not    %r9d
  mov    %bl,-0x27(%rsp)
  shr    $0x1f,%r9d
  cmp    %r14d,%edi
  setg   %bl
  and    %r9d,%ebx
  mov    %bl,-0x26(%rsp)
  cmp    $0x1,%edi
  jne    L299
  mov    -0x20(%rsp),%ebx
  add    %r15d,%ebp
  mov    %edi,-0x8(%rsp)
  mov    %r15d,0x38(%rsp)
  movzbl -0x18(%rsp),%edi
  lea    0x0(%rbp,%rbp,2),%r14d
  lea    (%rbx,%r8,1),%r9d
  mov    %r11d,-0x18(%rsp)
  lea    (%r10,%r8,1),%ebx
  movzbl -0xc(%rsp),%r11d
  movzbl -0x25(%rsp),%r15d
  mov    %r10d,-0xc(%rsp)
  lea    (%r9,%r9,2),%r9d
  lea    (%rbx,%rbx,2),%ebx
  movzbl -0x10(%rsp),%r10d
  mov    %r8d,-0x10(%rsp)
  movzbl -0x14(%rsp),%r8d
  nopw   0x0(%rax,%rax,1)
L338:
  lea    0x3(%r9),%ebp
  test   %r12b,%r12b
  je     L233
  test   %dil,%dil
  je     L78
  movslq %ebx,%rbp
  mov    %dl,(%rax,%rbp,1)
  mov    %cl,0x1(%rax,%rbp,1)
  mov    %sil,0x2(%rax,%rbp,1)
L78:
  test   %r8b,%r8b
  je     L23
  movslq %r9d,%rbp
  mov    %dl,(%rax,%rbp,1)
  mov    %cl,0x1(%rax,%rbp,1)
  mov    %sil,0x2(%rax,%rbp,1)
L23:
  test   %r10b,%r10b
  je     L202
  lea    -0x3(%rbx),%ebp
  movslq %ebp,%rbp
  mov    %dl,(%rax,%rbp,1)
  mov    %cl,0x1(%rax,%rbp,1)
  mov    %sil,0x2(%rax,%rbp,1)
L202:
  lea    0x3(%r9),%ebp
  test   %r11b,%r11b
  je     L207
  movslq %ebp,%r13
  mov    %dl,(%rax,%r13,1)
  mov    %cl,0x1(%rax,%r13,1)
  mov    %sil,0x2(%rax,%r13,1)
L207:
  test   %r15b,%r15b
  je     L21
  lea    -0x6(%rbx),%r13d
  movslq %r13d,%r13
  mov    %dl,(%rax,%r13,1)
  mov    %cl,0x1(%rax,%r13,1)
  mov    %sil,0x2(%rax,%r13,1)
L21:
  cmpb   $0x0,-0x28(%rsp)
  je     L311
  lea    0x6(%r9),%r13d
  movslq %r13d,%r13
  mov    %dl,(%rax,%r13,1)
  mov    %cl,0x1(%rax,%r13,1)
  mov    %sil,0x2(%rax,%r13,1)
L311:
  cmpb   $0x0,-0x27(%rsp)
  je     L248
  lea    -0x9(%rbx),%r13d
  movslq %r13d,%r13
  mov    %dl,(%rax,%r13,1)
  mov    %cl,0x1(%rax,%r13,1)
  mov    %sil,0x2(%rax,%r13,1)
L248:
  cmpb   $0x0,-0x26(%rsp)
  je     L233
  add    $0x9,%r9d
  movslq %r9d,%r9
  mov    %dl,(%rax,%r9,1)
  mov    %cl,0x1(%rax,%r9,1)
  mov    %sil,0x2(%rax,%r9,1)
L233:
  mov    %ebp,%r9d
  add    $0x3,%ebx
  cmp    %r14d,%ebp
  jne    L338
  mov    -0x8(%rsp),%edi
  mov    -0x18(%rsp),%r11d
  mov    -0xc(%rsp),%r10d
  mov    -0x10(%rsp),%r8d
  mov    0x38(%rsp),%r15d
L285:
  mov    -0x24(%rsp),%r14d
  cmp    %r14d,-0x1c(%rsp)
  jl     L81
  mov    %r10d,%ebx
  mov    %r8d,%r13d
  lea    -0x1(%r8),%r14d
  mov    %r15d,%r12d
  not    %ebx
  shr    $0x1f,%ebx
  cmp    %edi,%r10d
  setl   %r9b
  and    %ebx,%r9d
  mov    %r8d,%ebx
  not    %ebx
  mov    %r9b,-0x10(%rsp)
  shr    $0x1f,%ebx
  cmp    %r11d,%r8d
  setl   %bpl
  imul   %edi,%r13d
  and    %ebx,%ebp
  mov    %r15d,%ebx
  not    %ebx
  mov    %bpl,-0x28(%rsp)
  shr    $0x1f,%ebx
  cmp    %r11d,%r15d
  setl   %bpl
  imul   %edi,%r12d
  and    %ebx,%ebp
  mov    %r8d,%ebx
  neg    %ebx
  mov    %bpl,-0x27(%rsp)
  lea    0x1(%r15),%ebp
  shr    $0x1f,%ebx
  cmp    %r14d,%r11d
  setg   %r14b
  and    %ebx,%r14d
  mov    %r13d,%ebx
  sub    %edi,%ebx
  mov    %r14b,-0x26(%rsp)
  lea    -0x2(%r8),%r14d
  mov    %ebx,%r9d
  mov    %ebp,%ebx
  not    %ebx
  shr    $0x1f,%ebx
  cmp    %ebp,%r11d
  setg   %bpl
  and    %ebx,%ebp
  mov    %r14d,%ebx
  not    %ebx
  mov    %bpl,-0x25(%rsp)
  lea    0x2(%r15),%ebp
  shr    $0x1f,%ebx
  cmp    %r14d,%r11d
  setg   %r14b
  and    %ebx,%r14d
  mov    %ebp,%ebx
  mov    %r14b,-0x24(%rsp)
  not    %ebx
  mov    %r9d,%r14d
  sub    %edi,%r14d
  shr    $0x1f,%ebx
  cmp    %ebp,%r11d
  setg   %bpl
  sub    $0x3,%r8d
  mov    %r14d,-0x14(%rsp)
  lea    0x3(%r15),%r14d
  mov    %r8d,%r15d
  and    %ebx,%ebp
  lea    (%r12,%rdi,2),%ebx
  not    %r15d
  shr    $0x1f,%r15d
  cmp    %r8d,%r11d
  setg   %r8b
  and    %r15d,%r8d
  mov    %r14d,%r15d
  not    %r15d
  shr    $0x1f,%r15d
  cmp    %r14d,%r11d
  setg   %r11b
  sub    %ebx,%r12d
  add    %ebx,%r10d
  sub    %ebx,%r13d
  and    %r15d,%r11d
  mov    -0x20(%rsp),%r15d
  lea    -0x9(%r10,%r10,2),%r10d
  lea    0x0(%r13,%r13,2),%r13d
  add    %ebx,%r15d
  lea    0xc(%r15,%r15,2),%r14d
  lea    (%r12,%r12,2),%r15d
  mov    %r9d,%r12d
  sub    %ebx,%r12d
  lea    (%r12,%r12,2),%r9d
  lea    0x0(,%rdi,4),%r12d
  mov    %r9d,-0x20(%rsp)
  mov    %edi,%r9d
  sub    %r12d,%r9d
  mov    -0x14(%rsp),%r12d
  mov    %r9d,-0x1c(%rsp)
  sub    %ebx,%r12d
  lea    (%r12,%r12,2),%r9d
  mov    -0x14(%rsp),%r12d
  mov    %r9d,-0x18(%rsp)
  movzbl -0x10(%rsp),%r9d
  sub    %edi,%r12d
  sub    %ebx,%r12d
  lea    (%r12,%r12,2),%ebx
  lea    (%rdi,%rdi,2),%r12d
  xchg   %ax,%ax
L54:
  test   %r9b,%r9b
  je     L102
  cmpb   $0x0,-0x28(%rsp)
  je     L229
  lea    0x0(%r13,%r10,1),%edi
  movslq %edi,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L229:
  cmpb   $0x0,-0x27(%rsp)
  je     L256
  lea    (%r15,%r10,1),%edi
  movslq %edi,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L256:
  cmpb   $0x0,-0x26(%rsp)
  je     L46
  mov    -0x20(%rsp),%edi
  add    %r10d,%edi
  movslq %edi,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L46:
  cmpb   $0x0,-0x25(%rsp)
  je     L252
  mov    -0x1c(%rsp),%edi
  add    %r10d,%edi
  movslq %edi,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L252:
  cmpb   $0x0,-0x24(%rsp)
  je     L279
  mov    -0x18(%rsp),%edi
  add    %r10d,%edi
  movslq %edi,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L279:
  test   %bpl,%bpl
  je     L101
  movslq %r10d,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L101:
  test   %r8b,%r8b
  je     L213
  lea    (%rbx,%r10,1),%edi
  movslq %edi,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L213:
  test   %r11b,%r11b
  je     L102
  lea    (%r12,%r10,1),%edi
  movslq %edi,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L102:
  add    $0x3,%r10d
  cmp    %r10d,%r14d
  jne    L54
L81:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L299:
  mov    %r8d,%r9d
  mov    -0x20(%rsp),%ebx
  mov    %edi,-0x8(%rsp)
  lea    0x1(%r15),%r13d
  imul   %edi,%r9d
  mov    %r11d,-0x4(%rsp)
  movzbl -0x10(%rsp),%r11d
  lea    (%rdi,%rdi,2),%r14d
  mov    %r10d,-0x10(%rsp)
  mov    %r15d,0x38(%rsp)
  movzbl -0xc(%rsp),%r15d
  add    %r9d,%ebx
  add    %r10d,%r9d
  movzbl -0x14(%rsp),%r10d
  mov    %r8d,-0x14(%rsp)
  lea    (%rbx,%rbx,2),%ebp
  lea    (%r9,%r9,2),%ebx
  mov    %r8d,%r9d
  movzbl -0x18(%rsp),%r8d
  nopl   0x0(%rax)
L320:
  test   %r12b,%r12b
  je     L267
  test   %r8b,%r8b
  je     L168
  movslq %ebx,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L168:
  test   %r10b,%r10b
  je     L174
  movslq %ebp,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L174:
  test   %r11b,%r11b
  je     L313
  lea    -0x3(%rbx),%edi
  movslq %edi,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L313:
  test   %r15b,%r15b
  je     L24
  lea    0x3(%rbp),%edi
  movslq %edi,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L24:
  cmpb   $0x0,-0x25(%rsp)
  je     L52
  lea    -0x6(%rbx),%edi
  movslq %edi,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L52:
  cmpb   $0x0,-0x28(%rsp)
  je     L90
  lea    0x6(%rbp),%edi
  movslq %edi,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L90:
  cmpb   $0x0,-0x27(%rsp)
  je     L346
  lea    -0x9(%rbx),%edi
  movslq %edi,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L346:
  cmpb   $0x0,-0x26(%rsp)
  je     L267
  lea    0x9(%rbp),%edi
  movslq %edi,%rdi
  mov    %dl,(%rax,%rdi,1)
  mov    %cl,0x1(%rax,%rdi,1)
  mov    %sil,0x2(%rax,%rdi,1)
L267:
  add    $0x1,%r9d
  add    %r14d,%ebp
  add    %r14d,%ebx
  cmp    %r13d,%r9d
  jne    L320
  mov    -0x8(%rsp),%edi
  mov    -0x4(%rsp),%r11d
  mov    -0x10(%rsp),%r10d
  mov    -0x14(%rsp),%r8d
  mov    0x38(%rsp),%r15d
  jmp    L285
L171:
  mov    %r9d,%ebx
  add    $0x3,%ebx
  mov    %ebx,-0x1c(%rsp)
  lea    -0x3(%r10),%ebx
  mov    %ebx,-0x24(%rsp)
  jmp    L285
```

assistant: ```c
void alcon2009_draw_rectangle(unsigned char *image, int width, int height, int x1, int y1, int x2, int y2, unsigned char r, unsigned char g, unsigned char b) {
  int i, w;
  for (i = y1; i <= y2; i++) {
    for (w = 0; w < 4; w++) {
      int xx1 = x1 - w;
      int xx2 = x2 + w;
      if (y1 >= 0 && y1 < height) {
        if (xx1 >= 0 && xx1 < width) {
          image[(xx1 + i * width) * 3 + 0] = r;
          image[(xx1 + i * width) * 3 + 1] = g;
          image[(xx1 + i * width) * 3 + 2] = b;
        }
        if (xx2 >= 0 && xx2 < width) {
          image[(xx2 + i * width) * 3 + 0] = r;
          image[(xx2 + i * width) * 3 + 1] = g;
          image[(xx2 + i * width) * 3 + 2] = b;
        }
      }
    }
  }
  for (i = x1 - 4 + 1; i <= x2 + 4 - 1; i++) {
    for (w = 0; w < 4; w++) {
      int yy1 = y1 - w;
      int yy2 = y2 + w;
      if (x1 >= 0 && x1 < width) {
        if (yy1 >= 0 && yy1 < height) {
          image[(i + yy1 * width) * 3 + 0] = r;
          image[(i + yy1 * width) * 3 + 1] = g;
          image[(i + yy1 * width) * 3 + 2] = b;
        }
        if (yy2 >= 0 && yy2 < height) {
          image[(i + yy2 * width) * 3 + 0] = r;
          image[(i + yy2 * width) * 3 + 1] = g;
          image[(i + yy2 * width) * 3 + 2] = b;
        }
      }
    }
  }
}
```