	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_flow_ctrl
_set_flow_ctrl:                         ## @set_flow_ctrl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %r14d
	movl	12(%rdi), %ecx
	movq	_DMA_RX_FLOW_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %eax
	notl	%eax
	andl	%ecx, %eax
	orl	%ecx, %edi
	testl	%esi, %esi
	cmovel	%eax, %edi
	movl	%edi, 12(%rbx)
	movq	_DMA_TX_FLOW_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	notl	%esi
	andl	%r14d, %esi
	orl	%r14d, %eax
	testl	%edx, %edx
	cmovel	%esi, %eax
	movl	%eax, 8(%rbx)
	cmpq	$0, 16(%rbx)
	je	LBB0_4
## %bb.1:
	cmpl	%edi, %ecx
	je	LBB0_3
## %bb.2:
	movq	_KS_DMA_RX_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	movl	8(%rbx), %eax
LBB0_3:
	cmpl	%eax, %r14d
	jne	LBB0_5
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	_KS_DMA_TX_CTRL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%rbx), %rsi
	movl	%eax, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_RX_FLOW_ENABLE,4,2         ## @DMA_RX_FLOW_ENABLE
	.comm	_DMA_TX_FLOW_ENABLE,4,2         ## @DMA_TX_FLOW_ENABLE
	.comm	_KS_DMA_RX_CTRL,8,3             ## @KS_DMA_RX_CTRL
	.comm	_KS_DMA_TX_CTRL,8,3             ## @KS_DMA_TX_CTRL
	.no_dead_strip	_set_flow_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_flow_ctrl
_set_flow_ctrl:                         ; @set_flow_ctrl
	.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
	ldp	w20, w9, [x0, #8]
Lloh0:
	adrp	x8, _DMA_RX_FLOW_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_RX_FLOW_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bic	w10, w9, w8
	orr	w8, w8, w9
	cmp	w1, #0
	csel	w0, w10, w8, eq
Lloh3:
	adrp	x8, _DMA_TX_FLOW_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_TX_FLOW_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	bic	w10, w20, w8
	orr	w8, w8, w20
	cmp	w2, #0
	csel	w8, w10, w8, eq
	stp	w8, w0, [x19, #8]
	ldr	x10, [x19, #16]
	cbz	x10, LBB0_4
; %bb.1:
	cmp	w9, w0
	b.eq	LBB0_3
; %bb.2:
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _KS_DMA_RX_CTRL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _KS_DMA_RX_CTRL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w8, [x19, #8]
LBB0_3:
	cmp	w20, w8
	b.ne	LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	x9, [x19]
Lloh9:
	adrp	x10, _KS_DMA_TX_CTRL@GOTPAGE
Lloh10:
	ldr	x10, [x10, _KS_DMA_TX_CTRL@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	add	x1, x10, x9
	mov	x0, x8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_writel
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_RX_FLOW_ENABLE,4,2         ; @DMA_RX_FLOW_ENABLE
	.comm	_DMA_TX_FLOW_ENABLE,4,2         ; @DMA_TX_FLOW_ENABLE
	.comm	_KS_DMA_RX_CTRL,8,3             ; @KS_DMA_RX_CTRL
	.comm	_KS_DMA_TX_CTRL,8,3             ; @KS_DMA_TX_CTRL
	.no_dead_strip	_set_flow_ctrl
.subsections_via_symbols
