// File: /workspace/github_c_makefile_star2_O1/intel[P]pf-bb-config/fpga_lte/fpga_lte_cfg_parser.c
// Function: fpga_handler
static int
fpga_handler(void *user, const char *section,
	     const char *name, const char *value)
{
	struct fpga_lte_fec_conf *fpga_conf = (struct fpga_lte_fec_conf *) user;
	int ret = 1;

	if (!strcmp(section, MODE) && !strcmp(name, PFMODE)) {
		if (!strcmp(value, ZERO))
			fpga_conf->pf_mode_en = false;
		else if (!strcmp(value, ONE))
			fpga_conf->pf_mode_en = true;
		else
			ret = 0;
	} else if (!strcmp(section, UL) && !strcmp(name, BANDWIDTH)) {
		ret = parse_number8(value, &fpga_conf->ul_bandwidth);
	} else if (!strcmp(section, DL) && !strcmp(name, BANDWIDTH)) {
		ret = parse_number8(value, &fpga_conf->dl_bandwidth);
	} else if (!strcmp(section, UL) && !strcmp(name, LOAD_BALANCE)) {
		ret = parse_number8(value, &fpga_conf->ul_load_balance);
	} else if (!strcmp(section, DL) && !strcmp(name, LOAD_BALANCE)) {
		ret = parse_number8(value, &fpga_conf->dl_load_balance);
	} else if (!strcmp(section, UL) && !strcmp(name, QUEUE_MAP)) {
		ret = parse_array8(value, fpga_conf->vf_ul_queues_number);
	} else if (!strcmp(section, DL) && !strcmp(name, QUEUE_MAP)) {
		ret = parse_array8(value, fpga_conf->vf_dl_queues_number);
	} else if (!strcmp(section, FLR) && !strcmp(name, FLR_TIME_OUT)) {
		ret = parse_number16(value, &fpga_conf->flr_time_out);
	} else {
		printf("ERROR: Section (%s) or name (%s) is not valid.\n",
		       section, name);
		return 0;
	}
	if (ret != 1)
		printf("Error: Conversion of value (%s) failed.\n", value);

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0xb49c(%rip), %rsi      # 0x1bbd3
movq %r12, %rdi
callq 0xd200
testl %eax, %eax
jne 0x1075a
leaq 0xb48e(%rip), %rsi      # 0x1bbd8
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
je 0x10866
leaq 0xb7b3(%rip), %rsi      # 0x1bf14
movq %r12, %rdi
callq 0xd200
movl %eax, %ebp
testl %eax, %eax
jne 0x10786
leaq 0xb8f6(%rip), %rsi      # 0x1c06c
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
je 0x10897
leaq 0xb78a(%rip), %rsi      # 0x1bf17
movq %r12, %rdi
callq 0xd200
movl %eax, %r13d
testl %eax, %eax
jne 0x107b3
leaq 0xb8c9(%rip), %rsi      # 0x1c06c
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
je 0x1089d
testl %ebp, %ebp
jne 0x107ce
leaq 0xb8b8(%rip), %rsi      # 0x1c076
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
je 0x108a3
testl %r13d, %r13d
jne 0x107ea
leaq 0xb89c(%rip), %rsi      # 0x1c076
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
je 0x108a9
testl %ebp, %ebp
jne 0x10805
leaq 0xb88e(%rip), %rsi      # 0x1c083
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
je 0x108ba
testl %r13d, %r13d
jne 0x10821
leaq 0xb872(%rip), %rsi      # 0x1c083
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
je 0x108bf
leaq 0xb862(%rip), %rsi      # 0x1c08a
movq %r12, %rdi
callq 0xd200
testl %eax, %eax
jne 0x1084b
leaq 0xb853(%rip), %rsi      # 0x1c08e
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
je 0x108fd
leaq 0xb849(%rip), %rdi      # 0x1c09b
xorl %ebp, %ebp
movq %r12, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xd150
jmp 0x108e6
leaq 0xa79c(%rip), %rsi      # 0x1b009
movq %rbx, %rdi
callq 0xd200
testl %eax, %eax
je 0x108f7
leaq 0xa7b7(%rip), %rsi      # 0x1b037
movq %rbx, %rdi
callq 0xd200
xorl %ebp, %ebp
testl %eax, %eax
jne 0x108d0
movb $0x1, (%r14)
jmp 0x10922
addq $0x11, %r14
jmp 0x108ad
addq $0x12, %r14
jmp 0x108ad
addq $0x13, %r14
jmp 0x108ad
addq $0x14, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10948
jmp 0x108ce
incq %r14
jmp 0x108c3
addq $0x9, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1099c
movl %eax, %ebp
cmpl $0x1, %ebp
je 0x108e6
leaq 0xb7ef(%rip), %rdi      # 0x1c0cb
movq %rbx, %rsi
xorl %eax, %eax
callq 0xd150
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x0, (%r14)
jmp 0x10922
testq %rbx, %rbx
je 0x10929
movq %rsp, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xd3a0
cmpq $0xffff, %rax           # imm = 0xFFFF
ja 0x10930
cmpq %rbx, (%rsp)
je 0x10930
movw %ax, 0x16(%r14)
movl $0x1, %ebp
jmp 0x108d0
movl $0xffffffea, %ebp       # imm = 0xFFFFFFEA
jmp 0x108d0
leaq 0xb3fc(%rip), %rdi      # 0x1bd33
movq %rax, %rsi
xorl %eax, %eax
callq 0xd150
movl $0xffffffde, %ebp       # imm = 0xFFFFFFDE
jmp 0x108d0