	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_bios_embedded_edid     ## -- Begin function nouveau_bios_embedded_edid
	.p2align	4, 0x90
_nouveau_bios_embedded_edid:            ## @nouveau_bios_embedded_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_nouveau_drm
	movaps	l___const.nouveau_bios_embedded_edid.edid_sig+16(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	l___const.nouveau_bios_embedded_edid.edid_sig(%rip), %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	8(%rax), %r13
	testq	%r13, %r13
	jne	LBB0_10
## %bb.1:
	movq	%rax, %r14
	movq	_NV_PROM_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.3:
	leaq	-80(%rbp), %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(,%r13,4), %rdi
	addq	(%r14), %rdi
	movl	%r15d, %esi
	movq	%r12, %rdx
	movl	$8, %ecx
	callq	_findstr
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbx
	addq	%r13, %rbx
	leaq	(,%rbx,4), %rdi
	addq	(%r14), %rdi
	movq	_EDID1_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_nv_cksum
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %r13
	incq	%r13
	subl	%ebx, %r15d
	jne	LBB0_4
	jmp	LBB0_9
LBB0_2:
	xorl	%r13d, %r13d
	jmp	LBB0_9
LBB0_5:
	xorl	%r13d, %r13d
	jmp	LBB0_10
LBB0_7:
	movq	%rbx, %r13
LBB0_9:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_NV_INFO
	shlq	$2, %r13
	addq	(%r14), %r13
	movq	%r13, 8(%r14)
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movq	%r13, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.nouveau_bios_embedded_edid.edid_sig
l___const.nouveau_bios_embedded_edid.edid_sig:
	.long	0                               ## 0x0
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	0                               ## 0x0

	.comm	_NV_PROM_SIZE,4,2               ## @NV_PROM_SIZE
	.comm	_EDID1_LEN,4,2                  ## @EDID1_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Found EDID in BIOS\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_bios_embedded_edid     ; -- Begin function nouveau_bios_embedded_edid
	.p2align	2
_nouveau_bios_embedded_edid:            ; @nouveau_bios_embedded_edid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	bl	_nouveau_drm
	mov	x19, x0
Lloh3:
	adrp	x8, l___const.nouveau_bios_embedded_edid.edid_sig@PAGE
Lloh4:
	add	x8, x8, l___const.nouveau_bios_embedded_edid.edid_sig@PAGEOFF
	ldp	q1, q0, [x8]
	stp	q1, q0, [sp]
	ldr	x0, [x0, #8]
	cbnz	x0, LBB0_8
; %bb.1:
Lloh5:
	adrp	x8, _NV_PROM_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NV_PROM_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w20, [x8]
	cbz	w20, LBB0_6
; %bb.2:
	mov	x21, #0
Lloh8:
	adrp	x22, _EDID1_LEN@GOTPAGE
Lloh9:
	ldr	x22, [x22, _EDID1_LEN@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x0, x8, x21, lsl #2
	mov	x2, sp
	mov	x1, x20
	mov	w3, #8
	bl	_findstr
	cbz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x0, x21
	ldr	x8, [x19]
	add	x0, x8, x21, lsl #2
	ldr	w1, [x22]
	bl	_nv_cksum
	cbz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	subs	w20, w20, w21
	add	x21, x21, #1
	b.ne	LBB0_3
	b	LBB0_7
LBB0_6:
	mov	x21, #0
LBB0_7:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_NV_INFO
	ldr	x8, [x19]
	add	x0, x8, x21, lsl #2
	str	x0, [x19, #8]
LBB0_8:
	ldr	x8, [sp, #40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	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
	add	sp, sp, #96
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.nouveau_bios_embedded_edid.edid_sig
l___const.nouveau_bios_embedded_edid.edid_sig:
	.long	0                               ; 0x0
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	0                               ; 0x0

	.comm	_NV_PROM_SIZE,4,2               ; @NV_PROM_SIZE
	.comm	_EDID1_LEN,4,2                  ; @EDID1_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Found EDID in BIOS\n"

.subsections_via_symbols
