	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bgmac_clear_mib
_bgmac_clear_mib:                       ## @bgmac_clear_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_BGMAC_FEAT_NO_CLR_MIB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_7
## %bb.1:
	movq	%rdi, %r15
	movq	_BGMAC_DEV_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BGMAC_DC_MROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_bgmac_set
	movq	_BGMAC_NUM_MIB_TX_REGS@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_4
## %bb.2:
	xorl	%r13d, %r13d
	movq	_BGMAC_TX_GOOD_OCTETS@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rsi
	addq	%r13, %rsi
	movq	%r15, %rdi
	callq	_bgmac_read
	incq	%rbx
	movslq	(%r14), %rax
	addq	$4, %r13
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	movq	_BGMAC_NUM_MIB_RX_REGS@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_7
## %bb.5:
	xorl	%r13d, %r13d
	movq	_BGMAC_RX_GOOD_OCTETS@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rsi
	addq	%r13, %rsi
	movq	%r15, %rdi
	callq	_bgmac_read
	incq	%rbx
	movslq	(%r14), %rax
	addq	$4, %r13
	cmpq	%rax, %rbx
	jl	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BGMAC_FEAT_NO_CLR_MIB,4,2      ## @BGMAC_FEAT_NO_CLR_MIB
	.comm	_BGMAC_DEV_CTL,4,2              ## @BGMAC_DEV_CTL
	.comm	_BGMAC_DC_MROR,4,2              ## @BGMAC_DC_MROR
	.comm	_BGMAC_NUM_MIB_TX_REGS,4,2      ## @BGMAC_NUM_MIB_TX_REGS
	.comm	_BGMAC_TX_GOOD_OCTETS,8,3       ## @BGMAC_TX_GOOD_OCTETS
	.comm	_BGMAC_NUM_MIB_RX_REGS,4,2      ## @BGMAC_NUM_MIB_RX_REGS
	.comm	_BGMAC_RX_GOOD_OCTETS,8,3       ## @BGMAC_RX_GOOD_OCTETS
	.no_dead_strip	_bgmac_clear_mib
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bgmac_clear_mib
_bgmac_clear_mib:                       ; @bgmac_clear_mib
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _BGMAC_FEAT_NO_CLR_MIB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BGMAC_FEAT_NO_CLR_MIB@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _BGMAC_DEV_CTL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BGMAC_DEV_CTL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _BGMAC_DC_MROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BGMAC_DC_MROR@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_bgmac_set
Lloh9:
	adrp	x20, _BGMAC_NUM_MIB_TX_REGS@GOTPAGE
Lloh10:
	ldr	x20, [x20, _BGMAC_NUM_MIB_TX_REGS@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x21, #0
	mov	x22, #0
Lloh11:
	adrp	x23, _BGMAC_TX_GOOD_OCTETS@GOTPAGE
Lloh12:
	ldr	x23, [x23, _BGMAC_TX_GOOD_OCTETS@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x1, x21, x8
	mov	x0, x19
	bl	_bgmac_read
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_3
LBB0_4:
Lloh13:
	adrp	x20, _BGMAC_NUM_MIB_RX_REGS@GOTPAGE
Lloh14:
	ldr	x20, [x20, _BGMAC_NUM_MIB_RX_REGS@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x21, #0
	mov	x22, #0
Lloh15:
	adrp	x23, _BGMAC_RX_GOOD_OCTETS@GOTPAGE
Lloh16:
	ldr	x23, [x23, _BGMAC_RX_GOOD_OCTETS@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x1, x21, x8
	mov	x0, x19
	bl	_bgmac_read
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_6
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_BGMAC_FEAT_NO_CLR_MIB,4,2      ; @BGMAC_FEAT_NO_CLR_MIB
	.comm	_BGMAC_DEV_CTL,4,2              ; @BGMAC_DEV_CTL
	.comm	_BGMAC_DC_MROR,4,2              ; @BGMAC_DC_MROR
	.comm	_BGMAC_NUM_MIB_TX_REGS,4,2      ; @BGMAC_NUM_MIB_TX_REGS
	.comm	_BGMAC_TX_GOOD_OCTETS,8,3       ; @BGMAC_TX_GOOD_OCTETS
	.comm	_BGMAC_NUM_MIB_RX_REGS,4,2      ; @BGMAC_NUM_MIB_RX_REGS
	.comm	_BGMAC_RX_GOOD_OCTETS,8,3       ; @BGMAC_RX_GOOD_OCTETS
	.no_dead_strip	_bgmac_clear_mib
.subsections_via_symbols
