	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msm_atomic_commit_tail         ## -- Begin function msm_atomic_commit_tail
	.p2align	4, 0x90
_msm_atomic_commit_tail:                ## @msm_atomic_commit_tail
	.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
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movq	$0, -48(%rbp)
	callq	_get_crtc_mask
	movl	%eax, %r12d
	movq	8(%rbx), %rax
	cmpq	$0, 32(%rax)
	je	LBB0_1
## %bb.2:
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_can_do_async
	testq	%rax, %rax
	setne	%al
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	movzbl	%al, %r13d
	movl	%r13d, %edi
	movl	%r12d, %esi
	callq	_trace_msm_atomic_commit_tail_start
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	callq	*48(%rax)
	movl	%r12d, %edi
	callq	_trace_msm_atomic_wait_flush_start
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	*16(%rax)
	movl	%r12d, %edi
	callq	_trace_msm_atomic_wait_flush_finish
	leaq	16(%rbx), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	*40(%rax)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_drm_atomic_helper_commit_modeset_disables
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_drm_atomic_helper_commit_planes
	movq	%r15, %rdi
	movq	%r14, %r15
	movq	%r14, %rsi
	callq	_drm_atomic_helper_commit_modeset_enables
	movl	%r13d, -56(%rbp)                ## 4-byte Spill
	testb	%r13b, %r13b
	je	LBB0_7
## %bb.4:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	24(%rbx), %r13
	movq	-48(%rbp), %rdi
	callq	_drm_crtc_index
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rdi
	callq	_drm_crtc_mask
	xorl	%edi, %edi
	cmpl	%eax, %r12d
	setne	%dil
	callq	_WARN_ON
	movl	(%rbx), %eax
	testl	%r12d, %eax
	jne	LBB0_6
## %bb.5:
	orl	%r12d, %eax
	movl	%eax, (%rbx)
	movq	8(%rbx), %rax
	movq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	*32(%rax)
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	$1, %edi
	callq	_ms_to_ktime
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_ktime_sub
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leaq	(,%rcx,4), %rdi
	addq	%r13, %rdi
	movq	_HRTIMER_MODE_ABS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %esi
	callq	_hrtimer_start
LBB0_6:
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_8
LBB0_7:
	movl	%r12d, %eax
	notl	%eax
	andl	%eax, (%rbx)
	movl	%r12d, %edi
	callq	_trace_msm_atomic_flush_commit
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	*24(%rax)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r12d, %edi
	callq	_trace_msm_atomic_wait_flush_start
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	*16(%rax)
	movl	%r12d, %edi
	callq	_trace_msm_atomic_wait_flush_finish
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	*8(%rax)
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
LBB0_8:
	movq	%r15, %rdi
	callq	_drm_atomic_helper_commit_hw_done
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_drm_atomic_helper_cleanup_planes
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	%r12d, %esi
	callq	_trace_msm_atomic_commit_tail_finish
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HRTIMER_MODE_ABS,4,2           ## @HRTIMER_MODE_ABS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msm_atomic_commit_tail         ; -- Begin function msm_atomic_commit_tail
	.p2align	2
_msm_atomic_commit_tail:                ; @msm_atomic_commit_tail
	.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	x19, x0
	ldr	x20, [x0]
	ldr	x8, [x20]
	ldr	x22, [x8]
	str	xzr, [sp, #8]
	bl	_get_crtc_mask
	mov	x21, x0
	ldr	x8, [x22, #8]
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_2
; %bb.1:
	add	x1, sp, #8
	mov	x0, x19
	bl	_can_do_async
	cmp	x0, #0
	cset	w23, ne
	b	LBB0_3
LBB0_2:
	mov	w23, #0
LBB0_3:
	mov	x0, x23
	mov	x1, x21
	bl	_trace_msm_atomic_commit_tail_start
	ldr	x8, [x22, #8]
	ldr	x8, [x8, #48]
	mov	x0, x22
	blr	x8
	mov	x0, x21
	bl	_trace_msm_atomic_wait_flush_start
	ldr	x8, [x22, #8]
	ldr	x8, [x8, #16]
	mov	x0, x22
	mov	x1, x21
	blr	x8
	mov	x0, x21
	bl	_trace_msm_atomic_wait_flush_finish
	add	x24, x22, #16
	mov	x0, x24
	bl	_mutex_lock
	ldr	x8, [x22, #8]
	ldr	x8, [x8, #40]
	mov	x0, x22
	mov	x1, x19
	blr	x8
	mov	x0, x20
	mov	x1, x19
	bl	_drm_atomic_helper_commit_modeset_disables
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_drm_atomic_helper_commit_planes
	mov	x0, x20
	mov	x1, x19
	bl	_drm_atomic_helper_commit_modeset_enables
	cbz	w23, LBB0_7
; %bb.4:
	ldr	x27, [x22, #24]
	ldr	x0, [sp, #8]
	bl	_drm_crtc_index
	mov	x25, x0
	ldr	x0, [sp, #8]
	bl	_drm_crtc_mask
	cmp	w21, w0
	cset	w0, ne
	bl	_WARN_ON
	ldr	w8, [x22]
	tst	w8, w21
	b.ne	LBB0_6
; %bb.5:
	orr	w8, w8, w21
	str	w8, [x22]
	ldr	x8, [x22, #8]
	ldr	x8, [x8, #32]
	ldr	x1, [sp, #8]
	mov	x0, x22
	blr	x8
	mov	x26, x0
	mov	w0, #1
	bl	_ms_to_ktime
	mov	x1, x0
	mov	x0, x26
	bl	_ktime_sub
	mov	x1, x0
	add	x0, x27, x25, lsl #2
Lloh0:
	adrp	x8, _HRTIMER_MODE_ABS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HRTIMER_MODE_ABS@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_hrtimer_start
LBB0_6:
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
	mov	x0, x22
	blr	x8
	mov	x0, x24
	bl	_mutex_unlock
	b	LBB0_8
LBB0_7:
	ldr	w8, [x22]
	bic	w8, w8, w21
	str	w8, [x22]
	mov	x0, x21
	bl	_trace_msm_atomic_flush_commit
	ldr	x8, [x22, #8]
	ldr	x8, [x8, #24]
	mov	x0, x22
	mov	x1, x21
	blr	x8
	mov	x0, x24
	bl	_mutex_unlock
	mov	x0, x21
	bl	_trace_msm_atomic_wait_flush_start
	ldr	x8, [x22, #8]
	ldr	x8, [x8, #16]
	mov	x0, x22
	mov	x1, x21
	blr	x8
	mov	x0, x21
	bl	_trace_msm_atomic_wait_flush_finish
	mov	x0, x24
	bl	_mutex_lock
	ldr	x8, [x22, #8]
	ldr	x8, [x8, #8]
	mov	x0, x22
	mov	x1, x21
	blr	x8
	mov	x0, x24
	bl	_mutex_unlock
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
	mov	x0, x22
	blr	x8
LBB0_8:
	mov	x0, x19
	bl	_drm_atomic_helper_commit_hw_done
	mov	x0, x20
	mov	x1, x19
	bl	_drm_atomic_helper_cleanup_planes
	mov	x0, x23
	mov	x1, x21
	bl	_trace_msm_atomic_commit_tail_finish
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_HRTIMER_MODE_ABS,4,2           ; @HRTIMER_MODE_ABS
.subsections_via_symbols
