	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prcmu_release_usb_wakeup_state ## -- Begin function prcmu_release_usb_wakeup_state
	.p2align	4, 0x90
_prcmu_release_usb_wakeup_state:        ## @prcmu_release_usb_wakeup_state
	.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	_mb1_transfer@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_PRCM_MBOX_CPU_VAL@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_readl
	movl	%eax, %ebx
	movl	$1, %edi
	callq	_MBOX_BIT
	testl	%ebx, %eax
	je	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	jmp	LBB0_2
LBB0_3:
	movq	_MB1H_RELEASE_USB_WAKEUP@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	_tcdm_base@GOTPCREL(%rip), %rax
	movq	_PRCM_MBOX_HEADER_REQ_MB1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%rax), %rsi
	callq	_writeb
	movl	$1, %edi
	callq	_MBOX_BIT
	movq	_PRCM_MBOX_CPU_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_writel
	leaq	24(%r14), %rdi
	callq	_wait_for_completion
	movq	8(%r14), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_5
## %bb.4:
	movl	16(%r14), %r14d
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_BIT
	testl	%r14d, %eax
	je	LBB0_6
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movq	_mb1_transfer@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mb1_transfer,32,3              ## @mb1_transfer
	.comm	_PRCM_MBOX_CPU_VAL,4,2          ## @PRCM_MBOX_CPU_VAL
	.comm	_MB1H_RELEASE_USB_WAKEUP,8,3    ## @MB1H_RELEASE_USB_WAKEUP
	.comm	_tcdm_base,8,3                  ## @tcdm_base
	.comm	_PRCM_MBOX_HEADER_REQ_MB1,8,3   ## @PRCM_MBOX_HEADER_REQ_MB1
	.comm	_PRCM_MBOX_CPU_SET,4,2          ## @PRCM_MBOX_CPU_SET
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prcmu_release_usb_wakeup_state ; -- Begin function prcmu_release_usb_wakeup_state
	.p2align	2
_prcmu_release_usb_wakeup_state:        ; @prcmu_release_usb_wakeup_state
	.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
Lloh0:
	adrp	x19, _mb1_transfer@GOTPAGE
Lloh1:
	ldr	x19, [x19, _mb1_transfer@GOTPAGEOFF]
	mov	x0, x19
	bl	_mutex_lock
Lloh2:
	adrp	x21, _PRCM_MBOX_CPU_VAL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PRCM_MBOX_CPU_VAL@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_readl
	mov	x20, x0
	mov	w0, #1
	bl	_MBOX_BIT
	tst	w0, w20
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_cpu_relax
	b	LBB0_1
LBB0_3:
Lloh4:
	adrp	x20, _MB1H_RELEASE_USB_WAKEUP@GOTPAGE
Lloh5:
	ldr	x20, [x20, _MB1H_RELEASE_USB_WAKEUP@GOTPAGEOFF]
Lloh6:
	adrp	x8, _tcdm_base@GOTPAGE
Lloh7:
	ldr	x8, [x8, _tcdm_base@GOTPAGEOFF]
	ldr	x0, [x20]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _PRCM_MBOX_HEADER_REQ_MB1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PRCM_MBOX_HEADER_REQ_MB1@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writeb
	mov	w0, #1
	bl	_MBOX_BIT
Lloh12:
	adrp	x8, _PRCM_MBOX_CPU_SET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PRCM_MBOX_CPU_SET@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_writel
	add	x0, x19, #24
	bl	_wait_for_completion
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	w19, [x19, #16]
	mov	w0, #0
	bl	_BIT
	tst	w0, w19
	b.eq	LBB0_6
LBB0_5:
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_7
LBB0_6:
	mov	w19, #0
LBB0_7:
Lloh18:
	adrp	x0, _mb1_transfer@GOTPAGE
Lloh19:
	ldr	x0, [x0, _mb1_transfer@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, 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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_mb1_transfer,32,3              ; @mb1_transfer
	.comm	_PRCM_MBOX_CPU_VAL,4,2          ; @PRCM_MBOX_CPU_VAL
	.comm	_MB1H_RELEASE_USB_WAKEUP,8,3    ; @MB1H_RELEASE_USB_WAKEUP
	.comm	_tcdm_base,8,3                  ; @tcdm_base
	.comm	_PRCM_MBOX_HEADER_REQ_MB1,8,3   ; @PRCM_MBOX_HEADER_REQ_MB1
	.comm	_PRCM_MBOX_CPU_SET,4,2          ; @PRCM_MBOX_CPU_SET
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
