	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv50_wndw_atomic_check_acquire
_nv50_wndw_atomic_check_acquire:        ## @nv50_wndw_atomic_check_acquire
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	120(%rcx), %edi
	callq	_nouveau_framebuffer
	movq	%rax, %r13
	movl	20(%r14), %edi
	callq	_nouveau_drm
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	16(%r14), %edx
	movq	%rax, %r14
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_NV_ATOMIC
	movl	120(%rbx), %eax
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	cmpl	120(%r15), %eax
	jne	LBB0_4
## %bb.1:
	testl	%r12d, %r12d
	jne	LBB0_4
## %bb.2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 288(%rax)
	je	LBB0_4
## %bb.3:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rax
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	cmpq	$0, 16(%rax)
	jne	LBB0_11
	jmp	LBB0_13
LBB0_4:
	movl	12(%r13), %eax
	movl	%eax, 280(%rbx)
	movl	8(%r13), %eax
	movl	%eax, 276(%rbx)
	movq	16(%r13), %rax
	movl	4(%rax), %eax
	movl	%eax, 272(%rbx)
	movq	%rbx, %rdi
	callq	_nv50_wndw_atomic_check_acquire_rgb
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_nv50_wndw_atomic_check_acquire_yuv
	testl	%eax, %eax
	je	LBB0_6
## %bb.24:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	$0, 272(%rbx)
	je	LBB0_8
## %bb.7:
	movl	$0, 240(%rbx)
	movq	16(%r13), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	sarl	$4, %ecx
	cmpl	$192, (%r14)
	cmovll	%eax, %ecx
	movl	%ecx, 244(%rbx)
	movq	(%r13), %rax
	movl	(%rax), %eax
	leal	63(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$6, %ecx
	movq	248(%rbx), %rax
	movl	%ecx, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_8:
	movq	$1, 240(%rbx)
	movq	248(%rbx), %rax
	movl	$0, (%rax)
	movq	(%r13), %rax
	movl	(%rax), %eax
LBB0_9:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	256(%rbx), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	cmpl	$0, (%r14)
	setne	%al
	sete	%cl
	movl	%ecx, 264(%rbx)
	movl	%eax, 268(%rbx)
	movq	(%r15), %rax
	xorl	%ecx, %ecx
	cmpq	$0, 24(%rax)
	setne	%cl
	movl	%ecx, 12(%rbx)
	cmpq	$0, 16(%rax)
	je	LBB0_13
LBB0_11:
	leaq	184(%rbx), %rsi
	movdqu	72(%rbx), %xmm0
	psrad	$16, %xmm0
	movdqu	%xmm0, 184(%rbx)
	movq	112(%rbx), %rax
	movq	%rax, 232(%rbx)
	leaq	184(%r12), %rdi
	movl	$56, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	$1, (%rbx)
LBB0_13:
	movq	(%r15), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_20
## %bb.14:
	movl	$255, %eax
	subq	104(%rbx), %rax
	leaq	128(%rbx), %rsi
	movq	%rax, 168(%rbx)
	movl	88(%rbx), %eax
	movl	92(%rbx), %edx
	sarl	$8, %eax
	movl	%eax, 144(%rbx)
	movl	$7, %eax
	movl	$2, %ecx
	cmpl	$128, %edx
	je	LBB0_18
## %bb.15:
	cmpl	$130, %edx
	jne	LBB0_17
## %bb.16:
	movl	$5, %ecx
	jmp	LBB0_18
LBB0_17:
	movl	$4, %eax
LBB0_18:
	movl	%ecx, 148(%rbx)
	movl	%eax, 152(%rbx)
	leaq	128(%r12), %rdi
	movl	$56, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movl	$1, 4(%rbx)
LBB0_20:
	cmpq	$0, 8(%r15)
	je	LBB0_23
## %bb.21:
	leaq	16(%rbx), %rsi
	movq	96(%rbx), %rax
	movq	%rax, 44(%rbx)
	addq	$16, %r12
	movq	%r12, %rdi
	movl	$56, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movl	$1, 8(%rbx)
LBB0_23:
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s acquire\n"

	.no_dead_strip	_nv50_wndw_atomic_check_acquire
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function nv50_wndw_atomic_check_acquire
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
lCPI0_1:
	.long	2                               ; 0x2
	.long	7                               ; 0x7
lCPI0_2:
	.long	5                               ; 0x5
	.long	7                               ; 0x7
lCPI0_3:
	.long	2                               ; 0x2
	.long	4                               ; 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_nv50_wndw_atomic_check_acquire:        ; @nv50_wndw_atomic_check_acquire
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x4
	mov	x20, x3
	mov	x22, x2
	mov	x25, x1
	mov	x21, x0
	ldr	w0, [x3, #120]
	bl	_nouveau_framebuffer
	mov	x23, x0
	ldr	w0, [x21, #20]
	bl	_nouveau_drm
	mov	x24, x0
	ldr	w2, [x21, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_NV_ATOMIC
	ldr	w8, [x20, #120]
	ldr	w9, [x22, #120]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.1:
	cbnz	w25, LBB0_4
; %bb.2:
	ldr	w8, [x22, #288]
	cbz	w8, LBB0_4
; %bb.3:
	ldr	x8, [x21]
	ldr	x8, [x8, #16]
	cbnz	x8, LBB0_11
	b	LBB0_13
LBB0_4:
	add	x8, x20, #276
	ldr	d0, [x23, #8]
	str	d0, [x8]
	ldr	x8, [x23, #16]
	ldr	w8, [x8, #4]
	str	w8, [x20, #272]
	mov	x0, x20
	bl	_nv50_wndw_atomic_check_acquire_rgb
	cbz	w0, LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_nv50_wndw_atomic_check_acquire_yuv
	cbz	w0, LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w8, [x20, #272]
	cbz	w8, LBB0_9
; %bb.8:
	mov	w8, #0
	ldr	w9, [x24]
	ldr	x10, [x23, #16]
	ldr	w10, [x10]
	asr	w11, w10, #4
	cmp	w9, #191
	csel	w9, w11, w10, gt
	stp	wzr, w9, [x20, #240]
	ldr	x9, [x23]
	ldr	w9, [x9]
	add	w10, w9, #63
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #6
	ldr	x10, [x20, #248]
	str	w9, [x10]
	b	LBB0_10
LBB0_9:
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x20, #240]
	ldr	x8, [x20, #248]
	str	wzr, [x8]
	ldr	x8, [x23]
	ldr	w8, [x8]
LBB0_10:
	ldr	x9, [x20, #256]
	str	w8, [x9]
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w8, ne
	cset	w9, eq
	str	w9, [x20, #264]
	str	w8, [x20, #268]
	ldr	x8, [x21]
	ldr	x9, [x8, #24]
	cmp	x9, #0
	cset	w9, ne
	str	w9, [x20, #12]
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_13
LBB0_11:
	ldur	q0, [x20, #72]
	sshr.4s	v0, v0, #16
	mov	x1, x20
	str	q0, [x1, #184]!
	ldur	d0, [x1, #-72]
	str	d0, [x1, #48]
	add	x0, x22, #184
	mov	w2, #56
	bl	_memcmp
	cbz	x0, LBB0_13
; %bb.12:
	mov	w8, #1
	str	w8, [x20]
LBB0_13:
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_21
; %bb.14:
	ldr	x8, [x20, #104]
	mov	w9, #255
	sub	x8, x9, x8
	add	x1, x20, #128
	str	x8, [x20, #168]
	ldp	w9, w8, [x20, #88]
	asr	w9, w9, #8
	str	w9, [x20, #144]
	cmp	w8, #128
	b.eq	LBB0_17
; %bb.15:
	cmp	w8, #130
	b.ne	LBB0_18
; %bb.16:
Lloh4:
	adrp	x8, lCPI0_2@PAGE
Lloh5:
	ldr	d0, [x8, lCPI0_2@PAGEOFF]
	b	LBB0_19
LBB0_17:
Lloh6:
	adrp	x8, lCPI0_1@PAGE
Lloh7:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	b	LBB0_19
LBB0_18:
Lloh8:
	adrp	x8, lCPI0_3@PAGE
Lloh9:
	ldr	d0, [x8, lCPI0_3@PAGEOFF]
LBB0_19:
	stur	d0, [x20, #148]
	add	x0, x22, #128
	mov	w2, #56
	bl	_memcmp
	cbz	x0, LBB0_21
; %bb.20:
	mov	w8, #1
	str	w8, [x20, #4]
LBB0_21:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_24
; %bb.22:
	add	x1, x20, #16
	ldr	d0, [x20, #96]
	stur	d0, [x20, #44]
	add	x0, x22, #16
	mov	w2, #56
	bl	_memcmp
	cbz	x0, LBB0_24
; %bb.23:
	mov	w8, #1
	str	w8, [x20, #8]
LBB0_24:
	ldr	x8, [x21]
	ldr	x3, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	br	x3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdr	Lloh4, Lloh5
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdr	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s acquire\n"

	.no_dead_strip	_nv50_wndw_atomic_check_acquire
.subsections_via_symbols
