	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_rcl_msaa_surface_setup
_vc4_rcl_msaa_surface_setup:            ## @vc4_rcl_msaa_surface_setup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%rdx)
	jne	LBB0_2
## %bb.1:
	movq	%rdx, %rbx
	cmpq	$0, 8(%rdx)
	je	LBB0_6
LBB0_2:
	leaq	L_.str(%rip), %rdi
LBB0_3:
	callq	_DRM_DEBUG
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rsi, %r15
	movl	20(%rbx), %esi
	cmpl	$-1, %esi
	je	LBB0_10
## %bb.7:
	movq	%rdi, %r14
	callq	_vc4_use_bo
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_4
## %bb.8:
	movq	8(%r14), %rcx
	movslq	(%r14), %rdx
	leal	1(%rdx), %esi
	movl	%esi, (%r14)
	movq	%rax, (%rcx,%rdx,8)
	testb	$15, 16(%rbx)
	je	LBB0_11
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_3
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_11:
	movq	(%r15), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vc4_full_res_bounds_check      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MSAA surface had nonzero flags/bits\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"MSAA write must be 16b aligned.\n"

	.no_dead_strip	_vc4_rcl_msaa_surface_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_rcl_msaa_surface_setup
_vc4_rcl_msaa_surface_setup:            ; @vc4_rcl_msaa_surface_setup
	.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
	ldr	x8, [x2]
	cbnz	x8, LBB0_2
; %bb.1:
	mov	x19, x2
	ldr	x8, [x2, #8]
	cbz	x8, LBB0_6
LBB0_2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
LBB0_3:
	bl	_DRM_DEBUG
LBB0_4:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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	x21, x1
	ldr	w1, [x19, #20]
	cmn	w1, #1
	b.eq	LBB0_10
; %bb.7:
	mov	x20, x0
	bl	_vc4_use_bo
	str	x0, [x21]
	cbz	x0, LBB0_4
; %bb.8:
	ldr	x8, [x20, #8]
	ldrsw	x9, [x20]
	add	w10, w9, #1
	str	w10, [x20]
	str	x0, [x8, x9, lsl #3]
	ldrb	w8, [x19, #16]
	tst	w8, #0xf
	b.eq	LBB0_11
; %bb.9:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_10:
	mov	w0, #0
	b	LBB0_5
LBB0_11:
	ldr	x1, [x21]
	mov	x0, x20
	mov	x2, x19
	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
	b	_vc4_full_res_bounds_check
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MSAA surface had nonzero flags/bits\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"MSAA write must be 16b aligned.\n"

	.no_dead_strip	_vc4_rcl_msaa_surface_setup
.subsections_via_symbols
