	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mediatek_dwmac_init
_mediatek_dwmac_init:                   ## @mediatek_dwmac_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rsi), %r12
	movl	(%rsi), %ebx
	movl	20(%r12), %edi
	callq	_DMA_BIT_MASK
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_dma_set_mask_and_coherent
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	callq	*(%r12)
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	movq	%r14, %rdi
	callq	*8(%r12)
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_7:
	movl	16(%r12), %edi
	movl	4(%r14), %esi
	callq	_clk_bulk_prepare_enable
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_2:
	movl	%ebx, %edx
	callq	_dev_err
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	callq	_pm_runtime_enable
	movq	%r15, %rdi
	callq	_pm_runtime_get_sync
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No suitable DMA available, err = %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to set phy interface, err = %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to set delay value, err = %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to enable clks, err = %d\n"

	.no_dead_strip	_mediatek_dwmac_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mediatek_dwmac_init
_mediatek_dwmac_init:                   ; @mediatek_dwmac_init
	.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	x20, x1
	mov	x21, x0
	ldr	x22, [x1, #8]
	ldr	w19, [x1]
	ldr	w0, [x22, #20]
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_dma_set_mask_and_coherent
	cbz	w0, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	w0, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_2:
	ldr	x8, [x22]
	mov	x0, x20
	blr	x8
	cbz	w0, LBB0_4
; %bb.3:
	mov	x19, x0
	ldr	w0, [x20]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_4:
	ldr	x8, [x22, #8]
	mov	x0, x20
	blr	x8
	cbz	w0, LBB0_6
; %bb.5:
	mov	x19, x0
	ldr	w0, [x20]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_6:
	ldr	w0, [x22, #16]
	ldr	w1, [x20, #4]
	bl	_clk_bulk_prepare_enable
	mov	x19, x0
	cbz	w0, LBB0_10
; %bb.7:
	ldr	w0, [x20]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_8:
	mov	x2, x19
	bl	_dev_err
LBB0_9:
	mov	x0, x19
	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
LBB0_10:
	mov	x0, x21
	bl	_pm_runtime_enable
	mov	x0, x21
	bl	_pm_runtime_get_sync
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No suitable DMA available, err = %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to set phy interface, err = %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to set delay value, err = %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to enable clks, err = %d\n"

	.no_dead_strip	_mediatek_dwmac_init
.subsections_via_symbols
