	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_call_lvds_script               ## -- Begin function call_lvds_script
	.p2align	4, 0x90
_call_lvds_script:                      ## @call_lvds_script
	.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
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movl	%edx, %r13d
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	callq	_nouveau_drm
	leal	(%rbx,%rbx), %r12d
	movl	%r13d, %edx
	orl	%r13d, %r12d
	xorl	%r13d, %r13d
	cmpl	%r12d, 16(%rax)
	je	LBB0_16
## %bb.1:
	movq	%rax, %r14
	movq	%rbx, %rsi
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	8(%r14), %rcx
	movl	(%rax,%rcx,4), %ebx
	testl	%ebx, %ebx
	je	LBB0_16
## %bb.2:
	movq	_LVDS_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	$48, %ebx
	movq	%rsi, %r15
	jl	LBB0_4
## %bb.3:
	cmpl	%r15d, %ecx
	je	LBB0_16
LBB0_4:
	movq	%r14, %rdi
	cmpl	$0, 20(%r14)
	movl	%edx, %r13d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_6
## %bb.5:
	movl	$1, 20(%rdi)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_call_lvds_script
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_6:
	movq	_LVDS_PANEL_ON@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_9
## %bb.7:
	cmpq	$0, 32(%rdi)
	je	LBB0_9
## %bb.8:
	movq	_LVDS_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_call_lvds_script
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_9:
	addq	$40, %r14
	movq	_LVDS_RESET@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_12
## %bb.10:
	cmpq	$0, 24(%rdi)
	je	LBB0_12
## %bb.11:
	movq	_LVDS_PANEL_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_call_lvds_script
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_12:
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_NV_INFO
	movq	_NV_PRAMDAC_SEL_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_nvif_rd32
	andl	$327680, %eax                   ## imm = 0x50000
	cmpl	$47, %ebx
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	jg	LBB0_14
## %bb.13:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	movl	%r15d, %ecx
	movq	%rdi, %r15
	callq	_call_lvds_manufacturer_script
	jmp	LBB0_15
LBB0_14:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	movl	%r15d, %ecx
	movq	%rdi, %r15
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_run_lvds_table
LBB0_15:
	movl	%eax, %r13d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	_NV_PRAMDAC_SEL_CLK@GOTPCREL(%rip), %rbx
	movl	%r12d, 16(%rax)
	movl	(%rbx), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_NVReadRAMDAC
	andl	$-327681, %eax                  ## imm = 0xFFFAFFFF
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	orl	%eax, %ecx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_NVWriteRAMDAC
	movq	_NV_PBUS_POWERCTRL_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_nvif_wr32
LBB0_16:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LVDS_INIT,4,2                  ## @LVDS_INIT
	.comm	_LVDS_PANEL_ON,4,2              ## @LVDS_PANEL_ON
	.comm	_LVDS_RESET,4,2                 ## @LVDS_RESET
	.comm	_LVDS_PANEL_OFF,4,2             ## @LVDS_PANEL_OFF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Calling LVDS script %d:\n"

	.comm	_NV_PRAMDAC_SEL_CLK,4,2         ## @NV_PRAMDAC_SEL_CLK
	.comm	_NV_PBUS_POWERCTRL_2,4,2        ## @NV_PBUS_POWERCTRL_2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_call_lvds_script               ; -- Begin function call_lvds_script
	.p2align	2
_call_lvds_script:                      ; @call_lvds_script
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x4
	mov	x21, x3
	mov	x23, x2
	mov	x25, x1
	mov	x19, x0
	bl	_nouveau_drm
	ldp	x8, x9, [x0]
	ldr	w27, [x8, x9, lsl #2]
	ldr	w8, [x0, #16]
	orr	w26, w23, w21, lsl #1
	cmp	w8, w26
	ccmp	w27, #0, #4, ne
	b.eq	LBB0_12
; %bb.1:
Lloh0:
	adrp	x8, _LVDS_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LVDS_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	cmp	w27, #48
	ccmp	w3, w21, #0, ge
	b.eq	LBB0_12
; %bb.2:
	mov	x20, x0
	ldr	w8, [x0, #20]
	cbnz	w8, LBB0_4
; %bb.3:
	mov	w8, #1
	str	w8, [x20, #20]
	mov	x0, x19
	mov	x1, x25
	mov	x2, x23
	mov	x4, x24
	bl	_call_lvds_script
LBB0_4:
	add	x8, x20, #40
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh3:
	adrp	x8, _LVDS_PANEL_ON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LVDS_PANEL_ON@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x22, _LVDS_RESET@GOTPAGE
Lloh7:
	ldr	x22, [x22, _LVDS_RESET@GOTPAGEOFF]
	cmp	w8, w21
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w3, [x22]
	mov	x0, x19
	mov	x1, x25
	mov	x2, x23
	mov	x4, x24
	bl	_call_lvds_script
LBB0_7:
	ldr	w8, [x22]
	cmp	w8, w21
	b.ne	LBB0_10
; %bb.8:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_10
; %bb.9:
Lloh8:
	adrp	x8, _LVDS_PANEL_OFF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LVDS_PANEL_OFF@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x25
	mov	x2, x23
	mov	x4, x24
	bl	_call_lvds_script
LBB0_10:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_NV_INFO
Lloh13:
	adrp	x28, _NV_PRAMDAC_SEL_CLK@GOTPAGE
Lloh14:
	ldr	x28, [x28, _NV_PRAMDAC_SEL_CLK@GOTPAGEOFF]
	ldr	w1, [x28]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_nvif_rd32
	mov	w8, #327680
	and	w22, w0, w8
	mov	x0, x19
	mov	x1, x25
	mov	x2, x23
	mov	x3, x21
	cmp	w27, #47
	b.gt	LBB0_13
; %bb.11:
	bl	_call_lvds_manufacturer_script
	b	LBB0_14
LBB0_12:
	mov	w21, #0
	b	LBB0_15
LBB0_13:
	mov	x4, x24
	bl	_run_lvds_table
LBB0_14:
	mov	x21, x0
	str	w26, [x20, #16]
	ldr	w2, [x28]
	mov	x0, x19
	mov	w1, #0
	bl	_NVReadRAMDAC
	mov	w8, #-327681
	and	w8, w0, w8
	ldr	w2, [x28]
	orr	w3, w8, w22
	mov	x0, x19
	mov	w1, #0
	bl	_NVWriteRAMDAC
Lloh15:
	adrp	x8, _NV_PBUS_POWERCTRL_2@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NV_PBUS_POWERCTRL_2@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	w2, #0
	bl	_nvif_wr32
LBB0_15:
	mov	x0, x21
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_LVDS_INIT,4,2                  ; @LVDS_INIT
	.comm	_LVDS_PANEL_ON,4,2              ; @LVDS_PANEL_ON
	.comm	_LVDS_RESET,4,2                 ; @LVDS_RESET
	.comm	_LVDS_PANEL_OFF,4,2             ; @LVDS_PANEL_OFF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Calling LVDS script %d:\n"

	.comm	_NV_PRAMDAC_SEL_CLK,4,2         ; @NV_PRAMDAC_SEL_CLK
	.comm	_NV_PBUS_POWERCTRL_2,4,2        ; @NV_PBUS_POWERCTRL_2
.subsections_via_symbols
