	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cw1200_bh_suspend              ## -- Begin function cw1200_bh_suspend
	.p2align	4, 0x90
_cw1200_bh_suspend:                     ## @cw1200_bh_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wiphy_warn
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	movq	_CW1200_BH_SUSPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_atomic_set
	leaq	20(%rbx), %rdi
	callq	_wake_up
	movl	16(%rbx), %r14d
	movl	$1, %esi
	cmpq	$0, 8(%rbx)
	jne	LBB0_4
## %bb.3:
	movq	_CW1200_BH_SUSPENDED@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	%rbx, %rdi
	callq	_atomic_read
	xorl	%esi, %esi
	cmpq	%rax, %r15
	sete	%sil
LBB0_4:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	callq	_wait_event_timeout
	movq	%rax, %rcx
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	subl	(%rdx), %eax
	xorl	%edx, %edx
	testq	%rcx, %rcx
	cmovnel	%edx, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[BH] suspend.\n"

L_.str.1:                               ## @.str.1
	.asciz	"BH error -- can't suspend\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CW1200_BH_SUSPEND,4,2          ## @CW1200_BH_SUSPEND
	.comm	_CW1200_BH_SUSPENDED,8,3        ## @CW1200_BH_SUSPENDED
	.comm	_HZ,4,2                         ## @HZ
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cw1200_bh_suspend              ; -- Begin function cw1200_bh_suspend
	.p2align	2
_cw1200_bh_suspend:                     ; @cw1200_bh_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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wiphy_warn
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
Lloh7:
	adrp	x8, _CW1200_BH_SUSPEND@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CW1200_BH_SUSPEND@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_atomic_set
	add	x0, x19, #20
	bl	_wake_up
	ldr	w20, [x19, #16]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w1, #1
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x8, _CW1200_BH_SUSPENDED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CW1200_BH_SUSPENDED@GOTPAGEOFF]
Lloh12:
	ldr	x21, [x8]
	mov	x0, x19
	bl	_atomic_read
	cmp	x21, x0
	cset	w1, eq
LBB0_5:
Lloh13:
	adrp	x8, _HZ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_wait_event_timeout
Lloh16:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	x0, #0
	csneg	w0, wzr, w8, ne
LBB0_6:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[BH] suspend.\n"

l_.str.1:                               ; @.str.1
	.asciz	"BH error -- can't suspend\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CW1200_BH_SUSPEND,4,2          ; @CW1200_BH_SUSPEND
	.comm	_CW1200_BH_SUSPENDED,8,3        ; @CW1200_BH_SUSPENDED
	.comm	_HZ,4,2                         ; @HZ
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
