	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___pm_runtime_set_status        ## -- Begin function __pm_runtime_set_status
	.p2align	4, 0x90
___pm_runtime_set_status:               ## @__pm_runtime_set_status
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	32(%rdi), %r12
	movq	_RPM_ACTIVE@GOTPCREL(%rip), %r14
	movq	_RPM_SUSPENDED@GOTPCREL(%rip), %rbx
	cmpl	%esi, (%r14)
	je	LBB0_3
## %bb.1:
	cmpl	%r15d, (%rbx)
	je	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_3:
	leaq	4(%r13), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	cmpq	$0, 8(%r13)
	jne	LBB0_6
## %bb.4:
	cmpl	$0, 24(%r13)
	je	LBB0_5
LBB0_6:
	cmpl	%r15d, (%r13)
	je	LBB0_18
## %bb.7:
	cmpl	%r15d, (%rbx)
	jne	LBB0_11
## %bb.8:
	testq	%r12, %r12
	je	LBB0_18
## %bb.9:
	leaq	16(%r12), %rdi
	xorl	%ebx, %ebx
	movl	$-1, %esi
	xorl	%edx, %edx
	callq	_atomic_add_unless
	movl	20(%r12), %r14d
	movl	%r15d, (%r13)
	movq	$0, 8(%r13)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	testl	%r14d, %r14d
	jne	LBB0_23
## %bb.10:
	movq	%r12, %rdi
	callq	_pm_request_idle
	jmp	LBB0_23
LBB0_11:
	testq	%r12, %r12
	je	LBB0_18
## %bb.12:
	leaq	4(%r12), %rdi
	movq	_SINGLE_DEPTH_NESTING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_nested
	cmpl	$0, 24(%r12)
	jne	LBB0_15
## %bb.13:
	cmpl	$0, 20(%r12)
	jne	LBB0_15
## %bb.14:
	movl	(%r12), %eax
	cmpl	(%r14), %eax
	jne	LBB0_19
LBB0_15:
	movl	(%r13), %eax
	cmpl	(%rbx), %eax
	jne	LBB0_17
## %bb.16:
	addq	$16, %r12
	movq	%r12, %rdi
	callq	_atomic_inc
LBB0_17:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
LBB0_18:
	movl	%r15d, (%r13)
	movq	$0, 8(%r13)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_22:
	callq	_spin_unlock_irqrestore
	xorl	%ebx, %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_20:
	negl	%ebx
	callq	_spin_unlock_irqrestore
	jmp	LBB0_23
LBB0_19:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	testl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jne	LBB0_20
## %bb.21:
	movl	%r15d, (%r13)
	movq	$0, 8(%r13)
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_RPM_ACTIVE,4,2                 ## @RPM_ACTIVE
	.comm	_RPM_SUSPENDED,4,2              ## @RPM_SUSPENDED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_SINGLE_DEPTH_NESTING,4,2       ## @SINGLE_DEPTH_NESTING
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___pm_runtime_set_status        ; -- Begin function __pm_runtime_set_status
	.p2align	2
___pm_runtime_set_status:               ; @__pm_runtime_set_status
	.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
Lloh0:
	adrp	x25, _RPM_ACTIVE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _RPM_ACTIVE@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh2:
	adrp	x24, _RPM_SUSPENDED@GOTPAGE
Lloh3:
	ldr	x24, [x24, _RPM_SUSPENDED@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w8, w1
	ccmp	w9, w1, #4, ne
	b.ne	LBB0_8
; %bb.1:
	mov	x21, x1
	mov	x20, x0
	ldr	x22, [x0, #32]
	add	x19, x0, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_3
; %bb.2:
	ldr	w8, [x20, #24]
	cbz	w8, LBB0_19
LBB0_3:
	ldr	w8, [x20]
	cmp	w8, w21
	b.eq	LBB0_16
; %bb.4:
	ldr	w8, [x24]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.5:
	cbz	x22, LBB0_16
; %bb.6:
	add	x0, x22, #16
	mov	w1, #-1
	mov	w2, #0
	bl	_atomic_add_unless
	ldr	w23, [x22, #20]
	str	w21, [x20]
	str	xzr, [x20, #8]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w20, #0
	cbnz	w23, LBB0_18
; %bb.7:
	mov	x0, x22
	bl	_pm_request_idle
	b	LBB0_17
LBB0_8:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_18
LBB0_9:
	cbz	x22, LBB0_16
; %bb.10:
	add	x23, x22, #4
Lloh7:
	adrp	x8, _SINGLE_DEPTH_NESTING@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SINGLE_DEPTH_NESTING@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_spin_lock_nested
	ldr	w8, [x22, #24]
	cbnz	w8, LBB0_13
; %bb.11:
	ldr	w8, [x22, #20]
	cbnz	w8, LBB0_13
; %bb.12:
	ldr	w8, [x22]
	ldr	w9, [x25]
	cmp	w8, w9
	b.ne	LBB0_21
LBB0_13:
	ldr	w8, [x20]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_15
; %bb.14:
	add	x0, x22, #16
	bl	_atomic_inc
LBB0_15:
	mov	x0, x23
	bl	_spin_unlock
LBB0_16:
	str	w21, [x20]
	str	xzr, [x20, #8]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_17:
	mov	w20, #0
LBB0_18:
	mov	x0, x20
	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_19:
Lloh10:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh12:
	ldr	w22, [x8]
LBB0_20:
	neg	w20, w22
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	b	LBB0_18
LBB0_21:
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh15:
	ldr	w22, [x8]
	mov	x0, x23
	bl	_spin_unlock
	cbnz	w22, LBB0_20
	b	LBB0_16
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_RPM_ACTIVE,4,2                 ; @RPM_ACTIVE
	.comm	_RPM_SUSPENDED,4,2              ; @RPM_SUSPENDED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_SINGLE_DEPTH_NESTING,4,2       ; @SINGLE_DEPTH_NESTING
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
