	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msm_edp_aux_ctrl               ## -- Begin function msm_edp_aux_ctrl
	.p2align	4, 0x90
_msm_edp_aux_ctrl:                      ## @msm_edp_aux_ctrl
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	movq	_REG_EDP_AUX_CTRL@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%r14), %rdi
	callq	_edp_read
	movl	%eax, %r15d
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_EDP_AUX_CTRL_RESET@GOTPCREL(%rip), %rbx
	orl	(%rbx), %r15d
	movq	(%r12), %rdi
	addq	(%r14), %rdi
	movl	%r15d, %esi
	callq	_edp_write
	xorl	%eax, %eax
	callq	_wmb
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movl	(%rbx), %esi
	notl	%esi
	andl	%r15d, %esi
	movq	_EDP_AUX_CTRL_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	jmp	LBB0_3
LBB0_2:
	movq	_EDP_AUX_CTRL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r15d
	movl	%r15d, %esi
LBB0_3:
	movq	(%r12), %rdi
	addq	(%r14), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_edp_write                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enable=%d"

	.comm	_REG_EDP_AUX_CTRL,8,3           ## @REG_EDP_AUX_CTRL
	.comm	_EDP_AUX_CTRL_RESET,4,2         ## @EDP_AUX_CTRL_RESET
	.comm	_EDP_AUX_CTRL_ENABLE,4,2        ## @EDP_AUX_CTRL_ENABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msm_edp_aux_ctrl               ; -- Begin function msm_edp_aux_ctrl
	.p2align	2
_msm_edp_aux_ctrl:                      ; @msm_edp_aux_ctrl
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	ldr	x8, [x19]
Lloh2:
	adrp	x21, _REG_EDP_AUX_CTRL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _REG_EDP_AUX_CTRL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_edp_read
	cbz	w20, LBB0_2
; %bb.1:
Lloh4:
	adrp	x22, _EDP_AUX_CTRL_RESET@GOTPAGE
Lloh5:
	ldr	x22, [x22, _EDP_AUX_CTRL_RESET@GOTPAGEOFF]
	ldr	w8, [x22]
	orr	w20, w8, w0
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x0, x9, x8
	mov	x1, x20
	bl	_edp_write
	bl	_wmb
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	ldr	w8, [x22]
	bic	w8, w20, w8
Lloh6:
	adrp	x9, _EDP_AUX_CTRL_ENABLE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EDP_AUX_CTRL_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w8, w9
	b	LBB0_3
LBB0_2:
Lloh9:
	adrp	x8, _EDP_AUX_CTRL_ENABLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EDP_AUX_CTRL_ENABLE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	bic	w1, w0, w8
LBB0_3:
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x0, x9, x8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_edp_write
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enable=%d"

	.comm	_REG_EDP_AUX_CTRL,8,3           ; @REG_EDP_AUX_CTRL
	.comm	_EDP_AUX_CTRL_RESET,4,2         ; @EDP_AUX_CTRL_RESET
	.comm	_EDP_AUX_CTRL_ENABLE,4,2        ; @EDP_AUX_CTRL_ENABLE
.subsections_via_symbols
