	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hinic_get_phy_port_stats       ## -- Begin function hinic_get_phy_port_stats
	.p2align	4, 0x90
_hinic_get_phy_port_stats:              ## @hinic_get_phy_port_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	$0, -40(%rbp)
	movq	(%rdi), %rbx
	movq	(%rbx), %rax
	movl	$16, -36(%rbp)
	movq	(%rax), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	_HINIC_PORT_STATS_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	$16, -48(%rbp)
	movq	_HINIC_PORT_CMD_GET_PORT_STATISTICS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	leaq	-36(%rbp), %r9
	movq	%rbx, %rdi
	movl	$12, %ecx
	movq	%r12, %r8
	callq	_hinic_port_msg_cmd
	movl	-36(%rbp), %r8d
	movq	8(%r12), %rcx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	testl	%r8d, %r8d
	je	LBB0_5
## %bb.4:
	testq	%rcx, %rcx
	jne	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_memcpy
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movq	%r12, %rdi
	callq	_kfree
LBB0_8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HINIC_PORT_STATS_VERSION,4,2   ## @HINIC_PORT_STATS_VERSION
	.comm	_HINIC_PORT_CMD_GET_PORT_STATISTICS,4,2 ## @HINIC_PORT_CMD_GET_PORT_STATISTICS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get port statistics, err: %d, status: 0x%x, out size: 0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hinic_get_phy_port_stats       ; -- Begin function hinic_get_phy_port_stats
	.p2align	2
_hinic_get_phy_port_stats:              ; @hinic_get_phy_port_stats
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	str	wzr, [sp, #24]
	ldr	x22, [x0]
	ldr	x8, [x22]
	mov	w23, #16
	str	w23, [sp, #12]
	ldr	x21, [x8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _HINIC_PORT_STATS_VERSION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HINIC_PORT_STATS_VERSION@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	stp	w23, w8, [sp, #16]
Lloh6:
	adrp	x8, _HINIC_PORT_CMD_GET_PORT_STATISTICS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HINIC_PORT_CMD_GET_PORT_STATISTICS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #16
	add	x5, sp, #12
	mov	x0, x22
	mov	w3, #12
	mov	x4, x19
	bl	_hinic_port_msg_cmd
	ldr	w4, [sp, #12]
	ldr	x3, [x19, #8]
	cmp	w0, #0
	ccmp	w4, #0, #4, eq
	ccmp	x3, #0, #0, ne
	b.eq	LBB0_4
; %bb.2:
	mov	x2, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_3:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	bl	_memcpy
	mov	w20, #0
LBB0_5:
	mov	x0, x19
	bl	_kfree
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HINIC_PORT_STATS_VERSION,4,2   ; @HINIC_PORT_STATS_VERSION
	.comm	_HINIC_PORT_CMD_GET_PORT_STATISTICS,4,2 ; @HINIC_PORT_CMD_GET_PORT_STATISTICS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get port statistics, err: %d, status: 0x%x, out size: 0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
