	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvmgt_set_edid
_kvmgt_set_edid:                        ## @kvmgt_set_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_intel_vgpu_port
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	_EDID_BLOB_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_EDID_SIZE@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, 24(%rbx)
	movq	%rax, 16(%rbx)
	movl	8(%r15), %edi
	callq	_vgpu_edid_xres
	movl	%eax, 12(%rbx)
	movl	8(%r15), %edi
	callq	_vgpu_edid_yres
	movl	%eax, 8(%rbx)
	movq	(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_VFIO_REGION_TYPE_GFX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VFIO_REGION_SUBTYPE_GFX_EDID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_VFIO_REGION_INFO_FLAG_READ@GOTPCREL(%rip), %rax
	movq	_VFIO_REGION_INFO_FLAG_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	orl	(%rax), %r9d
	movq	(%r12), %r8
	movq	_VFIO_REGION_INFO_FLAG_CAPS@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	movq	%rbx, (%rsp)
	movq	_intel_vgpu_regops_edid@GOTPCREL(%rip), %rcx
	movq	%r14, %rdi
	callq	_intel_vgpu_register_reg
	jmp	LBB0_2
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_2:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EDID_BLOB_OFFSET,4,2           ## @EDID_BLOB_OFFSET
	.comm	_EDID_SIZE,8,3                  ## @EDID_SIZE
	.comm	_VFIO_REGION_TYPE_GFX,4,2       ## @VFIO_REGION_TYPE_GFX
	.comm	_VFIO_REGION_SUBTYPE_GFX_EDID,4,2 ## @VFIO_REGION_SUBTYPE_GFX_EDID
	.comm	_intel_vgpu_regops_edid,4,2     ## @intel_vgpu_regops_edid
	.comm	_VFIO_REGION_INFO_FLAG_READ,4,2 ## @VFIO_REGION_INFO_FLAG_READ
	.comm	_VFIO_REGION_INFO_FLAG_WRITE,4,2 ## @VFIO_REGION_INFO_FLAG_WRITE
	.comm	_VFIO_REGION_INFO_FLAG_CAPS,4,2 ## @VFIO_REGION_INFO_FLAG_CAPS
	.no_dead_strip	_kvmgt_set_edid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvmgt_set_edid
_kvmgt_set_edid:                        ; @kvmgt_set_edid
	.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	_intel_vgpu_port
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _EDID_BLOB_OFFSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EDID_BLOB_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #32]
Lloh6:
	adrp	x22, _EDID_SIZE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _EDID_SIZE@GOTPAGEOFF]
	ldr	x8, [x22]
	stp	x8, x8, [x0, #16]
	ldr	w0, [x21, #8]
	bl	_vgpu_edid_xres
	str	w0, [x20, #12]
	ldr	w0, [x21, #8]
	bl	_vgpu_edid_yres
	str	w0, [x20, #8]
	ldr	x8, [x21]
	ldr	w8, [x8]
	str	w8, [x20]
Lloh8:
	adrp	x8, _VFIO_REGION_TYPE_GFX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VFIO_REGION_TYPE_GFX@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _VFIO_REGION_SUBTYPE_GFX_EDID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VFIO_REGION_SUBTYPE_GFX_EDID@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x8, _VFIO_REGION_INFO_FLAG_READ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VFIO_REGION_INFO_FLAG_READ@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _VFIO_REGION_INFO_FLAG_WRITE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _VFIO_REGION_INFO_FLAG_WRITE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh20:
	adrp	x9, _VFIO_REGION_INFO_FLAG_CAPS@GOTPAGE
Lloh21:
	ldr	x9, [x9, _VFIO_REGION_INFO_FLAG_CAPS@GOTPAGEOFF]
	ldr	x4, [x22]
Lloh22:
	ldr	w9, [x9]
	orr	w5, w8, w9
Lloh23:
	adrp	x3, _intel_vgpu_regops_edid@GOTPAGE
Lloh24:
	ldr	x3, [x3, _intel_vgpu_regops_edid@GOTPAGEOFF]
	mov	x0, x19
	mov	x6, 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
	b	_intel_vgpu_register_reg
LBB0_2:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EDID_BLOB_OFFSET,4,2           ; @EDID_BLOB_OFFSET
	.comm	_EDID_SIZE,8,3                  ; @EDID_SIZE
	.comm	_VFIO_REGION_TYPE_GFX,4,2       ; @VFIO_REGION_TYPE_GFX
	.comm	_VFIO_REGION_SUBTYPE_GFX_EDID,4,2 ; @VFIO_REGION_SUBTYPE_GFX_EDID
	.comm	_intel_vgpu_regops_edid,4,2     ; @intel_vgpu_regops_edid
	.comm	_VFIO_REGION_INFO_FLAG_READ,4,2 ; @VFIO_REGION_INFO_FLAG_READ
	.comm	_VFIO_REGION_INFO_FLAG_WRITE,4,2 ; @VFIO_REGION_INFO_FLAG_WRITE
	.comm	_VFIO_REGION_INFO_FLAG_CAPS,4,2 ; @VFIO_REGION_INFO_FLAG_CAPS
	.no_dead_strip	_kvmgt_set_edid
.subsections_via_symbols
