// File: /workspace/github_c_makefile_star2_O0/intel[P]pf-bb-config/vrb2/vrb2_cfg_app.c
// Function: vrb2_device_data
void vrb2_device_data(void *dev)
{
	uint32_t vf_idx, num, min, max;
	uint64_t avg;
	hw_device *accel_dev = (hw_device *)dev;
	uint8_t *bar0addr = accel_dev->bar0Addr;

	LOG_RESP(INFO, "Device Status:: %d VFs", accel_dev->numvfs);
	for (vf_idx = 0; vf_idx < accel_dev->numvfs; vf_idx++)
		LOG_RESP(INFO, "-  VF %d %s", vf_idx,
			 bb_acc_device_status_str(accel_dev->dev_status[vf_idx]));
	LOG_RESP(INFO, "5GUL counters: Code Blocks");
	print_all_stat32(accel_dev, HWPfPermonACountVf, accel_dev->numvfs, VRB2_PMON_OFF_1);
	LOG_RESP(INFO, "5GUL counters: Data (Bytes)");
	print_all_stat32(accel_dev, HWPfPermonAKCntLoVf, accel_dev->numvfs, VRB2_PMON_OFF_1);
	LOG_RESP(INFO, "5GUL counters: Per Engine");
	print_all_stat32(accel_dev, HWPfPermonACbCountFec, VRB2_5GUL_ENGS, VRB2_PMON_OFF_2);
	LOG_RESP(INFO, "5GDL counters: Code Blocks");
	print_all_stat32(accel_dev, HWPfPermonBCountVf, accel_dev->numvfs, VRB2_PMON_OFF_1);
	LOG_RESP(INFO, "5GDL counters: Data (Bytes)");
	print_all_stat32(accel_dev, HWPfPermonBKCntLoVf, accel_dev->numvfs, VRB2_PMON_OFF_1);
	LOG_RESP(INFO, "5GDL counters: Per Engine");
	print_all_stat32(accel_dev, HWPfPermonBCbCountFec, VRB2_5GDL_ENGS, VRB2_PMON_OFF_2);
	LOG_RESP(INFO, "4GUL counters: Code Blocks");
	print_all_stat32(accel_dev, HWPfPermonCCountVf, accel_dev->numvfs, VRB2_PMON_OFF_1);
	LOG_RESP(INFO, "4GUL counters: Data (Bytes)");
	print_all_stat32(accel_dev, HWPfPermonCKCntLoVf, accel_dev->numvfs, VRB2_PMON_OFF_1);
	LOG_RESP(INFO, "4GUL counters: Per Engine");
	print_all_stat32(accel_dev, HWPfPermonCCbCountFec, VRB2_4GUL_ENGS, VRB2_PMON_OFF_2);
	LOG_RESP(INFO, "4GDL counters: Code Blocks");
	print_all_stat32(accel_dev, HWPfPermonDCountVf, accel_dev->numvfs, VRB2_PMON_OFF_1);
	LOG_RESP(INFO, "4GDL counters: Data (Bytes)");
	print_all_stat32(accel_dev, HWPfPermonDKCntLoVf, accel_dev->numvfs, VRB2_PMON_OFF_1);
	LOG_RESP(INFO, "4GDL counters: Per Engine");
	print_all_stat32(accel_dev, HWPfPermonDCbCountFec, VRB2_4GDL_ENGS, VRB2_PMON_OFF_2);
	LOG_RESP(INFO, "FFT counters: Code Blocks");
	print_all_stat32(accel_dev, HWPfPermonECountVf, accel_dev->numvfs, VRB2_PMON_OFF_1);
	LOG_RESP(INFO, "FFT counters: Data (Bytes)");
	print_all_stat32(accel_dev, HWPfPermonEKCntLoVf, accel_dev->numvfs, VRB2_PMON_OFF_1);
	LOG_RESP(INFO, "FFT counters: Per Engine");
	print_all_stat32(accel_dev, HWPfPermonECbCountFec, VRB2_FFT_ENGS, VRB2_PMON_OFF_2);
	LOG_RESP(INFO, "MLD counters: Code Blocks");
	print_all_stat32(accel_dev, HWPfPermonFCountVf, accel_dev->numvfs, VRB2_PMON_OFF_1);
	LOG_RESP(INFO, "MLD counters: Data (Bytes)");
	print_all_stat32(accel_dev, HWPfPermonFKCntLoVf, accel_dev->numvfs, VRB2_PMON_OFF_1);
	LOG_RESP(INFO, "MLD counters: Per Engine");
	print_all_stat32(accel_dev, HWPfPermonFCbCountFec, VRB2_MLD_ENGS, VRB2_PMON_OFF_2);
	/* Bus Monitor */
	vrb2_reg_write(bar0addr, HWPfPermonAControlBusMon, VRB2_BUSMON_STOP);
	min = vrb2_reg_read(bar0addr, HWPfPermonAMinLatBusMon);
	max = vrb2_reg_read(bar0addr, HWPfPermonAMaxLatBusMon);
	num = vrb2_reg_read(bar0addr, HWPfPermonATotalReqCntBusMon);
	if (num > 0) {
		avg = (vrb2_reg_read(bar0addr, HWPfPermonATotalLatLowBusMon) +
				vrb2_reg_read(bar0addr, HWPfPermonATotalLatUpperBusMon)
				* ((uint64_t)1 << 32)) / num;
		LOG_RESP(INFO, "Bus Monitor A (ns) Avg %u - Num %u - Min %d - Max %d",
				(uint32_t) avg, num, min, max);
	}
	vrb2_reg_write(bar0addr, HWPfPermonAControlBusMon, VRB2_BUSMON_RESET);
	vrb2_reg_write(bar0addr, HWPfPermonAControlBusMon, VRB2_BUSMON_START);
	vrb2_reg_write(bar0addr, HWPfPermonCControlBusMon, VRB2_BUSMON_STOP);
	min = vrb2_reg_read(bar0addr, HWPfPermonCMinLatBusMon);
	max = vrb2_reg_read(bar0addr, HWPfPermonCMaxLatBusMon);
	num = vrb2_reg_read(bar0addr, HWPfPermonCTotalReqCntBusMon);
	if (num > 0) {
		avg = (vrb2_reg_read(bar0addr, HWPfPermonCTotalLatLowBusMon) +
				vrb2_reg_read(bar0addr, HWPfPermonCTotalLatUpperBusMon)
				* ((uint64_t)1 << 32)) / num;
		LOG_RESP(INFO, "Bus Monitor C (ns) Avg %u - Num %u - Min %d - Max %d",
				(uint32_t) avg, num, min, max);
	}
	vrb2_reg_write(bar0addr, HWPfPermonCControlBusMon, VRB2_BUSMON_RESET);
	vrb2_reg_write(bar0addr, HWPfPermonCControlBusMon, VRB2_BUSMON_START);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x30(%rbp)
callq 0x1bd70
movq %rax, %rcx
leaq 0x202fe(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movq -0x28(%rbp), %rax
movl 0x4f8(%rax), %r9d
movl $0x2, %edi
movl $0x1, %esi
leaq 0x8184(%rip), %rdx      # 0x23776
movb $0x0, %al
callq 0x216e0
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x4f8(%rcx), %eax
jae 0x1b676
callq 0x1bd70
movq %rax, -0x48(%rbp)
leaq 0x202b1(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movl -0xc(%rbp), %ecx
movq 0xf0(%rax,%rcx,8), %rax
movl %eax, %edi
callq 0x21ac0
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
movl -0x34(%rbp), %r9d
movl $0x2, %edi
movl $0x1, %esi
leaq 0x8134(%rip), %rdx      # 0x23794
movq %rax, (%rsp)
movb $0x0, %al
callq 0x216e0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1b600
callq 0x1bd70
movq %rax, %rcx
leaq 0x2024b(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x810d(%rip), %rdx      # 0x237a7
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4f8(%rax), %edx
movl $0xb98008, %esi         # imm = 0xB98008
movl $0x100, %ecx            # imm = 0x100
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x20203(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x80e7(%rip), %rdx      # 0x237c9
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4f8(%rax), %edx
movl $0xb98010, %esi         # imm = 0xB98010
movl $0x100, %ecx            # imm = 0x100
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x201bb(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x80c2(%rip), %rdx      # 0x237ec
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movl $0xb9c100, %esi         # imm = 0xB9C100
movl $0x6, %edx
movl $0x10, %ecx
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x20178(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x80a0(%rip), %rdx      # 0x2380d
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4f8(%rax), %edx
movl $0xba8008, %esi         # imm = 0xBA8008
movl $0x100, %ecx            # imm = 0x100
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x20130(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x807a(%rip), %rdx      # 0x2382f
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4f8(%rax), %edx
movl $0xba8010, %esi         # imm = 0xBA8010
movl $0x100, %ecx            # imm = 0x100
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x200e8(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x8055(%rip), %rdx      # 0x23852
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movl $0xbac100, %esi         # imm = 0xBAC100
movl $0x3, %edx
movl $0x10, %ecx
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x200a5(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x9829(%rip), %rdx      # 0x25069
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4f8(%rax), %edx
movl $0xbb8008, %esi         # imm = 0xBB8008
movl $0x100, %ecx            # imm = 0x100
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x2005d(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x9803(%rip), %rdx      # 0x2508b
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4f8(%rax), %edx
movl $0xbb8010, %esi         # imm = 0xBB8010
movl $0x100, %ecx            # imm = 0x100
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x20015(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x97de(%rip), %rdx      # 0x250ae
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movl $0xbbc100, %esi         # imm = 0xBBC100
movl $0x5, %edx
movl $0x10, %ecx
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x1ffd2(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x97bc(%rip), %rdx      # 0x250cf
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4f8(%rax), %edx
movl $0xbc8008, %esi         # imm = 0xBC8008
movl $0x100, %ecx            # imm = 0x100
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x1ff8a(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x9796(%rip), %rdx      # 0x250f1
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4f8(%rax), %edx
movl $0xbc8010, %esi         # imm = 0xBC8010
movl $0x100, %ecx            # imm = 0x100
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x1ff42(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x9771(%rip), %rdx      # 0x25114
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movl $0xbcc100, %esi         # imm = 0xBCC100
movl $0x3, %edx
movl $0x10, %ecx
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x1feff(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x898b(%rip), %rdx      # 0x24371
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4f8(%rax), %edx
movl $0xbd8008, %esi         # imm = 0xBD8008
movl $0x100, %ecx            # imm = 0x100
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x1feb7(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x8964(%rip), %rdx      # 0x24392
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4f8(%rax), %edx
movl $0xbd8010, %esi         # imm = 0xBD8010
movl $0x100, %ecx            # imm = 0x100
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x1fe6f(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x893e(%rip), %rdx      # 0x243b4
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movl $0xbdc100, %esi         # imm = 0xBDC100
movl $0x3, %edx
movl $0x10, %ecx
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x1fe2c(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x967c(%rip), %rdx      # 0x25135
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4f8(%rax), %edx
movl $0xbe8008, %esi         # imm = 0xBE8008
movl $0x100, %ecx            # imm = 0x100
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x1fde4(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x9655(%rip), %rdx      # 0x25156
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4f8(%rax), %edx
movl $0xbe8010, %esi         # imm = 0xBE8010
movl $0x100, %ecx            # imm = 0x100
callq 0x22c90
callq 0x1bd70
movq %rax, %rcx
leaq 0x1fd9c(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x1, %esi
leaq 0x962f(%rip), %rdx      # 0x25178
movb $0x0, %al
callq 0x216e0
movq -0x28(%rbp), %rdi
movl $0xbec100, %esi         # imm = 0xBEC100
movl $0x1, %edx
movl $0x10, %ecx
callq 0x22c90
movq -0x30(%rbp), %rdi
movl $0xb9c400, %esi         # imm = 0xB9C400
xorl %edx, %edx
callq 0x197e0
movq -0x30(%rbp), %rdi
movl $0xb9c40c, %esi         # imm = 0xB9C40C
callq 0x18b70
movl %eax, -0x14(%rbp)
movq -0x30(%rbp), %rdi
movl $0xb9c500, %esi         # imm = 0xB9C500
callq 0x18b70
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rdi
movl $0xb9c50c, %esi         # imm = 0xB9C50C
callq 0x18b70
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jbe 0x1bc3c
movq -0x30(%rbp), %rdi
movl $0xb9c504, %esi         # imm = 0xB9C504
callq 0x18b70
movl %eax, %eax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rdi
movl $0xb9c508, %esi         # imm = 0xB9C508
callq 0x18b70
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, %ecx
shlq $0x20, %rcx
addq %rcx, %rax
movl -0x10(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x20(%rbp)
callq 0x1bd70
movq %rax, %rcx
leaq 0x1fccf(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movq -0x20(%rbp), %rax
movl %eax, %r9d
movl -0x10(%rbp), %r11d
movl -0x14(%rbp), %r10d
movl -0x18(%rbp), %eax
movl $0x2, %edi
movl $0x1, %esi
leaq 0x87ac(%rip), %rdx      # 0x243d4
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0x216e0
movq -0x30(%rbp), %rdi
movl $0xb9c400, %esi         # imm = 0xB9C400
movl $0x1, %edx
callq 0x197e0
movq -0x30(%rbp), %rdi
movl $0xb9c400, %esi         # imm = 0xB9C400
movl $0x2, %edx
callq 0x197e0
movq -0x30(%rbp), %rdi
movl $0xbbc400, %esi         # imm = 0xBBC400
xorl %edx, %edx
callq 0x197e0
movq -0x30(%rbp), %rdi
movl $0xbbc40c, %esi         # imm = 0xBBC40C
callq 0x18b70
movl %eax, -0x14(%rbp)
movq -0x30(%rbp), %rdi
movl $0xbbc500, %esi         # imm = 0xBBC500
callq 0x18b70
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rdi
movl $0xbbc50c, %esi         # imm = 0xBBC50C
callq 0x18b70
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jbe 0x1bd36
movq -0x30(%rbp), %rdi
movl $0xbbc504, %esi         # imm = 0xBBC504
callq 0x18b70
movl %eax, %eax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rdi
movl $0xbbc508, %esi         # imm = 0xBBC508
callq 0x18b70
movl %eax, %ecx
movq -0x58(%rbp), %rax
movl %ecx, %ecx
shlq $0x20, %rcx
addq %rcx, %rax
movl -0x10(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x20(%rbp)
callq 0x1bd70
movq %rax, %rcx
leaq 0x1fbd5(%rip), %rax     # 0x3b8d0
movq 0x10(%rax), %r8
movq -0x20(%rbp), %rax
movl %eax, %r9d
movl -0x10(%rbp), %r11d
movl -0x14(%rbp), %r10d
movl -0x18(%rbp), %eax
movl $0x2, %edi
movl $0x1, %esi
leaq 0x86ee(%rip), %rdx      # 0x24410
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0x216e0
movq -0x30(%rbp), %rdi
movl $0xbbc400, %esi         # imm = 0xBBC400
movl $0x1, %edx
callq 0x197e0
movq -0x30(%rbp), %rdi
movl $0xbbc400, %esi         # imm = 0xBBC400
movl $0x2, %edx
callq 0x197e0
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)