LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/script.c
// Function: compare_values
static char compare_values(script_value_t* a, script_value_t* b)
{
	if(a->type != b->type) return 0;
	switch(a->type)
	{
		case VAL_NATIVE: return a->nat.value == b->nat.value;
		case VAL_BOOL: return a->boolean == b->boolean;
		case VAL_CHAR: return a->code == b->code;
		case VAL_NUMBER: return a->number == b->number;
		case VAL_STRING: return strcmp(a->string.data, b->string.data) == 0;
		case VAL_NULL: return 1;
		case VAL_FUNC: return (a->function.is_extern == b->function.is_extern) && (a->function.index == b->function.index);
		case VAL_ARRAY:
		{
			int min_index = (int)(a->array.length < b->array.length ? a->array.length : b->array.length);
			for(int i = 0; i < min_index; ++i)
			{
				if(!compare_values(vec_get_value(&a->array, i, script_value_t*), vec_get_value(&b->array, i, script_value_t*)))
					return 0;
			}
			
			return 1;
		} break;
		case VAL_STRUCT_INSTANCE:
		{
			if(a->ds.members.length != b->ds.members.length) return 0;
			for(int i = 0; i < a->ds.members.length; ++i)
			{
				if(!compare_values(vec_get_value(&a->ds.members, i, script_value_t*), vec_get_value(&b->ds.members, i, script_value_t*)))
					return 0;
			}
			
			return 1;
		} break;
	}
	
	return 0;
}

// Assembly:
movl 0xc(%rdi), %ecx
cmpl 0xc(%rsi), %ecx
jne 0xd813
cmpl $0x8, %ecx
ja 0xd813
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movb $0x1, %al
movl %ecx, %ecx
leaq 0x1e0e(%rip), %rdx      # 0xf60c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movb 0x20(%r14), %al
cmpb 0x20(%rbx), %al
jmp 0xd918
xorl %eax, %eax
retq
movq 0x28(%r14), %rdi
movq 0x28(%rbx), %rsi
callq 0x2160
testl %eax, %eax
jmp 0xd918
movsd 0x20(%rbx), %xmm0
cmpeqsd 0x20(%r14), %xmm0
movq %xmm0, %rax
andl $0x1, %eax
jmp 0xd91b
movq 0x30(%r14), %rcx
cmpq 0x30(%rbx), %rcx
jne 0xd90c
testq %rcx, %rcx
je 0xd91b
leaq 0x20(%r14), %r15
addq $0x20, %rbx
xorl %r12d, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0xdcf3
movq (%rax), %r13
movq %rbx, %rdi
movq %r12, %rsi
callq 0xdcf3
movq (%rax), %rsi
movq %r13, %rdi
callq 0xd7d2
testb %al, %al
setne %al
je 0xd91b
incq %r12
cmpq %r12, 0x30(%r14)
ja 0xd865
jmp 0xd91b
movb 0x20(%r14), %al
cmpb 0x20(%rbx), %al
jne 0xd90c
movl 0x24(%r14), %eax
cmpl 0x24(%rbx), %eax
jmp 0xd918
movq 0x30(%r14), %rcx
movq 0x30(%rbx), %r13
cmpq %r13, %rcx
cmovbq %rcx, %r13
testl %r13d, %r13d
jle 0xd91b
addq $0x20, %r14
addq $0x20, %rbx
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0xdcf3
movq (%rax), %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0xdcf3
movq (%rax), %rsi
movq %r12, %rdi
callq 0xd7d2
testb %al, %al
je 0xd90c
incq %r15
cmpq %r15, %r13
jne 0xd8d7
setbe %al
jmp 0xd91b
xorl %eax, %eax
jmp 0xd91b
movq 0x20(%r14), %rax
cmpq 0x20(%rbx), %rax
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/script.c
// Function: pop_stack_frame
static void pop_stack_frame(script_t* script)
{
	if (script->indir_depth <= 0)
	{
		script->pc = -1;
		vec_clear(&script->stack);
		return;
	}
	
	// NOTE: Remove local values
	vec_resize(&script->stack, script->fp, NULL);

	// NOTE: Reset pc and fp
	vec_pop_back(&script->indir, &script->pc);
	vec_pop_back(&script->indir, &script->fp);
	
	int nargs;
	vec_pop_back(&script->indir, &nargs);

	// NOTE: Remove arguments
	vec_resize(&script->stack, script->stack.length - nargs, NULL);

	--script->indir_depth;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpl $0x0, 0x190(%rdi)
jle 0xda56
leaq 0x198(%rbx), %r14
leaq 0x120(%rbx), %r15
movslq 0x120(%rbx), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0xdc8d
leaq 0x1b8(%rbx), %r12
leaq 0x11c(%rbx), %rsi
movq %r12, %rdi
callq 0xddc1
movq %r12, %rdi
movq %r15, %rsi
callq 0xddc1
leaq -0x24(%rbp), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0xddc1
movq 0x1a8(%rbx), %rsi
movslq (%r15), %rax
subq %rax, %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0xdc8d
decl 0x190(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, 0x11c(%rbx) # imm = 0xFFFFFFFF
addq $0x198, %rbx            # imm = 0x198
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xdfab
nop
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/vector.c
// Function: vec_copy
void vec_copy(vector_t* me, vector_t* other)
{
	if(me->datum_size != other->datum_size) error_exit("Attempted to copy vectors with different data sizes\n");
	if(me->capacity < other->capacity)
	{
		me->capacity = other->capacity;
		vec_realloc(me);
	}
	
	memcpy(me->data, other->data, me->datum_size * other->capacity);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
cmpq 0x8(%rsi), %rax
jne 0xdadc
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rsi), %rdx
cmpq %rdx, 0x18(%rdi)
jae 0xdac9
movq %rdx, 0x18(%r14)
movq %r14, %rdi
callq 0xdb97
movq 0x8(%r14), %rax
movq 0x18(%rbx), %rdx
imulq %rax, %rdx
movq (%r14), %rdi
movq (%rbx), %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x21b0
leaq 0x3fe9(%rip), %rdi      # 0x11acc
xorl %eax, %eax
callq 0xdaea
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/vector.c
// Function: vec_copy_region
void vec_copy_region(vector_t* me, vector_t* other, size_t index, size_t start, size_t amount)
{
	if(me->datum_size != other->datum_size) error_exit("Attempted to copy vectors with different data sizes\n");
	
	if(start < 0 || start > other->length ||
		start + amount > other->length) error_exit("Attempted to copy from region outside of bounds of vector\n");
	
	vec_reserve(me, index + amount);

	if(index + amount > me->length) me->length = index + amount;
	memcpy(&me->data[index * me->datum_size], &other->data[start * other->datum_size], amount * other->datum_size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
cmpq 0x8(%rsi), %rax
jne 0xdc60
movq %rcx, %r14
movq 0x10(%rsi), %rax
cmpq %rcx, %rax
jb 0xdc69
movq %r8, %rbx
leaq (%r8,%r14), %rcx
cmpq %rax, %rcx
ja 0xdc69
movq %rdx, %r15
movq %rdi, %r13
leaq (%rbx,%rdx), %r12
cmpq %r12, 0x18(%rdi)
jae 0xdc22
movq %r12, 0x18(%r13)
movq %r13, %rdi
movq %rsi, -0x30(%rbp)
callq 0xdb97
movq -0x30(%rbp), %rsi
cmpq 0x10(%r13), %r12
jbe 0xdc2c
movq %r12, 0x10(%r13)
imulq 0x8(%r13), %r15
addq (%r13), %r15
movq 0x8(%rsi), %rax
imulq %rax, %r14
addq (%rsi), %r14
imulq %rax, %rbx
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 0x21b0
leaq 0x3e65(%rip), %rdi      # 0x11acc
jmp 0xdc70
leaq 0x3e91(%rip), %rdi      # 0x11b01
xorl %eax, %eax
callq 0xdaea
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/vector.c
// Function: vec_resize
void vec_resize(vector_t* vector, size_t amount, void* p_initial_value)
{
	vec_reserve(vector, amount);
	vector->length = amount;
	
	if(p_initial_value)
	{
		for(int i = 0; i < vector->length; ++i)
			memcpy(&vector->data[i * vector->datum_size], p_initial_value, vector->datum_size);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpq %rsi, 0x18(%rdi)
jae 0xdcb2
movq %r15, 0x18(%r14)
movq %r14, %rdi
callq 0xdb97
movq %r15, 0x10(%r14)
testq %rbx, %rbx
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
jne 0xdce8
xorl %r15d, %r15d
movq 0x8(%r14), %rdx
movq %rdx, %rdi
imulq %r15, %rdi
addq (%r14), %rdi
movq %rbx, %rsi
callq 0x21b0
incq %r15
cmpq %r15, 0x10(%r14)
ja 0xdcc9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/vector.c
// Function: vec_push_back
void vec_push_back(vector_t* vector, void* object)
{
	while(vector->length + 1 >= vector->capacity)
	{
		if(vector->capacity == 0)
			vector->capacity = 8;
		vector->capacity *= 2;
		vec_realloc(vector);
	}
	
	memcpy(&vector->data[vector->length * vector->datum_size], object, vector->datum_size);
	vector->length++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x18(%rbx), %rax
leaq 0x1(%rdi), %rcx
cmpq %rax, %rcx
jb 0xdd9f
movl $0x10, %r15d
leaq (%rax,%rax), %rcx
testq %rax, %rax
cmoveq %r15, %rcx
movq %rcx, 0x18(%rbx)
movq %rbx, %rdi
callq 0xdb97
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rax
leaq 0x1(%rdi), %rcx
cmpq %rax, %rcx
jae 0xdd77
movq 0x8(%rbx), %rdx
imulq %rdx, %rdi
addq (%rbx), %rdi
movq %r14, %rsi
callq 0x21b0
incq 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/vector.c
// Function: vec_pop_back
void vec_pop_back(vector_t* vector, void* into)
{
	if(vector->length == 0) error_exit("Attempted to perform vec_pop_back on empty vector");
	
	if (!into)
	{
		--vector->length;
		return;
	}

	memcpy(into, &vector->data[(--vector->length) * vector->datum_size], vector->datum_size);
}

// Assembly:
movq %rsi, %rax
movq 0x10(%rdi), %rsi
testq %rsi, %rsi
je 0xddf1
decq %rsi
testq %rax, %rax
je 0xddec
movq %rsi, 0x10(%rdi)
movq 0x8(%rdi), %rdx
imulq %rdx, %rsi
addq (%rdi), %rsi
movq %rax, %rdi
jmp 0x21b0
movq %rsi, 0x10(%rdi)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x3dc4(%rip), %rdi      # 0x11bc0
xorl %eax, %eax
callq 0xdaea
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/vector.c
// Function: vec_insert
void vec_insert(vector_t* vector, void* object, size_t index)
{
	if(index >= vector->length) error_exit("Provided out of bounds index (%i) to vec_insert (vector length: %i)", (int)index, (int)vector->length);
	
	while(vector->length + 1 >= vector->capacity)
	{
		vector->capacity *= 2;
		vec_realloc(vector);
	}
	
	memmove(&vector->data[(index + 1) * vector->datum_size], &vector->data[index * vector->datum_size], (vector->length - index) * vector->datum_size);
	memcpy(&vector->data[index * vector->datum_size], object, vector->datum_size);
	vector->length += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq 0x10(%rdi), %rdx
cmpq %rbx, %rdx
jbe 0xde93
movq %rsi, %r15
movq %rdi, %r14
leaq 0x1(%rdx), %rcx
movq 0x18(%rdi), %rax
cmpq %rax, %rcx
jb 0xde49
addq %rax, %rax
movq %rax, 0x18(%r14)
movq %r14, %rdi
callq 0xdb97
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rax
leaq 0x1(%rdx), %rcx
jmp 0xde27
leaq 0x1(%rbx), %rdi
movq (%r14), %rax
movq 0x8(%r14), %rsi
imulq %rsi, %rdi
addq %rax, %rdi
subq %rbx, %rdx
imulq %rsi, %rdx
imulq %rbx, %rsi
addq %rax, %rsi
callq 0x21f0
movq 0x8(%r14), %rdx
imulq %rdx, %rbx
addq (%r14), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21b0
incq 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3d58(%rip), %rdi      # 0x11bf2
movl %ebx, %esi
xorl %eax, %eax
callq 0xdaea
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/vector.c
// Function: vec_flip
void vec_flip(vector_t* vector)
{
	if(vector->length == 0) return;
	
	unsigned char* lo = vector->data;
	unsigned char* hi = &vector->data[vector->length - 1];
	unsigned char swap;
	
	while(lo < hi)
	{
		swap = *lo;
		*lo++ = *hi;
		*hi-- = swap;
	}
}

// Assembly:
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0xdf54
movq (%rdi), %rax
addq %rax, %rcx
decq %rcx
cmpq %rcx, %rax
jae 0xdf54
pushq %rbp
movq %rsp, %rbp
incq %rax
movb -0x1(%rax), %dl
movb (%rcx), %sil
movb %sil, -0x1(%rax)
movb %dl, (%rcx)
decq %rcx
leaq 0x1(%rax), %rdx
cmpq %rcx, %rax
movq %rdx, %rax
jb 0xdf38
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/vector.c
// Function: vec_destroy
void vec_destroy(vector_t* vector)
{
	if(vector->data)
		free(vector->data);
	vector->data = NULL;
	vector->length = 0;
	vector->capacity = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xdfcf
callq 0x2030
movq $0x0, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/hashmap.c
// Function: map_set
void map_set(hashmap_t* map, const char* key, void* value)
{
	unsigned long pos = map_hash_function(key) % HASHMAP_BUCKET_AMT;
	
	hashmap_node_t* node = create_node(key, value);
	
	if(!map->buckets[pos])
		vec_push_back(&map->active_buckets, &pos);
	
	node->next = map->buckets[pos];
	map->buckets[pos] = node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x30(%rbp)
movq %rsi, %r14
movq %rdi, %rbx
movb (%rsi), %al
testb %al, %al
je 0xe061
leaq 0x1(%r14), %rcx
movl $0x1505, %r15d          # imm = 0x1505
movq %r15, %rdx
shlq $0x5, %rdx
addq %r15, %rdx
movsbq %al, %r15
addq %rdx, %r15
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0xe03e
andl $0x3ff, %r15d           # imm = 0x3FF
jmp 0xe067
movl $0x105, %r15d           # imm = 0x105
movq %r15, -0x38(%rbp)
movl $0x18, %edi
callq 0x21c0
testq %rax, %rax
je 0xe0e9
movq %rax, %r12
movq %r14, %rdi
callq 0x20b0
leaq 0x1(%rax), %rdi
callq 0x21c0
testq %rax, %rax
je 0xe0fa
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
callq 0x2050
movq %r13, 0x8(%r12)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%r12)
movq (%rbx,%r15,8), %rax
testq %rax, %rax
jne 0xe0d2
leaq 0x2000(%rbx), %rdi
leaq -0x38(%rbp), %r14
movq %r14, %rsi
callq 0xdd50
movq (%r14), %r15
movq (%rbx,%r15,8), %rax
movq %rax, (%r12)
movq %r12, (%rbx,%r15,8)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3bb7(%rip), %rdi      # 0x11ca7
movq %r14, %rsi
xorl %eax, %eax
callq 0xe3bf
leaq 0x3b96(%rip), %rdi      # 0x11c97
xorl %eax, %eax
callq 0xe3bf
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/hashmap.c
// Function: map_get
void* map_get(hashmap_t* map, const char* key)
{
	unsigned long pos = map_hash_function(key) % HASHMAP_BUCKET_AMT;
	
	if(!map->buckets[pos])
		return NULL;
	else 
	{
		hashmap_node_t* node = map->buckets[pos];
		
		while(node)
		{
			if(strcmp(node->key, key) == 0)
				return node->value;
			node = node->next;
		}
	}
	
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb (%rsi), %cl
testb %cl, %cl
je 0xe145
leaq 0x1(%rbx), %rdx
movl $0x1505, %eax           # imm = 0x1505
movq %rax, %rsi
shlq $0x5, %rsi
addq %rax, %rsi
movsbq %cl, %rax
addq %rsi, %rax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0xe124
andl $0x3ff, %eax            # imm = 0x3FF
jmp 0xe14a
movl $0x105, %eax            # imm = 0x105
movq (%rdi,%rax,8), %r15
xorl %r14d, %r14d
testq %r15, %r15
je 0xe16f
movq 0x8(%r15), %rdi
movq %rbx, %rsi
callq 0x2160
testl %eax, %eax
je 0xe16b
movq (%r15), %r15
jmp 0xe151
movq 0x10(%r15), %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/hashmap.c
// Function: map_remove
void* map_remove(hashmap_t* map, const char* key)
{
	unsigned long pos = map_hash_function(key) % HASHMAP_BUCKET_AMT;
	
	if(!map->buckets[pos])
		return NULL;
	else 
	{
		hashmap_node_t* node = map->buckets[pos];
		hashmap_node_t* prev = NULL;
		
		while(node)
		{
			if(strcmp(node->key, key) == 0)
			{
				if(prev)
					prev->next = node->next;
				else
				{
					map->buckets[pos] = NULL;
					int to_remove = -1;
					for(size_t i = 0; i < map->active_buckets.length; ++i)
					{
						if(*(unsigned long*)vec_get(&map->active_buckets, i) == pos)
						{
							to_remove = i;
							break;
						}
					}
					
					if(to_remove >= 0) vec_remove(&map->active_buckets, to_remove);
				}
				
				void* value = node->value;
				
				free(node->key);
				free(node);
				
				return value;
			}
			
			prev = node;
			node = node->next;
		}
	}
	
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movb (%rsi), %al
testb %al, %al
je 0xe1c1
leaq 0x1(%r15), %rcx
movl $0x1505, %r13d          # imm = 0x1505
movq %r13, %rdx
shlq $0x5, %rdx
addq %r13, %rdx
movsbq %al, %r13
addq %rdx, %r13
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0xe19e
andl $0x3ff, %r13d           # imm = 0x3FF
jmp 0xe1c7
movl $0x105, %r13d           # imm = 0x105
movq (%rdi,%r13,8), %rbx
testq %rbx, %rbx
je 0xe20a
movq %rdi, -0x30(%rbp)
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x2160
testl %eax, %eax
je 0xe20f
xorl %r12d, %r12d
movq %rbx, %r14
movq (%r14), %rbx
testq %rbx, %rbx
je 0xe231
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x2160
movq %r14, %rcx
movq %rbx, %r14
testl %eax, %eax
jne 0xe1ea
jmp 0xe211
xorl %r12d, %r12d
jmp 0xe231
xorl %ecx, %ecx
testq %rcx, %rcx
je 0xe243
movq (%rbx), %rax
movq %rax, (%rcx)
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %r12
callq 0x2030
movq %rbx, %rdi
callq 0x2030
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x30(%rbp), %r14
movq $0x0, (%r14,%r13,8)
cmpq $0x0, 0x2010(%r14)
je 0xe21c
leaq 0x2000(%r14), %r15
xorl %r12d, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0xdcf3
cmpq %r13, (%rax)
je 0xe281
incq %r12
cmpq 0x2010(%r14), %r12
jb 0xe263
jmp 0xe21c
testl %r12d, %r12d
js 0xe21c
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movq %r15, %rdi
movq %r12, %rsi
callq 0xdea3
jmp 0xe21c
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/hashmap.c
// Function: map_traverse
void map_traverse(hashmap_t* map, hashmap_traverse_t traverse, void* data)
{
	for(size_t i = 0; i < map->active_buckets.length; ++i)
	{
		unsigned long pos = *(unsigned long*)vec_get(&map->active_buckets, i);
		hashmap_node_t* node = map->buckets[pos];
		while(node)
		{
			traverse(node->key, node->value, data);
			node = node->next;
		}
	}
}

// Assembly:
cmpq $0x0, 0x2010(%rdi)
je 0xe311
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
leaq 0x2000(%rdi), %rax
movq %rax, -0x30(%rbp)
xorl %r13d, %r13d
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0xdcf3
movq (%rax), %rax
movq (%r15,%rax,8), %r12
testq %r12, %r12
je 0xe2f7
movq 0x8(%r12), %rdi
movq 0x10(%r12), %rsi
movq %rbx, %rdx
callq *%r14
movq (%r12), %r12
jmp 0xe2dc
incq %r13
cmpq 0x2010(%r15), %r13
jb 0xe2c9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/goodpaul6[P]generic/hashmap.c
// Function: map_clear
void map_clear(hashmap_t* map)
{
	for(size_t i = 0; i < map->active_buckets.length; ++i)
	{
		unsigned long pos = *(unsigned long*)vec_get(&map->active_buckets, i);
		hashmap_node_t* node = map->buckets[pos];
		free_bucket(node);
		map->buckets[pos] = NULL;
	}
	
	vec_clear(&map->active_buckets);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x2000(%rdi), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, 0x2010(%rdi)
je 0xe385
movq %rdi, %r14
xorl %r15d, %r15d
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0xdcf3
movq (%rax), %r13
movq (%r14,%r13,8), %r12
testq %r12, %r12
je 0xe371
movq (%r12), %rbx
movq 0x8(%r12), %rdi
callq 0x2030
movq %r12, %rdi
callq 0x2030
movq %rbx, %r12
testq %rbx, %rbx
jne 0xe353
movq $0x0, (%r14,%r13,8)
incq %r15
cmpq 0x2010(%r14), %r15
jb 0xe33b
movq -0x30(%rbp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdfab
// File: /workspace/github_c_makefile_star2_O3/smilingthax[P]libfontembed/woffer.c
// Function: parse_uni
static int parse_uni(const char **str,int *is_wildcard) // {{{
{
  const char *end=*str;
  int iA,ret=0,wildcard=1;

  for (iA=0;(*end)&&(iA<6);end++,iA++) {
    if (*end=='?') {
      wildcard*=16;
      ret*=16;
    } else if (wildcard>1) {
      ret=-1;
      break;
    } else if ( (*end>='0')&&(*end<='9') ) {
      ret=16*ret+(*end-'0');
    } else if ( (*end>='a')&&(*end<='f') ) {
      ret=16*ret+10+(*end-'a');
    } else if ( (*end>='A')&&(*end<='F') ) {
      ret=16*ret+10+(*end-'A');
    } else {
      break;
    }
  }
  if (  (wildcard>0x100000)||
        ( (ret==0x100000)&&(wildcard>0x10000) )  ) {
    ret=-1;
  } else if (is_wildcard) {
    *is_wildcard=wildcard-1;
  } else if (wildcard>1) {
    ret=-1;
  }
  if ( (iA==0)||(iA>=6)||(ret<0)||(ret>0x10ffff) ) {
    fprintf(stderr,"Parse error in unicode point\n");
    return -1;
  }
  *str=end;

  return ret;
}

// Assembly:
pushq %rax
movq (%rdi), %rcx
movb (%rcx), %r10b
testb %r10b, %r10b
je 0x20f3
xorl %r8d, %r8d
movl $0x1, %edx
xorl %eax, %eax
cmpb $0x3f, %r10b
jne 0x208e
shll $0x4, %edx
shll $0x4, %eax
jmp 0x20d7
cmpl $0x1, %edx
jg 0x20ff
leal -0x30(%r10), %r9d
cmpb $0x9, %r9b
ja 0x20a9
shll $0x4, %eax
movzbl %r9b, %r9d
orl %r9d, %eax
jmp 0x20d7
leal -0x61(%r10), %r9d
cmpb $0x5, %r9b
ja 0x20bc
shll $0x4, %eax
movzbl %r9b, %r9d
jmp 0x20d1
addb $-0x41, %r10b
cmpb $0x5, %r10b
ja 0x2162
shll $0x4, %eax
movzbl %r10b, %r9d
addl %r9d, %eax
addl $0xa, %eax
movb 0x1(%rcx,%r8), %r10b
leaq 0x1(%r8), %r9
testb %r10b, %r10b
je 0x20ee
cmpl $0x5, %r8d
movq %r9, %r8
jb 0x2080
addq %r9, %rcx
jmp 0x210a
movl $0x1, %edx
xorl %r9d, %r9d
xorl %eax, %eax
jmp 0x212a
addq %r8, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %r8d, %r9d
cmpl $0x100000, %edx         # imm = 0x100000
jg 0x2156
cmpl $0x100000, %eax         # imm = 0x100000
sete %r8b
cmpl $0x10001, %edx          # imm = 0x10001
setge %r10b
testb %r10b, %r8b
jne 0x2156
testq %rsi, %rsi
je 0x2135
decl %edx
movl %edx, (%rsi)
jmp 0x2140
cmpl $0x2, %edx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmovgel %edx, %eax
addl $-0x6, %r9d
cmpl $-0x5, %r9d
jb 0x2156
cmpl $0x110000, %eax         # imm = 0x110000
jae 0x2156
movq %rcx, (%rdi)
popq %rcx
retq
callq 0x13c4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2154
addq %r8, %rcx
movl %r8d, %r9d
jmp 0x212a
// File: /workspace/github_c_makefile_star2_O3/bokunimowakaru[P]petit15term/petit15writer.c
// Function: uart_open
int uart_open(char const *device, struct termios *saveattr)
{
    struct termios ComTio;                          // シリアル端末設定用の構造体変数
    speed_t speed = B115200;                        // 通信速度の設定

    ComFd=open(device, O_RDWR|O_NONBLOCK);   // シリアルポートのオープン

    if (ComFd < 0) {
        return -1;
    }
    tcgetattr(ComFd, &ComTio_Bk);           // 現在のシリアル端末設定状態を保存
    ComTio.c_iflag = 0;                     // シリアル入力設定の初期化
    ComTio.c_oflag = 0;                     // シリアル出力設定の初期化
    ComTio.c_cflag = CLOCAL|CREAD|CS8;      // シリアル制御設定の初期化
    ComTio.c_lflag = 0;                     // シリアルローカル設定の初期化
    bzero(ComTio.c_cc,sizeof(ComTio.c_cc)); // シリアル特殊文字設定の初期化
    cfsetispeed(&ComTio, speed);            // シリアル入力の通信速度の設定
    cfsetospeed(&ComTio, speed);            // シリアル出力の通信速度の設定
    ComTio.c_cc[VMIN] = 0;                  // リード待ち容量0バイト(待たない)
    ComTio.c_cc[VTIME] = 1;                 // リード待ち時間
    tcflush(ComFd,TCIFLUSH);                // バッファのクリア
    tcsetattr(ComFd, TCSANOW, &ComTio);     // シリアル端末に設定
    return ComFd;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movl $0x802, %esi            # imm = 0x802
xorl %eax, %eax
callq 0x1150
movl %eax, 0x2d1d(%rip)      # 0x40f0
testl %eax, %eax
js 0x1442
leaq 0x2d16(%rip), %rsi      # 0x40f4
movl %eax, %edi
callq 0x1130
movaps 0xc24(%rip), %xmm0      # 0x2010
movq %rsp, %rbx
movaps %xmm0, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x11(%rbx)
movups %xmm0, 0x21(%rbx)
movq %rbx, %rdi
movl $0x1002, %esi           # imm = 0x1002
callq 0x1160
movq %rbx, %rdi
movl $0x1002, %esi           # imm = 0x1002
callq 0x1080
movw $0x1, 0x16(%rbx)
movl 0x2ccd(%rip), %edi      # 0x40f0
xorl %esi, %esi
callq 0x10a0
movl 0x2cc0(%rip), %edi      # 0x40f0
xorl %esi, %esi
movq %rbx, %rdx
callq 0x1140
movl 0x2cb0(%rip), %eax      # 0x40f0
jmp 0x1447
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/bokunimowakaru[P]petit15term/petit15writer.c
// Function: read_serial_port
char read_serial_port(void){
    char c='\0';                                    // シリアル受信した文字の代入用
    fd_set ComReadFds;                              // select命令用構造体ComReadFdを定義
    struct timeval tv;                              // タイムアウト値の保持用
    FD_ZERO(&ComReadFds);                           // ComReadFdの初期化
    FD_SET(ComFd, &ComReadFds);                     // ファイルディスクリプタを設定
    tv.tv_sec=0; tv.tv_usec=10000;                  // 受信のタイムアウト設定(10ms)
    if(select(ComFd+1, &ComReadFds, 0, 0, &tv)) read(ComFd, &c, 1); // データを受信
    usleep(5000);                                   // 5msの(IchigoJam処理)待ち時間
    return c;                                       // 戻り値＝受信データ(文字変数c)
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
movb $0x0, 0xf(%rsp)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x70(%rsi)
movl 0x2c69(%rip), %edi      # 0x40f0
leal 0x3f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %edi, %ecx
subl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
sarl $0x6, %eax
cltq
orq %rdx, 0x20(%rsp,%rax,8)
leaq 0x10(%rsp), %r8
movq $0x0, (%r8)
movq $0x2710, 0x8(%r8)       # imm = 0x2710
incl %edi
xorl %ebx, %ebx
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1110
testl %eax, %eax
je 0x14e9
movl 0x2c1b(%rip), %edi      # 0x40f0
leaq 0xf(%rsp), %rbx
movl $0x1, %edx
movq %rbx, %rsi
callq 0x10e0
movb (%rbx), %bl
movl $0x1388, %edi           # imm = 0x1388
callq 0x11a0
movl %ebx, %eax
addq $0xa0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/prob1.c
// Function: bcf_p1_dump_afs
void bcf_p1_dump_afs(bcf_p1aux_t *ma)
{
	int k;
	fprintf(stderr, "[afs]");
	for (k = 0; k <= ma->M; ++k)
		fprintf(stderr, " %d:%.3lf", k, ma->afs[ma->M - k]);
	fprintf(stderr, "\n");
	memset(ma->afs, 0, sizeof(double) * (ma->M + 1));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x1d64e(%rip), %r15     # 0x1fff8
movq (%r15), %rcx
leaq 0x18d71(%rip), %rdi     # 0x1b725
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
callq 0x24b0
movl 0x4(%rbx), %eax
testl %eax, %eax
js 0x29ff
pushq $-0x1
popq %rbp
xorl %r12d, %r12d
leaq 0x18d58(%rip), %r14     # 0x1b72b
incl %ebp
movq (%r15), %rdi
movq 0x90(%rbx), %rcx
cltq
addq %r12, %rax
movsd (%rcx,%rax,8), %xmm0
movq %r14, %rsi
movl %ebp, %edx
movb $0x1, %al
callq 0x2290
movl 0x4(%rbx), %eax
decq %r12
cmpl %eax, %ebp
jl 0x29d3
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x2220
movq 0x90(%rbx), %rdi
movslq 0x4(%rbx), %rax
leaq 0x8(,%rax,8), %rdx
xorl %esi, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x21f0
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/main.c
// Function: bcf_cat
int bcf_cat(int n, char * const *fn)
{
	int i;
	bcf_t *out;
	uint8_t *buf;
	buf = malloc(BUF_SIZE);
	out = bcf_open("-", "w");
	for (i = 0; i < n; ++i) {
		bcf_t *in;
		bcf_hdr_t *h;
		off_t end;
		struct stat s;
		in = bcf_open(fn[i], "r");
		h = bcf_hdr_read(in);
		if (i == 0) bcf_hdr_write(out, h);
		bcf_hdr_destroy(h);
#ifdef _USE_KNETFILE
		fstat(knet_fileno((knetFile*)in->fp->fp), &s);
		end = s.st_size - 28;
		while (knet_tell((knetFile*)in->fp->fp) < end) {
			int size = knet_tell((knetFile*)in->fp->fp) + BUF_SIZE < end? BUF_SIZE : end - knet_tell((knetFile*)in->fp->fp);
			knet_read(in->fp->fp, buf, size);
			fwrite(buf, 1, size, out->fp->fp);
		}
#else
		abort(); // FIXME: not implemented
#endif
		bcf_close(in);
	}
	bcf_close(out);
	free(buf);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, 0x8(%rsp)
movl %edi, %ebp
movl $0x10000, %r13d         # imm = 0x10000
movl $0x10000, %edi          # imm = 0x10000
callq 0x2360
movq %rax, %r14
leaq 0x13074(%rip), %rdi     # 0x19a6a
leaq 0x128a5(%rip), %rsi     # 0x192a2
callq 0xb4e8
movq %rax, %r15
testl %ebp, %ebp
jle 0x6ad5
movl %ebp, %eax
movq %rax, (%rsp)
xorl %ebx, %ebx
movq 0x8(%rsp), %rax
movq (%rax,%rbx,8), %rdi
leaq 0x140e7(%rip), %rsi     # 0x1ab0c
callq 0xb4e8
movq %rax, %rbp
movq %rax, %rdi
callq 0xb658
movq %rax, %r12
movq %rbx, 0x10(%rsp)
testq %rbx, %rbx
jne 0x6a4d
movq %r15, %rdi
movq %r12, %rsi
callq 0xb598
movq %r12, %rdi
callq 0xb87a
movq 0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl 0x4(%rax), %edi
leaq 0x18(%rsp), %rsi
callq 0x24d0
movq 0x48(%rsp), %rbx
addq $-0x1c, %rbx
movq 0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movq 0x8(%rdi), %rax
cmpq %rbx, %rax
jge 0x6abb
leaq (%rax,%r13), %rcx
movl %ebx, %edx
subl %eax, %edx
cmpq %rbx, %rcx
movslq %edx, %r12
cmovlq %r13, %r12
movq %r14, %rsi
movq %r12, %rdx
callq 0x9d14
movq 0x10(%r15), %rax
movq 0x30(%rax), %rcx
movl $0x1, %esi
movq %r14, %rdi
movq %r12, %rdx
callq 0x24b0
jmp 0x6a73
movq %rbp, %rdi
callq 0xb56e
movq 0x10(%rsp), %rbx
incq %rbx
cmpq (%rsp), %rbx
jne 0x6a15
movq %r15, %rdi
callq 0xb56e
movq %r14, %rdi
callq 0x2060
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/main.c
// Function: main
int main(int argc, char *argv[])
{
	if (argc == 1) {
		fprintf(stderr, "\n");
		fprintf(stderr, "Program: bcftools (Tools for data in the VCF/BCF formats)\n");
		fprintf(stderr, "Version: %s\n\n", BCF_VERSION);
		fprintf(stderr, "Usage:   bcftools <command> <arguments>\n\n");
		fprintf(stderr, "Command: view      print, extract, convert and call SNPs from BCF\n");
		fprintf(stderr, "         index     index BCF\n");
		fprintf(stderr, "         cat       concatenate BCFs\n");
		fprintf(stderr, "         ld        compute all-pair r^2\n");
		fprintf(stderr, "         ldpair    compute r^2 between requested pairs\n");
		fprintf(stderr, "\n");
		return 1;
	}
	if (strcmp(argv[1], "view") == 0) return bcfview(argc-1, argv+1);
	else if (strcmp(argv[1], "index") == 0) return bcf_main_index(argc-1, argv+1);
	else if (strcmp(argv[1], "ld") == 0) return bcf_main_ld(argc-1, argv+1);
	else if (strcmp(argv[1], "ldpair") == 0) return bcf_main_ldpair(argc-1, argv+1);
	else if (strcmp(argv[1], "cat") == 0) return bcf_cat(argc-2, argv+2); // cat is different ...
	else {
		fprintf(stderr, "[main] Unrecognized command.\n");
		return 1;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x1, %edi
je 0x722b
movq %rsi, %r14
movl %edi, %ebx
leaq 0x8(%rsi), %r15
movq 0x8(%rsi), %r12
leaq 0x12132(%rip), %rsi     # 0x1929f
movq %r12, %rdi
callq 0x2270
testl %eax, %eax
je 0x71e6
leaq 0x13b46(%rip), %rsi     # 0x1acc6
movq %r12, %rdi
callq 0x2270
testl %eax, %eax
je 0x71fd
cmpb $0x6c, (%r12)
jne 0x71a7
cmpb $0x64, 0x1(%r12)
jne 0x71a7
cmpb $0x0, 0x2(%r12)
je 0x7241
leaq 0x13959(%rip), %rsi     # 0x1ab07
movq %r12, %rdi
callq 0x2270
testl %eax, %eax
je 0x7214
leaq 0x13b0b(%rip), %rsi     # 0x1accc
movq %r12, %rdi
callq 0x2270
testl %eax, %eax
jne 0x7258
addl $-0x2, %ebx
addq $0x10, %r14
movl %ebx, %edi
movq %r14, %rsi
callq 0x69c4
xorl %eax, %eax
jmp 0x7235
decl %ebx
movl %ebx, %edi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x31a1
decl %ebx
movl %ebx, %edi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x17b98
decl %ebx
movl %ebx, %edi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6af9
callq 0x276d
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
decl %ebx
movl %ebx, %edi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6f66
callq 0x2751
jmp 0x7230
nop
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/vcf.c
// Function: vcf_open
bcf_t *vcf_open(const char *fn, const char *mode)
{
	bcf_t *bp;
	vcf_t *v;
	if (strchr(mode, 'b')) return bcf_open(fn, mode);
	bp = calloc(1, sizeof(bcf_t));
	v = calloc(1, sizeof(vcf_t));
	bp->is_vcf = 1;
	bp->v = v;
	v->refhash = bcf_str2id_init();
	if (strchr(mode, 'r')) {
		v->fp = strcmp(fn, "-")? gzopen(fn, "r") : gzdopen(fileno(stdin), "r");
		v->ks = ks_init(v->fp);
	} else if (strchr(mode, 'w'))
		v->fpout = strcmp(fn, "-")? fopen(fn, "w") : stdout;
	return bp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r15
movq %rsi, %rdi
movl $0x62, %esi
callq 0x21a0
testq %rax, %rax
je 0xd76c
movq %r15, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb4e8
movl $0x1, %edi
movl $0x18, %esi
callq 0x2260
movq %rax, %rbx
movl $0x1, %edi
movl $0x40, %esi
callq 0x2260
movq %rax, %r14
movl $0x1, (%rbx)
movq %rax, 0x8(%rbx)
xorl %eax, %eax
callq 0xe6cd
movq %rax, 0x18(%r14)
movq %r12, %rdi
movl $0x72, %esi
callq 0x21a0
testq %rax, %rax
je 0xd807
cmpb $0x2d, (%r15)
jne 0xd7c8
cmpb $0x0, 0x1(%r15)
je 0xd848
leaq 0xd33d(%rip), %rsi      # 0x1ab0c
movq %r15, %rdi
callq 0x22c0
movq %rax, %r15
movq %rax, (%r14)
movl $0x1, %edi
movl $0x20, %esi
callq 0x2260
movq %rax, %r12
movq %r15, 0x18(%rax)
movl $0x1000, %edi           # imm = 0x1000
callq 0x2360
movq %rax, (%r12)
movq %r12, 0x10(%r14)
jmp 0xd839
movq %r12, %rdi
movl $0x77, %esi
callq 0x21a0
testq %rax, %rax
je 0xd839
cmpb $0x2d, (%r15)
jne 0xd826
cmpb $0x0, 0x1(%r15)
je 0xd86a
leaq 0xba75(%rip), %rsi      # 0x192a2
movq %r15, %rdi
callq 0x22a0
movq %rax, 0x8(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x12779(%rip), %rax     # 0x1ffc8
movq (%rax), %rdi
callq 0x2310
leaq 0xd2ae(%rip), %rsi      # 0x1ab0c
movl %eax, %edi
callq 0x2140
jmp 0xd7d7
movq 0x1274f(%rip), %rax     # 0x1ffc0
movq (%rax), %rax
jmp 0xd835
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/vcf.c
// Function: vcf_close
int vcf_close(bcf_t *bp)
{
	vcf_t *v;
	if (bp == 0) return -1;
	if (!bp->is_vcf) return bcf_close(bp);
	v = (vcf_t*)bp->v;
	if (v->fp) {
		ks_destroy(v->ks);
		gzclose(v->fp);
	}
	if (v->fpout) fclose(v->fpout);
	free(v->line.s);
	bcf_str2id_thorough_destroy(v->refhash);
	free(v);
	free(bp);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0xdb0a
movq %rdi, %rbx
cmpl $0x0, (%rdi)
je 0xdb15
movq 0x8(%rbx), %r14
movq (%r14), %rdi
testq %rdi, %rdi
je 0xdad6
movq 0x10(%r14), %r15
testq %r15, %r15
je 0xdad1
movq (%r15), %rdi
callq 0x2060
movq %r15, %rdi
callq 0x2060
movq (%r14), %rdi
callq 0x2050
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0xdae4
callq 0x2170
movq 0x30(%r14), %rdi
callq 0x2060
movq 0x18(%r14), %rdi
callq 0xe70a
movq %r14, %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2060
xorl %eax, %eax
jmp 0xdb0f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xb56e
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/vcf.c
// Function: vcf_hdr_write
int vcf_hdr_write(bcf_t *bp, const bcf_hdr_t *h)
{
	vcf_t *v = (vcf_t*)bp->v;
	int i, has_ver = 0;
	if (!bp->is_vcf) return bcf_hdr_write(bp, h);
	if (h->l_txt > 0) {
		if (strstr(h->txt, "##fileformat=")) has_ver = 1;
		if (has_ver == 0) fprintf(v->fpout, "##fileformat=VCFv4.1\n");
		fwrite(h->txt, 1, h->l_txt - 1, v->fpout);
	}
	if (h->l_txt == 0) fprintf(v->fpout, "##fileformat=VCFv4.1\n");
	fprintf(v->fpout, "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT");
	for (i = 0; i < h->n_smpl; ++i)
		fprintf(v->fpout, "\t%s", h->sns[i]);
	fputc('\n', v->fpout);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpl $0x0, (%rdi)
je 0xdc16
movq 0x8(%rdi), %r15
movl 0x10(%rbx), %ebp
testl %ebp, %ebp
jle 0xdb93
movq 0x28(%rbx), %r14
leaq 0xd6eb(%rip), %rsi      # 0x1b237
movq %r14, %rdi
callq 0x2550
testq %rax, %rax
jne 0xdb7a
movq 0x8(%r15), %rcx
leaq 0xd6e1(%rip), %rdi      # 0x1b245
movl $0x15, %esi
movl $0x1, %edx
callq 0x24b0
movq 0x28(%rbx), %r14
movl 0x10(%rbx), %ebp
decl %ebp
movslq %ebp, %rdx
movq 0x8(%r15), %rcx
movl $0x1, %esi
movq %r14, %rdi
callq 0x24b0
movl 0x10(%rbx), %ebp
testl %ebp, %ebp
jne 0xdbb1
movq 0x8(%r15), %rcx
leaq 0xd6a3(%rip), %rdi      # 0x1b245
movl $0x15, %esi
movl $0x1, %edx
callq 0x24b0
movq 0x8(%r15), %rcx
leaq 0xd69f(%rip), %rdi      # 0x1b25b
movl $0x2d, %esi
movl $0x1, %edx
callq 0x24b0
cmpl $0x0, 0x4(%rbx)
jle 0xdbfd
leaq 0xd6b1(%rip), %r14      # 0x1b289
xorl %r12d, %r12d
movq 0x8(%r15), %rdi
movq 0x38(%rbx), %rax
movq (%rax,%r12,8), %rdx
movq %r14, %rsi
xorl %eax, %eax
callq 0x2290
incq %r12
movslq 0x4(%rbx), %rax
cmpq %rax, %r12
jl 0xdbdb
movq 0x8(%r15), %rsi
movl $0xa, %edi
callq 0x2220
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb598
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/vcf.c
// Function: vcf_write
int vcf_write(bcf_t *bp, bcf_hdr_t *h, bcf1_t *b)
{
	vcf_t *v = (vcf_t*)bp->v;
	extern void bcf_fmt_core(const bcf_hdr_t *h, bcf1_t *b, kstring_t *s);
	if (!bp->is_vcf) return bcf_write(bp, h, b);
	bcf_fmt_core(h, b, &v->line);
	fwrite(v->line.s, 1, v->line.l, v->fpout);
	fputc('\n', v->fpout);
	return v->line.l + 1;
}

// Assembly:
cmpl $0x0, (%rdi)
je 0xbbc8
pushq %rbx
movq 0x8(%rdi), %rbx
leaq 0x20(%rbx), %rax
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0xbe5a
movq 0x30(%rbx), %rdi
movq 0x8(%rbx), %rcx
movq 0x20(%rbx), %rdx
movl $0x1, %esi
callq 0x24b0
movq 0x8(%rbx), %rsi
movl $0xa, %edi
callq 0x2220
movl 0x20(%rbx), %eax
incl %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/prob1.c
// Function: bcf_p1_indel_prior
void bcf_p1_indel_prior(bcf_p1aux_t *ma, double x)
{
	int i;
	for (i = 0; i < ma->M; ++i)
		ma->phi_indel[i] = ma->phi[i] * x;
	ma->phi_indel[ma->M] = 1. - ma->phi[ma->M] * x;
}

// Assembly:
movslq 0x4(%rdi), %rax
movq 0x28(%rdi), %rdx
movq 0x30(%rdi), %rcx
testq %rax, %rax
jle 0xff6d
xorl %esi, %esi
movsd (%rdx,%rsi,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0xff57
mulsd (%rdx,%rax,8), %xmm0
movsd 0x90fe(%rip), %xmm1     # 0x19078
subsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%rax,8)
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/prob1.c
// Function: bcf_p1_set_n1
int bcf_p1_set_n1(bcf_p1aux_t *b, int n1)
{
	if (n1 == 0 || n1 >= b->n) return -1;
	if (b->M != b->n * 2) {
		fprintf(stderr, "[%s] unable to set `n1' when there are haploid samples.\n", __func__);
		return -1;
	}
	b->n1 = n1;
	return 0;
}

// Assembly:
pushq %rbx
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %esi, %esi
je 0x10948
movl (%rdi), %eax
cmpl %esi, %eax
jle 0x10948
addl %eax, %eax
cmpl %eax, 0x4(%rdi)
jne 0x1094c
movl %esi, 0x8(%rdi)
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
retq
callq 0x2a8c
jmp 0x10948
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/prob1.c
// Function: bcf_p1_destroy
void bcf_p1_destroy(bcf_p1aux_t *ma)
{
	if (ma) {
		int k;
		free(ma->lf);
		if (ma->hg && ma->n1 > 0) {
			for (k = 0; k <= 2*ma->n1; ++k) free(ma->hg[k]);
			free(ma->hg);
		}
		free(ma->ploidy); free(ma->q2p); free(ma->pdg);
		free(ma->phi); free(ma->phi_indel); free(ma->phi1); free(ma->phi2);
		free(ma->z); free(ma->zswap); free(ma->z1); free(ma->z2);
		free(ma->afs); free(ma->afs1);
		free(ma);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x10a39
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x70(%rdi), %rdi
callq 0x2060
cmpq $0x0, 0x68(%rbx)
je 0x109af
cmpl $0x0, 0x8(%rbx)
jle 0x109af
movq $-0x1, %r14
movq 0x68(%rbx), %rax
movq 0x8(%rax,%r14,8), %rdi
callq 0x2060
movslq 0x8(%rbx), %rax
addq %rax, %rax
incq %r14
cmpq %rax, %r14
jl 0x10989
movq 0x68(%rbx), %rdi
callq 0x2060
movq 0x10(%rbx), %rdi
callq 0x2060
movq 0x18(%rbx), %rdi
callq 0x2060
movq 0x20(%rbx), %rdi
callq 0x2060
movq 0x28(%rbx), %rdi
callq 0x2060
movq 0x30(%rbx), %rdi
callq 0x2060
movq 0x58(%rbx), %rdi
callq 0x2060
movq 0x60(%rbx), %rdi
callq 0x2060
movq 0x38(%rbx), %rdi
callq 0x2060
movq 0x40(%rbx), %rdi
callq 0x2060
movq 0x48(%rbx), %rdi
callq 0x2060
movq 0x50(%rbx), %rdi
callq 0x2060
movq 0x90(%rbx), %rdi
callq 0x2060
movq 0x98(%rbx), %rdi
callq 0x2060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/prob1.c
// Function: bcf_p1_call_gt
int bcf_p1_call_gt(const bcf_p1aux_t *ma, double f0, int k)
{
	double sum, g[3];
	double max, f3[3], *pdg = ma->pdg + k * 3;
	int q, i, max_i, ploidy;
	ploidy = ma->ploidy? ma->ploidy[k] : 2;
	if (ploidy == 2) {
		f3[0] = (1.-f0)*(1.-f0); f3[1] = 2.*f0*(1.-f0); f3[2] = f0*f0;
	} else {
		f3[0] = 1. - f0; f3[1] = 0; f3[2] = f0;
	}
	for (i = 0, sum = 0.; i < 3; ++i)
		sum += (g[i] = pdg[i] * f3[i]);
	for (i = 0, max = -1., max_i = 0; i < 3; ++i) {
		g[i] /= sum;
		if (g[i] > max) max = g[i], max_i = i;
	}
	max = 1. - max;
	if (max < 1e-308) max = 1e-308;
	q = (int)(-4.343 * log(max) + .499);
	if (q > 99) q = 99;
	return q<<2|max_i;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
leal (%rsi,%rsi,2), %eax
cltq
shlq $0x3, %rax
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x130aa
movslq %esi, %rdx
cmpb $0x2, (%rcx,%rdx)
jne 0x130d9
movsd 0x5fc6(%rip), %xmm1     # 0x19078
subsd %xmm0, %xmm1
movapd %xmm0, %xmm2
addsd %xmm0, %xmm2
movapd %xmm1, %xmm3
unpcklpd %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0]
unpcklpd %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
mulpd %xmm3, %xmm1
movapd %xmm1, (%rsp)
mulsd %xmm0, %xmm0
jmp 0x130f3
movsd 0x5f97(%rip), %xmm1     # 0x19078
subsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq $0x0, 0x8(%rsp)
addq 0x20(%rdi), %rax
movsd %xmm0, 0x10(%rsp)
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm1
mulsd (%rsp,%rcx,8), %xmm1
movsd %xmm1, 0x20(%rsp,%rcx,8)
addsd %xmm1, %xmm0
incq %rcx
cmpq $0x3, %rcx
jne 0x13103
movsd 0x5f70(%rip), %xmm1     # 0x19098
xorl %eax, %eax
xorl %ebx, %ebx
movapd %xmm1, %xmm2
movsd 0x20(%rsp,%rax,8), %xmm1
divsd %xmm0, %xmm1
ucomisd %xmm2, %xmm1
cmoval %eax, %ebx
movsd %xmm1, 0x20(%rsp,%rax,8)
maxsd %xmm2, %xmm1
incq %rax
cmpq $0x3, %rax
jne 0x1312c
movsd 0x5f1c(%rip), %xmm2     # 0x19078
subsd %xmm1, %xmm2
movsd 0x8368(%rip), %xmm0     # 0x1b4d0
maxsd %xmm2, %xmm0
callq 0x2210
mulsd 0x5f37(%rip), %xmm0     # 0x190b0
addsd 0x5eef(%rip), %xmm0     # 0x19070
cvttsd2si %xmm0, %ecx
cmpl $0x63, %ecx
movl $0x63, %eax
cmovll %ecx, %eax
shll $0x2, %eax
orl %ebx, %eax
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/prob1.c
// Function: cal_pdg
static int cal_pdg(const bcf1_t *b, bcf_p1aux_t *ma)
{
    int i, j;
    long *p, tmp;
    p = alloca(b->n_alleles * sizeof(long));
    memset(p, 0, sizeof(long) * b->n_alleles);
    for (j = 0; j < ma->n; ++j) {
        const uint8_t *pi = ma->PL + j * ma->PL_len;
        double *pdg = ma->pdg + j * 3;
        pdg[0] = ma->q2p[pi[2]]; pdg[1] = ma->q2p[pi[1]]; pdg[2] = ma->q2p[pi[0]];
        for (i = 0; i < b->n_alleles; ++i)
            p[i] += (int)pi[(i+1)*(i+2)/2-1];
    }
    for (i = 0; i < b->n_alleles; ++i) p[i] = p[i]<<4 | i;
    for (i = 1; i < b->n_alleles; ++i) // insertion sort
        for (j = i; j > 0 && p[j] < p[j-1]; --j)
            tmp = p[j], p[j] = p[j-1], p[j-1] = tmp;
    for (i = b->n_alleles - 1; i >= 0; --i)
        if ((p[i]&0xf) == 0) break;
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movl %edi, %ebx
movslq %edi, %rdx
movq %rsp, %r14
leaq 0xf(,%rdx,8), %rax
shlq $0x3, %rdx
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movq %r14, %rdi
xorl %esi, %esi
callq 0x21f0
movslq (%r15), %rcx
movl %ebx, %eax
testq %rcx, %rcx
jle 0x14a7d
movq 0xa0(%r15), %rdx
movslq 0xa8(%r15), %rsi
movq 0x18(%r15), %rdi
movq 0x20(%r15), %r8
movq %rax, %r9
negq %r9
xorl %r10d, %r10d
movq %r10, %r11
imulq %rsi, %r11
leaq (%r10,%r10,2), %r15
movzbl 0x2(%rdx,%r11), %r12d
movsd (%rdi,%r12,8), %xmm0
movsd %xmm0, (%r8,%r15,8)
movzbl 0x1(%rdx,%r11), %r12d
movsd (%rdi,%r12,8), %xmm0
movsd %xmm0, 0x8(%r8,%r15,8)
movzbl (%rdx,%r11), %r12d
movsd (%rdi,%r12,8), %xmm0
movsd %xmm0, 0x10(%r8,%r15,8)
testl %ebx, %ebx
jle 0x14a75
addq %rdx, %r11
movl $0x1, %r15d
leaq 0x1(%r15), %r12
movl %r12d, %r13d
imull %r15d, %r13d
shrl %r13d
movzbl -0x1(%r11,%r13), %r13d
addq %r13, -0x8(%r14,%r15,8)
leaq (%r9,%r15), %r13
incq %r13
movq %r12, %r15
cmpq $0x1, %r13
jne 0x14a4c
incq %r10
cmpq %rcx, %r10
jne 0x149fd
testl %ebx, %ebx
jle 0x14ad1
xorl %ecx, %ecx
movq (%r14,%rcx,8), %rdx
shlq $0x4, %rdx
orq %rcx, %rdx
movq %rdx, (%r14,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x14a83
cmpl $0x1, %ebx
je 0x14ad1
movl $0x1, %ecx
movl $0x2, %edx
movl %edx, %esi
decl %esi
movq -0x8(%r14,%rsi,8), %r8
movq (%r14,%rsi,8), %rdi
cmpq %r8, %rdi
jge 0x14ac9
movq %r8, (%r14,%rsi,8)
movq %rdi, -0x8(%r14,%rsi,8)
cmpl $0x1, %esi
jg 0x14aab
incl %ecx
incl %edx
cmpl %ebx, %ecx
jne 0x14aa9
movl %ebx, %ecx
sarl $0x1f, %ecx
andl %ebx, %ecx
decl %ecx
decq %rax
testl %ebx, %ebx
jle 0x14af1
movl %eax, %edx
decl %ebx
decq %rax
testb $0xf, (%r14,%rdx,8)
jne 0x14add
jmp 0x14af3
movl %ecx, %ebx
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/em.c
// Function: get_pdg3
static double *get_pdg3(const bcf1_t *b)
{
	double *pdg;
	const uint8_t *PL = 0;
	int i, PL_len = 0;
	// initialize g_q2p if necessary
	if (g_q2p[0] == 0.)
		for (i = 0; i < 256; ++i)
			g_q2p[i] = pow(10., -i / 10.);
	// set PL and PL_len
	for (i = 0; i < b->n_gi; ++i) {
		if (b->gi[i].fmt == bcf_str2int("PL", 2)) {
			PL = (const uint8_t*)b->gi[i].data;
			PL_len = b->gi[i].len;
			break;
		}
	}
	if (i == b->n_gi) return 0; // no PL
	// fill pdg
	pdg = malloc(3 * b->n_smpl * sizeof(double));
	for (i = 0; i < b->n_smpl; ++i) {
		const uint8_t *pi = PL + i * PL_len;
		double *p = pdg + i * 3;
		p[0] = g_q2p[pi[2]]; p[1] = g_q2p[pi[1]]; p[2] = g_q2p[pi[0]];
	}
	return pdg;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsd 0xacf0(%rip), %xmm0     # 0x20440
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x15794
jp 0x15794
leaq 0xacdd(%rip), %r14      # 0x20440
xorl %r15d, %r15d
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
movsd 0x5d2a(%rip), %xmm0     # 0x1b4a0
divsd %xmm0, %xmm1
callq 0x2160
movsd %xmm0, (%r14)
decq %r15
addq $0x8, %r14
cmpq $-0x100, %r15
jne 0x15766
movslq 0x48(%rbx), %rcx
testq %rcx, %rcx
jle 0x157c0
movq 0x50(%rbx), %rsi
addq $0x8, %rsi
xorl %eax, %eax
xorl %edx, %edx
cmpl $0x504c, -0x8(%rsi)     # imm = 0x504C
je 0x157ca
incq %rdx
addq $0x10, %rsi
cmpq %rdx, %rcx
jne 0x157a9
jmp 0x1583d
xorl %edx, %edx
xorl %r14d, %r14d
xorl %r15d, %r15d
jmp 0x157d1
movq (%rsi), %r15
movslq -0x4(%rsi), %r14
cmpl %ecx, %edx
jne 0x157d9
xorl %eax, %eax
jmp 0x1583d
movslq 0x5c(%rbx), %r12
leaq (,%r12,8), %rax
leaq (%rax,%rax,2), %rbx
movq %rbx, %rdi
callq 0x2360
testq %r12, %r12
jle 0x1583d
addq $0x2, %r15
xorl %ecx, %ecx
leaq 0xac3d(%rip), %rdx      # 0x20440
movzbl (%r15), %esi
movsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%rax,%rcx)
movzbl -0x1(%r15), %esi
movsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, 0x8(%rax,%rcx)
movzbl -0x2(%r15), %esi
movsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, 0x10(%rax,%rcx)
addq $0x18, %rcx
addq %r14, %r15
cmpq %rcx, %rbx
jne 0x15803
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq