	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_atomic_helper_commit       ## -- Begin function drm_atomic_helper_commit
	.p2align	4, 0x90
_drm_atomic_helper_commit:              ## @drm_atomic_helper_commit
	.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
	movq	%rsi, %r12
	movq	%rdi, %r14
	cmpq	$0, 8(%rsi)
	je	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_drm_atomic_helper_prepare_planes
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_drm_atomic_helper_async_commit
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_drm_atomic_helper_cleanup_planes
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_3:
	movl	%edx, %r15d
	movq	%r12, %rdi
	movl	%edx, %esi
	callq	_drm_atomic_helper_setup_commit
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.4:
	movq	_commit_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_INIT_WORK
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_drm_atomic_helper_prepare_planes
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:
	testl	%r15d, %r15d
	je	LBB0_6
LBB0_7:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_drm_atomic_helper_swap_state
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	%r12, %rdi
	callq	_drm_atomic_state_get
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.9:
	movq	_system_unbound_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_queue_work
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_6:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_drm_atomic_helper_wait_for_fences
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
LBB0_11:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_drm_atomic_helper_cleanup_planes
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r12, %rdi
	callq	_commit_tail
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_commit_work,4,2                ## @commit_work
	.comm	_system_unbound_wq,4,2          ## @system_unbound_wq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_atomic_helper_commit       ; -- Begin function drm_atomic_helper_commit
	.p2align	2
_drm_atomic_helper_commit:              ; @drm_atomic_helper_commit
	.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	x19, x1
	mov	x20, x0
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_drm_atomic_helper_prepare_planes
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	bl	_drm_atomic_helper_async_commit
LBB0_3:
	mov	x0, x20
	mov	x1, x19
	bl	_drm_atomic_helper_cleanup_planes
	b	LBB0_6
LBB0_4:
	mov	x21, x2
	mov	x0, x19
	mov	x1, x2
	bl	_drm_atomic_helper_setup_commit
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.5:
Lloh0:
	adrp	x8, _commit_work@GOTPAGE
Lloh1:
	ldr	x8, [x8, _commit_work@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_INIT_WORK
	mov	x0, x20
	mov	x1, x19
	bl	_drm_atomic_helper_prepare_planes
	mov	x22, x0
	cbz	w0, LBB0_7
LBB0_6:
	mov	x0, x22
	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
	ret
LBB0_7:
	cbz	w21, LBB0_11
LBB0_8:
	mov	x0, x19
	mov	w1, #1
	bl	_drm_atomic_helper_swap_state
	mov	x22, x0
	cbnz	w0, LBB0_3
; %bb.9:
	mov	x0, x19
	bl	_drm_atomic_state_get
	cbz	w21, LBB0_12
; %bb.10:
Lloh3:
	adrp	x8, _system_unbound_wq@GOTPAGE
Lloh4:
	ldr	x8, [x8, _system_unbound_wq@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_queue_work
	b	LBB0_13
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1
	bl	_drm_atomic_helper_wait_for_fences
	mov	x22, x0
	cbnz	w0, LBB0_3
	b	LBB0_8
LBB0_12:
	mov	x0, x19
	bl	_commit_tail
LBB0_13:
	mov	w22, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_commit_work,4,2                ; @commit_work
	.comm	_system_unbound_wq,4,2          ; @system_unbound_wq
.subsections_via_symbols
