	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_drm_unload
_tegra_drm_unload:                      ## @tegra_drm_unload
	.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
	movl	8(%rdi), %edi
	callq	_to_host1x_device
	movq	%rax, %r15
	movq	(%rbx), %r14
	movq	%rbx, %rdi
	callq	_drm_kms_helper_poll_fini
	movq	%rbx, %rdi
	callq	_tegra_drm_fb_exit
	movq	%rbx, %rdi
	callq	_drm_atomic_helper_shutdown
	movq	%rbx, %rdi
	callq	_drm_mode_config_cleanup
	movq	%r15, %rdi
	callq	_host1x_device_exit
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	cmpq	$0, (%r14)
	je	LBB0_3
## %bb.2:
	leaq	16(%r14), %rdi
	callq	_mutex_destroy
	leaq	12(%r14), %rdi
	callq	_drm_mm_takedown
	leaq	8(%r14), %rdi
	callq	_put_iova_domain
	xorl	%eax, %eax
	callq	_iova_cache_put
	movq	(%r14), %rdi
	callq	_iommu_domain_free
LBB0_3:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_tegra_drm_unload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_drm_unload
_tegra_drm_unload:                      ; @tegra_drm_unload
	.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	x20, x0
	ldr	w0, [x0, #8]
	bl	_to_host1x_device
	mov	x21, x0
	ldr	x19, [x20]
	mov	x0, x20
	bl	_drm_kms_helper_poll_fini
	mov	x0, x20
	bl	_tegra_drm_fb_exit
	mov	x0, x20
	bl	_drm_atomic_helper_shutdown
	mov	x0, x20
	bl	_drm_mode_config_cleanup
	mov	x0, x21
	bl	_host1x_device_exit
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_3
; %bb.2:
	add	x0, x19, #16
	bl	_mutex_destroy
	add	x0, x19, #12
	bl	_drm_mm_takedown
	add	x0, x19, #8
	bl	_put_iova_domain
	bl	_iova_cache_put
	ldr	x0, [x19]
	bl	_iommu_domain_free
LBB0_3:
	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
	b	_kfree
LBB0_4:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_tegra_drm_unload
.subsections_via_symbols
