LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/db.c
// Function: db_aliashash
dr_t
db_aliashash(dr_t a)
{
	dr_t aa = a;
	dr_t h, ah = NULL;
	int i, an = -1;
	struct release rel;
	if (strncmp(str(aa), ALIAS, ALIAS_SIZE) == 0) {
		if (*(str(aa) + ALIAS_SIZE) == '~')
			an = strtol(str(aa) + ALIAS_SIZE + 1, NULL, 0);
		else
			an = 0;
	}
	if (an == -1)
		return dr_ref(a);
	h = db_readhead(&rel, NULL);
	if (h->size == 0) {
		fprintf(stderr, "FATAL: empty db\n");
		exit(EINVAL);
	}
	i = 0;
	for (;;) {
		if (i == an) {
			ah = dr_ref(h);
			break;
		}
		dr_unref(h);
		h = dr_ref(rel.prev);
		if (h->size == 0)
			break;
		release_destroy(&rel);
		db_readrel(&rel, h);
		i++;
	}
	dr_unref(h);
	release_destroy(&rel);
	if (ah == NULL) {
		fprintf(stderr, "FATAL: invalid alias %s \n", str(aa));
		exit(EINVAL);
	} else {
		printf("alias: %s -> %s\n", str(aa), str(ah));
		return ah;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
leaq 0x49f9(%rip), %rsi      # 0xa6b8
movl $0x4, %edx
movq %rbx, %rdi
callq 0x2070
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x5cf0
xorl %r12d, %r12d
cmpb $0x7e, 0xc(%r14)
jne 0x5cf0
leaq 0xd(%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21b0
movq %rax, %r12
cmpl $-0x1, %r12d
je 0x5dbb
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
callq 0x5ba6
cmpl $0x0, 0x4(%rax)
je 0x5df4
movq %rax, %r15
testl %r12d, %r12d
je 0x5d6c
xorl %r14d, %r14d
leaq -0x58(%rbp), %r13
testq %r15, %r15
je 0x5d41
movl (%r15), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%r15)
cmpl $0x1, %ecx
jg 0x5d41
testl %eax, %eax
jne 0x5dd5
movq %r15, %rdi
callq 0x2030
movq -0x50(%rbp), %r15
testq %r15, %r15
je 0x5d4d
incl (%r15)
cmpl $0x0, 0x4(%r15)
je 0x5d77
movq %r13, %rdi
callq 0x6574
movq %r13, %rdi
movq %r15, %rsi
callq 0x5adc
decl %r12d
jne 0x5d1e
testq %r15, %r15
je 0x5d74
incl (%r15)
movq %r15, %r14
testq %r15, %r15
je 0x5d96
movl (%r15), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%r15)
cmpl $0x1, %ecx
jg 0x5d96
testl %eax, %eax
jne 0x5dd5
movq %r15, %rdi
callq 0x2030
leaq -0x58(%rbp), %rdi
callq 0x6574
testq %r14, %r14
je 0x5df9
leaq 0x8(%r14), %rdx
leaq 0x4939(%rip), %rdi      # 0xa6e8
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2110
jmp 0x5dc3
testq %r14, %r14
je 0x5dc3
incl (%r14)
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x42a5(%rip), %rdi      # 0xa081
leaq 0x42aa(%rip), %rsi      # 0xa08d
leaq 0x42aa(%rip), %rcx      # 0xa094
movl $0x2d, %edx
callq 0x2130
callq 0x25fb
movq %rbx, %rdi
callq 0x25d4
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/db.c
// Function: db_init
void
db_init()
{
	int err;
	err = MKDIR(DB);
	if (err == 0)
		err = MKDIR(ROOT);
	if (err == 0) {
		return ;
	} else if (errno == EEXIST) {
		fprintf(stderr, "FATAL: not a empty directory\n");
		exit(errno);
	} else {
		fprintf(stderr, "FATAL: init fail '%s'", strerror(errno));
		exit(errno);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x48ed(%rip), %rdi      # 0xa6f9
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x2090
testl %eax, %eax
jne 0x5e31
leaq 0x48dc(%rip), %rdi      # 0xa6fd
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x2090
testl %eax, %eax
jne 0x5e31
popq %rbp
retq
callq 0x2050
movl (%rax), %edi
movq 0x71b9(%rip), %rcx      # 0xcff8
movq (%rcx), %rsi
cmpl $0x11, %edi
jne 0x5e52
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2650
movq %rax, %rdx
callq 0x2623
nop
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/object.c
// Function: tree_marshal
dr_t
tree_marshal(struct tree *t)
{
	dr_t d;
	int i, sz;
	char *ptr;
	struct ref *refs = t->refs;
	sz =	4 +				//type
		4;				//refn
	for (i = 0; i < t->refn; i++) {
		struct ref *r = &refs[i];
		sz += 4 + r->hash->size + 4 + r->name->size;
	}
	d = dr_new(sz, NULL);
	ptr = (char*)d->buf;
	*(uint32_t *)ptr = TREE;			ptr += 4;
	*(uint32_t *)ptr = t->refn;			ptr += 4;
	for (i = 0; i < t->refn; i++) {
		struct ref *r = &refs[i];
		*(uint32_t *)ptr = r->hash->size;	ptr += 4;
		memcpy(ptr, r->hash->buf, r->hash->size);ptr += r->hash->size;
		*(uint32_t *)ptr = r->name->size;	ptr += 4;
		memcpy(ptr, r->name->buf, r->name->size);ptr += r->name->size;
	}
	return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x8(%rdi), %r12
movslq (%rdi), %r14
testq %r14, %r14
jle 0x5f03
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %rcx
movl $0x8, %eax
xorl %edx, %edx
movq (%r12,%rdx), %rsi
movq 0x8(%r12,%rdx), %rdi
addl 0x4(%rsi), %eax
movl 0x4(%rdi), %esi
addl %esi, %eax
addl $0x8, %eax
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0x5ee4
jmp 0x5f08
movl $0x8, %eax
movslq %eax, %rbx
leaq 0xc(%rbx), %rdi
callq 0x21f0
movl $0x1, (%rax)
movl %ebx, 0x4(%rax)
movb $0x0, 0x8(%rax,%rbx)
movl $0x45455254, 0x8(%rax)  # imm = 0x45455254
movq %rax, -0x30(%rbp)
movl %r14d, 0xc(%rax)
testl %r14d, %r14d
jle 0x5fab
movq -0x30(%rbp), %r13
addq $0x10, %r13
shlq $0x3, %r14
leaq (%r14,%r14,2), %rax
movq %rax, -0x38(%rbp)
xorl %ebx, %ebx
movq (%r12,%rbx), %rsi
movslq 0x4(%rsi), %r14
movl %r14d, (%r13)
leaq 0x4(%r13), %rdi
addq $0x8, %rsi
movq %r14, %rdx
callq 0x21c0
leaq (%r14,%r13), %rax
addq $0x4, %rax
movq %rax, -0x40(%rbp)
movq 0x8(%r12,%rbx), %rsi
movslq 0x4(%rsi), %r15
leaq (%r14,%r13), %rdi
addq $0x8, %rdi
movl %r15d, -0x4(%rdi)
addq $0x8, %rsi
movq %r15, %rdx
callq 0x21c0
movq -0x40(%rbp), %rax
leaq (%r15,%rax), %r13
addq $0x4, %r13
addq $0x18, %rbx
cmpq %rbx, -0x38(%rbp)
jne 0x5f4c
movq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/object.c
// Function: tree_unmarshal
void
tree_unmarshal(struct tree *t, dr_t d)
{
	int type, i, size;
	uint8_t *ptr = d->buf;
	type = *(uint32_t *)ptr;			ptr += 4;
	assert(type == TREE);
	t->refn = *(uint32_t *)ptr;			ptr += 4;
	size = t->refn * sizeof(struct ref);
	t->refs = MALLOC(size);
	memset(t->refs, 0, size);
	for (i = 0; i < t->refn; i++) {
		struct ref *r = &t->refs[i];
		size = *(uint32_t *)ptr;		ptr += 4;
		r->hash = dr_new(size, ptr);		ptr += size;
		size = *(uint32_t *)ptr;		ptr += 4;
		r->name = dr_new(size, ptr);		ptr += size;
	}
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x45455254, 0x8(%rsi)  # imm = 0x45455254
jne 0x60e1
movq %rsi, %r14
movq %rdi, %r15
movslq 0xc(%rsi), %rbx
movl %ebx, (%rdi)
leal (,%rbx,8), %eax
leal (%rax,%rax,2), %eax
movslq %eax, %r12
movq %r12, %rdi
callq 0x21f0
movq %rax, 0x8(%r15)
movq %rax, -0x38(%rbp)
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2140
testq %rbx, %rbx
jle 0x60d2
addq $0x10, %r14
shlq $0x3, %rbx
leaq (%rbx,%rbx,2), %rax
movq %rax, -0x30(%rbp)
xorl %ebx, %ebx
movslq (%r14), %r15
leaq 0x4(%r14), %r12
leaq 0xc(%r15), %rdi
callq 0x21f0
movq %rax, %r13
movl $0x1, %eax
movl %eax, (%r13)
movl %r15d, 0x4(%r13)
leaq 0x8(%r13), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x21c0
xorl %eax, %eax
movb %al, 0x8(%r13,%r15)
movq -0x38(%rbp), %rax
movq %r13, (%rax,%rbx)
movq %rax, %r13
leaq 0x4(%r14,%r15), %rax
movq %rax, -0x40(%rbp)
addq %r15, %r14
addq $0x8, %r14
movslq -0x4(%r14), %r15
leaq 0xc(%r15), %rdi
callq 0x21f0
movq %rax, %r12
movl $0x1, %eax
movl %eax, (%r12)
movl %r15d, 0x4(%r12)
leaq 0x8(%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21c0
xorl %eax, %eax
movb %al, 0x8(%r12,%r15)
movq %r12, 0x8(%r13,%rbx)
movq -0x40(%rbp), %rax
leaq (%r15,%rax), %r14
addq $0x4, %r14
addq $0x18, %rbx
cmpq %rbx, -0x30(%rbp)
jne 0x602d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x46ab(%rip), %rdi      # 0xa793
leaq 0x46b1(%rip), %rsi      # 0xa7a0
leaq 0x46b3(%rip), %rcx      # 0xa7a9
movl $0x5e, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/object.c
// Function: tree_destroy
void
tree_destroy(struct tree *t)
{
	int i;
	for (i = 0; i < t->refn; i++)
		ref_destroy(&t->refs[i]);
	FREE(t->refs);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x618b
movl $0x10, %r14d
xorl %r15d, %r15d
movq 0x8(%rbx), %r12
movq -0x10(%r12,%r14), %rdi
testq %rdi, %rdi
je 0x613f
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x613f
testl %eax, %eax
jne 0x619c
callq 0x2030
movq -0x8(%r12,%r14), %rdi
testq %rdi, %rdi
je 0x615e
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x615e
testl %eax, %eax
jne 0x619c
callq 0x2030
movq (%r12,%r14), %rdi
testq %rdi, %rdi
je 0x617c
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x617c
testl %eax, %eax
jne 0x619c
callq 0x2030
incq %r15
movslq (%rbx), %rax
addq $0x18, %r14
cmpq %rax, %r15
jl 0x611c
movq 0x8(%rbx), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2030
leaq 0x3ede(%rip), %rdi      # 0xa081
leaq 0x3ee3(%rip), %rsi      # 0xa08d
leaq 0x3ee3(%rip), %rcx      # 0xa094
movl $0x2d, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/object.c
// Function: tree_clone
void
tree_clone(struct tree *to, struct tree *from)
{
	int i;
	to->refn = from->refn;
	to->refs = MALLOC(from->refn * sizeof(struct ref));
	for (i = 0; i < from->refn; i++)
		ref_clone(&to->refs[i], &from->refs[i]);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl (%rsi), %eax
movl %eax, (%rdi)
movslq (%rsi), %r12
leaq (,%r12,8), %rax
leaq (%rax,%rax,2), %rbx
movq %rbx, %rdi
callq 0x21f0
movq %rax, 0x8(%r15)
testq %r12, %r12
jle 0x626b
movq 0x8(%r14), %rcx
xorl %edx, %edx
movq (%rcx,%rdx), %rsi
testq %rsi, %rsi
je 0x623c
incl (%rsi)
movq %rsi, (%rax,%rdx)
movq 0x8(%rcx,%rdx), %rsi
testq %rsi, %rsi
je 0x624c
incl (%rsi)
movq %rsi, 0x8(%rax,%rdx)
movq 0x10(%rcx,%rdx), %rsi
testq %rsi, %rsi
je 0x625d
incl (%rsi)
movq %rsi, 0x10(%rax,%rdx)
addq $0x18, %rdx
cmpq %rdx, %rbx
jne 0x6231
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/object.c
// Function: release_marshal
dr_t
release_marshal(struct release *r)
{
	dr_t d;
	int sz;
	uint8_t *ptr;
	sz =	4 +				//type
		sizeof(uint64_t) +		//time
		4 + r->prev->size +		//prev
		4 + r->tree->size +		//tree
		4 + r->ver->size +		//ver
		4 + r->note->size +		//note
		4 + r->finger->size;		//finger
	d = dr_new(sz, NULL);
	ptr = d->buf;
	*(uint32_t *)ptr = RELEASE;			ptr += 4;
	*(uint64_t *)ptr = r->time;			ptr += sizeof(uint64_t);
	*(uint32_t *)ptr = r->prev->size;		ptr += 4;
	memcpy(ptr, r->prev->buf, r->prev->size);	ptr += r->prev->size;
	*(uint32_t *)ptr = r->tree->size;		ptr += 4;
	memcpy(ptr, r->tree->buf, r->tree->size);	ptr += r->tree->size;
	*(uint32_t *)ptr = r->ver->size;		ptr += 4;
	memcpy(ptr, r->ver->buf, r->ver->size);		ptr += r->ver->size;
	*(uint32_t *)ptr = r->note->size;		ptr += 4;
	memcpy(ptr, r->note->buf, r->note->size);	ptr += r->note->size;
	*(uint32_t *)ptr = r->finger->size;		ptr += 4;
	memcpy(ptr, r->finger->buf, r->finger->size);
	return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r13
movq 0x8(%rdi), %rcx
movq %rcx, -0x30(%rbp)
movq 0x10(%rdi), %rax
movq %rax, -0x40(%rbp)
movslq 0x4(%rcx), %rbx
movslq 0x4(%rax), %r15
movq 0x18(%rdi), %rax
movq %rax, -0x50(%rbp)
movslq 0x4(%rax), %rsi
movq %rsi, -0x38(%rbp)
movq 0x20(%rdi), %rax
movq %rax, -0x60(%rbp)
movslq 0x4(%rax), %rcx
movq %rcx, -0x48(%rbp)
movq 0x28(%rdi), %rax
movq %rax, -0x68(%rbp)
movslq 0x4(%rax), %rdx
movq %rdx, -0x58(%rbp)
leal (%rsi,%rcx), %ecx
addl %ebx, %ecx
addl %r15d, %ecx
leal (%rdx,%rcx), %eax
addl $0x20, %eax
movslq %eax, %r12
leaq 0xc(%r12), %rdi
callq 0x21f0
movq %rax, %r14
movl $0x1, (%rax)
movl %r12d, 0x4(%rax)
movb $0x0, 0x8(%rax,%r12)
movl $0x204c4552, 0x8(%rax)  # imm = 0x204C4552
movq (%r13), %rax
movq %rax, 0xc(%r14)
movl %ebx, 0x14(%r14)
leaq 0x18(%r14), %rdi
movq -0x30(%rbp), %rsi
addq $0x8, %rsi
movq %rbx, %rdx
callq 0x21c0
leaq (%r14,%rbx), %r12
addq $0x18, %r12
leaq (%r14,%rbx), %rdi
addq $0x1c, %rdi
movl %r15d, -0x4(%rdi)
movq -0x40(%rbp), %rsi
addq $0x8, %rsi
movq %r15, %rdx
callq 0x21c0
leaq (%r15,%r12), %rbx
addq $0x4, %rbx
leaq 0x8(%r15,%r12), %rdi
movq -0x38(%rbp), %r12
movl %r12d, -0x4(%rdi)
movq -0x50(%rbp), %rsi
addq $0x8, %rsi
movq %r12, %rdx
callq 0x21c0
leaq (%r12,%rbx), %r15
addq $0x4, %r15
leaq 0x8(%r12,%rbx), %rdi
movq -0x48(%rbp), %rdx
movl %edx, -0x4(%rdi)
movq -0x60(%rbp), %rsi
addq $0x8, %rsi
movq %rdx, %rbx
callq 0x21c0
leaq (%rbx,%r15), %rdi
addq $0x8, %rdi
movq -0x58(%rbp), %rdx
movl %edx, -0x4(%rdi)
movq -0x68(%rbp), %rsi
addq $0x8, %rsi
callq 0x21c0
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/object.c
// Function: release_unmarshal
void
release_unmarshal(struct release *r, dr_t d)
{
	int type, size;
	uint8_t *ptr = d->buf;
	type = *(uint32_t *)ptr;			ptr += 4;
	assert(type == RELEASE);
	r->time = *(uint64_t *)ptr;			ptr += sizeof(uint64_t);
	size = *(uint32_t *)ptr;			ptr += 4;
	r->prev = dr_new(size, ptr);			ptr += size;
	size = *(uint32_t *)ptr;			ptr += 4;
	r->tree = dr_new(size, ptr);			ptr += size;
	size = *(uint32_t *)ptr;			ptr += 4;
	r->ver = dr_new(size, ptr);			ptr += size;
	size = *(uint32_t *)ptr;			ptr += 4;
	r->note = dr_new(size, ptr);			ptr += size;
	size = *(uint32_t *)ptr;			ptr += 4;
	r->finger = dr_new(size, ptr);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x204c4552, 0x8(%rsi)  # imm = 0x204C4552
jne 0x6555
movq %rsi, %r14
movq 0xc(%rsi), %rax
movq %rax, (%rdi)
movslq 0x14(%rsi), %r15
leaq 0x18(%rsi), %r12
movq %rdi, %rbx
leaq 0xc(%r15), %rdi
callq 0x21f0
movq %rax, %r13
movl $0x1, %eax
movl %eax, (%r13)
movl %r15d, 0x4(%r13)
leaq 0x8(%r13), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x21c0
xorl %eax, %eax
movb %al, 0x8(%r13,%r15)
movq %r13, 0x8(%rbx)
leaq (%r14,%r15), %r13
addq $0x18, %r13
addq %r15, %r14
addq $0x1c, %r14
movslq -0x4(%r14), %r15
leaq 0xc(%r15), %rdi
callq 0x21f0
movq %rax, %r12
movl $0x1, %eax
movl %eax, (%r12)
movl %r15d, 0x4(%r12)
leaq 0x8(%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21c0
xorl %eax, %eax
movb %al, 0x8(%r12,%r15)
movq %r12, 0x10(%rbx)
leaq (%r15,%r13), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
leaq (%r15,%r13), %r14
addq $0x8, %r14
movslq -0x4(%r14), %r15
leaq 0xc(%r15), %rdi
callq 0x21f0
movq %rax, %r12
movl $0x1, %eax
movl %eax, (%r12)
movl %r15d, 0x4(%r12)
leaq 0x8(%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21c0
xorl %eax, %eax
movb %al, 0x8(%r12,%r15)
movq %r12, 0x18(%rbx)
movq -0x30(%rbp), %rax
leaq (%r15,%rax), %r13
addq $0x4, %r13
leaq (%r15,%rax), %r14
addq $0x8, %r14
movslq -0x4(%r14), %r15
leaq 0xc(%r15), %rdi
callq 0x21f0
movq %rax, %r12
movl $0x1, %eax
movl %eax, (%r12)
movl %r15d, 0x4(%r12)
leaq 0x8(%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21c0
xorl %eax, %eax
movb %al, 0x8(%r12,%r15)
movq %r12, 0x20(%rbx)
leaq (%r15,%r13), %r14
addq $0x8, %r14
movslq -0x4(%r14), %r15
leaq 0xc(%r15), %rdi
callq 0x21f0
movq %rax, %r12
movl $0x1, %eax
movl %eax, (%r12)
movl %r15d, 0x4(%r12)
leaq 0x8(%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21c0
xorl %eax, %eax
movb %al, 0x8(%r12,%r15)
movq %r12, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4276(%rip), %rdi      # 0xa7d2
leaq 0x423d(%rip), %rsi      # 0xa7a0
leaq 0x4278(%rip), %rcx      # 0xa7e2
movl $0xb2, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/object.c
// Function: release_destroy
void
release_destroy(struct release *r)
{
	dr_unref(r->prev);
	dr_unref(r->tree);
	dr_unref(r->ver);
	dr_unref(r->note);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x659b
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x659b
testl %eax, %eax
jne 0x6602
callq 0x2030
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x65b9
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x65b9
testl %eax, %eax
jne 0x6602
callq 0x2030
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x65d7
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x65d7
testl %eax, %eax
jne 0x6602
callq 0x2030
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x65fb
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x65fb
testl %eax, %eax
jne 0x6602
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2030
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x3a78(%rip), %rdi      # 0xa081
leaq 0x3a7d(%rip), %rsi      # 0xa08d
leaq 0x3a7d(%rip), %rcx      # 0xa094
movl $0x2d, %edx
callq 0x2130
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/meta.c
// Function: ctrl_new
void
ctrl_new(drb_t *drb, struct NEW *c)
{
	writeact(drb, CTRL_NEW);
	writename(drb, c->name);
	writedata(drb, c->data);
	printf(".NEW %s size:%.3f KiB\n",
		c->name->buf, c->data->size/1024.f);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x10, %esi
callq 0x6680
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x6782
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x68af
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
addq $0x8, %rsi
cvtsi2ssl 0x4(%rax), %xmm0
mulss 0x41aa(%rip), %xmm0     # 0xa814
cvtss2sd %xmm0, %xmm0
leaq 0x41cb(%rip), %rdi      # 0xa840
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
jmp 0x2110
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/meta.c
// Function: writename
static void
writename(drb_t *drb, dr_t name)
{
	uint8_t *p;
	int size;
	p = drb_check(drb, NAME_LEN_SIZE + name->size);
	NAME_LEN(p) = size = name->size;	p += NAME_LEN_SIZE;
	memcpy(p, name->buf, size);		p += size;
	drb_end(drb, p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, -0x38(%rbp)
movl 0x4(%rsi), %eax
movq 0x8(%rdi), %rcx
movl 0x4(%rcx), %r13d
movl (%rdi), %ecx
addl %ecx, %eax
addl $0x2, %eax
movl %eax, -0x2c(%rbp)
cmpl %eax, %r13d
jge 0x6847
movslq %r13d, %rax
leaq (%rax,%rax), %r13
movq 0x8(%rbx), %r15
movl (%r15), %r14d
leaq 0xc(,%rax,2), %rsi
cmpl $0x1, %r14d
jne 0x67e5
movq %r15, %rdi
callq 0x2210
movq %rax, %r12
movl %r13d, 0x4(%rax)
jmp 0x6839
movq %rsi, %rdi
callq 0x21f0
movq %rax, %r12
movl $0x1, (%rax)
movl %r13d, 0x4(%rax)
movb $0x0, 0x8(%rax,%r13)
movl 0x4(%r15), %eax
cmpl %r13d, %eax
cmovgel %r13d, %eax
leaq 0x8(%r12), %rdi
movl %eax, 0x4(%r15)
leaq 0x8(%r15), %rsi
movslq %eax, %rdx
callq 0x21c0
leal -0x1(%r14), %eax
movl %eax, (%r15)
cmpl $0x1, %r14d
jg 0x6839
testl %eax, %eax
jne 0x6890
movq %r15, %rdi
callq 0x2030
movq %r12, 0x8(%rbx)
cmpl -0x2c(%rbp), %r13d
jl 0x67b8
movq 0x8(%rbx), %rax
movslq (%rbx), %rcx
movq -0x38(%rbp), %rsi
movslq 0x4(%rsi), %r15
leaq (%rax,%rcx), %r12
addq $0xa, %r12
movw %r15w, -0x2(%r12)
addq $0x8, %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x21c0
addl %r15d, %r12d
subl 0x8(%rbx), %r12d
addl $-0x8, %r12d
movl %r12d, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x37ea(%rip), %rdi      # 0xa081
leaq 0x37ef(%rip), %rsi      # 0xa08d
leaq 0x37ef(%rip), %rcx      # 0xa094
movl $0x2d, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/meta.c
// Function: writedata
static void
writedata(drb_t *drb, dr_t data)
{
	int size;
	uint8_t *p;
	p = drb_check(drb, data->size);
	uint32(p) = size = data->size;		p += 4;
	memcpy(p, data->buf, size);		p += size;
	drb_end(drb, p);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl 0x4(%rax), %r14d
movl (%rdi), %eax
movq %rsi, -0x38(%rbp)
addl 0x4(%rsi), %eax
movl %eax, -0x2c(%rbp)
cmpl %eax, %r14d
jge 0x696f
movslq %r14d, %rax
leaq (%rax,%rax), %r14
movq 0x8(%rbx), %r15
movl (%r15), %r13d
leaq 0xc(,%rax,2), %rsi
cmpl $0x1, %r13d
jne 0x690d
movq %r15, %rdi
callq 0x2210
movq %rax, %r12
movl %r14d, 0x4(%rax)
jmp 0x6961
movq %rsi, %rdi
callq 0x21f0
movq %rax, %r12
movl $0x1, (%rax)
movl %r14d, 0x4(%rax)
movb $0x0, 0x8(%rax,%r14)
movl 0x4(%r15), %eax
cmpl %r14d, %eax
cmovgel %r14d, %eax
leaq 0x8(%r12), %rdi
movl %eax, 0x4(%r15)
leaq 0x8(%r15), %rsi
movslq %eax, %rdx
callq 0x21c0
leal -0x1(%r13), %eax
movl %eax, (%r15)
cmpl $0x1, %r13d
jg 0x6961
testl %eax, %eax
jne 0x69b7
movq %r15, %rdi
callq 0x2030
movq %r12, 0x8(%rbx)
cmpl -0x2c(%rbp), %r14d
jl 0x68e0
movq 0x8(%rbx), %rax
movslq (%rbx), %rcx
movq -0x38(%rbp), %rsi
movslq 0x4(%rsi), %r15
leaq (%rax,%rcx), %r12
addq $0xc, %r12
movl %r15d, -0x4(%r12)
addq $0x8, %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x21c0
addl %r15d, %r12d
subl 0x8(%rbx), %r12d
addl $-0x8, %r12d
movl %r12d, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x36c3(%rip), %rdi      # 0xa081
leaq 0x36c8(%rip), %rsi      # 0xa08d
leaq 0x36c8(%rip), %rcx      # 0xa094
movl $0x2d, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/meta.c
// Function: ctrl_dff
void
ctrl_dff(drb_t *drb, struct DFF *c)
{
	writeact(drb, CTRL_DFF);
	writename(drb, c->name);
	writedata(drb, c->patch);
	printf(".DFF %s patch:%d Byte\n",
		c->name->buf, c->patch->size);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x20, %esi
callq 0x6680
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x6782
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x68af
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
addq $0x8, %rsi
movl 0x4(%rax), %edx
leaq 0x3e3e(%rip), %rdi      # 0xa857
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x2110
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/meta.c
// Function: ctrl_dfx
void
ctrl_dfx(drb_t *drb, struct DFX *c)
{
	writeact(drb, CTRL_DFX);
	writename(drb, c->name);
	writename(drb, c->namea);
	writedata(drb, c->patch);
	printf(".DFX %s -> %s patch:%d Byte\n",
		c->namea->buf, c->name->buf, c->patch->size);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x30, %esi
callq 0x6680
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x6782
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x6782
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x68af
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
addq $0x8, %rsi
addq $0x8, %rdx
movq 0x10(%rbx), %rax
movl 0x4(%rax), %ecx
leaq 0x3df3(%rip), %rdi      # 0xa86e
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x2110
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/meta.c
// Function: ctrl_cpy
void
ctrl_cpy(drb_t *drb, struct CPY *c)
{
	writeact(drb, CTRL_CPY);
	writename(drb, c->name);
	writename(drb, c->namea);
	printf(".CPY %s => %s\n", c->namea->buf, c->name->buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x40, %esi
callq 0x6680
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x6782
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x6782
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
addq $0x8, %rsi
addq $0x8, %rdx
leaq 0x3d8f(%rip), %rdi      # 0xa894
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x2110
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/meta.c
// Function: ctrl_destroy
void
ctrl_destroy(struct CTRL *ctrl)
{
	switch (ctrl->act) {
	case CTRL_NEW:
		ctrl_new_free(&ctrl->u.new);
		break;
	case CTRL_DFF:
		ctrl_dff_free(&ctrl->u.dff);
		break;
	case CTRL_DFX:
		ctrl_dfx_free(&ctrl->u.dfx);
		break;
	case CTRL_CPY:
		ctrl_cpy_free(&ctrl->u.cpy);
		break;
	case CTRL_DEL:
		ctrl_del_free(&ctrl->u.del);
		break;
	default:
		assert(0);
	}
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movzbl (%rdi), %eax
addl $-0x10, %eax
roll $0x1c, %eax
cmpl $0x4, %eax
ja 0x6fb6
movq %rdi, %rbx
leaq 0x392f(%rip), %rcx      # 0xa82c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x6f24
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x6f24
testl %eax, %eax
jne 0x6f97
callq 0x2030
movq 0x10(%rbx), %rdi
jmp 0x6f70
movq 0x8(%rbx), %rdi
jmp 0x6f70
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x6f4e
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x6f4e
testl %eax, %eax
jne 0x6f97
callq 0x2030
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x6f6c
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x6f6c
testl %eax, %eax
jne 0x6f97
callq 0x2030
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x6f90
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x6f90
testl %eax, %eax
jne 0x6f97
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2030
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x30e3(%rip), %rdi      # 0xa081
leaq 0x30e8(%rip), %rsi      # 0xa08d
leaq 0x30e8(%rip), %rcx      # 0xa094
movl $0x2d, %edx
callq 0x2130
leaq 0x39d7(%rip), %rdi      # 0xa994
leaq 0x38df(%rip), %rsi      # 0xa8a3
leaq 0x3918(%rip), %rcx      # 0xa8e3
movl $0xf2, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/meta.c
// Function: patch_copy
void
patch_copy(drb_t *drb, struct COPY *copy)
{
	uint8_t *p = drb_check(drb, 1+4+4);
	uint8(p) = PATCH_COPY;	p += 1;
	uint32(p) = copy->pos;	p += 4;
	uint32(p) = copy->size;	p += 4;
	drb_end(drb, p);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl 0x4(%rax), %r14d
movl (%rdi), %eax
addl $0x9, %eax
movl %eax, -0x2c(%rbp)
cmpl %eax, %r14d
jge 0x71ab
movslq %r14d, %rax
leaq (%rax,%rax), %r14
movq 0x8(%rbx), %r15
movl (%r15), %r13d
leaq 0xc(,%rax,2), %rsi
cmpl $0x1, %r13d
jne 0x7149
movq %r15, %rdi
callq 0x2210
movq %rax, %r12
movl %r14d, 0x4(%rax)
jmp 0x719d
movq %rsi, %rdi
callq 0x21f0
movq %rax, %r12
movl $0x1, (%rax)
movl %r14d, 0x4(%rax)
movb $0x0, 0x8(%rax,%r14)
movl 0x4(%r15), %eax
cmpl %r14d, %eax
cmovgel %r14d, %eax
leaq 0x8(%r12), %rdi
movl %eax, 0x4(%r15)
leaq 0x8(%r15), %rsi
movslq %eax, %rdx
callq 0x21c0
leal -0x1(%r13), %eax
movl %eax, (%r15)
cmpl $0x1, %r13d
jg 0x719d
testl %eax, %eax
jne 0x71e1
movq %r15, %rdi
callq 0x2030
movq %r12, 0x8(%rbx)
cmpl -0x2c(%rbp), %r14d
jl 0x711c
movq 0x8(%rbx), %rax
movslq (%rbx), %rcx
addq %rcx, %rax
addq $0x8, %rax
movb $0x1, (%rax)
movq -0x38(%rbp), %rdx
movl (%rdx), %ecx
movl %ecx, 0x1(%rax)
movl 0x4(%rdx), %ecx
movl %ecx, 0x5(%rax)
subl 0x8(%rbx), %eax
incl %eax
movl %eax, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e99(%rip), %rdi      # 0xa081
leaq 0x2e9e(%rip), %rsi      # 0xa08d
leaq 0x2e9e(%rip), %rcx      # 0xa094
movl $0x2d, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/meta.c
// Function: patch_insert
void
patch_insert(drb_t *drb, struct INSERT *insert)
{
	int size = insert->size;
	uint8_t *p = drb_check(drb, 1+4+size);
	uint8(p) = PATCH_INSERT;	p += 1;
	uint32(p) = size;		p += 4;
	memcpy(p, insert->p, size);	p += size;
	drb_end(drb, p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, -0x38(%rbp)
movl 0x8(%rsi), %ecx
movq 0x8(%rdi), %rax
movl 0x4(%rax), %r14d
movl (%rdi), %eax
movq %rcx, -0x40(%rbp)
addl %ecx, %eax
addl $0x5, %eax
movl %eax, -0x2c(%rbp)
cmpl %eax, %r14d
jge 0x72c9
movslq %r14d, %rax
leaq (%rax,%rax), %r14
movq 0x8(%rbx), %r15
movl (%r15), %r13d
leaq 0xc(,%rax,2), %rsi
cmpl $0x1, %r13d
jne 0x7267
movq %r15, %rdi
callq 0x2210
movq %rax, %r12
movl %r14d, 0x4(%rax)
jmp 0x72bb
movq %rsi, %rdi
callq 0x21f0
movq %rax, %r12
movl $0x1, (%rax)
movl %r14d, 0x4(%rax)
movb $0x0, 0x8(%rax,%r14)
movl 0x4(%r15), %eax
cmpl %r14d, %eax
cmovgel %r14d, %eax
leaq 0x8(%r12), %rdi
movl %eax, 0x4(%r15)
leaq 0x8(%r15), %rsi
movslq %eax, %rdx
callq 0x21c0
leal -0x1(%r13), %eax
movl %eax, (%r15)
cmpl $0x1, %r13d
jg 0x72bb
testl %eax, %eax
jne 0x7314
movq %r15, %rdi
callq 0x2030
movq %r12, 0x8(%rbx)
cmpl -0x2c(%rbp), %r14d
jl 0x723a
movq -0x40(%rbp), %r14
movslq %r14d, %rdx
movq 0x8(%rbx), %rax
movslq (%rbx), %rcx
leaq (%rax,%rcx), %r15
addq $0xd, %r15
movb $0x2, -0x5(%r15)
movl %r14d, -0x4(%r15)
movq -0x38(%rbp), %rax
movq (%rax), %rsi
movq %r15, %rdi
callq 0x21c0
addl %r14d, %r15d
subl 0x8(%rbx), %r15d
addl $-0x8, %r15d
movl %r15d, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2d66(%rip), %rdi      # 0xa081
leaq 0x2d6b(%rip), %rsi      # 0xa08d
leaq 0x2d6b(%rip), %rcx      # 0xa094
movl $0x2d, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/meta.c
// Function: patch_read
const uint8_t *
patch_read(const uint8_t *p, struct PATCH *patch)
{
	patch->act = uint8(p);		p += 1;
	if (patch->act == PATCH_COPY)
		return patch_copy_read(p, &patch->u.copy);
	else if (patch->act == PATCH_INSERT)
		return patch_insert_read(p, &patch->u.insert);
	else
		assert(0);
	return NULL;
}

// Assembly:
movzbl (%rdi), %eax
movb %al, (%rsi)
cmpl $0x2, %eax
je 0x7354
cmpl $0x1, %eax
jne 0x736d
movl 0x1(%rdi), %eax
movl %eax, 0x8(%rsi)
movl 0x5(%rdi), %eax
movl %eax, 0xc(%rsi)
addq $0x9, %rdi
jmp 0x7369
movl 0x1(%rdi), %eax
movl %eax, 0x10(%rsi)
leaq 0x5(%rdi), %rcx
movq %rcx, 0x8(%rsi)
addq %rax, %rdi
addq $0x5, %rdi
movq %rdi, %rax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x361c(%rip), %rdi      # 0xa994
leaq 0x3524(%rip), %rsi      # 0xa8a3
leaq 0x357e(%rip), %rcx      # 0xa904
movl $0x136, %edx            # imm = 0x136
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/dc3.c
// Function: radix_pass
static void
radix_pass(int *src, int *dst, int size, const int *buf, int space)
{
	int i, n, *c;
	space += 1;
	c = NEW(int, space);
	for (i = 0; i < space; i++)
		c[i] = 0;
	for (i = 0; i < size; i++) {
		int n = V(src[i]);
		++c[n];
	}
	n = 0;
	for (i = 0; i < space; i++) {
		int tmp = c[i];
		c[i] = n;
		n += tmp;
	}
	for (i = 0; i < size; i++) {
		int pos = c[V(src[i])]++;
		dst[pos] = src[i];
	}
	free(c);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r13d
movq %rcx, %rbx
movl %edx, -0x2c(%rbp)
movq %rsi, %r14
movq %rdi, %r15
movslq %r8d, %rax
movq %rax, -0x38(%rbp)
leaq 0x4(,%rax,4), %rdi
callq 0x21f0
movq %rax, %r12
cmpl $0x0, -0x38(%rbp)
js 0x7ad2
movl %r13d, %eax
leaq 0x4(,%rax,4), %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x2140
movl -0x2c(%rbp), %edi
movl %edi, %eax
testl %edi, %edi
jle 0x7af1
xorl %ecx, %ecx
movslq (%r15,%rcx,4), %rdx
movslq (%rbx,%rdx,4), %rdx
incl (%r12,%rdx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x7add
testl %r13d, %r13d
js 0x7b11
incl %r13d
xorl %ecx, %ecx
xorl %edx, %edx
movl (%r12,%rcx,4), %esi
addl %edx, %esi
movl %edx, (%r12,%rcx,4)
incq %rcx
movl %esi, %edx
cmpq %rcx, %r13
jne 0x7afd
testl %edi, %edi
jle 0x7b37
xorl %ecx, %ecx
movslq (%r15,%rcx,4), %rdx
movslq (%rbx,%rdx,4), %rsi
movslq (%r12,%rsi,4), %rdi
leal 0x1(%rdi), %r8d
movl %r8d, (%r12,%rsi,4)
movl %edx, (%r14,%rdi,4)
incq %rcx
cmpq %rcx, %rax
jne 0x7b17
movq %r12, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/dc3.c
// Function: dc3
int *
dc3(const uint8_t *dat, int size)
{
	int i, *p;
	int *SA = NEW(int, size);
	int *buf = NEW(int, size+3);
	p = buf;
	for (i = 0; i < size; i++)
		*p++ = dat[i]+1;
	for (i = 0; i < 3; i++)
		*p++ = TERM;
	dc3_r(buf, SA, size, 0xff+1);
	free(buf);
	return SA;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %r12
movslq %esi, %r13
leaq (,%r13,4), %rdi
callq 0x21f0
movq %rax, %rbx
leaq 0xc(,%r13,4), %rdi
callq 0x21f0
movq %rax, %r15
movq %rax, %rcx
testl %r13d, %r13d
jle 0x7bb0
movl %r14d, %ecx
xorl %eax, %eax
xorl %edx, %edx
movzbl (%r12,%rdx), %esi
incl %esi
movl %esi, (%r15,%rdx,4)
incq %rdx
addq $-0x4, %rax
cmpq %rdx, %rcx
jne 0x7b93
movq %r15, %rcx
subq %rax, %rcx
movl $0x0, 0x8(%rcx)
movq $0x0, (%rcx)
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
movl $0x100, %ecx            # imm = 0x100
callq 0x7390
movq %r15, %rdi
callq 0x2030
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/sha1.c
// Function: SHA1_Update
void SHA1_Update(SHA1_CTX *ctx, const void *data, unsigned long len)
{
	unsigned int lenW = ctx->size & 63;

	ctx->size += len;

	/* Read the data into W and process blocks as they get full */
	if (lenW) {
		unsigned int left = 64 - lenW;
		if (len < left)
			left = len;
		memcpy(lenW + (char *)ctx->W, data, left);
		lenW = (lenW + left) & 63;
		len -= left;
		data = ((const char *)data + left);
		if (lenW)
			return;
		SHA1_Block(ctx, ctx->W);
	}
	while (len >= 64) {
		SHA1_Block(ctx, data);
		data = ((const char *)data + 64);
		len -= 64;
	}
	if (len)
		memcpy(ctx->W, data, len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %r13
leaq (%rdx,%r13), %rcx
movl %r13d, %eax
movq %rcx, (%rdi)
andl $0x3f, %eax
je 0x7c7a
movl $0x40, %ecx
subl %eax, %ecx
cmpq %rbx, %rcx
movl %ebx, %r12d
cmovbel %ecx, %r12d
movl %r13d, %eax
andl $0x3f, %eax
leaq (%r15,%rax), %rdi
addq $0x1c, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x21c0
movl %r12d, %eax
addl %r13d, %eax
testb $0x3f, %al
jne 0x7cbe
leaq 0x1c(%r15), %rsi
addq %r12, %r14
subq %r12, %rbx
movq %r15, %rdi
callq 0x7ccd
cmpq $0x40, %rbx
jb 0x7c99
movq %r15, %rdi
movq %r14, %rsi
callq 0x7ccd
addq $0x40, %r14
addq $-0x40, %rbx
cmpq $0x3f, %rbx
ja 0x7c80
testq %rbx, %rbx
je 0x7cbe
addq $0x1c, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21c0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/findstr[P]version-database/sha1.c
// Function: SHA1_Final
void SHA1_Final(unsigned char hashout[20], SHA1_CTX *ctx)
{
	static const unsigned char pad[64] = { 0x80 };
	unsigned int padlen[2];
	int i;

	/* Pad with a binary 1 (ie 0x80), then zeroes, then length */
	padlen[0] = htonl((uint32_t)(ctx->size >> 29));
	padlen[1] = htonl((uint32_t)(ctx->size << 3));

	i = ctx->size & 63;
	SHA1_Update(ctx, pad, 1 + (63 & (55 - i)));
	SHA1_Update(ctx, padlen, 8);

	/* Output hash */
	for (i = 0; i < 5; i++)
		put_be32(hashout + i * 4, ctx->H[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
leal (,%rax,8), %ecx
movl $0x37, %edx
subl %eax, %edx
shrq $0x1d, %rax
bswapl %eax
leaq -0x20(%rbp), %r15
movl %eax, (%r15)
bswapl %ecx
movl %ecx, 0x4(%r15)
andl $0x3f, %edx
incq %rdx
leaq 0x1a47(%rip), %rsi      # 0xaa10
movq %rbx, %rdi
callq 0x7c0b
movl $0x8, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7c0b
xorl %eax, %eax
movl 0x8(%rbx,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%r14,%rax,4)
incq %rax
cmpq $0x5, %rax
jne 0x8fe3
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/primatesv1hanuman80/ref/primate.cpp
// Function: GenerateRoundConstants()
void GenerateRoundConstants() //Generation of 5-bit round constant by using the primitive polynomial x^5+x^2+1 with initial value 1.
{
	//Round constants for p_1
	rc_p1[0]=1;
	//printf("\nRound constants for p_1: \n %.2x", rc_p1[0]);
	for(int i=1; i<p1rounds; i++){
		rc_p1[i] = ((rc_p1[i-1]<<1) ^ ((rc_p1[i-1]>>1)&1) ^ ((rc_p1[i-1]>>4)&1))&31;
		//printf("\n %.2x", rc_p1[i]);
	}

	//Round constant for p_4
	rc_p4[0] = ((rc_p1[p1rounds-1]<<1) ^ ((rc_p1[p1rounds-1]>>1)&1) ^ ((rc_p1[p1rounds-1]>>4)&1))&31;
	//printf("\nRound constants for p_4: \n %.2x", rc_p4[0]);
	for(int i=1; i<p4rounds; i++){
		rc_p4[i] = ((rc_p4[i-1]<<1) ^ ((rc_p4[i-1]>>1)&1) ^ ((rc_p4[i-1]>>4)&1))&31;
		//printf("\n %.2x", rc_p4[i]);
	}
}

// Assembly:
movq 0x2ead(%rip), %rax      # 0x4fc8
movb $0x1, (%rax)
movl $0x1, %ecx
movb $0x1, %dl
leal (%rdx,%rdx), %esi
movl %edx, %edi
shrb %dil
andb $0x1, %dil
shrb $0x4, %dl
andb $0x1, %dl
andb $0x1e, %sil
orb %dil, %sil
xorb %dl, %sil
movb %sil, (%rax,%rcx)
incq %rcx
movl %esi, %edx
cmpq $0xc, %rcx
jne 0x2125
movb 0xb(%rax), %cl
leal (%rcx,%rcx), %eax
movl %ecx, %edx
shrb %dl
andb $0x1, %dl
shrb $0x4, %cl
andb $0x1, %cl
andb $0x1e, %al
orb %dl, %al
xorb %cl, %al
movq 0x2e88(%rip), %rcx      # 0x4ff8
movb %al, (%rcx)
movl $0x1, %edx
leal (%rax,%rax), %esi
movl %eax, %edi
shrb %dil
andb $0x1, %dil
shrb $0x4, %al
andb $0x1, %al
andb $0x1e, %sil
orb %dil, %sil
xorb %al, %sil
movb %sil, (%rcx,%rdx)
incq %rdx
movl %esi, %eax
cmpq $0xc, %rdx
jne 0x2177
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/primatesv1hanuman80/ref/primate.cpp
// Function: InitializeState(unsigned char*, unsigned char*, unsigned char*)
void InitializeState(unsigned char *state, unsigned char *key, unsigned char *nonce)
{
	GenerateRoundConstants();

	for(int i=0; i<RateSizeElements; i++)
		state[i]=0;
	for(int i=0; i<KeySizeElements; i++)
		state[RateSizeElements+i]=key[i];
	for(int i=0; i<NonceSizeElements; i++)
		state[(RateSizeElements+KeySizeElements)+i]=nonce[i];
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x1130
movq $0x0, (%r14)
xorl %eax, %eax
movb (%r15,%rax), %cl
movb %cl, 0x8(%r14,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x21be
xorl %eax, %eax
movb (%rbx,%rax), %cl
movb %cl, 0x18(%r14,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x21d2
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/back1127[P]linkedge-thing-access-websocket_client_sdk/sdk/leda.c
// Function: type_string_to_number
int type_string_to_number(char *type)
{
    if (0 == strcmp("int", type)) {
        return LEDA_TYPE_INT;
    } else if (0 == strcmp("bool", type)) {
        return LEDA_TYPE_BOOL;
    } else if (0 == strcmp("float", type)) {
        return LEDA_TYPE_FLOAT;
    } else if (0 == strcmp("text", type)) {
        return LEDA_TYPE_TEXT;
    } else if (0 == strcmp("date", type)) {
        return LEDA_TYPE_DATE;
    } else if (0 == strcmp("enum", type)) {
        return LEDA_TYPE_ENUM;
    } else if (0 == strcmp("struct", type)) {
        return LEDA_TYPE_STRUCT;
    } else if (0 == strcmp("array", type)) {
        return LEDA_TYPE_ARRAY;
    } else if (0 == strcmp("double", type)) {
        return LEDA_TYPE_DOUBLE;
    } else {
        return -1;
    }
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x688b(%rip), %rdi      # 0xb048
movq %rbx, %rsi
callq 0x4360
testl %eax, %eax
je 0x4876
leaq 0x6878(%rip), %rdi      # 0xb04c
movq %rbx, %rsi
callq 0x4360
testl %eax, %eax
je 0x487a
leaq 0x6866(%rip), %rdi      # 0xb051
movq %rbx, %rsi
callq 0x4360
testl %eax, %eax
je 0x4881
leaq 0x6855(%rip), %rdi      # 0xb057
movq %rbx, %rsi
callq 0x4360
testl %eax, %eax
je 0x4888
leaq 0x6847(%rip), %rdi      # 0xb05c
movq %rbx, %rsi
callq 0x4360
testl %eax, %eax
je 0x488f
leaq 0x6839(%rip), %rdi      # 0xb061
movq %rbx, %rsi
callq 0x4360
testl %eax, %eax
je 0x4896
leaq 0x682b(%rip), %rdi      # 0xb066
movq %rbx, %rsi
callq 0x4360
testl %eax, %eax
je 0x489d
leaq 0x681f(%rip), %rdi      # 0xb06d
movq %rbx, %rsi
callq 0x4360
testl %eax, %eax
je 0x48a4
leaq 0x6812(%rip), %rdi      # 0xb073
movq %rbx, %rsi
callq 0x4360
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
orl $0x8, %eax
jmp 0x48a9
xorl %eax, %eax
jmp 0x48a9
movl $0x1, %eax
jmp 0x48a9
movl $0x2, %eax
jmp 0x48a9
movl $0x3, %eax
jmp 0x48a9
movl $0x4, %eax
jmp 0x48a9
movl $0x5, %eax
jmp 0x48a9
movl $0x6, %eax
jmp 0x48a9
movl $0x7, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/back1127[P]linkedge-thing-access-websocket_client_sdk/sdk/leda.c
// Function: get_msg_id
unsigned int get_msg_id()
{
    int ret = 0;

    pthread_mutex_lock(&g_msg_locker);
    ret = ++g_msg_id;
    pthread_mutex_unlock(&g_msg_locker);

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0xa73e(%rip), %rbx      # 0xf430
movq %rbx, %rdi
callq 0x4680
movl 0xa757(%rip), %r14d     # 0xf458
incl %r14d
movl %r14d, 0xa74d(%rip)     # 0xf458
movq %rbx, %rdi
callq 0x43e0
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/back1127[P]linkedge-thing-access-websocket_client_sdk/sdk/leda.c
// Function: wsa_insert_reply
int wsa_insert_reply(int msg_id)
{
    wsa_reply_t *reply;

    pthread_mutex_lock(&wsa_replay_lock);
    reply = (wsa_reply_t *)malloc(sizeof(wsa_reply_t));
    if (NULL == reply) {
        log_e(LOG_TAG, "no memory\r\n");
        pthread_mutex_unlock(&wsa_replay_lock);
        return LE_ERROR_ALLOCATING_MEM;
    }
    reply->msg_id = msg_id;
    reply->code = LE_ERROR_UNKNOWN;
    if (0 != sem_init(&reply->sem, 0, 0)) {
        free(reply);
        pthread_mutex_unlock(&wsa_replay_lock);
        log_e(LOG_TAG, "semphore init error!");
        return LE_ERROR_UNKNOWN;
    }
    list_add(&reply->list_node, &wsa_replay_head);
    pthread_mutex_unlock(&wsa_replay_lock);
    return LE_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movq 0xa251(%rip), %rdi      # 0xef80
callq 0x4680
movl $0x40, %edi
callq 0x46b8
testq %rax, %rax
je 0x4dbe
movq %rax, %r14
movl %ebx, 0x10(%rax)
movl $0x186a0, 0x14(%rax)    # imm = 0x186A0
movq %rax, %rdi
addq $0x18, %rdi
xorl %ebx, %ebx
xorl %esi, %esi
xorl %edx, %edx
callq 0x44c0
testl %eax, %eax
je 0x4e0a
movq %r14, %rdi
callq 0x46b0
movq 0xa207(%rip), %rdi      # 0xef80
callq 0x43e0
leaq 0x63b6(%rip), %rax      # 0xb13b
movq %rax, (%rsp)
leaq 0x6300(%rip), %rsi      # 0xb090
leaq 0x62ff(%rip), %rdx      # 0xb096
leaq 0x62fd(%rip), %rcx      # 0xb09b
leaq 0x6379(%rip), %r8       # 0xb11e
movl $0x3, %edi
movl $0x121, %r9d            # imm = 0x121
xorl %eax, %eax
callq 0x4260
movl $0x186a0, %ebx          # imm = 0x186A0
jmp 0x4e2e
leaq 0x636a(%rip), %rax      # 0xb12f
movq %rax, (%rsp)
leaq 0x62c0(%rip), %rsi      # 0xb090
leaq 0x62bf(%rip), %rdx      # 0xb096
leaq 0x62bd(%rip), %rcx      # 0xb09b
leaq 0x6339(%rip), %r8       # 0xb11e
movl $0x3, %edi
movl $0x118, %r9d            # imm = 0x118
xorl %eax, %eax
callq 0x4260
movq 0xa182(%rip), %rdi      # 0xef80
callq 0x43e0
movl $0x186a2, %ebx          # imm = 0x186A2
jmp 0x4e2e
movq 0xa197(%rip), %rax      # 0xefa8
movq (%rax), %rcx
movq %r14, 0x8(%rcx)
movq %rcx, (%r14)
movq %rax, 0x8(%r14)
movq %r14, (%rax)
movq 0xa157(%rip), %rdi      # 0xef80
callq 0x43e0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/back1127[P]linkedge-thing-access-websocket_client_sdk/sdk/leda.c
// Function: wsa_remove_reply
void wsa_remove_reply(int msg_id)
{
    wsa_reply_t *reply;

    reply = _wsa_get_reply_by_msg_id(msg_id);
    if (NULL == reply) {
        return;
    }

    pthread_mutex_lock(&wsa_replay_lock);
    if (reply->payload) {
        free(reply->payload);
        reply->payload = NULL;
    }
    sem_destroy(&reply->sem);
    list_del(&reply->list_node);
    free(reply);
    pthread_mutex_unlock(&wsa_replay_lock);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x4ea9
testq %rax, %rax
je 0x4ea2
movq %rax, %rbx
movq 0xa12d(%rip), %rdi      # 0xef80
callq 0x4680
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x4e6e
callq 0x46b0
movq $0x0, 0x38(%rbx)
movq %rbx, %rdi
addq $0x18, %rdi
callq 0x4670
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x46b0
movq 0xa0e9(%rip), %rdi      # 0xef80
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x43e0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/back1127[P]linkedge-thing-access-websocket_client_sdk/sdk/leda.c
// Function: wsa_get_reply_by_msg_id
static wsa_reply_t *_wsa_get_reply_by_msg_id(int msg_id)
{
    wsa_reply_t *pos, *next, *reply = NULL;

    pthread_mutex_lock(&wsa_replay_lock);
    list_for_each_entry_safe(pos, next, &wsa_replay_head, list_node) {
        if (pos->msg_id == msg_id) {
            reply = pos;
            break;
        }
    }
    pthread_mutex_unlock(&wsa_replay_lock);
    return reply;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %r14d
movq 0xa0c6(%rip), %rdi      # 0xef80
callq 0x4680
movq 0xa0e2(%rip), %rax      # 0xefa8
movq %rax, %rbx
movq (%rbx), %rbx
cmpq %rax, %rbx
je 0x4ed9
cmpl %r14d, 0x10(%rbx)
jne 0x4ec9
jmp 0x4edb
xorl %ebx, %ebx
movq 0xa09e(%rip), %rdi      # 0xef80
callq 0x43e0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/back1127[P]linkedge-thing-access-websocket_client_sdk/sdk/leda.c
// Function: wsa_set_reply_result
int wsa_set_reply_result(int msg_id, int code, char *payload)
{
    wsa_reply_t *reply;

    reply = _wsa_get_reply_by_msg_id(msg_id);
    if (NULL == reply) {
        return -1;
    }

    pthread_mutex_lock(&wsa_replay_lock);
    reply->code = code;
    if (payload) {
        reply->payload = strdup(payload);
    }
    pthread_mutex_unlock(&wsa_replay_lock);
    sem_post(&reply->sem);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %r15d
callq 0x4ea9
testq %rax, %rax
je 0x4f49
movq %rax, %rbx
movq 0xa06d(%rip), %rdi      # 0xef80
callq 0x4680
movl %r15d, 0x14(%rbx)
testq %r14, %r14
je 0x4f2d
movq %r14, %rdi
callq 0x4610
movq %rax, 0x38(%rbx)
movq 0xa04c(%rip), %rdi      # 0xef80
callq 0x43e0
addq $0x18, %rbx
movq %rbx, %rdi
callq 0x4300
xorl %eax, %eax
jmp 0x4f4e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq