	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function savage_dispatch_clear
_savage_dispatch_clear:                 ## @savage_dispatch_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.1:
	movq	%r8, %rbx
	movl	%ecx, %r12d
	movq	%rdx, %r15
	movq	_BCI_CMD_RECT@GOTPCREL(%rip), %rax
	movq	_BCI_CMD_RECT_XP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_BCI_CMD_RECT_YP@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_BCI_CMD_SEND_COLOR@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movl	8(%rsi), %r13d
	movq	_BCI_CMD_DEST_PBD_NEW@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	movl	$204, %esi
	callq	_BCI_CMD_SET_ROP
	xorl	%eax, %eax
	testb	$-126, %r13b
	setne	%al
	xorl	%r14d, %r14d
	testb	$-127, %r13b
	setne	%r14b
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	btl	$7, %r13d
	adcl	%eax, %r14d
	je	LBB0_10
## %bb.2:
	cmpl	$-1, (%r15)
	je	LBB0_4
## %bb.3:
	movl	$2, %edi
	callq	_BEGIN_DMA
	movq	_SAVAGE_BITPLANEWTMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_DMA_SET_REGISTERS
	movl	(%r15), %edi
	callq	_DMA_WRITE
	xorl	%eax, %eax
	callq	_DMA_COMMIT
LBB0_4:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	addl	%r14d, %r14d
	leal	(%r14,%r14,2), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%r12d, %r15d
	addq	$12, %rbx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_DMA_COMMIT
	addq	$16, %rbx
	decq	%r15
	je	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-12(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	-8(%rbx), %r12d
	movl	-4(%rbx), %r13d
	movl	(%rbx), %r14d
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_BEGIN_DMA
	testb	$-128, -60(%rbp)                ## 1-byte Folded Reload
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	subl	%r12d, %r14d
	movl	%r13d, %r12d
	subl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_DMA_WRITE
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %edi
	callq	_DMA_WRITE
	movl	4(%r13), %edi
	callq	_DMA_WRITE
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	callq	_DMA_WRITE
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_BCI_X_Y
	movl	%eax, %edi
	callq	_DMA_WRITE
	movl	%r12d, %edi
	movl	%r14d, %esi
	callq	_BCI_W_H
	movl	%eax, %edi
	callq	_DMA_WRITE
	jmp	LBB0_7
LBB0_8:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	$-1, (%rax)
	je	LBB0_10
## %bb.9:
	movl	$2, %edi
	callq	_BEGIN_DMA
	movq	_SAVAGE_BITPLANEWTMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_DMA_SET_REGISTERS
	movl	$-1, %edi
	callq	_DMA_WRITE
	xorl	%eax, %eax
	callq	_DMA_COMMIT
LBB0_10:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_LOCALS,4,2                 ## @DMA_LOCALS
	.comm	_BCI_CMD_RECT,4,2               ## @BCI_CMD_RECT
	.comm	_BCI_CMD_RECT_XP,4,2            ## @BCI_CMD_RECT_XP
	.comm	_BCI_CMD_RECT_YP,4,2            ## @BCI_CMD_RECT_YP
	.comm	_BCI_CMD_SEND_COLOR,4,2         ## @BCI_CMD_SEND_COLOR
	.comm	_BCI_CMD_DEST_PBD_NEW,4,2       ## @BCI_CMD_DEST_PBD_NEW
	.comm	_SAVAGE_BITPLANEWTMASK,4,2      ## @SAVAGE_BITPLANEWTMASK
	.no_dead_strip	_savage_dispatch_clear
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function savage_dispatch_clear
_savage_dispatch_clear:                 ; @savage_dispatch_clear
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	cbz	w3, LBB0_10
; %bb.1:
	mov	x23, x4
	mov	x24, x3
	mov	x22, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _BCI_CMD_RECT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BCI_CMD_RECT@GOTPAGEOFF]
	ldr	w27, [x1, #8]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _BCI_CMD_RECT_XP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BCI_CMD_RECT_XP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _BCI_CMD_RECT_YP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BCI_CMD_RECT_YP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _BCI_CMD_SEND_COLOR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BCI_CMD_SEND_COLOR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _BCI_CMD_DEST_PBD_NEW@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BCI_CMD_DEST_PBD_NEW@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w0, w8, w9
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	mov	w1, #204
	bl	_BCI_CMD_SET_ROP
	ubfx	w8, w27, #7, #1
	mov	w9, #130
	tst	w27, w9
	cinc	w8, w8, ne
	mov	w9, #129
	tst	w27, w9
	cinc	w19, w8, ne
	cbz	w19, LBB0_10
; %bb.2:
	ldr	w8, [x22]
Lloh15:
	adrp	x21, _SAVAGE_BITPLANEWTMASK@GOTPAGE
Lloh16:
	ldr	x21, [x21, _SAVAGE_BITPLANEWTMASK@GOTPAGEOFF]
	cmn	w8, #1
	b.eq	LBB0_4
; %bb.3:
	mov	w0, #2
	bl	_BEGIN_DMA
	ldr	w0, [x21]
	mov	w1, #1
	bl	_DMA_SET_REGISTERS
	ldr	w0, [x22]
	bl	_DMA_WRITE
	bl	_DMA_COMMIT
LBB0_4:
	mov	x21, x22
	add	w8, w19, w19, lsl #1
	lsl	w22, w8, #1
	mov	w28, w24
	add	x19, x23, #8
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	bl	_DMA_COMMIT
	add	x19, x19, #16
	subs	x28, x28, #1
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w23, w24, [x19, #-8]
	ldp	w26, w25, [x19]
	mov	x0, x22
	bl	_BEGIN_DMA
	tbz	w27, #7, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	w25, w25, w24
	sub	w26, w26, w23
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
	bl	_DMA_WRITE
	ldr	w0, [x20]
	bl	_DMA_WRITE
	ldr	w0, [x20, #4]
	bl	_DMA_WRITE
	ldr	w0, [x21, #4]
	bl	_DMA_WRITE
	mov	x0, x23
	mov	x1, x24
	bl	_BCI_X_Y
	bl	_DMA_WRITE
	mov	x0, x26
	mov	x1, x25
	bl	_BCI_W_H
	bl	_DMA_WRITE
	b	LBB0_5
LBB0_8:
	ldr	w8, [x21]
	cmn	w8, #1
	b.eq	LBB0_10
; %bb.9:
	mov	w0, #2
	bl	_BEGIN_DMA
Lloh17:
	adrp	x8, _SAVAGE_BITPLANEWTMASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SAVAGE_BITPLANEWTMASK@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_DMA_SET_REGISTERS
	mov	w0, #-1
	bl	_DMA_WRITE
	bl	_DMA_COMMIT
LBB0_10:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_LOCALS,4,2                 ; @DMA_LOCALS
	.comm	_BCI_CMD_RECT,4,2               ; @BCI_CMD_RECT
	.comm	_BCI_CMD_RECT_XP,4,2            ; @BCI_CMD_RECT_XP
	.comm	_BCI_CMD_RECT_YP,4,2            ; @BCI_CMD_RECT_YP
	.comm	_BCI_CMD_SEND_COLOR,4,2         ; @BCI_CMD_SEND_COLOR
	.comm	_BCI_CMD_DEST_PBD_NEW,4,2       ; @BCI_CMD_DEST_PBD_NEW
	.comm	_SAVAGE_BITPLANEWTMASK,4,2      ; @SAVAGE_BITPLANEWTMASK
	.no_dead_strip	_savage_dispatch_clear
.subsections_via_symbols
