	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_bios_parse_lvds_table  ## -- Begin function nouveau_bios_parse_lvds_table
	.p2align	4, 0x90
_nouveau_bios_parse_lvds_table:         ## @nouveau_bios_parse_lvds_table
	.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	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r14
	callq	_nouveau_drm
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_get_fp_strap
	movl	%eax, %r15d
	movl	(%rbx), %r13d
	leaq	-80(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_parse_lvds_manufacturer_table_header
	testl	%eax, %eax
	jne	LBB0_19
## %bb.1:
	movl	%r15d, %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	-80(%rbp), %ecx
	cmpl	$64, %ecx
	je	LBB0_11
## %bb.2:
	cmpl	$48, %ecx
	je	LBB0_11
## %bb.3:
	cmpl	$10, %ecx
	jne	LBB0_20
## %bb.4:
	movq	8(%rbx), %rax
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.6:
	cmpl	$36, %r13d
	jg	LBB0_8
## %bb.7:
	movl	72(%rbx), %ecx
	andl	$1, %ecx
	xorl	%edx, %edx
	cmpl	%r12d, 16(%rbx)
	setle	%dl
	leal	(%rdx,%rcx,2), %ecx
	movq	%r15, %r14
	jmp	LBB0_10
LBB0_11:
	movq	32(%rbx), %rax
	movq	-72(%rbp), %rsi
	addq	%rax, %rsi
	movslq	-64(%rbp), %rdi
	movslq	%edx, %rdx
	imulq	%rdi, %rdx
	addq	%rsi, %rdx
	movq	%rdx, 24(%rbx)
	cmpl	$64, %ecx
	movq	%r15, %r14
	je	LBB0_13
## %bb.12:
	cmpl	$48, %ecx
	jne	LBB0_14
LBB0_13:
	movabsq	$4294967297, %rcx               ## imm = 0x100000001
	movq	%rcx, 40(%rbx)
	movq	8(%rbx), %rcx
	movl	(%rcx,%rdx,4), %esi
	andl	$1, %esi
	movl	%esi, 48(%rbx)
	movl	(%rcx,%rdx,4), %edx
	andl	$2, %edx
	movl	%edx, 56(%rbx)
	movl	16(%rcx,%rax,4), %edx
	movl	%edx, 60(%rbx)
	movl	20(%rcx,%rax,4), %edi
	callq	_ROM16
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	movl	%eax, 16(%rbx)
LBB0_14:
	testl	%r12d, %r12d
	jne	LBB0_15
	jmp	LBB0_16
LBB0_20:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_NV_ERROR
	movq	_ENOSYS@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_19
LBB0_5:
	movslq	64(%rbx), %rcx
	movslq	%edx, %rdx
	addq	%rcx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	%r15, %r14
	jmp	LBB0_10
LBB0_8:
	xorl	%ecx, %ecx
	cmpl	$48, %r13d
	movq	%r15, %r14
	jb	LBB0_10
## %bb.9:
	xorl	%edx, %edx
	cmpl	%r12d, 16(%rbx)
	setle	%dl
	addl	%edx, %edx
	cmpl	$140000, %r12d                  ## imm = 0x222E0
	movl	$3, %ecx
	cmovll	%edx, %ecx
LBB0_10:
	movq	-72(%rbp), %rdx
	addq	32(%rbx), %rdx
	movslq	-64(%rbp), %rsi
	movslq	%ecx, %rcx
	imulq	%rsi, %rcx
	addq	%rdx, %rcx
	movq	%rcx, 24(%rbx)
	movl	(%rax,%rcx,4), %edx
	andl	$1, %edx
	movl	%edx, 40(%rbx)
	movl	(%rax,%rcx,4), %edx
	andl	$2, %edx
	movl	%edx, 44(%rbx)
	movl	(%rax,%rcx,4), %edx
	andl	$4, %edx
	movl	%edx, 48(%rbx)
	movl	(%rax,%rcx,4), %edx
	andl	$8, %edx
	movl	%edx, 52(%rbx)
	movl	(%rax,%rcx,4), %eax
	andl	$16, %eax
	movl	%eax, (%rdi)
	testl	%r12d, %r12d
	je	LBB0_16
LBB0_15:
	addl	$-41, %r13d
	cmpl	$-4, %r13d
	jae	LBB0_16
## %bb.17:
	xorl	%eax, %eax
	cmpl	%r12d, 16(%rbx)
	setle	%al
	movl	%eax, 48(%rbx)
	jmp	LBB0_18
LBB0_16:
	movl	48(%rbx), %eax
LBB0_18:
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"LVDS table revision not currently supported\n"

	.comm	_ENOSYS,4,2                     ## @ENOSYS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_bios_parse_lvds_table  ; -- Begin function nouveau_bios_parse_lvds_table
	.p2align	2
_nouveau_bios_parse_lvds_table:         ; @nouveau_bios_parse_lvds_table
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x22, x3
	mov	x19, x2
	mov	x21, x1
	mov	x24, x0
	bl	_nouveau_drm
	mov	x20, x0
	mov	x0, x24
	mov	x1, x20
	bl	_get_fp_strap
	mov	x23, x0
	ldr	w25, [x20]
	add	x2, sp, #8
	mov	x0, x24
	mov	x1, x20
	bl	_parse_lvds_manufacturer_table_header
	cbnz	w0, LBB0_21
; %bb.1:
	ldr	w9, [sp, #8]
	cmp	w9, #64
	b.eq	LBB0_7
; %bb.2:
	cmp	w9, #48
	b.eq	LBB0_7
; %bb.3:
	cmp	w9, #10
	b.ne	LBB0_11
; %bb.4:
	ldr	x8, [x20, #8]
	cbz	w21, LBB0_12
; %bb.5:
	cmp	w25, #36
	b.gt	LBB0_13
; %bb.6:
	ldr	w10, [x20, #72]
	ldr	w9, [x20, #16]
	cmp	w9, w21
	cset	w9, le
	bfi	w9, w10, #1, #1
	b	LBB0_16
LBB0_7:
	ldr	x8, [x20, #32]
	ldr	x10, [sp, #16]
	add	x10, x10, x8
	ldrsw	x11, [sp, #24]
	sxtw	x12, w23
	madd	x10, x11, x12, x10
	str	x10, [x20, #24]
	cmp	w9, #64
	b.eq	LBB0_9
; %bb.8:
	cmp	w9, #48
	b.ne	LBB0_10
LBB0_9:
	movi.2s	v0, #1
	str	d0, [x20, #40]
	ldr	x9, [x20, #8]
	lsl	x10, x10, #2
	ldr	w11, [x9, x10]
	and	w11, w11, #0x1
	str	w11, [x20, #48]
	ldr	w10, [x9, x10]
	and	w10, w10, #0x2
	str	w10, [x20, #56]
	add	x8, x9, x8, lsl #2
	ldr	w9, [x8, #16]
	str	w9, [x20, #60]
	ldr	w0, [x8, #20]
	bl	_ROM16
	add	w8, w0, w0, lsl #2
	lsl	w8, w8, #1
	str	w8, [x20, #16]
LBB0_10:
	cbnz	w21, LBB0_17
	b	LBB0_19
LBB0_11:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_NV_ERROR
Lloh2:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_21
LBB0_12:
	ldr	w9, [x20, #64]
	add	w9, w9, w23
	ldr	w9, [x8, w9, sxtw #2]
	b	LBB0_16
LBB0_13:
	cmp	w25, #48
	b.hs	LBB0_15
; %bb.14:
	mov	w9, #0
	b	LBB0_16
LBB0_15:
	ldr	w9, [x20, #16]
	cmp	w9, w21
	cset	w9, le
	lsl	w9, w9, #1
	mov	w10, #8927
	movk	w10, #2, lsl #16
	mov	w11, #3
	cmp	w21, w10
	csel	w9, w11, w9, gt
LBB0_16:
	ldr	x10, [x20, #32]
	ldr	x11, [sp, #16]
	add	x10, x11, x10
	ldrsw	x11, [sp, #24]
	sxtw	x9, w9
	madd	x9, x11, x9, x10
	str	x9, [x20, #24]
	lsl	x9, x9, #2
	ldr	w10, [x8, x9]
	and	w10, w10, #0x1
	str	w10, [x20, #40]
	ldr	w10, [x8, x9]
	and	w10, w10, #0x2
	str	w10, [x20, #44]
	ldr	w10, [x8, x9]
	and	w10, w10, #0x4
	str	w10, [x20, #48]
	ldr	w10, [x8, x9]
	and	w10, w10, #0x8
	str	w10, [x20, #52]
	ldr	w8, [x8, x9]
	and	w8, w8, #0x10
	str	w8, [x22]
	cbz	w21, LBB0_19
LBB0_17:
	sub	w8, w25, #41
	cmn	w8, #4
	b.hs	LBB0_19
; %bb.18:
	ldr	w8, [x20, #16]
	cmp	w8, w21
	cset	w8, le
	str	w8, [x20, #48]
	b	LBB0_20
LBB0_19:
	ldr	w8, [x20, #48]
LBB0_20:
	mov	w0, #0
	str	w8, [x19]
LBB0_21:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"LVDS table revision not currently supported\n"

	.comm	_ENOSYS,4,2                     ; @ENOSYS
.subsections_via_symbols
