// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/chnroute.c
// Function: chnroute_parse
int chnroute_parse(chnroute_ctx ctx, const char* filename)
{
	char* s, * p, *saveptr = NULL;
	int r;
	chnroute_list_t list;

	memset(&list, 0, sizeof(chnroute_list_t));

	dllist_init(&list.items);

	s = strdup(filename);

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

		if (parse_chnroute_file(&list, p)) {
			free_chnroute_list(&list.items);
			free(s);
			return -1;
		}
	}

	free(s);

	r = feedback_net_list(ctx, &list);

	free_chnroute_list(&list.items);

	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rdi, 0x38(%rsp)
xorl %eax, %eax
leaq 0x48(%rsp), %rbx
movq %rax, (%rbx)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbp
movaps %xmm0, (%rbp)
movq %rax, 0x10(%rbp)
movq %rbp, (%rbp)
movq %rbp, 0x8(%rbp)
movq %rsi, %rdi
callq 0x3610
leaq 0x10176(%rip), %rsi     # 0x22898
movq %rax, 0x28(%rsp)
movq %rax, %rdi
movq %rbx, %rdx
callq 0x3600
testq %rax, %rax
je 0x12b69
movq %rax, %rbx
leaq 0x60(%rsp), %r15
cmpb $0x0, (%rbx)
je 0x12b69
movq %rbx, %rdi
leaq 0x10085(%rip), %rsi     # 0x227db
callq 0x3430
testq %rax, %rax
je 0x12cd8
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3400
testl %eax, %eax
jne 0x12d0f
movq %rbx, 0x40(%rsp)
movq %r15, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r13, %rdx
callq 0x3580
testq %rax, %rax
je 0x12b42
movq %rax, %r14
xorl %r12d, %r12d
movq %r13, (%rsp)
incl %r12d
movl $0x6, %ebx
cmpb $0x23, (%r14)
je 0x12b19
movq %r14, %rdi
movl $0xd, %esi
callq 0x3150
testq %rax, %rax
je 0x127ca
movb $0x0, (%rax)
movq %r14, %rdi
movl $0xa, %esi
callq 0x3150
testq %rax, %rax
je 0x127df
movb $0x0, (%rax)
cmpb $0x0, (%r14)
je 0x12b19
movq %r12, 0x8(%rsp)
movl $0x38, %edi
callq 0x34b0
testq %rax, %rax
je 0x12853
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x30(%rax)
movq %r14, %rdi
movl $0x3a, %esi
callq 0x3150
leaq 0x14(%r12), %r13
movq %r14, %rdi
movl $0x2f, %esi
testq %rax, %rax
je 0x1288e
callq 0x3150
movq %rax, %rbx
testq %rax, %rax
je 0x128bb
movb $0x0, (%rbx)
leaq 0x1(%rbx), %rdi
callq 0x3570
movl %eax, %r15d
jmp 0x128c1
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0x12ad6
movl $0x3, %edi
leaq 0x10ff7(%rip), %rsi     # 0x23866
leaq 0x10fff(%rip), %rdx     # 0x23875
movl $0x121, %ecx            # imm = 0x121
leaq 0x11020(%rip), %r8      # 0x238a2
xorl %eax, %eax
callq 0x17d92
jmp 0x12ad6
callq 0x3150
movq %rax, %rbx
testq %rax, %rax
je 0x129e9
movb $0x0, (%rbx)
leaq 0x1(%rbx), %rdi
callq 0x3570
negb %al
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %edx
jmp 0x129ee
movl $0x80, %r15d
movl $0xa, %edi
movq %r14, %rsi
leaq 0x50(%rsp), %rdx
callq 0x3630
testl %eax, %eax
je 0x1297c
movups 0x50(%rsp), %xmm0
movups %xmm0, (%r13)
xorl %eax, %eax
movl (%r13,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%r13,%rax,4)
incq %rax
cmpq $0x4, %rax
jne 0x128e7
movq %r12, %rsi
addq $0x24, %rsi
leal 0x1f(%r15), %r13d
testl %r15d, %r15d
cmovnsl %r15d, %r13d
xorps %xmm0, %xmm0
movups %xmm0, 0x24(%r12)
movl %r13d, %ebp
sarl $0x5, %ebp
cmpl $0x20, %r15d
jl 0x12947
leal -0x1(%rbp), %eax
leaq 0x4(,%rax,4), %rdx
movq %rsi, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movl $0xff, %esi
callq 0x31e0
movq 0x30(%rsp), %rsi
andl $-0x20, %r13d
subl %r13d, %r15d
testl %r15d, %r15d
jle 0x12966
negb %r15b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %r15d, %ecx
shll %cl, %eax
movslq %ebp, %rcx
movl %eax, (%rsi,%rcx,4)
xorl %r15d, %r15d
testq %rbx, %rbx
movq (%rsp), %r13
je 0x12975
movb $0x2f, (%rbx)
leaq 0x10(%rsp), %rbp
jmp 0x129db
testq %rbx, %rbx
je 0x12984
movb $0x2f, (%rbx)
xorl %eax, %eax
callq 0x17d59
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
movq (%rsp), %r13
jl 0x129db
callq 0x3040
movl (%rax), %ebx
movl %ebx, %edi
callq 0x3140
movq %rax, %r10
movl $0x3, %edi
leaq 0x10eaf(%rip), %rsi     # 0x23866
leaq 0x10f06(%rip), %rdx     # 0x238c4
movl $0xdf, %ecx
leaq 0x10f09(%rip), %r8      # 0x238d3
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq %rbx
callq 0x17d92
addq $0x10, %rsp
movl $0x1, 0x10(%r12)
jmp 0x12a83
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %edx, 0x18(%r12)
movl $0x2, %edi
movq %r14, %rsi
leaq 0x50(%rsp), %rdx
callq 0x3630
testl %eax, %eax
je 0x12a24
xorl %r15d, %r15d
movl 0x50(%rsp), %eax
bswapl %eax
movl %eax, (%r13)
testq %rbx, %rbx
je 0x12a1e
movb $0x2f, (%rbx)
movq (%rsp), %r13
jmp 0x12a83
testq %rbx, %rbx
je 0x12a2c
movb $0x2f, (%rbx)
xorl %eax, %eax
callq 0x17d59
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
movq (%rsp), %r13
jl 0x12a83
callq 0x3040
movl (%rax), %ebx
movl %ebx, %edi
callq 0x3140
movq %rax, %r10
movl $0x3, %edi
leaq 0x10e07(%rip), %rsi     # 0x23866
leaq 0x10e8c(%rip), %rdx     # 0x238f2
movl $0xc6, %ecx
leaq 0x10e8e(%rip), %r8      # 0x23900
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq %rbx
callq 0x17d92
addq $0x10, %rsp
testl %r15d, %r15d
je 0x12ae5
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
leaq 0x60(%rsp), %r15
jl 0x12ace
movl $0x3, %edi
leaq 0x10dc1(%rip), %rsi     # 0x23866
leaq 0x10dc9(%rip), %rdx     # 0x23875
movl $0x131, %ecx            # imm = 0x131
leaq 0x10df2(%rip), %r8      # 0x238aa
movq %r14, %r9
xorl %eax, %eax
pushq 0x8(%rsp)
pushq 0x48(%rsp)
callq 0x17d92
addq $0x10, %rsp
movq %r12, %rdi
callq 0x3450
movq %r13, %rdi
callq 0x3380
movl $0x1, %ebx
jmp 0x12b14
movq %rbp, (%r12)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%r12)
movq %r12, (%rax)
movq %r12, 0x18(%rsp)
cmpl $0x0, 0x10(%r12)
leaq 0x60(%rsp), %r15
je 0x12b0e
incl 0x24(%rsp)
jmp 0x12b12
incl 0x20(%rsp)
xorl %ebx, %ebx
movq 0x8(%rsp), %r12
cmpl $0x6, %ebx
je 0x12b26
testl %ebx, %ebx
jne 0x12d49
movq %r15, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r13, %rdx
callq 0x3580
movq %rax, %r14
testq %rax, %rax
jne 0x127a3
movq %r13, %rdi
callq 0x3380
xorl %edi, %edi
leaq 0xfd45(%rip), %rsi      # 0x22898
leaq 0x48(%rsp), %rdx
callq 0x3600
movq %rax, %rbx
testq %rax, %rax
jne 0x12743
movq 0x28(%rsp), %rdi
callq 0x3450
movq 0x38(%rsp), %rbx
xorl %eax, %eax
movl %eax, (%rbx)
movl %eax, 0x10(%rbx)
movslq 0x20(%rsp), %rdi
movl $0x8, %esi
callq 0x3240
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x12c3c
movslq 0x24(%rsp), %rdi
movl $0x20, %esi
callq 0x3240
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x12c75
movq 0x10(%rsp), %rax
cmpq %rbp, %rax
je 0x12c07
leaq 0x14(%rax), %rcx
cmpl $0x0, 0x10(%rax)
movq (%rax), %rax
je 0x12bf2
movq 0x18(%rbx), %rdx
movslq 0x10(%rbx), %rsi
leal 0x1(%rsi), %edi
movl %edi, 0x10(%rbx)
shlq $0x5, %rsi
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rdx,%rsi)
movups %xmm0, (%rdx,%rsi)
jmp 0x12bbc
movq 0x8(%rbx), %rdx
movslq (%rbx), %rsi
leal 0x1(%rsi), %edi
movl %edi, (%rbx)
movq (%rcx), %rcx
movq %rcx, (%rdx,%rsi,8)
jmp 0x12bbc
movq 0x8(%rbx), %rdi
movslq (%rbx), %rsi
leaq -0x669(%rip), %rcx      # 0x125ac
movl $0x8, %edx
callq 0x3640
movq 0x18(%rbx), %rdi
movslq 0x10(%rbx), %rsi
leaq -0x5a9(%rip), %rcx      # 0x12685
movl $0x20, %edx
callq 0x3640
xorl %ebx, %ebx
jmp 0x12cb5
xorl %eax, %eax
callq 0x17d59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x12cb5
leaq 0x10c12(%rip), %rsi     # 0x23866
leaq 0x10cc5(%rip), %rdx     # 0x23920
leaq 0x10c40(%rip), %r8      # 0x238a2
movl $0x3, %edi
movl $0x14d, %ecx            # imm = 0x14D
xorl %eax, %eax
callq 0x17d92
jmp 0x12cb5
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0x12ca7
leaq 0x10bde(%rip), %rsi     # 0x23866
leaq 0x10c91(%rip), %rdx     # 0x23920
leaq 0x10c0c(%rip), %r8      # 0x238a2
movl $0x3, %edi
movl $0x153, %ecx            # imm = 0x153
xorl %eax, %eax
callq 0x17d92
movq 0x8(%rbx), %rdi
callq 0x3450
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x12d72
movq (%rdi), %r14
callq 0x3450
movq %r14, %rdi
cmpq %rbp, %r14
jne 0x12cc3
jmp 0x12d72
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0x12d49
leaq 0x10b7b(%rip), %rsi     # 0x23866
leaq 0x10b83(%rip), %rdx     # 0x23875
leaq 0x10b90(%rip), %r8      # 0x23889
movl $0x3, %edi
movl $0x106, %ecx            # imm = 0x106
movq %rbx, %r9
xorl %eax, %eax
callq 0x17d92
jmp 0x12d49
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0x12d41
leaq 0x10b44(%rip), %rsi     # 0x23866
leaq 0x10b4c(%rip), %rdx     # 0x23875
leaq 0x10ac7(%rip), %r8      # 0x237f7
movl $0x3, %edi
movl $0x10b, %ecx            # imm = 0x10B
xorl %eax, %eax
callq 0x17d92
movq %r13, %rdi
callq 0x3380
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x12d63
movq (%rdi), %rbx
callq 0x3450
movq %rbx, %rdi
cmpq %rbp, %rbx
jne 0x12d53
movq 0x28(%rsp), %rdi
callq 0x3450
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq