	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wined3d_cs_exec_clear
_wined3d_cs_exec_clear:                 ## @wined3d_cs_exec_clear
	.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	%rsi, %r14
	movq	(%rdi), %rsi
	movq	(%rsi), %rdi
	movq	(%rdi), %r10
	movq	8(%r14), %rcx
	movl	36(%r14), %r8d
	movl	32(%r14), %r9d
	leaq	28(%r14), %r11
	movl	(%r14), %edx
	movl	4(%r14), %r15d
	leaq	24(%r14), %r12
	movl	20(%r14), %eax
	movl	16(%r14), %ebx
	subq	$8, %rsp
	pushq	%rbx
	pushq	%rax
	pushq	%r12
	pushq	%r15
	pushq	%r11
	callq	*(%r10)
	addq	$48, %rsp
	movl	4(%r14), %ecx
	movq	_WINED3DCLEAR_TARGET@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.1:
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movl	%eax, %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rcx
	movq	8(%rcx), %rcx
	movq	(%rcx,%rbx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rcx), %edi
	callq	_wined3d_resource_release
	movl	(%r14), %eax
	jmp	LBB0_5
LBB0_6:
	movl	4(%r14), %ecx
LBB0_7:
	movq	_WINED3DCLEAR_ZBUFFER@GOTPCREL(%rip), %rax
	movq	_WINED3DCLEAR_STENCIL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	testl	%ecx, %edx
	je	LBB0_8
## %bb.9:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wined3d_resource_release       ## TAILCALL
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3DCLEAR_TARGET,4,2        ## @WINED3DCLEAR_TARGET
	.comm	_WINED3DCLEAR_ZBUFFER,4,2       ## @WINED3DCLEAR_ZBUFFER
	.comm	_WINED3DCLEAR_STENCIL,4,2       ## @WINED3DCLEAR_STENCIL
	.no_dead_strip	_wined3d_cs_exec_clear
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wined3d_cs_exec_clear
_wined3d_cs_exec_clear:                 ; @wined3d_cs_exec_clear
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	ldr	x1, [x0]
	ldr	x0, [x1]
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x3, [x19, #8]
	ldp	w5, w4, [x19, #32]
	add	x6, x19, #28
	ldp	w2, w7, [x19]
	add	x9, x19, #24
	ldp	w11, w10, [x19, #16]
	stp	w10, w11, [sp, #8]
	str	x9, [sp]
	blr	x8
	ldr	w9, [x19, #4]
Lloh0:
	adrp	x8, _WINED3DCLEAR_TARGET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3DCLEAR_TARGET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_7
; %bb.1:
	ldr	w8, [x19]
	cbz	w8, LBB0_7
; %bb.2:
	mov	x20, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	cmp	x20, w8, uxtw
	b.hs	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	ldr	x9, [x9, #8]
	ldr	x9, [x9, x20, lsl #3]
	cbz	x9, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x9]
	bl	_wined3d_resource_release
	ldr	w8, [x19]
	b	LBB0_3
LBB0_6:
	ldr	w9, [x19, #4]
LBB0_7:
Lloh3:
	adrp	x8, _WINED3DCLEAR_ZBUFFER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WINED3DCLEAR_ZBUFFER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x10, _WINED3DCLEAR_STENCIL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _WINED3DCLEAR_STENCIL@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w8, w10, w8
	tst	w8, w9
	b.eq	LBB0_9
; %bb.8:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_wined3d_resource_release
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3DCLEAR_TARGET,4,2        ; @WINED3DCLEAR_TARGET
	.comm	_WINED3DCLEAR_ZBUFFER,4,2       ; @WINED3DCLEAR_ZBUFFER
	.comm	_WINED3DCLEAR_STENCIL,4,2       ; @WINED3DCLEAR_STENCIL
	.no_dead_strip	_wined3d_cs_exec_clear
.subsections_via_symbols
