	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _dma_ctrlflags
__dma_ctrlflags:                        ## @_dma_ctrlflags
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	%esi, %ebx
	movq	%rdi, %r14
	notl	%ebx
	andl	(%rdi), %ebx
	orl	%edx, %ebx
	movq	_DMA_CTRL_PEN@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.3:
	movl	4(%r14), %r15d
	movq	%r14, %rdi
	callq	_DMA64TXREGOFFS
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_bcma_read32
	movl	%eax, %r15d
	movl	4(%r14), %r12d
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_DMA64TXREGOFFS
	movq	_D64_XC_PD@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	orl	%r15d, %edx
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_bcma_write32
	movl	4(%r14), %r12d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_DMA64TXREGOFFS
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_bcma_read32
	testl	%eax, (%r13)
	je	LBB0_5
## %bb.4:
	movl	4(%r14), %r12d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_DMA64TXREGOFFS
	movl	%r12d, %edi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_bcma_write32
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_5:
	movq	_DMA_CTRL_PEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
LBB0_6:
	movl	%ebx, (%r14)
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_CTRL_PEN,4,2               ## @DMA_CTRL_PEN
	.comm	_D64_XC_PD,4,2                  ## @D64_XC_PD
	.no_dead_strip	__dma_ctrlflags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _dma_ctrlflags
__dma_ctrlflags:                        ; @_dma_ctrlflags
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0]
	bic	w8, w8, w1
	orr	w19, w8, w2
Lloh0:
	adrp	x23, _DMA_CTRL_PEN@GOTPAGE
Lloh1:
	ldr	x23, [x23, _DMA_CTRL_PEN@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w19, w8
	b.eq	LBB0_6
; %bb.2:
	ldr	w21, [x20, #4]
	mov	x0, x20
	bl	_DMA64TXREGOFFS
	mov	x1, x0
	mov	x0, x21
	bl	_bcma_read32
	mov	x21, x0
	ldr	w22, [x20, #4]
	mov	x0, x20
	mov	x1, x21
	bl	_DMA64TXREGOFFS
	mov	x1, x0
Lloh2:
	adrp	x24, _D64_XC_PD@GOTPAGE
Lloh3:
	ldr	x24, [x24, _D64_XC_PD@GOTPAGEOFF]
	ldr	w8, [x24]
	orr	w2, w8, w21
	mov	x0, x22
	bl	_bcma_write32
	ldr	w22, [x20, #4]
	mov	x0, x20
	mov	x1, x21
	bl	_DMA64TXREGOFFS
	mov	x1, x0
	mov	x0, x22
	bl	_bcma_read32
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.3:
	ldr	w22, [x20, #4]
	mov	x0, x20
	mov	x1, x21
	bl	_DMA64TXREGOFFS
	mov	x1, x0
	mov	x0, x22
	mov	x2, x21
	bl	_bcma_write32
	b	LBB0_6
LBB0_4:
	mov	w19, #0
	b	LBB0_7
LBB0_5:
	ldr	w8, [x23]
	bic	w19, w19, w8
LBB0_6:
	str	w19, [x20]
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_CTRL_PEN,4,2               ; @DMA_CTRL_PEN
	.comm	_D64_XC_PD,4,2                  ; @D64_XC_PD
	.no_dead_strip	__dma_ctrlflags
.subsections_via_symbols
