// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/fpga_5gnr/fpga_5gnr_cfg_parser.c
// Function: fpga_handler
static int
fpga_handler(void *user, const char *section,
	     const char *name, const char *value)
{
	struct fpga_5gnr_fec_conf *fpga_conf =
			(struct fpga_5gnr_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 {
		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
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0xaff3(%rip), %rsi      # 0x1bbe3
movq %r12, %rdi
callq 0xd200
testl %eax, %eax
jne 0x10c13
leaq 0xafe5(%rip), %rsi      # 0x1bbe8
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
je 0x10cac
movzbl (%r12), %eax
cmpl $0x44, %eax
je 0x10c7b
cmpl $0x55, %eax
jne 0x10c8b
cmpb $0x4c, 0x1(%r12)
jne 0x10c8b
cmpb $0x0, 0x2(%r12)
jne 0x10c8b
leaq 0xb42e(%rip), %rsi      # 0x1c067
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
je 0x10d25
leaq 0xb421(%rip), %rsi      # 0x1c071
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
je 0x10d31
leaq 0xb417(%rip), %rsi      # 0x1c07e
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
jne 0x10c8b
incq %r14
jmp 0x10d0c
cmpb $0x4c, 0x1(%r12)
jne 0x10c8b
cmpb $0x0, 0x2(%r12)
je 0x10ccf
leaq 0xb404(%rip), %rdi      # 0x1c096
xorl %ebp, %ebp
movq %r12, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xd160
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movzbl (%rbx), %eax
xorl %ebp, %ebp
cmpl $0x31, %eax
je 0x10d19
cmpl $0x30, %eax
jne 0x10d55
cmpb $0x0, 0x1(%rbx)
jne 0x10d55
movb $0x0, (%r14)
jmp 0x10d4d
leaq 0xb391(%rip), %rsi      # 0x1c067
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
je 0x10d2b
leaq 0xb388(%rip), %rsi      # 0x1c071
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
je 0x10d37
leaq 0xb382(%rip), %rsi      # 0x1c07e
movq %r15, %rdi
callq 0xd200
testl %eax, %eax
jne 0x10c8b
addq $0x9, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10db8
jmp 0x10d46
cmpb $0x0, 0x1(%rbx)
jne 0x10d55
movb $0x1, (%r14)
jmp 0x10d4d
addq $0x11, %r14
jmp 0x10d3b
addq $0x12, %r14
jmp 0x10d3b
addq $0x13, %r14
jmp 0x10d3b
addq $0x14, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10d6b
movl %eax, %ebp
cmpl $0x1, %eax
jne 0x10d55
pushq $0x1
popq %rbp
jmp 0x10ca1
leaq 0xb36a(%rip), %rdi      # 0x1c0c6
movq %rbx, %rsi
xorl %eax, %eax
callq 0xd160
jmp 0x10ca1