user: Please show me the C implementation that matches the assembly code listed below:

```asm
<ExplodeBox1>:
  endbr64
  mov    %edx,%eax
  push   %r15
  mov    $0x1,%r15d
  add    %edi,%eax
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %eax,%ebx
  shr    $0x1f,%ebx
  add    %eax,%ebx
  lea    (%rcx,%rsi,1),%eax
  mov    %eax,%r8d
  sar    %ebx
  sub    $0x28,%rsp
  shr    $0x1f,%r8d
  lea    -0x1(%rbx),%r11d
  mov    %edi,0x14(%rsp)
  add    %eax,%r8d
  mov    %esi,0xc(%rsp)
  mov    %r11d,%edi
  sar    %r8d
  mov    %edx,0x10(%rsp)
  mov    %ebx,%edx
  lea    -0x1(%r8),%r12d
  mov    %r8d,%ecx
  mov    %r11d,0x18(%rsp)
  mov    %r8d,%r13d
  mov    %r12d,%esi
  call   <XDrawBox1@plt>
  mov    0x18(%rsp),%r11d
  jmp    L210
  nopl   0x0(%rax,%rax,1)
L218:
  mov    %ebp,%r11d
L210:
  cmp    %r11d,0x14(%rsp)
  jl     L31
  lea    0x1(%r11),%edi
  mov    %r11d,%ebp
  mov    $0x3,%eax
  mov    $0x2,%r8d
L176:
  cmp    %ebx,0x10(%rsp)
  jle    L86
  mov    %ebx,%edx
  add    $0x1,%ebx
L106:
  test   %r15d,%r15d
  setg   %al
  cmp    %r12d,0xc(%rsp)
  jge    L208
  test   %al,%al
  je     L208
  lea    -0x1(%r12),%r8d
  cmp    %r13d,%r14d
  jle    L26
  mov    %r12d,%esi
  mov    %r8d,%r12d
L63:
  lea    0x1(%r13),%eax
  mov    %r13d,%ecx
  mov    %r11d,0x1c(%rsp)
  mov    %eax,0x18(%rsp)
  call   <BlockErase@plt>
  mov    0x18(%rsp),%r13d
  mov    %ebx,%edx
  mov    %r12d,%esi
  mov    %ebp,%edi
  mov    %r13d,%ecx
  call   <XDrawBox1@plt>
  mov    0x1c(%rsp),%r11d
L237:
  mov    $0x1,%eax
  sub    %r15d,%eax
  mov    %eax,%r15d
  cmp    %r11d,0x14(%rsp)
  jl     L218
  lea    0x1(%rbp),%r11d
  jmp    L172
  cs nopw 0x0(%rax,%rax,1)
L182:
  mov    %ebx,%edx
  add    $0x1,%ebx
  test   %r15d,%r15d
  mov    $0x2,%r8d
  setg   %al
  cmp    %r12d,0xc(%rsp)
  jge    L13
L202:
  test   %al,%al
  je     L13
  lea    -0x1(%r12),%r8d
  cmp    %r14d,%r13d
  jge    L5
  mov    %r12d,%esi
  mov    %r8d,%r12d
L146:
  mov    %r11d,%edi
  lea    0x1(%r13),%eax
  mov    %r13d,%ecx
  mov    %r11d,0x1c(%rsp)
  mov    %eax,0x18(%rsp)
  call   <BlockErase@plt>
  mov    0x18(%rsp),%r13d
  mov    %ebx,%edx
  mov    %r12d,%esi
  mov    %ebp,%edi
  mov    %r13d,%ecx
  call   <XDrawBox1@plt>
  mov    0x1c(%rsp),%r11d
L149:
  mov    $0x1,%eax
  sub    %r15d,%eax
  mov    %eax,%r15d
L172:
  cmp    %ebx,0x10(%rsp)
  jg     L182
  test   %r15d,%r15d
  lea    -0x1(%rbx),%edx
  mov    $0x3,%r8d
  setg   %al
  cmp    %r12d,0xc(%rsp)
  jl     L202
L13:
  lea    0x1(%r12),%esi
  cmp    %r14d,%r13d
  jge    L84
  test   %al,%al
  jne    L146
L84:
  mov    %r11d,%edi
  lea    -0x1(%r13),%ecx
  mov    %r8d,0x1c(%rsp)
  mov    %r11d,0x18(%rsp)
  call   <BlockErase@plt>
  mov    %r13d,%ecx
  mov    %ebx,%edx
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <XDrawBox1@plt>
  mov    0x1c(%rsp),%r8d
  mov    0x18(%rsp),%r11d
  cmp    $0x3,%r8d
  jne    L149
L30:
  mov    0x10(%rsp),%ebp
  mov    0xc(%rsp),%r15d
  mov    %r14d,%ecx
  mov    0x14(%rsp),%ebx
  mov    %ebp,%edx
  mov    %r15d,%esi
  mov    %ebx,%edi
  call   <BlockErase@plt>
  add    $0x28,%rsp
  mov    %r14d,%ecx
  mov    %ebp,%edx
  mov    %r15d,%esi
  mov    %ebx,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <XDrawBox1@plt>
  nopl   0x0(%rax)
L208:
  lea    0x1(%r12),%esi
  cmp    %r13d,%r14d
  jle    L27
  test   %al,%al
  jne    L63
L27:
  lea    -0x1(%r13),%ecx
  mov    %r8d,0x1c(%rsp)
  mov    %r11d,0x18(%rsp)
  call   <BlockErase@plt>
  mov    %r13d,%ecx
  mov    %ebx,%edx
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <XDrawBox1@plt>
  mov    0x1c(%rsp),%r8d
  mov    0x18(%rsp),%r11d
  cmp    $0x3,%r8d
  jne    L237
  jmp    L30
  nopl   (%rax)
L86:
  lea    -0x1(%rbx),%edx
  mov    %eax,%r8d
  jmp    L106
  nopl   0x0(%rax,%rax,1)
L31:
  lea    -0x1(%r11),%ebp
  mov    %r11d,%edi
  mov    $0x2,%eax
  mov    $0x1,%r8d
  jmp    L176
  nop
L5:
  mov    %r11d,%edi
  mov    %r12d,%esi
  lea    -0x1(%r13),%ecx
  mov    %r11d,0x1c(%rsp)
  mov    %r8d,0x18(%rsp)
  call   <BlockErase@plt>
  mov    0x18(%rsp),%esi
  mov    %r13d,%ecx
  mov    %ebx,%edx
  mov    %ebp,%edi
  call   <XDrawBox1@plt>
  mov    0x18(%rsp),%r12d
  mov    0x1c(%rsp),%r11d
  jmp    L149
  nopl   0x0(%rax,%rax,1)
L26:
  mov    %r12d,%esi
  lea    -0x1(%r13),%ecx
  mov    %r11d,0x1c(%rsp)
  mov    %r8d,0x18(%rsp)
  call   <BlockErase@plt>
  mov    0x18(%rsp),%esi
  mov    %r13d,%ecx
  mov    %ebx,%edx
  mov    %ebp,%edi
  call   <XDrawBox1@plt>
  mov    0x18(%rsp),%r12d
  mov    0x1c(%rsp),%r11d
  jmp    L237
```

assistant: ```c
void ExplodeBox1(int x, int y, int xx, int yy) {
  register int i;
  int midx1, midy1, midx2, midy2;
  int num = 0;
  int flag;
  int Inc = 7000;
  midx1 = (xx + x) / 2 - 1;
  midy1 = (yy + y) / 2 - 1;
  midx2 = midx1 + 1;
  midy2 = midy1 + 1;
  XDrawBox1(midx1, midy1, midx2, midy2);
  flag = 0;
  while (num < 4) {
    num = 0;
    if (flag == 1)
      flag = 0;
    else
      flag = 1;
    if (midx1 > x)
      midx1--;
    else
      num++;
    if (midx2 < xx)
      midx2++;
    else
      num++;
    if (midy1 > y && flag > 0)
      midy1--;
    else
      num++;
    if (midy2 < yy && flag > 0)
      midy2++;
    else
      num++;
    for (i = 0; i < Inc; ++i)
      ;
    Inc -= 700;
    BlockErase(midx1 + 1, midy1 + 1, midx2 - 1, midy2 - 1);
    XDrawBox1(midx1, midy1, midx2, midy2);
  }
  BlockErase(x, y, xx, yy);
  XDrawBox1(x, y, xx, yy);
}
```