LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/acc100/acc100_cfg_parser.c
// Function: parse_number32
static int
parse_number32(const char *str, uint32_t *value)
{
	uint64_t val = 0;
	char *end;

	if (str == NULL)
		return -EINVAL;

	val = strtoul(str, &end, 0);
	if (val > UINT32_MAX || str == end) {
		printf("ERROR: Invalid value %" PRIu64 "\n", val);
		return -ERANGE;
	}
	*value = (uint32_t) val;
	return 1;
}

// Assembly:
testq %rdi, %rdi
je 0x10155
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %rsi
xorl %edx, %edx
callq 0xd3a0
movq %rax, %rcx
shrq $0x20, %rcx
jne 0x10159
cmpq %r14, (%rsp)
je 0x10159
movl %eax, (%rbx)
pushq $0x1
jmp 0x1016c
pushq $-0x16
popq %rax
retq
leaq 0xbbe3(%rip), %rdi      # 0x1bd43
movq %rax, %rsi
xorl %eax, %eax
callq 0xd160
pushq $-0x22
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/fpga_lte/fpga_lte_cfg_parser.c
// Function: fpga_lte_parse_conf_file
int
fpga_lte_parse_conf_file(const char *file_name,
		struct fpga_lte_fec_conf *fpga_conf)
{
	int ret;

	set_default_config(fpga_conf);

	ret = cfg_parse(file_name, fpga_handler, fpga_conf);

	if (ret == -1) {
		printf("ERROR: Error loading configuration file %s\n",
			file_name);
		set_default_config(fpga_conf);
		return -ENOENT;
	} else if (ret == -2) {
		printf("ERROR: Memory allocation error\n");
		set_default_config(fpga_conf);
		return -ENOMEM;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x1051b
leaq 0x6c(%rip), %rsi        # 0x1053d
movq %r14, %rdi
movq %rbx, %rdx
callq 0x13780
cmpl $-0x2, %eax
je 0x104fd
xorl %ebp, %ebp
cmpl $-0x1, %eax
jne 0x10514
leaq 0xbb4c(%rip), %rdi      # 0x1c03b
movq %r14, %rsi
xorl %eax, %eax
callq 0xd160
pushq $-0x2
jmp 0x1050b
leaq 0xbbed(%rip), %rdi      # 0x1c0f1
callq 0xd0c0
pushq $-0xc
popq %rbp
movq %rbx, %rdi
callq 0x1051b
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/fpga_lte/fpga_lte_cfg_parser.c
// Function: parse_number8
static int
parse_number8(const char *str, uint8_t *value)
{
	uint64_t val = 0;
	char *end;

	if (str == NULL)
		return -EINVAL;

	val = strtoul(str, &end, 0);
	if (val > UINT8_MAX || str == end) {
		printf("ERROR: Invalid value %" PRIu64 "\n", val);
		return -ERANGE;
	}

	*value = (uint8_t) val;
	return 1;
}

// Assembly:
testq %rdi, %rdi
je 0x10788
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %rsi
xorl %edx, %edx
callq 0xd3a0
cmpq $0xff, %rax
ja 0x1078c
cmpq %r14, (%rsp)
je 0x1078c
movb %al, (%rbx)
pushq $0x1
jmp 0x1079f
pushq $-0x16
popq %rax
retq
leaq 0xb5b0(%rip), %rdi      # 0x1bd43
movq %rax, %rsi
xorl %eax, %eax
callq 0xd160
pushq $-0x22
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/fpga_lte/fpga_lte_cfg_parser.c
// Function: parse_array8
static int
parse_array8(const char *str, uint8_t *array)
{
	int i;
	uint64_t val = 0;
	char *end;

	if (str == NULL)
		return -EINVAL;

	char *val_ch = strtok((char *)str, ",");
	for (i = 0; i < 8 && NULL != val_ch; i++) {

		val = strtoul(val_ch, &end, 0);
		if (val > UINT8_MAX || val_ch == end) {
			printf("ERROR: Invalid value %" PRIu64 "\n", val);
			return -ERANGE;
		}
		array[i] = (uint8_t) val;

		val_ch = strtok(NULL, ",");
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x10812
movq %rsi, %rbx
leaq 0xb92d(%rip), %r14      # 0x1c0ef
movq %r14, %rsi
callq 0xd350
movq %rax, %r12
xorl %r13d, %r13d
pushq $0x1
popq %rbp
movq %rsp, %r15
cmpq $0x7, %r13
ja 0x1082a
testq %r12, %r12
je 0x1082a
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xd3a0
cmpq $0xff, %rax
ja 0x10816
cmpq (%rsp), %r12
je 0x10816
movb %al, (%rbx,%r13)
xorl %edi, %edi
movq %r14, %rsi
callq 0xd350
movq %rax, %r12
incq %r13
jmp 0x107d6
pushq $-0x16
jmp 0x10829
leaq 0xb526(%rip), %rdi      # 0x1bd43
movq %rax, %rsi
xorl %eax, %eax
callq 0xd160
pushq $-0x22
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/fpga_5gnr/fpga_5gnr_cfg_parser.c
// Function: fpga_5gnr_parse_conf_file
int
fpga_5gnr_parse_conf_file(const char *file_name,
		struct fpga_5gnr_fec_conf *fpga_conf)
{
	int ret;

	set_default_config(fpga_conf);

	ret = cfg_parse(file_name, fpga_handler, fpga_conf);

	if (ret == -1) {
		printf("ERROR: Error loading configuration file %s\n",
			file_name);
		set_default_config(fpga_conf);
		return -ENOENT;
	} else if (ret == -2) {
		printf("ERROR: Memory allocation error\n");
		set_default_config(fpga_conf);
		return -ENOMEM;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x10bb3
leaq 0x6c(%rip), %rsi        # 0x10bd5
movq %r14, %rdi
movq %rbx, %rdx
callq 0x13780
cmpl $-0x2, %eax
je 0x10b95
xorl %ebp, %ebp
cmpl $-0x1, %eax
jne 0x10bac
leaq 0xb4b4(%rip), %rdi      # 0x1c03b
movq %r14, %rsi
xorl %eax, %eax
callq 0xd160
pushq $-0x2
jmp 0x10ba3
leaq 0xb555(%rip), %rdi      # 0x1c0f1
callq 0xd0c0
pushq $-0xc
popq %rbp
movq %rbx, %rdi
callq 0x10bb3
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb_fft_win_check
void
vrb_fft_win_check(int16_t *gTDWinCoff, hw_device *accel_pci_dev)
{
	int16_t i, offset_p = 0, offset_i, fft_sz, lut_sz, wrap1, wrap2, win_start, win_size, win;

	for (fft_sz = 32; fft_sz <= 2048; fft_sz *= 2) {
		/*
		 * Manage FFT wrap for negative and positive halves.
		 * Each table width is fft_sz / 2.
		 */
		lut_sz = fft_sz / 2;
		wrap1 = lut_sz / 2 * 3;
		wrap2 = lut_sz / 2;
		for (win = 0;  win < BB_ACC_MAX_WIN; win++) {
			offset_i = BB_ACC_MAX_WIN * offset_p + win * lut_sz;
			win_size = 0;
			win_start = 0;
			/* Check non null value in LUT for size and start of window shape. */
			for (i = 0; i < lut_sz; i++) {
				if (gTDWinCoff[offset_i + ((wrap1 - i) % lut_sz)] > 0) {
					win_size++;
					win_start = wrap2 - i;
				}
			}
			win_size = MAX(1, win_size);
			if (fft_sz == 2048) {
				accel_pci_dev->fft_win_size[win] = win_size;
				accel_pci_dev->fft_win_start[win] = win_start;
			}
			if ((win == 0) && (fft_sz == 2048))
				LOG(INFO, "  FFT Size %d Window %d Size %d Start %d",
						fft_sz, win, win_size, win_start);
		}
		offset_p += lut_sz;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
pushq $0x20
popq %r13
xorl %edi, %edi
shll $0x10, %r13d
cmpl $0x8000000, %r13d       # imm = 0x8000000
jg 0x113f7
movl %r13d, %r12d
sarl $0x11, %r12d
movl %r12d, %eax
cwtd
movw $0x2, %cx
idivw %cx
movl %edi, (%rsp)
shll $0x14, %edi
movl %edi, 0x10(%rsp)
movl %r13d, %ecx
sarl %ecx
movl %ecx, 0xc(%rsp)
movl %eax, 0x14(%rsp)
imull $0x30000, %eax, %eax    # imm = 0x30000
sarl $0x10, %eax
movl %eax, 0x8(%rsp)
xorl %ebx, %ebx
movl %r13d, 0x4(%rsp)
cmpq $0x10, %rbx
je 0x113e5
movl 0xc(%rsp), %edi
imull %ebx, %edi
addl 0x10(%rsp), %edi
sarl $0x10, %edi
xorl %r9d, %r9d
movl 0x14(%rsp), %r10d
movl 0x8(%rsp), %ecx
xorl %r11d, %r11d
xorl %r8d, %r8d
cmpl %r9d, %r12d
jle 0x11369
movl %ecx, %eax
cltd
idivl %r12d
addl %edi, %edx
movslq %edx, %rax
xorl %edx, %edx
cmpw $0x0, (%r14,%rax,2)
setg %dl
cmovgl %r10d, %r11d
addl %edx, %r8d
incl %r9d
decl %ecx
decl %r10d
jmp 0x1133d
cmpl $0x8000000, %r13d       # imm = 0x8000000
jne 0x113dd
cmpw $0x2, %r8w
pushq $0x1
popq %rax
cmovgel %r8d, %eax
movzwl %ax, %ebp
movl %ebp, 0x540(%rsi,%rbx,4)
movswl %r11w, %r15d
movl %r15d, 0x500(%rsi,%rbx,4)
testq %rbx, %rbx
jne 0x113dd
movq %rsi, %r13
callq 0x1298b
leaq 0x23b28(%rip), %rcx     # 0x34ed0
movq 0x10(%rcx), %r8
subq $0x8, %rsp
pushq $0x2
popq %rdi
xorl %esi, %esi
leaq 0xad96(%rip), %rdx      # 0x1c152
movq %rax, %rcx
movl $0x800, %r9d            # imm = 0x800
xorl %eax, %eax
pushq %r15
pushq %rbp
pushq $0x0
callq 0x19400
movq %r13, %rsi
movl 0x24(%rsp), %r13d
addq $0x20, %rsp
incq %rbx
jmp 0x11313
movswl %r12w, %eax
addl (%rsp), %eax
sarl $0xf, %r13d
movl %eax, %edi
jmp 0x112c4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb_fft_lut_md5sum
void
vrb_fft_lut_md5sum(const char *lut_filename, hw_device *accel_pci_dev)
{
	uint16_t ver_md;
	char md_prefix[8];
	char *cmd;
	FILE *fp;

	uint16_t size_cmd = snprintf(NULL, 0, "%s", lut_filename) + 8;
	cmd = malloc(size_cmd);
	sprintf(cmd, "md5sum %s", lut_filename);
	fp = popen(cmd, "r");
	free(cmd);
	if (fp == NULL) {
		LOG(ERR, "Unable to open FFT LUT %s", lut_filename);
		return;
	}
	if (fgets(md_prefix, 5, fp) == NULL) {
		LOG(ERR, "Unable to access FFT LUT %s", lut_filename);
		pclose(fp);
		return;
	}
	ver_md = (int)strtol(md_prefix, NULL, 16);
	LOG(INFO, "  FFT Version Number %X", ver_md);
	pclose(fp);
	accel_pci_dev->fft_version_md5sum = ver_md;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xd5c2(%rip), %rdx      # 0x1e9dd
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0xd180
addl $0x8, %eax
movzwl %ax, %edi
callq 0xd280
movq %rax, %r12
leaq 0xad44(%rip), %rsi      # 0x1c182
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xd3e0
leaq 0xacfe(%rip), %rsi      # 0x1c150
movq %r12, %rdi
callq 0xd320
movq %rax, %r15
movq %r12, %rdi
callq 0xd030
testq %r15, %r15
je 0x114c9
movq %rsp, %rdi
pushq $0x5
popq %rsi
movq %r15, %rdx
callq 0xd1f0
testq %rax, %rax
je 0x114fb
movq %rsp, %rdi
pushq $0x10
popq %rdx
xorl %esi, %esi
callq 0xd240
movq %rax, %r14
callq 0x1298b
leaq 0x23a37(%rip), %rcx     # 0x34ed0
movq 0x10(%rcx), %r8
movzwl %r14w, %r9d
leaq 0xad28(%rip), %rdx      # 0x1c1d0
pushq $0x2
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
movq %r15, %rdi
callq 0xd170
movw %r14w, 0x4fc(%rbx)
jmp 0x1152a
callq 0x1298b
leaq 0x239fb(%rip), %rcx     # 0x34ed0
movq (%rcx), %r8
leaq 0xacad(%rip), %rdx      # 0x1c18c
xorl %edi, %edi
xorl %esi, %esi
movq %rax, %rcx
movq %r14, %r9
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x19400
callq 0x1298b
leaq 0x239c9(%rip), %rcx     # 0x34ed0
movq (%rcx), %r8
leaq 0xac9c(%rip), %rdx      # 0x1c1ad
xorl %edi, %edi
xorl %esi, %esi
movq %rax, %rcx
movq %r14, %r9
xorl %eax, %eax
callq 0x19400
movq %r15, %rdi
callq 0xd170
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_acc_from_qgid
int
vrb1_acc_from_qgid(int qg_idx, struct vrb1_conf *vrb1_conf)
{
	int acc_qg[VRB1_NUM_QGRPS];
	int num_qgroups_per_fn[NUM_ACC];
	int acc, qgid, qg_index = 0;

	for (qgid = 0; qgid < VRB1_NUM_QGRPS; qgid++)
		acc_qg[qgid] = 0;
	num_qgroups_per_fn[UL_4G] = vrb1_conf->q_ul_4g.num_qgroups;
	num_qgroups_per_fn[UL_5G] = vrb1_conf->q_ul_5g.num_qgroups;
	num_qgroups_per_fn[DL_4G] = vrb1_conf->q_dl_4g.num_qgroups;
	num_qgroups_per_fn[DL_5G] = vrb1_conf->q_dl_5g.num_qgroups;
	num_qgroups_per_fn[FFT] = vrb1_conf->q_fft.num_qgroups;
	for (acc = UL_4G;  acc < NUM_ACC; acc++)
		for (qgid = 0; qgid < num_qgroups_per_fn[acc]; qgid++)
			acc_qg[qg_index++] = acc;
	acc = acc_qg[qg_idx];
	return acc;
}

// Assembly:
xorl %eax, %eax
cmpq $0x10, %rax
je 0x11548
andl $0x0, -0x48(%rsp,%rax,4)
incq %rax
jmp 0x11538
movzwl 0x6(%rsi), %eax
movl %eax, -0x68(%rsp)
movzwl 0x12(%rsi), %eax
movl %eax, -0x64(%rsp)
movzwl 0xc(%rsi), %eax
movl %eax, -0x60(%rsp)
movzwl 0x18(%rsi), %eax
movl %eax, -0x5c(%rsp)
movzwl 0x1e(%rsi), %eax
movl %eax, -0x58(%rsp)
xorl %eax, %eax
xorl %ecx, %ecx
xorl %edx, %edx
cmpq $0x5, %rcx
je 0x115a6
movl -0x68(%rsp,%rcx,4), %r8d
testl %r8d, %r8d
cmovlel %eax, %r8d
movslq %edx, %rsi
movl %r8d, %edx
addl %esi, %edx
movslq %edx, %r8
cmpq %rsi, %r8
je 0x115a1
movl %ecx, -0x48(%rsp,%rsi,4)
incq %rsi
jmp 0x11593
incq %rcx
jmp 0x11576
movslq %edi, %rax
movl -0x48(%rsp,%rax,4), %eax
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_qtop_from_acc
void
vrb1_qtop_from_acc(struct q_topology_t **qtop, int acc_enum,
		     struct vrb1_conf *vrb1_conf)
{
	struct q_topology_t *p_qtop;

	p_qtop = NULL;
	switch (acc_enum) {
	case UL_4G:
		p_qtop = &vrb1_conf->q_ul_4g;
		break;
	case UL_5G:
		p_qtop = &vrb1_conf->q_ul_5g;
		break;
	case DL_4G:
		p_qtop = &vrb1_conf->q_dl_4g;
		break;
	case DL_5G:
		p_qtop = &vrb1_conf->q_dl_5g;
		break;
	case FFT:
		p_qtop = &vrb1_conf->q_fft;
		break;
	default:
		/* NOTREACHED */
		printf("Unexpected error evaluating queue topology %d", acc_enum);
		break;
	}
	*qtop = p_qtop;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x4, %esi
ja 0x115ed
movq %rdx, %r14
movl %esi, %eax
leaq 0xab4a(%rip), %rcx      # 0x1c110
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x6, %r14
jmp 0x115fe
addq $0x1e, %r14
jmp 0x115fe
addq $0xc, %r14
jmp 0x115fe
addq $0x18, %r14
jmp 0x115fe
addq $0x12, %r14
jmp 0x115fe
leaq 0xabfb(%rip), %rdi      # 0x1c1ef
xorl %r14d, %r14d
xorl %eax, %eax
callq 0xd160
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_aq_depth
int
vrb1_aq_depth(int qg_idx, struct vrb1_conf *vrb1_conf)
{
	struct q_topology_t *q_top = NULL;
	int acc_enum = vrb1_acc_from_qgid(qg_idx, vrb1_conf);

	vrb1_qtop_from_acc(&q_top, acc_enum, vrb1_conf);
	if (q_top == NULL)
		return 1;
	return MAX(1, q_top->aq_depth_log2);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsp, %r14
andq $0x0, (%r14)
callq 0x11536
movq %r14, %rdi
movl %eax, %esi
movq %rbx, %rdx
callq 0x115ae
movq (%r14), %rax
testq %rax, %rax
je 0x11641
movzwl 0x4(%rax), %eax
cmpw $0x1, %ax
adcl $0x0, %eax
movzwl %ax, %eax
jmp 0x11644
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_aq_num
int
vrb1_aq_num(int qg_idx, struct vrb1_conf *vrb1_conf)
{
	struct q_topology_t *q_top = NULL;
	int acc_enum = vrb1_acc_from_qgid(qg_idx, vrb1_conf);

	vrb1_qtop_from_acc(&q_top, acc_enum, vrb1_conf);
	if (!q_top)
		return 0;
	return q_top->num_aqs_per_groups;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsp, %r14
andq $0x0, (%r14)
callq 0x11536
movq %r14, %rdi
movl %eax, %esi
movq %rbx, %rdx
callq 0x115ae
movq (%r14), %rax
testq %rax, %rax
je 0x1167a
movzwl 0x2(%rax), %eax
jmp 0x1167c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_disable_aqueues
void vrb1_disable_aqueues(void *bar0addr)
{
	unsigned int vf_idx, qg_idx, address;

	/* Disabling AQueues through the Queue hierarchy. */
	for (vf_idx = 0; vf_idx < VRB1_NUM_VFS; vf_idx++) {
		for (qg_idx = 0; qg_idx < VRB1_NUM_QGRPS; qg_idx++) {
			address = HWPfQmgrAqEnableVf + vf_idx * sizeof(uint32_t);
			vrb1_reg_fast_write(bar0addr, address, qg_idx << 16);
		}
	}
}

// Assembly:
xorl %eax, %eax
cmpq $0x10, %rax
je 0x116cd
leaq 0xa10000(,%rax,4), %rcx
xorl %edx, %edx
cmpl $0x100000, %edx         # imm = 0x100000
je 0x116c8
movl %edx, (%rdi,%rcx)
addl $0x10000, %edx          # imm = 0x10000
jmp 0x116b5
incq %rax
jmp 0x116a5
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_cluster_reset
void vrb1_cluster_reset(void *dev)
{
	hw_device *accel_dev = (hw_device *)dev;
	void *bar0addr = accel_dev->bar0Addr;
	uint16_t template_idx, i;

	vrb1_disable_ir_regs(bar0addr);

	LOG(DEBUG, "vrb1cluster reset");
	/* Disable Qmgr Template Configuration */
	vrb1_disable_aqueues(bar0addr);
	for (template_idx = 0; template_idx < VRB1_NUM_TMPL; template_idx++) {
		vrb1_reg_fast_write(bar0addr, HWPfQmgrGrpTmplateReg4Indx +
				sizeof(uint32_t) * template_idx, 0);
	}

	/* Stop the DMA and ask Ocode to go idle and wait for 1 msec. */
	vrb1_reg_fast_write(bar0addr, HWPfHiOcodeMailBox, 0);
	vrb1_reg_fast_write(bar0addr, HWPfDmaSoftResetReg, 0x2);
	usleep(1000);
	vrb1_reg_fast_write(bar0addr, HWPfDmaSoftResetReg, 0x0);

	for (i = 0; i < 2; i++) {
		/* cluster reset */
		vrb1_reg_fast_write(bar0addr, HWPfHiCoresHardResetReg, 0xFFFFFFFF);
		vrb1_reg_fast_write(bar0addr, HWPfHi5GHardResetReg, 0xFFFFFFFF);
		vrb1_reg_fast_write(bar0addr, HWPfHiHardResetReg, 0x3FF);

		/* wait for 10 usecs */
		usleep(10);
	}

	vrb1_reset_info_ring(accel_dev);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0xb0(%rdi), %r14
xorl %r12d, %r12d
movl %r12d, 0xc84020(%r14)
pushq $-0x1
popq %r15
movl %r15d, 0xc84040(%r14)
movl %r12d, 0xc84024(%r14)
movl %r12d, 0xc84028(%r14)
movl %r15d, 0xc84048(%r14)
movl %r15d, 0xc84044(%r14)
callq 0x1298b
leaq 0x237b3(%rip), %rcx     # 0x34ed0
movq 0x18(%rcx), %r8
leaq 0xaaf5(%rip), %rdx      # 0x1c21d
leaq 0xab0d(%rip), %r9       # 0x1c23c
pushq $0x3
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
movq %r14, %rdi
callq 0x116a3
cmpq $0x20, %r12
je 0x1175d
movl $0x0, 0xa00a00(%r14,%r12,4)
incq %r12
jmp 0x11746
xorl %ebp, %ebp
movl %ebp, 0xc84018(%r14)
movl $0x2, 0xb8000c(%r14)
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xd460
movl %ebp, 0xb8000c(%r14)
movw $0x2, %r12w
pushq $0xa
popq %rbp
subw $0x1, %r12w
jb 0x117b3
movl %r15d, 0xc84010(%r14)
movl %r15d, 0xc8400c(%r14)
movl $0x3ff, 0xc84008(%r14) # imm = 0x3FF
movl %ebp, %edi
callq 0xd460
jmp 0x1178a
movq 0x98(%rbx), %rax
movq 0xb0(%rbx), %rcx
movq %rax, %rdx
shrq $0x20, %rdx
movl %edx, 0xc8401c(%rcx)
movl %eax, 0xc84014(%rcx)
movl $0xf000, 0xc8401c(%rcx) # imm = 0xF000
movl 0xc8401c(%rcx), %eax
shrl $0x2, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, 0xa8(%rbx)
movq 0x90(%rbx), %rax
testq %rax, %rax
je 0x11813
xorl %ecx, %ecx
cmpq $0x400, %rcx            # imm = 0x400
je 0x11813
andl $0x0, (%rax,%rcx)
incq %rcx
jmp 0x11801
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_enable_intr
int vrb1_enable_intr(void *dev)
{
	int ret;
	hw_device *accel_pci_dev = (hw_device *)dev;
	void *bar0addr = accel_pci_dev->bar0Addr;

	LOG(DEBUG, "Enable VRB1 interrupts");
	/* allocate info ring */
	ret = vrb1_allocate_info_ring(dev);
	if (ret < 0) {
		LOG(ERR, "vrb1allocate info ring failed");
		return -1;
	}

	vrb1_enable_ir_regs(bar0addr);

	LOG(DEBUG, "Done");
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq 0xb0(%rdi), %r13
callq 0x1298b
leaq 0x23690(%rip), %r12     # 0x34ed0
movq 0x18(%r12), %r8
leaq 0xaa03(%rip), %rdx      # 0x1c24f
leaq 0xaa20(%rip), %r9       # 0x1c273
xorl %ebx, %ebx
pushq $0x3
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
cmpq $0x0, 0x90(%r14)
jne 0x1191f
movq 0xb0(%r14), %rbp
leaq 0x98(%r14), %rdx
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
callq 0x18739
movq %rax, %r15
movq %rax, 0x90(%r14)
callq 0x1298b
testq %r15, %r15
je 0x11981
movq 0x18(%r12), %r8
movups 0x90(%r14), %xmm0
movups %xmm0, (%rsp)
leaq 0xaef7(%rip), %rdx      # 0x1c7b4
leaq 0xaf21(%rip), %r9       # 0x1c7e5
pushq $0x3
popq %r15
movl %r15d, %edi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
movl 0xc8401c(%rbp), %eax
shrl $0x2, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, 0xa8(%r14)
callq 0x1298b
movq 0x18(%r12), %r8
movzwl 0xa8(%r14), %ecx
movl %ecx, (%rsp)
leaq 0xaef4(%rip), %rdx      # 0x1c7fd
movl %r15d, %edi
xorl %esi, %esi
movq %rax, %rcx
leaq 0xaecd(%rip), %r9       # 0x1c7e5
xorl %eax, %eax
callq 0x19400
movl %ebx, 0xc84020(%r13)
movl %ebx, 0xc84040(%r13)
movl %ebx, 0xc84028(%r13)
movl %ebx, 0xc84024(%r13)
movl %ebx, 0xc84048(%r13)
movl %ebx, 0xc84044(%r13)
callq 0x1298b
movq 0x18(%r12), %r8
leaq 0x9bca(%rip), %rdx      # 0x1b524
leaq 0xa912(%rip), %r9       # 0x1c273
pushq $0x3
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %r8
leaq 0xadfa(%rip), %rdx      # 0x1c786
xorl %edi, %edi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
callq 0x1298b
movq (%r12), %r8
leaq 0xa8da(%rip), %rdx      # 0x1c284
xorl %edi, %edi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
pushq $-0x1
popq %rbx
jmp 0x11970
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_disable_intr
int
vrb1_disable_intr(void *dev)
{
	hw_device *accel_pci_dev = (hw_device *)dev;
	void *bar0addr = accel_pci_dev->bar0Addr;

	LOG(DEBUG, "Disable interrupts");

	vrb1_disable_ir_regs(bar0addr);

	vrb1_free_info_ring(dev);

	LOG(DEBUG, "Done");
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0xb0(%rdi), %r15
callq 0x1298b
leaq 0x234f5(%rip), %r14     # 0x34ed0
movq 0x18(%r14), %r8
leaq 0xa8c3(%rip), %rdx      # 0x1c2a9
leaq 0xa8dc(%rip), %r9       # 0x1c2c9
xorl %r12d, %r12d
pushq $0x3
popq %rbp
movl %ebp, %edi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
movl %r12d, 0xc84020(%r15)
pushq $-0x1
popq %rax
movl %eax, 0xc84040(%r15)
movl %r12d, 0xc84024(%r15)
movl %r12d, 0xc84028(%r15)
movl %eax, 0xc84048(%r15)
movl %eax, 0xc84044(%r15)
callq 0x1298b
movq 0x18(%r14), %r8
leaq 0xaddf(%rip), %rdx      # 0x1c81d
leaq 0xadf4(%rip), %r9       # 0x1c839
movl %ebp, %edi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x11aa7
leaq 0x90(%rbx), %r15
movq 0xa0(%rbx), %rsi
callq 0x18753
andw $0x0, 0xa8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
callq 0x1298b
movq 0x18(%r14), %r8
leaq 0x9a93(%rip), %rdx      # 0x1b524
leaq 0xada1(%rip), %r9       # 0x1c839
pushq $0x3
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
callq 0x1298b
movq 0x18(%r14), %r8
leaq 0x9a6d(%rip), %rdx      # 0x1b524
leaq 0xa80b(%rip), %r9       # 0x1c2c9
pushq $0x3
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb1/vrb1_cfg_parser.c
// Function: vrb1_queue_range_check
int
vrb1_queue_range_check(struct q_topology_t q_conf)
{
	if ((q_conf.num_aqs_per_groups < 1) ||
			(q_conf.num_aqs_per_groups > VRB1_NUM_AQS)) {
		printf("ERROR: Number of AQs out of range %d\n",
				q_conf.num_aqs_per_groups);
		return -1;
	}
	if ((q_conf.aq_depth_log2 < 1) ||
			(q_conf.aq_depth_log2 > VRB1_MAX_QDEPTH)) {
		printf("ERROR: AQ Depth out of range %d\n",
				q_conf.aq_depth_log2);
		return -1;
	}
	if (q_conf.num_qgroups > VRB1_NUM_QGRPS) {
		printf("ERROR: Number of QG out of range %d\n",
				q_conf.num_qgroups);
		return -1;
	}
	return 0;
}

// Assembly:
pushq %rax
movq %rdi, %rax
leal -0x110000(%rdi), %ecx
cmpl $0xffefffff, %ecx       # imm = 0xFFEFFFFF
ja 0x129f8
shrl $0x10, %eax
leaq 0x913c(%rip), %rdi      # 0x1bb30
movl %eax, %esi
jmp 0x12a24
movq %rax, %rcx
shrq $0x20, %rcx
movzwl %cx, %esi
leal -0xd(%rsi), %ecx
cmpl $-0xd, %ecx
ja 0x12a13
leaq 0x9145(%rip), %rdi      # 0x1bb56
jmp 0x12a24
movzwl %ax, %esi
xorl %eax, %eax
cmpl $0x11, %esi
jb 0x12a2e
leaq 0x9153(%rip), %rdi      # 0x1bb77
xorl %eax, %eax
callq 0xd160
pushq $-0x1
popq %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb1/vrb1_cfg_parser.c
// Function: vrb1_range_check
int
vrb1_range_check(struct vrb1_conf *vrb1_conf)
{
	uint16_t totalQgs = vrb1_conf->q_ul_4g.num_qgroups +
			vrb1_conf->q_ul_5g.num_qgroups +
			vrb1_conf->q_dl_4g.num_qgroups +
			vrb1_conf->q_dl_5g.num_qgroups +
			vrb1_conf->q_fft.num_qgroups;
	if (totalQgs > VRB1_NUM_QGRPS) {
		printf("ERROR: Number of Qgroups %d > %d\n",
				totalQgs, VRB1_NUM_QGRPS);
		return -1;
	}
	if (vrb1_conf->num_vf_bundles > VRB1_NUM_VFS) {
		printf("ERROR: Number of VFs bundle %d > %d\n",
				vrb1_conf->num_vf_bundles, VRB1_NUM_VFS);
		return -1;
	}
	if (vrb1_queue_range_check(vrb1_conf->q_ul_4g) != 0)
		return -1;
	if (vrb1_queue_range_check(vrb1_conf->q_dl_4g) != 0)
		return -1;
	if (vrb1_queue_range_check(vrb1_conf->q_ul_5g) != 0)
		return -1;
	if (vrb1_queue_range_check(vrb1_conf->q_dl_5g) != 0)
		return -1;
	if (vrb1_queue_range_check(vrb1_conf->q_fft) != 0)
		return -1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movzwl 0x12(%rdi), %eax
addw 0x6(%rdi), %ax
addw 0xc(%rdi), %ax
addw 0x18(%rdi), %ax
addw 0x1e(%rdi), %ax
cmpw $0x11, %ax
jb 0x12a59
movzwl %ax, %esi
leaq 0x9145(%rip), %rdi      # 0x1bb9c
jmp 0x12a6c
movq %rdi, %rbx
movzwl 0x4(%rdi), %esi
cmpl $0x11, %esi
jb 0x12a82
leaq 0x9152(%rip), %rdi      # 0x1bbbe
pushq $0x10
popq %rdx
xorl %eax, %eax
callq 0xd160
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl 0x6(%rbx), %eax
movzwl 0xa(%rbx), %edi
shlq $0x20, %rdi
orq %rax, %rdi
callq 0x129d8
pushq $-0x1
popq %rbp
testl %eax, %eax
jne 0x12a79
movl 0xc(%rbx), %eax
movl 0x10(%rbx), %edi
shlq $0x20, %rdi
orq %rax, %rdi
callq 0x129d8
testl %eax, %eax
jne 0x12a79
movl 0x12(%rbx), %eax
movzwl 0x16(%rbx), %edi
shlq $0x20, %rdi
orq %rax, %rdi
callq 0x129d8
testl %eax, %eax
jne 0x12a79
movl 0x18(%rbx), %eax
movl 0x1c(%rbx), %edi
shlq $0x20, %rdi
orq %rax, %rdi
callq 0x129d8
testl %eax, %eax
jne 0x12a79
movl 0x1e(%rbx), %eax
movzwl 0x22(%rbx), %edi
shlq $0x20, %rdi
orq %rax, %rdi
callq 0x129d8
xorl %ebp, %ebp
negl %eax
sbbl %ebp, %ebp
jmp 0x12a79
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb1/vrb1_cfg_parser.c
// Function: vrb1_parse_conf_file
int
vrb1_parse_conf_file(const char *file_name, struct vrb1_conf *vrb1_conf)
{
	int ret;

	set_default_config(vrb1_conf);

	ret = cfg_parse(file_name, vrb1_handler, vrb1_conf);
	if (ret != 0) {
		printf("ERROR: Config file parser error\n");
		set_default_config(vrb1_conf);
		return -1;
	}

	ret = vrb1_range_check(vrb1_conf);
	if (ret != 0) {
		printf("ERROR: Parameter out of range\n");
		set_default_config(vrb1_conf);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x12b5d
leaq 0x121(%rip), %rsi       # 0x12c37
movq %r14, %rdi
movq %rbx, %rdx
callq 0x13780
testl %eax, %eax
je 0x12b2e
leaq 0x9275(%rip), %rdi      # 0x1bda1
jmp 0x12b41
movq %rbx, %rdi
callq 0x12a30
testl %eax, %eax
je 0x12b59
leaq 0x9242(%rip), %rdi      # 0x1bd83
callq 0xd0c0
movq %rbx, %rdi
callq 0x12b5d
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x12b51
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/cfg_reader/cfg_reader.c
// Function: rstrip
static char*
rstrip(char *s)
{
	char *p = s + strlen(s);
	while (p > s) {
		p--;
		if (*p == ' ' || *s == '\t' || *p == '\n')
			*p = '\0';
		else
			break;
	}
	return s;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xd110
addq %rbx, %rax
cmpq %rbx, %rax
jbe 0x13735
movb -0x1(%rax), %cl
cmpb $0x20, %cl
je 0x1372d
cmpb $0xa, %cl
je 0x1372d
cmpb $0x9, (%rbx)
jne 0x13735
decq %rax
movb $0x0, (%rax)
jmp 0x13716
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/cfg_reader/cfg_reader.c
// Function: jump_to_targets_location
static char*
jump_to_targets_location(char *s, char *targets)
{
	if (targets == NULL) {
		while (*s && (*s != '\0'))
			s++;
		return s;
	}
	while (*s && (*s != '\0')) {
		if (strchr(targets, *s))
			break;
		s++;
	}
	return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x13762
movq %rsi, %r14
movsbl (%rbx), %esi
testl %esi, %esi
je 0x13775
movq %r14, %rdi
callq 0xd150
testq %rax, %rax
jne 0x13775
incq %rbx
jmp 0x13749
decq %rbx
movq %rbx, %rax
leaq 0x1(%rax), %rbx
cmpb $0x0, 0x1(%rax)
movq %rbx, %rax
jne 0x13768
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/cfg_reader/cfg_reader.c
// Function: cfg_parse
int
cfg_parse(const char *filename, cfg_handler handler, void *user)
{

	FILE *file;
	int error_line_index;
	file = fopen(filename, "r");
	if (!file) {
		printf("error, cannot load cfg files\n");
		return -1;
	}
	error_line_index = cfg_parse_contents(file, handler, user);
	fclose(file);
	return error_line_index;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x89be(%rip), %rsi      # 0x1c150
callq 0xd330
testq %rax, %rax
je 0x137bb
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x13560
movl %eax, %ebx
movq %r15, %rdi
callq 0xd0f0
movl %ebx, %eax
jmp 0x137ca
leaq 0x924e(%rip), %rdi      # 0x1ca10
callq 0xd0c0
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/cfg_reader/cfg_reader.c
// Function: cfg_file_check_path_safety
bool
cfg_file_check_path_safety(const char *cfg_filename) {
	if (cfg_filename == NULL) {
		/* check if the config path is "NULL" */
		return true;
	}
	int offset = 0;
	int len = strlen(cfg_filename) + 1;
	if (len < 3)
		return false;
	/* check if the config path includes "../" */
	for (offset = 0; offset <= len - 3; offset++) {
		int a = (*(cfg_filename + offset) == '.');
		int b = (*(cfg_filename + offset + 1) == '.');
		int c = (*(cfg_filename + offset + 2) == '/');
		if (a && b && c)
			return true;
	}
	return false;
}

// Assembly:
testq %rdi, %rdi
je 0x137ea
pushq %rbx
movq %rdi, %rbx
callq 0xd110
leal 0x1(%rax), %ecx
cmpl $0x3, %ecx
jge 0x137ee
xorl %ecx, %ecx
jmp 0x13814
movb $0x1, %cl
jmp 0x13815
decl %eax
xorl %edx, %edx
cmpq %rdx, %rax
setne %cl
je 0x13814
movq %rdx, %rsi
incq %rdx
cmpb $0x2e, (%rbx,%rsi)
jne 0x137f2
cmpb $0x2e, 0x1(%rbx,%rsi)
jne 0x137f2
cmpb $0x2f, 0x2(%rbx,%rsi)
jne 0x137f2
popq %rbx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb2/vrb2_cfg_app.c
// Function: vrb2_accFromQgid
int
vrb2_accFromQgid(int qg_idx, struct vrb2_conf *vrb2_conf)
{
	int accQg[VRB2_NUM_QGRPS];
	int NumQGroupsPerFn[NUM_ACC];
	int acc, qgIdx, qgIndex = 0;
	for (qgIdx = 0; qgIdx < VRB2_NUM_QGRPS; qgIdx++)
		accQg[qgIdx] = 0;
	NumQGroupsPerFn[UL_4G] = vrb2_conf->q_ul_4g.num_qgroups;
	NumQGroupsPerFn[UL_5G] = vrb2_conf->q_ul_5g.num_qgroups;
	NumQGroupsPerFn[DL_4G] = vrb2_conf->q_dl_4g.num_qgroups;
	NumQGroupsPerFn[DL_5G] = vrb2_conf->q_dl_5g.num_qgroups;
	NumQGroupsPerFn[FFT] = vrb2_conf->q_fft.num_qgroups;
	NumQGroupsPerFn[MLD] = vrb2_conf->q_mld.num_qgroups;
	for (acc = UL_4G;  acc < NUM_ACC; acc++)
		for (qgIdx = 0; qgIdx < NumQGroupsPerFn[acc]; qgIdx++)
			accQg[qgIndex++] = acc;
	acc = accQg[qg_idx];
	return acc;
}

// Assembly:
subq $0x28, %rsp
xorl %eax, %eax
cmpq $0x20, %rax
je 0x145e2
andl $0x0, -0x60(%rsp,%rax,4)
incq %rax
jmp 0x145d2
movzwl 0x6(%rsi), %eax
movl %eax, -0x80(%rsp)
movzwl 0x12(%rsi), %eax
movl %eax, -0x7c(%rsp)
movzwl 0xc(%rsi), %eax
movl %eax, -0x78(%rsp)
movzwl 0x18(%rsi), %eax
movl %eax, -0x74(%rsp)
movzwl 0x1e(%rsi), %eax
movl %eax, -0x70(%rsp)
movzwl 0x24(%rsi), %eax
movl %eax, -0x6c(%rsp)
xorl %eax, %eax
xorl %ecx, %ecx
xorl %edx, %edx
cmpq $0x6, %rcx
je 0x14648
movl -0x80(%rsp,%rcx,4), %r8d
testl %r8d, %r8d
cmovlel %eax, %r8d
movslq %edx, %rsi
movl %r8d, %edx
addl %esi, %edx
movslq %edx, %r8
cmpq %rsi, %r8
je 0x14643
movl %ecx, -0x60(%rsp,%rsi,4)
incq %rsi
jmp 0x14635
incq %rcx
jmp 0x14618
movslq %edi, %rax
movl -0x60(%rsp,%rax,4), %eax
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb2/vrb2_cfg_app.c
// Function: vrb2_qtopFromAcc
void
vrb2_qtopFromAcc(struct q_topology_t **qtop, int acc_enum,
		struct vrb2_conf *vrb2_conf)
{
	struct q_topology_t *p_qtop;
	p_qtop = NULL;
	switch (acc_enum) {
	case UL_4G:
		p_qtop = &(vrb2_conf->q_ul_4g);
		break;
	case UL_5G:
		p_qtop = &(vrb2_conf->q_ul_5g);
		break;
	case DL_4G:
		p_qtop = &(vrb2_conf->q_dl_4g);
		break;
	case DL_5G:
		p_qtop = &(vrb2_conf->q_dl_5g);
		break;
	case FFT:
		p_qtop = &(vrb2_conf->q_fft);
		break;
	case MLD:
		p_qtop = &(vrb2_conf->q_mld);
		break;
	default:
		/* NOTREACHED */
		LOG(ERR, "Unexpected error evaluating vrb2_qtopFromAcc %d", acc_enum);
		break;
	}
	*qtop = p_qtop;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x5, %esi
ja 0x1469b
movq %rdx, %r14
movl %ebp, %eax
leaq 0x8436(%rip), %rcx      # 0x1caa4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x6, %r14
jmp 0x146c5
addq $0x1e, %r14
jmp 0x146c5
addq $0xc, %r14
jmp 0x146c5
addq $0x18, %r14
jmp 0x146c5
addq $0x12, %r14
jmp 0x146c5
addq $0x24, %r14
jmp 0x146c5
callq 0x16020
leaq 0x20829(%rip), %rcx     # 0x34ed0
movq (%rcx), %r8
leaq 0x8863(%rip), %rdx      # 0x1cf14
xorl %r14d, %r14d
xorl %edi, %edi
xorl %esi, %esi
movq %rax, %rcx
movl %ebp, %r9d
xorl %eax, %eax
callq 0x19400
movq %r14, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb2/vrb2_cfg_app.c
// Function: vrb2_aqNum
int
vrb2_aqNum(int qg_idx, struct vrb2_conf *vrb2_conf)
{
	struct q_topology_t *q_top = NULL;
	int acc_enum = vrb2_accFromQgid(qg_idx, vrb2_conf);
	vrb2_qtopFromAcc(&q_top, acc_enum, vrb2_conf);
	if (q_top == NULL)
		return 0;
	return q_top->num_aqs_per_groups;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsp, %r14
andq $0x0, (%r14)
callq 0x145cc
movq %r14, %rdi
movl %eax, %esi
movq %rbx, %rdx
callq 0x14654
movq (%r14), %rax
testq %rax, %rax
je 0x146ff
movzwl 0x2(%rax), %eax
jmp 0x14701
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb2/vrb2_cfg_app.c
// Function: vrb2_cluster_reset
void vrb2_cluster_reset(void *dev)
{
	hw_device *accel_dev = (hw_device *)dev;
	void *bar0addr = accel_dev->bar0Addr;
	uint16_t template_idx;

	vrb2_disable_ir_regs(bar0addr);

	LOG(DEBUG, "VRB2 cluster reset");
	/* Disable Qmgr Template Configuration */
	for (template_idx = 0; template_idx < VRB2_NUM_TMPL; template_idx++) {
		vrb2_reg_write(bar0addr, HWPfQmgrGrpTmplateEnRegIndx +
				sizeof(uint32_t) * template_idx, 0);
	}
	/* Stop the DMA and wait for 100 usec */
	vrb2_reg_write(bar0addr, HWPfDmaSoftResetReg, 0x2);
	usleep(100);
	/* cluster reset */
	vrb2_reg_write(bar0addr, HWPfHiCoresHardResetReg, 0xFFFFFFFF);
	vrb2_reg_write(bar0addr, HWPfHi5GHardResetReg, 0xFFFFFFFF);
	vrb2_reg_write(bar0addr, HWPfHiHardResetReg, 0x3FF);
	/* wait for 10 usecs */
	usleep(10);
	vrb2_reset_info_ring(accel_dev);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0xb0(%rdi), %r14
movq %r14, %rdi
callq 0x14831
callq 0x16020
leaq 0x207a1(%rip), %rcx     # 0x34ed0
movq 0x18(%rcx), %r8
leaq 0x8811(%rip), %rdx      # 0x1cf4b
leaq 0x882a(%rip), %r9       # 0x1cf6b
xorl %r15d, %r15d
pushq $0x3
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
pushq $0x1
popq %rbp
cmpq $0x20, %r15
je 0x14774
movl $0x0, 0xa00e00(%r14,%r15,4)
movl %ebp, %edi
callq 0xd460
incq %r15
jmp 0x14756
movl $0x2, 0xb8000c(%r14)
pushq $0x1
popq %rbp
movl %ebp, %edi
callq 0xd460
pushq $0x64
popq %rdi
callq 0xd460
pushq $-0x1
popq %r15
movl %r15d, 0xc84010(%r14)
movl %ebp, %edi
callq 0xd460
movl %r15d, 0xc8400c(%r14)
movl %ebp, %edi
callq 0xd460
movl $0x3ff, %r15d           # imm = 0x3FF
movl %r15d, 0xc84008(%r14)
movl %ebp, %edi
callq 0xd460
pushq $0xa
popq %rdi
callq 0xd460
movq 0x98(%rbx), %r14
movq 0xb0(%rbx), %r12
movq %r14, %rax
shrq $0x20, %rax
movl %eax, 0xc8401c(%r12)
movl %ebp, %edi
callq 0xd460
movl %r14d, 0xc84014(%r12)
movl %ebp, %edi
callq 0xd460
movl $0xf000, 0xc8401c(%r12) # imm = 0xF000
movl %ebp, %edi
callq 0xd460
movl 0xc8401c(%r12), %eax
shrl $0x2, %eax
andl %r15d, %eax
movw %ax, 0xa8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb2/vrb2_cfg_app.c
// Function: vrb2_disable_ir_regs
static void
vrb2_disable_ir_regs(uint8_t *bar0addr)
{
	/* Disable all interrupts and IR */
	vrb2_reg_write(bar0addr, HWPfHiInfoRingIntWrEnRegPf, 0x0);
	vrb2_reg_write(bar0addr, HWPfHiCfgMsiIntWrEnRegPf, 0xFFFFFFFF);
	vrb2_reg_write(bar0addr, HWPfHiInfoRingVf2pfLoWrEnReg, 0x0);
	vrb2_reg_write(bar0addr, HWPfHiInfoRingVf2pfHiWrEnReg, 0x0);
	vrb2_reg_write(bar0addr, HWPfHiCfgMsiVf2pfHighWrEnReg, 0xFFFFFFFF);
	vrb2_reg_write(bar0addr, HWPfHiCfgMsiVf2pfLoWrEnReg, 0xFFFFFFFF);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movl %r14d, 0xc84020(%rdi)
pushq $0x1
popq %rbp
movl %ebp, %edi
callq 0xd460
pushq $-0x1
popq %r15
movl %r15d, 0xc84040(%rbx)
movl %ebp, %edi
callq 0xd460
movl %r14d, 0xc84024(%rbx)
movl %ebp, %edi
callq 0xd460
movl %r14d, 0xc84028(%rbx)
movl %ebp, %edi
callq 0xd460
movl %r15d, 0xc84048(%rbx)
movl %ebp, %edi
callq 0xd460
movl %r15d, 0xc84044(%rbx)
movl %ebp, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xd460
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb2/vrb2_cfg_app.c
// Function: vrb2_enable_intr
int vrb2_enable_intr(void *dev)
{
	int ret;
	hw_device *accel_pci_dev = (hw_device *)dev;
	void *bar0addr = accel_pci_dev->bar0Addr;

	LOG(DEBUG, "Enable VRB2 interrupts");
	/* allocate info ring */
	ret = vrb2_allocate_info_ring(dev);
	if (ret < 0) {
		LOG(ERR, "vrb2allocate info ring failed");
		return -1;
	}

	vrb2_enable_ir_regs(bar0addr);

	LOG(DEBUG, "Done");
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq 0xb0(%rdi), %r13
callq 0x16020
leaq 0x20609(%rip), %r15     # 0x34ed0
movq 0x18(%r15), %r8
leaq 0x86ac(%rip), %rdx      # 0x1cf7e
leaq 0x86c9(%rip), %r9       # 0x1cfa2
xorl %ebx, %ebx
pushq $0x3
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
cmpq $0x0, 0x90(%r14)
jne 0x14a09
movq %r15, %rbp
movq 0xb0(%r14), %r12
leaq 0x98(%r14), %rdx
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
callq 0x18739
movq %rax, %r15
movq %rax, 0x90(%r14)
callq 0x16020
testq %r15, %r15
je 0x14a9b
movq %rbp, %r15
movq 0x18(%rbp), %r8
movups 0x90(%r14), %xmm0
movups %xmm0, (%rsp)
leaq 0x7e6c(%rip), %rdx      # 0x1c7b4
leaq 0x8dd3(%rip), %r9       # 0x1d722
pushq $0x3
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
movl 0x9c(%r14), %eax
movl %eax, 0xc84018(%r12)
pushq $0x1
popq %rbp
movl %ebp, %edi
callq 0xd460
movl 0x98(%r14), %eax
movl %eax, 0xc84014(%r12)
movl %ebp, %edi
callq 0xd460
movl $0xf000, 0xc8401c(%r12) # imm = 0xF000
movl %ebp, %edi
callq 0xd460
movl 0xc8401c(%r12), %eax
shrl $0x2, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, 0xa8(%r14)
movq 0x90(%r14), %rax
testq %rax, %rax
je 0x149d8
xorl %ecx, %ecx
cmpq $0x400, %rcx            # imm = 0x400
je 0x149d8
andl $0x0, (%rax,%rcx,4)
incq %rcx
jmp 0x149c6
callq 0x16020
movq 0x18(%r15), %r8
movzwl 0xa8(%r14), %ecx
movl %ecx, (%rsp)
leaq 0x7e0a(%rip), %rdx      # 0x1c7fd
leaq 0x8d28(%rip), %r9       # 0x1d722
pushq $0x3
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
pushq $-0x1
popq %r14
movl %r14d, 0xc84020(%r13)
pushq $0x1
popq %rbp
movl %ebp, %edi
callq 0xd460
movl %r14d, 0xc84040(%r13)
movl %ebp, %edi
callq 0xd460
movl %r14d, 0xc84028(%r13)
movl %ebp, %edi
callq 0xd460
movl %r14d, 0xc84024(%r13)
movl %ebp, %edi
callq 0xd460
movl %r14d, 0xc84048(%r13)
movl %ebp, %edi
callq 0xd460
movl %r14d, 0xc84044(%r13)
movl %ebp, %edi
callq 0xd460
callq 0x16020
movq 0x18(%r15), %r8
leaq 0x6ab0(%rip), %rdx      # 0x1b524
leaq 0x8527(%rip), %r9       # 0x1cfa2
pushq $0x3
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbp), %r8
leaq 0x7ce0(%rip), %rdx      # 0x1c786
xorl %edi, %edi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
callq 0x16020
movq (%rbp), %r8
leaq 0x84ef(%rip), %rdx      # 0x1cfb3
xorl %edi, %edi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
pushq $-0x1
popq %rbx
jmp 0x14a8a
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb2/vrb2_cfg_app.c
// Function: vrb2_disable_intr
int
vrb2_disable_intr(void *dev)
{
	hw_device *accel_pci_dev = (hw_device *)dev;
	void *bar0addr = accel_pci_dev->bar0Addr;

	LOG(DEBUG, "Disable interrupts");

	vrb2_disable_ir_regs(bar0addr);

	vrb2_free_info_ring(dev);

	LOG(DEBUG, "Done");
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xb0(%rdi), %r14
callq 0x16020
leaq 0x203dc(%rip), %r15     # 0x34ed0
movq 0x18(%r15), %r8
leaq 0x77aa(%rip), %rdx      # 0x1c2a9
leaq 0x84d2(%rip), %r9       # 0x1cfd8
pushq $0x3
popq %rbp
movl %ebp, %edi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
movq %r14, %rdi
callq 0x14831
callq 0x16020
movq 0x18(%r15), %r8
leaq 0x7cee(%rip), %rdx      # 0x1c81d
leaq 0x8c04(%rip), %r9       # 0x1d73a
movl %ebp, %edi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x14b98
leaq 0x90(%rbx), %r14
movq 0xa0(%rbx), %rsi
callq 0x18753
andw $0x0, 0xa8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
callq 0x16020
movq 0x18(%r15), %r8
leaq 0x69a2(%rip), %rdx      # 0x1b524
leaq 0x8bb1(%rip), %r9       # 0x1d73a
pushq $0x3
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
callq 0x16020
movq 0x18(%r15), %r8
leaq 0x697c(%rip), %rdx      # 0x1b524
leaq 0x8429(%rip), %r9       # 0x1cfd8
pushq $0x3
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %eax, %eax
callq 0x19400
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb2/vrb2_cfg_app.c
// Function: vrb2_disable_int_src
static void vrb2_disable_int_src(uint8_t *bar0addr, int int_src)
{
	uint32_t mask;

	mask = vrb2_reg_read(bar0addr, HWPfHiInfoRingIntWrEnRegPf);
	mask &= (0xFFFFFFFF - (1ULL << int_src));
	LOG(INFO, "Disable the Interrupt source %d new mask %x", int_src, mask);
	vrb2_reg_write(bar0addr, HWPfHiInfoRingIntWrEnRegPf, mask);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
pushq $-0x1
popq %r15
movl %ebx, %ecx
shlq %cl, %r15
movq %rdi, %r14
decl %r15d
andl 0xc84020(%rdi), %r15d
callq 0x16020
leaq 0x1ee39(%rip), %rcx     # 0x34ed0
movq 0x10(%rcx), %r8
movl %r15d, (%rsp)
leaq 0x7322(%rip), %rdx      # 0x1d3c8
pushq $0x2
popq %rdi
xorl %esi, %esi
movq %rax, %rcx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x19400
movl %r15d, 0xc84020(%r14)
pushq $0x1
popq %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xd460
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb2/vrb2_cfg_parser.c
// Function: vrb2_queue_range_check
int
vrb2_queue_range_check(struct q_topology_t q_conf)
{
	if ((q_conf.num_aqs_per_groups < 1) ||
			(q_conf.num_aqs_per_groups > VRB2_NUM_AQS)) {
		printf("ERROR: Number of AQs out of range %d\n",
				q_conf.num_aqs_per_groups);
		return -1;
	}
	if ((q_conf.aq_depth_log2 < 1) ||
			(q_conf.aq_depth_log2 > VRB2_MAX_QDEPTH)) {
		printf("ERROR: AQ Depth out of range %d\n",
				q_conf.aq_depth_log2);
		return -1;
	}
	if (q_conf.num_qgroups > VRB2_NUM_QGRPS) {
		printf("ERROR: Number of QG out of range %d\n",
				q_conf.num_qgroups);
		return -1;
	}
	if (q_conf.num_qgroups * q_conf.num_aqs_per_groups > VRB2_MAX_QGRPS_PER_OP) {
		printf("ERROR: Number of queues per op out of range %d %d\n",
				q_conf.num_qgroups * q_conf.num_aqs_per_groups,
				VRB2_MAX_QGRPS_PER_OP);
		return -1;
	}
	return 0;
}

// Assembly:
pushq %rax
movl %edi, %esi
shrl $0x10, %esi
leal -0x410000(%rdi), %eax
cmpl $0xffbfffff, %eax       # imm = 0xFFBFFFFF
ja 0x1631c
leaq 0x5816(%rip), %rdi      # 0x1bb30
jmp 0x1634a
movq %rdi, %rax
shrq $0x20, %rax
movzwl %ax, %eax
leal -0x9(%rax), %ecx
cmpl $-0x9, %ecx
ja 0x16339
leaq 0x5821(%rip), %rdi      # 0x1bb56
movl %eax, %esi
jmp 0x1634a
movzwl %di, %ecx
cmpl $0x21, %ecx
jb 0x16356
leaq 0x582f(%rip), %rdi      # 0x1bb77
movl %ecx, %esi
xorl %eax, %eax
callq 0xd160
pushq $-0x1
popq %rax
popq %rcx
retq
imull %esi, %ecx
xorl %eax, %eax
cmpl $0x101, %ecx            # imm = 0x101
jb 0x16354
leaq 0x7556(%rip), %rdi      # 0x1d8c0
movl %ecx, %esi
movl $0x100, %edx            # imm = 0x100
xorl %eax, %eax
callq 0xd160
jmp 0x16351
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb2/vrb2_cfg_parser.c
// Function: vrb2_range_check
int
vrb2_range_check(struct vrb2_conf *vrb2_conf)
{
	uint16_t totalQgs = vrb2_conf->q_ul_4g.num_qgroups +
			vrb2_conf->q_ul_5g.num_qgroups +
			vrb2_conf->q_dl_4g.num_qgroups +
			vrb2_conf->q_dl_5g.num_qgroups +
			vrb2_conf->q_fft.num_qgroups +
			vrb2_conf->q_mld.num_qgroups;
	if (totalQgs > VRB2_NUM_QGRPS) {
		printf("ERROR: Number of Qgroups %d > %d\n",
				totalQgs, VRB2_NUM_QGRPS);
		return -1;
	}
	if (vrb2_conf->num_vf_bundles > VRB2_NUM_VFS) {
		printf("ERROR: Number of VFs bundle %d > %d\n",
				vrb2_conf->num_vf_bundles, VRB2_NUM_VFS);
		return -1;
	}
	if (vrb2_queue_range_check(vrb2_conf->q_ul_4g) != 0)
		return -1;
	if (vrb2_queue_range_check(vrb2_conf->q_dl_4g) != 0)
		return -1;
	if (vrb2_queue_range_check(vrb2_conf->q_ul_5g) != 0)
		return -1;
	if (vrb2_queue_range_check(vrb2_conf->q_dl_5g) != 0)
		return -1;
	if (vrb2_queue_range_check(vrb2_conf->q_fft) != 0)
		return -1;
	if (vrb2_queue_range_check(vrb2_conf->q_mld) != 0)
		return -1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movzwl 0x12(%rdi), %eax
addw 0x6(%rdi), %ax
addw 0xc(%rdi), %ax
addw 0x18(%rdi), %ax
addw 0x1e(%rdi), %ax
addw 0x24(%rdi), %ax
cmpw $0x21, %ax
jb 0x163a9
movzwl %ax, %esi
leaq 0x57f7(%rip), %rdi      # 0x1bb9c
pushq $0x20
jmp 0x163be
movq %rdi, %rbx
movzwl 0x4(%rdi), %esi
cmpl $0x41, %esi
jb 0x163d2
leaq 0x5802(%rip), %rdi      # 0x1bbbe
pushq $0x40
popq %rdx
xorl %eax, %eax
callq 0xd160
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl 0x6(%rbx), %eax
movzwl 0xa(%rbx), %edi
shlq $0x20, %rdi
orq %rax, %rdi
callq 0x16300
pushq $-0x1
popq %rbp
testl %eax, %eax
jne 0x163c9
movl 0xc(%rbx), %eax
movl 0x10(%rbx), %edi
shlq $0x20, %rdi
orq %rax, %rdi
callq 0x16300
testl %eax, %eax
jne 0x163c9
movl 0x12(%rbx), %eax
movzwl 0x16(%rbx), %edi
shlq $0x20, %rdi
orq %rax, %rdi
callq 0x16300
testl %eax, %eax
jne 0x163c9
movl 0x18(%rbx), %eax
movl 0x1c(%rbx), %edi
shlq $0x20, %rdi
orq %rax, %rdi
callq 0x16300
testl %eax, %eax
jne 0x163c9
movl 0x1e(%rbx), %eax
movzwl 0x22(%rbx), %edi
shlq $0x20, %rdi
orq %rax, %rdi
callq 0x16300
testl %eax, %eax
jne 0x163c9
movl 0x24(%rbx), %eax
movl 0x28(%rbx), %edi
shlq $0x20, %rdi
orq %rax, %rdi
callq 0x16300
xorl %ebp, %ebp
negl %eax
sbbl %ebp, %ebp
jmp 0x163c9
// File: /workspace/github_c_makefile_star2_O2/intel[P]pf-bb-config/vrb2/vrb2_cfg_parser.c
// Function: vrb2_parse_conf_file
int
vrb2_parse_conf_file(const char *file_name, struct vrb2_conf *vrb2_conf)
{
	int ret;

	set_default_config(vrb2_conf);

	ret = cfg_parse(file_name, vrb2_handler, vrb2_conf);
	if (ret != 0) {
		printf("ERROR: Config file parser error\n");
		set_default_config(vrb2_conf);
		return -1;
	}

	ret = vrb2_range_check(vrb2_conf);
	if (ret != 0) {
		printf("ERROR: Parameter out of range\n");
		set_default_config(vrb2_conf);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x164c3
leaq 0x13b(%rip), %rsi       # 0x165b7
movq %r14, %rdi
movq %rbx, %rdx
callq 0x13780
testl %eax, %eax
je 0x16494
leaq 0x590f(%rip), %rdi      # 0x1bda1
jmp 0x164a7
movq %rbx, %rdi
callq 0x1637a
testl %eax, %eax
je 0x164bf
leaq 0x58dc(%rip), %rdi      # 0x1bd83
callq 0xd0c0
movq %rbx, %rdi
callq 0x164c3
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x164b7