// File: /workspace/github_c_makefile_star2_O3/findstr[P]version-database/diff.c
// Function: diff_tree
static void
diff_tree(dr_t a, dr_t b, dr_t root)
{
	int i;
	drb_t file;
	dr_t data, afinger;
	dr_t patchhash;
	char buf[2048];
	struct ref *r;
	struct release ra, rb;
	struct tree tb, ta_name, ta_hash;
	int add, dff, cpy, del;
	a = db_aliashash(a);
	b = db_aliashash(b);
	db_readrel(&ra, a);
	db_readrel(&rb, b);
	db_readtree(&ta_name, ra.tree);
	db_readtree(&tb, rb.tree);
	afinger = dr_ref(ra.finger);
	printf("tree a:%s\n", ra.tree->buf);
	printf("tree b:%s\n", rb.tree->buf);
	release_destroy(&ra);
	release_destroy(&rb);
	tree_clone(&ta_hash, &ta_name);
	tree_sort(&ta_name, ref_namecmp);
	tree_sort(&ta_hash, ref_hashcmp);
	drb_init(&file, 1024);
	printf("diff start\n");
	printf("detect change\n");
	add = 0; dff = 0; cpy = 0; del = 0;
	for (i = 0; i < tb.refn; i++) {
		struct ref *a, *b;
		dr_t patch = NULL;
		b = &tb.refs[i];
		if ((a = tree_search(&ta_hash, b, ref_hashcmp))) {
			if (dr_cmp(b->name, a->name) != 0) {
				struct CPY C;
				C.namea = a->name;
				C.name = b->name;
				ctrl_cpy(&file, &C);
				++cpy;
			} else {
				//printf("%s is same, skip it.\n", b->name->buf);
			}
			continue;
		}
		if (b->data == NULL)
			b->data = db_read(b->hash);
		a = tree_search(&ta_name, b, ref_namecmp);
		if (a == NULL) {
			struct NEW N;
			N.name = (b->name);
			N.data = (b->data);
			ctrl_new(&file, &N);
			add++;
		} else {
			if (a->data == NULL)
				a->data = db_read(a->hash);
			patch = diff_content(a->data, b->data);
			if (b->data->size <= patch->size) {//no fix patch
				struct NEW N;
				N.name = (b->name);
				N.data = (b->data);
				ctrl_new(&file, &N);
				add++;
			} else {
				struct DFF D;
				D.name = b->name;
				D.patch = patch;
				ctrl_dff(&file, &D);
				++dff;
			}
			dr_unref(patch);
		}
	}
	printf("detect recpye\n");
#if ENABLE_DEL
	tree_sort(&tb, ref_namecmp);
	for (i = 0; i < ta_name.refn; i++) {
		r = &ta_name.refs[i];
		if (tree_search(&tb, r, ref_namecmp) == NULL) { //clear
			struct DEL d;
			d.name = r->name;
			ctrl_del(&file, &d);
			++del;
		}
	}
#endif
	data = drb_dump(&file);
	patchhash = db_hash(data);
	snprintf(buf, sizeof(buf), "%s/patch.dat", str(afinger));
	dir_writefile(buf, data, root);
	snprintf(buf, sizeof(buf),
		"{\"add\":%d, \"dff\":%d, \"cpy\":%d, "
		"\"del\":%d, \"hash\":\"%s\", \"size\":%d }",
		add, dff, cpy, del, patchhash->buf, data->size);
	dr_unref(data);
	data = dr_newstr(buf);
	snprintf(buf, sizeof(buf), "%s/patch.json", str(afinger));
	dir_writefile(buf, data, root);
	printf("%s\n\n", str(data));
	snprintf(buf, sizeof(buf), "%s/%s/patch.dat", str(root), str(afinger));
	dr_unref(data);
	dr_unref(patchhash);
	dr_unref(afinger);
	tree_destroy(&ta_name);
	tree_destroy(&ta_hash);
	tree_destroy(&tb);
	data = dr_newstr(buf);
	verify(a, b, data);
	dr_unref(a);
	dr_unref(b);
	dr_unref(data);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd48, %rsp            # imm = 0xD48
movq %rdx, -0xc8(%rbp)
movq %rsi, %rbx
callq 0x5d42
movq %rax, %r14
movq %rbx, %rdi
callq 0x5d42
movq %rax, %r15
leaq -0x168(%rbp), %rbx
movq %rbx, %rdi
movq %r14, -0x90(%rbp)
movq %r14, %rsi
callq 0x5b7e
leaq -0x138(%rbp), %r14
movq %r14, %rdi
movq %r15, -0xb8(%rbp)
movq %r15, %rsi
callq 0x5b7e
movq 0x10(%rbx), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x5be3
movq 0x10(%r14), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x5be3
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x3bc0
incl (%rax)
movq %rax, -0xc0(%rbp)
movq 0x10(%rbx), %rsi
addq $0x8, %rsi
leaq 0x666e(%rip), %rdi      # 0xa244
movq $0x0, -0x70(%rbp)
xorl %eax, %eax
callq 0x2110
movq 0x10(%r14), %rsi
addq $0x8, %rsi
leaq 0x665b(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x2110
movq %rbx, %rdi
callq 0x65fc
movq %r14, %rdi
callq 0x65fc
leaq -0x108(%rbp), %rbx
leaq -0xa0(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x627f
leaq 0x22e1(%rip), %rsi      # 0x5f0c
movq %r14, %rdi
callq 0x6244
leaq 0x22ba(%rip), %rsi      # 0x5ef4
movq %rbx, %rdi
callq 0x6244
movl $0x0, -0x88(%rbp)
movl $0x40c, %edi            # imm = 0x40C
callq 0x2200
movabsq $0x40000000001, %rcx    # imm = 0x40000000001
movq %rcx, (%rax)
movb $0x0, 0x408(%rax)
movq %rax, -0x80(%rbp)
leaq 0x673b(%rip), %rdi      # 0xa3b0
callq 0x20a0
leaq 0x673a(%rip), %rdi      # 0xa3bb
callq 0x20a0
cmpl $0x0, -0xb0(%rbp)
movl $0x0, %r12d
movl $0x0, -0x4c(%rbp)
movl $0x0, %r15d
jle 0x40ea
leaq 0x2247(%rip), %r13      # 0x5ef4
xorl %ecx, %ecx
xorl %r15d, %r15d
movl $0x0, -0x4c(%rbp)
xorl %r12d, %r12d
movq %rcx, -0xd8(%rbp)
leaq (%rcx,%rcx,2), %rbx
shlq $0x3, %rbx
addq -0xa8(%rbp), %rbx
leaq -0x108(%rbp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x6260
testq %rax, %rax
je 0x3d39
movq 0x8(%rbx), %rbx
movq 0x8(%rax), %r14
movslq 0x4(%rbx), %rdx
cmpl 0x4(%r14), %edx
jne 0x3d10
leaq 0x8(%rbx), %rdi
leaq 0x8(%r14), %rsi
callq 0x2210
testl %eax, %eax
je 0x40d0
movq %r14, -0x968(%rbp)
movq %rbx, -0x970(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x970(%rbp), %rsi
callq 0x6b71
incl %r15d
jmp 0x40d0
cmpq $0x0, 0x10(%rbx)
jne 0x3d4c
movq (%rbx), %rdi
callq 0x59e3
movq %rax, 0x10(%rbx)
leaq -0xa0(%rbp), %rdi
movq %rbx, %rsi
leaq 0x21af(%rip), %rdx      # 0x5f0c
callq 0x6260
movq %rbx, %rcx
testq %rax, %rax
je 0x3fa7
movq %rax, %rbx
movq %rcx, -0xd0(%rbp)
movq 0x10(%rax), %r14
testq %r14, %r14
jne 0x3d90
movq (%rbx), %rdi
callq 0x59e3
movq %rax, %r14
movq %rax, 0x10(%rbx)
movl %r12d, -0x2c(%rbp)
movl %r15d, -0x30(%rbp)
movq -0xd0(%rbp), %rax
movq 0x10(%rax), %r15
xorl %ebx, %ebx
movl %ebx, -0xf8(%rbp)
movl 0x4(%r15), %r12d
leaq 0x8(%r14), %rdi
movl 0x4(%r14), %esi
callq 0x7c47
movq %rax, -0x38(%rbp)
movl %ebx, -0x970(%rbp)
movl $0x40c, %edi            # imm = 0x40C
callq 0x2200
movabsq $0x40000000001, %rcx    # imm = 0x40000000001
movq %rcx, (%rax)
movb $0x0, 0x408(%rax)
movq %rax, -0x968(%rbp)
movq %r15, -0x58(%rbp)
movl 0x4(%r15), %esi
leaq -0x970(%rbp), %r15
movq %r15, %rdi
callq 0x7085
movq %r12, %rdx
testl %edx, %edx
jle 0x3f6c
addq $0x8, -0x58(%rbp)
xorl %eax, %eax
movq %r14, -0x78(%rbp)
movq %rdx, -0x40(%rbp)
movq %rax, -0x60(%rbp)
cltq
movq -0x58(%rbp), %rcx
leaq (%rcx,%rax), %rbx
movl %edx, %r13d
subl %eax, %r13d
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movq %rbx, %rdx
movl %r13d, %ecx
leaq -0xf8(%rbp), %r8
callq 0x4807
cmpl %r13d, %eax
jg 0x479f
movl %eax, %r12d
cmpl $0xb, %eax
jge 0x3ef0
movq %rbx, -0xe0(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x60(%rbp), %rdx
leal 0x1(%rdx), %ebx
xorl %r14d, %r14d
movq -0x40(%rbp), %rcx
cmpl %ecx, %ebx
jge 0x3efd
movslq %ebx, %r15
movl %edx, %r14d
notl %r14d
movq -0x58(%rbp), %rax
leaq (%rax,%r15), %r13
negq %r15
leaq (%rcx,%r15), %rax
movq %rax, -0x48(%rbp)
addl %r14d, %ecx
movq -0x78(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
leaq -0x64(%rbp), %r8
callq 0x4807
movl %eax, %r12d
cltq
cmpq %rax, -0x48(%rbp)
jl 0x4780
cmpl $0xa, %r12d
jg 0x3edf
incl %ebx
decq %r15
decq %r14
incq %r13
movq -0x40(%rbp), %rcx
movq %rcx, %rax
addq %r15, %rax
jne 0x3e92
movl %ecx, %ebx
movl -0x64(%rbp), %r14d
leaq -0x970(%rbp), %r15
movq -0x60(%rbp), %rdx
jmp 0x3f00
movl -0xf8(%rbp), %r14d
movq -0x60(%rbp), %r13
jmp 0x3f37
xorl %r12d, %r12d
movq -0xe0(%rbp), %rax
movq %rax, -0xd70(%rbp)
movl %ebx, %eax
subl %edx, %eax
movl %eax, -0xd68(%rbp)
movq %r15, %rdi
leaq -0xd70(%rbp), %rsi
callq 0x72c5
movl %r14d, -0xf8(%rbp)
movl %ebx, %r13d
cmpl $0xb, %r12d
jl 0x3f5a
movl %r14d, -0xd70(%rbp)
movl %r12d, -0xd6c(%rbp)
movq %r15, %rdi
leaq -0xd70(%rbp), %rsi
callq 0x71a5
addl %r12d, %r13d
movl %r13d, %ebx
movl %ebx, %eax
movq -0x40(%rbp), %rdx
cmpl %edx, %ebx
movq -0x78(%rbp), %r14
jl 0x3e1c
movq -0x38(%rbp), %rdi
callq 0x2030
movq -0x968(%rbp), %r14
movl -0x970(%rbp), %r12d
movl (%r14), %r15d
movslq %r12d, %r13
leaq 0xc(%r13), %rsi
cmpl $0x1, %r15d
jne 0x3fd8
movq %r14, %rdi
callq 0x2220
movq %rax, %rbx
movl %r12d, 0x4(%rax)
jmp 0x4040
movq 0x8(%rcx), %rax
movq %rax, -0x970(%rbp)
movq 0x10(%rcx), %rax
movq %rax, -0x968(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x970(%rbp), %rsi
callq 0x66ac
incl %r12d
jmp 0x40d0
movq %rsi, %rdi
callq 0x2200
movq %rax, %rbx
movl $0x1, (%rax)
movl %r13d, 0x4(%rax)
movb $0x0, 0x8(%rax,%r13)
movl 0x4(%r14), %eax
cmpl %r13d, %eax
cmovll %eax, %r12d
leaq 0x8(%rbx), %rdi
movl %r12d, 0x4(%r14)
leaq 0x8(%r14), %rsi
movslq %r12d, %rdx
callq 0x21d0
leal -0x1(%r15), %eax
movl %eax, (%r14)
cmpl $0x1, %r15d
jg 0x4040
testl %eax, %eax
movl -0x30(%rbp), %r15d
movl -0x2c(%rbp), %r12d
leaq 0x1ec4(%rip), %r13      # 0x5ef4
jne 0x47be
movq %r14, %rdi
callq 0x2030
jmp 0x404f
movl -0x30(%rbp), %r15d
movl -0x2c(%rbp), %r12d
leaq 0x1ea5(%rip), %r13      # 0x5ef4
movq -0xd0(%rbp), %rdx
movq 0x10(%rdx), %rax
movl 0x4(%rax), %ecx
cmpl 0x4(%rbx), %ecx
jle 0x408c
movq 0x8(%rdx), %rax
movq %rax, -0x970(%rbp)
movq %rbx, -0x968(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x970(%rbp), %rsi
callq 0x6a86
incl -0x4c(%rbp)
jmp 0x40b4
movq 0x8(%rdx), %rcx
movq %rcx, -0x970(%rbp)
movq %rax, -0x968(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x970(%rbp), %rsi
callq 0x66ac
incl %r12d
movl (%rbx), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rbx)
cmpl $0x1, %ecx
jg 0x40d0
testl %eax, %eax
jne 0x47be
movq %rbx, %rdi
callq 0x2030
movq -0xd8(%rbp), %rcx
incq %rcx
movslq -0xb0(%rbp), %rax
cmpq %rax, %rcx
jl 0x3cbc
movl %r12d, -0x2c(%rbp)
movl %r15d, -0x30(%rbp)
leaq 0x62d0(%rip), %rdi      # 0xa3c9
callq 0x20a0
leaq 0x1e07(%rip), %rsi      # 0x5f0c
leaq -0xb0(%rbp), %rdi
callq 0x6244
cmpl $0x0, -0xa0(%rbp)
jle 0x418d
xorl %r13d, %r13d
leaq 0x1de8(%rip), %rbx      # 0x5f0c
leaq -0xb0(%rbp), %r14
xorl %r15d, %r15d
movq $0x0, -0x70(%rbp)
movq -0x98(%rbp), %r12
leaq (%r12,%r13), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x6260
testq %rax, %rax
jne 0x417a
movq 0x8(%r12,%r13), %rax
movq %rax, -0x970(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x970(%rbp), %rsi
callq 0x6b36
movq -0x70(%rbp), %rax
incl %eax
movq %rax, -0x70(%rbp)
incq %r15
movslq -0xa0(%rbp), %rax
addq $0x18, %r13
cmpq %rax, %r15
jl 0x4136
movq -0x80(%rbp), %rbx
movl -0x88(%rbp), %r12d
movl (%rbx), %r14d
movslq %r12d, %r13
leaq 0xc(%r13), %rsi
cmpl $0x1, %r14d
jne 0x41b9
movq %rbx, %rdi
callq 0x2220
movq %rax, %r15
movl %r12d, 0x4(%rax)
jmp 0x420e
movq %rsi, %rdi
callq 0x2200
movq %rax, %r15
movl $0x1, (%rax)
movl %r13d, 0x4(%rax)
movb $0x0, 0x8(%rax,%r13)
movl 0x4(%rbx), %eax
cmpl %r13d, %eax
cmovll %eax, %r12d
leaq 0x8(%r15), %rdi
movl %r12d, 0x4(%rbx)
leaq 0x8(%rbx), %rsi
movslq %r12d, %rdx
callq 0x21d0
leal -0x1(%r14), %eax
movl %eax, (%rbx)
cmpl $0x1, %r14d
jg 0x420e
testl %eax, %eax
jne 0x47be
movq %rbx, %rdi
callq 0x2030
movq $0x0, -0x80(%rbp)
movq %r15, %rdi
callq 0x56cc
movq %rax, %r13
movq -0xc0(%rbp), %rax
leaq 0x8(%rax), %rcx
leaq 0x607a(%rip), %rdx      # 0xa2ad
leaq -0x970(%rbp), %r12
movl $0x800, %esi            # imm = 0x800
movq %r12, %rdi
movq %rcx, %r14
xorl %eax, %eax
callq 0x2120
movq %r12, %rdi
movq %r15, %rsi
movq -0xc8(%rbp), %rdx
callq 0x53d9
leaq 0x8(%r13), %r10
movl 0x4(%r15), %r11d
subq $0x8, %rsp
leaq 0x5fe9(%rip), %rdx      # 0xa25a
movl $0x800, %esi            # imm = 0x800
movq %r12, %rdi
movl -0x2c(%rbp), %ecx
movl -0x4c(%rbp), %r8d
movl -0x30(%rbp), %r9d
xorl %eax, %eax
pushq %r11
pushq %r10
pushq -0x70(%rbp)
callq 0x2120
addq $0x20, %rsp
movl (%r15), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%r15)
cmpl $0x1, %ecx
jg 0x42b4
testl %eax, %eax
jne 0x47be
movq %r15, %rdi
callq 0x2030
movq %r12, %rdi
callq 0x20e0
movslq %eax, %rbx
leaq 0xc(%rbx), %rdi
callq 0x2200
movq %rax, %r15
movl $0x1, (%rax)
movl %ebx, 0x4(%rax)
movq %r13, -0x48(%rbp)
leaq 0x8(%rax), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x21d0
movb $0x0, 0x8(%r15,%rbx)
leaq 0x5fa5(%rip), %rdx      # 0xa29c
movl $0x800, %esi            # imm = 0x800
movq %r12, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2120
movq %r12, %rdi
movq %r15, %rsi
movq -0xc8(%rbp), %rbx
movq %rbx, %rdx
callq 0x53d9
leaq 0x5f11(%rip), %rdi      # 0xa236
movq %r13, %rsi
movq -0x48(%rbp), %r13
xorl %eax, %eax
callq 0x2110
addq $0x8, %rbx
leaq 0x5f6c(%rip), %rdx      # 0xa2aa
movl $0x800, %esi            # imm = 0x800
movq %r12, %rdi
movq %rbx, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x2120
movl (%r15), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%r15)
cmpl $0x1, %ecx
jg 0x4371
testl %eax, %eax
jne 0x47be
movq %r15, %rdi
callq 0x2030
testq %r13, %r13
movq -0xc0(%rbp), %rbx
je 0x439d
movl (%r13), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%r13)
cmpl $0x1, %ecx
jg 0x439d
testl %eax, %eax
jne 0x47be
movq %r13, %rdi
callq 0x2030
testq %rbx, %rbx
je 0x43be
movl (%rbx), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rbx)
cmpl $0x1, %ecx
jg 0x43be
testl %eax, %eax
jne 0x47be
movq %rbx, %rdi
callq 0x2030
leaq -0xa0(%rbp), %rdi
callq 0x6189
leaq -0x108(%rbp), %rdi
callq 0x6189
leaq -0xb0(%rbp), %rdi
callq 0x6189
leaq -0x970(%rbp), %r15
movq %r15, %rdi
callq 0x20e0
movslq %eax, %r14
leaq 0xc(%r14), %rdi
callq 0x2200
movq %rax, %rbx
movl $0x1, %eax
movl %eax, (%rbx)
movl %r14d, 0x4(%rbx)
leaq 0x8(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x21d0
xorl %eax, %eax
movb %al, 0x8(%rbx,%r14)
xorl %r13d, %r13d
movq -0x90(%rbp), %rax
leaq 0x8(%rax), %rcx
leaq 0x5f0e(%rip), %rdx      # 0xa344
leaq -0xd70(%rbp), %r15
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
xorl %eax, %eax
callq 0x2120
movq %r15, %rdi
callq 0x20e0
movslq %eax, %r14
leaq 0xc(%r14), %rdi
callq 0x2200
movq %rax, %r12
movl $0x1, %eax
movl %eax, (%r12)
movl %r14d, 0x4(%r12)
leaq 0x8(%r12), %rdi
movq %rdi, -0x40(%rbp)
movq %r15, %rsi
movq %r14, %rdx
callq 0x21d0
movb %r13b, 0x8(%r12,%r14)
movq -0xb8(%rbp), %r13
leaq 0x8(%r13), %rcx
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
leaq 0x5ea0(%rip), %rdx      # 0xa344
xorl %eax, %eax
callq 0x2120
movq %r15, %rdi
callq 0x20e0
movslq %eax, %r14
leaq 0xc(%r14), %rdi
callq 0x2200
movq %rax, %r15
movl $0x1, %eax
movl %eax, (%r15)
movl %r14d, 0x4(%r15)
leaq 0x8(%r15), %rdi
movq %rdi, -0x38(%rbp)
leaq -0xd70(%rbp), %rsi
movq %r14, %rdx
callq 0x21d0
xorl %eax, %eax
movb %al, 0x8(%r15,%r14)
movq -0x90(%rbp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x4eb4
movq %r13, %rdi
movq %r15, -0x78(%rbp)
movq %r15, %rsi
callq 0x4eb4
leaq -0xf8(%rbp), %rdi
movq %r14, (%rdi)
movq %rbx, -0x60(%rbp)
movq %rbx, 0x8(%rdi)
movq %r12, -0x48(%rbp)
movq %r12, 0x10(%rdi)
callq 0x4950
leaq 0x5e1b(%rip), %r14      # 0xa34e
movl $0x400, %esi            # imm = 0x400
leaq -0xd70(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
movq -0x40(%rbp), %rcx
xorl %eax, %eax
callq 0x2120
movq %rbx, %rdi
xorl %esi, %esi
callq 0x52b7
movq %rax, %r15
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %r14, %rdx
movq -0x38(%rbp), %rcx
xorl %eax, %eax
callq 0x2120
movq %rbx, %rdi
xorl %esi, %esi
callq 0x52b7
movslq 0x4(%r15), %rbx
cmpl 0x4(%rax), %ebx
jne 0x47e8
movq %rax, %r14
leaq 0x8(%r15), %r12
leaq 0x8(%rax), %rsi
movq %r12, %rdi
movq %rbx, %rdx
callq 0x2210
testl %eax, %eax
jne 0x47e8
testl %ebx, %ebx
jle 0x4684
movq %r14, -0x38(%rbp)
movq %r15, -0x58(%rbp)
leaq (%r15,%rbx), %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movq %r12, %rdi
movl $0x9, %esi
callq 0x2100
xorl %r15d, %r15d
movb %r15b, (%rax)
leaq 0x1(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2100
movq %rax, %rbx
movb %r15b, (%rax)
movq %r14, %rdi
movq -0x48(%rbp), %rsi
callq 0x52b7
movq %rax, %r13
movq %rax, %rdi
callq 0x56cc
movq %rax, %r15
leaq 0x8(%rax), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x2190
testl %eax, %eax
jne 0x47dd
testq %r13, %r13
je 0x4644
movl (%r13), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%r13)
cmpl $0x1, %ecx
jg 0x4644
testl %eax, %eax
jne 0x47be
movq %r13, %rdi
callq 0x2030
testq %r15, %r15
je 0x4667
movl (%r15), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%r15)
cmpl $0x1, %ecx
jg 0x4667
testl %eax, %eax
jne 0x47be
movq %r15, %rdi
callq 0x2030
incq %rbx
movq %rbx, %r12
cmpq -0x40(%rbp), %rbx
jb 0x45c4
movq -0x58(%rbp), %r15
testq %r15, %r15
movq -0x38(%rbp), %r14
je 0x46a2
movl (%r15), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%r15)
cmpl $0x1, %ecx
jg 0x46a2
testl %eax, %eax
jne 0x47be
movq %r15, %rdi
callq 0x2030
testq %r14, %r14
je 0x46c5
movl (%r14), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%r14)
cmpl $0x1, %ecx
jg 0x46c5
testl %eax, %eax
jne 0x47be
movq %r14, %rdi
callq 0x2030
movq -0x48(%rbp), %rdx
movl (%rdx), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdx)
cmpl $0x1, %ecx
jg 0x46e6
testl %eax, %eax
jne 0x47be
movq -0x48(%rbp), %rdi
callq 0x2030
movq -0x78(%rbp), %rdi
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x4703
testl %eax, %eax
jne 0x47be
callq 0x2030
leaq 0x5c99(%rip), %rdi      # 0xa3a3
callq 0x20f0
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x4734
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x4734
testl %eax, %eax
jne 0x47be
callq 0x2030
movq -0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0x4755
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x4755
testl %eax, %eax
jne 0x47be
callq 0x2030
movq -0x60(%rbp), %rdi
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x476e
testl %eax, %eax
jne 0x47be
callq 0x2030
addq $0xd48, %rsp            # imm = 0xD48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5b6a(%rip), %rdi      # 0xa2f1
leaq 0x5b3e(%rip), %rsi      # 0xa2cc
leaq 0x5b3e(%rip), %rcx      # 0xa2d3
movl $0x60, %edx
callq 0x2130
leaq 0x5b14(%rip), %rdi      # 0xa2ba
leaq 0x5b1f(%rip), %rsi      # 0xa2cc
leaq 0x5b1f(%rip), %rcx      # 0xa2d3
movl $0x5a, %edx
callq 0x2130
leaq 0x58bc(%rip), %rdi      # 0xa081
leaq 0x58c1(%rip), %rsi      # 0xa08d
leaq 0x58c1(%rip), %rcx      # 0xa094
movl $0x2d, %edx
callq 0x2130
movq %r12, %rdi
movq %r14, %rsi
callq 0x23e0
leaq 0x5b6f(%rip), %rdi      # 0xa35e
leaq 0x5ad6(%rip), %rsi      # 0xa2cc
leaq 0x5b7f(%rip), %rcx      # 0xa37c
movl $0x90, %edx
callq 0x2130