	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar7240_set_mirror_tx
_ar7240_set_mirror_tx:                  ## @ar7240_set_mirror_tx
	.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
	movq	%rdx, %r15
	movq	%rdi, %rbx
	callq	_sw_to_ar7240
	movl	(%r15), %edi
	cmpl	(%rbx), %edi
	jge	LBB0_1
## %bb.2:
	movq	(%rax), %r14
	movl	4(%r15), %ebx
	callq	_AR7240_REG_PORT_CTRL
	movl	%eax, %esi
	movq	_AR7240_PORT_CTRL_MIRROR_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	$1, %ebx
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_ar7240sw_reg_set
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_4:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_ar7240sw_reg_rmw
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AR7240_PORT_CTRL_MIRROR_TX,4,2 ## @AR7240_PORT_CTRL_MIRROR_TX
	.no_dead_strip	_ar7240_set_mirror_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar7240_set_mirror_tx
_ar7240_set_mirror_tx:                  ; @ar7240_set_mirror_tx
	.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	x20, x2
	mov	x19, x0
	bl	_sw_to_ar7240
	mov	x8, x0
	ldr	w0, [x20]
	ldr	w9, [x19]
	cmp	w0, w9
	b.ge	LBB0_3
; %bb.1:
	ldr	x19, [x8]
	ldr	w20, [x20, #4]
	bl	_AR7240_REG_PORT_CTRL
	mov	x1, x0
Lloh0:
	adrp	x8, _AR7240_PORT_CTRL_MIRROR_TX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR7240_PORT_CTRL_MIRROR_TX@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	cmp	w20, #1
	b.ne	LBB0_4
; %bb.2:
	bl	_ar7240sw_reg_set
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	mov	w3, #0
	bl	_ar7240sw_reg_rmw
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AR7240_PORT_CTRL_MIRROR_TX,4,2 ; @AR7240_PORT_CTRL_MIRROR_TX
	.no_dead_strip	_ar7240_set_mirror_tx
.subsections_via_symbols
