LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0xdd11
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rsi), %rax
cmpq %rax, 0x18(%rdi)
jae 0xdcf9
movq %rax, 0x18(%r14)
movq %r14, %rdi
callq 0xddcc
movq (%r14), %rdi
movq 0x18(%rbx), %rdx
imulq 0x8(%r14), %rdx
movq (%rbx), %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x21a0
leaq 0x3db4(%rip), %rdi      # 0x11acc
xorl %eax, %eax
callq 0xdd1f
// File: /workspace/github_c_makefile_star2_O1/goodpaul6[P]generic/vector.c
// Function: error_exit
static void error_exit(const char* fmt, ...)
{
	fprintf(stderr, "\nError:\n");
	
	va_list args;
	va_start(args, fmt);
	vfprintf(stderr, fmt, args);
	va_end(args);
	
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
testb %al, %al
je 0xdd5f
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
leaq -0xe0(%rbp), %r14
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
movq 0x826f(%rip), %r15      # 0x15ff0
movq (%r15), %rcx
leaq 0x3058(%rip), %rdi      # 0x10de3
movl $0x8, %esi
movl $0x1, %edx
callq 0x2240
leaq -0x30(%rbp), %rdx
movq %r14, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x2200
movl $0x1, %edi
callq 0x2230
// File: /workspace/github_c_makefile_star2_O1/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 0xde95
movq %rcx, %r14
movq 0x10(%rsi), %rax
cmpq %rcx, %rax
jb 0xde9e
movq %r8, %rbx
leaq (%r8,%r14), %rcx
cmpq %rax, %rcx
ja 0xde9e
movq %rdx, %r15
movq %rdi, %r13
leaq (%rbx,%rdx), %r12
cmpq %r12, 0x18(%rdi)
jae 0xde57
movq %r12, 0x18(%r13)
movq %r13, %rdi
movq %rsi, -0x30(%rbp)
callq 0xddcc
movq -0x30(%rbp), %rsi
cmpq 0x10(%r13), %r12
jbe 0xde61
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 0x21a0
leaq 0x3c30(%rip), %rdi      # 0x11acc
jmp 0xdea5
leaq 0x3c5c(%rip), %rdi      # 0x11b01
xorl %eax, %eax
callq 0xdd1f
// File: /workspace/github_c_makefile_star2_O1/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 0xdee7
movq %r15, 0x18(%r14)
movq %r14, %rdi
callq 0xddcc
movq %r15, 0x10(%r14)
testq %rbx, %rbx
je 0xdf19
cmpq $0x0, 0x10(%r14)
je 0xdf19
xorl %r15d, %r15d
movq 0x8(%r14), %rdx
movq %rdx, %rdi
imulq %r15, %rdi
addq (%r14), %rdi
movq %rbx, %rsi
callq 0x21a0
incq %r15
cmpq %r15, 0x10(%r14)
ja 0xdefa
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x18(%rbx), %rax
leaq 0x1(%rdi), %rcx
cmpq %rax, %rcx
jb 0xdfbe
testq %rax, %rax
jne 0xdfac
movq $0x8, 0x18(%rbx)
shlq 0x18(%rbx)
movq %rbx, %rdi
callq 0xddcc
movq 0x10(%rbx), %rdi
jmp 0xdf92
movq 0x8(%rbx), %rdx
imulq %rdx, %rdi
addq (%rbx), %rdi
movq %r14, %rsi
callq 0x21a0
incq 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpq $0x0, 0x10(%rdi)
je 0xe00c
testq %rsi, %rsi
je 0xe007
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rax
decq %rax
movq %rax, 0x10(%rdi)
imulq %rdx, %rax
addq (%rdi), %rax
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x21a0
decq 0x10(%rdi)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x3ba9(%rip), %rdi      # 0x11bc0
xorl %eax, %eax
callq 0xdd1f
// File: /workspace/github_c_makefile_star2_O1/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 0xe0a6
movq %rsi, %r15
movq %rdi, %r14
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rax
leaq 0x1(%rdx), %rcx
cmpq %rax, %rcx
jb 0xe05c
addq %rax, %rax
movq %rax, 0x18(%r14)
movq %r14, %rdi
callq 0xddcc
jmp 0xe03a
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 0x21e0
movq 0x8(%r14), %rdx
imulq %rdx, %rbx
addq (%r14), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21a0
incq 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3b45(%rip), %rdi      # 0x11bf2
movl %ebx, %esi
xorl %eax, %eax
callq 0xdd1f
// File: /workspace/github_c_makefile_star2_O1/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 0xe16d
movq (%rdi), %rax
addq %rax, %rcx
decq %rcx
cmpq %rcx, %rax
jae 0xe16d
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 0xe151
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xe1e8
callq 0x2030
movq $0x0, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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, -0x38(%rbp)
movq %rsi, %r14
movq %rdi, %rbx
movb (%rsi), %al
testb %al, %al
je 0xe27d
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 0xe25a
andl $0x3ff, %r15d           # imm = 0x3FF
jmp 0xe283
movl $0x105, %r15d           # imm = 0x105
movq %r15, -0x30(%rbp)
movl $0x18, %edi
callq 0x21b0
testq %rax, %rax
je 0xe309
movq %rax, %r12
movq %r14, %rdi
callq 0x20b0
leaq 0x1(%rax), %rdi
callq 0x21b0
testq %rax, %rax
je 0xe31a
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
callq 0x2050
movq %r13, 0x8(%r12)
movq -0x38(%rbp), %rax
movq %rax, 0x10(%r12)
movq $0x0, (%r12)
cmpq $0x0, (%rbx,%r15,8)
jne 0xe2ea
leaq 0x2000(%rbx), %rdi
leaq -0x30(%rbp), %rsi
callq 0xdf81
movq -0x30(%rbp), %rax
movq (%rbx,%rax,8), %rcx
movq %rcx, (%r12)
movq %r12, (%rbx,%rax,8)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3997(%rip), %rdi      # 0x11ca7
movq %r14, %rsi
xorl %eax, %eax
callq 0xe5e7
leaq 0x3976(%rip), %rdi      # 0x11c97
xorl %eax, %eax
callq 0xe5e7
// File: /workspace/github_c_makefile_star2_O1/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 0xe365
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 0xe344
andl $0x3ff, %eax            # imm = 0x3FF
jmp 0xe36a
movl $0x105, %eax            # imm = 0x105
movq (%rdi,%rax,8), %r15
xorl %r14d, %r14d
testq %r15, %r15
je 0xe38f
movq 0x8(%r15), %rdi
movq %rbx, %rsi
callq 0x2150
testl %eax, %eax
je 0xe38b
movq (%r15), %r15
jmp 0xe371
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_O1/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 0xe3e1
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 0xe3be
andl $0x3ff, %r13d           # imm = 0x3FF
jmp 0xe3e7
movl $0x105, %r13d           # imm = 0x105
movq (%rdi,%r13,8), %rbx
testq %rbx, %rbx
je 0xe42e
movq %rdi, -0x30(%rbp)
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x2150
testl %eax, %eax
je 0xe433
xorl %r12d, %r12d
movq %rbx, %r14
movq (%r14), %rbx
testq %rbx, %rbx
je 0xe4b0
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x2150
movq %r14, %rcx
movq %rbx, %r14
testl %eax, %eax
jne 0xe40a
jmp 0xe435
xorl %r12d, %r12d
jmp 0xe4b0
xorl %ecx, %ecx
testq %rcx, %rcx
je 0xe442
movq (%rbx), %rax
movq %rax, (%rcx)
jmp 0xe49b
movq -0x30(%rbp), %r14
movq $0x0, (%r14,%r13,8)
leaq 0x2000(%r14), %r15
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x0, 0x2010(%r14)
je 0xe48d
xorl %r12d, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0xdf24
cmpq %r13, (%rax)
je 0xe48a
incq %r12
cmpq 0x2010(%r14), %r12
jb 0xe467
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xe48d
movl %r12d, %eax
testl %eax, %eax
js 0xe49b
movl %eax, %esi
movq %r15, %rdi
callq 0xe0b6
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
// File: /workspace/github_c_makefile_star2_O1/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 0xe539
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 0xdf24
movq (%rax), %rax
movq (%r15,%rax,8), %r12
testq %r12, %r12
je 0xe51f
movq 0x8(%r12), %rdi
movq 0x10(%r12), %rsi
movq %rbx, %rdx
callq *%r14
movq (%r12), %r12
jmp 0xe504
incq %r13
cmpq 0x2010(%r15), %r13
jb 0xe4f1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xe5ad
movq %rdi, %r14
xorl %r15d, %r15d
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0xdf24
movq (%rax), %r13
movq (%r14,%r13,8), %r12
testq %r12, %r12
je 0xe599
movq (%r12), %rbx
movq 0x8(%r12), %rdi
callq 0x2030
movq %r12, %rdi
callq 0x2030
movq %rbx, %r12
testq %rbx, %rbx
jne 0xe57b
movq $0x0, (%r14,%r13,8)
incq %r15
cmpq 0x2010(%r14), %r15
jb 0xe563
movq -0x30(%rbp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe1c4
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq (%rdi), %rcx
movb (%rcx), %r11b
testb %r11b, %r11b
je 0x2156
xorl %r10d, %r10d
movl $0x1, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
movq %rcx, %rax
cmpb $0x3f, %r11b
jne 0x20e9
shll $0x4, %edx
shll $0x4, %r8d
jmp 0x2134
cmpl $0x1, %edx
jg 0x2163
leal -0x30(%r11), %ebx
cmpb $0x9, %bl
ja 0x2104
shll $0x4, %r8d
movzbl %bl, %r11d
orl %r11d, %r8d
jmp 0x2134
leal -0x61(%r11), %ebx
cmpb $0x5, %bl
ja 0x2117
shll $0x4, %r8d
movsbl %bl, %r11d
jmp 0x212d
addb $-0x41, %r11b
cmpb $0x5, %r11b
ja 0x21cd
shll $0x4, %r8d
movsbl %r11b, %r11d
addl %r11d, %r8d
addl $0xa, %r8d
incq %rax
movb 0x1(%rcx,%r10), %r11b
leaq 0x1(%r10), %rbx
testb %r11b, %r11b
je 0x2151
incl %r9d
cmpl $0x5, %r10d
movq %rbx, %r10
jb 0x20da
movl %ebx, %r9d
jmp 0x2169
xorl %r8d, %r8d
movl $0x1, %edx
movb $0x1, %r9b
jmp 0x2178
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
addl $-0x6, %r9d
cmpl $-0x5, %r9d
setb %r9b
movq %rax, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x100000, %edx         # imm = 0x100000
jg 0x21ab
cmpl $0x100000, %r8d         # imm = 0x100000
jne 0x2196
cmpl $0x10000, %edx          # imm = 0x10000
jg 0x21ab
testq %rsi, %rsi
je 0x21a1
decl %edx
movl %edx, (%rsi)
jmp 0x21a8
cmpl $0x2, %edx
cmovgel %eax, %r8d
movl %r8d, %eax
cmpl $0x110000, %eax         # imm = 0x110000
setae %dl
orb %dl, %r9b
cmpb $0x1, %r9b
je 0x21c1
movq %rcx, (%rdi)
popq %rbx
retq
callq 0x1399
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x21bf
addq %r10, %rcx
movq %rcx, %rax
movl %r10d, %r9d
jmp 0x2169
// File: /workspace/github_c_makefile_star2_O1/codeniko[P]CS214-Malloc-Free/Test3.c
// Function: main
void main()
{
    int i;
    for(i = 0; i < 5; i++){
        int* p = malloc(sizeof(int));
        *p = i;
        printf("address: %p, value: %d\n",p, *p);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xea7(%rip), %rbx       # 0x2004
leaq 0xea8(%rip), %r14       # 0x200c
xorl %r15d, %r15d
movl $0x4, %edi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x11a0
movl %r15d, (%rax)
movq %r14, %rdi
movq %rax, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x1030
incl %r15d
cmpl $0x5, %r15d
jne 0x1167
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bokunimowakaru[P]petit15term/./kbhit.c
// Function: kbhit
int kbhit(void){
    struct termios oldt, newt;
    int ch;
    int oldf;

    tcgetattr(STDIN_FILENO, &oldt);
    newt = oldt;
    newt.c_lflag &= ~(ICANON | ECHO);
    tcsetattr(STDIN_FILENO, TCSANOW, &newt);
    oldf = fcntl(STDIN_FILENO, F_GETFL, 0);
    fcntl(STDIN_FILENO, F_SETFL, oldf | O_NONBLOCK);

    ch = getchar();

    tcsetattr(STDIN_FILENO, TCSANOW, &oldt);
    fcntl(STDIN_FILENO, F_SETFL, oldf);

    if (ch != EOF) {
        ungetc(ch, stdin);
        return 1;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
xorl %ebx, %ebx
leaq 0x3c(%rsp), %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x1130
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups 0x2c(%r14), %xmm3
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movaps %xmm1, 0x10(%rdx)
movaps %xmm2, 0x20(%rdx)
movups %xmm3, 0x2c(%rdx)
andb $-0xb, 0xc(%rdx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x1140
xorl %edi, %edi
movl $0x3, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x1070
movl %eax, %r15d
movl %eax, %edx
orl $0x800, %edx            # imm = 0x800
xorl %edi, %edi
movl $0x4, %esi
xorl %eax, %eax
callq 0x1070
callq 0x10f0
movl %eax, %ebp
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1140
xorl %edi, %edi
movl $0x4, %esi
movl %r15d, %edx
xorl %eax, %eax
callq 0x1070
cmpl $-0x1, %ebp
je 0x1361
movq 0x2c8e(%rip), %rax      # 0x3fe0
movq (%rax), %rsi
movl %ebp, %edi
callq 0x1120
movl $0x1, %ebx
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bokunimowakaru[P]petit15term/petit15writer.c
// Function: log_date
void log_date(char *s){
    time_t error_time;
    struct tm *error_time_st;
    
    time(&error_time);
    error_time_st = localtime(&error_time);
    printf("%4d/%02d/%02d %02d:%02d:%02d %s\n",
        error_time_st->tm_year+1900,
        error_time_st->tm_mon+1,
        error_time_st->tm_mday,
        error_time_st->tm_hour,
        error_time_st->tm_min,
        error_time_st->tm_sec,
        s
    );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x1100
movq %r14, %rdi
callq 0x1040
movl $0x76c, %esi            # imm = 0x76C
addl 0x14(%rax), %esi
movl 0x10(%rax), %edx
incl %edx
movl 0xc(%rax), %ecx
movl 0x8(%rax), %r8d
movl (%rax), %r10d
movl 0x4(%rax), %r9d
leaq 0xc76(%rip), %rdi       # 0x2020
xorl %eax, %eax
pushq %rbx
pushq %r10
callq 0x10b0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1444
leaq 0x2d16(%rip), %rsi      # 0x40f4
movl %eax, %edi
callq 0x1130
movaps 0xc24(%rip), %xmm0      # 0x2010
leaq 0x4(%rsp), %rbx
movups %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 0x2ccb(%rip), %edi      # 0x40f0
xorl %esi, %esi
callq 0x10a0
movl 0x2cbe(%rip), %edi      # 0x40f0
xorl %esi, %esi
movq %rbx, %rdx
callq 0x1140
movl 0x2cae(%rip), %eax      # 0x40f0
jmp 0x1449
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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:
subq $0xa8, %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 0x2c68(%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 %edx, %edx
xorl %ecx, %ecx
callq 0x1110
testl %eax, %eax
je 0x14e3
movl 0x2c1c(%rip), %edi      # 0x40f0
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
callq 0x10e0
movl $0x1388, %edi           # imm = 0x1388
callq 0x11a0
movb 0xf(%rsp), %al
addq $0xa8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x18c99(%rip), %rdi     # 0x1b64d
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 0x18c80(%rip), %r14     # 0x1b653
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_O1/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 0x12f60(%rip), %rdi     # 0x19a12
leaq 0x12791(%rip), %rsi     # 0x1924a
callq 0xb3a4
movq %rax, %r15
testl %ebp, %ebp
jle 0x6b91
movl %ebp, %eax
movq %rax, (%rsp)
xorl %ebx, %ebx
movq 0x8(%rsp), %rax
movq (%rax,%rbx,8), %rdi
leaq 0x13fd7(%rip), %rsi     # 0x1aab8
callq 0xb3a4
movq %rax, %rbp
movq %rax, %rdi
callq 0xb51c
movq %rax, %r12
movq %rbx, 0x10(%rsp)
testq %rbx, %rbx
jne 0x6b09
movq %r15, %rdi
movq %r12, %rsi
callq 0xb45c
movq %r12, %rdi
callq 0xb73e
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 0x6b77
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 0x9c56
movq 0x10(%r15), %rax
movq 0x30(%rax), %rcx
movl $0x1, %esi
movq %r14, %rdi
movq %r12, %rdx
callq 0x24b0
jmp 0x6b2f
movq %rbp, %rdi
callq 0xb432
movq 0x10(%rsp), %rbx
incq %rbx
cmpq (%rsp), %rbx
jne 0x6ad1
movq %r15, %rdi
callq 0xb432
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_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/main.c
// Function: bcf_main_ld
int bcf_main_ld(int argc, char *argv[])
{
	bcf_t *fp;
	bcf_hdr_t *h;
	bcf1_t **b, *b0;
	int i, j, m, n;
	double f[4];
	if (argc == 1) {
		fprintf(stderr, "Usage: bcftools ld <in.bcf>\n");
		return 1;
	}
	fp = bcf_open(argv[1], "rb");
	h = bcf_hdr_read(fp);
	// read the entire BCF
	m = n = 0; b = 0;
	b0 = calloc(1, sizeof(bcf1_t));
	while (bcf_read(fp, h, b0) >= 0) {
		if (m == n) {
			m = m? m<<1 : 16;
			b = realloc(b, sizeof(void*) * m);
		}
		b[n] = calloc(1, sizeof(bcf1_t));
		bcf_cpy(b[n++], b0);
	}
	bcf_destroy(b0);
	// compute pair-wise r^2
	printf("%d\n", n); // the number of loci
	for (i = 0; i < n; ++i) {
		printf("%s:%d", h->ns[b[i]->tid], b[i]->pos + 1);
		for (j = 0; j < i; ++j) {
			double r = bcf_pair_freq(b[i], b[j], f);
			printf("\t%.3f", r*r);
		}
		printf("\t1.000\n");
	}
	// free
	for (i = 0; i < n; ++i) bcf_destroy(b[i]);
	free(b);
	bcf_hdr_destroy(h);
	bcf_close(fp);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $0x1, %edi
je 0x720d
movq 0x8(%rsi), %rdi
leaq 0x13a11(%rip), %rsi     # 0x1aa83
callq 0xb3a4
movq %rax, %r14
movq %rax, %rdi
callq 0xb51c
movq %rax, %rbx
movl $0x1, %edi
movl $0x68, %esi
callq 0x2260
movq %rax, %r12
movq %r14, %rdi
movq %rbx, (%rsp)
movq %rbx, %rsi
movq %rax, %rdx
callq 0xbb50
testl %eax, %eax
js 0x7120
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r15d, %r15d
movl %ebp, %eax
cmpq %rax, %r13
jne 0x70ea
movq %r14, %rbx
leal (,%rbp,2), %r14d
testl %ebp, %ebp
movl $0x10, %eax
cmovel %eax, %r14d
movslq %r14d, %rsi
shlq $0x3, %rsi
movq %r15, %rdi
callq 0x23d0
movq %rax, %r15
movl %r14d, %ebp
movq %rbx, %r14
movl $0x1, %edi
movl $0x68, %esi
callq 0x2260
movq %rax, (%r15,%r13,8)
incq %r13
movq %rax, %rdi
movq %r12, %rsi
callq 0xce3a
movq %r14, %rdi
movq (%rsp), %rsi
movq %r12, %rdx
callq 0xbb50
testl %eax, %eax
jns 0x70b5
jmp 0x7126
xorl %r15d, %r15d
xorl %r13d, %r13d
movq %r12, %rdi
callq 0xbc91
leaq 0x14070(%rip), %rdi     # 0x1b1a5
xorl %ebp, %ebp
movl %r13d, %esi
xorl %eax, %eax
callq 0x21b0
testl %r13d, %r13d
je 0x71e3
movq %r14, 0x8(%rsp)
movl %r13d, %r12d
leaq 0x10(%rsp), %rbp
leaq 0x139a5(%rip), %rbx     # 0x1ab03
xorl %r13d, %r13d
movq (%rsp), %rax
movq 0x30(%rax), %rax
movq (%r15,%r13,8), %rcx
movslq (%rcx), %rdx
movq (%rax,%rdx,8), %rsi
movl 0x4(%rcx), %edx
incl %edx
leaq 0x1397d(%rip), %rdi     # 0x1aafd
xorl %eax, %eax
callq 0x21b0
testq %r13, %r13
je 0x71b5
xorl %r14d, %r14d
movq (%r15,%r13,8), %rdi
movq (%r15,%r14,8), %rsi
movq %rbp, %rdx
callq 0x1586e
mulsd %xmm0, %xmm0
movq %rbx, %rdi
movb $0x1, %al
callq 0x21b0
incq %r14
cmpq %r14, %r13
jne 0x718f
leaq 0x13ade(%rip), %rdi     # 0x1ac9a
callq 0x20d0
incq %r13
cmpq %r12, %r13
jne 0x7161
xorl %ebx, %ebx
movq 0x8(%rsp), %r14
xorl %ebp, %ebp
movq (%r15,%rbx,8), %rdi
callq 0xbc91
incq %rbx
cmpq %rbx, %r12
jne 0x71d2
movq %r15, %rdi
callq 0x2060
movq (%rsp), %rdi
callq 0xb73e
movq %r14, %rdi
callq 0xb432
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2735
movl $0x1, %ebp
jmp 0x71fc
// File: /workspace/github_c_makefile_star2_O1/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 0x730b
movq %rsi, %r14
movl %edi, %ebx
leaq 0x8(%rsi), %r15
movq 0x8(%rsi), %r12
leaq 0x12009(%rip), %rsi     # 0x19247
movq %r12, %rdi
callq 0x2270
testl %eax, %eax
je 0x72af
leaq 0x13a21(%rip), %rsi     # 0x1ac72
movq %r12, %rdi
callq 0x2270
testl %eax, %eax
je 0x72c6
leaq 0x13c97(%rip), %rsi     # 0x1aefb
movq %r12, %rdi
callq 0x2270
testl %eax, %eax
je 0x72dd
leaq 0x1383c(%rip), %rsi     # 0x1aab3
movq %r12, %rdi
callq 0x2270
testl %eax, %eax
je 0x72f4
leaq 0x139ee(%rip), %rsi     # 0x1ac78
movq %r12, %rdi
callq 0x2270
testl %eax, %eax
jne 0x7321
addl $-0x2, %ebx
addq $0x10, %r14
movl %ebx, %edi
movq %r14, %rsi
callq 0x6a80
xorl %eax, %eax
jmp 0x7315
decl %ebx
movl %ebx, %edi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x31b6
decl %ebx
movl %ebx, %edi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x17884
decl %ebx
movl %ebx, %edi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x7050
decl %ebx
movl %ebx, %edi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6bb5
callq 0x276d
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x2751
jmp 0x7310
// File: /workspace/github_c_makefile_star2_O1/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 0xd5b9
movq %r15, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb3a4
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 0xe4e7
movq %rax, 0x18(%r14)
movq %r12, %rdi
movl $0x72, %esi
callq 0x21a0
testq %rax, %rax
je 0xd628
leaq 0xc407(%rip), %rsi      # 0x19a12
movq %r15, %rdi
callq 0x2270
testl %eax, %eax
je 0xd65e
leaq 0xd49a(%rip), %rsi      # 0x1aab8
movq %r15, %rdi
callq 0x22c0
jmp 0xd67b
movq %r12, %rdi
movl $0x77, %esi
callq 0x21a0
testq %rax, %rax
je 0xd6b9
leaq 0xc3d1(%rip), %rsi      # 0x19a12
movq %r15, %rdi
callq 0x2270
testl %eax, %eax
je 0xd6ab
leaq 0xbbf6(%rip), %rsi      # 0x1924a
movq %r15, %rdi
callq 0x22a0
jmp 0xd6b5
movq 0x12963(%rip), %rax     # 0x1ffc8
movq (%rax), %rdi
callq 0x2310
leaq 0xd444(%rip), %rsi      # 0x1aab8
movl %eax, %edi
callq 0x2140
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 0xd6b9
movq 0x1290e(%rip), %rax     # 0x1ffc0
movq (%rax), %rax
movq %rax, 0x8(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd95a
movq %rdi, %rbx
cmpl $0x0, (%rdi)
je 0xd965
movq 0x8(%rbx), %r14
cmpq $0x0, (%r14)
je 0xd926
movq 0x10(%r14), %r15
testq %r15, %r15
je 0xd91e
movq (%r15), %rdi
callq 0x2060
movq %r15, %rdi
callq 0x2060
movq (%r14), %rdi
callq 0x2050
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0xd934
callq 0x2170
movq 0x30(%r14), %rdi
callq 0x2060
movq 0x18(%r14), %rdi
callq 0xe524
movq %r14, %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2060
xorl %eax, %eax
jmp 0xd95f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xb432
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x0, (%rdi)
je 0xda60
movq 0x8(%rdi), %r15
cmpl $0x0, 0x10(%rbx)
jle 0xd9d8
movq 0x28(%rbx), %rdi
leaq 0xd82c(%rip), %rsi      # 0x1b1c7
callq 0x2550
testq %rax, %rax
jne 0xd9bf
movq 0x8(%r15), %rcx
leaq 0xd825(%rip), %rdi      # 0x1b1d5
movl $0x15, %esi
movl $0x1, %edx
callq 0x24b0
movq 0x28(%rbx), %rdi
movslq 0x10(%rbx), %rdx
decq %rdx
movq 0x8(%r15), %rcx
movl $0x1, %esi
callq 0x24b0
cmpl $0x0, 0x10(%rbx)
jne 0xd9f8
movq 0x8(%r15), %rcx
leaq 0xd7ec(%rip), %rdi      # 0x1b1d5
movl $0x15, %esi
movl $0x1, %edx
callq 0x24b0
movq 0x8(%r15), %rcx
leaq 0xd7e8(%rip), %rdi      # 0x1b1eb
movl $0x2d, %esi
movl $0x1, %edx
callq 0x24b0
cmpl $0x0, 0x4(%rbx)
jle 0xda44
leaq 0xd7fa(%rip), %r14      # 0x1b219
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 0xda22
movq 0x8(%r15), %rsi
movl $0xa, %edi
callq 0x2220
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb45c
// File: /workspace/github_c_makefile_star2_O1/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 0xba71
pushq %rbx
movq 0x8(%rdi), %rbx
leaq 0x20(%rbx), %rax
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0xbcf2
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_O1/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
testq %rax, %rax
jle 0xfc9d
movq 0x28(%rdi), %rcx
movq 0x30(%rdi), %rdx
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0xfc87
movq 0x28(%rdi), %rcx
mulsd (%rcx,%rax,8), %xmm0
movq 0x30(%rdi), %rcx
movsd 0x935e(%rip), %xmm1     # 0x19010
subsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%rax,8)
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/prob1.c
// Function: init_prior
static void init_prior(int type, double theta, int M, double *phi)
{
	int i;
	if (type == MC_PTYPE_COND2) {
		for (i = 0; i <= M; ++i)
			phi[i] = 2. * (i + 1) / (M + 1) / (M + 2);
	} else if (type == MC_PTYPE_FLAT) {
		for (i = 0; i <= M; ++i)
			phi[i] = 1. / (M + 1);
	} else {
		double sum;
		for (i = 0, sum = 0.; i < M; ++i)
			sum += (phi[i] = theta / (M - i));
		phi[M] = 1. - sum;
	}
}

// Assembly:
cmpl $0x2, %edi
je 0xfd55
cmpl $0x3, %edi
jne 0xfd9b
testl %esi, %esi
js 0xfd54
incl %esi
cvtsi2sd %esi, %xmm1
movsd 0x92cf(%rip), %xmm0     # 0x19010
divsd %xmm1, %xmm0
xorl %eax, %eax
movsd %xmm0, (%rdx,%rax,8)
incq %rax
cmpq %rax, %rsi
jne 0xfd47
retq
testl %esi, %esi
js 0xfd54
leal 0x1(%rsi), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leal 0x2(%rsi), %eax
cvtsi2sd %eax, %xmm1
movl %esi, %eax
leaq 0x2(,%rax,2), %rax
xorl %ecx, %ecx
leaq 0x2(%rcx), %rsi
movl %esi, %edi
xorps %xmm2, %xmm2
cvtsi2sd %rdi, %xmm2
divsd %xmm0, %xmm2
divsd %xmm1, %xmm2
movsd %xmm2, (%rdx,%rcx,4)
movq %rsi, %rcx
cmpq %rsi, %rax
jne 0xfd76
jmp 0xfd54
testl %esi, %esi
jle 0xfdca
movl %esi, %eax
xorpd %xmm1, %xmm1
movq %rdx, %rcx
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
movapd %xmm0, %xmm3
divsd %xmm2, %xmm3
movsd %xmm3, (%rcx)
addsd %xmm3, %xmm1
addq $0x8, %rcx
decq %rax
jne 0xfda8
jmp 0xfdce
xorpd %xmm1, %xmm1
movsd 0x923a(%rip), %xmm0     # 0x19010
subsd %xmm1, %xmm0
movslq %esi, %rax
movsd %xmm0, (%rdx,%rax,8)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x10555
movl (%rdi), %eax
cmpl %esi, %eax
jle 0x10555
addl %eax, %eax
cmpl %eax, 0x4(%rdi)
jne 0x10559
movl %esi, 0x8(%rdi)
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
retq
callq 0x2a8c
jmp 0x10555
// File: /workspace/github_c_makefile_star2_O1/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 0x1064c
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x70(%rdi), %rdi
callq 0x2060
cmpq $0x0, 0x68(%rbx)
je 0x105c2
cmpl $0x0, 0x8(%rbx)
jle 0x105c2
cmpl $0x0, 0x8(%rbx)
js 0x105b9
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 0x1059c
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_O1/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 0x12c24
movslq %esi, %rdx
cmpb $0x2, (%rcx,%rdx)
jne 0x12c51
movsd 0x63e4(%rip), %xmm1     # 0x19010
subsd %xmm0, %xmm1
movapd %xmm0, %xmm2
addsd %xmm0, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm1
movsd %xmm1, (%rsp)
movsd %xmm2, 0x8(%rsp)
mulsd %xmm0, %xmm0
jmp 0x12c6b
movsd 0x63b7(%rip), %xmm1     # 0x19010
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 0x12c7b
movsd 0x6390(%rip), %xmm1     # 0x19030
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 0x12ca4
movsd 0x633c(%rip), %xmm2     # 0x19010
subsd %xmm1, %xmm2
movsd 0x8760(%rip), %xmm0     # 0x1b440
maxsd %xmm2, %xmm0
callq 0x2210
mulsd 0x6357(%rip), %xmm0     # 0x19048
addsd 0x630f(%rip), %xmm0     # 0x19008
cvttsd2si %xmm0, %ecx
cmpl $0x63, %ecx
movl $0x63, %eax
cmovll %ecx, %eax
shll $0x2, %eax
orl %ebx, %eax
addq $0x40, %rsp
popq %rbx
retq