	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function analogix_dp_prepare_panel
_analogix_dp_prepare_panel:             ## @analogix_dp_prepare_panel
	.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
	movq	8(%rdi), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leaq	4(%rdi), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	xorl	%r13d, %r13d
	testl	%r12d, %r12d
	jne	LBB0_4
## %bb.3:
	cmpl	$0, (%rbx)
	jne	LBB0_10
LBB0_4:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.5:
	callq	_drm_panel_prepare
	jmp	LBB0_7
LBB0_1:
	xorl	%r13d, %r13d
	jmp	LBB0_11
LBB0_6:
	callq	_drm_panel_unprepare
LBB0_7:
	movl	%eax, %r13d
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.8:
	testl	%r13d, %r13d
	jne	LBB0_10
## %bb.9:
	movl	%r14d, (%rbx)
	xorl	%r13d, %r13d
LBB0_10:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_11:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_analogix_dp_prepare_panel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function analogix_dp_prepare_panel
_analogix_dp_prepare_panel:             ; @analogix_dp_prepare_panel
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	cbnz	w22, LBB0_5
; %bb.2:
	ldr	w8, [x21]
	cbz	w8, LBB0_5
; %bb.3:
	mov	w23, #0
	b	LBB0_10
LBB0_4:
	mov	w23, #0
	b	LBB0_11
LBB0_5:
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	cbz	w20, LBB0_7
; %bb.6:
	bl	_drm_panel_prepare
	mov	x23, x0
	cbnz	w22, LBB0_8
	b	LBB0_10
LBB0_7:
	bl	_drm_panel_unprepare
	mov	x23, x0
	cbz	w22, LBB0_10
LBB0_8:
	cbnz	w23, LBB0_10
; %bb.9:
	str	w20, [x21]
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_11:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_analogix_dp_prepare_panel
.subsections_via_symbols
