LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/intel[P]pf-bb-config/fpga_5gnr/fpga_5gnr_cfg_parser.c
// Function: set_default_config
static void
set_default_config(struct fpga_5gnr_fec_conf *fpga_conf)
{
	int i;

	/* Set pf mode to true */
	fpga_conf->pf_mode_en = DEFAULT_PF_MODE_EN;

	/* Set ratio between UL and DL to 1:1 (unit of weight is 3 CBs) */
	fpga_conf->ul_bandwidth = DEFAULT_UL_BANDWIDTH;
	fpga_conf->dl_bandwidth = DEFAULT_DL_BANDWIDTH;

	/* Set Load Balance Factor to 64 */
	fpga_conf->ul_load_balance = DEFAULT_UL_LOAD_BALANCE;
	fpga_conf->dl_load_balance = DEFAULT_DL_LOAD_BALANCE;

	for (i = 0; i < FPGA_5GNR_FEC_NUM_VFS; i++) {
		fpga_conf->vf_ul_queues_number[i] = DEFAULT_NUM_VF_QUEUE / 2;
		fpga_conf->vf_dl_queues_number[i] = DEFAULT_NUM_VF_QUEUE / 2;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb $0x1, (%rax)
movq -0x8(%rbp), %rax
movb $0x3, 0x11(%rax)
movq -0x8(%rbp), %rax
movb $0x3, 0x12(%rax)
movq -0x8(%rbp), %rax
movb $0x40, 0x13(%rax)
movq -0x8(%rbp), %rax
movb $0x40, 0x14(%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x8, -0xc(%rbp)
jge 0x13071
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movb $0x4, 0x1(%rax,%rcx)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movb $0x4, 0x9(%rax,%rcx)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x13046
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_irq_handler
int
vrb1_irq_handler(void *dev)
{
	hw_device *accel_pci_dev = (hw_device *)dev;
	uint8_t *bar0addr = accel_pci_dev->bar0Addr;
	uint32_t vf_index, status;
	/* No infoRing data available */

	/* Check first VF2PF comms */
	for (vf_index = 0; vf_index < VRB1_NUM_VFS; vf_index++) {
		status = vrb1_reg_read(bar0addr, HWPfHiVfToPfDbellVf +
				BB_ACC_PF_TO_VF_DBELL_REG_OFFSET * vf_index);
		if (status != 0) {
			vrb1_pfvf(dev, vf_index, status);
			LOG(DEBUG, "door bell %d %d", vf_index, status);
		}
	}
	/* Check for device error */
	vrb1_device_error(dev, VRB1_ITR_UNDEFINED);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x10, -0x1c(%rbp)
jae 0x13528
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
shll $0x8, %esi
addl $0xc80000, %esi         # imm = 0xC80000
callq 0x13540
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x1351b
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
callq 0x13570
callq 0x16250
movq %rax, %rcx
leaq 0x283e4(%rip), %rax     # 0x3b8d0
movq 0x18(%rax), %r8
movl -0x1c(%rbp), %r10d
movl -0x20(%rbp), %eax
movl $0x3, %edi
xorl %esi, %esi
leaq 0x10c5b(%rip), %rdx     # 0x24160
leaq 0x10c71(%rip), %r9      # 0x2417d
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x216e0
jmp 0x1351d
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x134aa
movq -0x8(%rbp), %rdi
movl $0x1f, %esi
callq 0x13820
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq 0x12c37(%rip), %rdx     # 0x269d6
movq %rsi, %rdi
movb $0x0, %al
callq 0xd160
addl $0x8, %eax
movw %ax, -0x32(%rbp)
movzwl -0x32(%rbp), %eax
movl %eax, %edi
callq 0xd280
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rdx
leaq 0x103f0(%rip), %rsi     # 0x241be
movb $0x0, %al
callq 0xd3e0
movq -0x28(%rbp), %rdi
leaq 0x103ac(%rip), %rsi     # 0x2418c
callq 0xd320
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0xd030
cmpq $0x0, -0x30(%rbp)
jne 0x13e26
callq 0x16250
movq %rax, %rcx
leaq 0x27ac8(%rip), %rax     # 0x3b8d0
movq (%rax), %r8
movq -0x8(%rbp), %r9
xorl %esi, %esi
leaq 0x103b0(%rip), %rdx     # 0x241c8
movl %esi, %edi
movb $0x0, %al
callq 0x216e0
jmp 0x13ecc
leaq -0x1a(%rbp), %rdi
movq -0x30(%rbp), %rdx
movl $0x5, %esi
callq 0xd1d0
cmpq $0x0, %rax
jne 0x13e71
callq 0x16250
movq %rax, %rcx
leaq 0x27a83(%rip), %rax     # 0x3b8d0
movq (%rax), %r8
movq -0x8(%rbp), %r9
xorl %esi, %esi
leaq 0x1038c(%rip), %rdx     # 0x241e9
movl %esi, %edi
movb $0x0, %al
callq 0x216e0
movq -0x30(%rbp), %rdi
callq 0xd150
jmp 0x13ecc
leaq -0x1a(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0xd220
movw %ax, -0x12(%rbp)
callq 0x16250
movq %rax, %rcx
leaq 0x27a3a(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movzwl -0x12(%rbp), %r9d
movl $0x2, %edi
xorl %esi, %esi
leaq 0x1035f(%rip), %rdx     # 0x2420c
movb $0x0, %al
callq 0x216e0
movq -0x30(%rbp), %rdi
callq 0xd150
movw -0x12(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x4fc(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x7c(%rbp)
movl $0x0, -0x78(%rbp)
cmpl $0x10, -0x78(%rbp)
jge 0x13f16
movslq -0x78(%rbp), %rax
movl $0x0, -0x50(%rbp,%rax,4)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x13ef9
movq -0x10(%rbp), %rax
movzwl 0x6(%rax), %eax
movl %eax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x12(%rax), %eax
movl %eax, -0x6c(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xc(%rax), %eax
movl %eax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x18(%rax), %eax
movl %eax, -0x64(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x1e(%rax), %eax
movl %eax, -0x60(%rbp)
movl $0x0, -0x74(%rbp)
cmpl $0x5, -0x74(%rbp)
jge 0x13f9a
movl $0x0, -0x78(%rbp)
movl -0x78(%rbp), %eax
movslq -0x74(%rbp), %rcx
cmpl -0x70(%rbp,%rcx,4), %eax
jge 0x13f8d
movl -0x74(%rbp), %ecx
movl -0x7c(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x7c(%rbp)
cltq
movl %ecx, -0x50(%rbp,%rax,4)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x13f61
jmp 0x13f8f
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x13f54
movslq -0x4(%rbp), %rax
movl -0x50(%rbp,%rax,4), %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x28(%rbp)
subq $0x4, %rax
ja 0x14032
movq -0x28(%rbp), %rax
leaq 0x10169(%rip), %rcx     # 0x2414c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x20(%rbp)
jmp 0x14043
movq -0x18(%rbp), %rax
addq $0x12, %rax
movq %rax, -0x20(%rbp)
jmp 0x14043
movq -0x18(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x20(%rbp)
jmp 0x14043
movq -0x18(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
jmp 0x14043
movq -0x18(%rbp), %rax
addq $0x1e, %rax
movq %rax, -0x20(%rbp)
jmp 0x14043
movl -0xc(%rbp), %esi
leaq 0x101ef(%rip), %rdi     # 0x2422b
movb $0x0, %al
callq 0xd140
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x13ee0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rdi
callq 0x13fb0
cmpq $0x0, -0x18(%rbp)
jne 0x140a6
movl $0x1, -0x4(%rbp)
jmp 0x140d2
movq -0x18(%rbp), %rax
movzwl 0x4(%rax), %ecx
movl $0x1, %eax
cmpl %ecx, %eax
jl 0x140c1
movl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x140cc
movq -0x18(%rbp), %rax
movzwl 0x4(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x13ee0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rdi
callq 0x13fb0
cmpq $0x0, -0x18(%rbp)
jne 0x14126
movl $0x0, -0x4(%rbp)
jmp 0x14131
movq -0x18(%rbp), %rax
movzwl 0x2(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x10, -0xc(%rbp)
jae 0x14200
movl $0x0, -0x10(%rbp)
cmpl $0x10, -0x10(%rbp)
jae 0x141f3
movl -0xc(%rbp), %eax
shlq $0x2, %rax
addq $0xa10000, %rax         # imm = 0xA10000
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x10(%rbp), %edx
shll $0x10, %edx
callq 0x14210
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x141c0
jmp 0x141f5
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x141b3
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x14390
callq 0x16250
movq %rax, %rcx
leaq 0x27655(%rip), %rax     # 0x3b8d0
movq 0x18(%rax), %r8
movl $0x3, %edi
xorl %esi, %esi
leaq 0xffcc(%rip), %rdx      # 0x24259
leaq 0xffe4(%rip), %r9       # 0x24278
movb $0x0, %al
callq 0x216e0
movq -0x18(%rbp), %rdi
callq 0x141a0
movw $0x0, -0x1a(%rbp)
movzwl -0x1a(%rbp), %eax
cmpl $0x20, %eax
jge 0x142dc
movq -0x18(%rbp), %rdi
movzwl -0x1a(%rbp), %eax
shlq $0x2, %rax
addq $0xa00a00, %rax         # imm = 0xA00A00
movl %eax, %esi
xorl %edx, %edx
callq 0x14210
movw -0x1a(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x1a(%rbp)
jmp 0x142aa
movq -0x18(%rbp), %rdi
movl $0xc84018, %esi         # imm = 0xC84018
xorl %edx, %edx
callq 0x14210
movq -0x18(%rbp), %rdi
movl $0xb8000c, %esi         # imm = 0xB8000C
movl $0x2, %edx
callq 0x14210
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xd450
movq -0x18(%rbp), %rdi
movl $0xb8000c, %esi         # imm = 0xB8000C
xorl %edx, %edx
callq 0x14210
movw $0x0, -0x1c(%rbp)
movzwl -0x1c(%rbp), %eax
cmpl $0x2, %eax
jge 0x14379
movq -0x18(%rbp), %rdi
movl $0xc84010, %esi         # imm = 0xC84010
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x14210
movq -0x18(%rbp), %rdi
movl $0xc8400c, %esi         # imm = 0xC8400C
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x14210
movq -0x18(%rbp), %rdi
movl $0xc84008, %esi         # imm = 0xC84008
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x14210
movl $0xa, %edi
callq 0xd450
movw -0x1c(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x1c(%rbp)
jmp 0x1431f
movq -0x10(%rbp), %rdi
callq 0x14410
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_disable_ir_regs
static void
vrb1_disable_ir_regs(uint8_t *bar0addr)
{
	/* disable all interrupts and IR */
	vrb1_reg_fast_write(bar0addr, HWPfHiInfoRingIntWrEnRegPf, 0x0);
	vrb1_reg_fast_write(bar0addr, HWPfHiCfgMsiIntWrEnRegPf, 0xFFFFFFFF);
	vrb1_reg_fast_write(bar0addr, HWPfHiInfoRingVf2pfLoWrEnReg, 0x0);
	vrb1_reg_fast_write(bar0addr, HWPfHiInfoRingVf2pfHiWrEnReg, 0x0);
	vrb1_reg_fast_write(bar0addr, HWPfHiCfgMsiVf2pfHighWrEnReg, 0xFFFFFFFF);
	vrb1_reg_fast_write(bar0addr, HWPfHiCfgMsiVf2pfLoWrEnReg, 0xFFFFFFFF);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0xc84020, %esi         # imm = 0xC84020
xorl %edx, %edx
callq 0x14210
movq -0x8(%rbp), %rdi
movl $0xc84040, %esi         # imm = 0xC84040
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x14210
movq -0x8(%rbp), %rdi
movl $0xc84024, %esi         # imm = 0xC84024
xorl %edx, %edx
callq 0x14210
movq -0x8(%rbp), %rdi
movl $0xc84028, %esi         # imm = 0xC84028
xorl %edx, %edx
callq 0x14210
movq -0x8(%rbp), %rdi
movl $0xc84048, %esi         # imm = 0xC84048
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x14210
movq -0x8(%rbp), %rdi
movl $0xc84044, %esi         # imm = 0xC84044
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x14210
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_reset_info_ring
static void
vrb1_reset_info_ring(hw_device *accel_dev)
{
	uint32_t phys_high, phys_low, i, *ring_data;
	hw_device *accel_pci_dev = (hw_device *)accel_dev;
	uint8_t *bar0addr = accel_dev->bar0Addr;

	/* Set back the Info Ring base addresses */
	phys_high = (uint32_t) (accel_pci_dev->info_ring_phys_addr >> 32);
	phys_low = (uint32_t) (accel_pci_dev->info_ring_phys_addr);
	vrb1_reg_fast_write(bar0addr, HWPfHiInfoRingPointerRegPf, phys_high);
	vrb1_reg_fast_write(bar0addr, HWPfHiInfoRingBaseLoRegPf, phys_low);

	/* Clean up the ring and adjust pointer */
	vrb1_reg_fast_write(bar0addr, HWPfHiInfoRingPointerRegPf, 0xF000);
	accel_pci_dev->info_ring_head =
			(vrb1_reg_read(bar0addr, HWPfHiInfoRingPointerRegPf) & 0xFFF) /
			sizeof(uint32_t);
	/* Clear explicitly content of Info Ring */
	if (accel_pci_dev->info_ring != NULL) {
		for (i = 0; i < VRB1_INFO_RING_NUM_ENTRIES; i++) {
			ring_data = accel_pci_dev->info_ring + i;
			*ring_data = 0;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x98(%rax), %rax
shrq $0x20, %rax
movl %eax, -0xc(%rbp)
movq -0x28(%rbp), %rax
movq 0x98(%rax), %rax
movl %eax, -0x10(%rbp)
movq -0x30(%rbp), %rdi
movl -0xc(%rbp), %edx
movl $0xc8401c, %esi         # imm = 0xC8401C
callq 0x14210
movq -0x30(%rbp), %rdi
movl -0x10(%rbp), %edx
movl $0xc84014, %esi         # imm = 0xC84014
callq 0x14210
movq -0x30(%rbp), %rdi
movl $0xc8401c, %esi         # imm = 0xC8401C
movl $0xf000, %edx           # imm = 0xF000
callq 0x14210
movq -0x30(%rbp), %rdi
movl $0xc8401c, %esi         # imm = 0xC8401C
callq 0x13540
andl $0xfff, %eax            # imm = 0xFFF
movl %eax, %eax
shrq $0x2, %rax
movw %ax, %cx
movq -0x28(%rbp), %rax
movw %cx, 0xa8(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0x144f9
movl $0x0, -0x14(%rbp)
cmpl $0x400, -0x14(%rbp)     # imm = 0x400
jae 0x144f7
movq -0x28(%rbp), %rax
movq 0x90(%rax), %rax
movl -0x14(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x144c4
jmp 0x144f9
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x28(%rbp)
callq 0x16250
movq %rax, %rcx
leaq 0x2739e(%rip), %rax     # 0x3b8d0
movq 0x18(%rax), %r8
movl $0x3, %edi
xorl %esi, %esi
leaq 0xfd47(%rip), %rdx      # 0x2428b
leaq 0xfd64(%rip), %r9       # 0x242af
movb $0x0, %al
callq 0x216e0
movq -0x10(%rbp), %rdi
callq 0x145e0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x14591
callq 0x16250
movq %rax, %rcx
leaq 0x2735d(%rip), %rax     # 0x3b8d0
movq (%rax), %r8
xorl %esi, %esi
leaq 0xfd41(%rip), %rdx      # 0x242c0
movl %esi, %edi
movb $0x0, %al
callq 0x216e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x145d0
movq -0x28(%rbp), %rdi
callq 0x14750
callq 0x16250
movq %rax, %rcx
leaq 0x27327(%rip), %rax     # 0x3b8d0
movq 0x18(%rax), %r8
movl $0x3, %edi
xorl %esi, %esi
leaq 0xf107(%rip), %rdx      # 0x236c2
leaq 0xfced(%rip), %r9       # 0x242af
movb $0x0, %al
callq 0x216e0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_allocate_info_ring
static int
vrb1_allocate_info_ring(void *dev)
{
	hw_device *accel_pci_dev = (hw_device *)dev;
	void *bar0addr = accel_pci_dev->bar0Addr;

	if (accel_pci_dev->info_ring)
		return 0; /* already configured */

	accel_pci_dev->info_ring = vfio_dma_alloc(dev,
			BB_ACC_INFO_RING_SIZE,
			&accel_pci_dev->info_ring_phys_addr);

	if (!accel_pci_dev->info_ring) {
		LOG(ERR, "memory allocation for info_ring failed");
		return -1;
	}
	LOG(DEBUG, "dev info ring virt:%p, phy: 0x%08lx",
			accel_pci_dev->info_ring, accel_pci_dev->info_ring_phys_addr);

	/* Do not set  for VRB1 the IR Registers in HW which conflict with HWPfHiOcodeMailBox */

	accel_pci_dev->info_ring_head =
			(vrb1_reg_read(bar0addr, HWPfHiInfoRingPointerRegPf) & 0xFFF) /
			sizeof(uint32_t);

	LOG(DEBUG, "info_ring_head: %d", accel_pci_dev->info_ring_head);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0x1461d
movl $0x0, -0x4(%rbp)
jmp 0x1473b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x98, %rdx
movl $0x1000, %esi           # imm = 0x1000
callq 0x201b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x90(%rax)
jne 0x14682
callq 0x16250
movq %rax, %rcx
leaq 0x2726f(%rip), %rax     # 0x3b8d0
movq (%rax), %r8
xorl %esi, %esi
leaq 0x1017c(%rip), %rdx     # 0x247e9
movl %esi, %edi
movb $0x0, %al
callq 0x216e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1473b
callq 0x16250
movq %rax, %rcx
leaq 0x2723f(%rip), %rax     # 0x3b8d0
movq 0x18(%rax), %r8
movq -0x18(%rbp), %rax
movq 0x90(%rax), %r10
movq -0x18(%rbp), %rax
movq 0x98(%rax), %rax
movl $0x3, %edi
xorl %esi, %esi
leaq 0x1015e(%rip), %rdx     # 0x24817
leaq 0x10188(%rip), %r9      # 0x24848
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x216e0
movq -0x20(%rbp), %rdi
movl $0xc8401c, %esi         # imm = 0xC8401C
callq 0x13540
andl $0xfff, %eax            # imm = 0xFFF
movl %eax, %eax
shrq $0x2, %rax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0xa8(%rax)
callq 0x16250
movq %rax, %rcx
leaq 0x271ca(%rip), %rax     # 0x3b8d0
movq 0x18(%rax), %r8
movq -0x18(%rbp), %rax
movzwl 0xa8(%rax), %eax
movl $0x3, %edi
xorl %esi, %esi
leaq 0x1013d(%rip), %rdx     # 0x24860
leaq 0x1011e(%rip), %r9      # 0x24848
movl %eax, (%rsp)
movb $0x0, %al
callq 0x216e0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_enable_ir_regs
static void
vrb1_enable_ir_regs(uint8_t *bar0addr)
{
	/* Enabling all interrupt but no IR for device error or doorbells */
	vrb1_reg_fast_write(bar0addr, HWPfHiInfoRingIntWrEnRegPf, 0x0);
	vrb1_reg_fast_write(bar0addr, HWPfHiCfgMsiIntWrEnRegPf, 0x0);
	vrb1_reg_fast_write(bar0addr, HWPfHiInfoRingVf2pfHiWrEnReg, 0x0);
	vrb1_reg_fast_write(bar0addr, HWPfHiInfoRingVf2pfLoWrEnReg, 0x0);
	vrb1_reg_fast_write(bar0addr, HWPfHiCfgMsiVf2pfHighWrEnReg, 0x0);
	vrb1_reg_fast_write(bar0addr, HWPfHiCfgMsiVf2pfLoWrEnReg, 0x0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0xc84020, %esi         # imm = 0xC84020
xorl %edx, %edx
callq 0x14210
movq -0x8(%rbp), %rdi
movl $0xc84040, %esi         # imm = 0xC84040
xorl %edx, %edx
callq 0x14210
movq -0x8(%rbp), %rdi
movl $0xc84028, %esi         # imm = 0xC84028
xorl %edx, %edx
callq 0x14210
movq -0x8(%rbp), %rdi
movl $0xc84024, %esi         # imm = 0xC84024
xorl %edx, %edx
callq 0x14210
movq -0x8(%rbp), %rdi
movl $0xc84048, %esi         # imm = 0xC84048
xorl %edx, %edx
callq 0x14210
movq -0x8(%rbp), %rdi
movl $0xc84044, %esi         # imm = 0xC84044
xorl %edx, %edx
callq 0x14210
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x18(%rbp)
callq 0x16250
movq %rax, %rcx
leaq 0x270ce(%rip), %rax     # 0x3b8d0
movq 0x18(%rax), %r8
movl $0x3, %edi
xorl %esi, %esi
leaq 0xfad1(%rip), %rdx      # 0x242e5
leaq 0xfaea(%rip), %r9       # 0x24305
movb $0x0, %al
callq 0x216e0
movq -0x18(%rbp), %rdi
callq 0x14390
movq -0x8(%rbp), %rdi
callq 0x14870
callq 0x16250
movq %rax, %rcx
leaq 0x2708d(%rip), %rax     # 0x3b8d0
movq 0x18(%rax), %r8
movl $0x3, %edi
xorl %esi, %esi
leaq 0xee6d(%rip), %rdx      # 0x236c2
leaq 0xfaa9(%rip), %r9       # 0x24305
movb $0x0, %al
callq 0x216e0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_free_info_ring
static void
vrb1_free_info_ring(void *dev)
{
	hw_device *accel_pci_dev = (hw_device *)dev;

	LOG(DEBUG, "Free info ring");

	if (!accel_pci_dev->info_ring)
		return;

	vfio_dma_free(accel_pci_dev->info_ring, accel_pci_dev->info_ring_total_size);

	accel_pci_dev->info_ring = 0;
	accel_pci_dev->info_ring_phys_addr = 0x0;
	accel_pci_dev->info_ring_head = 0x0;

	LOG(DEBUG, "Done");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
callq 0x16250
movq %rax, %rcx
leaq 0x2703d(%rip), %rax     # 0x3b8d0
movq 0x18(%rax), %r8
movl $0x3, %edi
xorl %esi, %esi
leaq 0xffdb(%rip), %rdx      # 0x24880
leaq 0xfff0(%rip), %r9       # 0x2489c
movb $0x0, %al
callq 0x216e0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x90(%rax)
jne 0x148c3
jmp 0x14938
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rsi
callq 0x20210
movq -0x10(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x98(%rax)
movq -0x10(%rbp), %rax
movw $0x0, 0xa8(%rax)
callq 0x16250
movq %rax, %rcx
leaq 0x26fb8(%rip), %rax     # 0x3b8d0
movq 0x18(%rax), %r8
movl $0x3, %edi
xorl %esi, %esi
leaq 0xed98(%rip), %rdx      # 0x236c2
leaq 0xff6b(%rip), %r9       # 0x2489c
movb $0x0, %al
callq 0x216e0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_configure
int
vrb1_configure(void *dev, void *bar0addr, const char *cfg_filename, const bool first_cfg)
{
	struct vrb1_conf vrb1_conf;
	int ret;

	ret = vrb1_read_config_file(cfg_filename, &vrb1_conf);
	if (ret != 0) {
		printf("Error reading config file.\n");
		return -1;
	}

	ret = vrb1_write_config(dev, bar0addr, &vrb1_conf, first_cfg);
	if (ret != 0) {
		printf("Error writing configuration for VRB1.\n");
		return -1;
	}
	hw_device *accel_dev = (hw_device *)dev;
	accel_dev->numvfs = vrb1_conf.num_vf_bundles;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x420, %rsp            # imm = 0x420
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x408(%rbp), %rsi
callq 0x14a10
movl %eax, -0x40c(%rbp)
cmpl $0x0, -0x40c(%rbp)
je 0x14994
leaq 0x1069c(%rip), %rdi     # 0x25020
movb $0x0, %al
callq 0xd140
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x149fc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movb -0x21(%rbp), %al
leaq -0x408(%rbp), %rdx
andb $0x1, %al
movzbl %al, %ecx
callq 0x14a70
movl %eax, -0x40c(%rbp)
cmpl $0x0, -0x40c(%rbp)
je 0x149d6
leaq 0xf951(%rip), %rdi      # 0x24317
movb $0x0, %al
callq 0xd140
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x149fc
movq -0x10(%rbp), %rax
movq %rax, -0x418(%rbp)
movzwl -0x404(%rbp), %ecx
movq -0x418(%rbp), %rax
movl %ecx, 0x4f8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x420, %rsp            # imm = 0x420
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/intel[P]pf-bb-config/vrb1/vrb1_cfg_app.c
// Function: vrb1_read_config_file
static int
vrb1_read_config_file(const char *arg_cfg_filename,
		struct vrb1_conf *vrb1_conf)
{
	bool unsafe_path = cfg_file_check_path_safety(arg_cfg_filename);
	if (unsafe_path == true) {
		printf("error, config file path \"%s\" is not safe",
				arg_cfg_filename);
		return -1;
	} else
		return vrb1_parse_conf_file(arg_cfg_filename, vrb1_conf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x17fc0
andb $0x1, %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x14a56
movq -0x10(%rbp), %rsi
leaq 0xf401(%rip), %rdi      # 0x23e47
movb $0x0, %al
callq 0xd140
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x14a66
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x168e0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, %eax
movl %eax, -0xa(%rbp)
shrq $0x20, %rdi
movw %di, %ax
movw %ax, -0x6(%rbp)
movzwl -0x8(%rbp), %eax
cmpl $0x1, %eax
jl 0x1669a
movzwl -0x8(%rbp), %eax
cmpl $0x10, %eax
jle 0x166b5
movzwl -0x8(%rbp), %esi
leaq 0xd4db(%rip), %rdi      # 0x23b80
movb $0x0, %al
callq 0xd140
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1670d
movzwl -0x6(%rbp), %eax
cmpl $0x1, %eax
jl 0x166c7
movzwl -0x6(%rbp), %eax
cmpl $0xc, %eax
jle 0x166e2
movzwl -0x6(%rbp), %esi
leaq 0xd4d4(%rip), %rdi      # 0x23ba6
movb $0x0, %al
callq 0xd140
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1670d
movzwl -0xa(%rbp), %eax
cmpl $0x10, %eax
jle 0x16706
movzwl -0xa(%rbp), %esi
leaq 0xd4d1(%rip), %rdi      # 0x23bc7
movb $0x0, %al
callq 0xd140
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1670d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x16980
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x338(%rip), %rsi       # 0x16c40
callq 0x17f40
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x16936
leaq 0xd316(%rip), %rdi      # 0x23c33
movb $0x0, %al
callq 0xd140
movq -0x18(%rbp), %rdi
callq 0x16980
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1696f
movq -0x18(%rbp), %rdi
callq 0x16720
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x16968
leaq 0xd305(%rip), %rdi      # 0x23c54
movb $0x0, %al
callq 0xd140
movq -0x18(%rbp), %rdi
callq 0x16980
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1696f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xd0f0
movq %rax, %rcx
movq -0x18(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x8(%rbp), %rax
jbe 0x17e72
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x17e65
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
je 0x17e65
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x17e6e
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
jmp 0x17e70
jmp 0x17e72
jmp 0x17e2b
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x17edb
jmp 0x17e99
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
je 0x17eba
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x17ec3
jmp 0x17ed1
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x17e99
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x17f35
jmp 0x17edd
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x1a(%rbp)
je 0x17efe
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
testb $0x1, %al
jne 0x17f07
jmp 0x17f2d
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movsbl (%rax), %esi
callq 0xd130
cmpq $0x0, %rax
je 0x17f1f
jmp 0x17f2d
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x17edd
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xc22d(%rip), %rsi      # 0x2418c
callq 0xd330
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x17f86
leaq 0xcac0(%rip), %rdi      # 0x24a36
movb $0x0, %al
callq 0xd140
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x17fa9
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x17a90
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
callq 0xd0d0
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x17fdc
movb $0x1, -0x1(%rbp)
jmp 0x18092
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd0f0
addq $0x1, %rax
movl %eax, -0x18(%rbp)
cmpl $0x3, -0x18(%rbp)
jge 0x18002
movb $0x0, -0x1(%rbp)
jmp 0x18092
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jg 0x1808e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2e, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl 0x1(%rax,%rcx), %eax
cmpl $0x2e, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl 0x2(%rax,%rcx), %eax
cmpl $0x2f, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1807e
cmpl $0x0, -0x20(%rbp)
je 0x1807e
cmpl $0x0, -0x24(%rbp)
je 0x1807e
movb $0x1, -0x1(%rbp)
jmp 0x18092
jmp 0x18080
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x18009
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0xbc(%rbp)
movl $0x0, -0xb8(%rbp)
cmpl $0x20, -0xb8(%rbp)
jge 0x1940f
movslq -0xb8(%rbp), %rax
movl $0x0, -0x90(%rbp,%rax,4)
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x193e3
movq -0x10(%rbp), %rax
movzwl 0x6(%rax), %eax
movl %eax, -0xb0(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x12(%rax), %eax
movl %eax, -0xac(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xc(%rax), %eax
movl %eax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x18(%rax), %eax
movl %eax, -0xa4(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x1e(%rax), %eax
movl %eax, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x24(%rax), %eax
movl %eax, -0x9c(%rbp)
movl $0x0, -0xb4(%rbp)
cmpl $0x6, -0xb4(%rbp)
jge 0x194da
movl $0x0, -0xb8(%rbp)
movl -0xb8(%rbp), %eax
movslq -0xb4(%rbp), %rcx
cmpl -0xb0(%rbp,%rcx,4), %eax
jge 0x194c7
movl -0xb4(%rbp), %ecx
movl -0xbc(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0xbc(%rbp)
cltq
movl %ecx, -0x90(%rbp,%rax,4)
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x19480
jmp 0x194c9
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x1946d
movslq -0x4(%rbp), %rax
movl -0x90(%rbp,%rax,4), %eax
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x28(%rbp)
subq $0x5, %rax
ja 0x19590
movq -0x28(%rbp), %rax
leaq 0xb5a1(%rip), %rcx      # 0x24ad4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x20(%rbp)
jmp 0x195b8
movq -0x18(%rbp), %rax
addq $0x12, %rax
movq %rax, -0x20(%rbp)
jmp 0x195b8
movq -0x18(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x20(%rbp)
jmp 0x195b8
movq -0x18(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
jmp 0x195b8
movq -0x18(%rbp), %rax
addq $0x1e, %rax
movq %rax, -0x20(%rbp)
jmp 0x195b8
movq -0x18(%rbp), %rax
addq $0x24, %rax
movq %rax, -0x20(%rbp)
jmp 0x195b8
callq 0x1bd70
movq %rax, %rcx
leaq 0x22331(%rip), %rax     # 0x3b8d0
movq (%rax), %r8
movl -0xc(%rbp), %r9d
xorl %esi, %esi
leaq 0xb995(%rip), %rdx      # 0x24f44
movl %esi, %edi
movb $0x0, %al
callq 0x216e0
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x193c0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rdi
callq 0x19500
cmpq $0x0, -0x18(%rbp)
jne 0x19636
movl $0x0, -0x4(%rbp)
jmp 0x19641
movq -0x18(%rbp), %rax
movzwl 0x2(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x19760
callq 0x1bd70
movq %rax, %rcx
leaq 0x22245(%rip), %rax     # 0x3b8d0
movq 0x18(%rax), %r8
movl $0x3, %edi
xorl %esi, %esi
leaq 0xb8de(%rip), %rdx      # 0x24f7b
leaq 0xb8f7(%rip), %r9       # 0x24f9b
movb $0x0, %al
callq 0x216e0
movw $0x0, -0x1a(%rbp)
movzwl -0x1a(%rbp), %eax
cmpl $0x20, %eax
jge 0x196e3
movq -0x18(%rbp), %rdi
movzwl -0x1a(%rbp), %eax
shlq $0x2, %rax
addq $0xa00e00, %rax         # imm = 0xA00E00
movl %eax, %esi
xorl %edx, %edx
callq 0x197e0
movw -0x1a(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x1a(%rbp)
jmp 0x196b1
movq -0x18(%rbp), %rdi
movl $0xb8000c, %esi         # imm = 0xB8000C
movl $0x2, %edx
callq 0x197e0
movl $0x64, %edi
callq 0xd450
movq -0x18(%rbp), %rdi
movl $0xc84010, %esi         # imm = 0xC84010
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x197e0
movq -0x18(%rbp), %rdi
movl $0xc8400c, %esi         # imm = 0xC8400C
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x197e0
movq -0x18(%rbp), %rdi
movl $0xc84008, %esi         # imm = 0xC84008
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x197e0
movl $0xa, %edi
callq 0xd450
movq -0x10(%rbp), %rdi
callq 0x19820
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0xc84020, %esi         # imm = 0xC84020
xorl %edx, %edx
callq 0x197e0
movq -0x8(%rbp), %rdi
movl $0xc84040, %esi         # imm = 0xC84040
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x197e0
movq -0x8(%rbp), %rdi
movl $0xc84024, %esi         # imm = 0xC84024
xorl %edx, %edx
callq 0x197e0
movq -0x8(%rbp), %rdi
movl $0xc84028, %esi         # imm = 0xC84028
xorl %edx, %edx
callq 0x197e0
movq -0x8(%rbp), %rdi
movl $0xc84048, %esi         # imm = 0xC84048
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x197e0
movq -0x8(%rbp), %rdi
movl $0xc84044, %esi         # imm = 0xC84044
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x197e0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/intel[P]pf-bb-config/vrb2/vrb2_cfg_app.c
// Function: vrb2_reset_info_ring
static void
vrb2_reset_info_ring(hw_device *accel_dev)
{
	uint32_t phys_high, phys_low;
	hw_device *accel_pci_dev = (hw_device *)accel_dev;
	uint8_t *bar0addr = accel_dev->bar0Addr;

	/* Set back the Info Ring base addresses */
	phys_high = (uint32_t) (accel_pci_dev->info_ring_phys_addr >> 32);
	phys_low = (uint32_t) (accel_pci_dev->info_ring_phys_addr);
	vrb2_reg_write(bar0addr, HWPfHiInfoRingPointerRegPf, phys_high);
	vrb2_reg_write(bar0addr, HWPfHiInfoRingBaseLoRegPf, phys_low);

	/* Clean up the ring and adjust pointer */
	vrb2_reg_write(bar0addr, HWPfHiInfoRingPointerRegPf, 0xF000);
	accel_pci_dev->info_ring_head =
			(vrb2_reg_read(bar0addr, HWPfHiInfoRingPointerRegPf) & 0xFFF) /
			sizeof(uint32_t);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x98(%rax), %rax
shrq $0x20, %rax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
movq 0x98(%rax), %rax
movl %eax, -0x10(%rbp)
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %edx
movl $0xc8401c, %esi         # imm = 0xC8401C
callq 0x197e0
movq -0x20(%rbp), %rdi
movl -0x10(%rbp), %edx
movl $0xc84014, %esi         # imm = 0xC84014
callq 0x197e0
movq -0x20(%rbp), %rdi
movl $0xc8401c, %esi         # imm = 0xC8401C
movl $0xf000, %edx           # imm = 0xF000
callq 0x197e0
movq -0x20(%rbp), %rdi
movl $0xc8401c, %esi         # imm = 0xC8401C
callq 0x18b70
andl $0xfff, %eax            # imm = 0xFFF
movl %eax, %eax
shrq $0x2, %rax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0xa8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)