	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function platform_bgmac_clk_enable
_platform_bgmac_clk_enable:             ## @platform_bgmac_clk_enable
	.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
	cmpl	$0, (%rdi)
	je	LBB0_4
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_BCMA_RESET_CTL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_bgmac_idm_read
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_bgmac_idm_write
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_bgmac_idm_read
	movl	$1, %edi
	callq	_udelay
LBB0_3:
	movq	_BCMA_IOCTL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_bgmac_idm_read
	movq	_BGMAC_AWCACHE@GOTPCREL(%rip), %rcx
	movq	_BGMAC_ARCACHE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_BGMAC_AWUSER@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_BGMAC_ARUSER@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	notl	%edx
	andl	%r14d, %edx
	movq	_BGMAC_CLK_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	orl	%eax, %edx
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_bgmac_idm_write
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_bgmac_idm_read
	movl	$1, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_udelay                         ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BCMA_RESET_CTL,4,2             ## @BCMA_RESET_CTL
	.comm	_BCMA_IOCTL,4,2                 ## @BCMA_IOCTL
	.comm	_BGMAC_AWCACHE,4,2              ## @BGMAC_AWCACHE
	.comm	_BGMAC_ARCACHE,4,2              ## @BGMAC_ARCACHE
	.comm	_BGMAC_AWUSER,4,2               ## @BGMAC_AWUSER
	.comm	_BGMAC_ARUSER,4,2               ## @BGMAC_ARUSER
	.comm	_BGMAC_CLK_EN,4,2               ## @BGMAC_CLK_EN
	.no_dead_strip	_platform_bgmac_clk_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function platform_bgmac_clk_enable
_platform_bgmac_clk_enable:             ; @platform_bgmac_clk_enable
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _BCMA_RESET_CTL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _BCMA_RESET_CTL@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_bgmac_idm_read
	cbz	w0, LBB0_3
; %bb.2:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_bgmac_idm_write
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bgmac_idm_read
	mov	w0, #1
	bl	_udelay
LBB0_3:
Lloh2:
	adrp	x21, _BCMA_IOCTL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _BCMA_IOCTL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bgmac_idm_read
Lloh4:
	adrp	x8, _BGMAC_AWCACHE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BGMAC_AWCACHE@GOTPAGEOFF]
Lloh6:
	adrp	x9, _BGMAC_ARCACHE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BGMAC_ARCACHE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh10:
	adrp	x9, _BGMAC_AWUSER@GOTPAGE
Lloh11:
	ldr	x9, [x9, _BGMAC_AWUSER@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh13:
	adrp	x9, _BGMAC_ARUSER@GOTPAGE
Lloh14:
	ldr	x9, [x9, _BGMAC_ARUSER@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w8, w20, w8
Lloh16:
	adrp	x9, _BGMAC_CLK_EN@GOTPAGE
Lloh17:
	ldr	x9, [x9, _BGMAC_CLK_EN@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w9, w9, w0
	orr	w2, w9, w8
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bgmac_idm_write
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bgmac_idm_read
	mov	w0, #1
	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
	b	_udelay
LBB0_4:
	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 AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_BCMA_RESET_CTL,4,2             ; @BCMA_RESET_CTL
	.comm	_BCMA_IOCTL,4,2                 ; @BCMA_IOCTL
	.comm	_BGMAC_AWCACHE,4,2              ; @BGMAC_AWCACHE
	.comm	_BGMAC_ARCACHE,4,2              ; @BGMAC_ARCACHE
	.comm	_BGMAC_AWUSER,4,2               ; @BGMAC_AWUSER
	.comm	_BGMAC_ARUSER,4,2               ; @BGMAC_ARUSER
	.comm	_BGMAC_CLK_EN,4,2               ; @BGMAC_CLK_EN
	.no_dead_strip	_platform_bgmac_clk_enable
.subsections_via_symbols
