	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_draw_buffers_mask
_find_draw_buffers_mask:                ## @find_draw_buffers_mask
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rsi), %rax
	movq	(%rax), %r15
	movq	_wined3d_settings@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ORM_FBO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.1:
	cmpl	$0, 12(%r14)
	je	LBB0_14
## %bb.2:
	movq	(%rsi), %rax
	movq	_WINED3D_SHADER_TYPE_PIXEL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%rax), %ebx
	jmp	LBB0_5
LBB0_13:
	movq	(%r15), %rdi
	callq	_wined3d_rendertarget_view_get_surface
	movl	(%rax), %esi
	movq	%r14, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_context_generate_rt_mask_no_fbo ## TAILCALL
LBB0_14:
	movq	(%r15), %rax
	movl	8(%rax), %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_context_generate_rt_mask_from_resource ## TAILCALL
LBB0_3:
	movl	$1, %ebx
LBB0_5:
	movl	8(%r14), %eax
	movq	%rsi, %rdi
	movl	%eax, %esi
	callq	_wined3d_dualblend_enabled
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	movq	(%r14), %rax
	andl	(%rax,%rcx,4), %ebx
	movl	%ebx, -36(%rbp)
	je	LBB0_6
## %bb.7:
	leaq	-36(%rbp), %r14
	movq	_WINED3DFMT_NULL@GOTPCREL(%rip), %r12
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	btrl	%eax, %ebx
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$0, -36(%rbp)
	je	LBB0_12
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_wined3d_bit_scan
	movl	%eax, %ecx
	movq	(%r15,%rcx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	cmpq	(%r12), %rcx
	je	LBB0_10
	jmp	LBB0_11
LBB0_6:
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_SHADER_TYPE_PIXEL,8,3  ## @WINED3D_SHADER_TYPE_PIXEL
	.comm	_wined3d_settings,8,3           ## @wined3d_settings
	.comm	_ORM_FBO,8,3                    ## @ORM_FBO
	.comm	_WINED3DFMT_NULL,8,3            ## @WINED3DFMT_NULL
	.no_dead_strip	_find_draw_buffers_mask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_draw_buffers_mask
_find_draw_buffers_mask:                ; @find_draw_buffers_mask
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x1, #8]
Lloh0:
	adrp	x9, _wined3d_settings@GOTPAGE
Lloh1:
	ldr	x9, [x9, _wined3d_settings@GOTPAGEOFF]
	ldr	x20, [x8]
Lloh2:
	ldr	x8, [x9]
Lloh3:
	adrp	x9, _ORM_FBO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ORM_FBO@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_5
; %bb.2:
	ldr	x8, [x1]
Lloh6:
	adrp	x9, _WINED3D_SHADER_TYPE_PIXEL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WINED3D_SHADER_TYPE_PIXEL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	w21, [x8]
	b	LBB0_7
LBB0_4:
	ldr	x0, [x20]
	bl	_wined3d_rendertarget_view_get_surface
	ldr	w1, [x0]
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_context_generate_rt_mask_no_fbo
LBB0_5:
	ldr	x8, [x20]
	ldr	w0, [x8, #8]
	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
	add	sp, sp, #64
	b	_context_generate_rt_mask_from_resource
LBB0_6:
	mov	w21, #1
LBB0_7:
	ldr	w8, [x19, #8]
	mov	x0, x1
	mov	x1, x8
	bl	_wined3d_dualblend_enabled
	cmp	x0, #0
	cset	w8, eq
	ldr	x9, [x19]
	ldr	w8, [x9, w8, uxtw #2]
	ands	w19, w8, w21
	str	w19, [sp, #12]
	b.eq	LBB0_13
; %bb.8:
	mov	w21, #1
Lloh9:
	adrp	x22, _WINED3DFMT_NULL@GOTPAGE
Lloh10:
	ldr	x22, [x22, _WINED3DFMT_NULL@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	lsl	w8, w21, w0
	bic	w19, w19, w8
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #12
	bl	_wined3d_bit_scan
	ldr	x8, [x20, w0, uxtw #3]
	cbz	x8, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_9
	b	LBB0_10
LBB0_13:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_SHADER_TYPE_PIXEL,8,3  ; @WINED3D_SHADER_TYPE_PIXEL
	.comm	_wined3d_settings,8,3           ; @wined3d_settings
	.comm	_ORM_FBO,8,3                    ; @ORM_FBO
	.comm	_WINED3DFMT_NULL,8,3            ; @WINED3DFMT_NULL
	.no_dead_strip	_find_draw_buffers_mask
.subsections_via_symbols
