	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bgmac_chip_init
_bgmac_chip_init:                       ## @bgmac_chip_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_BGMAC_INT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$-1, %edx
	callq	_bgmac_write
	movq	_BGMAC_INT_RECV_LAZY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BGMAC_IRL_FC_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movq	%rbx, %rdi
	callq	_bgmac_write
	movq	_BGMAC_CMDCFG_RPI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_bgmac_cmdcfg_maskset
	movq	8(%rbx), %rdi
	callq	_bgmac_set_rx_mode
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bgmac_write_mac_address
	cmpq	$0, (%rbx)
	movq	_BGMAC_CMDCFG_ML@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$-1, %esi
	jmp	LBB0_3
LBB0_2:
	notl	%edx
	movq	%rbx, %rdi
	movl	%edx, %esi
	xorl	%edx, %edx
LBB0_3:
	xorl	%ecx, %ecx
	callq	_bgmac_cmdcfg_maskset
	movq	_BGMAC_RXMAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ETHER_MAX_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addl	$32, %edx
	movq	%rbx, %rdi
	callq	_bgmac_write
	movq	%rbx, %rdi
	callq	_bgmac_chip_intrs_on
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_bgmac_enable                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BGMAC_INT_STATUS,4,2           ## @BGMAC_INT_STATUS
	.comm	_BGMAC_INT_RECV_LAZY,4,2        ## @BGMAC_INT_RECV_LAZY
	.comm	_BGMAC_IRL_FC_SHIFT,4,2         ## @BGMAC_IRL_FC_SHIFT
	.comm	_BGMAC_CMDCFG_RPI,4,2           ## @BGMAC_CMDCFG_RPI
	.comm	_BGMAC_CMDCFG_ML,4,2            ## @BGMAC_CMDCFG_ML
	.comm	_BGMAC_RXMAX_LENGTH,4,2         ## @BGMAC_RXMAX_LENGTH
	.comm	_ETHER_MAX_LEN,4,2              ## @ETHER_MAX_LEN
	.no_dead_strip	_bgmac_chip_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bgmac_chip_init
_bgmac_chip_init:                       ; @bgmac_chip_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _BGMAC_INT_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BGMAC_INT_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #-1
	bl	_bgmac_write
Lloh3:
	adrp	x8, _BGMAC_INT_RECV_LAZY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BGMAC_INT_RECV_LAZY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _BGMAC_IRL_FC_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BGMAC_IRL_FC_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w2, w9, w8
	mov	x0, x19
	bl	_bgmac_write
Lloh9:
	adrp	x8, _BGMAC_CMDCFG_RPI@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BGMAC_CMDCFG_RPI@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mvn	w1, w8
	mov	x0, x19
	mov	w2, #0
	mov	w3, #1
	bl	_bgmac_cmdcfg_maskset
	ldr	x0, [x19, #8]
	bl	_bgmac_set_rx_mode
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bgmac_write_mac_address
	ldr	x8, [x19]
Lloh12:
	adrp	x9, _BGMAC_CMDCFG_ML@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BGMAC_CMDCFG_ML@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x9]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #-1
	b	LBB0_3
LBB0_2:
	mvn	w1, w2
	mov	x0, x19
	mov	w2, #0
LBB0_3:
	mov	w3, #0
	bl	_bgmac_cmdcfg_maskset
Lloh15:
	adrp	x8, _BGMAC_RXMAX_LENGTH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BGMAC_RXMAX_LENGTH@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _ETHER_MAX_LEN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ETHER_MAX_LEN@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	add	w2, w8, #32
	mov	x0, x19
	bl	_bgmac_write
	mov	x0, x19
	bl	_bgmac_chip_intrs_on
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_bgmac_enable
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BGMAC_INT_STATUS,4,2           ; @BGMAC_INT_STATUS
	.comm	_BGMAC_INT_RECV_LAZY,4,2        ; @BGMAC_INT_RECV_LAZY
	.comm	_BGMAC_IRL_FC_SHIFT,4,2         ; @BGMAC_IRL_FC_SHIFT
	.comm	_BGMAC_CMDCFG_RPI,4,2           ; @BGMAC_CMDCFG_RPI
	.comm	_BGMAC_CMDCFG_ML,4,2            ; @BGMAC_CMDCFG_ML
	.comm	_BGMAC_RXMAX_LENGTH,4,2         ; @BGMAC_RXMAX_LENGTH
	.comm	_ETHER_MAX_LEN,4,2              ; @ETHER_MAX_LEN
	.no_dead_strip	_bgmac_chip_init
.subsections_via_symbols
