	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function m2m_hw_setup
_m2m_hw_setup:                          ## @m2m_hw_setup
	.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	8(%rdi), %rdx
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movl	(%rdx), %eax
	cmpl	$129, %eax
	je	LBB0_6
## %bb.3:
	cmpl	$128, %eax
	jne	LBB0_5
## %bb.4:
	movq	_M2M_CONTROL_PWSC_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$5, %eax
	shll	%cl, %eax
	movq	_M2M_CONTROL_NO_HDSK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	4(%rdx), %ecx
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	movq	_M2M_CONTROL_SAH@GOTPCREL(%rip), %rcx
	cmoveq	_M2M_CONTROL_DAH@GOTPCREL(%rip), %rcx
	movq	_M2M_CONTROL_TM_RX@GOTPCREL(%rip), %rdx
	cmoveq	_M2M_CONTROL_TM_TX@GOTPCREL(%rip), %rdx
	movq	_M2M_CONTROL_RSS_SSPRX@GOTPCREL(%rip), %rsi
	cmoveq	_M2M_CONTROL_RSS_SSPTX@GOTPCREL(%rip), %rsi
	jmp	LBB0_7
LBB0_1:
	movq	_M2M_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rdi), %rsi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_writel
	jmp	LBB0_8
LBB0_6:
	movl	4(%rdx), %ecx
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	sete	%al
	movq	_M2M_CONTROL_PWSC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_M2M_CONTROL_SAH@GOTPCREL(%rip), %rdx
	cmoveq	_M2M_CONTROL_DAH@GOTPCREL(%rip), %rdx
	movq	_M2M_CONTROL_TM_RX@GOTPCREL(%rip), %rsi
	cmoveq	_M2M_CONTROL_TM_TX@GOTPCREL(%rip), %rsi
	orl	$2, %eax
	shll	%cl, %eax
	orl	(%rdx), %eax
	orl	(%rsi), %eax
	movq	_M2M_CONTROL_PW_16@GOTPCREL(%rip), %rsi
	movq	_M2M_CONTROL_RSS_IDE@GOTPCREL(%rip), %rdx
	movq	_M2M_CONTROL_NO_HDSK@GOTPCREL(%rip), %rcx
LBB0_7:
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	orl	(%rsi), %eax
	movq	_M2M_CONTROL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%rdi), %rsi
	movl	%eax, %edi
	callq	_writel
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_M2M_CONTROL,8,3                ## @M2M_CONTROL
	.comm	_M2M_CONTROL_PWSC_SHIFT,4,2     ## @M2M_CONTROL_PWSC_SHIFT
	.comm	_M2M_CONTROL_NO_HDSK,4,2        ## @M2M_CONTROL_NO_HDSK
	.comm	_DMA_MEM_TO_DEV,4,2             ## @DMA_MEM_TO_DEV
	.comm	_M2M_CONTROL_DAH,4,2            ## @M2M_CONTROL_DAH
	.comm	_M2M_CONTROL_TM_TX,4,2          ## @M2M_CONTROL_TM_TX
	.comm	_M2M_CONTROL_RSS_SSPTX,4,2      ## @M2M_CONTROL_RSS_SSPTX
	.comm	_M2M_CONTROL_SAH,4,2            ## @M2M_CONTROL_SAH
	.comm	_M2M_CONTROL_TM_RX,4,2          ## @M2M_CONTROL_TM_RX
	.comm	_M2M_CONTROL_RSS_SSPRX,4,2      ## @M2M_CONTROL_RSS_SSPRX
	.comm	_M2M_CONTROL_RSS_IDE,4,2        ## @M2M_CONTROL_RSS_IDE
	.comm	_M2M_CONTROL_PW_16,4,2          ## @M2M_CONTROL_PW_16
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_m2m_hw_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function m2m_hw_setup
_m2m_hw_setup:                          ; @m2m_hw_setup
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x9, [x0, #8]
	cbz	x9, LBB0_4
; %bb.1:
	ldr	w8, [x9]
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.3:
Lloh0:
	adrp	x8, _M2M_CONTROL_PWSC_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M2M_CONTROL_PWSC_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w10, #5
	lsl	w8, w10, w8
Lloh3:
	adrp	x10, _M2M_CONTROL_NO_HDSK@GOTPAGE
Lloh4:
	ldr	x10, [x10, _M2M_CONTROL_NO_HDSK@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w8, w8, w10
Lloh6:
	adrp	x10, _DMA_MEM_TO_DEV@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DMA_MEM_TO_DEV@GOTPAGEOFF]
	ldr	w9, [x9, #4]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _M2M_CONTROL_SAH@GOTPAGE
Lloh10:
	ldr	x11, [x11, _M2M_CONTROL_SAH@GOTPAGEOFF]
Lloh11:
	adrp	x12, _M2M_CONTROL_DAH@GOTPAGE
Lloh12:
	ldr	x12, [x12, _M2M_CONTROL_DAH@GOTPAGEOFF]
	cmp	w9, w10
	csel	x9, x12, x11, eq
Lloh13:
	adrp	x10, _M2M_CONTROL_TM_RX@GOTPAGE
Lloh14:
	ldr	x10, [x10, _M2M_CONTROL_TM_RX@GOTPAGEOFF]
Lloh15:
	adrp	x11, _M2M_CONTROL_TM_TX@GOTPAGE
Lloh16:
	ldr	x11, [x11, _M2M_CONTROL_TM_TX@GOTPAGEOFF]
	csel	x10, x11, x10, eq
Lloh17:
	adrp	x11, _M2M_CONTROL_RSS_SSPRX@GOTPAGE
Lloh18:
	ldr	x11, [x11, _M2M_CONTROL_RSS_SSPRX@GOTPAGEOFF]
Lloh19:
	adrp	x12, _M2M_CONTROL_RSS_SSPTX@GOTPAGE
Lloh20:
	ldr	x12, [x12, _M2M_CONTROL_RSS_SSPTX@GOTPAGEOFF]
	csel	x11, x12, x11, eq
	b	LBB0_6
LBB0_4:
	ldr	x8, [x0]
Lloh21:
	adrp	x9, _M2M_CONTROL@GOTPAGE
Lloh22:
	ldr	x9, [x9, _M2M_CONTROL@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	b	LBB0_7
LBB0_5:
	ldr	w8, [x9, #4]
Lloh24:
	adrp	x9, _DMA_MEM_TO_DEV@GOTPAGE
Lloh25:
	ldr	x9, [x9, _DMA_MEM_TO_DEV@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _M2M_CONTROL_PWSC_SHIFT@GOTPAGE
Lloh28:
	ldr	x10, [x10, _M2M_CONTROL_PWSC_SHIFT@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	cmp	w8, w9
	mov	w8, #2
	cinc	w8, w8, eq
	lsl	w8, w8, w10
Lloh30:
	adrp	x9, _M2M_CONTROL_DAH@GOTPAGE
Lloh31:
	ldr	x9, [x9, _M2M_CONTROL_DAH@GOTPAGEOFF]
Lloh32:
	adrp	x10, _M2M_CONTROL_SAH@GOTPAGE
Lloh33:
	ldr	x10, [x10, _M2M_CONTROL_SAH@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
Lloh34:
	adrp	x10, _M2M_CONTROL_TM_TX@GOTPAGE
Lloh35:
	ldr	x10, [x10, _M2M_CONTROL_TM_TX@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh36:
	adrp	x9, _M2M_CONTROL_TM_RX@GOTPAGE
Lloh37:
	ldr	x9, [x9, _M2M_CONTROL_TM_RX@GOTPAGEOFF]
	csel	x9, x10, x9, eq
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh38:
	adrp	x11, _M2M_CONTROL_PW_16@GOTPAGE
Lloh39:
	ldr	x11, [x11, _M2M_CONTROL_PW_16@GOTPAGEOFF]
Lloh40:
	adrp	x10, _M2M_CONTROL_RSS_IDE@GOTPAGE
Lloh41:
	ldr	x10, [x10, _M2M_CONTROL_RSS_IDE@GOTPAGEOFF]
Lloh42:
	adrp	x9, _M2M_CONTROL_NO_HDSK@GOTPAGE
Lloh43:
	ldr	x9, [x9, _M2M_CONTROL_NO_HDSK@GOTPAGEOFF]
LBB0_6:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x10]
	orr	w8, w8, w9
	ldr	w9, [x11]
	orr	w8, w8, w9
	ldr	x9, [x0]
Lloh44:
	adrp	x10, _M2M_CONTROL@GOTPAGE
Lloh45:
	ldr	x10, [x10, _M2M_CONTROL@GOTPAGEOFF]
Lloh46:
	ldr	x10, [x10]
	add	x1, x10, x9
	mov	x0, x8
LBB0_7:
	bl	_writel
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh47:
	adrp	x8, _EINVAL@GOTPAGE
Lloh48:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_M2M_CONTROL,8,3                ; @M2M_CONTROL
	.comm	_M2M_CONTROL_PWSC_SHIFT,4,2     ; @M2M_CONTROL_PWSC_SHIFT
	.comm	_M2M_CONTROL_NO_HDSK,4,2        ; @M2M_CONTROL_NO_HDSK
	.comm	_DMA_MEM_TO_DEV,4,2             ; @DMA_MEM_TO_DEV
	.comm	_M2M_CONTROL_DAH,4,2            ; @M2M_CONTROL_DAH
	.comm	_M2M_CONTROL_TM_TX,4,2          ; @M2M_CONTROL_TM_TX
	.comm	_M2M_CONTROL_RSS_SSPTX,4,2      ; @M2M_CONTROL_RSS_SSPTX
	.comm	_M2M_CONTROL_SAH,4,2            ; @M2M_CONTROL_SAH
	.comm	_M2M_CONTROL_TM_RX,4,2          ; @M2M_CONTROL_TM_RX
	.comm	_M2M_CONTROL_RSS_SSPRX,4,2      ; @M2M_CONTROL_RSS_SSPRX
	.comm	_M2M_CONTROL_RSS_IDE,4,2        ; @M2M_CONTROL_RSS_IDE
	.comm	_M2M_CONTROL_PW_16,4,2          ; @M2M_CONTROL_PW_16
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_m2m_hw_setup
.subsections_via_symbols
