	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psb_driver_unload
_psb_driver_unload:                     ## @psb_driver_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, %r14
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_18
## %bb.1:
	cmpq	$0, 80(%rbx)
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_gma_backlight_exit
LBB0_3:
	movq	%r14, %rdi
	callq	_psb_modeset_cleanup
	movq	72(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	*%rax
LBB0_5:
	movq	%r14, %rdi
	callq	_psb_intel_opregion_fini
	movq	64(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_psb_mmu_free_pagedir
	movq	$0, 64(%rbx)
LBB0_7:
	cmpq	$0, 48(%rbx)
	je	LBB0_9
## %bb.8:
	leaq	56(%rbx), %r15
	movq	%r15, %rdi
	callq	_down_read
	movq	48(%rbx), %rdi
	callq	_psb_mmu_get_default_pd
	movl	(%rbx), %edx
	movl	60(%rbx), %esi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %edx
	movl	%eax, %edi
	callq	_psb_mmu_remove_pfn_sequence
	movq	%r15, %rdi
	callq	_up_read
	movq	48(%rbx), %rdi
	callq	_psb_mmu_driver_takedown
	movq	$0, 48(%rbx)
LBB0_9:
	movq	%r14, %rdi
	callq	_psb_gtt_takedown
	movq	40(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:
	movl	$1, %esi
	callq	_set_pages_wb
	movq	40(%rbx), %rdi
	callq	___free_page
	movq	$0, 40(%rbx)
LBB0_11:
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_iounmap
	movq	$0, 32(%rbx)
LBB0_13:
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:
	callq	_iounmap
	movq	$0, 24(%rbx)
LBB0_15:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.16:
	callq	_iounmap
	movq	$0, 16(%rbx)
LBB0_17:
	movl	8(%rbx), %edi
	callq	_pci_dev_put
	movl	4(%rbx), %edi
	callq	_pci_dev_put
	movq	%r14, %rdi
	callq	_psb_intel_destroy_bios
	movq	%rbx, %rdi
	callq	_kfree
	movq	$0, (%r14)
LBB0_18:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gma_power_uninit               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.no_dead_strip	_psb_driver_unload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psb_driver_unload
_psb_driver_unload:                     ; @psb_driver_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	x19, x0
	ldr	x20, [x0]
	cbz	x20, LBB0_18
; %bb.1:
	ldr	x8, [x20, #80]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_gma_backlight_exit
LBB0_3:
	mov	x0, x19
	bl	_psb_modeset_cleanup
	ldr	x8, [x20, #72]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	blr	x8
LBB0_5:
	mov	x0, x19
	bl	_psb_intel_opregion_fini
	ldr	x0, [x20, #64]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_psb_mmu_free_pagedir
	str	xzr, [x20, #64]
LBB0_7:
	ldr	x8, [x20, #48]
	cbz	x8, LBB0_9
; %bb.8:
	add	x21, x20, #56
	mov	x0, x21
	bl	_down_read
	ldr	x0, [x20, #48]
	bl	_psb_mmu_get_default_pd
	ldr	w1, [x20, #60]
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	asr	w2, w8, w9
	bl	_psb_mmu_remove_pfn_sequence
	mov	x0, x21
	bl	_up_read
	ldr	x0, [x20, #48]
	bl	_psb_mmu_driver_takedown
	str	xzr, [x20, #48]
LBB0_9:
	mov	x0, x19
	bl	_psb_gtt_takedown
	ldr	x0, [x20, #40]
	cbz	x0, LBB0_11
; %bb.10:
	mov	w1, #1
	bl	_set_pages_wb
	ldr	x0, [x20, #40]
	bl	___free_page
	str	xzr, [x20, #40]
LBB0_11:
	ldr	x0, [x20, #32]
	cbz	x0, LBB0_13
; %bb.12:
	bl	_iounmap
	str	xzr, [x20, #32]
LBB0_13:
	ldr	x0, [x20, #24]
	cbz	x0, LBB0_15
; %bb.14:
	bl	_iounmap
	str	xzr, [x20, #24]
LBB0_15:
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_17
; %bb.16:
	bl	_iounmap
	str	xzr, [x20, #16]
LBB0_17:
	ldr	w0, [x20, #8]
	bl	_pci_dev_put
	ldr	w0, [x20, #4]
	bl	_pci_dev_put
	mov	x0, x19
	bl	_psb_intel_destroy_bios
	mov	x0, x20
	bl	_kfree
	str	xzr, [x19]
LBB0_18:
	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	_gma_power_uninit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.no_dead_strip	_psb_driver_unload
.subsections_via_symbols
