// File: /workspace/github_c_makefile_star2_O3/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 $0x278, %rsp            # imm = 0x278
movq %rdi, %r12
xorl %eax, %eax
leaq 0x68(%rsp), %rbx
movq %rax, (%rbx)
leaq 0x18(%rsp), %r15
movq %rax, 0x10(%r15)
movq %r15, (%r15)
movq %r15, 0x8(%r15)
movq %rsi, %rdi
callq 0x3610
leaq 0x10726(%rip), %rsi     # 0x22878
movq %rax, 0x40(%rsp)
movq %rax, %rdi
movq %rbx, %rdx
callq 0x3600
testq %rax, %rax
je 0x12565
movq %rax, %rbx
leaq 0x70(%rsp), %r13
movq %r12, 0x58(%rsp)
cmpb $0x0, (%rbx)
je 0x12565
movq %rbx, %rdi
leaq 0x10630(%rip), %rsi     # 0x227bb
callq 0x3430
testq %rax, %rax
je 0x1277e
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3400
testl %eax, %eax
jne 0x127b5
movq %rbx, 0x50(%rsp)
movq %r13, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdx
callq 0x3580
testq %rax, %rax
je 0x12539
movq %rax, %rbx
movl $0x1, %r12d
movq %r14, 0x8(%rsp)
cmpb $0x23, (%rbx)
je 0x1251a
movq %rbx, %rdi
movl $0xd, %esi
callq 0x3150
testq %rax, %rax
je 0x121fa
movb $0x0, (%rax)
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3150
testq %rax, %rax
je 0x1220f
movb $0x0, (%rax)
cmpb $0x0, (%rbx)
je 0x1251a
movl $0x1, %edi
movl $0x38, %esi
callq 0x3240
testq %rax, %rax
je 0x1262a
movq %rax, %r13
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0x3a, %esi
callq 0x3150
leaq 0x14(%r13), %rbp
testq %rax, %rax
je 0x1229e
movq %rbp, 0x60(%rsp)
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x3150
testq %rax, %rax
je 0x12305
movb $0x0, (%rax)
leaq 0x1(%rax), %rdi
movq %rax, %r15
callq 0x3570
movl %eax, %ebp
movl $0xa, %edi
movq %rbx, %rsi
leaq 0x30(%rsp), %rdx
callq 0x3630
testl %eax, %eax
je 0x123e4
movq %r15, 0x48(%rsp)
jmp 0x12329
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x3150
testq %rax, %rax
je 0x12459
movq %rax, %r14
movb $0x0, (%rax)
movq %rax, %rdi
incq %rdi
callq 0x3570
negb %al
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %edx
movq 0x10(%rsp), %r13
movl %edx, 0x18(%r13)
movl $0x2, %edi
movq %rbx, %rsi
leaq 0x30(%rsp), %rdx
callq 0x3630
testl %eax, %eax
je 0x12489
movl 0x30(%rsp), %eax
bswapl %eax
movl %eax, (%rbp)
movb $0x2f, (%r14)
jmp 0x12485
movq %rax, 0x48(%rsp)
movl $0xa, %edi
movq %rbx, %rsi
leaq 0x30(%rsp), %rdx
callq 0x3630
movl $0x80, %ebp
testl %eax, %eax
je 0x123e8
movups 0x30(%rsp), %xmm0
movq 0x60(%rsp), %rax
movups %xmm0, (%rax)
movq 0x10(%rsp), %rax
movdqu 0x14(%rax), %xmm0
movdqa %xmm0, %xmm1
pxor %xmm2, %xmm2
punpckhbw %xmm2, %xmm1    # xmm1 = xmm1[8],xmm2[8],xmm1[9],xmm2[9],xmm1[10],xmm2[10],xmm1[11],xmm2[11],xmm1[12],xmm2[12],xmm1[13],xmm2[13],xmm1[14],xmm2[14],xmm1[15],xmm2[15]
pshuflw $0x1b, %xmm1, %xmm1     # xmm1 = xmm1[3,2,1,0,4,5,6,7]
pshufhw $0x1b, %xmm1, %xmm1     # xmm1 = xmm1[0,1,2,3,7,6,5,4]
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
pshuflw $0x1b, %xmm0, %xmm0     # xmm0 = xmm0[3,2,1,0,4,5,6,7]
pshufhw $0x1b, %xmm0, %xmm0     # xmm0 = xmm0[0,1,2,3,7,6,5,4]
packuswb %xmm1, %xmm0
movdqu %xmm0, 0x14(%rax)
addq $0x24, %r13
leal 0x1f(%rbp), %r15d
testl %ebp, %ebp
cmovnsl %ebp, %r15d
movdqu %xmm2, 0x24(%rax)
movl %r15d, %r14d
sarl $0x5, %r14d
cmpl $0x20, %ebp
jl 0x123a5
leal -0x1(%r14), %eax
leaq 0x4(,%rax,4), %rdx
movq %r13, %rdi
movl $0xff, %esi
callq 0x31e0
andl $-0x20, %r15d
subl %r15d, %ebp
testl %ebp, %ebp
jle 0x123c4
negb %bpl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %ebp, %ecx
shll %cl, %eax
movslq %r14d, %rcx
movl %eax, (%r13,%rcx,4)
xorl %ebp, %ebp
movq 0x48(%rsp), %rax
testq %rax, %rax
leaq 0x18(%rsp), %r15
je 0x123d8
movb $0x2f, (%rax)
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %r13
jmp 0x1244c
movb $0x2f, (%r15)
xorl %eax, %eax
callq 0x176e5
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x12442
callq 0x3040
movl (%rax), %r14d
movl %r14d, %edi
callq 0x3140
movq %rax, %r10
movl $0x3, %edi
leaq 0x1145e(%rip), %rsi     # 0x23876
leaq 0x114b5(%rip), %rdx     # 0x238d4
movl $0xdf, %ecx
leaq 0x114b8(%rip), %r8      # 0x238e3
movq %rbx, %r9
xorl %eax, %eax
pushq %r10
pushq %r14
movq 0x18(%rsp), %r14
callq 0x1771e
addq $0x10, %rsp
movq 0x10(%rsp), %r13
leaq 0x18(%rsp), %r15
movl $0x1, 0x10(%r13)
jmp 0x124e7
movq 0x10(%rsp), %r13
movl $0xffffffff, 0x18(%r13) # imm = 0xFFFFFFFF
movl $0x2, %edi
movq %rbx, %rsi
leaq 0x30(%rsp), %rdx
callq 0x3630
testl %eax, %eax
je 0x1248d
movl 0x30(%rsp), %eax
bswapl %eax
movl %eax, (%rbp)
xorl %ebp, %ebp
jmp 0x124e2
movb $0x2f, (%r14)
xorl %eax, %eax
callq 0x176e5
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x124e2
callq 0x3040
movl (%rax), %r14d
movl %r14d, %edi
callq 0x3140
movq %rax, %r10
movl $0x3, %edi
leaq 0x113b9(%rip), %rsi     # 0x23876
leaq 0x1143e(%rip), %rdx     # 0x23902
movl $0xc6, %ecx
leaq 0x11440(%rip), %r8      # 0x23910
movq %rbx, %r9
xorl %eax, %eax
pushq %r10
pushq %r14
callq 0x1771e
addq $0x10, %rsp
movq 0x8(%rsp), %r14
testl %ebp, %ebp
jne 0x1265e
movq %r15, (%r13)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%r13)
movq %r13, (%rax)
movq %r13, 0x20(%rsp)
cmpl $0x0, 0x10(%r13)
je 0x12511
incl 0x2c(%rsp)
jmp 0x12515
incl 0x28(%rsp)
leaq 0x70(%rsp), %r13
movq %r13, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdx
callq 0x3580
movq %rax, %rbx
incl %r12d
testq %rax, %rax
jne 0x121dc
movq %r14, %rdi
callq 0x3380
xorl %edi, %edi
leaq 0x1032e(%rip), %rsi     # 0x22878
leaq 0x68(%rsp), %rdx
callq 0x3600
movq %rax, %rbx
testq %rax, %rax
movq 0x58(%rsp), %r12
jne 0x12178
movq 0x40(%rsp), %rdi
callq 0x3450
xorl %eax, %eax
movl %eax, (%r12)
movl %eax, 0x10(%r12)
movslq 0x28(%rsp), %rdi
movl $0x8, %esi
callq 0x3240
movq %rax, 0x8(%r12)
testq %rax, %rax
je 0x126aa
movq %rax, %r14
movslq 0x2c(%rsp), %rdi
movl $0x20, %esi
callq 0x3240
movq %rax, 0x18(%r12)
testq %rax, %rax
je 0x126e7
movq 0x18(%rsp), %rax
xorl %ebx, %ebx
cmpq %r15, %rax
je 0x1272a
leaq 0x14(%rax), %rcx
cmpl $0x0, 0x10(%rax)
movq (%rax), %rax
je 0x12600
movq 0x18(%r12), %rdx
movslq 0x10(%r12), %rsi
leal 0x1(%rsi), %edi
movl %edi, 0x10(%r12)
shlq $0x5, %rsi
movdqu (%rcx), %xmm0
movdqu 0x10(%rcx), %xmm1
movdqu %xmm1, 0x10(%rdx,%rsi)
movdqu %xmm0, (%rdx,%rsi)
jmp 0x12617
movq 0x8(%r12), %rdx
movslq (%r12), %rsi
leal 0x1(%rsi), %edi
movl %edi, (%r12)
movq (%rcx), %rcx
movq %rcx, (%rdx,%rsi,8)
cmpq %r15, %rax
jne 0x125c7
movq 0x8(%r12), %r14
movslq (%r12), %rsi
jmp 0x1272c
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0x127e7
leaq 0x11235(%rip), %rsi     # 0x23876
leaq 0x1123d(%rip), %rdx     # 0x23885
leaq 0x11263(%rip), %r8      # 0x238b2
movl $0x3, %edi
movl $0x121, %ecx            # imm = 0x121
jmp 0x127e0
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0x1269d
leaq 0x11205(%rip), %rsi     # 0x23876
leaq 0x1120d(%rip), %rdx     # 0x23885
leaq 0x1123b(%rip), %r8      # 0x238ba
movl $0x3, %edi
movl $0x131, %ecx            # imm = 0x131
movq %rbx, %r9
xorl %eax, %eax
pushq %r12
pushq 0x58(%rsp)
callq 0x1771e
addq $0x10, %rsp
movq %r13, %rdi
callq 0x3450
jmp 0x127e7
xorl %eax, %eax
callq 0x176e5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x1275b
leaq 0x111b0(%rip), %rsi     # 0x23876
leaq 0x11263(%rip), %rdx     # 0x23930
leaq 0x111de(%rip), %r8      # 0x238b2
movl $0x3, %edi
movl $0x14d, %ecx            # imm = 0x14D
xorl %eax, %eax
callq 0x1771e
jmp 0x1275b
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0x12719
leaq 0x1117c(%rip), %rsi     # 0x23876
leaq 0x1122f(%rip), %rdx     # 0x23930
leaq 0x111aa(%rip), %r8      # 0x238b2
movl $0x3, %edi
movl $0x153, %ecx            # imm = 0x153
xorl %eax, %eax
callq 0x1771e
movq 0x8(%r12), %rdi
callq 0x3450
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x1275b
xorl %esi, %esi
leaq -0x75f(%rip), %rcx      # 0x11fd4
movl $0x8, %edx
movq %r14, %rdi
callq 0x3640
movq 0x18(%r12), %rdi
movslq 0x10(%r12), %rsi
leaq -0x692(%rip), %rcx      # 0x120bf
movl $0x20, %edx
callq 0x3640
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x12818
movq (%rdi), %r14
callq 0x3450
movq %r14, %rdi
cmpq %r15, %r14
jne 0x12769
jmp 0x12818
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0x127ef
leaq 0x110e5(%rip), %rsi     # 0x23876
leaq 0x110ed(%rip), %rdx     # 0x23885
leaq 0x110fa(%rip), %r8      # 0x23899
movl $0x3, %edi
movl $0x106, %ecx            # imm = 0x106
movq %rbx, %r9
xorl %eax, %eax
callq 0x1771e
jmp 0x127ef
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0x127e7
leaq 0x110ae(%rip), %rsi     # 0x23876
leaq 0x110b6(%rip), %rdx     # 0x23885
leaq 0x11031(%rip), %r8      # 0x23807
movl $0x3, %edi
movl $0x10b, %ecx            # imm = 0x10B
xorl %eax, %eax
callq 0x1771e
movq %r14, %rdi
callq 0x3380
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x12809
movq (%rdi), %rbx
callq 0x3450
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x127f9
movq 0x40(%rsp), %rdi
callq 0x3450
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq