user: What would the C source look like for the assembly code provided here?

```asm
<LzmaDecode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r15
  mov    %esi,%eax
  mov    %edx,-0x2c(%rsp)
  mov    %ecx,%esi
  lea    (%rdx,%rcx,1),%ecx
  mov    $0x300,%edx
  shl    %cl,%edx
  lea    0x736(%rdx),%edi
  mov    %eax,%ecx
  mov    %edi,%eax
  add    %rax,%rax
  mov    $0x2,%r10d
  cmp    %rax,%rcx
  jb     L359
  test   %edi,%edi
  je     L1077
  mov    %r15,%rax
  lea    0x735(%rdx),%edx
  lea    0x2(%r15,%rdx,2),%rdx
L541:
  movw   $0x400,(%rax)
  add    $0x2,%rax
  cmp    %rdx,%rax
  jne    L541
L1077:
  mov    0x38(%rsp),%edi
  add    %r9,%rdi
  cmp    %rdi,%r9
  je     L526
  lea    0x1(%r9),%r10
  movzbl (%r9),%edx
  add    $0x5,%r9
L424:
  cmp    %r10,%rdi
  je     L783
  shl    $0x8,%edx
  add    $0x1,%r10
  movzbl -0x1(%r10),%eax
  or     %eax,%edx
  cmp    %r9,%r10
  jne    L424
  mov    0x50(%rsp),%rax
  movl   $0x0,(%rax)
  cmpl   $0x0,0x48(%rsp)
  je     L727
  mov    $0x1,%eax
  mov    %eax,%ebx
  mov    %r8d,%ecx
  shl    %cl,%ebx
  lea    -0x1(%rbx),%ebx
  mov    %ebx,-0x1c(%rsp)
  mov    %esi,%ecx
  shl    %cl,%eax
  sub    $0x1,%eax
  mov    %eax,-0x18(%rsp)
  mov    %r15,%rbp
  movl   $0x0,-0x30(%rsp)
  movl   $0x1,-0x10(%rsp)
  movl   $0x1,-0x20(%rsp)
  movl   $0x1,-0x24(%rsp)
  movl   $0x1,-0x28(%rsp)
  mov    $0x0,%r9d
  mov    $0x0,%r14d
  mov    $0x0,%ebx
  mov    $0x0,%r11d
  mov    $0xffffffff,%ecx
  mov    $0x800,%r8d
  lea    0x644(%r15),%rax
  mov    %rax,-0x8(%rsp)
  mov    $0x8,%eax
  sub    -0x2c(%rsp),%eax
  mov    %eax,-0x14(%rsp)
  jmp    L18
L727:
  mov    0x48(%rsp),%eax
  mov    %eax,-0x30(%rsp)
L1144:
  mov    0x50(%rsp),%rax
  mov    -0x30(%rsp),%edi
  mov    %edi,(%rax)
  mov    $0x0,%r10d
  jmp    L359
L613:
  mov    %eax,%ecx
  mov    %rsi,%r10
  jmp    L18
L168:
  sub    %esi,%eax
  sub    %esi,%edx
  mov    %ebx,%esi
  shr    $0x5,%si
  sub    %esi,%ebx
  mov    %bx,0x0(%rbp)
  lea    0x1(%rcx,%rcx,1),%ecx
  test   %r9d,%r9d
  je     L93
L709:
  cmp    $0xff,%ecx
  jg     L511
L1100:
  add    %r11d,%r11d
  mov    %r11d,%r9d
  and    $0x100,%r9d
  lea    0x100(%r9),%esi
  movslq %esi,%rsi
  movslq %ecx,%rbx
  add    %rbx,%rsi
  lea    (%r12,%rsi,2),%rbp
  cmp    $0xffffff,%eax
  ja     L135
  cmp    %rdi,%r10
  je     L159
  shl    $0x8,%eax
  shl    $0x8,%edx
  movzbl (%r10),%esi
  or     %esi,%edx
  lea    0x1(%r10),%r10
L135:
  movzwl 0x0(%rbp),%ebx
  mov    %eax,%esi
  shr    $0xb,%esi
  movzwl %bx,%r13d
  imul   %r13d,%esi
  cmp    %esi,%edx
  jae    L168
  mov    %r8d,%eax
  sub    %r13d,%eax
  sar    $0x5,%eax
  add    %ebx,%eax
  mov    %ax,0x0(%rbp)
  add    %ecx,%ecx
  test   %r9d,%r9d
  jne    L1165
  mov    %esi,%eax
  jmp    L709
L1165:
  mov    %esi,%eax
L93:
  cmp    $0xff,%ecx
  jle    L722
L511:
  mov    %ecx,%r9d
  mov    -0x30(%rsp),%ebx
  mov    %ebx,%esi
  mov    0x40(%rsp),%r11
  mov    %cl,(%r11,%rsi,1)
  mov    %r10,%rsi
  lea    0x1(%rbx),%ebx
  mov    %ebx,-0x30(%rsp)
L104:
  lea    -0x3(%r14),%ecx
  lea    -0x6(%r14),%r10d
  cmp    $0x9,%r14d
  cmovg  %r10d,%ecx
  mov    %ecx,%r14d
  jmp    L895
L566:
  mov    $0x1,%ecx
  jmp    L722
L1053:
  shl    $0x8,%eax
  shl    $0x8,%edx
  movzbl (%r10),%esi
  or     %esi,%edx
  lea    0x1(%r10),%r10
L937:
  movzwl (%rbx),%esi
  mov    %eax,%r9d
  shr    $0xb,%r9d
  movzwl %si,%r11d
  imul   %r11d,%r9d
  cmp    %r9d,%edx
  jae    L257
  mov    %r8d,%eax
  sub    %r11d,%eax
  sar    $0x5,%eax
  add    %eax,%esi
  add    %ecx,%ecx
  mov    %r9d,%eax
L22:
  mov    %si,(%rbx)
  cmp    $0xff,%ecx
  jg     L748
L722:
  movslq %ecx,%rsi
  lea    (%r12,%rsi,2),%rbx
  cmp    $0xffffff,%eax
  ja     L937
  cmp    %r10,%rdi
  jne    L1053
  mov    $0x1,%r10d
L359:
  mov    %r10d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L257:
  sub    %r9d,%eax
  sub    %r9d,%edx
  mov    %esi,%r9d
  shr    $0x5,%r9w
  sub    %r9d,%esi
  lea    0x1(%rcx,%rcx,1),%ecx
  jmp    L22
L748:
  mov    %ecx,%r9d
  mov    -0x30(%rsp),%ebx
  lea    0x1(%rbx),%r11d
  mov    %ebx,%esi
  mov    0x40(%rsp),%rbx
  mov    %cl,(%rbx,%rsi,1)
  cmp    $0x3,%r14d
  jg     L197
  mov    %r10,%rsi
  mov    %r11d,-0x30(%rsp)
  mov    $0x0,%r14d
  jmp    L895
L197:
  mov    %r10,%rsi
  mov    %r11d,-0x30(%rsp)
  jmp    L104
L474:
  sub    %eax,%ecx
  sub    %eax,%edx
  mov    %esi,%eax
  shr    $0x5,%ax
  sub    %eax,%esi
  mov    %si,0x0(%rbp)
  movslq %r14d,%rax
  lea    0x180(%rax,%rax,1),%rsi
  lea    (%r15,%rsi,1),%rbp
  cmp    $0xffffff,%ecx
  ja     L754
  cmp    %rdi,%r10
  je     L411
  shl    $0x8,%ecx
  shl    $0x8,%edx
  movzbl (%r10),%eax
  or     %eax,%edx
  lea    0x1(%r10),%r10
L754:
  movzwl 0x0(%rbp),%eax
  mov    %ecx,%r9d
  shr    $0xb,%r9d
  movzwl %ax,%r12d
  imul   %r12d,%r9d
  cmp    %r9d,%edx
  jae    L1138
  mov    %r8d,%ecx
  sub    %r12d,%ecx
  sar    $0x5,%ecx
  add    %ecx,%eax
  mov    %ax,0x0(%rbp)
  cmp    $0x7,%r14d
  setge  %r14b
  movzbl %r14b,%r14d
  lea    (%r14,%r14,2),%r14d
  lea    0x664(%r15),%r12
  mov    %r10,%rsi
  mov    -0x20(%rsp),%eax
  mov    %eax,-0x10(%rsp)
  mov    -0x24(%rsp),%eax
  mov    %eax,-0x20(%rsp)
  mov    -0x28(%rsp),%eax
  mov    %eax,-0x24(%rsp)
L52:
  cmp    $0xffffff,%r9d
  ja     L1139
  cmp    %rdi,%rsi
  je     L610
  shl    $0x8,%r9d
  shl    $0x8,%edx
  movzbl (%rsi),%eax
  or     %eax,%edx
  lea    0x1(%rsi),%rsi
L1139:
  movzwl (%r12),%ecx
  mov    %r9d,%eax
  shr    $0xb,%eax
  movzwl %cx,%r10d
  imul   %r10d,%eax
  cmp    %eax,%edx
  jb     L922
  sub    %eax,%r9d
  sub    %eax,%edx
  mov    %ecx,%eax
  shr    $0x5,%ax
  sub    %eax,%ecx
  mov    %cx,(%r12)
  cmp    $0xffffff,%r9d
  ja     L513
  cmp    %rdi,%rsi
  je     L110
  shl    $0x8,%r9d
  shl    $0x8,%edx
  movzbl (%rsi),%eax
  or     %eax,%edx
  lea    0x1(%rsi),%rsi
L513:
  movzwl 0x2(%r12),%ecx
  mov    %r9d,%eax
  shr    $0xb,%eax
  movzwl %cx,%r10d
  imul   %r10d,%eax
  cmp    %eax,%edx
  jae    L268
  mov    %r8d,%r9d
  sub    %r10d,%r9d
  sar    $0x5,%r9d
  add    %r9d,%ecx
  mov    %cx,0x2(%r12)
  shl    $0x3,%ebx
  movslq %ebx,%rbx
  lea    0x104(%r12,%rbx,2),%r12
  movl   $0x8,-0xc(%rsp)
  mov    $0x3,%ecx
L624:
  mov    %ecx,%ebx
  mov    $0x1,%r11d
  jmp    L252
L1138:
  sub    %r9d,%ecx
  sub    %r9d,%edx
  mov    %eax,%r9d
  shr    $0x5,%r9w
  sub    %r9d,%eax
  mov    %ax,0x0(%rbp)
  lea    0x18(%r15,%rsi,1),%rbp
  cmp    $0xffffff,%ecx
  ja     L409
  cmp    %rdi,%r10
  je     L363
  shl    $0x8,%ecx
  shl    $0x8,%edx
  movzbl (%r10),%eax
  or     %eax,%edx
  lea    0x1(%r10),%r10
L409:
  movzwl 0x0(%rbp),%eax
  mov    %ecx,%r12d
  shr    $0xb,%r12d
  movzwl %ax,%r9d
  imul   %r12d,%r9d
  cmp    %r9d,%edx
  jae    L816
  movzwl %ax,%esi
  mov    %r8d,%ecx
  sub    %esi,%ecx
  sar    $0x5,%ecx
  add    %eax,%ecx
  mov    %cx,0x0(%rbp)
  lea    0x1e0(%r15,%r11,2),%rsi
  cmp    $0xffffff,%r9d
  ja     L659
  cmp    %rdi,%r10
  je     L597
  shl    $0x8,%r9d
  shl    $0x8,%edx
  movzbl (%r10),%eax
  or     %eax,%edx
  lea    0x1(%r10),%r10
L659:
  movzwl (%rsi),%ecx
  mov    %r9d,%eax
  shr    $0xb,%eax
  movzwl %cx,%r11d
  imul   %r11d,%eax
  cmp    %eax,%edx
  jae    L14
  mov    %r8d,%r9d
  sub    %r11d,%r9d
  sar    $0x5,%r9d
  add    %r9d,%ecx
  mov    %cx,(%rsi)
  mov    -0x30(%rsp),%ebx
  test   %ebx,%ebx
  jne    L685
  mov    $0x1,%r10d
  jmp    L359
L685:
  cmp    $0x7,%r14d
  setge  %r14b
  movzbl %r14b,%r14d
  lea    0x9(%r14,%r14,1),%r14d
  mov    %ebx,%ecx
  sub    -0x28(%rsp),%ecx
  mov    0x40(%rsp),%rsi
  movzbl (%rsi,%rcx,1),%r9d
  mov    %ebx,%ecx
  mov    %r9b,(%rsi,%rcx,1)
  mov    %r10,%rsi
  lea    0x1(%rbx),%ebx
  mov    %ebx,-0x30(%rsp)
  jmp    L895
L14:
  sub    %eax,%r9d
  sub    %eax,%edx
  mov    %ecx,%eax
  shr    $0x5,%ax
  sub    %eax,%ecx
  mov    %cx,(%rsi)
  mov    %r10,%rsi
L156:
  cmp    $0x7,%r14d
  setge  %r14b
  movzbl %r14b,%r14d
  lea    0x8(%r14,%r14,2),%r14d
  lea    0xa68(%r15),%r12
  jmp    L52
L816:
  sub    %r9d,%ecx
  sub    %r9d,%edx
  mov    %eax,%r9d
  shr    $0x5,%r9w
  sub    %r9d,%eax
  mov    %ax,0x0(%rbp)
  lea    0x30(%r15,%rsi,1),%r11
  cmp    $0xffffff,%ecx
  ja     L339
  cmp    %rdi,%r10
  je     L68
  shl    $0x8,%ecx
  shl    $0x8,%edx
  movzbl (%r10),%eax
  or     %eax,%edx
  lea    0x1(%r10),%r10
L339:
  movzwl (%r11),%eax
  mov    %ecx,%r9d
  shr    $0xb,%r9d
  movzwl %ax,%ebp
  imul   %ebp,%r9d
  cmp    %r9d,%edx
  jae    L290
  mov    %r8d,%ecx
  sub    %ebp,%ecx
  sar    $0x5,%ecx
  add    %ecx,%eax
  mov    %ax,(%r11)
  mov    %r10,%rsi
  mov    -0x28(%rsp),%eax
  mov    -0x24(%rsp),%ecx
  mov    %ecx,-0x28(%rsp)
  mov    %eax,-0x24(%rsp)
  jmp    L156
L290:
  sub    %r9d,%ecx
  sub    %r9d,%edx
  mov    %eax,%r9d
  shr    $0x5,%r9w
  sub    %r9d,%eax
  mov    %ax,(%r11)
  lea    0x48(%r15,%rsi,1),%r11
  cmp    $0xffffff,%ecx
  ja     L714
  cmp    %rdi,%r10
  je     L1103
  shl    $0x8,%ecx
  shl    $0x8,%edx
  movzbl (%r10),%eax
  or     %eax,%edx
  lea    0x1(%r10),%r10
L714:
  movzwl (%r11),%esi
  mov    %ecx,%eax
  shr    $0xb,%eax
  movzwl %si,%r9d
  imul   %r9d,%eax
  cmp    %eax,%edx
  jae    L918
  mov    %r8d,%ecx
  sub    %r9d,%ecx
  sar    $0x5,%ecx
  add    %esi,%ecx
  mov    %cx,(%r11)
  mov    %eax,%r9d
  mov    %r10,%rsi
  mov    -0x28(%rsp),%eax
  mov    -0x20(%rsp),%ecx
  mov    %ecx,-0x28(%rsp)
  mov    -0x24(%rsp),%ecx
  mov    %ecx,-0x20(%rsp)
  mov    %eax,-0x24(%rsp)
  jmp    L156
L918:
  sub    %eax,%ecx
  mov    %ecx,%r9d
  sub    %eax,%edx
  mov    %esi,%eax
  shr    $0x5,%ax
  sub    %eax,%esi
  mov    %si,(%r11)
  mov    %r10,%rsi
  mov    -0x28(%rsp),%eax
  mov    -0x10(%rsp),%ecx
  mov    %ecx,-0x28(%rsp)
  mov    -0x20(%rsp),%ecx
  mov    %ecx,-0x10(%rsp)
  mov    -0x24(%rsp),%ecx
  mov    %ecx,-0x20(%rsp)
  mov    %eax,-0x24(%rsp)
  jmp    L156
L922:
  mov    %r8d,%r9d
  sub    %r10d,%r9d
  sar    $0x5,%r9d
  add    %r9d,%ecx
  mov    %cx,(%r12)
  shl    $0x3,%ebx
  movslq %ebx,%rbx
  lea    0x4(%r12,%rbx,2),%r12
  movl   $0x0,-0xc(%rsp)
  mov    $0x3,%ecx
  jmp    L624
L268:
  sub    %eax,%edx
  mov    %ecx,%r10d
  shr    $0x5,%r10w
  sub    %r10d,%ecx
  mov    %cx,0x2(%r12)
  add    $0x204,%r12
  sub    %eax,%r9d
  mov    %r9d,%eax
  movl   $0x10,-0xc(%rsp)
  mov    $0x8,%ecx
  jmp    L624
L128:
  movzwl 0x0(%rbp),%r9d
  mov    %eax,%r10d
  shr    $0xb,%r10d
  movzwl %r9w,%r13d
  imul   %r13d,%r10d
  cmp    %r10d,%edx
  jae    L158
  mov    %r8d,%eax
  sub    %r13d,%eax
  sar    $0x5,%eax
  add    %eax,%r9d
  add    %r11d,%r11d
  mov    %r10d,%eax
L400:
  mov    %r9w,0x0(%rbp)
  sub    $0x1,%ebx
  je     L725
L252:
  movslq %r11d,%r9
  lea    (%r12,%r9,2),%rbp
  cmp    $0xffffff,%eax
  ja     L128
  cmp    %rdi,%rsi
  je     L767
  shl    $0x8,%eax
  shl    $0x8,%edx
  movzbl (%rsi),%r9d
  or     %r9d,%edx
  lea    0x1(%rsi),%rsi
  jmp    L128
L158:
  sub    %r10d,%eax
  sub    %r10d,%edx
  mov    %r9d,%r10d
  shr    $0x5,%r10w
  sub    %r10d,%r9d
  lea    0x1(%r11,%r11,1),%r11d
  jmp    L400
L725:
  mov    $0x1,%ebx
  shl    %cl,%ebx
  sub    %ebx,%r11d
  mov    %r11d,%ebx
  add    -0xc(%rsp),%ebx
  mov    %ebx,-0xc(%rsp)
  cmp    $0x3,%r14d
  jg     L979
  mov    $0x3,%ecx
  cmp    %ecx,%ebx
  cmovle %ebx,%ecx
  mov    %ecx,%ebp
  shl    $0x6,%ebp
  movslq %ebp,%rbp
  add    $0x1b0,%rbp
  mov    $0x6,%r11d
  mov    $0x1,%r9d
  jmp    L668
L670:
  movzwl (%rbx),%ecx
  mov    %eax,%r10d
  shr    $0xb,%r10d
  movzwl %cx,%r12d
  imul   %r12d,%r10d
  cmp    %r10d,%edx
  jae    L1166
  mov    %r8d,%eax
  sub    %r12d,%eax
  sar    $0x5,%eax
  add    %eax,%ecx
  add    %r9d,%r9d
  mov    %r10d,%eax
L529:
  mov    %cx,(%rbx)
  sub    $0x1,%r11d
  je     L1128
L668:
  movslq %r9d,%rcx
  add    %rbp,%rcx
  lea    (%r15,%rcx,2),%rbx
  cmp    $0xffffff,%eax
  ja     L670
  cmp    %rdi,%rsi
  je     L138
  shl    $0x8,%eax
  shl    $0x8,%edx
  movzbl (%rsi),%ecx
  or     %ecx,%edx
  lea    0x1(%rsi),%rsi
  jmp    L670
L1166:
  sub    %r10d,%eax
  sub    %r10d,%edx
  mov    %ecx,%r10d
  shr    $0x5,%r10w
  sub    %r10d,%ecx
  lea    0x1(%r9,%r9,1),%r9d
  jmp    L529
L1128:
  sub    $0x40,%r9d
  cmp    $0x3,%r9d
  jle    L777
  mov    %r9d,%ecx
  sar    %ecx
  mov    %r9d,%r10d
  and    $0x1,%r10d
  or     $0x2,%r10d
  cmp    $0xd,%r9d
  jg     L127
  sub    $0x1,%ecx
  mov    %r10d,%ebx
  shl    %cl,%ebx
  mov    %ebx,%r10d
  movslq %r9d,%r9
  mov    $0x2b0,%r11d
  sub    %r9,%r11
  mov    %ebx,%r9d
  add    %r11,%r9
  lea    -0x2(%r15,%r9,2),%r13
L142:
  mov    $0x1,%ebx
  mov    $0x1,%r12d
  mov    %r10d,%ebp
  mov    %r14d,-0x28(%rsp)
  jmp    L1131
L127:
  sub    $0x5,%ecx
  jmp    L759
L642:
  shr    %eax
  add    %r10d,%r10d
  cmp    %eax,%edx
  jb     L792
  sub    %eax,%edx
  or     $0x1,%r10d
L792:
  sub    $0x1,%ecx
  je     L237
L759:
  cmp    $0xffffff,%eax
  ja     L642
  cmp    %rdi,%rsi
  je     L780
  shl    $0x8,%eax
  shl    $0x8,%edx
  movzbl (%rsi),%r9d
  or     %r9d,%edx
  lea    0x1(%rsi),%rsi
  jmp    L642
L237:
  mov    -0x8(%rsp),%r13
  shl    $0x4,%r10d
  mov    $0x4,%ecx
  jmp    L142
L1116:
  movzwl (%r11),%r14d
  mov    %eax,%r9d
  shr    $0xb,%r9d
  movzwl %r14w,%r10d
  imul   %r10d,%r9d
  cmp    %r9d,%edx
  jae    L886
  mov    %r10d,%eax
  mov    %r8d,%r10d
  sub    %eax,%r10d
  sar    $0x5,%r10d
  add    %r14d,%r10d
  add    %ebx,%ebx
  mov    %r9d,%eax
L815:
  mov    %r10w,(%r11)
  add    %r12d,%r12d
  sub    $0x1,%ecx
  je     L125
L1131:
  movslq %ebx,%r9
  lea    0x0(%r13,%r9,2),%r11
  cmp    $0xffffff,%eax
  ja     L1116
  cmp    %rdi,%rsi
  je     L651
  shl    $0x8,%eax
  shl    $0x8,%edx
  movzbl (%rsi),%r9d
  or     %r9d,%edx
  lea    0x1(%rsi),%rsi
  jmp    L1116
L886:
  sub    %r9d,%eax
  sub    %r9d,%edx
  mov    %r14d,%r9d
  shr    $0x5,%r9w
  sub    %r9d,%r14d
  mov    %r14d,%r10d
  lea    0x1(%rbx,%rbx,1),%ebx
  or     %r12d,%ebp
  jmp    L815
L125:
  mov    %ebp,%r10d
  mov    -0x28(%rsp),%r14d
L1168:
  mov    %r10d,%ebx
  add    $0x1,%ebx
  mov    %ebx,-0x28(%rsp)
  je     L371
  add    $0x7,%r14d
L979:
  mov    -0xc(%rsp),%r11d
  lea    0x2(%r11),%r10d
  mov    -0x28(%rsp),%r9d
  mov    -0x30(%rsp),%ebx
  cmp    %ebx,%r9d
  ja     L467
  mov    %ebx,%ecx
  lea    0x2(%rbx,%r11,1),%ebx
  sub    %r9d,%ebx
  mov    0x40(%rsp),%rbp
  mov    0x48(%rsp),%r12d
L395:
  mov    %ebx,%r9d
  sub    %r10d,%r9d
  movzbl 0x0(%rbp,%r9,1),%r9d
  mov    %ecx,%r11d
  add    $0x1,%ecx
  mov    %r11d,%r11d
  mov    %r9b,0x0(%rbp,%r11,1)
  sub    $0x1,%r10d
  je     L1073
  cmp    %ecx,%r12d
  ja     L395
L1073:
  mov    %ecx,-0x30(%rsp)
L895:
  mov    -0x30(%rsp),%ebx
  cmp    0x48(%rsp),%ebx
  jae    L371
  mov    -0x30(%rsp),%ebx
  and    -0x1c(%rsp),%ebx
  mov    %r14d,%r11d
  shl    $0x4,%r11d
  movslq %r11d,%r11
  movslq %ebx,%rcx
  add    %rcx,%r11
  lea    (%r15,%r11,2),%rbp
  cmp    $0xffffff,%eax
  ja     L613
  cmp    %rdi,%rsi
  je     L932
  shl    $0x8,%eax
  mov    %eax,%ecx
  shl    $0x8,%edx
  lea    0x1(%rsi),%r10
  movzbl (%rsi),%eax
  or     %eax,%edx
L18:
  movzwl 0x0(%rbp),%esi
  mov    %ecx,%eax
  shr    $0xb,%eax
  movzwl %si,%r12d
  imul   %r12d,%eax
  cmp    %eax,%edx
  jae    L474
  mov    %r8d,%ecx
  sub    %r12d,%ecx
  sar    $0x5,%ecx
  add    %esi,%ecx
  mov    %cx,0x0(%rbp)
  mov    -0x18(%rsp),%esi
  mov    -0x30(%rsp),%ebx
  and    %ebx,%esi
  movzbl -0x2c(%rsp),%ecx
  shl    %cl,%esi
  movzbl %r9b,%r9d
  movzbl -0x14(%rsp),%ecx
  sar    %cl,%r9d
  lea    (%rsi,%r9,1),%ecx
  lea    (%rcx,%rcx,2),%ecx
  shl    $0x8,%ecx
  mov    %ecx,%ecx
  lea    0xe6c(%r15,%rcx,2),%r12
  cmp    $0x6,%r14d
  jle    L566
  mov    %ebx,%ecx
  sub    -0x28(%rsp),%ecx
  mov    0x40(%rsp),%rbx
  movzbl (%rbx,%rcx,1),%r11d
  mov    $0x1,%ecx
  jmp    L1100
L777:
  mov    %r9d,%r10d
  jmp    L1168
L371:
  cmp    $0xffffff,%eax
  ja     L1144
  mov    $0x1,%r10d
  cmp    %rdi,%rsi
  jne    L1144
  jmp    L359
L526:
  mov    $0x1,%r10d
  jmp    L359
L783:
  mov    $0x1,%r10d
  jmp    L359
L932:
  mov    $0x1,%r10d
  jmp    L359
L159:
  mov    $0x1,%r10d
  jmp    L359
L411:
  mov    $0x1,%r10d
  jmp    L359
L363:
  mov    $0x1,%r10d
  jmp    L359
L597:
  mov    $0x1,%r10d
  jmp    L359
L68:
  mov    $0x1,%r10d
  jmp    L359
L1103:
  mov    $0x1,%r10d
  jmp    L359
L610:
  mov    $0x1,%r10d
  jmp    L359
L110:
  mov    $0x1,%r10d
  jmp    L359
L767:
  mov    $0x1,%r10d
  jmp    L359
L138:
  mov    $0x1,%r10d
  jmp    L359
L780:
  mov    $0x1,%r10d
  jmp    L359
L651:
  mov    $0x1,%r10d
  jmp    L359
L467:
  mov    $0x1,%r10d
  jmp    L359
```

assistant: ```c
int LzmaDecode(unsigned char *buffer, unsigned int bufferSize, int lc, int lp, int pb, unsigned char *inStream, unsigned int inSize, unsigned char *outStream, unsigned int outSize, unsigned int *outSizeProcessed) {
  unsigned int numProbs = (((((((((((0 + (12 << 4)) + 12) + 12) + 12) + 12) + (12 << 4)) + (4 << 6)) + (1 << (14 >> 1)) - 14) + (1 << 4)) + (((((0 + 1) + 1) + ((1 << 4) << 3)) + ((1 << 4) << 3)) + (1 << 8))) + (((((0 + 1) + 1) + ((1 << 4) << 3)) + ((1 << 4) << 3)) + (1 << 8))) + ((unsigned int)768 << (lc + lp));
  unsigned short *p = (unsigned short *)buffer;
  unsigned int i;
  int state = 0;
  unsigned char previousByte = 0;
  unsigned int rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
  unsigned int nowPos = 0;
  unsigned int posStateMask = (1 << pb) - 1;
  unsigned int literalPosMask = (1 << lp) - 1;
  int len = 0;
  unsigned char *Buffer;
  unsigned char *BufferLim;
  unsigned int Range;
  unsigned int Code;
  if (bufferSize < numProbs * sizeof(unsigned short))
    return 2;
  for (i = 0; i < numProbs; i++)
    p[i] = (1 << 11) >> 1;
  Buffer = inStream;
  BufferLim = inStream + inSize;
  Code = 0;
  Range = 0xFFFFFFFF;
  {
    int i;
    for (i = 0; i < 5; i++) {
      {
        if (Buffer == BufferLim)
          return 1;
      };
      Code = (Code << 8) | (*Buffer++);
    }
  };
  *outSizeProcessed = 0;
  while (nowPos < outSize) {
    unsigned short *prob;
    unsigned int bound;
    int posState = (int)((nowPos)&posStateMask);
    prob = p + 0 + (state << 4) + posState;
    if (Range < ((unsigned int)1 << 24)) {
      {
        if (Buffer == BufferLim)
          return 1;
      };
      Range <<= 8;
      Code = (Code << 8) | (*Buffer++);
    };
    bound = (Range >> 11) * *(prob);
    if (Code < bound) {
      int symbol = 1;
      Range = bound;
      *(prob) += ((1 << 11) - *(prob)) >> 5;
      prob = p + (((((((((((0 + (12 << 4)) + 12) + 12) + 12) + 12) + (12 << 4)) + (4 << 6)) + (1 << (14 >> 1)) - 14) + (1 << 4)) + (((((0 + 1) + 1) + ((1 << 4) << 3)) + ((1 << 4) << 3)) + (1 << 8))) + (((((0 + 1) + 1) + ((1 << 4) << 3)) + ((1 << 4) << 3)) + (1 << 8))) + (768 * ((((nowPos)&literalPosMask) << lc) + (previousByte >> (8 - lc))));
      if (state >= 7) {
        int matchByte;
        matchByte = outStream[nowPos - rep0];
        do {
          int bit;
          unsigned short *probLit;
          matchByte <<= 1;
          bit = (matchByte & 0x100);
          probLit = prob + 0x100 + bit + symbol;
          if (Range < ((unsigned int)1 << 24)) {
            {
              if (Buffer == BufferLim)
                return 1;
            };
            Range <<= 8;
            Code = (Code << 8) | (*Buffer++);
          };
          bound = (Range >> 11) * *(probLit);
          if (Code < bound) {
            Range = bound;
            *(probLit) += ((1 << 11) - *(probLit)) >> 5;
            ;
            symbol <<= 1;
            if (bit != 0)
              break;
          } else {
            Range -= bound;
            Code -= bound;
            *(probLit) -= (*(probLit)) >> 5;
            ;
            symbol = (symbol + symbol) + 1;
            if (bit == 0)
              break;
          }
        } while (symbol < 0x100);
      }
      while (symbol < 0x100) {
        unsigned short *probLit = prob + symbol;
        if (Range < ((unsigned int)1 << 24)) {
          {
            if (Buffer == BufferLim)
              return 1;
          };
          Range <<= 8;
          Code = (Code << 8) | (*Buffer++);
        };
        bound = (Range >> 11) * *(probLit);
        if (Code < bound) {
          Range = bound;
          *(probLit) += ((1 << 11) - *(probLit)) >> 5;
          ;
          symbol <<= 1;
          ;
          ;
        } else {
          Range -= bound;
          Code -= bound;
          *(probLit) -= (*(probLit)) >> 5;
          ;
          symbol = (symbol + symbol) + 1;
          ;
          ;
        }
      }
      previousByte = (unsigned char)symbol;
      outStream[nowPos++] = previousByte;
      if (state < 4)
        state = 0;
      else if (state < 10)
        state -= 3;
      else
        state -= 6;
    } else {
      Range -= bound;
      Code -= bound;
      *(prob) -= (*(prob)) >> 5;
      ;
      prob = p + (0 + (12 << 4)) + state;
      if (Range < ((unsigned int)1 << 24)) {
        {
          if (Buffer == BufferLim)
            return 1;
        };
        Range <<= 8;
        Code = (Code << 8) | (*Buffer++);
      };
      bound = (Range >> 11) * *(prob);
      if (Code < bound) {
        Range = bound;
        *(prob) += ((1 << 11) - *(prob)) >> 5;
        ;
        rep3 = rep2;
        rep2 = rep1;
        rep1 = rep0;
        state = state < 7 ? 0 : 3;
        prob = p + (((((((((0 + (12 << 4)) + 12) + 12) + 12) + 12) + (12 << 4)) + (4 << 6)) + (1 << (14 >> 1)) - 14) + (1 << 4));
      } else {
        Range -= bound;
        Code -= bound;
        *(prob) -= (*(prob)) >> 5;
        ;
        prob = p + ((0 + (12 << 4)) + 12) + state;
        if (Range < ((unsigned int)1 << 24)) {
          {
            if (Buffer == BufferLim)
              return 1;
          };
          Range <<= 8;
          Code = (Code << 8) | (*Buffer++);
        };
        bound = (Range >> 11) * *(prob);
        if (Code < bound) {
          Range = bound;
          *(prob) += ((1 << 11) - *(prob)) >> 5;
          ;
          prob = p + (((((0 + (12 << 4)) + 12) + 12) + 12) + 12) + (state << 4) + posState;
          if (Range < ((unsigned int)1 << 24)) {
            {
              if (Buffer == BufferLim)
                return 1;
            };
            Range <<= 8;
            Code = (Code << 8) | (*Buffer++);
          };
          bound = (Range >> 11) * *(prob);
          if (Code < bound) {
            Range = bound;
            *(prob) += ((1 << 11) - *(prob)) >> 5;
            ;
            if (nowPos == 0)
              return 1;
            state = state < 7 ? 9 : 11;
            previousByte = outStream[nowPos - rep0];
            outStream[nowPos++] = previousByte;
            continue;
          } else {
            Range -= bound;
            Code -= bound;
            *(prob) -= (*(prob)) >> 5;
            ;
          }
        } else {
          unsigned int distance;
          Range -= bound;
          Code -= bound;
          *(prob) -= (*(prob)) >> 5;
          ;
          prob = p + (((0 + (12 << 4)) + 12) + 12) + state;
          if (Range < ((unsigned int)1 << 24)) {
            {
              if (Buffer == BufferLim)
                return 1;
            };
            Range <<= 8;
            Code = (Code << 8) | (*Buffer++);
          };
          bound = (Range >> 11) * *(prob);
          if (Code < bound) {
            Range = bound;
            *(prob) += ((1 << 11) - *(prob)) >> 5;
            ;
            distance = rep1;
          } else {
            Range -= bound;
            Code -= bound;
            *(prob) -= (*(prob)) >> 5;
            ;
            prob = p + ((((0 + (12 << 4)) + 12) + 12) + 12) + state;
            if (Range < ((unsigned int)1 << 24)) {
              {
                if (Buffer == BufferLim)
                  return 1;
              };
              Range <<= 8;
              Code = (Code << 8) | (*Buffer++);
            };
            bound = (Range >> 11) * *(prob);
            if (Code < bound) {
              Range = bound;
              *(prob) += ((1 << 11) - *(prob)) >> 5;
              ;
              distance = rep2;
            } else {
              Range -= bound;
              Code -= bound;
              *(prob) -= (*(prob)) >> 5;
              ;
              distance = rep3;
              rep3 = rep2;
            }
            rep2 = rep1;
          }
          rep1 = rep0;
          rep0 = distance;
        }
        state = state < 7 ? 8 : 11;
        prob = p + ((((((((((0 + (12 << 4)) + 12) + 12) + 12) + 12) + (12 << 4)) + (4 << 6)) + (1 << (14 >> 1)) - 14) + (1 << 4)) + (((((0 + 1) + 1) + ((1 << 4) << 3)) + ((1 << 4) << 3)) + (1 << 8)));
      }
      {
        int numBits, offset;
        unsigned short *probLen = prob + 0;
        if (Range < ((unsigned int)1 << 24)) {
          {
            if (Buffer == BufferLim)
              return 1;
          };
          Range <<= 8;
          Code = (Code << 8) | (*Buffer++);
        };
        bound = (Range >> 11) * *(probLen);
        if (Code < bound) {
          Range = bound;
          *(probLen) += ((1 << 11) - *(probLen)) >> 5;
          ;
          probLen = prob + ((0 + 1) + 1) + (posState << 3);
          offset = 0;
          numBits = 3;
        } else {
          Range -= bound;
          Code -= bound;
          *(probLen) -= (*(probLen)) >> 5;
          ;
          probLen = prob + (0 + 1);
          if (Range < ((unsigned int)1 << 24)) {
            {
              if (Buffer == BufferLim)
                return 1;
            };
            Range <<= 8;
            Code = (Code << 8) | (*Buffer++);
          };
          bound = (Range >> 11) * *(probLen);
          if (Code < bound) {
            Range = bound;
            *(probLen) += ((1 << 11) - *(probLen)) >> 5;
            ;
            probLen = prob + (((0 + 1) + 1) + ((1 << 4) << 3)) + (posState << 3);
            offset = (1 << 3);
            numBits = 3;
          } else {
            Range -= bound;
            Code -= bound;
            *(probLen) -= (*(probLen)) >> 5;
            ;
            probLen = prob + ((((0 + 1) + 1) + ((1 << 4) << 3)) + ((1 << 4) << 3));
            offset = (1 << 3) + (1 << 3);
            numBits = 8;
          }
        }
        {
          int i = numBits;
          len = 1;
          do {
            unsigned short *p = probLen + len;
            if (Range < ((unsigned int)1 << 24)) {
              {
                if (Buffer == BufferLim)
                  return 1;
              };
              Range <<= 8;
              Code = (Code << 8) | (*Buffer++);
            };
            bound = (Range >> 11) * *(p);
            if (Code < bound) {
              Range = bound;
              *(p) += ((1 << 11) - *(p)) >> 5;
              ;
              len <<= 1;
              ;
              ;
            } else {
              Range -= bound;
              Code -= bound;
              *(p) -= (*(p)) >> 5;
              ;
              len = (len + len) + 1;
              ;
              ;
            }
          } while (--i != 0);
          len -= (1 << numBits);
        };
        len += offset;
      }
      if (state < 4) {
        int posSlot;
        state += 7;
        prob = p + ((((((0 + (12 << 4)) + 12) + 12) + 12) + 12) + (12 << 4)) + ((len < 4 ? len : 4 - 1) << 6);
        {
          int i = 6;
          posSlot = 1;
          do {
            unsigned short *p = prob + posSlot;
            if (Range < ((unsigned int)1 << 24)) {
              {
                if (Buffer == BufferLim)
                  return 1;
              };
              Range <<= 8;
              Code = (Code << 8) | (*Buffer++);
            };
            bound = (Range >> 11) * *(p);
            if (Code < bound) {
              Range = bound;
              *(p) += ((1 << 11) - *(p)) >> 5;
              ;
              posSlot <<= 1;
              ;
              ;
            } else {
              Range -= bound;
              Code -= bound;
              *(p) -= (*(p)) >> 5;
              ;
              posSlot = (posSlot + posSlot) + 1;
              ;
              ;
            }
          } while (--i != 0);
          posSlot -= (1 << 6);
        };
        if (posSlot >= 4) {
          int numDirectBits = ((posSlot >> 1) - 1);
          rep0 = (2 | ((unsigned int)posSlot & 1));
          if (posSlot < 14) {
            rep0 <<= numDirectBits;
            prob = p + (((((((0 + (12 << 4)) + 12) + 12) + 12) + 12) + (12 << 4)) + (4 << 6)) + rep0 - posSlot - 1;
          } else {
            numDirectBits -= 4;
            do {
              if (Range < ((unsigned int)1 << 24)) {
                {
                  if (Buffer == BufferLim)
                    return 1;
                };
                Range <<= 8;
                Code = (Code << 8) | (*Buffer++);
              }
              Range >>= 1;
              rep0 <<= 1;
              if (Code >= Range) {
                Code -= Range;
                rep0 |= 1;
              }
            } while (--numDirectBits != 0);
            prob = p + ((((((((0 + (12 << 4)) + 12) + 12) + 12) + 12) + (12 << 4)) + (4 << 6)) + (1 << (14 >> 1)) - 14);
            rep0 <<= 4;
            numDirectBits = 4;
          }
          {
            int i = 1;
            int mi = 1;
            do {
              unsigned short *prob3 = prob + mi;
              if (Range < ((unsigned int)1 << 24)) {
                {
                  if (Buffer == BufferLim)
                    return 1;
                };
                Range <<= 8;
                Code = (Code << 8) | (*Buffer++);
              };
              bound = (Range >> 11) * *(prob3);
              if (Code < bound) {
                Range = bound;
                *(prob3) += ((1 << 11) - *(prob3)) >> 5;
                ;
                mi <<= 1;
                ;
                ;
              } else {
                Range -= bound;
                Code -= bound;
                *(prob3) -= (*(prob3)) >> 5;
                ;
                mi = (mi + mi) + 1;
                rep0 |= i;
              };
              i <<= 1;
            } while (--numDirectBits != 0);
          }
        } else
          rep0 = posSlot;
        if (++rep0 == (unsigned int)(0)) {
          len = -1;
          break;
        }
      }
      len += 2;
      if (rep0 > nowPos)
        return 1;
      do {
        previousByte = outStream[nowPos - rep0];
        len--;
        outStream[nowPos++] = previousByte;
      } while (len != 0 && nowPos < outSize);
    }
  }
  if (Range < ((unsigned int)1 << 24)) {
    {
      if (Buffer == BufferLim)
        return 1;
    };
    Range <<= 8;
    Code = (Code << 8) | (*Buffer++);
  };
  *outSizeProcessed = nowPos;
  return 0;
}
```