	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar8xxx_sw_get_port_mib         ## -- Begin function ar8xxx_sw_get_port_mib
	.p2align	4, 0x90
_ar8xxx_sw_get_port_mib:                ## @ar8xxx_sw_get_port_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_swdev_to_ar8xxx
	movq	%rax, %r13
	movq	(%rax), %r15
	movq	32(%rax), %rax
	movq	%rax, -160(%rbp)                ## 8-byte Spill
	movq	%r13, %rdi
	callq	_ar8xxx_has_mib_counters
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$0, 28(%r13)
	je	LBB0_6
## %bb.2:
	movl	(%r14), %eax
	cmpl	(%rbx), %eax
	jae	LBB0_18
## %bb.3:
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movq	%r13, %r12
	addq	$24, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	callq	_ar8xxx_mib_capture
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.4:
	movq	%r13, %rdi
	movq	-136(%rbp), %rbx                ## 8-byte Reload
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_ar8xxx_mib_fetch_port_stat
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	$8, %esi
	xorl	%eax, %eax
	callq	_snprintf
	movq	-160(%rbp), %rsi                ## 8-byte Reload
	movl	(%rsi), %r8d
	testl	%r8d, %r8d
	je	LBB0_23
## %bb.5:
	movq	%r12, -168(%rbp)                ## 8-byte Spill
	movq	%r15, -144(%rbp)                ## 8-byte Spill
	movq	%r14, -176(%rbp)                ## 8-byte Spill
	imull	%r8d, %ebx
	shlq	$2, %rbx
	addq	8(%r13), %rbx
	movq	%rbx, %rdi
	movl	$1, %ebx
	movl	$8, %r12d
	xorl	%r15d, %r15d
	movq	%r13, -128(%rbp)                ## 8-byte Spill
	movq	%rdi, -136(%rbp)                ## 8-byte Spill
	jmp	LBB0_10
LBB0_6:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	-116(%rbp), %eax                ## 4-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_10 Depth=1
	testl	%r14d, %r14d
	movl	-148(%rbp), %ebx                ## 4-byte Reload
	movl	%ebx, %edx
	movl	$0, %ecx
	cmovnel	%ecx, %edx
	testl	%ebx, %ebx
	cmovnel	%edx, %ebx
	movq	-160(%rbp), %rsi                ## 8-byte Reload
	movl	(%rsi), %r8d
	movq	-136(%rbp), %rdi                ## 8-byte Reload
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	incq	%r15
	movl	%r8d, %ecx
	addq	$16, %r12
	cmpq	%rcx, %r15
	jae	LBB0_22
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rsi), %rcx
	movq	-8(%rcx,%r12), %rdx
	cmpq	16(%r13), %rdx
	jg	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%ebx, -148(%rbp)                ## 4-byte Spill
	movq	(%rcx,%r12), %rbx
	movl	(%rdi,%r15,4), %r14d
	movslq	%eax, %r13
	movq	-144(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%r13), %rdi
	movl	$8, %esi
	subl	%r13d, %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rcx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_snprintf
	addl	%r13d, %eax
	movl	%eax, -116(%rbp)                ## 4-byte Spill
	movq	%rbx, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcmp
	cmpl	$1024, %r14d                    ## imm = 0x400
	jl	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	testl	%eax, %eax
	movq	-128(%rbp), %r13                ## 8-byte Reload
	je	LBB0_7
	jmp	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$1024, %r14d                    ## imm = 0x400
	movq	-128(%rbp), %r13                ## 8-byte Reload
	jl	LBB0_14
LBB0_7:                                 ##   in Loop: Header=BB0_10 Depth=1
	leaq	-112(%rbp), %rdi
	movl	$64, %esi
	movl	%r14d, %edx
	callq	_ar8xxx_byte_to_str
	movslq	-116(%rbp), %rbx                ## 4-byte Folded Reload
	movq	-144(%rbp), %rax                ## 8-byte Reload
	leaq	(%rbx,%rax), %rdi
	decq	%rdi
	movl	$9, %esi
	subl	%ebx, %esi
	leaq	L_.str.4(%rip), %rdx
	leaq	-112(%rbp), %rcx
	xorl	%eax, %eax
	callq	_snprintf
                                        ## kill: def $eax killed $eax def $rax
	addl	%ebx, %eax
	decl	%eax
	jmp	LBB0_8
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-128(%rbp), %r13                ## 8-byte Reload
	movl	-116(%rbp), %eax                ## 4-byte Reload
	jmp	LBB0_8
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_19:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_26
## %bb.21:
	movl	%ebx, %eax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	testl	%ebx, %ebx
	movq	-176(%rbp), %r14                ## 8-byte Reload
	movq	-144(%rbp), %r15                ## 8-byte Reload
	movq	-168(%rbp), %r12                ## 8-byte Reload
	je	LBB0_24
LBB0_23:
	leaq	L_.str.5(%rip), %rdx
	movq	%r15, %rdi
	movl	$8, %esi
	xorl	%eax, %eax
	callq	_snprintf
LBB0_24:
	movq	%r15, 8(%r14)
	movl	%eax, 4(%r14)
	xorl	%ebx, %ebx
LBB0_25:
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_20
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MIB counters\n"

L_.str.1:                               ## @.str.1
	.asciz	"%-12s: %llu\n"

L_.str.2:                               ## @.str.2
	.asciz	"TxByte"

L_.str.3:                               ## @.str.3
	.asciz	"RxGoodByte"

L_.str.4:                               ## @.str.4
	.asciz	" (%s)\n"

L_.str.5:                               ## @.str.5
	.asciz	"No MIB data"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar8xxx_sw_get_port_mib         ; -- Begin function ar8xxx_sw_get_port_mib
	.p2align	2
_ar8xxx_sw_get_port_mib:                ; @ar8xxx_sw_get_port_mib
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	bl	_swdev_to_ar8xxx
	mov	x22, x0
	ldr	x27, [x0, #32]
	ldr	x20, [x0]
	bl	_ar8xxx_has_mib_counters
	cbz	w0, LBB0_6
; %bb.1:
	ldr	w8, [x22, #28]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	w24, [x19]
	ldr	w8, [x21]
	cmp	w24, w8
	b.hs	LBB0_15
; %bb.3:
	add	x21, x22, #24
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x22
	bl	_ar8xxx_mib_capture
	mov	x25, x0
	cbnz	w0, LBB0_22
; %bb.4:
	str	x19, [sp, #24]                  ; 8-byte Folded Spill
	mov	x0, x22
	mov	x1, x24
	mov	w2, #0
	bl	_ar8xxx_mib_fetch_port_stat
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	w1, #8
	bl	_snprintf
	ldr	w8, [x27]
	cbz	w8, LBB0_20
; %bb.5:
	mov	x23, x0
	str	x21, [sp, #16]                  ; 8-byte Folded Spill
	mov	x25, #0
	mov	x21, #0
	mul	w9, w8, w24
	ldr	x10, [x22, #8]
	add	x9, x10, w9, uxtw #2
	str	x9, [sp, #32]                   ; 8-byte Folded Spill
	mov	w24, #1
	b	LBB0_10
LBB0_6:
Lloh5:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_16
LBB0_7:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x0, sp, #40
	mov	w1, #64
	mov	x2, x28
	bl	_ar8xxx_byte_to_str
	sub	x19, x23, #1
	add	x0, x20, x19
	mov	w8, #9
	sub	w1, w8, w23
	add	x8, sp, #40
	str	x8, [sp]
Lloh7:
	adrp	x2, l_.str.4@PAGE
Lloh8:
	add	x2, x2, l_.str.4@PAGEOFF
	bl	_snprintf
	add	w23, w0, w19
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	cmp	w28, #0
	ccmp	w24, #0, #4, ne
	csel	w24, wzr, w24, ne
	ldr	w8, [x27]
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x21, x21, #1
	add	x25, x25, #16
	cmp	x21, w8, uxtw
	b.hs	LBB0_19
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x27, #8]
	ldr	x10, [x9, x25]
	ldr	x11, [x22, #16]
	cmp	x10, x11
	b.gt	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x8, x9, x25
	ldr	x26, [x8, #8]
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldr	w28, [x8, x21, lsl #2]
	mov	x8, x23
	sxtw	x19, w8
	add	x0, x20, x19
	mov	w8, #8
	sub	w1, w8, w23
	stp	x26, x28, [sp]
Lloh9:
	adrp	x2, l_.str.1@PAGE
Lloh10:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_snprintf
	add	x23, x19, w0, sxtw
	mov	x0, x26
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x26
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcmp
	cmp	w28, #1024
	b.lt	LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	cbz	w0, LBB0_7
	b	LBB0_8
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	cmp	w28, #1024
	b.ge	LBB0_7
	b	LBB0_8
LBB0_15:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_17:
	ldur	x8, [x29, #-88]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.18:
	mov	x0, x25
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_19:
	ldr	x21, [sp, #16]                  ; 8-byte Folded Reload
	cbz	w24, LBB0_21
LBB0_20:
Lloh20:
	adrp	x2, l_.str.5@PAGE
Lloh21:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x20
	mov	w1, #8
	bl	_snprintf
	mov	x23, x0
LBB0_21:
	mov	w25, #0
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	x20, [x8, #8]
	str	w23, [x8, #4]
LBB0_22:
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_17
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MIB counters\n"

l_.str.1:                               ; @.str.1
	.asciz	"%-12s: %llu\n"

l_.str.2:                               ; @.str.2
	.asciz	"TxByte"

l_.str.3:                               ; @.str.3
	.asciz	"RxGoodByte"

l_.str.4:                               ; @.str.4
	.asciz	" (%s)\n"

l_.str.5:                               ; @.str.5
	.asciz	"No MIB data"

.subsections_via_symbols
