	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vga_arbiter_del_pci_device
_vga_arbiter_del_pci_device:            ## @vga_arbiter_del_pci_device
	.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	_vga_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	callq	_vgadev_find
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_vga_default@GOTPCREL(%rip), %r15
	cmpq	%r14, (%r15)
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_pci_dev_put
	movq	$0, (%r15)
LBB0_4:
	movq	_VGA_RSRC_LEGACY_IO@GOTPCREL(%rip), %rax
	movq	_VGA_RSRC_LEGACY_MEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_6
## %bb.5:
	movq	_vga_decode_count@GOTPCREL(%rip), %rax
	decl	(%rax)
LBB0_6:
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_list_del
	movq	_vga_count@GOTPCREL(%rip), %rax
	decl	(%rax)
	movq	%r14, %rdi
	callq	_vga_arb_device_card_gone
	movq	_vga_wait_queue@GOTPCREL(%rip), %rdi
	callq	_wake_up_all
	movl	$1, %r14d
	jmp	LBB0_7
LBB0_1:
	xorl	%r14d, %r14d
LBB0_7:
	movq	_vga_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vga_lock,4,2                   ## @vga_lock
	.comm	_vga_default,8,3                ## @vga_default
	.comm	_VGA_RSRC_LEGACY_IO,4,2         ## @VGA_RSRC_LEGACY_IO
	.comm	_VGA_RSRC_LEGACY_MEM,4,2        ## @VGA_RSRC_LEGACY_MEM
	.comm	_vga_decode_count,4,2           ## @vga_decode_count
	.comm	_vga_count,4,2                  ## @vga_count
	.comm	_vga_wait_queue,4,2             ## @vga_wait_queue
	.no_dead_strip	_vga_arbiter_del_pci_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vga_arbiter_del_pci_device
_vga_arbiter_del_pci_device:            ; @vga_arbiter_del_pci_device
	.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
Lloh0:
	adrp	x0, _vga_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _vga_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_vgadev_find
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
Lloh2:
	adrp	x21, _vga_default@GOTPAGE
Lloh3:
	ldr	x21, [x21, _vga_default@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x8, x20
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_pci_dev_put
	str	xzr, [x21]
LBB0_3:
	ldr	w8, [x19]
Lloh4:
	adrp	x9, _VGA_RSRC_LEGACY_IO@GOTPAGE
Lloh5:
	ldr	x9, [x9, _VGA_RSRC_LEGACY_IO@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
Lloh7:
	adrp	x10, _VGA_RSRC_LEGACY_MEM@GOTPAGE
Lloh8:
	ldr	x10, [x10, _VGA_RSRC_LEGACY_MEM@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh10:
	adrp	x8, _vga_decode_count@GOTPAGE
Lloh11:
	ldr	x8, [x8, _vga_decode_count@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
LBB0_5:
	add	x0, x19, #4
	bl	_list_del
Lloh12:
	adrp	x8, _vga_count@GOTPAGE
Lloh13:
	ldr	x8, [x8, _vga_count@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
	mov	x0, x20
	bl	_vga_arb_device_card_gone
Lloh14:
	adrp	x0, _vga_wait_queue@GOTPAGE
Lloh15:
	ldr	x0, [x0, _vga_wait_queue@GOTPAGEOFF]
	bl	_wake_up_all
	mov	w20, #1
	b	LBB0_7
LBB0_6:
	mov	w20, #0
LBB0_7:
Lloh16:
	adrp	x0, _vga_lock@GOTPAGE
Lloh17:
	ldr	x0, [x0, _vga_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_kfree
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_vga_lock,4,2                   ; @vga_lock
	.comm	_vga_default,8,3                ; @vga_default
	.comm	_VGA_RSRC_LEGACY_IO,4,2         ; @VGA_RSRC_LEGACY_IO
	.comm	_VGA_RSRC_LEGACY_MEM,4,2        ; @VGA_RSRC_LEGACY_MEM
	.comm	_vga_decode_count,4,2           ; @vga_decode_count
	.comm	_vga_count,4,2                  ; @vga_count
	.comm	_vga_wait_queue,4,2             ; @vga_wait_queue
	.no_dead_strip	_vga_arbiter_del_pci_device
.subsections_via_symbols
