	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function etnaviv_gpu_unbind
_etnaviv_gpu_unbind:                    ## @etnaviv_gpu_unbind
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	callq	_dev_get_drvdata
	movq	%rax, %rbx
	movl	36(%rax), %edi
	callq	_dev_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DBG
	movl	40(%rbx), %edi
	callq	_flush_workqueue
	movl	40(%rbx), %edi
	callq	_destroy_workqueue
	movq	%rbx, %rdi
	callq	_etnaviv_sched_fini
	movq	%rbx, %rdi
	callq	_etnaviv_gpu_hw_suspend
	cmpl	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	leaq	32(%rbx), %rdi
	callq	_etnaviv_cmdbuf_free
	movq	%rbx, %rdi
	callq	_etnaviv_iommu_global_fini
	movl	$0, (%rbx)
LBB0_2:
	movq	$0, 24(%rbx)
	movq	%rbx, %rdi
	addq	$16, %rdi
	callq	_idr_destroy
	movq	_CONFIG_DRM_ETNAVIV_THERMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	8(%rbx), %rdi
	callq	_thermal_cooling_device_unregister
LBB0_4:
	movq	$0, 8(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_CONFIG_DRM_ETNAVIV_THERMAL,4,2 ## @CONFIG_DRM_ETNAVIV_THERMAL
	.no_dead_strip	_etnaviv_gpu_unbind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function etnaviv_gpu_unbind
_etnaviv_gpu_unbind:                    ; @etnaviv_gpu_unbind
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_dev_get_drvdata
	mov	x19, x0
	ldr	w0, [x0, #36]
	bl	_dev_name
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	ldr	w0, [x19, #40]
	bl	_flush_workqueue
	ldr	w0, [x19, #40]
	bl	_destroy_workqueue
	mov	x0, x19
	bl	_etnaviv_sched_fini
	mov	x0, x19
	bl	_etnaviv_gpu_hw_suspend
	ldr	w8, [x19]
	cbz	w8, LBB0_2
; %bb.1:
	add	x0, x19, #32
	bl	_etnaviv_cmdbuf_free
	mov	x0, x19
	bl	_etnaviv_iommu_global_fini
	str	wzr, [x19]
LBB0_2:
	str	xzr, [x19, #24]
	add	x0, x19, #16
	bl	_idr_destroy
Lloh2:
	adrp	x8, _CONFIG_DRM_ETNAVIV_THERMAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CONFIG_DRM_ETNAVIV_THERMAL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x0, [x19, #8]
	bl	_thermal_cooling_device_unregister
LBB0_4:
	str	xzr, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_CONFIG_DRM_ETNAVIV_THERMAL,4,2 ; @CONFIG_DRM_ETNAVIV_THERMAL
	.no_dead_strip	_etnaviv_gpu_unbind
.subsections_via_symbols
