	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_fbcon_sync
_nouveau_fbcon_sync:                    ## @nouveau_fbcon_sync
	.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	%rdi, %r14
	movq	16(%rdi), %rax
	movl	(%rax), %edi
	callq	_nouveau_drm
	movq	8(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.1:
	cmpl	$0, (%rbx)
	je	LBB0_9
## %bb.2:
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_in_interrupt
	testq	%rax, %rax
	jne	LBB0_9
## %bb.3:
	movq	(%r14), %rax
	movq	_FBINFO_STATE_RUNNING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.4:
	movq	_FBINFO_HWACCEL_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_5
LBB0_9:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	callq	_mutex_trylock
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:
	movq	%rbx, %rdi
	callq	_nouveau_channel_idle
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_nouveau_fbcon_gpu_lockup
	jmp	LBB0_9
LBB0_8:
	movl	$0, (%rbx)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_FBINFO_STATE_RUNNING,8,3       ## @FBINFO_STATE_RUNNING
	.comm	_FBINFO_HWACCEL_DISABLED,4,2    ## @FBINFO_HWACCEL_DISABLED
	.no_dead_strip	_nouveau_fbcon_sync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_fbcon_sync
_nouveau_fbcon_sync:                    ; @nouveau_fbcon_sync
	.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, x0
	ldr	x8, [x0, #16]
	ldr	w0, [x8]
	bl	_nouveau_drm
	ldr	x20, [x0, #8]
	cbz	x20, LBB0_5
; %bb.1:
	ldr	w8, [x20]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x21, x0
	bl	_in_interrupt
	cbnz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _FBINFO_STATE_RUNNING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FBINFO_STATE_RUNNING@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x9, _FBINFO_HWACCEL_DISABLED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FBINFO_HWACCEL_DISABLED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
LBB0_5:
	mov	w0, #0
	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_6:
	mov	x0, x21
	bl	_mutex_trylock
	cbz	w0, LBB0_5
; %bb.7:
	mov	x0, x20
	bl	_nouveau_channel_idle
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
	cbz	w22, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_nouveau_fbcon_gpu_lockup
	b	LBB0_5
LBB0_9:
	str	wzr, [x20]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FBINFO_STATE_RUNNING,8,3       ; @FBINFO_STATE_RUNNING
	.comm	_FBINFO_HWACCEL_DISABLED,4,2    ; @FBINFO_HWACCEL_DISABLED
	.no_dead_strip	_nouveau_fbcon_sync
.subsections_via_symbols
