	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar8xxx_sw_set_port_reset_mib   ## -- Begin function ar8xxx_sw_set_port_reset_mib
	.p2align	4, 0x90
_ar8xxx_sw_set_port_reset_mib:          ## @ar8xxx_sw_set_port_reset_mib
	.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	%rdx, %r15
	movq	%rdi, %rbx
	callq	_swdev_to_ar8xxx
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_ar8xxx_has_mib_counters
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movl	(%r15), %r15d
	cmpl	(%rbx), %r15d
	jge	LBB0_4
## %bb.5:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_ar8xxx_mib_capture
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$1, %edx
	callq	_ar8xxx_mib_fetch_port_stat
LBB0_7:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_8
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar8xxx_sw_set_port_reset_mib   ; -- Begin function ar8xxx_sw_set_port_reset_mib
	.p2align	2
_ar8xxx_sw_set_port_reset_mib:          ; @ar8xxx_sw_set_port_reset_mib
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	mov	x20, x0
	bl	_swdev_to_ar8xxx
	mov	x19, x0
	bl	_ar8xxx_has_mib_counters
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w21, [x21]
	ldr	w8, [x20]
	cmp	w21, w8
	b.ge	LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	bl	_ar8xxx_mib_capture
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_ar8xxx_mib_fetch_port_stat
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_8
LBB0_5:
Lloh0:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
