// File: /workspace/github_cpp_makefile_star2_O1/sbingner[P]kerneldec/lzfse/src/lzvn_encode_base.c
// Function: lzvn_encode
void lzvn_encode(lzvn_encoder_state *state) {
  const lzvn_match_info NO_MATCH = {0};

  for (; state->src_current < state->src_current_end; state->src_current++) {
    // Get 4 bytes at src_current
    uint32_t vi = load4(state->src + state->src_current);

    // Compute new hash H at position I, and push value into position table
    int h = hash3i(vi); // index of first entry

    // Read table entries for H
    lzvn_encode_entry_type e = state->table[h];

    // Update entry with index=current and value=vi
    lzvn_encode_entry_type updated_e; // rotate values, so we will replace the oldest
    updated_e.indices[0] = offset_to_s32(state->src_current);
    updated_e.indices[1] = e.indices[0];
    updated_e.indices[2] = e.indices[1];
    updated_e.indices[3] = e.indices[2];
    updated_e.values[0] = vi;
    updated_e.values[1] = e.values[0];
    updated_e.values[2] = e.values[1];
    updated_e.values[3] = e.values[2];

    // Do not check matches if still in previously emitted match
    if (state->src_current < state->src_literal)
      goto after_emit;

// Update best with candidate if better
#define UPDATE(best, candidate)                                                \
  do {                                                                         \
    if (candidate.K > best.K ||                                                \
        ((candidate.K == best.K) && (candidate.m_end > best.m_end + 1))) {     \
      best = candidate;                                                        \
    }                                                                          \
  } while (0)
// Check candidate. Keep if better.
#define CHECK_CANDIDATE(ik, nk)                                                \
  do {                                                                         \
    lzvn_match_info m1;                                                              \
    if (lzvn_find_matchN(state->src, state->src_begin, state->src_end,               \
                   state->src_literal, ik, state->src_current, nk, &m1)) {     \
      UPDATE(incoming, m1);                                                    \
    }                                                                          \
  } while (0)
// Emit match M. Return if we don't have enough space in the destination buffer
#define EMIT_MATCH(m)                                                          \
  do {                                                                         \
    if (lzvn_emit_match(state, m) == 0)                                              \
      return;                                                                  \
  } while (0)
// Emit literal of length L. Return if we don't have enough space in the
// destination buffer
#define EMIT_LITERAL(l)                                                        \
  do {                                                                         \
    if (lzvn_emit_literal(state, l) == 0)                                            \
      return;                                                                  \
  } while (0)

    lzvn_match_info incoming = NO_MATCH;

    // Check candidates in order (closest first)
    uint32_t diffs[4];
    for (int k = 0; k < 4; k++)
      diffs[k] = e.values[k] ^ vi; // XOR, 0 if equal
    lzvn_offset ik;                // index
    lzvn_offset nk;                // match byte count

    // The values stored in e.xyzw are 32-bit signed indices, extended to signed
    // type lzvn_offset
    ik = offset_from_s32(e.indices[0]);
    nk = trailing_zero_bytes(diffs[0]);
    CHECK_CANDIDATE(ik, nk);
    ik = offset_from_s32(e.indices[1]);
    nk = trailing_zero_bytes(diffs[1]);
    CHECK_CANDIDATE(ik, nk);
    ik = offset_from_s32(e.indices[2]);
    nk = trailing_zero_bytes(diffs[2]);
    CHECK_CANDIDATE(ik, nk);
    ik = offset_from_s32(e.indices[3]);
    nk = trailing_zero_bytes(diffs[3]);
    CHECK_CANDIDATE(ik, nk);

    // Check candidate at previous distance
    if (state->d_prev != 0) {
      lzvn_match_info m1;
      if (lzvn_find_match(state->src, state->src_begin, state->src_end,
                    state->src_literal, state->src_current - state->d_prev,
                    state->src_current, &m1)) {
        m1.K = m1.M - 1; // fix K for D_prev
        UPDATE(incoming, m1);
      }
    }

    // Here we have the best candidate in incoming, may be NO_MATCH

    // If no incoming match, and literal backlog becomes too high, emit pending
    // match, or literals if there is no pending match
    if (incoming.M == 0) {
      if (state->src_current - state->src_literal >=
          LZVN_ENCODE_MAX_LITERAL_BACKLOG) // at this point, we always have
                                           // current >= literal
      {
        if (state->pending.M != 0) {
          EMIT_MATCH(state->pending);
          state->pending = NO_MATCH;
        } else {
          EMIT_LITERAL(271); // emit long literal (271 is the longest literal size we allow)
        }
      }
      goto after_emit;
    }

    if (state->pending.M == 0) {
      // NOTE. Here, we can also emit incoming right away. It will make the
      // encoder 1.5x faster, at a cost of ~10% lower compression ratio:
      // EMIT_MATCH(incoming);
      // state->pending = NO_MATCH;

      // No pending match, emit nothing, keep incoming
      state->pending = incoming;
    } else {
      // Here we have both incoming and pending
      if (state->pending.m_end <= incoming.m_begin) {
        // No overlap: emit pending, keep incoming
        EMIT_MATCH(state->pending);
        state->pending = incoming;
      } else {
        // If pending is better, emit pending and discard incoming.
        // Otherwise, emit incoming and discard pending.
        if (incoming.K > state->pending.K)
          state->pending = incoming;
        EMIT_MATCH(state->pending);
        state->pending = NO_MATCH;
      }
    }

  after_emit:

    // We commit state changes only after we tried to emit instructions, so we
    // can restart in the same state in case dst was full and we quit the loop.
    state->table[h] = updated_e;

  } // i loop

  // Do not emit pending match here. We do it only at the end of stream.
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq 0x18(%rdi), %r15
cmpq 0x20(%rdi), %r15
jge 0x7170
movq %rdi, %rbx
leaq 0x48(%rdi), %rax
movq %rax, 0x70(%rsp)
movq (%rbx), %rsi
movl (%rsi,%r15), %r14d
movl %r14d, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
imull $0x1041, %eax, %ebp     # imm = 0x1041
shrl $0xc, %ebp
andl $0x3fff, %ebp           # imm = 0x3FFF
movq 0x78(%rbx), %rax
movl %ebp, %ecx
shll $0x5, %ecx
movups (%rax,%rcx), %xmm0
movups 0x10(%rax,%rcx), %xmm1
movaps %xmm0, 0x100(%rsp)
movaps %xmm1, 0x110(%rsp)
movl 0x100(%rsp), %eax
movl 0x104(%rsp), %ecx
movl 0x108(%rsp), %edx
movl 0x110(%rsp), %edi
movl 0x114(%rsp), %r8d
movl 0x118(%rsp), %r9d
movq 0x28(%rbx), %r10
movq %r15, %r11
subq %r10, %r11
movl %eax, 0x84(%rsp)
movl %ecx, 0x80(%rsp)
movl %edx, 0x7c(%rsp)
jl 0x70bb
movq %r11, 0x178(%rsp)
movq %r10, 0x68(%rsp)
movl %r9d, 0x3c(%rsp)
movl %r8d, 0x44(%rsp)
movl %edi, 0x40(%rsp)
movslq %eax, %r8
movslq %ecx, %r10
movslq %edx, %r9
xorl %ecx, %ecx
movq 0x180(%rsp), %rax
movl 0x110(%rsp,%rcx,4), %edx
xorl %r14d, %edx
movl %edx, 0xf0(%rsp,%rcx,4)
incq %rcx
cmpq $0x4, %rcx
jne 0x6753
movl 0xf0(%rsp), %edx
bsfl %edx, %ecx
shrl $0x3, %ecx
testl %edx, %edx
movl $0x4, %edi
cmovel %edi, %ecx
movq 0x8(%rbx), %rdi
movq %rdi, 0x58(%rsp)
movq 0x10(%rbx), %rdi
movb $0x1, %r13b
cmpl $0x3, %ecx
movq %r12, 0xc8(%rsp)
jb 0x6895
movq %r15, %r11
subq %r8, %r11
leaq -0x10000(%r11), %r12
cmpq $-0xffff, %r12          # imm = 0xFFFF0001
jb 0x6895
leaq (%r15,%rcx), %rax
testl %edx, %edx
jne 0x680e
leaq (%r15,%rcx), %rdx
addq $0x4, %rdx
movq %rax, %rcx
cmpq %rdi, %rdx
jge 0x680e
movq %rcx, %rdx
subq %r11, %rdx
movl (%rsi,%rcx), %r12d
movl (%rsi,%rdx), %r13d
movl %r13d, %edx
xorl %r12d, %edx
bsfl %edx, %edx
shrl $0x3, %edx
cmpl %r13d, %r12d
movl $0x4, %eax
cmovel %eax, %edx
leaq (%rcx,%rdx), %rax
cmpl %r13d, %r12d
jne 0x680e
addq %rcx, %rdx
addq $0x4, %rdx
jmp 0x67cf
cmpq %r8, 0x58(%rsp)
setge %cl
movq 0x68(%rsp), %r12
cmpq %r12, %r15
setle %dl
orb %cl, %dl
movq %r15, %rdx
jne 0x6859
decq %r8
leaq -0x1(%r15), %rcx
movb (%rsi,%rcx), %dl
cmpb (%rsi,%r8), %dl
jne 0x6853
leaq -0x1(%rcx), %rdx
cmpq 0x58(%rsp), %r8
jle 0x684e
decq %r8
cmpq %r12, %rcx
movq %rdx, %rcx
jg 0x682f
incq %rdx
jmp 0x6859
incq %rcx
movq %rcx, %rdx
movq %rax, %r8
movq %rdx, 0x170(%rsp)
subq %rdx, %r8
xorl %ecx, %ecx
cmpq $0x600, %r11            # imm = 0x600
setl %cl
movq %r8, 0x168(%rsp)
addq %r8, %rcx
addq $-0x3, %rcx
movq %rcx, 0xa8(%rsp)
xorl %r13d, %r13d
movq %r11, 0x160(%rsp)
testb %r13b, %r13b
movq %rax, 0x180(%rsp)
je 0x68cb
movq $0x0, 0x48(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
xorl %r8d, %r8d
jmp 0x691b
cmpq $0x0, 0xa8(%rsp)
jg 0x68e7
sete %cl
cmpq $0x2, %rax
setge %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x68a2
movq 0x170(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movq %rax, 0x30(%rsp)
movq 0x168(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x160(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xa8(%rsp), %r8
movl 0xf4(%rsp), %edx
bsfl %edx, %ecx
shrl $0x3, %ecx
testl %edx, %edx
movl $0x4, %eax
cmovel %eax, %ecx
movb $0x1, %r13b
cmpl $0x3, %ecx
jae 0x694f
movq 0xd0(%rsp), %rax
movq 0xb0(%rsp), %r12
jmp 0x6a47
movq %r15, %r11
subq %r10, %r11
leaq -0x10000(%r11), %r12
cmpq $-0xffff, %r12          # imm = 0xFFFF0001
movq 0xd0(%rsp), %rax
movq 0xb0(%rsp), %r12
jb 0x6a47
leaq (%r15,%rcx), %rax
testl %edx, %edx
jne 0x69c8
leaq (%r15,%rcx), %rdx
addq $0x4, %rdx
movq %rax, %rcx
cmpq %rdi, %rdx
jge 0x69c8
movq %rcx, %rdx
subq %r11, %rdx
movl (%rsi,%rcx), %r12d
movl (%rsi,%rdx), %r13d
movl %r13d, %edx
xorl %r12d, %edx
bsfl %edx, %edx
shrl $0x3, %edx
cmpl %r13d, %r12d
movl $0x4, %eax
cmovel %eax, %edx
leaq (%rcx,%rdx), %rax
cmpl %r13d, %r12d
jne 0x69c8
addq %rcx, %rdx
addq $0x4, %rdx
jmp 0x6989
cmpq %r10, 0x58(%rsp)
setge %cl
movq 0x68(%rsp), %r13
cmpq %r13, %r15
setle %dl
orb %cl, %dl
movq %r15, %r12
jne 0x6a13
decq %r10
leaq -0x1(%r15), %rcx
movb (%rsi,%rcx), %dl
cmpb (%rsi,%r10), %dl
jne 0x6a0d
leaq -0x1(%rcx), %r12
cmpq 0x58(%rsp), %r10
jle 0x6a08
decq %r10
cmpq %r13, %rcx
movq %r12, %rcx
jg 0x69e9
incq %r12
jmp 0x6a13
incq %rcx
movq %rcx, %r12
movq %rax, %rdx
subq %r12, %rdx
xorl %ecx, %ecx
cmpq $0x600, %r11            # imm = 0x600
setl %cl
movq %rdx, 0x148(%rsp)
addq %rdx, %rcx
addq $-0x3, %rcx
movq %rcx, 0x90(%rsp)
xorl %r13d, %r13d
movq %r11, 0x130(%rsp)
testb %r13b, %r13b
je 0x6a53
movq 0x68(%rsp), %r13
jmp 0x6a9d
cmpq %r8, 0x90(%rsp)
movq 0x68(%rsp), %r13
jg 0x6a71
jne 0x6a9d
movq 0x30(%rsp), %rcx
incq %rcx
cmpq %rcx, %rax
jle 0x6a9d
movq %r12, 0x48(%rsp)
movq %rax, 0x30(%rsp)
movq 0x148(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movq 0x130(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq 0x90(%rsp), %r8
movq %r12, 0xb0(%rsp)
movq %rax, 0xd0(%rsp)
movl 0xf8(%rsp), %edx
bsfl %edx, %ecx
shrl $0x3, %ecx
testl %edx, %edx
movl $0x4, %eax
cmovel %eax, %ecx
movb $0x1, %r11b
cmpl $0x3, %ecx
jae 0x6ae1
movq 0xd8(%rsp), %rax
movq 0xb8(%rsp), %r12
jmp 0x6bd4
movq %r15, %r10
subq %r9, %r10
leaq -0x10000(%r10), %r12
cmpq $-0xffff, %r12          # imm = 0xFFFF0001
movq 0xd8(%rsp), %rax
movq 0xb8(%rsp), %r12
jb 0x6bd4
leaq (%r15,%rcx), %rax
testl %edx, %edx
jne 0x6b5a
leaq (%r15,%rcx), %rdx
addq $0x4, %rdx
movq %rax, %rcx
cmpq %rdi, %rdx
jge 0x6b5a
movq %rcx, %rdx
subq %r10, %rdx
movl (%rsi,%rcx), %r11d
movl (%rsi,%rdx), %r12d
movl %r12d, %edx
xorl %r11d, %edx
bsfl %edx, %edx
shrl $0x3, %edx
cmpl %r12d, %r11d
movl $0x4, %eax
cmovel %eax, %edx
leaq (%rcx,%rdx), %rax
cmpl %r12d, %r11d
jne 0x6b5a
addq %rcx, %rdx
addq $0x4, %rdx
jmp 0x6b1b
cmpq %r9, 0x58(%rsp)
setge %cl
cmpq %r13, %r15
setle %dl
orb %cl, %dl
movq %r15, %r12
jne 0x6ba0
decq %r9
leaq -0x1(%r15), %rcx
movb (%rsi,%rcx), %dl
cmpb (%rsi,%r9), %dl
jne 0x6b9a
leaq -0x1(%rcx), %r12
cmpq 0x58(%rsp), %r9
jle 0x6b95
decq %r9
cmpq %r13, %rcx
movq %r12, %rcx
jg 0x6b76
incq %r12
jmp 0x6ba0
incq %rcx
movq %rcx, %r12
movq %rax, %rdx
subq %r12, %rdx
xorl %ecx, %ecx
cmpq $0x600, %r10            # imm = 0x600
setl %cl
movq %rdx, 0x150(%rsp)
addq %rdx, %rcx
addq $-0x3, %rcx
movq %rcx, 0x98(%rsp)
xorl %r11d, %r11d
movq %r10, 0x138(%rsp)
testb %r11b, %r11b
jne 0x6c1e
cmpq %r8, 0x98(%rsp)
jg 0x6bf2
jne 0x6c1e
movq 0x30(%rsp), %rcx
incq %rcx
cmpq %rcx, %rax
jle 0x6c1e
movq %r12, 0x48(%rsp)
movq %rax, 0x30(%rsp)
movq 0x150(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movq 0x138(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq 0x98(%rsp), %r8
movq %r12, 0xb8(%rsp)
movq %rax, 0xd8(%rsp)
movl 0xfc(%rsp), %edx
bsfl %edx, %ecx
shrl $0x3, %ecx
testl %edx, %edx
movl $0x4, %eax
cmovel %eax, %ecx
movb $0x1, %r11b
cmpl $0x3, %ecx
jae 0x6c62
movq 0xe0(%rsp), %rax
movq 0xc0(%rsp), %r12
jmp 0x6d5d
movslq 0x10c(%rsp), %r10
movq %r15, %r9
subq %r10, %r9
leaq -0x10000(%r9), %r12
cmpq $-0xffff, %r12          # imm = 0xFFFF0001
movq 0xe0(%rsp), %rax
movq 0xc0(%rsp), %r12
jb 0x6d5d
leaq (%r15,%rcx), %rax
testl %edx, %edx
jne 0x6ce3
leaq (%r15,%rcx), %rdx
addq $0x4, %rdx
movq %rax, %rcx
cmpq %rdi, %rdx
jge 0x6ce3
movq %rcx, %rdx
subq %r9, %rdx
movl (%rsi,%rcx), %r11d
movl (%rsi,%rdx), %r12d
movl %r12d, %edx
xorl %r11d, %edx
bsfl %edx, %edx
shrl $0x3, %edx
cmpl %r12d, %r11d
movl $0x4, %eax
cmovel %eax, %edx
leaq (%rcx,%rdx), %rax
cmpl %r12d, %r11d
jne 0x6ce3
addq %rcx, %rdx
addq $0x4, %rdx
jmp 0x6ca4
cmpq %r10, 0x58(%rsp)
setge %cl
cmpq %r13, %r15
setle %dl
orb %cl, %dl
movq %r15, %r12
jne 0x6d29
decq %r10
leaq -0x1(%r15), %rcx
movb (%rsi,%rcx), %dl
cmpb (%rsi,%r10), %dl
jne 0x6d23
leaq -0x1(%rcx), %r12
cmpq 0x58(%rsp), %r10
jle 0x6d1e
decq %r10
cmpq %r13, %rcx
movq %r12, %rcx
jg 0x6cff
incq %r12
jmp 0x6d29
incq %rcx
movq %rcx, %r12
movq %rax, %rdx
subq %r12, %rdx
xorl %ecx, %ecx
cmpq $0x600, %r9             # imm = 0x600
setl %cl
movq %rdx, 0x158(%rsp)
addq %rdx, %rcx
addq $-0x3, %rcx
movq %rcx, 0xa0(%rsp)
xorl %r11d, %r11d
movq %r9, 0x140(%rsp)
testb %r11b, %r11b
jne 0x6da7
cmpq %r8, 0xa0(%rsp)
jg 0x6d7b
jne 0x6da7
movq 0x30(%rsp), %rcx
incq %rcx
cmpq %rcx, %rax
jle 0x6da7
movq %r12, 0x48(%rsp)
movq %rax, 0x30(%rsp)
movq 0x158(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movq 0x140(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq 0xa0(%rsp), %r8
movq %r12, 0xc0(%rsp)
movq %rax, 0xe0(%rsp)
movq 0x70(%rbx), %r9
testq %r9, %r9
je 0x6e67
movq %r15, %r11
subq %r9, %r11
movl (%rsi,%r11), %ecx
movl %ecx, %edx
xorl %r14d, %edx
bsfl %edx, %edx
shrl $0x3, %edx
cmpl %ecx, %r14d
movl $0x4, %eax
cmovel %eax, %edx
cmpl $0x3, %edx
setb %r12b
leaq -0x10000(%r9), %r10
cmpq $-0xffff, %r10          # imm = 0xFFFF0001
setb %r10b
orb %r12b, %r10b
movq 0xe8(%rsp), %rax
movq 0xc8(%rsp), %r12
jne 0x6eed
movl %edx, %edx
leaq (%r15,%rdx), %rax
cmpl %ecx, %r14d
jne 0x6e88
addq %r15, %rdx
addq $0x4, %rdx
movq %rax, %rcx
cmpq %rdi, %rdx
jge 0x6e88
movq %rcx, %rdx
subq %r9, %rdx
movl (%rsi,%rcx), %r12d
movl (%rsi,%rdx), %r13d
movl %r13d, %edx
xorl %r12d, %edx
bsfl %edx, %edx
shrl $0x3, %edx
cmpl %r13d, %r12d
movl $0x4, %eax
cmovel %eax, %edx
leaq (%rcx,%rdx), %rax
cmpl %r13d, %r12d
jne 0x6e88
addq %rcx, %rdx
addq $0x4, %rdx
jmp 0x6e28
movq %r8, %r13
movq 0xe8(%rsp), %rax
movq 0xc8(%rsp), %r12
movl 0x40(%rsp), %edi
movl 0x3c(%rsp), %r9d
jmp 0x6f44
cmpq 0x58(%rsp), %r11
setle %cl
movq 0x68(%rsp), %r11
cmpq %r11, %r15
setle %dl
orb %cl, %dl
movq %r15, %r12
jne 0x6ed7
leaq -0x1(%r15), %rcx
movq %rcx, %rdx
subq %r9, %rdx
movb (%rsi,%rcx), %dil
cmpb (%rsi,%rdx), %dil
jne 0x6ed1
leaq -0x1(%rcx), %r12
cmpq 0x58(%rsp), %rdx
jle 0x6ecc
decq %rdx
cmpq %r11, %rcx
movq %r12, %rcx
jg 0x6eac
incq %r12
jmp 0x6ed7
incq %rcx
movq %rcx, %r12
movq %rax, %rcx
subq %r12, %rcx
movq %rcx, 0x88(%rsp)
movq %r9, 0x128(%rsp)
testb %r10b, %r10b
movl 0x40(%rsp), %edi
movl 0x3c(%rsp), %r9d
je 0x6f00
movq %r8, %r13
jmp 0x6f44
movq 0x88(%rsp), %rcx
leaq -0x1(%rcx), %r13
cmpq %r8, %r13
jg 0x6f20
jne 0x6efb
movq 0x30(%rsp), %rcx
incq %rcx
cmpq %rcx, %rax
jle 0x6efb
movq %r12, 0x48(%rsp)
movq %rax, 0x30(%rsp)
movq 0x88(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movq 0x128(%rsp), %rcx
movq %rcx, 0x60(%rsp)
cmpq $0x0, 0x50(%rsp)
movl 0x44(%rsp), %r8d
movq %rax, 0xe8(%rsp)
je 0x6fe3
cmpq $0x0, 0x58(%rbx)
je 0x7093
movq 0x48(%rsp), %rcx
cmpq %rcx, 0x50(%rbx)
jle 0x7056
cmpq 0x68(%rbx), %r13
jle 0x6fa5
movq 0x48(%rsp), %rax
movq %rax, 0x48(%rbx)
movq 0x30(%rsp), %rax
movq %rax, 0x50(%rbx)
movq 0x50(%rsp), %rax
movq %rax, 0x58(%rbx)
movq 0x60(%rsp), %rax
movq %rax, 0x60(%rbx)
movq %r13, 0x68(%rbx)
movq 0x70(%rsp), %rcx
movq 0x20(%rcx), %rax
movq %rax, 0x20(%rsp)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x7182
testq %rax, %rax
movl 0x40(%rsp), %edi
movl 0x44(%rsp), %r8d
movl 0x3c(%rsp), %r9d
jne 0x703d
jmp 0x7170
cmpq $0x190, 0x178(%rsp) # imm = 0x190
jl 0x70bb
cmpq $0x0, 0x58(%rbx)
je 0x710e
movq 0x70(%rsp), %rcx
movq 0x20(%rcx), %rax
movq %rax, 0x20(%rsp)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x7182
movl 0x3c(%rsp), %r9d
movl 0x44(%rsp), %r8d
movl 0x40(%rsp), %edi
testq %rax, %rax
je 0x7170
movq 0x70(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x20(%rax)
jmp 0x70bb
movq 0x70(%rsp), %rcx
movq 0x20(%rcx), %rax
movq %rax, 0x20(%rsp)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x7182
movl 0x3c(%rsp), %r9d
movl 0x44(%rsp), %r8d
movl 0x40(%rsp), %edi
testq %rax, %rax
je 0x7170
movq 0x48(%rsp), %rax
movq %rax, 0x48(%rbx)
movq 0x30(%rsp), %rax
movq %rax, 0x50(%rbx)
movq 0x50(%rsp), %rax
movq %rax, 0x58(%rbx)
movq 0x60(%rsp), %rax
movq %rax, 0x60(%rbx)
movq %r13, 0x68(%rbx)
movq 0x78(%rbx), %rax
shll $0x5, %ebp
movl %r15d, (%rax,%rbp)
movl 0x84(%rsp), %ecx
movl %ecx, 0x4(%rax,%rbp)
movl 0x80(%rsp), %ecx
movl %ecx, 0x8(%rax,%rbp)
movl 0x7c(%rsp), %ecx
movl %ecx, 0xc(%rax,%rbp)
movl %r14d, 0x10(%rax,%rbp)
movl %edi, 0x14(%rax,%rbp)
movl %r8d, 0x18(%rax,%rbp)
movl %r9d, 0x1c(%rax,%rbp)
movq 0x18(%rbx), %r15
incq %r15
movq %r15, 0x18(%rbx)
cmpq 0x20(%rbx), %r15
jl 0x6697
jmp 0x7170
movq 0x30(%rbx), %r13
movq 0x40(%rbx), %rcx
leaq 0x119(%r13), %rdx
cmpq %rcx, %rdx
jae 0x7154
addq 0x68(%rsp), %rsi
movw $0xffe0, (%r13)         # imm = 0xFFE0
leaq 0x2(%r13), %rdi
movl $0x10f, %edx            # imm = 0x10F
callq 0x30c0
movl 0x3c(%rsp), %r9d
movl 0x44(%rsp), %r8d
movl 0x40(%rsp), %edi
addq $0x111, %r13            # imm = 0x111
movq %r13, %rcx
cmpq 0x40(%rbx), %rcx
jae 0x7170
addq $0x10f, 0x28(%rbx)      # imm = 0x10F
cmpq 0x30(%rbx), %rcx
movq %rcx, 0x30(%rbx)
jne 0x70bb
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq