// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0xb53f(%rip), %rsi      # 0x1bbe3
movq %r12, %rdi
callq 0xd1f0
testl %eax, %eax
jne 0x106c7
leaq 0xb531(%rip), %rsi      # 0x1bbe8
movq %r15, %rdi
callq 0xd1f0
testl %eax, %eax
je 0x10785
movzbl (%r12), %eax
cmpl $0x44, %eax
je 0x1072f
cmpl $0x55, %eax
jne 0x10743
cmpb $0x4c, 0x1(%r12)
jne 0x10743
cmpb $0x0, 0x2(%r12)
jne 0x10743
leaq 0xb98f(%rip), %rsi      # 0x1c07c
movq %r15, %rdi
callq 0xd1f0
testl %eax, %eax
je 0x10864
leaq 0xb982(%rip), %rsi      # 0x1c086
movq %r15, %rdi
callq 0xd1f0
testl %eax, %eax
je 0x10870
leaq 0xb978(%rip), %rsi      # 0x1c093
movq %r15, %rdi
callq 0xd1f0
testl %eax, %eax
jne 0x10743
incq %r14
jmp 0x10826
cmpb $0x4c, 0x1(%r12)
jne 0x10743
cmpb $0x0, 0x2(%r12)
je 0x107e5
leaq 0xb950(%rip), %rsi      # 0x1c09a
movq %r12, %rdi
callq 0xd1f0
testl %eax, %eax
jne 0x10769
leaq 0xb941(%rip), %rsi      # 0x1c09e
movq %r15, %rdi
callq 0xd1f0
testl %eax, %eax
je 0x107af
leaq 0xb93b(%rip), %rdi      # 0x1c0ab
xorl %r14d, %r14d
movq %r12, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xd150
jmp 0x108a6
movzbl (%rbx), %eax
xorl %ebp, %ebp
cmpl $0x31, %eax
je 0x10833
cmpl $0x30, %eax
jne 0x10892
cmpb $0x0, 0x1(%rbx)
jne 0x10892
movb $0x0, (%r14)
jmp 0x1083d
testq %rbx, %rbx
je 0x10845
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xd390
cmpq $0xffff, %rax           # imm = 0xFFFF
ja 0x1084c
cmpq %rbx, 0x8(%rsp)
je 0x1084c
movw %ax, 0x16(%r14)
movl $0x1, %ebp
jmp 0x10887
leaq 0xb890(%rip), %rsi      # 0x1c07c
movq %r15, %rdi
callq 0xd1f0
testl %eax, %eax
je 0x1086a
leaq 0xb887(%rip), %rsi      # 0x1c086
movq %r15, %rdi
callq 0xd1f0
testl %eax, %eax
je 0x10876
leaq 0xb881(%rip), %rsi      # 0x1c093
movq %r15, %rdi
callq 0xd1f0
testl %eax, %eax
jne 0x10743
addq $0x9, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1090a
jmp 0x10885
cmpb $0x0, 0x1(%rbx)
jne 0x10892
movb $0x1, (%r14)
movl $0x1, %r14d
jmp 0x108a6
movl $0xffffffea, %ebp       # imm = 0xFFFFFFEA
jmp 0x10887
leaq 0xb4f0(%rip), %rdi      # 0x1bd43
movq %rax, %rsi
xorl %eax, %eax
callq 0xd150
movl $0xffffffde, %ebp       # imm = 0xFFFFFFDE
jmp 0x10887
addq $0x11, %r14
jmp 0x1087a
addq $0x12, %r14
jmp 0x1087a
addq $0x13, %r14
jmp 0x1087a
addq $0x14, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x108b6
movl %eax, %ebp
movl $0x1, %r14d
cmpl $0x1, %ebp
je 0x108a6
leaq 0xb842(%rip), %rdi      # 0x1c0db
movq %rbx, %rsi
xorl %eax, %eax
callq 0xd150
movl %ebp, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq