LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/netutils.c
// Function: peer_new
peer_t* peer_new(sock_t sock, int listen)
{
	peer_t* peer = (peer_t*)malloc(sizeof(peer_t));
	if (!peer) {
		loge("alloc\n");
		return NULL;
	}

	if (peer_init(peer, sock, listen)) {
		free(peer);
		loge("peer_init() error\n");
		return NULL;
	}

	return peer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl $0x80, %edi
callq 0x22d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4f53
jmp 0x4f15
movb $0x0, %al
callq 0x2560
cmpl $0x3, (%rax)
jl 0x4f47
movl $0x3, %edi
leaq 0x51fb(%rip), %rsi      # 0xa128
leaq 0x54fe(%rip), %rdx      # 0xa432
movl $0x30d, %ecx            # imm = 0x30D
leaq 0x54b9(%rip), %r8       # 0xa3f9
movb $0x0, %al
callq 0x2640
jmp 0x4f49
movq $0x0, -0x8(%rbp)
jmp 0x4fb6
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x4fc0
cmpl $0x0, %eax
je 0x4fae
movq -0x18(%rbp), %rdi
callq 0x2290
movb $0x0, %al
callq 0x2560
cmpl $0x3, (%rax)
jl 0x4fa2
movl $0x3, %edi
leaq 0x51a0(%rip), %rsi      # 0xa128
leaq 0x54a3(%rip), %rdx      # 0xa432
movl $0x313, %ecx            # imm = 0x313
leaq 0x54a0(%rip), %r8       # 0xa43b
movb $0x0, %al
callq 0x2640
jmp 0x4fa4
movq $0x0, -0x8(%rbp)
jmp 0x4fb6
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/netutils.c
// Function: peer_init
int peer_init(peer_t* peer, sock_t sock, int listen)
{
	memset(peer, 0, sizeof(peer_t));

	if (conn_init(&peer->conn, sock)) {
		loge("conn_init() error\n");
		return -1;
	}

	dllist_init(&peer->reqs);

	peer->listen = listen;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x2120
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x4d70
cmpl $0x0, %eax
je 0x5032
jmp 0x4ff5
movb $0x0, %al
callq 0x2560
cmpl $0x3, (%rax)
jl 0x5027
movl $0x3, %edi
leaq 0x511b(%rip), %rsi      # 0xa128
leaq 0x543a(%rip), %rdx      # 0xa44e
movl $0x31f, %ecx            # imm = 0x31F
leaq 0x53e0(%rip), %r8       # 0xa400
movb $0x0, %al
callq 0x2640
jmp 0x5029
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5065
jmp 0x5034
movq -0x10(%rbp), %rcx
addq $0x70, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rcx
addq $0x70, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x78(%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x68(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_free
void stream_free(stream_t *stream)
{
	if (stream != NULL) {
		free(stream->array);
		stream->array = NULL;
		stream->size = stream->pos = stream->cap = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x518b
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2290
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_seek
int stream_seek(stream_t *stream, int offset, int whence)
{
	switch (whence) {
	case SEEK_CUR:
		offset += stream->pos;
		break;
	case SEEK_END:
		offset = stream->size - offset;
		break;
	case SEEK_SET:
	default:
		break;
	}
	if (offset < 0 || offset > stream->size)
		return -1;
	stream->pos = offset;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0x51ec
jmp 0x51ba
movl -0x1c(%rbp), %eax
subl $0x1, %eax
je 0x51ce
jmp 0x51c4
movl -0x1c(%rbp), %eax
subl $0x2, %eax
je 0x51dd
jmp 0x51ee
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x51f0
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
subl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x51f0
jmp 0x51ee
jmp 0x51f0
cmpl $0x0, -0x14(%rbp)
jl 0x5202
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x520b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x521c
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_shrink
int stream_shrink(stream_t *stream)
{
	char *newarray;
	int rsize = stream_rsize(stream);
	if (rsize == 0)
	{
		free(stream->array);
		memset(stream, 0, sizeof(stream_t));
		return 0;
	}
	
	if (rsize == stream->cap)
		return 0;

	if (stream->pos == 0) {
		newarray = realloc(stream->array, rsize);
		if (newarray == NULL)
			return -1;
		stream->array = newarray;
		stream->cap = rsize;
		return 0;
	}

	newarray = (char*)malloc(rsize);
	if (newarray == NULL)
		return -1;
	memcpy(newarray, stream->array + stream->pos, rsize);
	free(stream->array);
	stream->array = newarray;
	stream->cap = rsize;
	stream->size = rsize;
	stream->pos = 0;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x527b
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2290
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x2120
movl $0x0, -0x4(%rbp)
jmp 0x535b
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jne 0x5293
movl $0x0, -0x4(%rbp)
jmp 0x535b
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x52e2
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x2340
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x52c4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x535b
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x535b
movslq -0x1c(%rbp), %rdi
callq 0x22d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x52ff
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x535b
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rsi
movslq -0x1c(%rbp), %rdx
callq 0x21b0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2290
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_quake
int stream_quake(stream_t* stream)
{
	if (stream->pos > 0) {
		int size = stream_rsize(stream);
		if (size > 0) {
			memmove(stream->array, stream->array + stream->pos, size);
			stream->size = size;
			stream->pos = 0;
		}
		else {
			stream->size = 0;
			stream->pos = 0;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jle 0x53ee
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x53d6
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rsi
movslq -0xc(%rbp), %rdx
callq 0x2330
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xc(%rax)
jmp 0x53ec
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xc(%rax)
jmp 0x53ee
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_set_cap
int stream_set_cap(stream_t *stream, int cap)
{
	char *newarray;

	if (stream->cap == cap)
		return 0;

	if (stream->cap > cap && stream->cap <= (cap + cap * 4 / 10))
		return 0;

	newarray = realloc(stream->array, cap);
	if (newarray == NULL)
		return -1;
	stream->array = newarray;
	stream->cap = cap;
	if (stream->size > cap)
		stream->size = cap;
	if (stream->pos > cap)
		stream->pos = cap;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x5427
movl $0x0, -0x4(%rbp)
jmp 0x54ce
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0x14(%rbp), %eax
jle 0x5462
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %ecx
movl -0x14(%rbp), %eax
shll $0x2, %eax
movl $0xa, %esi
cltd
idivl %esi
movl %eax, %edx
movl -0x24(%rbp), %eax
addl %edx, %ecx
cmpl %ecx, %eax
jg 0x5462
movl $0x0, -0x4(%rbp)
jmp 0x54ce
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movslq -0x14(%rbp), %rsi
callq 0x2340
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x5486
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x54ce
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x14(%rbp), %eax
jle 0x54b1
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0x14(%rbp), %eax
jle 0x54c7
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_write
int stream_write(stream_t *stream, const char *s, int n)
{
	if (stream_rcap(stream) < n) {
		if (stream_set_cap(stream, stream->pos + align(n)))
			return -1;
	}
	memcpy(stream->array + stream->pos, s, n);
	stream->pos += n;
	stream->size += n;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0xc(%rcx), %eax
cmpl -0x1c(%rbp), %eax
jge 0x5531
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x1c(%rbp), %eax
orl $0x3, %eax
addl $0x1, %eax
addl %eax, %esi
callq 0x5400
cmpl $0x0, %eax
je 0x552f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5570
jmp 0x5531
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x21b0
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_writes
int stream_writes(stream_t* stream, const char* s, int n)
{
	if (stream_rcap(stream) < (n+1)) {
		if (stream_set_cap(stream, stream->pos + align(n+1)))
			return -1;
	}
	memcpy(stream->array + stream->pos, s, n);
	stream->pos += n;
	stream->size += n;
	stream->array[stream->pos] = '\0';
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0xc(%rcx), %eax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x55d9
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x1c(%rbp), %eax
addl $0x1, %eax
orl $0x3, %eax
addl $0x1, %eax
addl %eax, %esi
callq 0x5400
cmpl $0x0, %eax
je 0x55d7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x562b
jmp 0x55d9
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x21b0
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movb $0x0, (%rax,%rcx)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_writess
int stream_writess(stream_t *dst, stream_t *src, int n)
{
	if (stream_rsize(src) < n)
		n = src->size - src->pos;

	if (stream_rcap(dst) < n) {
		if (stream_set_cap(dst, dst->pos + align(n)))
			return -1;
	}

	memcpy(dst->array + dst->pos, src->array + src->pos, n);
	dst->pos += n;
	dst->size += n;
	src->pos += n;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0xc(%rcx), %eax
cmpl -0x1c(%rbp), %eax
jge 0x5677
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0xc(%rcx), %eax
cmpl -0x1c(%rbp), %eax
jge 0x56b5
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x1c(%rbp), %eax
orl $0x3, %eax
addl $0x1, %eax
addl %eax, %esi
callq 0x5400
cmpl $0x0, %eax
je 0x56b3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x570f
jmp 0x56b5
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rsi
movslq -0x1c(%rbp), %rdx
callq 0x21b0
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_read
int stream_read(stream_t *stream, char *dst, int n)
{
	if (stream_rsize(stream) < n)
		n = stream->size - stream->pos;
	memcpy(dst, stream->array + stream->pos, n);
	stream->pos += n;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0xc(%rcx), %eax
cmpl -0x14(%rbp), %eax
jge 0x5757
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rsi
movslq -0x14(%rbp), %rdx
callq 0x21b0
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_writei
int stream_writei(stream_t *stream, int v, int nb)
{
	int i;
	if (stream_rcap(stream) < nb) {
		if (stream_set_cap(stream, stream->pos + align(nb)))
			return -1;
	}
	for (i = 0;
		i < nb && stream->size < stream->cap;
		i++, stream->size++) {
		stream->array[stream->pos++] = ((v >> ((nb - i - 1) * 8)) & 0xFF);
	}
	return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0xc(%rcx), %eax
cmpl -0x18(%rbp), %eax
jge 0x57e3
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x18(%rbp), %eax
orl $0x3, %eax
addl $0x1, %eax
addl %eax, %esi
callq 0x5400
cmpl $0x0, %eax
je 0x57e1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5866
jmp 0x57e3
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
xorl %eax, %eax
cmpl -0x18(%rbp), %ecx
movb %al, -0x1d(%rbp)
jge 0x580b
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
setl %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0x5814
jmp 0x5860
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
subl -0x1c(%rbp), %ecx
subl $0x1, %ecx
shll $0x3, %ecx
sarl %cl, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rsi
movl 0xc(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0xc(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x57ea
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_writell
int stream_writell(stream_t *stream, long long v, int nb)
{
	int i;
	if (stream_rcap(stream) < nb) {
		if (stream_set_cap(stream, stream->pos + align(nb)))
			return -1;
	}
	for (i = 0;
		i < nb && stream->size < stream->cap;
		i++, stream->size++) {
		stream->array[stream->pos++] = (char)((v >> ((nb - i - 1) * 8)) & 0xFF);
	}
	return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0xc(%rcx), %eax
cmpl -0x1c(%rbp), %eax
jge 0x58c4
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x1c(%rbp), %eax
orl $0x3, %eax
addl $0x1, %eax
addl %eax, %esi
callq 0x5400
cmpl $0x0, %eax
je 0x58c2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x594c
jmp 0x58c4
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %ecx
xorl %eax, %eax
cmpl -0x1c(%rbp), %ecx
movb %al, -0x21(%rbp)
jge 0x58ec
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
setl %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x58f5
jmp 0x5946
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl -0x20(%rbp), %ecx
subl $0x1, %ecx
shll $0x3, %ecx
movl %ecx, %ecx
sarq %cl, %rax
andq $0xff, %rax
movb %al, %dl
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rsi
movl 0xc(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0xc(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x58cb
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_seti
int stream_seti(stream_t *stream, int position, int v, int nb)
{
	int i;
	for (i = 0;
		i < nb && position < stream->cap;
		i++, position++) {
		stream->array[position] = ((v >> ((nb - i - 1) * 8)) & 0xFF);
	}
	return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x19(%rbp)
jge 0x5995
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
setl %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x599e
jmp 0x59d8
movl -0x10(%rbp), %eax
movl -0x14(%rbp), %ecx
subl -0x18(%rbp), %ecx
subl $0x1, %ecx
shll $0x3, %ecx
sarl %cl, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5978
movl -0x18(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_geti
int stream_geti(stream_t* stream, int position, int nb)
{
	int i, v = 0;
	for (i = 0; i < nb; i++, position++) {
		v <<= 8;
		v |= (stream->array[position] & 0xFF);
	}
	return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x5a3b
movl -0x18(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0xff, %eax
orl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x59fc
movl -0x18(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_vwritef
int stream_vwritef(stream_t *stream, const char *fmt, va_list args)
{
	int cnt, sz;
	char *buf;
	va_list ap_try;

	sz = 128;
	buf = (char*)alloca(sz);
	if (!buf) return -1;
try_print:
	va_copy(ap_try, args);
	cnt = vsnprintf(buf, sz, fmt, ap_try);
	va_end(ap_try);
	if (cnt >= sz) {
		sz *= 2;
		buf = (char*)alloca(sz);
		if (!buf) return -1;
		goto try_print;
	}
	if (cnt < 0)
		return -1;

	if (stream_writes(stream, buf, cnt) != cnt) {
		return -1;
	}

	return cnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x80, -0x28(%rbp)
movslq -0x28(%rbp), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x5a87
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5b29
jmp 0x5a89
leaq -0x50(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq -0x30(%rbp), %rdi
movslq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0x2140
movl %eax, -0x24(%rbp)
leaq -0x50(%rbp), %rax
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jl 0x5af6
movl -0x28(%rbp), %eax
addl %eax, %eax
movl %eax, -0x28(%rbp)
movslq -0x28(%rbp), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x5af4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5b29
jmp 0x5a89
cmpl $0x0, -0x24(%rbp)
jge 0x5b05
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5b29
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x5580
cmpl -0x24(%rbp), %eax
je 0x5b23
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5b29
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_append
int stream_append(stream_t* stream, const char* s, int n)
{
	int pos = stream->pos;
	int nwrite;

	stream->pos = stream->size;
	nwrite = stream_write(stream, s, n);
	stream->pos = pos;

	return nwrite;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x54e0
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_appends
int stream_appends(stream_t* stream, const char* s, int n)
{
	int pos = stream->pos;
	int nwrite;

	stream->pos = stream->size;
	nwrite = stream_writes(stream, s, n);
	stream->pos = pos;

	return nwrite;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x5580
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: stream_readi
int stream_readi(stream_t *stream, int nb)
{
	int v = 0;
	int i;
	for (i = 0;
		i < nb && stream->pos < stream->size;
		i++, stream->pos++) {
		v <<= 8;
		v |= (stream->array[stream->pos] & 0xff);
	}
	return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %ecx
xorl %eax, %eax
cmpl -0xc(%rbp), %ecx
movb %al, -0x15(%rbp)
jge 0x5e7a
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
setl %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x5e83
jmp 0x5ec2
movl -0x10(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movsbl (%rax,%rcx), %eax
andl $0xff, %eax
orl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x5e59
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/stream.c
// Function: get_ch
static int get_ch(char *p, int i)
{
	int ch = p[i];
	ch &= 0xFF;
	if (ch == 32) ch = '.';
	else if (ch < 32 || ch > 126) ch = '?';
	return ch;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
andl $0xff, %eax
movl %eax, -0x10(%rbp)
cmpl $0x20, -0x10(%rbp)
jne 0x6a44
movl $0x2e, -0x10(%rbp)
jmp 0x6a59
cmpl $0x20, -0x10(%rbp)
jl 0x6a50
cmpl $0x7e, -0x10(%rbp)
jle 0x6a57
movl $0x3f, -0x10(%rbp)
jmp 0x6a59
movl -0x10(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/utils.c
// Function: ltrim
char* ltrim(char* s)
{
	char* p = s;
	while (p && (*p) && isspace((int)(*((unsigned char*)p))))
		p++;
	return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x11(%rbp)
je 0x6ae5
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0x6ae5
callq 0x2240
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x6aee
jmp 0x6afc
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x6aa4
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/utils.c
// Function: rtrim
char* rtrim(char* s)
{
	size_t len;
	char* p;

	len = strlen(s);
	p = s + len - 1;

	while (p >= s && isspace((int)(*((unsigned char*)p)))) (*(p--)) = '\0';

	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x20f0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x19(%rbp)
jb 0x6b6c
callq 0x2240
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x6b75
jmp 0x6b89
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x0, (%rax)
jmp 0x6b39
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/utils.c
// Function: trim_quote
char* trim_quote(char* s)
{
	char* start, * end;
	size_t len;

	len = strlen(s);
	start = s;
	end = s + len - 1;

	while ((*start) && ((*start) == '\'' || (*start) == '"'))
		start++;

	while (end >= start && ((*end) == '\'' || (*end) == '"')) (*(end--)) = '\0';

	return start;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x20f0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x21(%rbp)
je 0x6c09
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x27, %ecx
movb %al, -0x22(%rbp)
je 0x6c03
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
sete %al
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x6c12
jmp 0x6c20
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x6bd1
jmp 0x6c22
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x23(%rbp)
jb 0x6c58
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x27, %ecx
movb %al, -0x24(%rbp)
je 0x6c52
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
sete %al
movb %al, -0x24(%rbp)
movb -0x24(%rbp), %al
movb %al, -0x23(%rbp)
movb -0x23(%rbp), %al
testb $0x1, %al
jne 0x6c61
jmp 0x6c75
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x0, (%rax)
jmp 0x6c22
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/utils.c
// Function: urldecode
char *urldecode(char *s)
{
	unsigned char *src  = (unsigned char *)s,
				  *dest = (unsigned char *)s;
	while (*src) {
		if (*src == '%') {
			int a = (int)src[1] & 0xFF;
			int b = a ? ((int)src[2] & 0xFF) : 0;
			int ch = b ? hex2dec(src + 1) : -1;
			if (ch == -1) {
				*dest++ = *src++;
			}
			else {
				*dest++ = (char)ch;
				src += 3;
			}
		}
		else if (*src == '+') {
			*dest++ = ' ';
			src++;
		}
		else {
			*dest++ = *src++;
		}
	}
	*dest = '\0';
	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x6db9
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x25, %eax
jne 0x6d64
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
andl $0xff, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x6ce1
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
andl $0xff, %eax
movl %eax, -0x28(%rbp)
jmp 0x6ce8
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x6ce8
movl -0x28(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x6d06
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
callq 0x6dd0
movl %eax, -0x2c(%rbp)
jmp 0x6d10
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x2c(%rbp)
jmp 0x6d10
movl -0x2c(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
jne 0x6d40
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0x6d62
movl -0x24(%rbp), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
jmp 0x6db4
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x6d90
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x20, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x6db2
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0x6db4
jmp 0x6c9c
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/utils.c
// Function: hex2dec
static inline int hex2dec(const unsigned char *s)
{
	int h = ch2dec(s[0]);
	int l = ch2dec(s[1]);
	/* a or b is not a hex char */
	if (h == -1 || l == -1) {
		return -1;
	}
	else {
		return (h << 4) | l;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %edi
callq 0x7160
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %edi
callq 0x7160
movl %eax, -0x18(%rbp)
cmpl $-0x1, -0x14(%rbp)
je 0x6e07
cmpl $-0x1, -0x18(%rbp)
jne 0x6e10
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6e1c
movl -0x14(%rbp), %eax
shll $0x4, %eax
orl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/utils.c
// Function: dec2ch
static inline int dec2ch(int d)
{
	if (d < 0xA) {
		return d + '0';
	}
	else if (d <= 0xF) {
		return 'A' + d - 0xA;
	}
	else {
		return -1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0xa, -0x8(%rbp)
jge 0x7018
movl -0x8(%rbp), %eax
addl $0x30, %eax
movl %eax, -0x4(%rbp)
jmp 0x7033
cmpl $0xf, -0x8(%rbp)
jg 0x702c
movl -0x8(%rbp), %eax
addl $0x41, %eax
subl $0xa, %eax
movl %eax, -0x4(%rbp)
jmp 0x7033
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/utils.c
// Function: parse_querystring
int parse_querystring(const char *query,
	int (*callback)(char *name, char *value, void *state),
	void *state)
{
	char *cpy, *saveptr = NULL;
	char *p;
	char *v;
	int r;

	if (!query || !*query) return 0;

	cpy = strdup(query);

	for (p = strtok_r(cpy, "&", &saveptr);
		p && *p;
		p = strtok_r(NULL, "&", &saveptr)) {

		v = strchr(p, '=');
		if (!v) continue;

		*v = '\0';
		v++;

		urldecode(v);

		if ((r = callback(p, v, state)) != 0) {
			return r;
		}
	}

	free(cpy);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x706c
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x7078
movl $0x0, -0x4(%rbp)
jmp 0x714a
movq -0x10(%rbp), %rdi
callq 0x2370
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x3629(%rip), %rsi      # 0xa6b9
leaq -0x30(%rbp), %rdx
callq 0x2360
movq %rax, -0x38(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x38(%rbp)
movb %al, -0x45(%rbp)
je 0x70b9
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0x70c2
jmp 0x713a
movq -0x38(%rbp), %rdi
movl $0x3d, %esi
callq 0x20e0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x70dd
jmp 0x711d
movq -0x40(%rbp), %rax
movb $0x0, (%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x6c80
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
je 0x711b
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x714a
jmp 0x711d
xorl %eax, %eax
movl %eax, %edi
leaq 0x3591(%rip), %rsi      # 0xa6b9
leaq -0x30(%rbp), %rdx
callq 0x2360
movq %rax, -0x38(%rbp)
jmp 0x709d
movq -0x28(%rbp), %rdi
callq 0x2290
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/utils.c
// Function: ch2dec
static inline int ch2dec(int ch)
{
	if (ch >= '0' && ch <= '9')
		ch -= '0';
	else if (ch >= 'a' && ch <= 'f')
		ch -= 'a' - 10;
	else if (ch >= 'A' && ch <= 'F')
		ch -= 'A' - 10;
	else {
		ch = -1;
	}
	return ch;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
cmpl $0x30, -0x4(%rbp)
jl 0x717e
cmpl $0x39, -0x4(%rbp)
jg 0x717e
movl -0x4(%rbp), %eax
subl $0x30, %eax
movl %eax, -0x4(%rbp)
jmp 0x71b7
cmpl $0x61, -0x4(%rbp)
jl 0x7195
cmpl $0x66, -0x4(%rbp)
jg 0x7195
movl -0x4(%rbp), %eax
subl $0x57, %eax
movl %eax, -0x4(%rbp)
jmp 0x71b5
cmpl $0x41, -0x4(%rbp)
jl 0x71ac
cmpl $0x46, -0x4(%rbp)
jg 0x71ac
movl -0x4(%rbp), %eax
subl $0x37, %eax
movl %eax, -0x4(%rbp)
jmp 0x71b3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x71b5
jmp 0x71b7
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/mleak.c
// Function: mleak_malloc
void *mleak_malloc(size_t size, const char *filename, int line)
{
	struct mleak_mem_t *ent;
	time_t now;
	ent = (struct mleak_mem_t *) malloc(sizeof(struct mleak_mem_t) + size);
	ent->ptr = (void *)(((char *)ent) + sizeof(struct mleak_mem_t));
	ent->size = size;
	ent->filename = filename;
	ent->line = line;
	now = time(NULL);
	strftime(ent->time, sizeof(ent->time), "%Y-%m-%d %H:%M:%S", localtime(&now));
	append_mem_ent(ent);
	return ent->ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
callq 0x22d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
addq $0x50, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x28(%rax)
xorl %eax, %eax
movl %eax, %edi
callq 0x21f0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x2c, %rax
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x2170
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl $0x20, %esi
leaq 0x2e2e(%rip), %rdx      # 0xa079
callq 0x21a0
movq -0x20(%rbp), %rdi
callq 0x7270
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/mleak.c
// Function: append_mem_ent
static inline void append_mem_ent(struct mleak_mem_t *mem)
{
	if (!_mem) {
		_mem = mem;
		mem->next = mem;
		mem->prev = mem;
	}
	else {
		mem->next = _mem;
		mem->prev = _mem->prev;
		_mem->prev->next = mem;
		_mem->prev = mem;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
cmpq $0x0, 0x7110(%rip)      # 0xe390
jne 0x72a6
movq -0x8(%rbp), %rax
movq %rax, 0x7103(%rip)      # 0xe390
movq -0x8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x72e6
movq 0x70e3(%rip), %rcx      # 0xe390
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x70d4(%rip), %rax      # 0xe390
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rcx
movq 0x70bf(%rip), %rax      # 0xe390
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rcx
movq 0x70ad(%rip), %rax      # 0xe390
movq %rcx, (%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/mleak.c
// Function: mleak_free
void mleak_free(void *ptr)
{
    if (!ptr) return;
	struct mleak_mem_t *ent;
	ent = (struct mleak_mem_t *)(((char *)ptr) - sizeof(struct mleak_mem_t));
	remove_mem_ent(ent);
	free(ent);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x7335
jmp 0x7353
movq -0x8(%rbp), %rax
addq $-0x50, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7360
movq -0x10(%rbp), %rdi
callq 0x2290
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/mleak.c
// Function: remove_mem_ent
static inline void remove_mem_ent(struct mleak_mem_t *mem)
{
	if (mem->next == mem) {
		_mem = 0;
		return;
	}
	else {
		if (mem == _mem) _mem = _mem->next;
		mem->prev->next = mem->next;
		mem->next->prev = mem->prev;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x7383
movq $0x0, 0x700f(%rip) # 0xe390
jmp 0x73c7
movq -0x8(%rbp), %rax
cmpq 0x7002(%rip), %rax      # 0xe390
jne 0x73a2
movq 0x6ff9(%rip), %rax      # 0xe390
movq 0x8(%rax), %rax
movq %rax, 0x6fee(%rip)      # 0xe390
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/mleak.c
// Function: mleak_realloc
void* mleak_realloc(void* ptr, size_t size, const char* filename, int line)
{
	void* newptr = mleak_malloc(size, filename, line);
	if (!newptr) return NULL;
	if (ptr) {
		struct mleak_mem_t* ent;
		ent = (struct mleak_mem_t*)(((char*)ptr) - sizeof(struct mleak_mem_t));
		memcpy(newptr, ptr, MIN(size, ent->size));
		mleak_free(ptr);
	}
	return newptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x71c0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x740c
movq $0x0, -0x8(%rbp)
jmp 0x7475
cmpq $0x0, -0x10(%rbp)
je 0x746d
movq -0x10(%rbp), %rax
addq $-0x50, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x7447
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x7453
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rdx
callq 0x21b0
movq -0x10(%rbp), %rdi
callq 0x7320
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/mleak.c
// Function: mleak_strdup
void* mleak_strdup(const char *s, const char* filename, int line)
{
	int len = strlen(s);
	void* newptr = mleak_malloc(len + 1, filename, line);
	if (!newptr) return NULL;
	memcpy(newptr, s, len + 1);
	return newptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20f0
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x71c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x74c9
movq $0x0, -0x8(%rbp)
jmp 0x74e7
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x20(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdx
callq 0x21b0
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/mleak.c
// Function: mleak_print_leak
void mleak_print_leak()
{
	struct mleak_mem_t *ent, *p;
	if (!_mem) return;
	ent = _mem;
	do {
		_print(ent->ptr, ent->filename, ent->line, ent->time);
		ent = ent->next;
	} while(ent != _mem);
	ent = _mem;
	do {
		p = ent;
		ent = ent->next;
		free(p);
	} while(ent != _mem);
	_mem = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpq $0x0, 0x6e40(%rip)      # 0xe390
jne 0x7557
jmp 0x75e3
movq 0x6e32(%rip), %rax      # 0xe390
movq %rax, -0x8(%rbp)
movq 0x6d3f(%rip), %rax      # 0xe2a8
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rsi
movq -0x8(%rbp), %rcx
movl 0x28(%rcx), %edx
movq -0x8(%rbp), %rcx
addq $0x2c, %rcx
callq *%rax
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq 0x6def(%rip), %rax      # 0xe390
jne 0x7562
movq 0x6de6(%rip), %rax      # 0xe390
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2290
movq -0x8(%rbp), %rax
cmpq 0x6dba(%rip), %rax      # 0xe390
jne 0x75ae
movq $0x0, 0x6dad(%rip) # 0xe390
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/dohclient-cache.c
// Function: is_digitstr
static int is_digitstr(const char *s)
{
	const char *p = s;
	while (*p) {
		if (!isdigit(*p))
			return FALSE;
		p++;
	}
	return TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x8284
callq 0x2240
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x8276
movl $0x0, -0x4(%rbp)
jmp 0x828b
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x8244
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/version.h
// Function: git_version
static inline const char *git_version()
{
	const char *v = GIT_VERSION;
	if (v && *v) {
		v = "-" GIT_VERSION;
	}
	else {
		v = "";
	}
	return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1bd6(%rip), %rax      # 0xaf21
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x936f
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x936f
leaq 0x1bb7(%rip), %rax      # 0xaf20
movq %rax, -0x8(%rbp)
jmp 0x937a
leaq 0x1d0d(%rip), %rax      # 0xb083
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/chbarts[P]aa-tree/aa-test1.c
// Function: main
int main(int argc, char *argv[])
{
    aa *tree;
    FILE *fin;
    int i;

    if ((tree = aa_new(comparator)) == NULL) {
        fprintf(stderr, "aa_new error\n");
        exit(EXIT_FAILURE);
    }

    if (argc == 1) {
        dofile("stdin", stdin, tree);
    } else {
        for (i = 1; i < argc; i++) {
            if ((fin = fopen(argv[i], "rb")) == NULL) {
                handle_ferr(argv[i], "aa-test1");
                continue;
            }

            dofile(argv[i], fin, tree);

            if (fclose(fin) == EOF) {
                handle_ferr(argv[i], "aa-test1");
            }
        }
    }

    aa_print(tree, stdout, print);

    cleanup(tree);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x123(%rip), %rdi       # 0x2550
callq 0x13e0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x245e
movq 0x2bb5(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xc62(%rip), %rsi       # 0x30af
movb $0x0, %al
callq 0x1090
movl $0x1, %edi
callq 0x10f0
cmpl $0x1, -0x8(%rbp)
jne 0x2483
movq 0x2b6d(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0xc44(%rip), %rdi       # 0x30bd
callq 0x25b0
jmp 0x2523
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x2521
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc1a(%rip), %rsi       # 0x30c3
callq 0x10d0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x24d2
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xbfb(%rip), %rsi       # 0x30c6
callq 0x1390
jmp 0x2513
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x25b0
movq -0x20(%rbp), %rdi
callq 0x1050
cmpl $-0x1, %eax
jne 0x2511
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xbba(%rip), %rsi       # 0x30c6
callq 0x1390
jmp 0x2513
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x248a
jmp 0x2523
movq -0x18(%rbp), %rdi
movq 0x2aa2(%rip), %rax      # 0x4fd0
movq (%rax), %rsi
leaq 0x148(%rip), %rdx       # 0x2680
callq 0x2020
movq -0x18(%rbp), %rdi
callq 0x26c0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nop