	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reset_set
_reset_set:                             ## @reset_set
	.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	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %r12
	movq	%r12, %rdi
	callq	_to_adreno_gpu
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_to_a5xx_gpu
	movq	%rax, %r15
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movq	_ADRENO_FW_PM4@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movq	(%rax,%rcx,8), %rdi
	callq	_release_firmware
	movq	(%rbx), %rax
	movq	(%r13), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	(%rbx), %rax
	movq	_ADRENO_FW_PFP@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movq	(%rax,%rcx,8), %rdi
	callq	_release_firmware
	movq	(%rbx), %rax
	movq	(%r13), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	movl	24(%r12), %esi
	callq	_msm_gem_unpin_iova
	movq	8(%r15), %rdi
	callq	_drm_gem_object_put
	movq	$0, 8(%r15)
LBB0_4:
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	movl	24(%r12), %esi
	callq	_msm_gem_unpin_iova
	movq	(%r15), %rdi
	callq	_drm_gem_object_put
	movq	$0, (%r15)
LBB0_6:
	movl	$1, (%r12)
	movq	8(%r12), %rdi
	callq	_pm_runtime_get_sync
	movq	16(%r12), %rax
	movq	%r12, %rdi
	callq	*(%rax)
	movq	8(%r12), %rdi
	callq	_pm_runtime_put_sync
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ADRENO_FW_PM4,8,3              ## @ADRENO_FW_PM4
	.comm	_ADRENO_FW_PFP,8,3              ## @ADRENO_FW_PFP
	.no_dead_strip	_reset_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_set
_reset_set:                             ; @reset_set
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x20, [x8]
	mov	x0, x20
	bl	_to_adreno_gpu
	mov	x22, x0
	bl	_to_a5xx_gpu
	mov	x21, x0
Lloh0:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x22]
Lloh3:
	adrp	x23, _ADRENO_FW_PM4@GOTPAGE
Lloh4:
	ldr	x23, [x23, _ADRENO_FW_PM4@GOTPAGEOFF]
	ldr	x9, [x23]
	ldr	x0, [x8, x9, lsl #3]
	bl	_release_firmware
	ldr	x8, [x22]
	ldr	x9, [x23]
	str	xzr, [x8, x9, lsl #3]
	ldr	x8, [x22]
Lloh5:
	adrp	x23, _ADRENO_FW_PFP@GOTPAGE
Lloh6:
	ldr	x23, [x23, _ADRENO_FW_PFP@GOTPAGEOFF]
	ldr	x9, [x23]
	ldr	x0, [x8, x9, lsl #3]
	bl	_release_firmware
	ldr	x8, [x22]
	ldr	x9, [x23]
	str	xzr, [x8, x9, lsl #3]
	ldr	x0, [x21, #8]
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w1, [x20, #24]
	bl	_msm_gem_unpin_iova
	ldr	x0, [x21, #8]
	bl	_drm_gem_object_put
	str	xzr, [x21, #8]
LBB0_3:
	ldr	x0, [x21]
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w1, [x20, #24]
	bl	_msm_gem_unpin_iova
	ldr	x0, [x21]
	bl	_drm_gem_object_put
	str	xzr, [x21]
LBB0_5:
	mov	w8, #1
	str	w8, [x20]
	ldr	x0, [x20, #8]
	bl	_pm_runtime_get_sync
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	ldr	x0, [x20, #8]
	bl	_pm_runtime_put_sync
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ADRENO_FW_PM4,8,3              ; @ADRENO_FW_PM4
	.comm	_ADRENO_FW_PFP,8,3              ; @ADRENO_FW_PFP
	.no_dead_strip	_reset_set
.subsections_via_symbols
