	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_vgpu_reg_rw_edid
_intel_vgpu_reg_rw_edid:                ## @intel_vgpu_reg_rw_edid
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	(%rcx), %rdi
	callq	_VFIO_PCI_OFFSET_TO_INDEX
                                        ## kill: def $eax killed $eax def $rax
	movq	_VFIO_PCI_NUM_REGIONS@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	movq	(%r13), %rcx
	movq	(%rcx,%rax,8), %rsi
	movq	_VFIO_PCI_OFFSET_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	andq	(%rbx), %r8
	cmpq	(%rsi), %r8
	jge	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	movq	%r12, %rdx
	movq	%r15, %rcx
	movl	%r14d, %r9d
	callq	_handle_edid_regs
	jmp	LBB0_3
LBB0_2:
	movq	_EDID_BLOB_OFFSET@GOTPCREL(%rip), %rax
	subq	(%rax), %r8
	movq	%rsi, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r8, %rcx
	movl	%r14d, %r8d
	callq	_handle_edid_blob
LBB0_3:
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_gvt_vgpu_err
LBB0_5:
	movslq	%ebx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VFIO_PCI_NUM_REGIONS,4,2       ## @VFIO_PCI_NUM_REGIONS
	.comm	_VFIO_PCI_OFFSET_MASK,8,3       ## @VFIO_PCI_OFFSET_MASK
	.comm	_EDID_BLOB_OFFSET,8,3           ## @EDID_BLOB_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to access EDID region\n"

	.no_dead_strip	_intel_vgpu_reg_rw_edid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_vgpu_reg_rw_edid
_intel_vgpu_reg_rw_edid:                ; @intel_vgpu_reg_rw_edid
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x4
	mov	x23, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x0, [x3]
	bl	_VFIO_PCI_OFFSET_TO_INDEX
Lloh0:
	adrp	x8, _VFIO_PCI_NUM_REGIONS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VFIO_PCI_NUM_REGIONS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w8, w0, w8
	ldr	x9, [x22]
	ldr	x1, [x9, w8, uxtw #3]
	ldr	x8, [x23]
Lloh3:
	adrp	x9, _VFIO_PCI_OFFSET_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VFIO_PCI_OFFSET_MASK@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	and	x4, x9, x8
	ldr	x8, [x1]
	cmp	x4, x8
	b.ge	LBB0_2
; %bb.1:
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	mov	x5, x19
	bl	_handle_edid_regs
	mov	x19, x0
	tbz	w0, #31, LBB0_4
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _EDID_BLOB_OFFSET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EDID_BLOB_OFFSET@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	sub	x3, x4, x8
	mov	x0, x1
	mov	x1, x21
	mov	x2, x20
	mov	x4, x19
	bl	_handle_edid_blob
	mov	x19, x0
	tbz	w0, #31, LBB0_4
LBB0_3:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_gvt_vgpu_err
LBB0_4:
	sxtw	x0, w19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_VFIO_PCI_NUM_REGIONS,4,2       ; @VFIO_PCI_NUM_REGIONS
	.comm	_VFIO_PCI_OFFSET_MASK,8,3       ; @VFIO_PCI_OFFSET_MASK
	.comm	_EDID_BLOB_OFFSET,8,3           ; @EDID_BLOB_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to access EDID region\n"

	.no_dead_strip	_intel_vgpu_reg_rw_edid
.subsections_via_symbols
