// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: lh_record_insert
static int lh_record_insert(
	  unqlite_kv_engine *pKv,         /* KV store */
	  const void *pKey,sxu32 nKeyLen, /* Payload: Key */
	  const void *pData,unqlite_int64 nDataLen, /* Payload: data */
	  int is_append /* True for an append operation */
	  )
{
	lhash_kv_engine *pEngine = (lhash_kv_engine *)pKv;
	lhash_bmap_rec *pRec;
	unqlite_page *pRaw;
	lhpage *pPage;
	lhcell *pCell;
	pgno iBucket;
	sxu32 nHash;
	int iCnt;
	int rc;

	/* Acquire the first page (DB hash Header) so that everything gets loaded autmatically */
	rc = pEngine->pIo->xGet(pEngine->pIo->pHandle,1,0);
	if( rc != UNQLITE_OK ){
		return rc;
	}
	iCnt = 0;
	/* Compute the hash of the key first */
	nHash = pEngine->xHash(pKey,(sxu32)nKeyLen);
retry:
	/* Extract the logical bucket number */
	iBucket = nHash & (pEngine->nmax_split_nucket - 1);
	if( iBucket >= pEngine->split_bucket + pEngine->max_split_bucket ){
		/* Low mask */
		iBucket = nHash & (pEngine->max_split_bucket - 1);
	}
	/* Map the logical bucket number to real page number */
	pRec = lhMapFindBucket(pEngine,iBucket);
	if( pRec == 0 ){
		/* Request a new page */
		rc = lhAcquirePage(pEngine,&pRaw);
		if( rc != UNQLITE_OK ){
			return rc;
		}
		/* Initialize the page */
		pPage = lhNewPage(pEngine,pRaw,0);
		if( pPage == 0 ){
			return UNQLITE_NOMEM;
		}
		/* Mark as an empty page */
		rc = lhSetEmptyPage(pPage);
		if( rc != UNQLITE_OK ){
			pEngine->pIo->xPageUnref(pRaw); /* pPage will be released during this call */
			return rc;
		}
		/* Store the cell */
		rc = lhStoreCell(pPage,pKey,nKeyLen,pData,nDataLen,nHash,1);
		if( rc == UNQLITE_OK ){
			/* Install and write the logical map record */
			rc = lhMapWriteRecord(pEngine,iBucket,pRaw->iPage);
		}
		pEngine->pIo->xPageUnref(pRaw);
		return rc;
	}else{
		/* Load the page */
		rc = lhLoadPage(pEngine,pRec->iReal,0,&pPage,0);
		if( rc != UNQLITE_OK ){
			/* IO error, unlikely scenario */
			return rc;
		}
		/* Do not add this page to the hot dirty list */
		pEngine->pIo->xDontMkHot(pPage->pRaw);
		/* Lookup for the cell */
		pCell = lhFindCell(pPage,pKey,(sxu32)nKeyLen,nHash);
		if( pCell == 0 ){
			/* Create the record */
			rc = lhRecordInstall(pPage,nHash,pKey,nKeyLen,pData,nDataLen);
			if( rc == SXERR_RETRY && iCnt++ < 2 ){
				rc = UNQLITE_OK;
				goto retry;
			}
		}else{
			if( is_append ){
				/* Append operation */
				rc = lhRecordAppend(pCell,pData,nDataLen);
			}else{
				/* Overwrite old value */
				rc = lhRecordOverwrite(pCell,pData,nDataLen);
			}
		}
		pEngine->pIo->xPageUnref(pPage->pRaw);
	}
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r9d, -0x60(%rbp)
movq %r8, %r14
movq %rcx, %r12
movl %edx, -0x58(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdi, %r15
movq (%rdi), %rax
movq (%rax), %rdi
xorl %ebx, %ebx
movl $0x1, %esi
xorl %edx, %edx
callq *0x10(%rax)
testl %eax, %eax
je 0x379a0
movl %eax, %r13d
jmp 0x37fce
movq %r12, -0x38(%rbp)
movq %r14, -0x68(%rbp)
movq -0x30(%rbp), %rdi
movl -0x58(%rbp), %esi
callq *0xc0(%r15)
movl %eax, %r14d
movq %r15, -0x48(%rbp)
movq %r14, -0x90(%rbp)
movl 0x130(%r15), %eax
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
addl %edi, %eax
andl %r14d, %eax
movq %r14, %rsi
movq 0x128(%r15), %r14
movq 0x120(%r15), %rcx
addq %r14, %rcx
addl %edi, %r14d
andl %esi, %r14d
cmpq %rcx, %rax
cmovbq %rax, %r14
cmpl $0x0, 0xe0(%r15)
je 0x37a27
movq 0xd8(%r15), %rax
movl 0xe4(%r15), %ecx
decl %ecx
andl %r14d, %ecx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x37a27
cmpq %r14, (%rax)
je 0x37a29
movq 0x20(%rax), %rax
jmp 0x37a17
xorl %eax, %eax
testq %rax, %rax
je 0x37d10
movq 0x8(%rax), %rsi
movq %r15, %rdi
xorl %edx, %edx
leaq -0x98(%rbp), %rcx
callq 0x38b86
testl %eax, %eax
jne 0x37998
movq (%r15), %rax
movq -0x98(%rbp), %rcx
movq 0x8(%rcx), %rdi
callq *0x40(%rax)
movq -0x98(%rbp), %rdi
movq -0x30(%rbp), %r14
movq %r14, %rsi
movl -0x58(%rbp), %r13d
movl %r13d, %edx
movq -0x90(%rbp), %r12
movl %r12d, %ecx
callq 0x38e3c
testq %rax, %rax
jne 0x37d63
movq -0x98(%rbp), %rdi
movl $0x0, (%rsp)
movq %rdi, -0x50(%rbp)
movq %r14, %rsi
movl %r13d, %edx
movq -0x38(%rbp), %rcx
movq -0x68(%rbp), %r8
movl %r12d, %r9d
callq 0x38799
movl %eax, %r13d
cmpl $-0x49, %eax
movq %r12, %r14
jne 0x37b7c
movq -0x50(%rbp), %rax
movq (%rax), %r15
cmpl $0x0, 0xe0(%r15)
je 0x37b02
movq 0x120(%r15), %rcx
movq 0xd8(%r15), %rax
movl 0xe4(%r15), %edx
decl %edx
andl %ecx, %edx
movq (%rax,%rdx,8), %rax
testq %rax, %rax
je 0x37b02
cmpq %rcx, (%rax)
je 0x37b04
movq 0x20(%rax), %rax
jmp 0x37af2
xorl %eax, %eax
testq %rax, %rax
je 0x37b3a
movq 0x8(%rax), %rsi
xorl %r12d, %r12d
movq %r15, %rdi
xorl %edx, %edx
leaq -0x88(%rbp), %rcx
callq 0x38b86
testl %eax, %eax
jne 0x37b35
movq %r15, %rdi
leaq -0x40(%rbp), %rsi
callq 0x38609
testl %eax, %eax
je 0x37b96
movl %eax, %r13d
jmp 0x37b43
movl $0xffffffe8, %r13d      # imm = 0xFFFFFFE8
xorl %r12d, %r12d
testl %r13d, %r13d
movq -0x48(%rbp), %r15
jne 0x37b7c
movl $0xffffffdf, %r13d      # imm = 0xFFFFFFDF
testl %r12d, %r12d
jne 0x37b7c
movl $0x1, (%rsp)
movq -0x50(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x58(%rbp), %edx
movq -0x38(%rbp), %rcx
movq -0x68(%rbp), %r8
movl %r14d, %r9d
callq 0x38799
movl %eax, %r13d
cmpl $-0x21, %r13d
jne 0x37fbd
incl %ebx
cmpl $0x3, %ebx
jne 0x379c4
jmp 0x37da0
movq -0x40(%rbp), %r13
xorl %r12d, %r12d
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x386a2
testq %rax, %rax
je 0x37c51
movq %r13, -0xa8(%rbp)
movq %rax, -0xa0(%rbp)
movq %rax, %rdi
callq 0x3871e
xorl %r12d, %r12d
testl %eax, %eax
jne 0x37c38
movq 0x128(%r15), %rsi
addq 0x120(%r15), %rsi
movq -0xa8(%rbp), %rax
movq 0x10(%rax), %rdx
movq %r15, %rdi
callq 0x38959
testl %eax, %eax
jne 0x37c38
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq -0x88(%rbp), %rdi
movq 0x8(%rdi), %rcx
xorl %r12d, %r12d
cmpq 0x10(%rcx), %rax
sete %r12b
movq 0x120(%r15), %rdx
movq 0x130(%r15), %rcx
decq %rcx
movq -0xa0(%rbp), %rsi
callq 0x39c0b
testl %eax, %eax
je 0x37c5c
movl %eax, %r13d
movq (%r15), %rax
movq -0xa0(%rbp), %rcx
movq 0x8(%rcx), %rdi
callq *0x50(%rax)
jmp 0x37b43
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x37b43
incq 0x120(%r15)
movq (%r15), %rax
movq 0xd0(%r15), %rdi
callq *0x28(%rax)
testl %eax, %eax
jne 0x37b35
movq 0x120(%r15), %rax
cmpq 0x128(%r15), %rax
jae 0x37c9b
movq 0xd0(%r15), %rcx
movq (%rcx), %rcx
bswapq %rax
movq %rax, 0x10(%rcx)
jmp 0x37cea
movq $0x0, 0x120(%r15)
movq 0x130(%r15), %rax
movq %rax, 0x128(%r15)
addq %rax, %rax
movq %rax, 0x130(%r15)
je 0x37cf2
movq 0xd0(%r15), %rax
movq (%rax), %rax
movq $0x0, 0x10(%rax)
movq 0xd0(%r15), %rax
movq 0x128(%r15), %rcx
movq (%rax), %rax
bswapq %rcx
movq %rcx, 0x18(%rax)
xorl %r13d, %r13d
jmp 0x37b43
movq (%r15), %rax
movq (%rax), %rdi
leaq 0x3dbf0(%rip), %rsi     # 0x758ef
callq *0x80(%rax)
movl $0xfffffff9, %r13d      # imm = 0xFFFFFFF9
jmp 0x37b43
leaq -0x88(%rbp), %rsi
movq %r15, %rdi
callq 0x38609
testl %eax, %eax
jne 0x37998
movq %r15, %rdi
movq -0x88(%rbp), %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x386a2
movq %rax, -0x98(%rbp)
testq %rax, %rax
je 0x37fe3
movq %rax, %rdi
callq 0x3871e
testl %eax, %eax
je 0x380d4
movl %eax, %r13d
jmp 0x38108
movq 0x20(%rax), %rbx
movq (%rbx), %r13
cmpl $0x0, -0x60(%rbp)
je 0x37dab
movq 0x8(%rax), %rcx
movq (%r13), %rdx
movq -0x68(%rbp), %r12
addq %r12, %rcx
jae 0x37fa8
movq (%rdx), %rdi
leaq 0x3daee(%rip), %rsi     # 0x7587d
callq *0x80(%rdx)
movl $0xfffffff9, %r13d      # imm = 0xFFFFFFF9
jmp 0x37fbd
movl $0xffffffdf, %r13d      # imm = 0xFFFFFFDF
jmp 0x37fbd
movq %rax, %r14
movq (%r13), %rax
movq 0x8(%rbx), %rdi
callq *0x28(%rax)
testl %eax, %eax
movq -0x68(%rbp), %r12
jne 0x37fba
movq %r13, -0x30(%rbp)
movq %r14, %r8
cmpq $0x0, 0x18(%r14)
je 0x38117
movq -0x30(%rbp), %r12
movq (%r12), %rax
movq (%rax), %rdi
movq 0x30(%r8), %rsi
leaq -0x88(%rbp), %rdx
movq %r8, %r14
callq *0x10(%rax)
testl %eax, %eax
jne 0x37fba
movq %r14, -0x58(%rbp)
movq -0x88(%rbp), %rax
movq (%rax), %rcx
movq (%rcx), %r15
bswapq %r15
movq %rax, -0x40(%rbp)
testq %r15, %r15
movq %r12, %r13
je 0x37e61
leaq -0x40(%rbp), %r14
movq (%r13), %rax
movq (%rax), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *0x10(%rax)
testl %eax, %eax
jne 0x37e61
movq -0x40(%rbp), %rsi
movq (%rsi), %rax
movq (%rax), %r15
cmpq -0x88(%rbp), %rsi
je 0x37e59
movq %r13, %rdi
callq 0x3a10e
movq (%r13), %rax
movq -0x40(%rbp), %rdi
callq *0x50(%rax)
bswapq %r15
testq %r15, %r15
jne 0x37e1f
movq -0x88(%rbp), %rdi
movq (%rdi), %r12
movq -0x58(%rbp), %rax
movzwl 0x38(%rax), %r14d
movslq 0x110(%r13), %r15
movq (%r13), %rax
callq *0x28(%rax)
testl %eax, %eax
jne 0x38326
movq %rbx, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq -0x38(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
addq %r12, %r15
addq %r12, %r14
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rbx
movl $0x4, %r12d
movq -0x50(%rbp), %rax
cmpq %rax, -0x38(%rbp)
jae 0x37f52
cmpq %r15, %r14
jae 0x37f14
movq %r15, -0x90(%rbp)
movl %r15d, %eax
subl %r14d, %eax
movq -0x50(%rbp), %r12
movq -0x38(%rbp), %r15
subl %r15d, %r12d
cmpl %eax, %r12d
cmovael %eax, %r12d
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x34fc5
addq %r12, %r15
movq %r15, -0x38(%rbp)
movq -0x90(%rbp), %r15
addq %r12, %r14
xorl %r12d, %r12d
jmp 0x37f52
movq %r15, -0x90(%rbp)
movq %rbx, %rdi
leaq -0xb0(%rbp), %rsi
callq 0x38609
movl $0x1, %r12d
testl %eax, %eax
jne 0x37f48
movq (%rbx), %rax
movq -0xb0(%rbp), %r15
movq %r15, %rdi
callq *0x28(%rax)
testl %eax, %eax
je 0x37f60
movl %eax, %r13d
movq -0x90(%rbp), %r15
testl %r12d, %r12d
je 0x37eb8
jmp 0x383d1
movq -0x88(%rbp), %rax
movq 0x10(%r15), %rcx
bswapq %rcx
movq (%rax), %rax
movq %rcx, (%rax)
movq (%rbx), %rax
movq -0x88(%rbp), %rdi
callq *0x50(%rax)
movq (%r15), %rax
movq $0x0, (%rax)
movq %r15, -0x88(%rbp)
movq (%r15), %rax
leaq 0x8(%rax), %r14
movslq 0x110(%rbx), %r15
addq %rax, %r15
jmp 0x37ed1
movq %rax, %r14
movq %r13, -0x30(%rbp)
movq 0x8(%rbx), %rdi
callq *0x28(%rdx)
testl %eax, %eax
je 0x37feb
movl %eax, %r13d
movq (%r15), %rax
movq -0x98(%rbp), %rcx
movq 0x8(%rcx), %rdi
callq *0x50(%rax)
movl %r13d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x37fce
cmpq $0x0, 0x18(%r14)
je 0x3814d
movq -0x30(%rbp), %r12
movq (%r12), %rax
movq (%rax), %rdi
movq 0x30(%r14), %rsi
leaq -0x88(%rbp), %rdx
callq *0x10(%rax)
testl %eax, %eax
jne 0x37fba
movq %rbx, -0x60(%rbp)
movq -0x88(%rbp), %rax
movq (%rax), %rbx
movq (%rbx), %r15
bswapq %r15
movzwl 0x38(%r14), %ecx
movq %r14, %rdx
leaq (%rcx,%rbx), %r14
movslq 0x110(%r12), %rax
addq %rax, %rbx
movq %rdx, -0x58(%rbp)
movq %r12, %r13
movq 0x8(%rdx), %r12
subl %ecx, %eax
cmpq %rbx, %r14
jb 0x380bb
movq (%r13), %rax
movq (%rax), %rdi
testq %r15, %r15
je 0x383fd
movq %r15, %rsi
leaq -0x40(%rbp), %rdx
callq *0x10(%rax)
testl %eax, %eax
jne 0x38326
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq (%rax), %r15
bswapq %r15
movq -0x30(%rbp), %r13
movq (%r13), %rax
movq -0x88(%rbp), %rdi
callq *0x50(%rax)
movq -0x40(%rbp), %rcx
movq (%rcx), %rbx
leaq 0x8(%rbx), %r14
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rax
movslq 0x110(%rax), %rax
addq %rax, %rbx
addl $-0x8, %eax
movq %rcx, -0x88(%rbp)
movl %eax, %edx
movq %r12, %rcx
subq %rdx, %rcx
jb 0x38310
addq %rdx, %r14
movq %rcx, %r12
jmp 0x3804b
movq -0x98(%rbp), %rdi
movl $0x1, (%rsp)
movq -0x30(%rbp), %rsi
movl -0x58(%rbp), %edx
movq -0x38(%rbp), %rcx
movq -0x68(%rbp), %r8
movq -0x90(%rbp), %r9
callq 0x38799
movl %eax, %r13d
testl %eax, %eax
je 0x3820a
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %r15, %rdi
jmp 0x37fcb
movq 0x8(%rbx), %rcx
movzwl 0x28(%r8), %eax
movl 0x4(%r8), %edx
leal (%rdx,%rax), %esi
addl $0x1a, %esi
movl %edx, %eax
addl $0x1a, %eax
addq (%rcx), %rsi
cmpq %r12, 0x8(%r8)
jne 0x3821f
movq -0x38(%rbp), %rdi
movl %r12d, %edx
callq 0x34fc5
jmp 0x38601
leaq -0x40(%rbp), %rdx
movw $0x0, (%rdx)
movl 0x4(%r14), %eax
addl $0x1a, %eax
movq 0x8(%r14), %rsi
addq %r12, %rsi
addq %rax, %rsi
movq %rbx, %rdi
callq 0x38f12
testl %eax, %eax
movq -0x30(%rbp), %rdx
je 0x38278
movq 0x8(%rbx), %rax
movq (%rax), %rax
movzwl 0x28(%r14), %ecx
leaq (%rax,%rcx), %rsi
addq $0x1a, %rsi
addq $0x1a, %rcx
movl 0x4(%r14), %edx
addl %edx, %ecx
addq %rax, %rcx
movq 0x8(%r14), %r8
movq %r12, (%rsp)
movq $0x0, 0x8(%rsp)
movq %r14, %rdi
movq -0x38(%rbp), %r9
xorl %eax, %eax
callq 0x39433
movl %eax, %r13d
testl %eax, %eax
jne 0x37fbd
movq 0x8(%rbx), %rax
movq (%rax), %rax
movzwl 0x28(%r14), %ecx
movq 0x8(%r14), %rdx
addq %r12, %rdx
bswapq %rdx
movq %rdx, 0x8(%rax,%rcx)
movl 0x8(%r14), %edx
movl 0x28(%r14), %esi
addl 0x4(%r14), %edx
addl $0x1a, %esi
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
andl %eax, %edx
movq %rbx, %rdi
callq 0x3a021
addq %r12, 0x8(%r14)
jmp 0x38601
movq 0x10(%r15), %rdx
movq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x38959
jmp 0x37d5b
jbe 0x38332
movq -0x38(%rbp), %rdi
movl %r12d, %edx
callq 0x34fc5
movq 0x8(%rbx), %rax
movq (%rax), %rax
movzwl 0x28(%r14), %ecx
movq %r12, %rdx
bswapq %rdx
movq %rdx, 0x8(%rax,%rcx)
movl 0x8(%r14), %edx
movl 0x28(%r14), %eax
addl 0x4(%r14), %eax
leal (%r12,%rax), %esi
addl $0x1a, %esi
subl %r12d, %edx
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
andl %eax, %edx
movq %rbx, %rdi
callq 0x3a021
movq %r12, 0x8(%r14)
jmp 0x38601
movq %rbx, %rax
movzwl 0x28(%r14), %ebx
movq %r14, %rcx
movl 0x8(%r14), %r14d
addq $0x8, %rdx
xorps %xmm0, %xmm0
leaq -0x88(%rbp), %rdi
movups %xmm0, 0x8(%rdi)
movq %rdx, (%rdi)
movl $0x0, 0x18(%rdi)
movq %rax, -0x60(%rbp)
movq 0x8(%rax), %rax
movq %rcx, %r15
movl 0x4(%rcx), %ecx
leal (%rbx,%rcx), %esi
addl $0x1a, %esi
addq (%rax), %rsi
movl %r14d, %edx
callq 0x360ae
movl %eax, %r13d
testl %eax, %eax
jne 0x382df
leaq -0x88(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl %r12d, %edx
callq 0x360ae
movl %eax, %r13d
leaq -0x80(%rbp), %r12
testl %r13d, %r13d
je 0x38415
testb $0x6, -0x70(%rbp)
jne 0x38461
cmpl $0x0, -0x74(%rbp)
je 0x38461
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
jmp 0x3845c
movq (%r13), %rax
movq -0x88(%rbp), %rdi
callq *0x28(%rax)
testl %eax, %eax
je 0x38484
movl %eax, %r13d
movq -0x48(%rbp), %r15
jmp 0x37fbd
leaq -0x88(%rbp), %rdx
movw $0x0, (%rdx)
movl %eax, %esi
addq %r12, %rsi
movq %rbx, %rdi
callq 0x38f12
testl %eax, %eax
je 0x385b8
movq 0x8(%rbx), %rax
movq (%rax), %rax
movzwl 0x28(%r14), %ecx
leaq (%rax,%rcx), %rsi
addq $0x1a, %rsi
movl 0x4(%r14), %edx
movq %rbx, -0x60(%rbp)
xorl %ebx, %ebx
movq %r14, %rdi
movq -0x38(%rbp), %rcx
movq %r12, %r8
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x39433
movl %eax, %r13d
testl %eax, %eax
jne 0x385f9
movq -0x60(%rbp), %rdi
movq 0x8(%rdi), %rax
movq (%rax), %rax
movzwl 0x28(%r14), %ecx
movq %r12, %rdx
bswapq %rdx
movq %rdx, 0x8(%rax,%rcx)
movl 0x8(%r14), %edx
movl 0x28(%r14), %esi
addl 0x4(%r14), %edx
addl $0x1a, %esi
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
andl %eax, %edx
callq 0x3a021
movq %r12, 0x8(%r14)
jmp 0x385f7
cmpl $0x4, %r12d
movq -0x48(%rbp), %r15
jne 0x37fbd
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x88(%rbp), %rdi
callq *0x50(%rax)
movq -0x68(%rbp), %rdx
movq -0x58(%rbp), %rcx
jmp 0x3859b
leaq 0x3d518(%rip), %rsi     # 0x7591c
callq *0x80(%rax)
movl $0xffffffe8, %r13d      # imm = 0xFFFFFFE8
jmp 0x38329
movzwl -0x40(%rbp), %esi
movq -0x80(%rbp), %rdx
movl -0x78(%rbp), %ecx
movq %r15, %rdi
movq %rdx, -0x30(%rbp)
callq 0x3a065
movl 0x4(%r15), %eax
addl %r14d, %eax
addl $0x1a, %eax
movzwl %ax, %edx
movzwl %bx, %esi
movq -0x60(%rbp), %rdi
callq 0x3a021
testb $0x6, -0x70(%rbp)
jne 0x38461
cmpl $0x0, -0x74(%rbp)
je 0x38461
movq -0x88(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3503f
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movl $0x0, 0x10(%r12)
testl %r13d, %r13d
movq -0x48(%rbp), %r15
jne 0x37fbd
jmp 0x38601
movq -0x68(%rbp), %rax
movq -0x38(%rbp), %rcx
addq %rax, %rcx
addq %r12, %r14
movq %rcx, -0x50(%rbp)
movl $0x4, %r12d
cmpq %rcx, -0x38(%rbp)
jae 0x3850d
cmpq %rbx, %r14
jae 0x384de
movl %ebx, %eax
subl %r14d, %eax
movl %ecx, %r12d
movq -0x38(%rbp), %r15
subl %r15d, %r12d
cmpl %eax, %r12d
cmovael %eax, %r12d
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x34fc5
movq -0x50(%rbp), %rcx
addq %r12, %r15
movq %r15, -0x38(%rbp)
addq %r12, %r14
xorl %r12d, %r12d
jmp 0x3850d
movq -0x30(%rbp), %r15
movq %r15, %rdi
leaq -0x40(%rbp), %rsi
callq 0x38609
movl $0x1, %r12d
testl %eax, %eax
jne 0x38506
movq (%r15), %rax
movq -0x40(%rbp), %rdi
callq *0x28(%rax)
testl %eax, %eax
je 0x38514
movl %eax, %r13d
movq -0x50(%rbp), %rcx
testl %r12d, %r12d
je 0x38496
jmp 0x38570
movq -0x88(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x10(%rcx), %rcx
bswapq %rcx
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rbx
movq (%rbx), %rax
movq -0x88(%rbp), %rdi
callq *0x50(%rax)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq $0x0, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x88(%rbp)
movq (%rax), %rax
leaq 0x8(%rax), %r14
movslq 0x110(%rbx), %rbx
addq %rax, %rbx
movq -0x50(%rbp), %rcx
jmp 0x384a7
cmpl $0x4, %r12d
movq -0x48(%rbp), %r15
jne 0x37fbd
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x88(%rbp), %rdi
callq *0x50(%rax)
movq -0x68(%rbp), %rdx
movq -0x58(%rbp), %rcx
addq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rcx)
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movzwl 0x28(%rcx), %ecx
bswapq %rdx
movq %rdx, 0x8(%rax,%rcx)
jmp 0x38601
movq %r14, %r13
movzwl 0x28(%r14), %eax
movl %eax, -0x30(%rbp)
movq %rbx, %r14
movl 0x8(%r13), %ebx
movzwl -0x88(%rbp), %esi
movq %r13, %rdi
movq -0x38(%rbp), %rdx
movq %r12, %rcx
callq 0x3a065
movl 0x4(%r13), %eax
addl %ebx, %eax
addl $0x1a, %eax
movzwl %ax, %edx
movq %r14, %rdi
movl -0x30(%rbp), %esi
callq 0x3a021
movb $0x1, %bl
testb %bl, %bl
je 0x37fbd
xorl %r13d, %r13d
jmp 0x37fbd