user: Translate the below assembly code into C programming language:

```asm
<ui_box>:
  endbr64
  push   %r15
  mov    %esi,%r15d
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x18,%rsp
  mov    %r8d,0x4(%rsp)
  call   <move@plt>
  test   %r13d,%r13d
  setne  %bpl
  test   %ebx,%ebx
  jle    L5
  xor    %r14d,%r14d
  jmp    L20
  nopw   0x0(%rax,%rax,1)
L112:
  test   %r13d,%r13d
  je     L116
  cmp    %r14d,%ebx
  jle    L207
L116:
  mov    D69(%rip),%rax
  movsbl (%rax),%edi
  call   <addch@plt>
  cmp    %r14d,%ebx
  je     L5
L20:
  test   %r14d,%r14d
  sete   %al
  add    $0x1,%r14d
  test   %bpl,%al
  je     L112
  mov    D14(%rip),%rax
  movsbl (%rax),%edi
  call   <addch@plt>
  cmp    %r14d,%ebx
  jne    L20
  nopl   (%rax)
L5:
  cmp    $0x1,%r13d
  jle    L185
L84:
  cmp    $0x2,%r13d
  je     L194
  lea    -0x1(%r13),%eax
  mov    %r12d,%ebp
  mov    %eax,0x8(%rsp)
  lea    (%r15,%rbx,1),%eax
  mov    %eax,0xc(%rsp)
  jmp    L212
  nopl   0x0(%rax)
L67:
  mov    0xc(%rsp),%eax
  mov    %ebp,%edi
  lea    -0x1(%rax),%esi
  call   <move@plt>
L106:
  mov    D24(%rip),%rax
  movsbl (%rax),%edi
  call   <addch@plt>
  mov    0x8(%rsp),%eax
  add    %r12d,%eax
  sub    %ebp,%eax
  cmp    $0x1,%eax
  je     L147
L212:
  add    $0x1,%ebp
  mov    %r15d,%esi
  mov    %ebp,%edi
  call   <move@plt>
  mov    D24(%rip),%rax
  movsbl (%rax),%edi
  call   <addch@plt>
  mov    0x4(%rsp),%eax
  test   %eax,%eax
  je     L67
  mov    $0x2,%r14d
  cmp    $0x2,%ebx
  jle    L106
  nopw   0x0(%rax,%rax,1)
L165:
  mov    $0x20,%edi
  add    $0x1,%r14d
  call   <addch@plt>
  cmp    %r14d,%ebx
  jne    L165
  jmp    L106
  nopl   (%rax)
L207:
  mov    D77(%rip),%rax
  movsbl (%rax),%edi
  call   <addch@plt>
  cmp    $0x1,%r13d
  jg     L84
L185:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L147:
  lea    -0x2(%r12,%r13,1),%r12d
L194:
  lea    0x1(%r12),%edi
  mov    %r15d,%esi
  call   <move@plt>
  test   %ebx,%ebx
  jle    L185
  xor    %ebp,%ebp
L153:
  add    $0x1,%ebp
  cmp    $0x1,%ebp
  je     L104
L124:
  cmp    %ebx,%ebp
  jge    L82
  mov    D69(%rip),%rax
  add    $0x1,%ebp
  movsbl (%rax),%edi
  call   <addch@plt>
  cmp    $0x1,%ebp
  jne    L124
L104:
  mov    D17(%rip),%rax
  movsbl (%rax),%edi
  call   <addch@plt>
  cmp    $0x1,%ebx
  jne    L153
  jmp    L185
  nopl   0x0(%rax)
L82:
  mov    D46(%rip),%rax
  movsbl (%rax),%edi
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <addch@plt>
```

assistant: ```c
void ui_box(int y, int x, int height, int width, int fill) {
  int i;
  move(y, x);
  for (i = 0; i < width; i++) {
    if (height && i == 0) {
      addch(ACS_ULCORNER);
    } else if (height && i + 1 >= width) {
      addch(ACS_URCORNER);
    } else {
      addch(ACS_HLINE);
    }
  }
  if (height > 1) {
    while (--height > 1) {
      move(++y, x);
      addch(ACS_VLINE);
      if (fill) {
        for (i = 2; i < width; i++) {
          addch(' ');
        }
      } else {
        move(y, x + width - 1);
      }
      addch(ACS_VLINE);
    }
    move(++y, x);
    for (i = 0; i < width; i++) {
      if (i == 0) {
        addch(ACS_LLCORNER);
      } else if (i + 1 >= width) {
        addch(ACS_LRCORNER);
      } else {
        addch(ACS_HLINE);
      }
    }
  }
}
```