	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdfld_disable_crtc             ## -- Begin function mdfld_disable_crtc
	.p2align	4, 0x90
_mdfld_disable_crtc:                    ## @mdfld_disable_crtc
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	(%rax), %r13
	movslq	%esi, %rbx
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_dbg
	cmpl	$1, %ebx
	je	LBB0_2
## %bb.1:
	movl	%r14d, %edi
	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	%r15, %rdi
	movl	%eax, %esi
	callq	_mdfld_dsi_gen_fifo_ready
LBB0_2:
	shlq	$4, %rbx
	movl	12(%r13,%rbx), %edi
	callq	_REG_READ
	movq	_DISPLAY_PLANE_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_4
## %bb.3:
	leaq	(%rbx,%r13), %rdx
	addq	$12, %rdx
	movl	(%rdx), %edi
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	8(%r13,%rbx), %r12d
	movl	%r12d, %edi
	callq	_REG_READ
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	8(%r13,%rbx), %edi
	callq	_REG_READ
LBB0_4:
	movl	4(%r13,%rbx), %edi
	callq	_REG_READ
	movq	_PIPEACONF_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_6
## %bb.5:
	leaq	(%rbx,%r13), %r12
	addq	$4, %r12
	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	(%r12), %edi
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	(%r12), %edi
	callq	_REG_READ
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mdfldWaitForPipeDisable
LBB0_6:
	movl	(%r13,%rbx), %edi
	callq	_REG_READ
	movl	%eax, %r15d
	movq	_DPLL_VCO_ENABLE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%r15d, %eax
	je	LBB0_11
## %bb.7:
	cmpl	$1, %r14d
	je	LBB0_10
## %bb.8:
	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
	movq	_PIPEACONF_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_11
## %bb.9:
	movl	(%r12), %eax
LBB0_10:
	addq	%rbx, %r13
	notl	%eax
	andl	%eax, %r15d
	movl	(%r13), %edi
	movl	%r15d, %esi
	callq	_REG_WRITE
	movl	(%r13), %edi
	callq	_REG_READ
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	movq	_MDFLD_PWR_GATE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%r15d, %esi
	je	LBB0_12
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	(%r13), %edi
	orl	%r15d, %esi
	callq	_REG_WRITE
	movl	$5000, %edi                     ## imm = 0x1388
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_udelay                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pipe = %d\n"

	.comm	_HS_CTRL_FIFO_EMPTY,4,2         ## @HS_CTRL_FIFO_EMPTY
	.comm	_HS_DATA_FIFO_EMPTY,4,2         ## @HS_DATA_FIFO_EMPTY
	.comm	_DISPLAY_PLANE_ENABLE,4,2       ## @DISPLAY_PLANE_ENABLE
	.comm	_PIPEACONF_ENABLE,4,2           ## @PIPEACONF_ENABLE
	.comm	_PIPECONF_PLANE_OFF,4,2         ## @PIPECONF_PLANE_OFF
	.comm	_PIPECONF_CURSOR_OFF,4,2        ## @PIPECONF_CURSOR_OFF
	.comm	_DPLL_VCO_ENABLE,4,2            ## @DPLL_VCO_ENABLE
	.comm	_PIPEACONF,4,2                  ## @PIPEACONF
	.comm	_PIPECCONF,4,2                  ## @PIPECCONF
	.comm	_MDFLD_PWR_GATE_EN,4,2          ## @MDFLD_PWR_GATE_EN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdfld_disable_crtc             ; -- Begin function mdfld_disable_crtc
	.p2align	2
_mdfld_disable_crtc:                    ; @mdfld_disable_crtc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x22, [x8]
	sxtw	x23, w19
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_dbg
	cmp	w19, #1
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_MIPI_GEN_FIFO_STAT_REG
	mov	x1, x0
Lloh2:
	adrp	x8, _HS_CTRL_FIFO_EMPTY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HS_CTRL_FIFO_EMPTY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _HS_DATA_FIFO_EMPTY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HS_DATA_FIFO_EMPTY@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_mdfld_dsi_gen_fifo_ready
LBB0_2:
	add	x24, x22, x23, lsl #4
	mov	x21, x24
	ldr	w0, [x21, #12]!
	bl	_REG_READ
Lloh8:
	adrp	x8, _DISPLAY_PLANE_ENABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DISPLAY_PLANE_ENABLE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x8]
	tst	w9, w0
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x21]
	bic	w1, w0, w9
	mov	x0, x8
	bl	_REG_WRITE
	ldr	w21, [x24, #8]
	mov	x0, x21
	bl	_REG_READ
	mov	x1, x0
	mov	x0, x21
	bl	_REG_WRITE
	ldr	w0, [x24, #8]
	bl	_REG_READ
LBB0_4:
	ldr	w0, [x24, #4]!
	bl	_REG_READ
Lloh11:
	adrp	x25, _PIPEACONF_ENABLE@GOTPAGE
Lloh12:
	ldr	x25, [x25, _PIPEACONF_ENABLE@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.5:
	bic	w8, w0, w8
Lloh13:
	adrp	x9, _PIPECONF_PLANE_OFF@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PIPECONF_PLANE_OFF@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _PIPECONF_CURSOR_OFF@GOTPAGE
Lloh17:
	ldr	x10, [x10, _PIPECONF_CURSOR_OFF@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w8, w9, w8
	orr	w1, w8, w10
	ldr	w0, [x24]
	bl	_REG_WRITE
	ldr	w0, [x24]
	bl	_REG_READ
	mov	x0, x20
	mov	x1, x19
	bl	_mdfldWaitForPipeDisable
LBB0_6:
	add	x21, x22, x23, lsl #4
	ldr	w0, [x21]
	bl	_REG_READ
Lloh19:
	adrp	x22, _DPLL_VCO_ENABLE@GOTPAGE
Lloh20:
	ldr	x22, [x22, _DPLL_VCO_ENABLE@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.7:
	mov	x20, x0
	cmp	w19, #1
	b.eq	LBB0_10
; %bb.8:
Lloh21:
	adrp	x8, _PIPEACONF@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PIPEACONF@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_REG_READ
	mov	x19, x0
Lloh24:
	adrp	x8, _PIPECCONF@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PIPECCONF@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_REG_READ
	orr	w8, w0, w19
	ldr	w9, [x25]
	tst	w8, w9
	b.ne	LBB0_11
; %bb.9:
	ldr	w8, [x22]
LBB0_10:
	bic	w19, w20, w8
	ldr	w0, [x21]
	mov	x1, x19
	bl	_REG_WRITE
	ldr	w0, [x21]
	bl	_REG_READ
	mov	w0, #500
	bl	_udelay
Lloh27:
	adrp	x8, _MDFLD_PWR_GATE_EN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MDFLD_PWR_GATE_EN@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_12
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldr	w0, [x21]
	orr	w1, w8, w19
	bl	_REG_WRITE
	mov	w0, #5000
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_udelay
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pipe = %d\n"

	.comm	_HS_CTRL_FIFO_EMPTY,4,2         ; @HS_CTRL_FIFO_EMPTY
	.comm	_HS_DATA_FIFO_EMPTY,4,2         ; @HS_DATA_FIFO_EMPTY
	.comm	_DISPLAY_PLANE_ENABLE,4,2       ; @DISPLAY_PLANE_ENABLE
	.comm	_PIPEACONF_ENABLE,4,2           ; @PIPEACONF_ENABLE
	.comm	_PIPECONF_PLANE_OFF,4,2         ; @PIPECONF_PLANE_OFF
	.comm	_PIPECONF_CURSOR_OFF,4,2        ; @PIPECONF_CURSOR_OFF
	.comm	_DPLL_VCO_ENABLE,4,2            ; @DPLL_VCO_ENABLE
	.comm	_PIPEACONF,4,2                  ; @PIPEACONF
	.comm	_PIPECCONF,4,2                  ; @PIPECCONF
	.comm	_MDFLD_PWR_GATE_EN,4,2          ; @MDFLD_PWR_GATE_EN
.subsections_via_symbols
