	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43legacy_dmacontroller_tx_reset
_b43legacy_dmacontroller_tx_reset:      ## @b43legacy_dmacontroller_tx_reset
	.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
	movq	%rsi, %r13
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_might_sleep
	movl	$10, %r12d
	movq	_B43legacy_DMA32_TXSTAT_IDLEWAIT@GOTPCREL(%rip), %r14
	movq	_B43legacy_DMA32_TXSTAT_STOPPED@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_B43legacy_DMA32_TXSTATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r13, %rsi
	movq	%rbx, %rdi
	callq	_b43legacy_read32
	movq	_B43legacy_DMA32_TXSTATE@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_B43legacy_DMA32_TXSTAT_DISABLED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	(%r14), %eax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	(%r15), %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	callq	_msleep
	decl	%r12d
	jne	LBB0_1
LBB0_5:
	movq	_B43legacy_DMA32_TXCTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r13, %rsi
	movq	%rbx, %r12
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_b43legacy_write32
	movq	_B43legacy_DMA32_TXSTATUS@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	addq	%r13, %rsi
	movq	%rbx, %rdi
	callq	_b43legacy_read32
	movq	_B43legacy_DMA32_TXSTATE@GOTPCREL(%rip), %r15
	andl	(%r15), %eax
	movq	_B43legacy_DMA32_TXSTAT_DISABLED@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	je	LBB0_16
## %bb.6:
	movl	$1, %edi
	callq	_msleep
	movq	(%r14), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	callq	_b43legacy_read32
	andl	(%r15), %eax
	cmpl	(%rbx), %eax
	je	LBB0_16
## %bb.7:
	movl	$1, %edi
	callq	_msleep
	movq	(%r14), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	callq	_b43legacy_read32
	andl	(%r15), %eax
	cmpl	(%rbx), %eax
	je	LBB0_16
## %bb.8:
	movl	$1, %edi
	callq	_msleep
	movq	(%r14), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	callq	_b43legacy_read32
	andl	(%r15), %eax
	cmpl	(%rbx), %eax
	je	LBB0_16
## %bb.9:
	movl	$1, %edi
	callq	_msleep
	movq	(%r14), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	callq	_b43legacy_read32
	andl	(%r15), %eax
	cmpl	(%rbx), %eax
	je	LBB0_16
## %bb.10:
	movl	$1, %edi
	callq	_msleep
	movq	(%r14), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	callq	_b43legacy_read32
	andl	(%r15), %eax
	cmpl	(%rbx), %eax
	je	LBB0_16
## %bb.11:
	movl	$1, %edi
	callq	_msleep
	movq	(%r14), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	callq	_b43legacy_read32
	andl	(%r15), %eax
	cmpl	(%rbx), %eax
	je	LBB0_16
## %bb.12:
	movl	$1, %edi
	callq	_msleep
	movq	(%r14), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	callq	_b43legacy_read32
	andl	(%r15), %eax
	cmpl	(%rbx), %eax
	je	LBB0_16
## %bb.13:
	movl	$1, %edi
	callq	_msleep
	movq	(%r14), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	callq	_b43legacy_read32
	andl	(%r15), %eax
	cmpl	(%rbx), %eax
	je	LBB0_16
## %bb.14:
	movl	$1, %edi
	callq	_msleep
	addq	(%r14), %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_b43legacy_read32
	andl	(%r15), %eax
	cmpl	(%rbx), %eax
	jne	LBB0_15
LBB0_16:
	movl	$1, %edi
	callq	_msleep
	xorl	%eax, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	$1, %edi
	callq	_msleep
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_b43legacyerr
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_B43legacy_DMA32_TXSTATUS,8,3   ## @B43legacy_DMA32_TXSTATUS
	.comm	_B43legacy_DMA32_TXSTATE,4,2    ## @B43legacy_DMA32_TXSTATE
	.comm	_B43legacy_DMA32_TXSTAT_DISABLED,4,2 ## @B43legacy_DMA32_TXSTAT_DISABLED
	.comm	_B43legacy_DMA32_TXSTAT_IDLEWAIT,4,2 ## @B43legacy_DMA32_TXSTAT_IDLEWAIT
	.comm	_B43legacy_DMA32_TXSTAT_STOPPED,4,2 ## @B43legacy_DMA32_TXSTAT_STOPPED
	.comm	_B43legacy_DMA32_TXCTL,8,3      ## @B43legacy_DMA32_TXCTL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA TX reset timed out\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_b43legacy_dmacontroller_tx_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43legacy_dmacontroller_tx_reset
_b43legacy_dmacontroller_tx_reset:      ; @b43legacy_dmacontroller_tx_reset
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	bl	_might_sleep
	mov	w24, #10
Lloh0:
	adrp	x23, _B43legacy_DMA32_TXSTATUS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _B43legacy_DMA32_TXSTATUS@GOTPAGEOFF]
Lloh2:
	adrp	x22, _B43legacy_DMA32_TXSTATE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _B43legacy_DMA32_TXSTATE@GOTPAGEOFF]
Lloh4:
	adrp	x21, _B43legacy_DMA32_TXSTAT_DISABLED@GOTPAGE
Lloh5:
	ldr	x21, [x21, _B43legacy_DMA32_TXSTAT_DISABLED@GOTPAGEOFF]
Lloh6:
	adrp	x25, _B43legacy_DMA32_TXSTAT_IDLEWAIT@GOTPAGE
Lloh7:
	ldr	x25, [x25, _B43legacy_DMA32_TXSTAT_IDLEWAIT@GOTPAGEOFF]
Lloh8:
	adrp	x26, _B43legacy_DMA32_TXSTAT_STOPPED@GOTPAGE
Lloh9:
	ldr	x26, [x26, _B43legacy_DMA32_TXSTAT_STOPPED@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x1, x8, x20
	mov	x0, x19
	bl	_b43legacy_read32
	ldr	w8, [x22]
	and	w8, w8, w0
	ldr	w9, [x21]
	ldr	w10, [x25]
	ldr	w11, [x26]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	ccmp	w8, w11, #4, ne
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	bl	_msleep
	subs	w24, w24, #1
	b.ne	LBB0_1
LBB0_3:
Lloh10:
	adrp	x8, _B43legacy_DMA32_TXCTL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _B43legacy_DMA32_TXCTL@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	add	x1, x8, x20
	mov	x0, x19
	mov	w2, #0
	bl	_b43legacy_write32
	ldr	x8, [x23]
	add	x1, x8, x20
	mov	x0, x19
	bl	_b43legacy_read32
	ldr	w8, [x22]
	and	w8, w8, w0
	ldr	w9, [x21]
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.4:
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x23]
	add	x1, x8, x20
	mov	x0, x19
	bl	_b43legacy_read32
	ldr	w8, [x22]
	and	w8, w8, w0
	ldr	w9, [x21]
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.5:
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x23]
	add	x1, x8, x20
	mov	x0, x19
	bl	_b43legacy_read32
	ldr	w8, [x22]
	and	w8, w8, w0
	ldr	w9, [x21]
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.6:
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x23]
	add	x1, x8, x20
	mov	x0, x19
	bl	_b43legacy_read32
	ldr	w8, [x22]
	and	w8, w8, w0
	ldr	w9, [x21]
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.7:
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x23]
	add	x1, x8, x20
	mov	x0, x19
	bl	_b43legacy_read32
	ldr	w8, [x22]
	and	w8, w8, w0
	ldr	w9, [x21]
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.8:
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x23]
	add	x1, x8, x20
	mov	x0, x19
	bl	_b43legacy_read32
	ldr	w8, [x22]
	and	w8, w8, w0
	ldr	w9, [x21]
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.9:
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x23]
	add	x1, x8, x20
	mov	x0, x19
	bl	_b43legacy_read32
	ldr	w8, [x22]
	and	w8, w8, w0
	ldr	w9, [x21]
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.10:
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x23]
	add	x1, x8, x20
	mov	x0, x19
	bl	_b43legacy_read32
	ldr	w8, [x22]
	and	w8, w8, w0
	ldr	w9, [x21]
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.11:
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x23]
	add	x1, x8, x20
	mov	x0, x19
	bl	_b43legacy_read32
	ldr	w8, [x22]
	and	w8, w8, w0
	ldr	w9, [x21]
	cmp	w8, w9
	b.eq	LBB0_13
; %bb.12:
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x23]
	add	x1, x8, x20
	mov	x0, x19
	bl	_b43legacy_read32
	ldr	w8, [x22]
	and	w8, w8, w0
	ldr	w9, [x21]
	cmp	w8, w9
	b.ne	LBB0_15
LBB0_13:
	mov	w0, #1
	bl	_msleep
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	w0, #1
	bl	_msleep
	ldr	w0, [x19]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_b43legacyerr
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_B43legacy_DMA32_TXSTATUS,8,3   ; @B43legacy_DMA32_TXSTATUS
	.comm	_B43legacy_DMA32_TXSTATE,4,2    ; @B43legacy_DMA32_TXSTATE
	.comm	_B43legacy_DMA32_TXSTAT_DISABLED,4,2 ; @B43legacy_DMA32_TXSTAT_DISABLED
	.comm	_B43legacy_DMA32_TXSTAT_IDLEWAIT,4,2 ; @B43legacy_DMA32_TXSTAT_IDLEWAIT
	.comm	_B43legacy_DMA32_TXSTAT_STOPPED,4,2 ; @B43legacy_DMA32_TXSTAT_STOPPED
	.comm	_B43legacy_DMA32_TXCTL,8,3      ; @B43legacy_DMA32_TXCTL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA TX reset timed out\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_b43legacy_dmacontroller_tx_reset
.subsections_via_symbols
