	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_atomic_commit
_vc4_atomic_commit:                     ## @vc4_atomic_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	%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	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_to_vc4_dev
	movq	%rax, %r15
	cmpq	$0, 8(%r14)
	je	LBB0_6
## %bb.1:
	movq	%r15, %rdi
	callq	_down_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.2:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_drm_atomic_helper_prepare_planes
	testl	%eax, %eax
	je	LBB0_5
LBB0_3:
	movl	%eax, %ebx
LBB0_4:
	movq	%r15, %rdi
	callq	_up
	jmp	LBB0_14
LBB0_6:
	movl	$0, (%r14)
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_drm_atomic_helper_setup_commit
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	leaq	4(%r14), %rdi
	movq	_commit_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_INIT_WORK
	movq	%r15, %rdi
	callq	_down_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.8:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_drm_atomic_helper_prepare_planes
	testl	%eax, %eax
	jne	LBB0_3
## %bb.9:
	testl	%r13d, %r13d
	je	LBB0_10
## %bb.12:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_drm_atomic_helper_swap_state
	shrq	$63, %rax
	movl	%eax, %edi
	callq	_BUG_ON
	movq	%r14, %rdi
	callq	_drm_atomic_state_get
	movq	_system_unbound_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_queue_work
	jmp	LBB0_14
LBB0_5:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_drm_atomic_helper_async_commit
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_drm_atomic_helper_cleanup_planes
	movq	%r15, %rdi
	callq	_up
	xorl	%ebx, %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_drm_atomic_helper_wait_for_fences
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movl	%eax, %ebx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_drm_atomic_helper_cleanup_planes
	jmp	LBB0_4
LBB0_13:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_drm_atomic_helper_swap_state
	shrq	$63, %rax
	movl	%eax, %edi
	callq	_BUG_ON
	movq	%r14, %rdi
	callq	_drm_atomic_state_get
	movq	%r14, %rdi
	callq	_vc4_atomic_complete_commit
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_commit_work,4,2                ## @commit_work
	.comm	_system_unbound_wq,4,2          ## @system_unbound_wq
	.no_dead_strip	_vc4_atomic_commit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_atomic_commit
_vc4_atomic_commit:                     ; @vc4_atomic_commit
	.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
	mov	x23, x2
	mov	x19, x1
	mov	x21, x0
	bl	_to_vc4_dev
	mov	x20, x0
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_down_interruptible
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.2:
	mov	x0, x21
	mov	x1, x19
	bl	_drm_atomic_helper_prepare_planes
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.3:
	mov	x0, x21
	mov	x1, x19
	bl	_drm_atomic_helper_async_commit
LBB0_4:
	mov	x0, x21
	mov	x1, x19
	bl	_drm_atomic_helper_cleanup_planes
	b	LBB0_9
LBB0_5:
	str	wzr, [x19]
	mov	x0, x19
	mov	x1, x23
	bl	_drm_atomic_helper_setup_commit
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.6:
	add	x24, x19, #4
Lloh0:
	adrp	x8, _commit_work@GOTPAGE
Lloh1:
	ldr	x8, [x8, _commit_work@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_INIT_WORK
	mov	x0, x20
	bl	_down_interruptible
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.7:
	mov	x0, x21
	mov	x1, x19
	bl	_drm_atomic_helper_prepare_planes
	cbz	w0, LBB0_11
; %bb.8:
	mov	x22, x0
LBB0_9:
	mov	x0, x20
	bl	_up
LBB0_10:
	mov	x0, x22
	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
LBB0_11:
	cbz	w23, LBB0_13
; %bb.12:
	mov	x0, x19
	mov	w1, #0
	bl	_drm_atomic_helper_swap_state
	lsr	x0, x0, #63
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_BUG_ON
	mov	x0, x19
	bl	_drm_atomic_state_get
Lloh3:
	adrp	x8, _system_unbound_wq@GOTPAGE
Lloh4:
	ldr	x8, [x8, _system_unbound_wq@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x24
	bl	_queue_work
	mov	w22, #0
	b	LBB0_10
LBB0_13:
	mov	x0, x21
	mov	x1, x19
	mov	w2, #1
	bl	_drm_atomic_helper_wait_for_fences
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.14:
	mov	x0, x19
	mov	w1, #0
	bl	_drm_atomic_helper_swap_state
	lsr	x0, x0, #63
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_BUG_ON
	mov	x0, x19
	bl	_drm_atomic_state_get
	mov	x0, x19
	bl	_vc4_atomic_complete_commit
	b	LBB0_10
	.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
	.no_dead_strip	_vc4_atomic_commit
.subsections_via_symbols
