	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mdfld_crtc_dpms
_mdfld_crtc_dpms:                       ## @mdfld_crtc_dpms
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	(%rdi), %r13
	movq	8(%r13), %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_to_gma_crtc
	movl	(%rax), %ecx
	movq	(%rbx), %rax
	movq	8(%rbx), %r14
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movslq	%ecx, %r12
	movl	(%rax,%r12,4), %ebx
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_gma_power_begin
	testl	%eax, %eax
	je	LBB0_31
## %bb.1:
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	leaq	(%r12,%r12,4), %r12
	leaq	(%r14,%r12,4), %rbx
	leal	-128(%r15), %eax
	cmpl	$3, %eax
	jae	LBB0_2
## %bb.14:
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	callq	_REG_READ
	movq	%rbx, %r13
	movl	%eax, %ebx
	movq	_DPLL_VCO_ENABLE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_21
## %bb.15:
	movq	_MDFLD_PWR_GATE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	je	LBB0_17
## %bb.16:
	notl	%eax
	andl	%eax, %ebx
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_REG_WRITE
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
LBB0_17:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_REG_WRITE
	movl	(%r13), %edi
	callq	_REG_READ
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	movl	(%r13), %edi
	movq	_DPLL_VCO_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, %esi
	callq	_REG_WRITE
	movl	(%r13), %edi
	callq	_REG_READ
	cmpl	$2, %r15d
	je	LBB0_21
## %bb.18:
	leaq	(%r14,%r12,4), %rbx
	addq	$4, %rbx
	movl	$-1, %r15d
	movq	_PIPECONF_DSIPLL_LOCK@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_REG_READ
	testl	%eax, (%r13)
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	$150, %edi
	callq	_udelay
	incl	%r15d
	cmpl	$19999, %r15d                   ## imm = 0x4E1F
	jb	LBB0_19
LBB0_21:
	leaq	(%r14,%r12,4), %rbx
	addq	$8, %rbx
	movl	8(%r14,%r12,4), %edi
	callq	_REG_READ
	movq	_DISPLAY_PLANE_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testl	%eax, %esi
	jne	LBB0_23
## %bb.22:
	movl	(%rbx), %edi
	orl	%eax, %esi
	callq	_REG_WRITE
	movl	12(%r14,%r12,4), %r15d
	movl	%r15d, %edi
	callq	_REG_READ
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_REG_WRITE
LBB0_23:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r12,4), %rbx
	addq	$4, %rbx
	movl	4(%r14,%r12,4), %edi
	callq	_REG_READ
	movq	_PIPEACONF_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	je	LBB0_24
## %bb.25:
	testl	$-3, %r15d
	jne	LBB0_29
	jmp	LBB0_26
LBB0_31:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpl	$131, %r15d
	jne	LBB0_30
## %bb.3:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	cmpl	$1, %edi
	je	LBB0_5
## %bb.4:
	callq	_MIPI_GEN_FIFO_STAT_REG
	movq	_HS_CTRL_FIFO_EMPTY@GOTPCREL(%rip), %rcx
	movq	_HS_DATA_FIFO_EMPTY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_mdfld_dsi_gen_fifo_ready
LBB0_5:
	movq	_VGACNTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_VGA_DISP_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_REG_WRITE
	movl	8(%r14,%r12,4), %edi
	callq	_REG_READ
	movq	_DISPLAY_PLANE_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_7
## %bb.6:
	leaq	(%r14,%r12,4), %rdx
	addq	$8, %rdx
	movl	(%rdx), %edi
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	12(%r14,%r12,4), %ebx
	movl	%ebx, %edi
	callq	_REG_READ
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	12(%r14,%r12,4), %edi
	callq	_REG_READ
LBB0_7:
	movl	4(%r14,%r12,4), %edi
	callq	_REG_READ
	movq	_PIPEACONF_ENABLE@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	testl	%eax, %ecx
	je	LBB0_9
## %bb.8:
	leaq	(%r14,%r12,4), %rbx
	addq	$4, %rbx
	notl	%ecx
	andl	%ecx, %eax
	movq	_PIPECONF_PLANE_OFF@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_PIPECONF_CURSOR_OFF@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	(%rbx), %edi
	callq	_REG_READ
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_mdfldWaitForPipeDisable
LBB0_9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_REG_READ
	movl	%eax, %ebx
	movq	_DPLL_VCO_ENABLE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%ebx, %eax
	je	LBB0_30
## %bb.10:
	cmpl	$1, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_13
## %bb.11:
	movq	_PIPEACONF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG_READ
	movl	%eax, %r14d
	movq	_PIPECCONF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG_READ
	orl	%r14d, %eax
	testl	%eax, (%r15)
	jne	LBB0_30
## %bb.12:
	movl	(%r12), %eax
LBB0_13:
	notl	%eax
	andl	%eax, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_REG_WRITE
	movl	(%r14), %edi
	callq	_REG_READ
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	jmp	LBB0_30
LBB0_24:
	movl	(%rbx), %edi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_REG_WRITE
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_mdfldWaitForPipeEnable
	testl	$-3, %r15d
	jne	LBB0_29
LBB0_26:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	16(%r14,%r12,4), %ebx
	movl	%ebx, %edi
	callq	_REG_READ
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	$100, %edi
	callq	_msleep
	movq	_PIPE_VBLANK_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	16(%r14,%r12,4), %edi
	callq	_REG_READ
	movl	(%r13), %edi
	testl	%ebx, %eax
	je	LBB0_28
## %bb.27:
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_29
LBB0_28:
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	callq	_REG_READ
	movl	(%rbx), %edi
	movq	_DISPLAY_PLANE_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	callq	_REG_WRITE
	movl	12(%r14,%r12,4), %ebx
	movl	%ebx, %edi
	callq	_REG_READ
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	$45128, %edi                    ## imm = 0xB048
	movl	$1, %esi
	callq	_REG_WRITE
	movl	$100, %edi
	callq	_msleep
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	%rax, %rbx
	callq	_REG_READ
	movq	_PIPEACONF_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%rbx), %edi
	callq	_REG_WRITE
	movl	$100, %edi
	callq	_msleep
	movl	%r15d, %edi
	callq	_MIPI_DEVICE_READY_REG
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_REG_WRITE
	movl	$100, %edi
	callq	_msleep
	movl	$45060, %edi                    ## imm = 0xB004
	callq	_REG_READ
	movl	$45060, %edi                    ## imm = 0xB004
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	%r15d, %edi
	callq	_MIPI_DEVICE_READY_REG
	movl	%eax, %edi
	movl	$1, %esi
	callq	_REG_WRITE
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	callq	_REG_READ
	movl	(%rbx), %edi
	movq	_DISPLAY_PLANE_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	12(%r14,%r12,4), %ebx
	movl	%ebx, %edi
	callq	_REG_READ
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	$45128, %edi                    ## imm = 0xB048
	movl	$2, %esi
	callq	_REG_WRITE
	movl	$100, %edi
	callq	_msleep
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	callq	_REG_READ
	movq	_PIPEACONF_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_REG_WRITE
LBB0_29:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_gma_crtc_load_lut
LBB0_30:
	movq	%r13, %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gma_power_end                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mode = %d, pipe = %d\n"

	.comm	_DPLL_VCO_ENABLE,4,2            ## @DPLL_VCO_ENABLE
	.comm	_MDFLD_PWR_GATE_EN,4,2          ## @MDFLD_PWR_GATE_EN
	.comm	_PIPECONF_DSIPLL_LOCK,4,2       ## @PIPECONF_DSIPLL_LOCK
	.comm	_DISPLAY_PLANE_ENABLE,4,2       ## @DISPLAY_PLANE_ENABLE
	.comm	_PIPEACONF_ENABLE,4,2           ## @PIPEACONF_ENABLE
	.comm	_PIPE_VBLANK_STATUS,4,2         ## @PIPE_VBLANK_STATUS
L_.str.1:                               ## @.str.1
	.asciz	"OK"

L_.str.2:                               ## @.str.2
	.asciz	"STUCK!!!!"

	.comm	_HS_CTRL_FIFO_EMPTY,4,2         ## @HS_CTRL_FIFO_EMPTY
	.comm	_HS_DATA_FIFO_EMPTY,4,2         ## @HS_DATA_FIFO_EMPTY
	.comm	_VGACNTRL,4,2                   ## @VGACNTRL
	.comm	_VGA_DISP_DISABLE,4,2           ## @VGA_DISP_DISABLE
	.comm	_PIPECONF_PLANE_OFF,4,2         ## @PIPECONF_PLANE_OFF
	.comm	_PIPECONF_CURSOR_OFF,4,2        ## @PIPECONF_CURSOR_OFF
	.comm	_PIPEACONF,4,2                  ## @PIPEACONF
	.comm	_PIPECCONF,4,2                  ## @PIPECCONF
	.no_dead_strip	_mdfld_crtc_dpms
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mdfld_crtc_dpms
_mdfld_crtc_dpms:                       ; @mdfld_crtc_dpms
	.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	x23, x1
	mov	x21, x0
	ldr	x19, [x0]
	ldr	x22, [x19, #8]
	bl	_to_gma_crtc
	ldrsw	x20, [x0]
	ldp	x8, x24, [x22]
	ldr	w22, [x8, x20, lsl #2]
	ldr	w0, [x19]
	stp	x23, x20, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	mov	w1, #1
	bl	_gma_power_begin
	cbz	w0, LBB0_13
; %bb.1:
	mov	w8, #20
	madd	x25, x20, x8, x24
	sub	w8, w23, #128
	cmp	w8, #3
	b.hs	LBB0_14
; %bb.2:
	ldr	w0, [x25]
	bl	_REG_READ
Lloh2:
	adrp	x26, _DPLL_VCO_ENABLE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _DPLL_VCO_ENABLE@GOTPAGEOFF]
	ldr	w8, [x26]
	tst	w8, w0
	b.ne	LBB0_9
; %bb.3:
	mov	x23, x0
Lloh4:
	adrp	x8, _MDFLD_PWR_GATE_EN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MDFLD_PWR_GATE_EN@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.4:
	bic	w23, w23, w8
	ldr	w0, [x25]
	mov	x1, x23
	bl	_REG_WRITE
	mov	w0, #500
	bl	_udelay
LBB0_5:
	ldr	w0, [x25]
	mov	x1, x23
	bl	_REG_WRITE
	ldr	w0, [x25]
	bl	_REG_READ
	mov	w0, #500
	bl	_udelay
	ldr	w0, [x25]
	ldr	w8, [x26]
	orr	w1, w8, w23
	bl	_REG_WRITE
	ldr	w0, [x25]
	bl	_REG_READ
	cmp	w20, #2
	b.eq	LBB0_9
; %bb.6:
	mov	w8, #20
	madd	x8, x20, x8, x24
	add	x23, x8, #4
	mov	w25, #-1
Lloh7:
	adrp	x26, _PIPECONF_DSIPLL_LOCK@GOTPAGE
Lloh8:
	ldr	x26, [x26, _PIPECONF_DSIPLL_LOCK@GOTPAGEOFF]
	mov	w27, #19999
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_REG_READ
	ldr	w8, [x26]
	tst	w8, w0
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #150
	bl	_udelay
	add	w25, w25, #1
	cmp	w25, w27
	b.lo	LBB0_7
LBB0_9:
	mov	w8, #20
	mul	x8, x20, x8
	add	x25, x24, x8
	ldr	w0, [x25, #8]!
	bl	_REG_READ
Lloh9:
	adrp	x26, _DISPLAY_PLANE_ENABLE@GOTPAGE
Lloh10:
	ldr	x26, [x26, _DISPLAY_PLANE_ENABLE@GOTPAGEOFF]
	ldr	w9, [x26]
	tst	w9, w0
	b.ne	LBB0_11
; %bb.10:
	ldr	w8, [x25]
	orr	w1, w9, w0
	mov	x0, x8
	bl	_REG_WRITE
	mov	w8, #20
	mul	x8, x20, x8
	add	x8, x24, x8
	ldr	w23, [x8, #12]
	mov	x0, x23
	bl	_REG_READ
	mov	x1, x0
	mov	x0, x23
	bl	_REG_WRITE
LBB0_11:
	mov	w8, #20
	mul	x8, x20, x8
	add	x23, x24, x8
	ldr	w0, [x23, #4]!
	bl	_REG_READ
Lloh11:
	adrp	x27, _PIPEACONF_ENABLE@GOTPAGE
Lloh12:
	ldr	x27, [x27, _PIPEACONF_ENABLE@GOTPAGEOFF]
	ldr	w8, [x27]
	tst	w8, w0
	b.eq	LBB0_26
; %bb.12:
	tst	w20, #0xfffffffd
	b.ne	LBB0_30
	b	LBB0_27
LBB0_13:
	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
LBB0_14:
	cmp	w23, #131
	b.ne	LBB0_31
; %bb.15:
	cmp	w20, #1
	b.eq	LBB0_17
; %bb.16:
	mov	x0, x20
	bl	_MIPI_GEN_FIFO_STAT_REG
	mov	x1, x0
Lloh13:
	adrp	x8, _HS_CTRL_FIFO_EMPTY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HS_CTRL_FIFO_EMPTY@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _HS_DATA_FIFO_EMPTY@GOTPAGE
Lloh17:
	ldr	x9, [x9, _HS_DATA_FIFO_EMPTY@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_mdfld_dsi_gen_fifo_ready
LBB0_17:
Lloh19:
	adrp	x8, _VGACNTRL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _VGACNTRL@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x8, _VGA_DISP_DISABLE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _VGA_DISP_DISABLE@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_REG_WRITE
	mov	w8, #20
	madd	x21, x20, x8, x24
	ldr	w0, [x21, #8]!
	bl	_REG_READ
Lloh25:
	adrp	x8, _DISPLAY_PLANE_ENABLE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DISPLAY_PLANE_ENABLE@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x8]
	tst	w9, w0
	b.eq	LBB0_19
; %bb.18:
	ldr	w8, [x21]
	bic	w1, w0, w9
	mov	x0, x8
	bl	_REG_WRITE
	mov	w8, #20
	madd	x22, x20, x8, x24
	ldr	w21, [x22, #12]
	mov	x0, x21
	bl	_REG_READ
	mov	x1, x0
	mov	x0, x21
	bl	_REG_WRITE
	ldr	w0, [x22, #12]
	bl	_REG_READ
LBB0_19:
	mov	w8, #20
	madd	x21, x20, x8, x24
	ldr	w0, [x21, #4]!
	bl	_REG_READ
Lloh28:
	adrp	x22, _PIPEACONF_ENABLE@GOTPAGE
Lloh29:
	ldr	x22, [x22, _PIPEACONF_ENABLE@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_21
; %bb.20:
	bic	w8, w0, w8
Lloh30:
	adrp	x9, _PIPECONF_PLANE_OFF@GOTPAGE
Lloh31:
	ldr	x9, [x9, _PIPECONF_PLANE_OFF@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
Lloh33:
	adrp	x10, _PIPECONF_CURSOR_OFF@GOTPAGE
Lloh34:
	ldr	x10, [x10, _PIPECONF_CURSOR_OFF@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
	orr	w8, w9, w8
	orr	w1, w8, w10
	ldr	w0, [x21]
	bl	_REG_WRITE
	ldr	w0, [x21]
	bl	_REG_READ
	mov	x0, x19
	mov	x1, x20
	bl	_mdfldWaitForPipeDisable
LBB0_21:
	ldr	w0, [x25]
	bl	_REG_READ
Lloh36:
	adrp	x23, _DPLL_VCO_ENABLE@GOTPAGE
Lloh37:
	ldr	x23, [x23, _DPLL_VCO_ENABLE@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_31
; %bb.22:
	mov	x21, x0
	cmp	w20, #1
	b.eq	LBB0_25
; %bb.23:
Lloh38:
	adrp	x8, _PIPEACONF@GOTPAGE
Lloh39:
	ldr	x8, [x8, _PIPEACONF@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	bl	_REG_READ
	mov	x20, x0
Lloh41:
	adrp	x8, _PIPECCONF@GOTPAGE
Lloh42:
	ldr	x8, [x8, _PIPECCONF@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	bl	_REG_READ
	orr	w8, w0, w20
	ldr	w9, [x22]
	tst	w8, w9
	b.ne	LBB0_31
; %bb.24:
	ldr	w8, [x23]
LBB0_25:
	bic	w1, w21, w8
	ldr	w0, [x25]
	bl	_REG_WRITE
	ldr	w0, [x25]
	bl	_REG_READ
	mov	w0, #500
	bl	_udelay
	b	LBB0_31
LBB0_26:
	ldr	w0, [x23]
	mov	x1, x22
	bl	_REG_WRITE
	mov	x0, x19
	mov	x1, x20
	bl	_mdfldWaitForPipeEnable
	tst	w20, #0xfffffffd
	b.ne	LBB0_30
LBB0_27:
	mov	w8, #20
	mul	x8, x20, x8
	add	x28, x24, x8
	ldr	w22, [x28, #16]
	mov	x0, x22
	bl	_REG_READ
	mov	x1, x0
	mov	x0, x22
	bl	_REG_WRITE
	mov	w0, #100
	bl	_msleep
Lloh44:
	adrp	x8, _PIPE_VBLANK_STATUS@GOTPAGE
Lloh45:
	ldr	x8, [x8, _PIPE_VBLANK_STATUS@GOTPAGEOFF]
Lloh46:
	ldr	w22, [x8]
	ldr	w0, [x28, #16]
	bl	_REG_READ
	mov	x8, x0
	ldr	w0, [x19]
	tst	w8, w22
	b.eq	LBB0_29
; %bb.28:
Lloh47:
	adrp	x1, l_.str.1@PAGE
Lloh48:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	b	LBB0_30
LBB0_29:
Lloh49:
	adrp	x1, l_.str.2@PAGE
Lloh50:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x25]
	bl	_REG_READ
	ldr	w8, [x25]
	ldr	w9, [x26]
	bic	w1, w0, w9
	mov	x0, x8
	bl	_REG_WRITE
	mov	w8, #20
	madd	x24, x20, x8, x24
	ldr	w22, [x24, #12]
	mov	x0, x22
	bl	_REG_READ
	mov	x1, x0
	mov	x0, x22
	bl	_REG_WRITE
	mov	w0, #45128
	mov	w1, #1
	bl	_REG_WRITE
	mov	w0, #100
	bl	_msleep
	ldr	w0, [x23]
	bl	_REG_READ
	ldr	w8, [x27]
	bic	w1, w0, w8
	ldr	w0, [x23]
	bl	_REG_WRITE
	mov	w0, #100
	bl	_msleep
	mov	x0, x20
	bl	_MIPI_DEVICE_READY_REG
	mov	w1, #0
	bl	_REG_WRITE
	mov	w0, #100
	bl	_msleep
	mov	w0, #45060
	bl	_REG_READ
	mov	x1, x0
	mov	w0, #45060
	bl	_REG_WRITE
	mov	x0, x20
	bl	_MIPI_DEVICE_READY_REG
	mov	w1, #1
	bl	_REG_WRITE
	ldr	w0, [x25]
	bl	_REG_READ
	ldr	w8, [x25]
	ldr	w9, [x26]
	orr	w1, w9, w0
	mov	x0, x8
	bl	_REG_WRITE
	ldr	w20, [x24, #12]
	mov	x0, x20
	bl	_REG_READ
	mov	x1, x0
	mov	x0, x20
	bl	_REG_WRITE
	mov	w0, #45128
	mov	w1, #2
	bl	_REG_WRITE
	mov	w0, #100
	bl	_msleep
	ldr	w0, [x23]
	bl	_REG_READ
	ldr	w8, [x27]
	orr	w1, w8, w0
	ldr	w0, [x23]
	bl	_REG_WRITE
LBB0_30:
	mov	x0, x21
	bl	_gma_crtc_load_lut
LBB0_31:
	mov	x0, x19
	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
	b	_gma_power_end
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mode = %d, pipe = %d\n"

	.comm	_DPLL_VCO_ENABLE,4,2            ; @DPLL_VCO_ENABLE
	.comm	_MDFLD_PWR_GATE_EN,4,2          ; @MDFLD_PWR_GATE_EN
	.comm	_PIPECONF_DSIPLL_LOCK,4,2       ; @PIPECONF_DSIPLL_LOCK
	.comm	_DISPLAY_PLANE_ENABLE,4,2       ; @DISPLAY_PLANE_ENABLE
	.comm	_PIPEACONF_ENABLE,4,2           ; @PIPEACONF_ENABLE
	.comm	_PIPE_VBLANK_STATUS,4,2         ; @PIPE_VBLANK_STATUS
l_.str.1:                               ; @.str.1
	.asciz	"OK"

l_.str.2:                               ; @.str.2
	.asciz	"STUCK!!!!"

	.comm	_HS_CTRL_FIFO_EMPTY,4,2         ; @HS_CTRL_FIFO_EMPTY
	.comm	_HS_DATA_FIFO_EMPTY,4,2         ; @HS_DATA_FIFO_EMPTY
	.comm	_VGACNTRL,4,2                   ; @VGACNTRL
	.comm	_VGA_DISP_DISABLE,4,2           ; @VGA_DISP_DISABLE
	.comm	_PIPECONF_PLANE_OFF,4,2         ; @PIPECONF_PLANE_OFF
	.comm	_PIPECONF_CURSOR_OFF,4,2        ; @PIPECONF_CURSOR_OFF
	.comm	_PIPEACONF,4,2                  ; @PIPEACONF
	.comm	_PIPECCONF,4,2                  ; @PIPECCONF
	.no_dead_strip	_mdfld_crtc_dpms
.subsections_via_symbols
