	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_vgpu_reset_cfg_space     ## -- Begin function intel_vgpu_reset_cfg_space
	.p2align	4, 0x90
_intel_vgpu_reset_cfg_space:            ## @intel_vgpu_reset_cfg_space
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_vgpu_cfg_space
	movq	_PCI_COMMAND@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,8), %r12d
	movq	%rbx, %rdi
	callq	_vgpu_cfg_space
	movq	_PCI_CLASS_DEVICE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r14
	movq	_INTEL_GVT_PCI_CLASS_VGA_OTHER@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_PCI_COMMAND_MEMORY@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_trap_gttmmio
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_map_aperture
LBB0_2:
	xorl	%esi, %esi
	cmpq	%r15, %r14
	setne	%sil
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_vgpu_init_cfg_space      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_COMMAND,8,3                ## @PCI_COMMAND
	.comm	_PCI_CLASS_DEVICE,8,3           ## @PCI_CLASS_DEVICE
	.comm	_INTEL_GVT_PCI_CLASS_VGA_OTHER,8,3 ## @INTEL_GVT_PCI_CLASS_VGA_OTHER
	.comm	_PCI_COMMAND_MEMORY,4,2         ## @PCI_COMMAND_MEMORY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_vgpu_reset_cfg_space     ; -- Begin function intel_vgpu_reset_cfg_space
	.p2align	2
_intel_vgpu_reset_cfg_space:            ; @intel_vgpu_reset_cfg_space
	.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
	bl	_vgpu_cfg_space
Lloh0:
	adrp	x8, _PCI_COMMAND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_COMMAND@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x22, [x0, x8, lsl #3]
	mov	x0, x19
	bl	_vgpu_cfg_space
Lloh3:
	adrp	x8, _PCI_CLASS_DEVICE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_CLASS_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x20, [x0, x8, lsl #3]
Lloh6:
	adrp	x8, _INTEL_GVT_PCI_CLASS_VGA_OTHER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INTEL_GVT_PCI_CLASS_VGA_OTHER@GOTPAGEOFF]
Lloh8:
	ldr	x21, [x8]
Lloh9:
	adrp	x8, _PCI_COMMAND_MEMORY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCI_COMMAND_MEMORY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_trap_gttmmio
	mov	x0, x19
	mov	w1, #0
	bl	_map_aperture
LBB0_2:
	cmp	x20, x21
	cset	w1, ne
	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	_intel_vgpu_init_cfg_space
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_COMMAND,8,3                ; @PCI_COMMAND
	.comm	_PCI_CLASS_DEVICE,8,3           ; @PCI_CLASS_DEVICE
	.comm	_INTEL_GVT_PCI_CLASS_VGA_OTHER,8,3 ; @INTEL_GVT_PCI_CLASS_VGA_OTHER
	.comm	_PCI_COMMAND_MEMORY,4,2         ; @PCI_COMMAND_MEMORY
.subsections_via_symbols
