	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_hw_stats
_get_hw_stats:                          ## @get_hw_stats
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	testl	%edx, %edx
	je	LBB0_1
## %bb.5:
	movl	%edx, %esi
	callq	_to_iport
	movq	%rax, %rdi
	callq	_ppd_from_ibp
	leaq	-32(%rbp), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_hfi1_read_portcntrs
	movq	_num_port_cntrs@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	-32(%rbp), %rsi
	jmp	LBB0_6
LBB0_1:
	callq	_dd_from_ibdev
	leaq	-32(%rbp), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_hfi1_read_cntrs
	xorl	%eax, %eax
	callq	_hfi1_sps_ints
	movq	-32(%rbp), %rsi
	movq	_num_dev_cntrs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	movl	%eax, (%rsi,%r15,4)
	movq	_num_driver_cntrs@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	$2, %ecx
	jl	LBB0_4
## %bb.2:
	leaq	(%rsi,%r15,4), %rdx
	movl	$1, %edi
	movq	_hfi1_stats@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%rdi,4), %ecx
	movl	%ecx, (%rdx,%rdi,4)
	incq	%rdi
	movslq	(%rax), %rcx
	cmpq	%rcx, %rdi
	jl	LBB0_3
LBB0_4:
	addl	%ecx, %r15d
LBB0_6:
	movl	(%r14), %edi
	leal	(,%r15,4), %edx
	callq	_memcpy
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hfi1_stats,4,2                 ## @hfi1_stats
	.comm	_num_dev_cntrs,8,3              ## @num_dev_cntrs
	.comm	_num_driver_cntrs,4,2           ## @num_driver_cntrs
	.comm	_num_port_cntrs,4,2             ## @num_port_cntrs
	.no_dead_strip	_get_hw_stats
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_hw_stats
_get_hw_stats:                          ; @get_hw_stats
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	cbz	w2, LBB0_2
; %bb.1:
	mov	x1, x2
	bl	_to_iport
	bl	_ppd_from_ibp
	add	x2, sp, #8
	mov	x1, #0
	bl	_hfi1_read_portcntrs
Lloh0:
	adrp	x8, _num_port_cntrs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _num_port_cntrs@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldr	x1, [sp, #8]
	b	LBB0_6
LBB0_2:
	bl	_dd_from_ibdev
	add	x2, sp, #8
	mov	x1, #0
	bl	_hfi1_read_cntrs
	bl	_hfi1_sps_ints
	ldr	x1, [sp, #8]
Lloh3:
	adrp	x8, _num_dev_cntrs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _num_dev_cntrs@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	w0, [x1, x8, lsl #2]
Lloh6:
	adrp	x9, _num_driver_cntrs@GOTPAGE
Lloh7:
	ldr	x9, [x9, _num_driver_cntrs@GOTPAGEOFF]
	ldr	w11, [x9]
	cmp	w11, #2
	b.lt	LBB0_5
; %bb.3:
	add	x10, x1, x8, lsl #2
	mov	w12, #1
Lloh8:
	adrp	x13, _hfi1_stats@GOTPAGE
Lloh9:
	ldr	x13, [x13, _hfi1_stats@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x11, x12, #2
	ldr	w14, [x13, x11]
	str	w14, [x10, x11]
	add	x12, x12, #1
	ldrsw	x11, [x9]
	cmp	x12, x11
	b.lt	LBB0_4
LBB0_5:
	add	w20, w11, w8
LBB0_6:
	ldr	w0, [x19]
	lsl	w2, w20, #2
	bl	_memcpy
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_hfi1_stats,4,2                 ; @hfi1_stats
	.comm	_num_dev_cntrs,8,3              ; @num_dev_cntrs
	.comm	_num_driver_cntrs,4,2           ; @num_driver_cntrs
	.comm	_num_port_cntrs,4,2             ; @num_port_cntrs
	.no_dead_strip	_get_hw_stats
.subsections_via_symbols
