user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<reset_vga>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x0,%edi
  call   <outb@plt>
  mov    $0x3c4,%esi
  mov    $0x300,%edi
  call   <outw@plt>
  mov    $0x3c4,%esi
  mov    $0x1,%edi
  call   <outw@plt>
  mov    $0x3c4,%esi
  mov    $0x302,%edi
  call   <outw@plt>
  mov    $0x3c4,%esi
  mov    $0x3,%edi
  call   <outw@plt>
  mov    $0x3c4,%esi
  mov    $0x204,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0xe11,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x5f00,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x4f01,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x5002,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x8203,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x5504,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x8105,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0xbf06,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x1f07,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x8,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x4f09,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x200a,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0xe0b,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0xc,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0xd,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x10e,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0xe00f,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x9c10,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x8e11,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x8f12,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x2813,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x1f14,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0x9615,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0xb916,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0xa317,%edi
  call   <outw@plt>
  mov    $0x3d4,%esi
  mov    $0xff18,%edi
  call   <outw@plt>
  mov    $0x3ce,%esi
  mov    $0x0,%edi
  call   <outw@plt>
  mov    $0x3ce,%esi
  mov    $0x1,%edi
  call   <outw@plt>
  mov    $0x3ce,%esi
  mov    $0x2,%edi
  call   <outw@plt>
  mov    $0x3ce,%esi
  mov    $0x3,%edi
  call   <outw@plt>
  mov    $0x3ce,%esi
  mov    $0x4,%edi
  call   <outw@plt>
  mov    $0x3ce,%esi
  mov    $0x1005,%edi
  call   <outw@plt>
  mov    $0x3ce,%esi
  mov    $0xe06,%edi
  call   <outw@plt>
  mov    $0x3ce,%esi
  mov    $0x7,%edi
  call   <outw@plt>
  mov    $0x3ce,%esi
  mov    $0xff08,%edi
  call   <outw@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x0,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x0,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x1,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x1,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x2,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x2,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x3,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x3,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x4,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x4,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x5,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x5,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x6,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x14,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x7,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x7,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x8,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x38,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x9,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x39,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0xa,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x3a,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0xb,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x3b,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0xc,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x3c,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0xd,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x3d,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0xe,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x3e,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0xf,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x3f,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x10,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0xc,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x11,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x0,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x12,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0xf,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x13,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x8,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x14,%edi
  call   <outb@plt>
  mov    $0x3c0,%esi
  mov    $0x0,%edi
  call   <outb@plt>
  mov    $0x3da,%edi
  call   <inb@plt>
  mov    $0x3c0,%esi
  mov    $0x20,%edi
  call   <outb@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void reset_vga(void) {
  inb(0x3da);
  outb(0, 0x3c0);
  outw(0x0300, 0x3c4);
  outw(0x0001, 0x3c4);
  outw(0x0302, 0x3c4);
  outw(0x0003, 0x3c4);
  outw(0x0204, 0x3c4);
  outw(0x0e11, 0x3d4);
  outw(0x5f00, 0x3d4);
  outw(0x4f01, 0x3d4);
  outw(0x5002, 0x3d4);
  outw(0x8203, 0x3d4);
  outw(0x5504, 0x3d4);
  outw(0x8105, 0x3d4);
  outw(0xbf06, 0x3d4);
  outw(0x1f07, 0x3d4);
  outw(0x0008, 0x3d4);
  outw(0x4f09, 0x3d4);
  outw(0x200a, 0x3d4);
  outw(0x0e0b, 0x3d4);
  outw(0x000c, 0x3d4);
  outw(0x000d, 0x3d4);
  outw(0x010e, 0x3d4);
  outw(0xe00f, 0x3d4);
  outw(0x9c10, 0x3d4);
  outw(0x8e11, 0x3d4);
  outw(0x8f12, 0x3d4);
  outw(0x2813, 0x3d4);
  outw(0x1f14, 0x3d4);
  outw(0x9615, 0x3d4);
  outw(0xb916, 0x3d4);
  outw(0xa317, 0x3d4);
  outw(0xff18, 0x3d4);
  outw(0x0000, 0x3ce);
  outw(0x0001, 0x3ce);
  outw(0x0002, 0x3ce);
  outw(0x0003, 0x3ce);
  outw(0x0004, 0x3ce);
  outw(0x1005, 0x3ce);
  outw(0x0e06, 0x3ce);
  outw(0x0007, 0x3ce);
  outw(0xff08, 0x3ce);
  inb(0x3da);
  outb(0x00, 0x3c0);
  outb(0x00, 0x3c0);
  inb(0x3da);
  outb(0x01, 0x3c0);
  outb(0x01, 0x3c0);
  inb(0x3da);
  outb(0x02, 0x3c0);
  outb(0x02, 0x3c0);
  inb(0x3da);
  outb(0x03, 0x3c0);
  outb(0x03, 0x3c0);
  inb(0x3da);
  outb(0x04, 0x3c0);
  outb(0x04, 0x3c0);
  inb(0x3da);
  outb(0x05, 0x3c0);
  outb(0x05, 0x3c0);
  inb(0x3da);
  outb(0x06, 0x3c0);
  outb(0x14, 0x3c0);
  inb(0x3da);
  outb(0x07, 0x3c0);
  outb(0x07, 0x3c0);
  inb(0x3da);
  outb(0x08, 0x3c0);
  outb(0x38, 0x3c0);
  inb(0x3da);
  outb(0x09, 0x3c0);
  outb(0x39, 0x3c0);
  inb(0x3da);
  outb(0x0a, 0x3c0);
  outb(0x3a, 0x3c0);
  inb(0x3da);
  outb(0x0b, 0x3c0);
  outb(0x3b, 0x3c0);
  inb(0x3da);
  outb(0x0c, 0x3c0);
  outb(0x3c, 0x3c0);
  inb(0x3da);
  outb(0x0d, 0x3c0);
  outb(0x3d, 0x3c0);
  inb(0x3da);
  outb(0x0e, 0x3c0);
  outb(0x3e, 0x3c0);
  inb(0x3da);
  outb(0x0f, 0x3c0);
  outb(0x3f, 0x3c0);
  inb(0x3da);
  outb(0x10, 0x3c0);
  outb(0x0c, 0x3c0);
  inb(0x3da);
  outb(0x11, 0x3c0);
  outb(0x00, 0x3c0);
  inb(0x3da);
  outb(0x12, 0x3c0);
  outb(0x0f, 0x3c0);
  inb(0x3da);
  outb(0x13, 0x3c0);
  outb(0x08, 0x3c0);
  inb(0x3da);
  outb(0x14, 0x3c0);
  outb(0x00, 0x3c0);
  inb(0x3da);
  outb(0x20, 0x3c0);
}
```