	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b43legacy_mac_suspend          ## -- Begin function b43legacy_mac_suspend
	.p2align	4, 0x90
_b43legacy_mac_suspend:                 ## @b43legacy_mac_suspend
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	xorl	%eax, %eax
	callq	_might_sleep
	xorl	%eax, %eax
	callq	_irqs_disabled
	movl	%eax, %edi
	callq	_B43legacy_WARN_ON
	movq	(%r15), %rdi
	shrq	$63, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_B43legacy_WARN_ON
	cmpq	$0, (%r15)
	jne	LBB0_5
## %bb.1:
	movq	8(%r15), %rdi
	callq	_spin_lock_irq
	movq	_B43legacy_MMIO_GEN_IRQ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_b43legacy_write32
	movq	8(%r15), %rdi
	callq	_spin_unlock_irq
	movq	%r15, %rdi
	callq	_b43legacy_synchronize_irq
	movq	%r15, %rdi
	movl	$-1, %esi
	movl	$1, %edx
	callq	_b43legacy_power_saving_ctl_bits
	movq	_B43legacy_MMIO_MACCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_b43legacy_read32
	movq	_B43legacy_MACCTL_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_b43legacy_write32
	movq	_B43legacy_MMIO_GEN_IRQ_REASON@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_b43legacy_read32
	movl	$-40, %ebx
	movq	_B43legacy_IRQ_MAC_SUSPENDED@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_b43legacy_read32
	testl	%eax, (%r12)
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_msleep
	incl	%ebx
	jne	LBB0_2
## %bb.4:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_b43legacyerr
LBB0_5:
	incq	(%r15)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B43legacy_MMIO_GEN_IRQ_MASK,4,2 ## @B43legacy_MMIO_GEN_IRQ_MASK
	.comm	_B43legacy_MMIO_MACCTL,4,2      ## @B43legacy_MMIO_MACCTL
	.comm	_B43legacy_MACCTL_ENABLED,4,2   ## @B43legacy_MACCTL_ENABLED
	.comm	_B43legacy_MMIO_GEN_IRQ_REASON,4,2 ## @B43legacy_MMIO_GEN_IRQ_REASON
	.comm	_B43legacy_IRQ_MAC_SUSPENDED,4,2 ## @B43legacy_IRQ_MAC_SUSPENDED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAC suspend failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b43legacy_mac_suspend          ; -- Begin function b43legacy_mac_suspend
	.p2align	2
_b43legacy_mac_suspend:                 ; @b43legacy_mac_suspend
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_might_sleep
	bl	_irqs_disabled
	bl	_B43legacy_WARN_ON
	ldr	x8, [x19]
	lsr	x0, x8, #63
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_B43legacy_WARN_ON
	ldr	x8, [x19]
	cbnz	x8, LBB0_5
; %bb.1:
	ldr	x0, [x19, #8]
	bl	_spin_lock_irq
Lloh0:
	adrp	x8, _B43legacy_MMIO_GEN_IRQ_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _B43legacy_MMIO_GEN_IRQ_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_b43legacy_write32
	ldr	x0, [x19, #8]
	bl	_spin_unlock_irq
	mov	x0, x19
	bl	_b43legacy_synchronize_irq
	mov	x0, x19
	mov	w1, #-1
	mov	w2, #1
	bl	_b43legacy_power_saving_ctl_bits
Lloh3:
	adrp	x8, _B43legacy_MMIO_MACCTL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _B43legacy_MMIO_MACCTL@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_b43legacy_read32
Lloh6:
	adrp	x8, _B43legacy_MACCTL_ENABLED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _B43legacy_MACCTL_ENABLED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	bic	w2, w0, w8
	mov	x0, x19
	mov	x1, x20
	bl	_b43legacy_write32
Lloh9:
	adrp	x20, _B43legacy_MMIO_GEN_IRQ_REASON@GOTPAGE
Lloh10:
	ldr	x20, [x20, _B43legacy_MMIO_GEN_IRQ_REASON@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_b43legacy_read32
	mov	w21, #-40
Lloh11:
	adrp	x22, _B43legacy_IRQ_MAC_SUSPENDED@GOTPAGE
Lloh12:
	ldr	x22, [x22, _B43legacy_IRQ_MAC_SUSPENDED@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_b43legacy_read32
	ldr	w8, [x22]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
	bl	_msleep
	adds	w21, w21, #1
	b.lo	LBB0_2
; %bb.4:
	ldr	x0, [x19, #8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_b43legacyerr
LBB0_5:
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_B43legacy_MMIO_GEN_IRQ_MASK,4,2 ; @B43legacy_MMIO_GEN_IRQ_MASK
	.comm	_B43legacy_MMIO_MACCTL,4,2      ; @B43legacy_MMIO_MACCTL
	.comm	_B43legacy_MACCTL_ENABLED,4,2   ; @B43legacy_MACCTL_ENABLED
	.comm	_B43legacy_MMIO_GEN_IRQ_REASON,4,2 ; @B43legacy_MMIO_GEN_IRQ_REASON
	.comm	_B43legacy_IRQ_MAC_SUSPENDED,4,2 ; @B43legacy_IRQ_MAC_SUSPENDED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAC suspend failed\n"

.subsections_via_symbols
