// File: /workspace/github_c_makefile_star2_O1/intel[P]pf-bb-config/vrb2/vrb2_cfg_app.c
// Function: vrb2_configure
int
vrb2_configure(void *dev, void *bar0addr, const char *cfg_filename, const bool first_cfg)
{
	struct vrb2_conf vrb2_conf;
	int ret;

	ret = vrb2_read_config_file(cfg_filename, &vrb2_conf);
	if (ret != 0) {
		LOG(ERR, "Error reading config file.");
		return -1;
	}

	ret = vrb2_write_config(dev, bar0addr, &vrb2_conf, first_cfg);
	if (ret != 0) {
		LOG(ERR, "Error writing configuration for VRB2.");
		return -1;
	}
	hw_device *accel_dev = (hw_device *)dev;
	accel_dev->numvfs = vrb2_conf.num_vf_bundles;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x11098, %rsp          # imm = 0x11098
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r14
movq %rdx, %rdi
callq 0x13c09
testb %al, %al
je 0x15146
callq 0x16854
leaq 0x1eda7(%rip), %rcx     # 0x33ed0
movq (%rcx), %r8
leaq 0x66e4(%rip), %rdx      # 0x1b817
xorl %edi, %edi
xorl %esi, %esi
movq %rax, %rcx
movq %r15, %r9
xorl %eax, %eax
callq 0x19ca8
jmp 0x15157
leaq 0x64(%rsp), %rsi
movq %r15, %rdi
callq 0x16a7a
testl %eax, %eax
je 0x15192
callq 0x16854
leaq 0x1ed6d(%rip), %rcx     # 0x33ed0
movq (%rcx), %r8
leaq 0x7ead(%rip), %rdx      # 0x1d01a
xorl %edi, %edi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19ca8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x11098, %rsp          # imm = 0x11098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0xc8412c(%r13), %ebx
cmpl $0x1f, %ebx
jne 0x152cf
movl $0x3f30a00, 0xc8410c(%r13) # imm = 0x3F30A00
movl $0x1, %edi
callq 0xd460
movl $0xf, 0xc84128(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x64, %edi
callq 0xd460
movl 0xc8412c(%r13), %r15d
cmpl $0xf, %r15d
jne 0x15226
movl $0x0, 0xc84128(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x64, %edi
callq 0xd460
movl 0xc8412c(%r13), %r15d
testl %r15d, %r15d
je 0x15248
callq 0x16854
leaq 0x1ecb6(%rip), %rcx     # 0x33ed0
movq (%rcx), %r8
movl $0x0, (%rsp)
jmp 0x1523c
callq 0x16854
leaq 0x1ec9e(%rip), %rcx     # 0x33ed0
movq (%rcx), %r8
movl $0xf, (%rsp)
leaq 0x763a(%rip), %rdx      # 0x1c87d
jmp 0x161d6
leaq 0xb9040c(%r13), %rax
leaq 0xb900c0(%r13), %rcx
xorl %edx, %edx
movl $0x10000, %esi          # imm = 0x10000
xorl %edi, %edi
xorl %r8d, %r8d
movl %edx, -0xc(%rax,%r8)
movl %edx, -0x8(%rax,%r8)
movl %edx, -0x4(%rax,%r8)
movl %edx, (%rax,%r8)
addq $0x10, %r8
cmpq $0x400, %r8             # imm = 0x400
jne 0x15262
xorl %r8d, %r8d
movl $0x0, (%rcx,%r8,4)
incq %r8
cmpq $0x8, %r8
jne 0x15285
incq %rdi
addq %rsi, %rax
addq %rsi, %rcx
cmpq $0x6, %rdi
jne 0x1525f
leaq 0xa08000(%r13), %rax
xorl %ecx, %ecx
xorl %edx, %edx
movl $0x0, (%rax,%rdx,4)
incq %rdx
cmpq $0x40, %rdx
jne 0x152b0
incq %rcx
addq $0x100, %rax            # imm = 0x100
cmpq $0x20, %rcx
jne 0x152ae
movl %ebp, 0x34(%rsp)
movl 0xa0f244(%r13), %r15d
movb $0x1, %bpl
cmpl $0xf, %r15d
je 0x15317
callq 0x16854
leaq 0x1ebe1(%rip), %rcx     # 0x33ed0
movq 0x8(%rcx), %r8
movl $0xf, (%rsp)
leaq 0x847d(%rip), %rdx      # 0x1d77e
xorl %ebp, %ebp
movl $0x1, %edi
xorl %esi, %esi
movq %rax, %rcx
movl %r15d, %r9d
xorl %eax, %eax
callq 0x19ca8
cmpl $0x1f, %ebx
setne %al
movb %bpl, 0x2560d(%rip)     # 0x3a931
xorb $0x1, %bpl
orb %al, %bpl
jne 0x1537e
movl $0x31, 0x810000(%r13)
movl $0xc8, %edi
callq 0xd460
testl $0x4, 0x810000(%r13)
je 0x15373
callq 0x16854
leaq 0x1eb75(%rip), %rcx     # 0x33ed0
movq (%rcx), %r8
leaq 0x8465(%rip), %rdx      # 0x1d7ca
xorl %edi, %edi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19ca8
movl $0x30, 0x810000(%r13)
movl 0xc8412c(%r13), %eax
xorl %eax, %eax
cmpw $0x0, 0x82(%rsp)
sete %al
xorl %ecx, %ecx
cmpw $0x0, 0x88(%rsp)
sete %cl
leal (%rax,%rcx,2), %eax
xorl %ecx, %ecx
cmpw $0x0, 0x6a(%rsp)
sete %cl
leal (%rax,%rcx,4), %eax
xorl %ecx, %ecx
cmpw $0x0, 0x76(%rsp)
sete %cl
leal (%rax,%rcx,8), %ebx
movl 0xc8412c(%r13), %r15d
cmpl %ebx, %r15d
je 0x15426
callq 0x16854
leaq 0x1eaf8(%rip), %r12     # 0x33ed0
movq 0x10(%r12), %r8
movl %ebx, (%rsp)
leaq 0x840b(%rip), %rdx      # 0x1d7f2
movl $0x2, %edi
xorl %esi, %esi
movq %rax, %rcx
movl %r15d, %r9d
xorl %eax, %eax
callq 0x19ca8
movl %ebx, 0xc84128(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x64, %edi
callq 0xd460
movl 0xc8412c(%r13), %r15d
cmpl %ebx, %r15d
jne 0x161c3
movzbl 0x25504(%rip), %eax     # 0x3a931
orl $0x30a00, %eax          # imm = 0x30A00
movl %eax, 0xc8410c(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x1, 0xb8002c(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x8000103, 0xb30000(%r13) # imm = 0x8000103
movl $0x1, %edi
callq 0xd460
xorl %ebx, %ebx
movl %ebx, 0xb80868(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x7df, 0xb80870(%r13) # imm = 0x7DF
movl $0x1, %edi
callq 0xd460
movl $0x22, 0xb80010(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xb80814(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x3, 0xb80c00(%r13,%rbx)
movl $0x1, %edi
callq 0xd460
movl $0x186a0, 0xb80c04(%r13,%rbx) # imm = 0x186A0
movl $0x1, %edi
callq 0xd460
addq $0x10, %rbx
cmpq $0x200, %rbx            # imm = 0x200
jne 0x154bb
xorl %ebx, %ebx
movl %ebx, 0xb80000(%r13)
movl $0x1, %edi
callq 0xd460
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, 0xb80044(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xb80040(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x80000003, 0xb80004(%r13) # imm = 0x80000003
movl $0x1, %edi
callq 0xd460
movl $0x7fc00, 0xb80008(%r13) # imm = 0x7FC00
movl $0x1, %edi
callq 0xd460
movl %ebp, 0xb80800(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x200000, 0xb80f00(%r13,%rbx,4) # imm = 0x200000
movl $0x1, %edi
callq 0xd460
incq %rbx
cmpq $0x6, %rbx
jne 0x15569
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, 0xb808b0(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xb80890(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xb808a0(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xb808a4(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xb808a8(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xb808ac(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xb808b0(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x800, %ebp            # imm = 0x800
movl %ebp, 0xa00040(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xa00044(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebp, 0xa00048(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xa0004c(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x10000000, 0xa00050(%r13) # imm = 0x10000000
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xa00054(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x100000, 0xb80e04(%r13) # imm = 0x100000
movl $0x1, %edi
callq 0xd460
cmpb $0x1, 0x252a2(%rip)     # 0x3a931
jne 0x156a6
movl $0x1, 0xb80e00(%r13)
movl $0x1, %edi
callq 0xd460
xorl %eax, %eax
leaq 0x7451(%rip), %rcx      # 0x1cb00
movl (%rax,%rcx), %edx
cmpl $0x1, %edx
je 0x156c3
cmpl $0x9, %edx
je 0x156d0
movl $0x2, %edx
jmp 0x156c8
movl $0x3, %edx
movl %edx, 0xb31800(%r13,%rax,4)
addq $0x4, %rax
cmpq $0x80, %rax
jne 0x156af
xorl %eax, %eax
movl $0x2ad0, %edx           # imm = 0x2AD0
xorl %esi, %esi
xorl %ecx, %ecx
xorl %edi, %edi
movl $0x1, %r8d
shll %cl, %r8d
leal (%rsi,%rcx), %r9d
btq %r9, %rdx
cmovael %eax, %r8d
orl %r8d, %edi
addq $0x4, %rcx
cmpq $0x20, %rcx
jne 0x156e9
movq %rsi, %rcx
shlq $0x4, %rcx
movl %edi, 0xb31004(%r13,%rcx)
incq %rsi
cmpq $0x4, %rsi
jne 0x156e5
movl $0x1111, 0xb31044(%r13) # imm = 0x1111
movl $0x20200208, 0xb800c8(%r13) # imm = 0x20200208
movl $0x1008, 0xb800cc(%r13) # imm = 0x1008
movl $0x14, %eax
movl %eax, 0xb800b0(%r13)
movl %eax, 0xb800b4(%r13)
movl $0x4, 0xb800b8(%r13)
xorl %eax, %eax
movl $0x200f2, 0xb4c104(%r13,%rax) # imm = 0x200F2
addq $0x1000, %rax           # imm = 0x1000
cmpq $0x5000, %rax           # imm = 0x5000
jne 0x15764
movzwl 0x6a(%rsp), %eax
movzwl 0x76(%rsp), %ecx
addl %eax, %ecx
movzwl 0x70(%rsp), %eax
movzwl 0x7c(%rsp), %r15d
addl %eax, %r15d
addl %ecx, %r15d
movzwl 0x82(%rsp), %ebx
leal (%r15,%rbx), %r12d
movzwl 0x88(%rsp), %ebp
callq 0x16854
leaq 0x1e715(%rip), %rcx     # 0x33ed0
movq 0x10(%rcx), %r8
movzwl 0x6a(%rsp), %r9d
movzwl 0x70(%rsp), %ecx
movzwl 0x76(%rsp), %edx
movzwl 0x7c(%rsp), %esi
movzwl 0x82(%rsp), %edi
movzwl 0x88(%rsp), %r10d
movl %r10d, 0x20(%rsp)
movl %edi, 0x18(%rsp)
movl %esi, 0x10(%rsp)
movl %edx, 0x8(%rsp)
movl %ecx, (%rsp)
leaq 0x8051(%rip), %rdx      # 0x1d851
movl $0x2, %edi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19ca8
addl %ebp, %r12d
movl %r12d, 0x4c(%rsp)
je 0x1584e
addl %ebp, %ebx
addl %ebx, %r15d
xorl %eax, %eax
movl $0x5, 0xa00200(%r13,%rax,4)
movl $0x10010, 0xa00300(%r13,%rax,4) # imm = 0x10010
movl $0x2, 0xa02f00(%r13,%rax,4)
incq %rax
cmpq %rax, %r15
jne 0x15822
xorl %ebx, %ebx
movl $0x3020100, 0xa00600(%r13,%rbx,4) # imm = 0x3020100
movl $0x1, %edi
callq 0xd460
movl $0x7060504, 0xa00700(%r13,%rbx,4) # imm = 0x7060504
movl $0x1, %edi
callq 0xd460
movl $0xb0a0908, 0xa00800(%r13,%rbx,4) # imm = 0xB0A0908
movl $0x1, %edi
callq 0xd460
movl $0xf0e0d0c, 0xa00900(%r13,%rbx,4) # imm = 0xF0E0D0C
movl $0x1, %edi
callq 0xd460
movl $0x13121110, 0xa00a00(%r13,%rbx,4) # imm = 0x13121110
movl $0x1, %edi
callq 0xd460
movl $0x17161514, 0xa00b00(%r13,%rbx,4) # imm = 0x17161514
movl $0x1, %edi
callq 0xd460
movl $0x1b1a1918, 0xa00c00(%r13,%rbx,4) # imm = 0x1B1A1918
movl $0x1, %edi
callq 0xd460
movl $0x1f1e1d1c, 0xa00d00(%r13,%rbx,4) # imm = 0x1F1E1D1C
movl $0x1, %edi
callq 0xd460
incq %rbx
cmpq $0x20, %rbx
jne 0x15850
movl $0xf0f, 0xa02fc0(%r13) # imm = 0xF0F
movl $0x1, %edi
callq 0xd460
movl $0x3, 0xa0f320(%r13)
movl $0x1, %edi
callq 0xd460
xorl %ebx, %ebx
movl $0x0, 0xa00e00(%r13,%rbx,4)
movl $0x1, %edi
callq 0xd460
incq %rbx
cmpq $0x20, %rbx
jne 0x15939
movzwl 0x6a(%rsp), %r12d
testl %r12d, %r12d
movq %r14, 0x50(%rsp)
je 0x15978
xorl %ebx, %ebx
xorl %eax, %eax
btsl %eax, %ebx
incl %eax
cmpl %eax, %r12d
jne 0x1596c
jmp 0x1597a
xorl %ebx, %ebx
xorl %r14d, %r14d
movl %ebx, 0xa00e30(%r13,%r14,4)
movl $0x1, %edi
callq 0xd460
incq %r14
cmpq $0x5, %r14
jne 0x1597d
movzwl 0x76(%rsp), %eax
leal (%rax,%r12), %r15d
xorl %ebx, %ebx
movl $0x0, %ebp
testl %eax, %eax
je 0x159ba
xorl %ebp, %ebp
btsl %r12d, %ebp
incl %r12d
cmpl %r15d, %r12d
jb 0x159ae
leaq 0xa00e00(%r13), %r12
movl 0xb401fc(%r13,%rbx,4), %eax
andl $0x70, %eax
cmpl $0x10, %eax
movl $0x0, %eax
cmovel %ebp, %eax
movl %eax, (%r12)
movl $0x1, %edi
callq 0xd460
addq $0x400, %rbx            # imm = 0x400
addq $0x4, %r12
cmpq $0x1800, %rbx           # imm = 0x1800
jne 0x159c1
movzwl 0x70(%rsp), %eax
leal (%r15,%rax), %r12d
xorl %ebx, %ebx
testl %eax, %eax
je 0x15a14
btsl %r15d, %ebx
incl %r15d
cmpl %r12d, %r15d
jb 0x15a08
xorl %r14d, %r14d
movl %ebx, 0xa00e54(%r13,%r14,4)
movl $0x1, %edi
callq 0xd460
incq %r14
cmpq $0x3, %r14
jne 0x15a17
movzwl 0x7c(%rsp), %eax
leal (%r12,%rax), %r15d
xorl %ebx, %ebx
testl %eax, %eax
je 0x15a4d
btsl %r12d, %ebx
incl %r12d
cmpl %r15d, %r12d
jb 0x15a41
xorl %r14d, %r14d
movl %ebx, 0xa00e24(%r13,%r14,4)
movl $0x1, %edi
callq 0xd460
incq %r14
cmpq $0x3, %r14
jne 0x15a50
movzwl 0x82(%rsp), %eax
leal (%r15,%rax), %ebp
xorl %ebx, %ebx
testl %eax, %eax
je 0x15a89
btsl %r15d, %ebx
incl %r15d
cmpl %ebp, %r15d
jb 0x15a7d
xorl %r14d, %r14d
movl %ebx, 0xa00e60(%r13,%r14,4)
movl $0x1, %edi
callq 0xd460
incq %r14
cmpq $0x3, %r14
jne 0x15a8c
movzwl 0x88(%rsp), %eax
testl %eax, %eax
je 0x15ac2
addl %ebp, %eax
xorl %ebx, %ebx
btsl %ebp, %ebx
incl %ebp
cmpl %eax, %ebp
jb 0x15ab7
jmp 0x15ac4
xorl %ebx, %ebx
xorl %r14d, %r14d
movl %ebx, 0xa00e78(%r13,%r14,4)
movl $0x1, %edi
callq 0xd460
incq %r14
cmpq $0x2, %r14
jne 0x15ac7
xorl %r14d, %r14d
leaq 0x64(%rsp), %r15
leaq 0x7dcf(%rip), %rbp      # 0x1d8c0
xorl %ebx, %ebx
movq %r13, 0x38(%rsp)
movq %rbx, 0x28(%rsp)
movl %r14d, %r12d
xorl %r13d, %r13d
xorl %ebx, %ebx
movl %r12d, %edi
movq %r15, %rsi
callq 0x14abb
cltq
movl (%rbp,%rax,4), %eax
movl %r13d, %ecx
shll %cl, %eax
orl %eax, %ebx
addl $0x4, %r13d
incl %r12d
cmpl $0x20, %r13d
jne 0x15b05
movq 0x38(%rsp), %r13
movq 0x28(%rsp), %rax
movl %ebx, 0xa02f80(%r13,%rax,4)
movq %rax, %rbx
movl $0x1, %edi
callq 0xd460
incq %rbx
addl $0x8, %r14d
cmpq $0x4, %rbx
jne 0x15af8
xorl %ebx, %ebx
movl $0x0, 0xa02f00(%r13,%rbx,4)
movl $0x1, %edi
callq 0xd460
incq %rbx
cmpq $0x20, %rbx
jne 0x15b58
movl $0x1, %ebp
movl %ebp, 0xa000a0(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x1000, 0xa000b0(%r13) # imm = 0x1000
movl $0x1, %edi
callq 0xd460
xorl %ebx, %ebx
movl %ebx, 0xa000b4(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xa000b8(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xa000bc(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebp, 0xa00034(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xa00034(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x30, 0x810000(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xc84020(%r13)
movl $0x1, %edi
callq 0xd460
movl $0xffffffff, 0xc84040(%r13) # imm = 0xFFFFFFFF
movl $0x1, %edi
callq 0xd460
movl $0xc7478807, 0xc84038(%r13) # imm = 0xC7478807
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xc84114(%r13)
movl $0x1, %edi
callq 0xd460
movzbl 0x64(%rsp), %eax
leal 0x1f07f0(,%rax,2), %eax
movl %eax, 0xc84108(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebp, 0xb8002c(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebp, 0xb90008(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebp, 0xba0008(%r13)
movl $0x1, %edi
callq 0xd460
leaq 0x5c6c(%rip), %rax      # 0x1b91d
leaq 0x5cb2(%rip), %r15      # 0x1b96a
cmpb $0x0, 0x64(%rsp)
cmovneq %rax, %r15
callq 0x16854
leaq 0x1e203(%rip), %rcx     # 0x33ed0
movq 0x10(%rcx), %r8
movl $0x2, %edi
xorl %esi, %esi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x19ca8
cmpw $0x0, 0x68(%rsp)
je 0x15d42
leaq 0xb98000(%r13), %rbx
xorl %r15d, %r15d
xorl %r14d, %r14d
movl $0x1, (%rbx,%r14)
movl $0x1, %edi
callq 0xd460
movl $0x2, (%rbx,%r14)
movl $0x1, %edi
callq 0xd460
addq $0x10000, %r14          # imm = 0x10000
cmpq $0x60000, %r14          # imm = 0x60000
jne 0x15cfa
incq %r15
movzwl 0x68(%rsp), %eax
addq $0x100, %rbx            # imm = 0x100
cmpq %rax, %r15
jb 0x15cf7
xorl %ebx, %ebx
movl $0x1, 0xb9c0f0(%r13,%rbx)
movl $0x1, %edi
callq 0xd460
movl $0x2, 0xb9c0f0(%r13,%rbx)
movl $0x1, %edi
callq 0xd460
addq $0x10000, %rbx          # imm = 0x10000
cmpq $0x60000, %rbx          # imm = 0x60000
jne 0x15d44
movl $0x1, %ebx
movl %ebx, 0xb9c400(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xb9c404(%r13)
movl $0x1, %edi
callq 0xd460
xorl %ebp, %ebp
movl %ebp, 0xb9c408(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x2, %r14d
movl %r14d, 0xb9c400(%r13)
movl $0x1, %edi
callq 0xd460
movl %ebx, 0xbbc400(%r13)
movl $0x1, %edi
callq 0xd460
movl $0x201, 0xbbc404(%r13) # imm = 0x201
movl $0x1, %edi
callq 0xd460
movl %ebp, 0xbbc408(%r13)
movl $0x1, %edi
callq 0xd460
movl %r14d, 0xbbc400(%r13)
movl $0x1, %edi
callq 0xd460
cmpw $0x0, 0x82(%rsp)
movq 0x50(%rsp), %r14
movl 0x34(%rsp), %ebx
je 0x1609d
movl $0x180, %ebp            # imm = 0x180
xorl %r15d, %r15d
movq %r15, %r12
shlq $0xc, %r12
movzbl 0x24aea(%rip), %eax     # 0x3a931
addl $0x2001, %eax           # imm = 0x2001
movl %eax, 0xb58004(%r13,%r12)
movl $0x1, %edi
callq 0xd460
cmpb $0x0, 0x24acc(%rip)     # 0x3a931
movl $0x60, %eax
cmovnel %ebp, %eax
movl %eax, 0xb5803c(%r13,%r12)
movl $0x1, %edi
callq 0xd460
movb $0x1, %al
movl %eax, 0x28(%rsp)
testb %bl, %bl
je 0x15ec3
movq %r14, %rbp
movq 0x10(%r14), %r14
movq %r14, %rdi
callq 0x13c09
testb %al, %al
je 0x15eca
callq 0x16854
leaq 0x1e028(%rip), %rcx     # 0x33ed0
movq (%rcx), %r8
movl $0x0, 0x28(%rsp)
xorl %edi, %edi
xorl %esi, %esi
leaq 0x6a7a(%rip), %rdx      # 0x1c938
jmp 0x16030
xorl %eax, %eax
jmp 0x16047
movq %r14, %rdi
leaq 0x6a95(%rip), %rsi      # 0x1c969
callq 0xd330
testq %rax, %rax
je 0x1600a
movq %r14, 0x40(%rsp)
movl $0xfe00, %esi           # imm = 0xFE00
movl $0x1, %edx
leaq 0x1290(%rsp), %rdi
movq %rax, %rcx
movq %rax, %r14
callq 0xd0d0
testw %ax, %ax
jle 0x1605e
movq %r14, 0x58(%rsp)
testq %r15, %r15
movq %rbp, %r14
jne 0x15f4e
callq 0x16854
leaq 0x1dfaa(%rip), %rcx     # 0x33ed0
movq 0x10(%rcx), %r8
movl $0x0, (%rsp)
movl $0x2, %edi
xorl %esi, %esi
leaq 0x77d7(%rip), %rdx      # 0x1d716
movq %rax, %rcx
movq 0x40(%rsp), %r9
xorl %eax, %eax
callq 0x19ca8
movq %r12, %rbp
orq $0xb5800c, %rbp         # imm = 0xB5800C
movl $0x80000000, 0xb5800c(%r13,%r12) # imm = 0x80000000
orq $0xb58800, %r12         # imm = 0xB58800
movw $0x100, %ax             # imm = 0x100
xorl %ebx, %ebx
xorl %r13d, %r13d
movswl %ax, %ecx
leal (%r12,%rcx,4), %ecx
movswl 0x1290(%rsp,%rbx,2), %edx
andl $-0x4, %ecx
movq 0x38(%rsp), %rsi
movl %edx, (%rsi,%rcx)
incl %eax
testl $0x1ff, %eax            # imm = 0x1FF
jne 0x15fbc
incl %r13d
movq 0x1d02f(%rip), %rax     # 0x32fd0
movq (%rax), %rdi
callq 0xd290
movswl %r13w, %eax
addl $0x80000000, %eax       # imm = 0x80000000
movq 0x38(%rsp), %rcx
movl %eax, (%rcx,%rbp)
xorl %eax, %eax
incq %rbx
cmpq $0x7f00, %rbx           # imm = 0x7F00
jne 0x15f74
movq 0x38(%rsp), %r13
movl $0x0, (%r13,%rbp)
movq 0x58(%rsp), %rdi
callq 0xd0f0
testq %r15, %r15
jne 0x16002
leaq 0x1290(%rsp), %rdi
movq %r14, %rsi
callq 0x114f2
movq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x1165b
xorl %eax, %eax
movl 0x34(%rsp), %ebx
jmp 0x16042
callq 0x16854
leaq 0x1deba(%rip), %rcx     # 0x33ed0
movq (%rcx), %r8
movl %r15d, (%rsp)
movl $0x0, 0x28(%rsp)
xorl %edi, %edi
xorl %esi, %esi
leaq 0x76b9(%rip), %rdx      # 0x1d6e9
movq %rax, %rcx
movq %r14, %r9
xorl %eax, %eax
callq 0x19ca8
movb $0x1, %al
movq %rbp, %r14
movl $0x180, %ebp            # imm = 0x180
testb %al, %al
jne 0x16202
incq %r15
cmpq $0x3, %r15
jne 0x15e39
jmp 0x1609d
callq 0x16854
leaq 0x1de66(%rip), %rcx     # 0x33ed0
movq (%rcx), %r8
movl %r15d, (%rsp)
movl $0x0, 0x28(%rsp)
xorl %edi, %edi
xorl %esi, %esi
leaq 0x7665(%rip), %rdx      # 0x1d6e9
movq %rax, %rcx
movq 0x40(%rsp), %r9
xorl %eax, %eax
callq 0x19ca8
movq %r14, %rdi
callq 0xd0f0
jmp 0x1603d
addq $0xa10000, %r13         # imm = 0xA10000
movq $0x0, 0x28(%rsp)
leaq 0x64(%rsp), %r15
xorl %ebp, %ebp
movq %r13, 0x38(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x1290(%rsp)
movzwl 0x68(%rsp), %eax
cmpq %rax, 0x28(%rsp)
jae 0x1613a
cmpl 0x4c(%rsp), %ebp
jae 0x1613a
xorl %r14d, %r14d
xorl %ebx, %ebx
leaq 0x1290(%rsp), %r13
movq %r14, %r12
movl %ebp, %edi
movq %r15, %rsi
callq 0x14bd3
addq $0x10, %r14
movl %eax, %ecx
movl $0xffff, %eax           # imm = 0xFFFF
cmpq %rcx, %r14
jbe 0x16129
movl %ebp, %edi
movq %r15, %rsi
callq 0x14bd3
movl %eax, %ecx
xorl %eax, %eax
cmpq %rcx, %r12
jae 0x16129
movl %ebp, %edi
movq %r15, %rsi
callq 0x14bd3
leal (%rax,%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
notl %eax
movl %eax, (%r13)
addq $0x4, %r13
addl $-0x10, %ebx
cmpq $0x40, %r14
jne 0x160e3
movl %ebp, %eax
shll $0x10, %eax
xorl %ecx, %ecx
movq 0x38(%rsp), %r13
movl 0x1290(%rsp,%rcx,4), %edx
addl %eax, %edx
movl %edx, (%r13,%rcx,4)
incq %rcx
cmpq $0x4, %rcx
jne 0x16146
incl %ebp
cmpl $0x20, %ebp
jne 0x160b4
movq 0x28(%rsp), %rcx
incq %rcx
addq $0x10, %r13
movq %rcx, 0x28(%rsp)
cmpq $0x40, %rcx
jne 0x160b2
callq 0x16854
leaq 0x1dd41(%rip), %rcx     # 0x33ed0
movq 0x10(%rcx), %r8
leaq 0x76f9(%rip), %rdx      # 0x1d893
movl $0x2, %edi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19ca8
movq 0x50(%rsp), %r14
movzwl 0x68(%rsp), %eax
movl %eax, 0x4f8(%r14)
xorl %eax, %eax
jmp 0x15180
callq 0x16854
movq (%r12), %r8
movl %ebx, (%rsp)
leaq 0x7649(%rip), %rdx      # 0x1d81f
xorl %edi, %edi
xorl %esi, %esi
movq %rax, %rcx
movl %r15d, %r9d
xorl %eax, %eax
callq 0x19ca8
callq 0x16854
leaq 0x1dcdd(%rip), %rcx     # 0x33ed0
movq (%rcx), %r8
leaq 0x6e3f(%rip), %rdx      # 0x1d03c
jmp 0x1516d
cmpb $0x0, 0x28(%rsp)
jne 0x161b0
jmp 0x161e7