	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpu_blitter_clear
_cpu_blitter_clear:                     ## @cpu_blitter_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movss	%xmm0, -88(%rbp)
	movq	$0, -84(%rbp)
	testl	%r8d, %r8d
	cmoveq	16(%rbp), %r9
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movl	$0, -76(%rbp)
	movl	$1, %eax
	cmovnel	%r8d, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	xorl	%r15d, %r15d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rdx), %edi
	callq	_debug_d3dformat
	leaq	L_.str(%rip), %rdi
	movl	24(%rbp), %esi
	movl	%eax, %edx
	callq	_FIXME
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	leaq	-88(%rbp), %rdx
	callq	_surface_cpu_blt_colour_fill
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	incq	%r15
	cmpq	-56(%rbp), %r15                 ## 8-byte Folded Reload
	je	LBB0_18
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	%r15, %rbx
	shlq	$4, %rbx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movl	12(%r13,%rbx), %edi
	movq	16(%rbp), %r14
	movl	12(%r14), %esi
	callq	_max
	movq	%rax, -136(%rbp)
	movl	8(%r13,%rbx), %edi
	movl	8(%r14), %esi
	callq	_max
	movq	%rax, -128(%rbp)
	movl	4(%r13,%rbx), %edi
	movl	4(%r14), %esi
	callq	_min
	movq	%rax, -120(%rbp)
	movl	(%r13,%rbx), %edi
	leaq	-136(%rbp), %r13
	movl	(%r14), %esi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	callq	_min
	movq	%rax, -112(%rbp)
	movq	$0, -96(%rbp)
	movl	$1, -104(%rbp)
	movq	-136(%rbp), %rcx
	cmpq	-120(%rbp), %rcx
	jge	LBB0_17
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%rax, -128(%rbp)
	jge	LBB0_17
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	24(%rbp), %eax
	movq	_WINED3DCLEAR_TARGET@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_9
LBB0_6:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	%r13, %rsi
	movq	32(%rbp), %rdx
	callq	_surface_cpu_blt_colour_fill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_WINED3DCLEAR_ZBUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_WINED3DCLEAR_STENCIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	orl	%ecx, %edx
	testl	%edx, 24(%rbp)
	je	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %rdx
	cmpq	$0, 16(%rdx)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	andl	24(%rbp), %ecx
	je	LBB0_15
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 8(%rdx)
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	andl	24(%rbp), %eax
	je	LBB0_15
	jmp	LBB0_16
LBB0_18:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Clearing %#x on %s.\n"

	.no_dead_strip	_cpu_blitter_clear
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpu_blitter_clear
_cpu_blitter_clear:                     ; @cpu_blitter_clear
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x20, x6
	mov	x21, x3
	mov	x26, #0
	ldr	x23, [x29, #16]
	str	s0, [sp, #64]
	str	xzr, [sp, #72]
	str	wzr, [sp, #68]
	cmp	w4, #0
	csel	x27, x6, x5, eq
	csinc	w28, w4, wzr, ne
	str	w2, [sp, #12]                   ; 4-byte Folded Spill
	mov	w8, w2
	lsl	x24, x8, #3
	mov	w22, #1
	b	LBB0_4
LBB0_1:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x9]
	bl	_debug_d3dformat
	mov	x2, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_FIXME
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x1, sp, #16
	add	x2, sp, #64
	mov	x0, x25
	bl	_surface_cpu_blt_colour_fill
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x26, #1
	cmp	x26, x28
	b.eq	LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	add	x25, x27, x26, lsl #4
	ldr	w0, [x25, #12]
	ldr	w1, [x20, #12]
	bl	_max
	str	x0, [sp, #16]
	ldr	w0, [x25, #8]
	ldr	w1, [x20, #8]
	bl	_max
	str	x0, [sp, #24]
	ldr	w0, [x25, #4]
	ldr	w1, [x20, #4]
	bl	_min
	str	x0, [sp, #32]
	ldr	w0, [x25]
	ldr	w1, [x20]
	bl	_min
	str	x0, [sp, #40]
	str	xzr, [sp, #56]
	str	w22, [sp, #48]
	ldr	x8, [sp, #16]
	ldr	x9, [sp, #32]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #24]
	cmp	x8, x0
	b.ge	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh2:
	adrp	x8, _WINED3DCLEAR_TARGET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WINED3DCLEAR_TARGET@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w8, w8, w19
	cmp	w8, #0
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	ccmp	w8, #0, #4, ne
	b.ne	LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh5:
	adrp	x8, _WINED3DCLEAR_ZBUFFER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WINED3DCLEAR_ZBUFFER@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x8]
Lloh8:
	adrp	x8, _WINED3DCLEAR_STENCIL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WINED3DCLEAR_STENCIL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w9, w8, w10
	tst	w9, w19
	b.eq	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x25, [x21]
	cbz	x25, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x25]
	ldr	x11, [x9, #16]
	and	w10, w10, w19
	cmp	x11, #0
	ccmp	w10, #0, #0, ne
	b.eq	LBB0_1
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x9, #8]
	and	w8, w8, w19
	cmp	x10, #0
	ccmp	w8, #0, #0, ne
	b.eq	LBB0_1
	b	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, #0
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=2
	add	x25, x25, #8
	cmp	x24, x25
	b.eq	LBB0_7
LBB0_13:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x21, #8]
	ldr	x0, [x8, x25]
	cbz	x0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	add	x1, sp, #16
	mov	x2, x23
	bl	_surface_cpu_blt_colour_fill
	b	LBB0_12
LBB0_15:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Clearing %#x on %s.\n"

	.no_dead_strip	_cpu_blitter_clear
.subsections_via_symbols
