	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_do_get_edid                ## -- Begin function drm_do_get_edid
	.p2align	4, 0x90
_drm_do_get_edid:                       ## @drm_do_get_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_drm_get_override_edid
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	movq	_EDID_LENGTH@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rax, %r14
	movslq	(%r15), %rcx
	movq	%r13, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	*%rbx
	testl	%eax, %eax
	je	LBB0_6
LBB0_3:
	movq	%r14, %rdi
	callq	_kfree
LBB0_4:
	xorl	%r14d, %r14d
LBB0_5:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leaq	4(%r12), %rbx
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	callq	_drm_edid_block_valid
	testq	%rax, %rax
	je	LBB0_20
LBB0_7:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movl	504(%r14), %r15d
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.8:
	leal	1(%r15), %esi
	movq	_EDID_LENGTH@GOTPCREL(%rip), %rax
	imull	(%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_krealloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.9:
	movq	%rax, %rbx
	movl	504(%rax), %edx
	testl	%edx, %edx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_23
## %bb.10:
	movl	$1, %r13d
	jmp	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	addl	%r15d, %ebx
	movq	%rbx, %r15
	leal	1(%r13), %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	504(%rbx), %edx
	cmpl	%edx, %r13d
	movl	%eax, %r13d
	jge	LBB0_23
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	_EDID_LENGTH@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movslq	%r13d, %rdx
	movq	%rcx, %rax
	imulq	%rdx, %rax
	leaq	(%rbx,%rax,4), %r14
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	jne	LBB0_37
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r15, %rbx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_drm_edid_block_valid
	testq	%rax, %rax
	jne	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_EDID_LENGTH@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	jne	LBB0_40
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_drm_edid_block_valid
	testq	%rax, %rax
	jne	LBB0_11
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_EDID_LENGTH@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	jne	LBB0_40
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_drm_edid_block_valid
	testq	%rax, %rax
	jne	LBB0_11
## %bb.18:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_EDID_LENGTH@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	jne	LBB0_40
## %bb.19:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r14, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_drm_edid_block_valid
	cmpq	$1, %rax
	movl	$0, %r15d
	sbbl	%r15d, %r15d
	jmp	LBB0_11
LBB0_20:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_drm_edid_is_zero
	testq	%rax, %rax
	je	LBB0_25
## %bb.21:
	incl	(%r12)
LBB0_22:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_connector_bad_edid
	jmp	LBB0_3
LBB0_23:
	cmpl	%edx, %r15d
	jne	LBB0_31
## %bb.24:
	movq	%rbx, %r14
	jmp	LBB0_5
LBB0_25:
	movslq	(%r15), %rcx
	movq	%r13, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	jne	LBB0_3
## %bb.26:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	callq	_drm_edid_block_valid
	testq	%rax, %rax
	jne	LBB0_7
## %bb.27:
	movslq	(%r15), %rcx
	movq	%r13, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	jne	LBB0_3
## %bb.28:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	callq	_drm_edid_block_valid
	testq	%rax, %rax
	jne	LBB0_7
## %bb.29:
	movslq	(%r15), %rcx
	movq	%r13, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	jne	LBB0_3
## %bb.30:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	callq	_drm_edid_block_valid
	testq	%rax, %rax
	jne	LBB0_7
	jmp	LBB0_22
LBB0_31:
	incl	%edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_connector_bad_edid
	movl	504(%rbx), %eax
	subl	%r15d, %eax
	movq	_EDID_LENGTH@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rcx
	addl	%eax, -4(%rbx,%rcx,4)
	movl	%r15d, 504(%rbx)
	incl	%r15d
	movl	(%rdx), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	callq	_kmalloc_array
	testq	%rax, %rax
	je	LBB0_37
## %bb.32:
	movq	%rax, %r14
	cmpl	$0, 504(%rbx)
	movq	_EDID_LENGTH@GOTPCREL(%rip), %r13
	js	LBB0_38
## %bb.33:
	movl	$-1, %r12d
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_35
LBB0_34:                                ##   in Loop: Header=BB0_35 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	cmpl	504(%rbx), %r12d
	jge	LBB0_38
LBB0_35:                                ## =>This Inner Loop Header: Depth=1
	incl	%r12d
	movslq	(%r13), %rax
	movslq	%r12d, %rsi
	imulq	%rsi, %rax
	leaq	(%rbx,%rax,4), %r15
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_drm_edid_block_valid
	testq	%rax, %rax
	je	LBB0_34
## %bb.36:                              ##   in Loop: Header=BB0_35 Depth=1
	movl	(%r13), %edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_memcpy
	movslq	(%r13), %rax
	leaq	(%rbx,%rax,4), %rbx
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_34
LBB0_37:
	movq	%rbx, %r14
	jmp	LBB0_3
LBB0_38:
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_5
LBB0_40:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EDID_LENGTH,4,2                ## @EDID_LENGTH
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_do_get_edid                ; -- Begin function drm_do_get_edid
	.p2align	2
_drm_do_get_edid:                       ; @drm_do_get_edid
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_drm_get_override_edid
	mov	x22, x0
	cbnz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x25, _EDID_LENGTH@GOTPAGE
Lloh1:
	ldr	x25, [x25, _EDID_LENGTH@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh2:
	adrp	x26, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x26, [x26, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x26]
	bl	_kmalloc
	mov	x22, x0
	cbz	x0, LBB0_4
; %bb.2:
	ldrsw	x3, [x25]
	mov	x0, x20
	mov	x1, x22
	mov	w2, #0
	blr	x21
	cbz	w0, LBB0_5
LBB0_3:
	mov	x0, x22
	bl	_kfree
	mov	x22, #0
LBB0_4:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_5:
	add	x23, x19, #4
	mov	x0, x22
	mov	w1, #0
	mov	w2, #0
	mov	x3, x23
	bl	_drm_edid_block_valid
	cbz	x0, LBB0_19
LBB0_6:
	ldr	w27, [x22, #504]
	cbz	w27, LBB0_4
; %bb.7:
	ldr	w8, [x25]
	madd	w1, w8, w27, w8
	ldr	w2, [x26]
	mov	x0, x22
	bl	_krealloc
	cbz	x0, LBB0_3
; %bb.8:
	mov	x23, x0
	ldr	w8, [x0, #504]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.9:
	mov	w22, #1
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w27, w27, w8
	add	w9, w22, #1
	ldr	w8, [x23, #504]
	cmp	w22, w8
	mov	x22, x9
	b.ge	LBB0_22
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x3, [x25]
	mul	w8, w3, w22
	add	x24, x23, w8, sxtw #2
	mov	x0, x20
	mov	x1, x24
	mov	x2, x22
	blr	x21
	cbnz	w0, LBB0_36
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x24
	mov	x1, x22
	mov	w2, #0
	mov	x3, #0
	bl	_drm_edid_block_valid
	mov	w8, #0
	cbnz	x0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldrsw	x3, [x25]
	mov	x0, x20
	mov	x1, x24
	mov	x2, x22
	blr	x21
	cbnz	w0, LBB0_36
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x24
	mov	x1, x22
	mov	w2, #0
	mov	x3, #0
	bl	_drm_edid_block_valid
	mov	w8, #0
	cbnz	x0, LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	ldrsw	x3, [x25]
	mov	x0, x20
	mov	x1, x24
	mov	x2, x22
	blr	x21
	cbnz	w0, LBB0_36
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x24
	mov	x1, x22
	mov	w2, #0
	mov	x3, #0
	bl	_drm_edid_block_valid
	mov	w8, #0
	cbnz	x0, LBB0_10
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	ldrsw	x3, [x25]
	mov	x0, x20
	mov	x1, x24
	mov	x2, x22
	blr	x21
	cbnz	w0, LBB0_36
; %bb.18:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x24
	mov	x1, x22
	mov	w2, #0
	mov	x3, #0
	bl	_drm_edid_block_valid
	cmp	x0, #0
	csetm	w8, eq
	b	LBB0_10
LBB0_19:
	ldr	w1, [x25]
	mov	x0, x22
	bl	_drm_edid_is_zero
	cbz	x0, LBB0_24
; %bb.20:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_21:
	mov	x0, x19
	mov	x1, x22
	mov	w2, #1
	bl	_connector_bad_edid
	b	LBB0_3
LBB0_22:
	cmp	w27, w8
	b.ne	LBB0_30
; %bb.23:
	mov	x22, x23
	b	LBB0_4
LBB0_24:
	ldrsw	x3, [x25]
	mov	x0, x20
	mov	x1, x22
	mov	w2, #0
	blr	x21
	cbnz	w0, LBB0_3
; %bb.25:
	mov	x0, x22
	mov	w1, #0
	mov	w2, #0
	mov	x3, x23
	bl	_drm_edid_block_valid
	cbnz	x0, LBB0_6
; %bb.26:
	ldrsw	x3, [x25]
	mov	x0, x20
	mov	x1, x22
	mov	w2, #0
	blr	x21
	cbnz	w0, LBB0_3
; %bb.27:
	mov	x0, x22
	mov	w1, #0
	mov	w2, #0
	mov	x3, x23
	bl	_drm_edid_block_valid
	cbnz	x0, LBB0_6
; %bb.28:
	ldrsw	x3, [x25]
	mov	x0, x20
	mov	x1, x22
	mov	w2, #0
	blr	x21
	cbnz	w0, LBB0_3
; %bb.29:
	mov	x0, x22
	mov	w1, #0
	mov	w2, #0
	mov	x3, x23
	bl	_drm_edid_block_valid
	cbnz	x0, LBB0_6
	b	LBB0_21
LBB0_30:
	add	w2, w8, #1
	mov	x0, x19
	mov	x1, x23
	bl	_connector_bad_edid
	ldr	w8, [x23, #504]
	ldrsw	x9, [x25]
	add	x9, x23, x9, lsl #2
	ldur	w10, [x9, #-4]
	sub	w8, w8, w27
	add	w8, w8, w10
	stur	w8, [x9, #-4]
	str	w27, [x23, #504]
	add	w0, w27, #1
	ldr	w1, [x25]
	ldr	w2, [x26]
	bl	_kmalloc_array
	cbz	x0, LBB0_36
; %bb.31:
	mov	x22, x0
	ldr	w8, [x23, #504]
	tbnz	w8, #31, LBB0_37
; %bb.32:
	mov	w19, #-1
	mov	x20, x22
	b	LBB0_34
LBB0_33:                                ;   in Loop: Header=BB0_34 Depth=1
	ldr	w8, [x23, #504]
	cmp	w19, w8
	b.ge	LBB0_37
LBB0_34:                                ; =>This Inner Loop Header: Depth=1
	add	w19, w19, #1
	ldr	w8, [x25]
	mul	w8, w8, w19
	add	x21, x23, w8, sxtw #2
	mov	x0, x21
	mov	x1, x19
	mov	w2, #0
	mov	x3, #0
	bl	_drm_edid_block_valid
	cbz	x0, LBB0_33
; %bb.35:                               ;   in Loop: Header=BB0_34 Depth=1
	ldr	w2, [x25]
	mov	x0, x20
	mov	x1, x21
	bl	_memcpy
	ldrsw	x8, [x25]
	add	x20, x20, x8, lsl #2
	b	LBB0_33
LBB0_36:
	mov	x22, x23
	b	LBB0_3
LBB0_37:
	mov	x0, x23
	bl	_kfree
	b	LBB0_4
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_EDID_LENGTH,4,2                ; @EDID_LENGTH
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
.subsections_via_symbols
