user: Converte this assembly snippet into its equivalent C code:

```asm
<c_blit_write>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  movzbl 0xc8(%rsp),%r15d
  mov    0x98(%rsp),%r10d
  mov    %ecx,0x10(%rsp)
  mov    0xa8(%rsp),%edi
  mov    0xb8(%rsp),%esi
  mov    %r8w,0x14(%rsp)
  mov    %r15b,0x2e(%rsp)
  mov    0xa0(%rsp),%r11d
  lea    (%r10,%r8,1),%r15d
  mov    0xb0(%rsp),%eax
  mov    0xd8(%rsp),%ebp
  mov    %r15w,0xe(%rsp)
  movzbl %sil,%r8d
  mov    0xe8(%rsp),%r12d
  mov    0xf0(%rsp),%ebx
  movswl %di,%r15d
  mov    %di,0x2c(%rsp)
  mov    0xc0(%rsp),%ecx
  mov    %ax,0x28(%rsp)
  imul   %r8d,%r15d
  lea    (%r11,%r9,1),%r14d
  mov    %bp,0x20(%rsp)
  mov    0xe0(%rsp),%edx
  mov    %r12w,0x18(%rsp)
  mov    %bx,0x24(%rsp)
  test   %cl,%cl
  jne    L3584
  cmp    %bp,%r10w
  jl     L3584
  lea    (%rax,%r11,1),%ecx
  cmp    %bx,%cx
  setle  %cl
  cmp    %dx,%r11w
  setge  %r11b
  test   %r11b,%cl
  je     L1133
  add    %r10d,%edi
  cmp    %r12w,%di
  jle    L2636
L1133:
  cmp    $0x3,%sil
  je     L3665
  cmp    $0x4,%sil
  je     L1868
  cmp    $0x2,%sil
  je     L1210
L2160:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L3584:
  cmp    $0xa,%cl
  ja     L2160
  lea    D2(%rip),%rdi
  movzbl %cl,%ecx
  movslq (%rdi,%rcx,4),%rcx
  add    %rdi,%rcx
  notrack jmp *%rcx
  nopl   0x0(%rax)
L2636:
  mov    0x10(%rsp),%r12d
  movswl 0xe(%rsp),%edx
  movswl %r14w,%ecx
  xor    %ebp,%ebp
  imul   %r12d,%ecx
  imul   %r8d,%edx
  add    %edx,%ecx
  mov    %ecx,%ecx
  add    %r13,%rcx
  test   %ax,%ax
  jle    L2160
  mov    0x90(%rsp),%rbx
  mov    %eax,%r13d
  nopw   0x0(%rax,%rax,1)
L3516:
  mov    %rbx,%rsi
  mov    %rcx,%rdi
  mov    %r15,%rdx
  add    $0x1,%ebp
  call   <memcpy@plt>
  add    %r15,%rbx
  mov    %rax,%rcx
  add    %r12,%rcx
  cmp    %bp,%r13w
  jne    L3516
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
  cmp    $0x3,%sil
  je     L1949
  cmp    $0x4,%sil
  je     L3456
  cmp    $0x2,%sil
  jne    L2160
  test   %ax,%ax
  jle    L2160
  movswl %r9w,%r9d
  movswl %dx,%edx
  movswl 0x24(%rsp),%r12d
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x20(%rsp),%r8d
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  movswl 0x18(%rsp),%r11d
  add    %r9d,%r12d
  movzwl 0x2c(%rsp),%r9d
  add    %edx,%r8d
  add    0xe(%rsp),%r9w
  add    %edx,%r11d
  jmp    L506
  nopl   (%rax)
L284:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %ax,%r14w
  je     L2160
L506:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L284
  cmp    %r12d,%ecx
  jg     L284
  cmpw   $0x0,0x2c(%rsp)
  jle    L284
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %ax,0x14(%rsp)
  mov    %edi,%esi
L486:
  movzwl %dx,%ebx
  cmp    %r8d,%ebx
  jl     L2026
  cmp    %r11d,%ebx
  jg     L2026
  mov    0x90(%rsp),%rax
  lea    (%rcx,%rbx,2),%ebx
  mov    %esi,%ebp
  movzwl (%rax,%rbp,1),%ebp
  and    %bp,0x0(%r13,%rbx,1)
L2026:
  add    $0x1,%edx
  add    $0x2,%esi
  cmp    %r9w,%dx
  jne    L486
  movzwl 0x14(%rsp),%eax
  jmp    L284
  nopw   0x0(%rax,%rax,1)
  cmp    $0x3,%sil
  je     L992
  cmp    $0x4,%sil
  je     L67
  cmp    $0x2,%sil
  jne    L2160
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x18(%rsp),%ecx
  movswl 0x14(%rsp),%edx
  xor    %r8d,%r8d
  lea    (%r12,%r9,1),%ebp
  movzwl 0xd0(%rsp),%edi
  movswl 0x20(%rsp),%r9d
  lea    (%rcx,%rdx,1),%r12d
  mov    %edi,0x14(%rsp)
  add    %edx,%r9d
  jmp    L1758
  nopw   0x0(%rax,%rax,1)
L1634:
  add    $0x1,%r14d
  add    %r15d,%r8d
  cmp    %ax,%r14w
  je     L2160
L1758:
  movzwl %r14w,%edx
  cmp    %r10d,%edx
  jl     L1634
  cmp    %ebp,%edx
  jg     L1634
  movzwl 0x2c(%rsp),%ebx
  test   %bx,%bx
  jle    L1634
  imul   0x10(%rsp),%edx
  mov    %r8d,%esi
  mov    %edx,0x20(%rsp)
  movzwl 0xe(%rsp),%edx
  add    %edx,%ebx
  mov    %ebx,%edi
  nopl   (%rax)
L3624:
  movzwl %dx,%ecx
  cmp    %r9d,%ecx
  jl     L1158
  cmp    %r12d,%ecx
  jg     L1158
  mov    0x90(%rsp),%rbx
  mov    %esi,%r11d
  movzwl (%rbx,%r11,1),%ebx
  mov    %ebx,%r11d
  cmp    %ebx,0x14(%rsp)
  je     L1158
  mov    0x20(%rsp),%ebx
  lea    (%rbx,%rcx,2),%ecx
  mov    %r11w,0x0(%r13,%rcx,1)
  nopl   0x0(%rax,%rax,1)
L1158:
  add    $0x1,%edx
  add    $0x2,%esi
  cmp    %di,%dx
  jne    L3624
  jmp    L1634
  nopl   0x0(%rax,%rax,1)
  cmp    $0x3,%sil
  je     L373
  cmp    $0x4,%sil
  je     L1092
  cmp    $0x2,%sil
  jne    L2160
  test   %ax,%ax
  jle    L2160
  movswl %r9w,%r9d
  movswl %dx,%edx
  movswl 0x24(%rsp),%r12d
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x20(%rsp),%r8d
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  movswl 0x18(%rsp),%r11d
  add    %r9d,%r12d
  movzwl 0x2c(%rsp),%r9d
  add    %edx,%r8d
  add    0xe(%rsp),%r9w
  add    %edx,%r11d
  jmp    L2463
  nopl   (%rax)
L2993:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %ax,%r14w
  je     L2160
L2463:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L2993
  cmp    %r12d,%ecx
  jg     L2993
  cmpw   $0x0,0x2c(%rsp)
  jle    L2993
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %ax,0x14(%rsp)
  mov    %edi,%esi
L1995:
  movzwl %dx,%ebx
  cmp    %r8d,%ebx
  jl     L1232
  cmp    %r11d,%ebx
  jg     L1232
  mov    0x90(%rsp),%rax
  lea    (%rcx,%rbx,2),%ebx
  mov    %esi,%ebp
  movzwl (%rax,%rbp,1),%ebp
  xor    %bp,0x0(%r13,%rbx,1)
L1232:
  add    $0x1,%edx
  add    $0x2,%esi
  cmp    %r9w,%dx
  jne    L1995
  movzwl 0x14(%rsp),%eax
  jmp    L2993
  nopw   0x0(%rax,%rax,1)
  cmp    $0x3,%sil
  je     L2521
  cmp    $0x4,%sil
  je     L2155
  cmp    $0x2,%sil
  jne    L2160
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  xor    %r10d,%r10d
  lea    (%r14,%rax,1),%r11d
  movswl 0x20(%rsp),%esi
  lea    (%rdx,%r9,1),%ecx
  movswl 0x18(%rsp),%edx
  lea    (%r12,%r9,1),%eax
  movzwl 0x2c(%rsp),%ebp
  add    0xe(%rsp),%bp
  mov    %eax,0x24(%rsp)
  movswl 0x14(%rsp),%eax
  add    %eax,%esi
  lea    (%rdx,%rax,1),%r12d
  jmp    L1175
  nopl   0x0(%rax,%rax,1)
L805:
  add    $0x1,%r14d
  add    %r15d,%r10d
  cmp    %r14w,%r11w
  je     L2160
L1175:
  movzwl %r14w,%r8d
  cmp    %ecx,%r8d
  jl     L805
  cmp    0x24(%rsp),%r8d
  jg     L805
  cmpw   $0x0,0x2c(%rsp)
  jle    L805
  imul   0x10(%rsp),%r8d
  mov    %ecx,0x14(%rsp)
  mov    %r10d,%r9d
  mov    %r10d,0x20(%rsp)
  movzwl 0xe(%rsp),%edi
L3374:
  movzwl %di,%eax
  cmp    %esi,%eax
  jl     L1490
  cmp    %r12d,%eax
  jg     L1490
  lea    (%r8,%rax,2),%ebx
  mov    %r9d,%edx
  mov    0x90(%rsp),%rcx
  add    %r13,%rbx
  mov    %rdx,%r10
  xor    %edx,%edx
  movzwl (%rbx),%eax
  divw   (%rcx,%r10,1)
  mov    %ax,(%rbx)
L1490:
  add    $0x1,%edi
  add    $0x2,%r9d
  cmp    %di,%bp
  jne    L3374
  mov    0x14(%rsp),%ecx
  mov    0x20(%rsp),%r10d
  jmp    L805
  nopl   0x0(%rax,%rax,1)
  cmp    $0x3,%sil
  je     L3685
  cmp    $0x4,%sil
  je     L22
  cmp    $0x2,%sil
  jne    L2160
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  xor    %edi,%edi
  lea    (%r14,%rax,1),%ebp
  lea    (%rdx,%r9,1),%r8d
  movswl 0x18(%rsp),%edx
  lea    (%r12,%r9,1),%eax
  movswl 0x20(%rsp),%r9d
  mov    %eax,0x24(%rsp)
  movswl 0x14(%rsp),%eax
  add    %eax,%r9d
  lea    (%rdx,%rax,1),%r12d
  movzwl 0xd0(%rsp),%eax
  mov    %eax,0x14(%rsp)
  jmp    L2744
  nopl   0x0(%rax,%rax,1)
L813:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %bp,%r14w
  je     L2160
L2744:
  movzwl %r14w,%ecx
  cmp    %r8d,%ecx
  jl     L813
  cmp    0x24(%rsp),%ecx
  jg     L813
  movzwl 0x2c(%rsp),%eax
  test   %ax,%ax
  jle    L813
  imul   0x10(%rsp),%ecx
  mov    %edi,%ebx
  mov    %eax,%r10d
  movzwl 0xe(%rsp),%eax
  add    %eax,%r10d
  sub    %ecx,%ebx
  mov    %ecx,%esi
  mov    %ebx,0x20(%rsp)
  nopl   0x0(%rax)
L500:
  movzwl %ax,%edx
  cmp    %r9d,%edx
  jl     L106
  cmp    %r12d,%edx
  jg     L106
  add    %edx,%edx
  mov    %esi,%r11d
  movslq %edx,%rbx
  add    %r13,%rbx
  movzwl (%rbx,%r11,1),%r11d
  cmp    0x14(%rsp),%r11d
  jne    L106
  mov    0x20(%rsp),%ebx
  add    %ecx,%edx
  mov    %edx,%edx
  lea    (%rbx,%rsi,1),%r11d
  mov    0x90(%rsp),%rbx
  movzwl (%rbx,%r11,1),%r11d
  mov    %r11w,0x0(%r13,%rdx,1)
  nopl   0x0(%rax,%rax,1)
L106:
  add    $0x1,%eax
  add    $0x2,%esi
  cmp    %r10w,%ax
  jne    L500
  jmp    L813
  nopl   0x0(%rax)
  cmp    $0x3,%sil
  je     L309
  cmp    $0x4,%sil
  je     L859
  cmp    $0x2,%sil
  jne    L2160
  test   %ax,%ax
  jle    L2160
  movswl %r9w,%r9d
  movswl %dx,%edx
  movswl 0x24(%rsp),%r12d
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x20(%rsp),%r8d
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  movswl 0x18(%rsp),%r11d
  add    %r9d,%r12d
  movzwl 0x2c(%rsp),%r9d
  add    %edx,%r8d
  add    0xe(%rsp),%r9w
  add    %edx,%r11d
  jmp    L263
  nopl   (%rax)
L7:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %ax,%r14w
  je     L2160
L263:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L7
  cmp    %r12d,%ecx
  jg     L7
  cmpw   $0x0,0x2c(%rsp)
  jle    L7
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %ax,0x14(%rsp)
  mov    %edi,%esi
  nopl   0x0(%rax,%rax,1)
L824:
  movzwl %dx,%ebx
  cmp    %r8d,%ebx
  jl     L3204
  cmp    %r11d,%ebx
  jg     L3204
  mov    0x90(%rsp),%rax
  lea    (%rcx,%rbx,2),%ebx
  mov    %esi,%ebp
  movzwl (%rax,%rbp,1),%ebp
  add    %bp,0x0(%r13,%rbx,1)
L3204:
  add    $0x1,%edx
  add    $0x2,%esi
  cmp    %r9w,%dx
  jne    L824
  movzwl 0x14(%rsp),%eax
  jmp    L7
  nopw   0x0(%rax,%rax,1)
  cmp    $0x3,%sil
  je     L2280
  cmp    $0x4,%sil
  je     L3670
  cmp    $0x2,%sil
  jne    L2160
  test   %ax,%ax
  jle    L2160
  movswl %r9w,%r9d
  movswl %dx,%edx
  movswl 0x24(%rsp),%r12d
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x20(%rsp),%r8d
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  movswl 0x18(%rsp),%r11d
  add    %r9d,%r12d
  movzwl 0x2c(%rsp),%r9d
  add    %edx,%r8d
  add    0xe(%rsp),%r9w
  add    %edx,%r11d
  jmp    L3356
  nopl   (%rax)
L2945:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %ax,%r14w
  je     L2160
L3356:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L2945
  cmp    %r12d,%ecx
  jg     L2945
  cmpw   $0x0,0x2c(%rsp)
  jle    L2945
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %ax,0x14(%rsp)
  mov    %edi,%esi
L3472:
  movzwl %dx,%ebx
  cmp    %r8d,%ebx
  jl     L3408
  cmp    %r11d,%ebx
  jg     L3408
  mov    0x90(%rsp),%rax
  lea    (%rcx,%rbx,2),%ebx
  mov    %esi,%ebp
  movzwl (%rax,%rbp,1),%ebp
  or     %bp,0x0(%r13,%rbx,1)
L3408:
  add    $0x1,%edx
  add    $0x2,%esi
  cmp    %r9w,%dx
  jne    L3472
  movzwl 0x14(%rsp),%eax
  jmp    L2945
  nopw   0x0(%rax,%rax,1)
  cmp    $0x3,%sil
  je     L3365
  cmp    $0x4,%sil
  je     L3609
  cmp    $0x2,%sil
  jne    L2160
  test   %ax,%ax
  jle    L2160
  movswl %r9w,%r9d
  movswl %dx,%edx
  movswl 0x24(%rsp),%r12d
  add    %r14d,%eax
  movswl 0x20(%rsp),%r8d
  movswl 0x18(%rsp),%ebp
  lea    (%rdx,%r9,1),%r10d
  xor    %edi,%edi
  movswl 0x14(%rsp),%edx
  movzwl 0x2c(%rsp),%r11d
  add    %r9d,%r12d
  add    0xe(%rsp),%r11w
  add    %edx,%r8d
  add    %edx,%ebp
  jmp    L2353
  nopl   0x0(%rax,%rax,1)
L1968:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %r14w,%ax
  je     L2160
L2353:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L1968
  cmp    %r12d,%ecx
  jg     L1968
  cmpw   $0x0,0x2c(%rsp)
  jle    L1968
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %edi,0x20(%rsp)
  mov    %edi,%esi
  mov    %ax,0x14(%rsp)
  nopl   0x0(%rax)
L1267:
  movzwl %dx,%r9d
  cmp    %r8d,%r9d
  jl     L52
  cmp    %ebp,%r9d
  jg     L52
  mov    0x90(%rsp),%rdi
  lea    (%rcx,%r9,2),%r9d
  mov    %esi,%ebx
  add    %r13,%r9
  movzwl (%r9),%eax
  imul   (%rdi,%rbx,1),%ax
  mov    %ax,(%r9)
L52:
  add    $0x1,%edx
  add    $0x2,%esi
  cmp    %dx,%r11w
  jne    L1267
  movzwl 0x14(%rsp),%eax
  mov    0x20(%rsp),%edi
  jmp    L1968
  xchg   %ax,%ax
  cmp    $0x3,%sil
  je     L1756
  cmp    $0x4,%sil
  je     L1437
  cmp    $0x2,%sil
  jne    L2160
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  xor    %r11d,%r11d
  lea    (%rdx,%r9,1),%edi
  movswl 0x14(%rsp),%esi
  mov    %edi,0x28(%rsp)
  lea    (%r14,%rax,1),%edi
  lea    (%r12,%r9,1),%eax
  mov    %eax,0x24(%rsp)
  movswl 0x20(%rsp),%eax
  mov    %edi,%r12d
  mov    %esi,0x38(%rsp)
  mov    %eax,0x3c(%rsp)
  movswl 0x18(%rsp),%eax
  mov    %r13,0x18(%rsp)
  add    %esi,%eax
  mov    %eax,0x14(%rsp)
  movzbl 0x2e(%rsp),%eax
  not    %eax
  movzbl %al,%eax
  mov    %eax,0x40(%rsp)
  jmp    L235
L1793:
  add    $0x1,%r14d
  add    %r15d,%r11d
  cmp    %r12w,%r14w
  je     L2160
L235:
  movzwl %r14w,%eax
  cmp    0x28(%rsp),%eax
  jl     L1793
  cmp    0x24(%rsp),%eax
  jg     L1793
  movzwl 0x2c(%rsp),%esi
  test   %si,%si
  jle    L1793
  imul   0x10(%rsp),%eax
  mov    %r11d,0x30(%rsp)
  mov    %r11d,%r8d
  movzbl 0x2e(%rsp),%r13d
  mov    0x40(%rsp),%r11d
  mov    0x3c(%rsp),%ebx
  add    0x38(%rsp),%ebx
  mov    %eax,0x20(%rsp)
  movzwl 0xe(%rsp),%eax
  add    %eax,%esi
  mov    %esi,%r10d
  nopl   0x0(%rax)
L3170:
  movzwl %ax,%edx
  cmp    %ebx,%edx
  jl     L168
  cmp    0x14(%rsp),%edx
  jg     L168
  mov    0x20(%rsp),%esi
  lea    (%rsi,%rdx,2),%r9d
  mov    0x90(%rsp),%rsi
  add    0x18(%rsp),%r9
  mov    %r8d,%edx
  movzwl (%r9),%edi
  movzwl (%rsi,%rdx,1),%edx
  mov    %edi,%esi
  mov    %edi,%ebp
  shr    $0x5,%di
  mov    %edx,%ecx
  shr    $0xb,%si
  and    $0x1f,%ebp
  and    $0x3f,%edi
  shr    $0xb,%cx
  imul   %r11d,%ebp
  movzwl %si,%esi
  movzwl %cx,%ecx
  imul   %r11d,%esi
  imul   %r13d,%ecx
  imul   %r11d,%edi
  add    %ecx,%esi
  mov    %edx,%ecx
  shr    $0x5,%dx
  and    $0x1f,%ecx
  and    $0x3f,%edx
  sar    $0x8,%esi
  imul   %r13d,%ecx
  shl    $0xb,%esi
  imul   %r13d,%edx
  add    %ebp,%ecx
  add    %edi,%edx
  sar    $0x8,%ecx
  sar    $0x8,%edx
  or     %esi,%ecx
  shl    $0x5,%edx
  or     %edx,%ecx
  mov    %cx,(%r9)
L168:
  add    $0x1,%eax
  add    $0x2,%r8d
  cmp    %r10w,%ax
  jne    L3170
  mov    0x30(%rsp),%r11d
  jmp    L1793
  nopl   0x0(%rax,%rax,1)
  cmp    $0x3,%sil
  je     L393
  cmp    $0x4,%sil
  je     L102
  cmp    $0x2,%sil
  jne    L2160
  test   %ax,%ax
  jle    L2160
  movswl %r9w,%r9d
  movswl %dx,%edx
  movswl 0x24(%rsp),%r12d
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x20(%rsp),%r8d
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  movswl 0x18(%rsp),%r11d
  add    %r9d,%r12d
  movzwl 0x2c(%rsp),%r9d
  add    %edx,%r8d
  add    0xe(%rsp),%r9w
  add    %edx,%r11d
  jmp    L2645
  nopl   (%rax)
L3167:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %r14w,%ax
  je     L2160
L2645:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L3167
  cmp    %r12d,%ecx
  jg     L3167
  cmpw   $0x0,0x2c(%rsp)
  jle    L3167
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %ax,0x14(%rsp)
  mov    %edi,%esi
L1750:
  movzwl %dx,%ebx
  cmp    %r8d,%ebx
  jl     L2770
  cmp    %r11d,%ebx
  jg     L2770
  mov    0x90(%rsp),%rax
  lea    (%rcx,%rbx,2),%ebx
  mov    %esi,%ebp
  movzwl (%rax,%rbp,1),%ebp
  sub    %bp,0x0(%r13,%rbx,1)
L2770:
  add    $0x1,%edx
  add    $0x2,%esi
  cmp    %dx,%r9w
  jne    L1750
  movzwl 0x14(%rsp),%eax
  jmp    L3167
  nopw   0x0(%rax,%rax,1)
L1210:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x18(%rsp),%ebx
  movswl 0x14(%rsp),%edx
  xor    %r8d,%r8d
  add    %r9d,%r12d
  movswl 0x20(%rsp),%r9d
  movzwl 0x2c(%rsp),%r11d
  add    %edx,%ebx
  add    0xe(%rsp),%r11w
  add    %edx,%r9d
  jmp    L3002
  cs nopw 0x0(%rax,%rax,1)
L1479:
  add    $0x1,%r14d
  add    %r15d,%r8d
  cmp    %ax,%r14w
  je     L2160
L3002:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L1479
  cmp    %r12d,%ecx
  jg     L1479
  cmpw   $0x0,0x2c(%rsp)
  jle    L1479
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %ax,0x14(%rsp)
  mov    %r8d,%edi
  nopl   0x0(%rax)
L3711:
  movzwl %dx,%esi
  cmp    %r9d,%esi
  jl     L315
  cmp    %ebx,%esi
  jg     L315
  mov    0x90(%rsp),%rax
  mov    %edi,%ebp
  lea    (%rcx,%rsi,2),%esi
  movzwl (%rax,%rbp,1),%ebp
  mov    %bp,0x0(%r13,%rsi,1)
L315:
  add    $0x1,%edx
  add    $0x2,%edi
  cmp    %r11w,%dx
  jne    L3711
  movzwl 0x14(%rsp),%eax
  jmp    L1479
  cs nopw 0x0(%rax,%rax,1)
L102:
  test   %ax,%ax
  jle    L2160
  movswl %r9w,%r9d
  movswl %dx,%edx
  movswl 0x24(%rsp),%r12d
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x20(%rsp),%r8d
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  movswl 0x18(%rsp),%r11d
  add    %r9d,%r12d
  movzwl 0x2c(%rsp),%r9d
  add    %edx,%r8d
  add    0xe(%rsp),%r9w
  add    %edx,%r11d
  jmp    L2529
  nopw   0x0(%rax,%rax,1)
L1510:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %r14w,%ax
  je     L2160
L2529:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L1510
  cmp    %r12d,%ecx
  jg     L1510
  cmpw   $0x0,0x2c(%rsp)
  jle    L1510
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %ax,0x14(%rsp)
  mov    %edi,%esi
  nopl   0x0(%rax,%rax,1)
L1403:
  movzwl %dx,%ebx
  cmp    %r8d,%ebx
  jl     L130
  cmp    %r11d,%ebx
  jg     L130
  mov    0x90(%rsp),%rax
  lea    (%rcx,%rbx,4),%ebx
  mov    %esi,%ebp
  mov    (%rax,%rbp,1),%ebp
  sub    %ebp,0x0(%r13,%rbx,1)
L130:
  add    $0x1,%edx
  add    $0x4,%esi
  cmp    %dx,%r9w
  jne    L1403
  movzwl 0x14(%rsp),%eax
  jmp    L1510
  nopl   (%rax)
L1437:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  add    %r14d,%eax
  movswl %dx,%edx
  mov    %ax,0x2e(%rsp)
  lea    (%rdx,%r9,1),%edi
  movswl 0x20(%rsp),%edx
  xor    %r8d,%r8d
  lea    (%r12,%r9,1),%eax
  mov    %edi,0x28(%rsp)
  movzwl 0x2c(%rsp),%r12d
  mov    %eax,0x24(%rsp)
  movswl 0x14(%rsp),%eax
  mov    %r13,0x30(%rsp)
  add    0xe(%rsp),%r12w
  lea    (%rdx,%rax,1),%ebp
  movswl 0x18(%rsp),%edx
  add    %edx,%eax
  mov    %eax,0x20(%rsp)
  jmp    L2504
  nopl   0x0(%rax)
L2394:
  add    $0x1,%r14d
  add    %r15d,%r8d
  cmp    0x2e(%rsp),%r14w
  je     L2160
L2504:
  movzwl %r14w,%eax
  cmp    0x28(%rsp),%eax
  jl     L2394
  cmp    0x24(%rsp),%eax
  jg     L2394
  cmpw   $0x0,0x2c(%rsp)
  jle    L2394
  imul   0x10(%rsp),%eax
  movzwl 0xe(%rsp),%edx
  mov    %r8d,%edi
  mov    %eax,0x18(%rsp)
  nopl   0x0(%rax)
L1068:
  movzwl %dx,%eax
  cmp    %ebp,%eax
  jl     L1684
  cmp    0x20(%rsp),%eax
  jg     L1684
  mov    0x18(%rsp),%ebx
  lea    (%rbx,%rax,4),%r11d
  mov    0x90(%rsp),%rbx
  mov    %edi,%eax
  add    0x30(%rsp),%r11
  mov    (%r11),%ecx
  mov    (%rbx,%rax,1),%eax
  mov    %ecx,0x14(%rsp)
  movzbl 0x14(%rsp),%r13d
  mov    %eax,%ebx
  movzbl %ah,%esi
  shr    $0x18,%ebx
  mov    %esi,%r9d
  movzbl %ch,%esi
  mov    %ebx,%r10d
  imul   %ebx,%r9d
  not    %r10d
  movzbl %r10b,%r10d
  imul   %r10d,%esi
  imul   %r10d,%r13d
  add    %esi,%r9d
  movzbl %al,%esi
  imul   %ebx,%esi
  and    $0xff00,%r9d
  add    %r13d,%esi
  mov    %esi,%ecx
  movzbl %ch,%esi
  mov    0x14(%rsp),%ecx
  or     %r9d,%esi
  mov    %eax,%r9d
  shr    $0x10,%eax
  shr    $0x10,%ecx
  movzbl %al,%eax
  and    $0xff000000,%r9d
  movzbl %cl,%ecx
  imul   %ebx,%eax
  or     %esi,%r9d
  imul   %r10d,%ecx
  add    %ecx,%eax
  shl    $0x8,%eax
  and    $0xff0000,%eax
  or     %eax,%r9d
  mov    %r9d,(%r11)
L1684:
  add    $0x1,%edx
  add    $0x4,%edi
  cmp    %r12w,%dx
  jne    L1068
  jmp    L2394
  nopl   0x0(%rax)
L3609:
  test   %ax,%ax
  jle    L2160
  movswl %r9w,%r9d
  movswl %dx,%edx
  movswl 0x24(%rsp),%r12d
  add    %r14d,%eax
  movswl 0x20(%rsp),%r8d
  movswl 0x18(%rsp),%ebp
  lea    (%rdx,%r9,1),%r10d
  xor    %edi,%edi
  movswl 0x14(%rsp),%edx
  movzwl 0x2c(%rsp),%r11d
  add    %r9d,%r12d
  add    0xe(%rsp),%r11w
  add    %edx,%r8d
  add    %edx,%ebp
  jmp    L559
  nopl   (%rax)
L2038:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %r14w,%ax
  je     L2160
L559:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L2038
  cmp    %r12d,%ecx
  jg     L2038
  cmpw   $0x0,0x2c(%rsp)
  jle    L2038
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %edi,0x20(%rsp)
  mov    %edi,%esi
  mov    %ax,0x14(%rsp)
  nopl   0x0(%rax)
L1970:
  movzwl %dx,%r9d
  cmp    %r8d,%r9d
  jl     L2638
  cmp    %ebp,%r9d
  jg     L2638
  mov    0x90(%rsp),%rdi
  lea    (%rcx,%r9,4),%r9d
  mov    %esi,%ebx
  add    %r13,%r9
  mov    (%r9),%eax
  imul   (%rdi,%rbx,1),%eax
  mov    %eax,(%r9)
L2638:
  add    $0x1,%edx
  add    $0x4,%esi
  cmp    %dx,%r11w
  jne    L1970
  movzwl 0x14(%rsp),%eax
  mov    0x20(%rsp),%edi
  jmp    L2038
  nopl   0x0(%rax,%rax,1)
L3670:
  test   %ax,%ax
  jle    L2160
  movswl %r9w,%r9d
  movswl %dx,%edx
  movswl 0x24(%rsp),%r12d
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x20(%rsp),%r8d
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  movswl 0x18(%rsp),%r11d
  add    %r9d,%r12d
  movzwl 0x2c(%rsp),%r9d
  add    %edx,%r8d
  add    0xe(%rsp),%r9w
  add    %edx,%r11d
  jmp    L2322
  nopw   0x0(%rax,%rax,1)
L849:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %ax,%r14w
  je     L2160
L2322:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L849
  cmp    %r12d,%ecx
  jg     L849
  cmpw   $0x0,0x2c(%rsp)
  jle    L849
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %ax,0x14(%rsp)
  mov    %edi,%esi
  nopl   0x0(%rax,%rax,1)
L775:
  movzwl %dx,%ebx
  cmp    %r8d,%ebx
  jl     L244
  cmp    %r11d,%ebx
  jg     L244
  mov    0x90(%rsp),%rax
  lea    (%rcx,%rbx,4),%ebx
  mov    %esi,%ebp
  mov    (%rax,%rbp,1),%ebp
  or     %ebp,0x0(%r13,%rbx,1)
L244:
  add    $0x1,%edx
  add    $0x4,%esi
  cmp    %r9w,%dx
  jne    L775
  movzwl 0x14(%rsp),%eax
  jmp    L849
  nopl   (%rax)
L859:
  test   %ax,%ax
  jle    L2160
  movswl %r9w,%r9d
  movswl %dx,%edx
  movswl 0x24(%rsp),%r12d
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x20(%rsp),%r8d
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  movswl 0x18(%rsp),%r11d
  add    %r9d,%r12d
  movzwl 0x2c(%rsp),%r9d
  add    %edx,%r8d
  add    0xe(%rsp),%r9w
  add    %edx,%r11d
  jmp    L953
  nop
L1523:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %r14w,%ax
  je     L2160
L953:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L1523
  cmp    %r12d,%ecx
  jg     L1523
  cmpw   $0x0,0x2c(%rsp)
  jle    L1523
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %ax,0x14(%rsp)
  mov    %edi,%esi
  nopl   0x0(%rax,%rax,1)
L2249:
  movzwl %dx,%ebx
  cmp    %r8d,%ebx
  jl     L129
  cmp    %r11d,%ebx
  jg     L129
  mov    0x90(%rsp),%rax
  lea    (%rcx,%rbx,4),%ebx
  mov    %esi,%ebp
  mov    (%rax,%rbp,1),%ebp
  add    %ebp,0x0(%r13,%rbx,1)
L129:
  add    $0x1,%edx
  add    $0x4,%esi
  cmp    %dx,%r9w
  jne    L2249
  movzwl 0x14(%rsp),%eax
  jmp    L1523
  nopl   (%rax)
L22:
  test   %ax,%ax
  jle    L2160
  movswl %r9w,%r9d
  movswl %dx,%edx
  movswl 0x24(%rsp),%r12d
  add    %r14d,%eax
  movswl 0x20(%rsp),%r8d
  movswl 0x18(%rsp),%ebx
  lea    (%rdx,%r9,1),%r10d
  xor    %edi,%edi
  movswl 0x14(%rsp),%edx
  movzwl 0x2c(%rsp),%r11d
  add    %r9d,%r12d
  add    0xe(%rsp),%r11w
  add    %edx,%r8d
  add    %edx,%ebx
  jmp    L2377
  nopl   (%rax)
L1695:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %ax,%r14w
  je     L2160
L2377:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L1695
  cmp    %r12d,%ecx
  jg     L1695
  cmpw   $0x0,0x2c(%rsp)
  jle    L1695
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %ax,0x14(%rsp)
  mov    %edi,%esi
  nopl   0x0(%rax,%rax,1)
L3202:
  movzwl %dx,%r9d
  cmp    %r8d,%r9d
  jl     L1125
  cmp    %ebx,%r9d
  jg     L1125
  lea    (%rcx,%r9,4),%r9d
  mov    0xd0(%rsp),%ebp
  add    %r13,%r9
  xor    (%r9),%ebp
  and    $0xffffff00,%ebp
  jne    L1125
  mov    0x90(%rsp),%rax
  mov    %esi,%ebp
  mov    (%rax,%rbp,1),%ebp
  mov    %ebp,(%r9)
  nopw   0x0(%rax,%rax,1)
L1125:
  add    $0x1,%edx
  add    $0x4,%esi
  cmp    %r11w,%dx
  jne    L3202
  movzwl 0x14(%rsp),%eax
  jmp    L1695
  cs nopw 0x0(%rax,%rax,1)
L2155:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  xor    %r8d,%r8d
  lea    (%r14,%rax,1),%r11d
  lea    (%rdx,%r9,1),%r10d
  movswl 0x18(%rsp),%edx
  movzwl 0x2c(%rsp),%ebp
  lea    (%r12,%r9,1),%eax
  movswl 0x20(%rsp),%r9d
  add    0xe(%rsp),%bp
  mov    %eax,0x24(%rsp)
  movswl 0x14(%rsp),%eax
  add    %eax,%r9d
  lea    (%rdx,%rax,1),%r12d
  jmp    L533
  nopl   0x0(%rax)
L3192:
  add    $0x1,%r14d
  add    %r15d,%r8d
  cmp    %r14w,%r11w
  je     L2160
L533:
  movzwl %r14w,%esi
  cmp    %r10d,%esi
  jl     L3192
  cmp    0x24(%rsp),%esi
  jg     L3192
  cmpw   $0x0,0x2c(%rsp)
  jle    L3192
  imul   0x10(%rsp),%esi
  mov    %r10d,0x14(%rsp)
  mov    %r8d,%edi
  mov    %r8d,0x20(%rsp)
  movzwl 0xe(%rsp),%ecx
  nop
L596:
  movzwl %cx,%eax
  cmp    %r9d,%eax
  jl     L1002
  cmp    %r12d,%eax
  jg     L1002
  lea    (%rsi,%rax,4),%ebx
  mov    %edi,%edx
  mov    0x90(%rsp),%r8
  add    %r13,%rbx
  mov    %rdx,%r10
  xor    %edx,%edx
  mov    (%rbx),%eax
  divl   (%r8,%r10,1)
  mov    %eax,(%rbx)
L1002:
  add    $0x1,%ecx
  add    $0x4,%edi
  cmp    %cx,%bp
  jne    L596
  mov    0x14(%rsp),%r10d
  mov    0x20(%rsp),%r8d
  jmp    L3192
  nopl   0x0(%rax)
L1092:
  test   %ax,%ax
  jle    L2160
  movswl %r9w,%r9d
  movswl %dx,%edx
  movswl 0x24(%rsp),%r12d
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x20(%rsp),%r8d
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  movswl 0x18(%rsp),%r11d
  add    %r9d,%r12d
  movzwl 0x2c(%rsp),%r9d
  add    %edx,%r8d
  add    0xe(%rsp),%r9w
  add    %edx,%r11d
  jmp    L2735
  nop
L2696:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %ax,%r14w
  je     L2160
L2735:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L2696
  cmp    %r12d,%ecx
  jg     L2696
  cmpw   $0x0,0x2c(%rsp)
  jle    L2696
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %ax,0x14(%rsp)
  mov    %edi,%esi
  nopl   0x0(%rax,%rax,1)
L161:
  movzwl %dx,%ebx
  cmp    %r8d,%ebx
  jl     L578
  cmp    %r11d,%ebx
  jg     L578
  mov    0x90(%rsp),%rax
  lea    (%rcx,%rbx,4),%ebx
  mov    %esi,%ebp
  mov    (%rax,%rbp,1),%ebp
  xor    %ebp,0x0(%r13,%rbx,1)
L578:
  add    $0x1,%edx
  add    $0x4,%esi
  cmp    %r9w,%dx
  jne    L161
  movzwl 0x14(%rsp),%eax
  jmp    L2696
  nopl   (%rax)
L67:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x18(%rsp),%ecx
  movswl 0x14(%rsp),%edx
  xor    %r8d,%r8d
  lea    (%r12,%r9,1),%ebp
  movswl 0x20(%rsp),%r9d
  movzwl 0x2c(%rsp),%r11d
  lea    (%rcx,%rdx,1),%r12d
  add    0xe(%rsp),%r11w
  add    %edx,%r9d
  jmp    L1112
  nopl   0x0(%rax)
L256:
  add    $0x1,%r14d
  add    %r15d,%r8d
  cmp    %ax,%r14w
  je     L2160
L1112:
  movzwl %r14w,%edx
  cmp    %r10d,%edx
  jl     L256
  cmp    %ebp,%edx
  jg     L256
  cmpw   $0x0,0x2c(%rsp)
  jle    L256
  imul   0x10(%rsp),%edx
  mov    %r8d,%esi
  mov    %edx,0x14(%rsp)
  movzwl 0xe(%rsp),%edx
  nop
L1236:
  movzwl %dx,%ecx
  cmp    %r9d,%ecx
  jl     L48
  cmp    %r12d,%ecx
  jg     L48
  mov    0x90(%rsp),%rbx
  mov    %esi,%edi
  mov    (%rbx,%rdi,1),%edi
  mov    0xd0(%rsp),%ebx
  xor    %edi,%ebx
  and    $0xffffff00,%ebx
  je     L48
  mov    0x14(%rsp),%ebx
  lea    (%rbx,%rcx,4),%ecx
  mov    %edi,0x0(%r13,%rcx,1)
  nopw   0x0(%rax,%rax,1)
L48:
  add    $0x1,%edx
  add    $0x4,%esi
  cmp    %r11w,%dx
  jne    L1236
  jmp    L256
  nopl   0x0(%rax)
L3456:
  test   %ax,%ax
  jle    L2160
  movswl %r9w,%r9d
  movswl %dx,%edx
  movswl 0x24(%rsp),%r12d
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x20(%rsp),%r8d
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  movswl 0x18(%rsp),%r11d
  add    %r9d,%r12d
  movzwl 0x2c(%rsp),%r9d
  add    %edx,%r8d
  add    0xe(%rsp),%r9w
  add    %edx,%r11d
  jmp    L355
  nop
L2258:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %ax,%r14w
  je     L2160
L355:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L2258
  cmp    %r12d,%ecx
  jg     L2258
  cmpw   $0x0,0x2c(%rsp)
  jle    L2258
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %ax,0x14(%rsp)
  mov    %edi,%esi
  nopl   0x0(%rax,%rax,1)
L2245:
  movzwl %dx,%ebx
  cmp    %r8d,%ebx
  jl     L2041
  cmp    %r11d,%ebx
  jg     L2041
  mov    0x90(%rsp),%rax
  lea    (%rcx,%rbx,4),%ebx
  mov    %esi,%ebp
  mov    (%rax,%rbp,1),%ebp
  and    %ebp,0x0(%r13,%rbx,1)
L2041:
  add    $0x1,%edx
  add    $0x4,%esi
  cmp    %r9w,%dx
  jne    L2245
  movzwl 0x14(%rsp),%eax
  jmp    L2258
  nopl   (%rax)
L1868:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x18(%rsp),%ebx
  movswl 0x14(%rsp),%edx
  xor    %r8d,%r8d
  add    %r9d,%r12d
  movswl 0x20(%rsp),%r9d
  movzwl 0x2c(%rsp),%r11d
  add    %edx,%ebx
  add    0xe(%rsp),%r11w
  add    %edx,%r9d
  jmp    L343
  xchg   %ax,%ax
L2771:
  add    $0x1,%r14d
  add    %r15d,%r8d
  cmp    %ax,%r14w
  je     L2160
L343:
  movzwl %r14w,%ecx
  cmp    %r10d,%ecx
  jl     L2771
  cmp    %r12d,%ecx
  jg     L2771
  cmpw   $0x0,0x2c(%rsp)
  jle    L2771
  imul   0x10(%rsp),%ecx
  movzwl 0xe(%rsp),%edx
  mov    %ax,0x14(%rsp)
  mov    %r8d,%edi
  nopl   0x0(%rax)
L107:
  movzwl %dx,%esi
  cmp    %r9d,%esi
  jl     L426
  cmp    %ebx,%esi
  jg     L426
  mov    0x90(%rsp),%rax
  mov    %edi,%ebp
  lea    (%rcx,%rsi,4),%esi
  mov    (%rax,%rbp,1),%ebp
  mov    %ebp,0x0(%r13,%rsi,1)
L426:
  add    $0x1,%edx
  add    $0x4,%edi
  cmp    %r11w,%dx
  jne    L107
  movzwl 0x14(%rsp),%eax
  jmp    L2771
  nopl   0x0(%rax)
L393:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x18(%rsp),%ebp
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  add    %r9d,%r12d
  movswl 0x20(%rsp),%r9d
  movzwl 0x2c(%rsp),%r11d
  mov    0x90(%rsp),%rbx
  add    0xe(%rsp),%r11w
  add    %edx,%ebp
  add    %edx,%r9d
  jmp    L1204
  nopl   (%rax)
L213:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %r14w,%ax
  je     L2160
L1204:
  movzwl %r14w,%edx
  cmp    %r10d,%edx
  jl     L213
  cmp    %r12d,%edx
  jg     L213
  cmpw   $0x0,0x2c(%rsp)
  jle    L213
  imul   0x10(%rsp),%edx
  mov    %ax,0x20(%rsp)
  mov    %edi,%ecx
  mov    %edx,0x14(%rsp)
  movzwl 0xe(%rsp),%edx
  nopl   0x0(%rax)
L1132:
  movzwl %dx,%esi
  cmp    %r9d,%esi
  jl     L1494
  cmp    %ebp,%esi
  jg     L1494
  mov    0x14(%rsp),%r8d
  lea    (%rsi,%rsi,2),%esi
  add    %r8d,%esi
  mov    %ecx,%r8d
  mov    %esi,%esi
  movzbl (%rbx,%r8,1),%eax
  sub    %al,0x0(%r13,%rsi,1)
  movzbl 0x1(%rbx,%r8,1),%eax
  sub    %al,0x1(%r13,%rsi,1)
  movzbl 0x2(%rbx,%r8,1),%r8d
  sub    %r8b,0x2(%r13,%rsi,1)
L1494:
  add    $0x1,%edx
  add    $0x3,%ecx
  cmp    %dx,%r11w
  jne    L1132
  movzwl 0x20(%rsp),%eax
  jmp    L213
  nopw   0x0(%rax,%rax,1)
L1756:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  xor    %r11d,%r11d
  lea    (%r14,%rax,1),%ebp
  movswl 0x14(%rsp),%esi
  lea    (%rdx,%r9,1),%edi
  lea    (%r12,%r9,1),%eax
  mov    %ebp,%r10d
  mov    %edi,0x28(%rsp)
  mov    %r13,%rbp
  mov    %eax,0x24(%rsp)
  movswl 0x20(%rsp),%eax
  mov    %esi,0x44(%rsp)
  mov    %eax,0x48(%rsp)
  movswl 0x18(%rsp),%eax
  add    %esi,%eax
  mov    %eax,0x14(%rsp)
  movzbl 0x2e(%rsp),%eax
  not    %eax
  movzbl %al,%eax
  mov    %eax,0x4c(%rsp)
  jmp    L2161
L25:
  add    $0x1,%r14d
  add    %r15d,%r11d
  cmp    %r10w,%r14w
  je     L2160
L2161:
  movzwl %r14w,%eax
  cmp    0x28(%rsp),%eax
  jl     L25
  cmp    0x24(%rsp),%eax
  jg     L25
  movzwl 0x2c(%rsp),%ebx
  test   %bx,%bx
  jle    L25
  imul   0x10(%rsp),%eax
  mov    %r15d,0x30(%rsp)
  mov    %r11d,%edx
  mov    %r14w,0x38(%rsp)
  mov    0x4c(%rsp),%r14d
  mov    %r10w,0x40(%rsp)
  mov    0x90(%rsp),%r10
  mov    %eax,0x18(%rsp)
  movzwl 0xe(%rsp),%eax
  mov    %r11d,0x3c(%rsp)
  mov    0x48(%rsp),%r8d
  add    %eax,%ebx
  add    0x44(%rsp),%r8d
  mov    %ebx,%edi
  movzbl 0x2e(%rsp),%ebx
  mov    %ebx,%r11d
  nopl   (%rax)
L633:
  movzwl %ax,%ecx
  cmp    %r8d,%ecx
  jl     L779
  cmp    0x14(%rsp),%ecx
  jg     L779
  mov    0x18(%rsp),%ebx
  lea    (%rcx,%rcx,2),%ecx
  mov    %edx,%esi
  add    %ebx,%ecx
  movzbl 0x1(%r10,%rsi,1),%ebx
  mov    %ecx,%ecx
  lea    0x1(%rbp,%rcx,1),%r13
  lea    0x0(%rbp,%rcx,1),%r15
  imul   %r11d,%ebx
  lea    0x2(%rbp,%rcx,1),%r12
  movzbl 0x0(%r13),%ecx
  movzbl (%r12),%r9d
  imul   %r14d,%ecx
  imul   %r14d,%r9d
  add    %ecx,%ebx
  movzbl 0x2(%r10,%rsi,1),%ecx
  movzbl (%r10,%rsi,1),%esi
  movzbl %bh,%ebx
  imul   %r11d,%ecx
  imul   %r11d,%esi
  add    %r9d,%ecx
  movzbl (%r15),%r9d
  mov    %ecx,0x20(%rsp)
  imul   %r14d,%r9d
  add    %r9d,%esi
  mov    %esi,%ecx
  movzbl %ch,%ecx
  mov    %cl,(%r15)
  mov    %bl,0x0(%r13)
  mov    0x20(%rsp),%ebx
  movzbl %bh,%ebx
  mov    %bl,(%r12)
L779:
  add    $0x1,%eax
  add    $0x3,%edx
  cmp    %di,%ax
  jne    L633
  mov    0x30(%rsp),%r15d
  movzwl 0x38(%rsp),%r14d
  mov    0x3c(%rsp),%r11d
  movzwl 0x40(%rsp),%r10d
  jmp    L25
  nopl   0x0(%rax)
L3685:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  xor    %esi,%esi
  lea    (%r14,%rax,1),%ebp
  movswl 0x20(%rsp),%edi
  lea    (%rdx,%r9,1),%r8d
  movswl 0x18(%rsp),%edx
  lea    (%r12,%r9,1),%eax
  mov    %eax,0x24(%rsp)
  movswl 0x14(%rsp),%eax
  add    %eax,%edi
  lea    (%rdx,%rax,1),%r12d
  mov    0xd0(%rsp),%eax
  xor    %al,%al
  mov    %eax,0x14(%rsp)
  jmp    L1690
  nopl   0x0(%rax)
L2821:
  add    $0x1,%r14d
  add    %r15d,%esi
  cmp    %bp,%r14w
  je     L2160
L1690:
  movzwl %r14w,%edx
  cmp    %r8d,%edx
  jl     L2821
  cmp    0x24(%rsp),%edx
  jg     L2821
  movzwl 0x2c(%rsp),%eax
  test   %ax,%ax
  jle    L2821
  imul   0x10(%rsp),%edx
  mov    %esi,%ebx
  mov    %eax,%r9d
  mov    %esi,0x20(%rsp)
  movzwl 0xe(%rsp),%eax
  sub    %edx,%ebx
  mov    %edx,0x28(%rsp)
  mov    %edx,%ecx
  mov    0x90(%rsp),%rdx
  mov    %ebx,0x18(%rsp)
  add    %eax,%r9d
  nopl   0x0(%rax)
L611:
  movzwl %ax,%r10d
  cmp    %edi,%r10d
  jl     L3153
  cmp    %r12d,%r10d
  jg     L3153
  lea    (%r10,%r10,2),%ebx
  mov    %ecx,%r10d
  mov    0x14(%rsp),%esi
  movslq %ebx,%r11
  add    %r13,%r11
  cmp    %esi,(%r11,%r10,1)
  jne    L3153
  mov    0x18(%rsp),%esi
  lea    (%rsi,%rcx,1),%r10d
  mov    0x28(%rsp),%esi
  lea    (%rbx,%rsi,1),%r11d
  movzbl (%rdx,%r10,1),%ebx
  mov    %bl,0x0(%r13,%r11,1)
  movzbl 0x1(%rdx,%r10,1),%ebx
  mov    %bl,0x1(%r13,%r11,1)
  movzbl 0x2(%rdx,%r10,1),%r10d
  mov    %r10b,0x2(%r13,%r11,1)
  nopl   (%rax)
L3153:
  add    $0x1,%eax
  add    $0x3,%ecx
  cmp    %r9w,%ax
  jne    L611
  mov    0x20(%rsp),%esi
  jmp    L2821
  nopl   (%rax)
L309:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x18(%rsp),%ebp
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  add    %r9d,%r12d
  movswl 0x20(%rsp),%r9d
  movzwl 0x2c(%rsp),%r11d
  mov    0x90(%rsp),%rbx
  add    0xe(%rsp),%r11w
  add    %edx,%ebp
  add    %edx,%r9d
  jmp    L275
  nopl   (%rax)
L3299:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %r14w,%ax
  je     L2160
L275:
  movzwl %r14w,%edx
  cmp    %r10d,%edx
  jl     L3299
  cmp    %r12d,%edx
  jg     L3299
  cmpw   $0x0,0x2c(%rsp)
  jle    L3299
  imul   0x10(%rsp),%edx
  mov    %ax,0x20(%rsp)
  mov    %edi,%ecx
  mov    %edx,0x14(%rsp)
  movzwl 0xe(%rsp),%edx
  nopl   0x0(%rax)
L2119:
  movzwl %dx,%esi
  cmp    %r9d,%esi
  jl     L2092
  cmp    %ebp,%esi
  jg     L2092
  mov    0x14(%rsp),%r8d
  lea    (%rsi,%rsi,2),%esi
  add    %r8d,%esi
  mov    %ecx,%r8d
  mov    %esi,%esi
  movzbl (%rbx,%r8,1),%eax
  add    %al,0x0(%r13,%rsi,1)
  movzbl 0x1(%rbx,%r8,1),%eax
  add    %al,0x1(%r13,%rsi,1)
  movzbl 0x2(%rbx,%r8,1),%r8d
  add    %r8b,0x2(%r13,%rsi,1)
L2092:
  add    $0x1,%edx
  add    $0x3,%ecx
  cmp    %r11w,%dx
  jne    L2119
  movzwl 0x20(%rsp),%eax
  jmp    L3299
  nopw   0x0(%rax,%rax,1)
L2280:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x18(%rsp),%ebp
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  add    %r9d,%r12d
  movswl 0x20(%rsp),%r9d
  movzwl 0x2c(%rsp),%r11d
  mov    0x90(%rsp),%rbx
  add    0xe(%rsp),%r11w
  add    %edx,%ebp
  add    %edx,%r9d
  jmp    L3265
  nopl   (%rax)
L1516:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %ax,%r14w
  je     L2160
L3265:
  movzwl %r14w,%edx
  cmp    %r10d,%edx
  jl     L1516
  cmp    %r12d,%edx
  jg     L1516
  cmpw   $0x0,0x2c(%rsp)
  jle    L1516
  imul   0x10(%rsp),%edx
  mov    %ax,0x20(%rsp)
  mov    %edi,%ecx
  mov    %edx,0x14(%rsp)
  movzwl 0xe(%rsp),%edx
  nopl   0x0(%rax)
L1650:
  movzwl %dx,%esi
  cmp    %r9d,%esi
  jl     L1099
  cmp    %ebp,%esi
  jg     L1099
  mov    0x14(%rsp),%r8d
  lea    (%rsi,%rsi,2),%esi
  add    %r8d,%esi
  mov    %ecx,%r8d
  mov    %esi,%esi
  movzbl (%rbx,%r8,1),%eax
  or     %al,0x0(%r13,%rsi,1)
  movzbl 0x1(%rbx,%r8,1),%eax
  or     %al,0x1(%r13,%rsi,1)
  movzbl 0x2(%rbx,%r8,1),%r8d
  or     %r8b,0x2(%r13,%rsi,1)
L1099:
  add    $0x1,%edx
  add    $0x3,%ecx
  cmp    %r11w,%dx
  jne    L1650
  movzwl 0x20(%rsp),%eax
  jmp    L1516
  nopw   0x0(%rax,%rax,1)
L2521:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  xor    %r8d,%r8d
  lea    (%r14,%rax,1),%r11d
  lea    (%rdx,%r9,1),%edi
  movswl 0x20(%rsp),%edx
  movzwl 0x2c(%rsp),%r10d
  lea    (%r12,%r9,1),%eax
  mov    %edi,0x28(%rsp)
  add    0xe(%rsp),%r10w
  mov    %eax,0x24(%rsp)
  movswl 0x14(%rsp),%eax
  lea    (%rdx,%rax,1),%r12d
  movswl 0x18(%rsp),%edx
  add    %edx,%eax
  mov    %eax,0x14(%rsp)
  jmp    L3679
  nopl   0x0(%rax)
L2260:
  add    $0x1,%r14d
  add    %r15d,%r8d
  cmp    %r14w,%r11w
  je     L2160
L3679:
  movzwl %r14w,%eax
  cmp    0x28(%rsp),%eax
  jl     L2260
  cmp    0x24(%rsp),%eax
  jg     L2260
  cmpw   $0x0,0x2c(%rsp)
  jle    L2260
  imul   0x10(%rsp),%eax
  mov    %r8d,0x18(%rsp)
  mov    %r8d,%esi
  movzwl 0xe(%rsp),%ecx
  mov    0x90(%rsp),%r8
  mov    %eax,0x20(%rsp)
  nopw   0x0(%rax,%rax,1)
L1766:
  movzwl %cx,%eax
  cmp    %r12d,%eax
  jl     L3076
  cmp    0x14(%rsp),%eax
  jg     L3076
  mov    0x20(%rsp),%ebx
  lea    (%rax,%rax,2),%eax
  mov    %esi,%edi
  movsbl (%r8,%rdi,1),%ebp
  lea    (%rax,%rbx,1),%r9d
  lea    0x0(%r13,%r9,1),%rbx
  movsbl (%rbx),%eax
  cltd
  idiv   %ebp
  mov    %al,(%rbx)
  lea    0x1(%r13,%r9,1),%rbx
  movsbl 0x1(%r8,%rdi,1),%ebp
  lea    0x2(%r13,%r9,1),%r9
  movsbl (%rbx),%eax
  cltd
  idiv   %ebp
  mov    %al,(%rbx)
  movsbl (%r9),%eax
  movsbl 0x2(%r8,%rdi,1),%edi
  cltd
  idiv   %edi
  mov    %al,(%r9)
L3076:
  add    $0x1,%ecx
  add    $0x3,%esi
  cmp    %cx,%r10w
  jne    L1766
  mov    0x18(%rsp),%r8d
  jmp    L2260
  nopl   0x0(%rax,%rax,1)
L373:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x18(%rsp),%ebp
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  add    %r9d,%r12d
  movswl 0x20(%rsp),%r9d
  movzwl 0x2c(%rsp),%r11d
  mov    0x90(%rsp),%rbx
  add    0xe(%rsp),%r11w
  add    %edx,%ebp
  add    %edx,%r9d
  jmp    L1827
  nopl   (%rax)
L3266:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %ax,%r14w
  je     L2160
L1827:
  movzwl %r14w,%edx
  cmp    %r10d,%edx
  jl     L3266
  cmp    %r12d,%edx
  jg     L3266
  cmpw   $0x0,0x2c(%rsp)
  jle    L3266
  imul   0x10(%rsp),%edx
  mov    %ax,0x20(%rsp)
  mov    %edi,%ecx
  mov    %edx,0x14(%rsp)
  movzwl 0xe(%rsp),%edx
  nopl   0x0(%rax)
L250:
  movzwl %dx,%esi
  cmp    %r9d,%esi
  jl     L3074
  cmp    %ebp,%esi
  jg     L3074
  mov    0x14(%rsp),%r8d
  lea    (%rsi,%rsi,2),%esi
  add    %r8d,%esi
  mov    %ecx,%r8d
  mov    %esi,%esi
  movzbl (%rbx,%r8,1),%eax
  xor    %al,0x0(%r13,%rsi,1)
  movzbl 0x1(%rbx,%r8,1),%eax
  xor    %al,0x1(%r13,%rsi,1)
  movzbl 0x2(%rbx,%r8,1),%r8d
  xor    %r8b,0x2(%r13,%rsi,1)
L3074:
  add    $0x1,%edx
  add    $0x3,%ecx
  cmp    %r11w,%dx
  jne    L250
  movzwl 0x20(%rsp),%eax
  jmp    L3266
  nopw   0x0(%rax,%rax,1)
L992:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  xor    %edi,%edi
  lea    (%r14,%rax,1),%ebp
  lea    (%rdx,%r9,1),%r8d
  movswl 0x18(%rsp),%edx
  movzwl 0x2c(%rsp),%r10d
  lea    (%r12,%r9,1),%eax
  movswl 0x20(%rsp),%r9d
  mov    0x90(%rsp),%rbx
  mov    %eax,0x24(%rsp)
  movswl 0x14(%rsp),%eax
  add    0xe(%rsp),%r10w
  add    %eax,%r9d
  lea    (%rdx,%rax,1),%r12d
  jmp    L1295
  nopl   (%rax)
L3724:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %bp,%r14w
  je     L2160
L1295:
  movzwl %r14w,%eax
  cmp    %r8d,%eax
  jl     L3724
  cmp    0x24(%rsp),%eax
  jg     L3724
  cmpw   $0x0,0x2c(%rsp)
  jle    L3724
  imul   0x10(%rsp),%eax
  mov    %r15d,0x20(%rsp)
  mov    %edi,%ecx
  mov    %eax,0x14(%rsp)
  movzwl 0xe(%rsp),%eax
  nopl   (%rax)
L1872:
  movzwl %ax,%edx
  cmp    %r9d,%edx
  jl     L3372
  cmp    %r12d,%edx
  jg     L3372
  mov    %ecx,%esi
  mov    0xd0(%rsp),%r15d
  lea    (%rbx,%rsi,1),%r11
  xor    (%r11),%r15d
  and    $0xffffff00,%r15d
  je     L3372
  mov    0x14(%rsp),%r15d
  lea    (%rdx,%rdx,2),%edx
  movzbl (%r11),%r11d
  add    %r15d,%edx
  mov    %edx,%edx
  mov    %r11b,0x0(%r13,%rdx,1)
  movzbl 0x1(%rbx,%rsi,1),%r11d
  mov    %r11b,0x1(%r13,%rdx,1)
  movzbl 0x2(%rbx,%rsi,1),%esi
  mov    %sil,0x2(%r13,%rdx,1)
  nopw   0x0(%rax,%rax,1)
L3372:
  add    $0x1,%eax
  add    $0x3,%ecx
  cmp    %r10w,%ax
  jne    L1872
  mov    0x20(%rsp),%r15d
  jmp    L3724
  xchg   %ax,%ax
L3665:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x18(%rsp),%ebp
  movswl 0x14(%rsp),%edx
  xor    %r8d,%r8d
  add    %r9d,%r12d
  movswl 0x20(%rsp),%r9d
  movzwl 0x2c(%rsp),%r11d
  mov    0x90(%rsp),%rbx
  add    0xe(%rsp),%r11w
  add    %edx,%ebp
  add    %edx,%r9d
  jmp    L2225
  xchg   %ax,%ax
L3125:
  add    $0x1,%r14d
  add    %r15d,%r8d
  cmp    %ax,%r14w
  je     L2160
L2225:
  movzwl %r14w,%edx
  cmp    %r10d,%edx
  jl     L3125
  cmp    %r12d,%edx
  jg     L3125
  cmpw   $0x0,0x2c(%rsp)
  jle    L3125
  imul   0x10(%rsp),%edx
  mov    %ax,0x20(%rsp)
  mov    %r8d,%esi
  mov    %edx,0x14(%rsp)
  movzwl 0xe(%rsp),%edx
  nopl   (%rax)
L3122:
  movzwl %dx,%ecx
  cmp    %r9d,%ecx
  jl     L1261
  cmp    %ebp,%ecx
  jg     L1261
  mov    0x14(%rsp),%eax
  mov    %esi,%edi
  lea    (%rcx,%rcx,2),%ecx
  add    %eax,%ecx
  movzbl (%rbx,%rdi,1),%eax
  mov    %ecx,%ecx
  mov    %al,0x0(%r13,%rcx,1)
  movzbl 0x1(%rbx,%rdi,1),%eax
  mov    %al,0x1(%r13,%rcx,1)
  movzbl 0x2(%rbx,%rdi,1),%edi
  mov    %dil,0x2(%r13,%rcx,1)
L1261:
  add    $0x1,%edx
  add    $0x3,%esi
  cmp    %r11w,%dx
  jne    L3122
  movzwl 0x20(%rsp),%eax
  jmp    L3125
  nopl   0x0(%rax)
L1949:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  add    %r14d,%eax
  lea    (%rdx,%r9,1),%r10d
  movswl 0x18(%rsp),%ebp
  movswl 0x14(%rsp),%edx
  xor    %edi,%edi
  add    %r9d,%r12d
  movswl 0x20(%rsp),%r9d
  movzwl 0x2c(%rsp),%r11d
  mov    0x90(%rsp),%rbx
  add    0xe(%rsp),%r11w
  add    %edx,%ebp
  add    %edx,%r9d
  jmp    L1840
  nopl   (%rax)
L1433:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %ax,%r14w
  je     L2160
L1840:
  movzwl %r14w,%edx
  cmp    %r10d,%edx
  jl     L1433
  cmp    %r12d,%edx
  jg     L1433
  cmpw   $0x0,0x2c(%rsp)
  jle    L1433
  imul   0x10(%rsp),%edx
  mov    %ax,0x20(%rsp)
  mov    %edi,%ecx
  mov    %edx,0x14(%rsp)
  movzwl 0xe(%rsp),%edx
  nopl   0x0(%rax)
L1387:
  movzwl %dx,%esi
  cmp    %r9d,%esi
  jl     L1819
  cmp    %ebp,%esi
  jg     L1819
  mov    0x14(%rsp),%r8d
  lea    (%rsi,%rsi,2),%esi
  add    %r8d,%esi
  mov    %ecx,%r8d
  mov    %esi,%esi
  movzbl (%rbx,%r8,1),%eax
  and    %al,0x0(%r13,%rsi,1)
  movzbl 0x1(%rbx,%r8,1),%eax
  and    %al,0x1(%r13,%rsi,1)
  movzbl 0x2(%rbx,%r8,1),%r8d
  and    %r8b,0x2(%r13,%rsi,1)
L1819:
  add    $0x1,%edx
  add    $0x3,%ecx
  cmp    %r11w,%dx
  jne    L1387
  movzwl 0x20(%rsp),%eax
  jmp    L1433
  nopw   0x0(%rax,%rax,1)
L3365:
  test   %ax,%ax
  jle    L2160
  movswl 0x24(%rsp),%r12d
  movswl %r9w,%r9d
  movswl %dx,%edx
  xor    %edi,%edi
  lea    (%r14,%rax,1),%ebx
  lea    (%rdx,%r9,1),%r8d
  movswl 0x18(%rsp),%edx
  movswl 0x20(%rsp),%r10d
  lea    (%r12,%r9,1),%eax
  movzwl 0x2c(%rsp),%r11d
  add    0xe(%rsp),%r11w
  mov    %eax,0x24(%rsp)
  movswl 0x14(%rsp),%eax
  lea    (%rdx,%rax,1),%r12d
  add    %eax,%r10d
  mov    %r12d,0x14(%rsp)
  mov    0x90(%rsp),%r12
  jmp    L1521
  nopw   0x0(%rax,%rax,1)
L1808:
  add    $0x1,%r14d
  add    %r15d,%edi
  cmp    %r14w,%bx
  je     L2160
L1521:
  movzwl %r14w,%eax
  cmp    %r8d,%eax
  jl     L1808
  cmp    0x24(%rsp),%eax
  jg     L1808
  cmpw   $0x0,0x2c(%rsp)
  jle    L1808
  imul   0x10(%rsp),%eax
  movzwl 0xe(%rsp),%edx
  mov    %edi,%ecx
  mov    %eax,0x20(%rsp)
L799:
  movzwl %dx,%eax
  cmp    %r10d,%eax
  jl     L3038
  cmp    0x14(%rsp),%eax
  jg     L3038
  mov    0x20(%rsp),%esi
  lea    (%rax,%rax,2),%eax
  lea    (%rax,%rsi,1),%r9d
  mov    %ecx,%esi
  lea    0x0(%r13,%r9,1),%rbp
  movzbl 0x0(%rbp),%eax
  mulb   (%r12,%rsi,1)
  mov    %al,0x0(%rbp)
  lea    0x1(%r13,%r9,1),%rbp
  lea    0x2(%r13,%r9,1),%r9
  movzbl 0x0(%rbp),%eax
  mulb   0x1(%r12,%rsi,1)
  mov    %al,0x0(%rbp)
  movzbl (%r9),%eax
  mulb   0x2(%r12,%rsi,1)
  mov    %al,(%r9)
L3038:
  add    $0x1,%edx
  add    $0x3,%ecx
  cmp    %dx,%r11w
  jne    L799
  jmp    L1808
```

assistant: ```c
void c_blit_write(char *framebuffer, short screen_width, short screen_height, unsigned int bytes_per_line, short xoffset, short yoffset, char *blit_data, short x, short y, short w, short h, unsigned char bytes_per_pixel, unsigned char draw_mode, unsigned char alpha, unsigned int bcolor, short x_clip, short y_clip, short xx_clip, short yy_clip) {
  short fb_x = xoffset + x;
  short fb_y = yoffset + y;
  short xx = x + w;
  short yy = y + h;
  short horizontal;
  short vertical;
  unsigned int bline = w * bytes_per_pixel;
  if (draw_mode == 0 && x >= x_clip && xx <= xx_clip && y >= y_clip && yy <= yy_clip) {
    unsigned char *source = blit_data;
    unsigned char *dest = &framebuffer[(fb_y * bytes_per_line) + (fb_x * bytes_per_pixel)];
    for (vertical = 0; vertical < h; vertical++) {
      memcpy(dest, source, bline);
      source += bline;
      dest += bytes_per_line;
    }
  } else {
    switch (draw_mode) {
    case 0:
      switch (bytes_per_pixel) {
      case 4:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned int *)(framebuffer + xhbp_yvbl)) = *((unsigned int *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      case 3:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *(framebuffer + xhbp_yvbl) = *(blit_data + vhz);
                *(framebuffer + xhbp_yvbl + 1) = *(blit_data + vhz + 1);
                *(framebuffer + xhbp_yvbl + 2) = *(blit_data + vhz + 2);
              }
            }
          }
        }
        break;
      case 2:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned short *)(framebuffer + xhbp_yvbl)) = *((unsigned short *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      }
      break;
    case 1:
      switch (bytes_per_pixel) {
      case 4:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned int *)(framebuffer + xhbp_yvbl)) ^= *((unsigned int *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      case 3:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *(framebuffer + xhbp_yvbl) ^= *(blit_data + vhz);
                *(framebuffer + xhbp_yvbl + 1) ^= *(blit_data + vhz + 1);
                *(framebuffer + xhbp_yvbl + 2) ^= *(blit_data + vhz + 2);
              }
            }
          }
        }
        break;
      case 2:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned short *)(framebuffer + xhbp_yvbl)) ^= *((unsigned short *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      }
      break;
    case 2:
      switch (bytes_per_pixel) {
      case 4:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned int *)(framebuffer + xhbp_yvbl)) |= *((unsigned int *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      case 3:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *(framebuffer + xhbp_yvbl) |= *(blit_data + vhz);
                *(framebuffer + xhbp_yvbl + 1) |= *(blit_data + vhz + 1);
                *(framebuffer + xhbp_yvbl + 2) |= *(blit_data + vhz + 2);
              }
            }
          }
        }
        break;
      case 2:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned short *)(framebuffer + xhbp_yvbl)) |= *((unsigned short *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      }
      break;
    case 3:
      switch (bytes_per_pixel) {
      case 4:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned int *)(framebuffer + xhbp_yvbl)) &= *((unsigned int *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      case 3:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *(framebuffer + xhbp_yvbl) &= *(blit_data + vhz);
                *(framebuffer + xhbp_yvbl + 1) &= *(blit_data + vhz + 1);
                *(framebuffer + xhbp_yvbl + 2) &= *(blit_data + vhz + 2);
              }
            }
          }
        }
        break;
      case 2:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned short *)(framebuffer + xhbp_yvbl)) &= *((unsigned short *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      }
      break;
    case 4:
      switch (bytes_per_pixel) {
      case 4:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                unsigned int rgb = *((unsigned int *)(blit_data + vhz));
                if ((rgb & 0xFFFFFF00) != (bcolor & 0xFFFFFF00)) {
                  *((unsigned int *)(framebuffer + xhbp_yvbl)) = rgb;
                }
              }
            }
          }
        }
        break;
      case 3:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                if ((*((unsigned int *)(blit_data + vhz)) & 0xFFFFFF00) != (bcolor & 0xFFFFFF00)) {
                  *(framebuffer + xhbp_yvbl) = *(blit_data + vhz);
                  *(framebuffer + xhbp_yvbl + 1) = *(blit_data + vhz + 1);
                  *(framebuffer + xhbp_yvbl + 2) = *(blit_data + vhz + 2);
                }
              }
            }
          }
        }
        break;
      case 2:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                unsigned int rgb = *((unsigned short *)(blit_data + vhz));
                if (rgb != (bcolor & 0xFFFF)) {
                  *((unsigned short *)(framebuffer + xhbp_yvbl)) = rgb;
                }
              }
            }
          }
        }
        break;
      }
      break;
    case 5:
      switch (bytes_per_pixel) {
      case 4:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                if ((*((unsigned int *)(framebuffer + xhbp_yvbl)) & 0xFFFFFF00) == (bcolor & 0xFFFFFF00)) {
                  *((unsigned int *)(framebuffer + xhbp_yvbl)) = *((unsigned int *)(blit_data + vhz));
                }
              }
            }
          }
        }
        break;
      case 3:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                if (*((unsigned int *)(framebuffer + xhbp + yvhz)) == (bcolor & 0xFFFFFF00)) {
                  *(framebuffer + xhbp_yvbl) = *(blit_data + vhz);
                  *(framebuffer + xhbp_yvbl + 1) = *(blit_data + vhz + 1);
                  *(framebuffer + xhbp_yvbl + 2) = *(blit_data + vhz + 2);
                }
              }
            }
          }
        }
        break;
      case 2:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                if (*((unsigned short *)(framebuffer + xhbp + yvhz)) == (bcolor & 0xFFFF)) {
                  *((unsigned short *)(framebuffer + xhbp_yvbl)) = *((unsigned short *)(blit_data + vhz));
                }
              }
            }
          }
        }
        break;
      }
      break;
    case 6:
      switch (bytes_per_pixel) {
      case 4:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                unsigned int fb_rgb = *((unsigned int *)(framebuffer + xhbp_yvbl));
                unsigned char fb_r = fb_rgb & 255;
                unsigned char fb_g = (fb_rgb >> 8) & 255;
                unsigned char fb_b = (fb_rgb >> 16) & 255;
                unsigned int blit_rgb = *((unsigned int *)(blit_data + vhz));
                unsigned char R = blit_rgb & 255;
                unsigned char G = (blit_rgb >> 8) & 255;
                unsigned char B = (blit_rgb >> 16) & 255;
                unsigned char A = (blit_rgb >> 24) & 255;
                unsigned char invA = (255 - A);
                fb_r = ((R * A) + (fb_r * invA)) >> 8;
                fb_g = ((G * A) + (fb_g * invA)) >> 8;
                fb_b = ((B * A) + (fb_b * invA)) >> 8;
                *((unsigned int *)(framebuffer + xhbp_yvbl)) = fb_r | (fb_g << 8) | (fb_b << 16) | (A << 24);
              }
            }
          }
        }
        break;
      case 3:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                unsigned char fb_r = *(framebuffer + xhbp_yvbl);
                unsigned char fb_g = *(framebuffer + xhbp_yvbl + 1);
                unsigned char fb_b = *(framebuffer + xhbp_yvbl + 2);
                unsigned char R = *(blit_data + vhz);
                unsigned char G = *(blit_data + vhz + 1);
                unsigned char B = *(blit_data + vhz + 2);
                unsigned char invA = (255 - alpha);
                fb_r = ((R * alpha) + (fb_r * invA)) >> 8;
                fb_g = ((G * alpha) + (fb_g * invA)) >> 8;
                fb_b = ((B * alpha) + (fb_b * invA)) >> 8;
                *(framebuffer + xhbp_yvbl) = fb_r;
                *(framebuffer + xhbp_yvbl + 1) = fb_g;
                *(framebuffer + xhbp_yvbl + 2) = fb_b;
              }
            }
          }
        }
        break;
      case 2:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                unsigned short rgb565 = *((unsigned short *)(framebuffer + xhbp_yvbl));
                unsigned short fb_r = rgb565 & 31;
                unsigned short fb_g = (rgb565 >> 5) & 63;
                unsigned short fb_b = (rgb565 >> 11) & 31;
                rgb565 = *((unsigned short *)(blit_data + vhz));
                unsigned short R = rgb565 & 31;
                unsigned short G = (rgb565 >> 5) & 63;
                unsigned short B = (rgb565 >> 11) & 31;
                unsigned char invA = (255 - alpha);
                fb_r = ((R * alpha) + (fb_r * invA)) >> 8;
                fb_g = ((G * alpha) + (fb_g * invA)) >> 8;
                fb_b = ((B * alpha) + (fb_b * invA)) >> 8;
                *((unsigned short *)(framebuffer + xhbp_yvbl)) = (fb_b << 11) | (fb_g << 5) | fb_r;
              }
            }
          }
        }
        break;
      }
      break;
    case 7:
      switch (bytes_per_pixel) {
      case 4:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned int *)(framebuffer + xhbp_yvbl)) += *((unsigned int *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      case 3:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *(framebuffer + xhbp_yvbl) += *(blit_data + vhz);
                *(framebuffer + xhbp_yvbl + 1) += *(blit_data + vhz + 1);
                *(framebuffer + xhbp_yvbl + 2) += *(blit_data + vhz + 2);
              }
            }
          }
        }
        break;
      case 2:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned short *)(framebuffer + xhbp_yvbl)) += *((unsigned short *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      }
      break;
    case 8:
      switch (bytes_per_pixel) {
      case 4:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned int *)(framebuffer + xhbp_yvbl)) -= *((unsigned int *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      case 3:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *(framebuffer + xhbp_yvbl) -= *(blit_data + vhz);
                *(framebuffer + xhbp_yvbl + 1) -= *(blit_data + vhz + 1);
                *(framebuffer + xhbp_yvbl + 2) -= *(blit_data + vhz + 2);
              }
            }
          }
        }
        break;
      case 2:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned short *)(framebuffer + xhbp_yvbl)) -= *((unsigned short *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      }
      break;
    case 9:
      switch (bytes_per_pixel) {
      case 4:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned int *)(framebuffer + xhbp_yvbl)) *= *((unsigned int *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      case 3:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *(framebuffer + xhbp_yvbl) *= *(blit_data + vhz);
                *(framebuffer + xhbp_yvbl + 1) *= *(blit_data + vhz + 1);
                *(framebuffer + xhbp_yvbl + 2) *= *(blit_data + vhz + 2);
              }
            }
          }
        }
        break;
      case 2:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned short *)(framebuffer + xhbp_yvbl)) *= *((unsigned short *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      }
      break;
    case 10:
      switch (bytes_per_pixel) {
      case 4:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned int *)(framebuffer + xhbp_yvbl)) /= *((unsigned int *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      case 3:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *(framebuffer + xhbp_yvbl) /= *(blit_data + vhz);
                *(framebuffer + xhbp_yvbl + 1) /= *(blit_data + vhz + 1);
                *(framebuffer + xhbp_yvbl + 2) /= *(blit_data + vhz + 2);
              }
            }
          }
        }
        break;
      case 2:
        for (vertical = 0; vertical < h; vertical++) {
          unsigned int vbl = vertical * bline;
          unsigned short yv = fb_y + vertical;
          unsigned int yvbl = yv * bytes_per_line;
          if (yv >= (yoffset + y_clip) && yv <= (yoffset + yy_clip)) {
            for (horizontal = 0; horizontal < w; horizontal++) {
              unsigned short xh = fb_x + horizontal;
              unsigned int xhbp = xh * bytes_per_pixel;
              if (xh >= (xoffset + x_clip) && xh <= (xoffset + xx_clip)) {
                unsigned int hzpixel = horizontal * bytes_per_pixel;
                unsigned int vhz = vbl + hzpixel;
                unsigned int yvhz = yvbl + hzpixel;
                unsigned int xhbp_yvbl = xhbp + yvbl;
                *((unsigned short *)(framebuffer + xhbp_yvbl)) /= *((unsigned short *)(blit_data + vhz));
              }
            }
          }
        }
        break;
      }
      break;
    }
  }
}
```