user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<draw_korean>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1d8,%rsp
  mov    %edi,%ecx
  mov    %esi,%ebx
  mov    %edx,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x1c8(%rsp)
  xor    %eax,%eax
  movl   $0x0,(%rsp)
  movl   $0x0,0x4(%rsp)
  movl   $0x0,0x8(%rsp)
  movl   $0x0,0xc(%rsp)
  movl   $0x0,0x10(%rsp)
  movl   $0x0,0x14(%rsp)
  movl   $0x0,0x18(%rsp)
  movl   $0x0,0x1c(%rsp)
  movl   $0x1,0x20(%rsp)
  movl   $0x3,0x24(%rsp)
  movl   $0x3,0x28(%rsp)
  movl   $0x3,0x2c(%rsp)
  movl   $0x1,0x30(%rsp)
  movl   $0x2,0x34(%rsp)
  movl   $0x4,0x38(%rsp)
  movl   $0x4,0x3c(%rsp)
  movl   $0x4,0x40(%rsp)
  movl   $0x2,0x44(%rsp)
  movl   $0x1,0x48(%rsp)
  movl   $0x3,0x4c(%rsp)
  movl   $0x0,0x50(%rsp)
  movl   $0x0,0x60(%rsp)
  movl   $0x2,0x64(%rsp)
  movl   $0x0,0x68(%rsp)
  movl   $0x2,0x6c(%rsp)
  movl   $0x1,0x70(%rsp)
  movl   $0x2,0x74(%rsp)
  movl   $0x1,0x78(%rsp)
  movl   $0x2,0x7c(%rsp)
  movl   $0x3,0x80(%rsp)
  movl   $0x0,0x84(%rsp)
  movl   $0x2,0x88(%rsp)
  movl   $0x1,0x8c(%rsp)
  movl   $0x3,0x90(%rsp)
  movl   $0x3,0x94(%rsp)
  movl   $0x1,0x98(%rsp)
  movl   $0x2,0x9c(%rsp)
  movl   $0x1,0xa0(%rsp)
  movl   $0x3,0xa4(%rsp)
  movl   $0x3,0xa8(%rsp)
  movl   $0x1,0xac(%rsp)
  movl   $0x1,0xb0(%rsp)
  movq   $0x0,0xc0(%rsp)
  movq   $0x0,0xc8(%rsp)
  movq   $0x0,0xd0(%rsp)
  movq   $0x0,0xd8(%rsp)
  movq   $0x0,0xe0(%rsp)
  movq   $0x0,0xe8(%rsp)
  movq   $0x0,0xf0(%rsp)
  movq   $0x0,0xf8(%rsp)
  movq   $0x0,0x100(%rsp)
  movq   $0x0,0x108(%rsp)
  movq   $0x0,0x110(%rsp)
  movq   $0x0,0x118(%rsp)
  movq   $0x0,0x120(%rsp)
  movq   $0x0,0x128(%rsp)
  movq   $0x0,0x130(%rsp)
  movq   $0x0,0x138(%rsp)
  movq   $0x0,0x140(%rsp)
  movq   $0x0,0x148(%rsp)
  movq   $0x0,0x150(%rsp)
  movq   $0x0,0x158(%rsp)
  movq   $0x0,0x160(%rsp)
  movq   $0x0,0x168(%rsp)
  movq   $0x0,0x170(%rsp)
  movq   $0x0,0x178(%rsp)
  movq   $0x0,0x180(%rsp)
  movq   $0x0,0x188(%rsp)
  movq   $0x0,0x190(%rsp)
  movq   $0x0,0x198(%rsp)
  movq   $0x0,0x1a0(%rsp)
  movq   $0x0,0x1a8(%rsp)
  movq   $0x0,0x1b0(%rsp)
  movq   $0x0,0x1b8(%rsp)
  movslq %esi,%rax
  mov    (%rsp,%rax,4),%eax
  test   %edx,%edx
  je     L90
  cmp    $0x4,%eax
  ja     L90
  mov    %eax,%eax
  lea    D38(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x5,%eax
L90:
  test   $0xffffffef,%ecx
  setne  %dl
  movzbl %dl,%edx
  test   %ebp,%ebp
  setne  %sil
  movzbl %sil,%esi
  lea    (%rdx,%rsi,2),%r12d
  movslq %ebx,%rdx
  mov    0x60(%rsp,%rdx,4),%r13d
  imul   $0x260,%eax,%eax
  shl    $0x5,%ecx
  lea    (%rax,%rcx,1),%esi
  lea    0xc0(%rsp),%r14
  mov    %r14,%rdi
  call   <mask_32byte@plt>
  imul   $0x2a0,%r12d,%r12d
  shl    $0x5,%ebx
  lea    0x1300(%r12,%rbx,1),%esi
  mov    %r14,%rdi
  call   <mask_32byte@plt>
  test   %ebp,%ebp
  jne    L13
L77:
  mov    $0x0,%ebp
  lea    0xc0(%rsp),%r12
  lea    D32(%rip),%r13
  lea    D27(%rip),%r14
  lea    D37(%rip),%r15
  jmp    L84
  mov    $0x6,%eax
  jmp    L90
  mov    $0x6,%eax
  jmp    L90
  mov    $0x7,%eax
  jmp    L90
  mov    $0x7,%eax
  jmp    L90
L13:
  imul   $0x360,%r13d,%r13d
  sub    $0x1,%ebp
  shl    $0x5,%ebp
  lea    0x1d80(%r13,%rbp,1),%esi
  mov    %r14,%rdi
  call   <mask_32byte@plt>
  jmp    L77
L26:
  mov    %r14,%rdi
  call   <printf@plt>
L96:
  mov    %ebx,%eax
  sar    $0x1f,%eax
  shr    $0x1c,%eax
  add    %eax,%ebx
  and    $0xf,%ebx
  sub    %eax,%ebx
  cmp    $0xf,%ebx
  je     L64
L9:
  add    $0x1,%rbp
  cmp    $0x100,%rbp
  je     L142
L84:
  mov    %ebp,%ebx
  cmpb   $0x1,0x0(%rbp,%r12,1)
  je     L26
  mov    %r13,%rdi
  call   <printf@plt>
  jmp    L96
L64:
  mov    %r15,%rdi
  call   <printf@plt>
  jmp    L9
L142:
  mov    0x1c8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L118
  add    $0x1d8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L118:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D32
data_type: string
name: retrieve_data
arguments: data_label: D27
data_type: string
name: retrieve_data
arguments: data_label: D37
data_type: string

tool: D32:   

tool: D27:  *

tool: D37: 


assistant: ```c
void draw_korean(int cho, int jung, int jong) {
  int CHO_IDX = 0;
  int JUNG_IDX = CHO_IDX + 32 * 19 * 8;
  int JONG_IDX = JUNG_IDX + 32 * 21 * 4;
  int CHO_MAP[] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 1, 2, 4, 4, 4, 2, 1, 3, 0};
  int JONG_MAP[] = {0, 2, 0, 2, 1, 2, 1, 2, 3, 0, 2, 1, 3, 3, 1, 2, 1, 3, 3, 1, 1};
  int CHO_TYPE = -1;
  int JUNG_TYPE = -1;
  int JONG_TYPE = -1;
  char out[256] = {
      0,
  };
  int i;
  CHO_TYPE = CHO_MAP[jung];
  if (jong != 0) {
    if (CHO_TYPE == 0)
      CHO_TYPE = 5;
    else if (CHO_TYPE == 1)
      CHO_TYPE = 6;
    else if (CHO_TYPE == 2)
      CHO_TYPE = 6;
    else if (CHO_TYPE == 3)
      CHO_TYPE = 7;
    else if (CHO_TYPE == 4)
      CHO_TYPE = 7;
  }
  JUNG_TYPE = (cho == 0 || cho == 16) ? 0 : 1;
  JUNG_TYPE += (jong != 0) ? 2 : 0;
  JONG_TYPE = JONG_MAP[jung];
  mask_32byte(out, CHO_IDX + (32 * 19 * CHO_TYPE) + (32 * cho));
  mask_32byte(out, JUNG_IDX + (32 * 21 * JUNG_TYPE) + (32 * jung));
  if (jong != 0)
    mask_32byte(out, JONG_IDX + (32 * 27 * JONG_TYPE) + (32 * (jong - 1)));
  for (i = 0; i < 256; i++) {
    if (out[i] == 1)
      printf(" *");
    else
      printf("  ");
    if (i % 16 == 15)
      printf("\n");
  }
}
```