	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_savage_emit_clip_rect_s3d      ## -- Begin function savage_emit_clip_rect_s3d
	.p2align	4, 0x90
_savage_emit_clip_rect_s3d:             ## @savage_emit_clip_rect_s3d
	.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
	movq	%rdi, %r14
	movq	_SAVAGE_SCISSOR_MASK_S3D@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movl	4(%rdi), %ecx
	andl	%eax, %ecx
	movl	$2047, %edx                     ## imm = 0x7FF
	andl	24(%rsi), %edx
	movl	16(%rsi), %r15d
	shll	$16, %r15d
	andl	$134152192, %r15d               ## imm = 0x7FF0000
	orl	%edx, %r15d
	andl	8(%rdi), %eax
	orl	%ecx, %r15d
	movl	(%rsi), %ebx
	movl	8(%rsi), %ecx
	decl	%ecx
	andl	$2047, %ecx                     ## imm = 0x7FF
	shll	$16, %ebx
	addl	$134152192, %ebx                ## imm = 0x7FF0000
	andl	$134152192, %ebx                ## imm = 0x7FF0000
	orl	%ecx, %ebx
	orl	%eax, %ebx
	cmpl	12(%rdi), %r15d
	jne	LBB0_3
## %bb.1:
	cmpl	16(%r14), %ebx
	jne	LBB0_3
## %bb.2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$4, %edi
	callq	_BEGIN_DMA
	movq	_BCI_CMD_WAIT@GOTPCREL(%rip), %rax
	movq	_BCI_CMD_WAIT_3D@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_DMA_WRITE
	movq	_SAVAGE_SCSTART_S3D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_DMA_SET_REGISTERS
	movl	%r15d, %edi
	callq	_DMA_WRITE
	movl	%ebx, %edi
	callq	_DMA_WRITE
	movl	%r15d, 12(%r14)
	movl	%ebx, 16(%r14)
	movl	$1, (%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DMA_COMMIT                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SAVAGE_SCISSOR_MASK_S3D,4,2    ## @SAVAGE_SCISSOR_MASK_S3D
	.comm	_DMA_LOCALS,4,2                 ## @DMA_LOCALS
	.comm	_BCI_CMD_WAIT,4,2               ## @BCI_CMD_WAIT
	.comm	_BCI_CMD_WAIT_3D,4,2            ## @BCI_CMD_WAIT_3D
	.comm	_SAVAGE_SCSTART_S3D,4,2         ## @SAVAGE_SCSTART_S3D
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_savage_emit_clip_rect_s3d      ; -- Begin function savage_emit_clip_rect_s3d
	.p2align	2
_savage_emit_clip_rect_s3d:             ; @savage_emit_clip_rect_s3d
	.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
	mov	x19, x0
	ldp	w8, w9, [x0, #4]
Lloh0:
	adrp	x10, _SAVAGE_SCISSOR_MASK_S3D@GOTPAGE
Lloh1:
	ldr	x10, [x10, _SAVAGE_SCISSOR_MASK_S3D@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	bic	w8, w8, w10
	ldr	w11, [x1, #24]
	and	w11, w11, #0x7ff
	orr	w8, w11, w8
	ldr	w11, [x1, #16]
	ubfiz	w11, w11, #16, #11
	orr	w20, w8, w11
	bic	w8, w9, w10
	ldr	w9, [x1, #8]
	sub	w9, w9, #1
	and	w9, w9, #0x7ff
	orr	w8, w9, w8
	ldr	w9, [x1]
	mov	w10, #134152192
	add	w9, w10, w9, lsl #16
	and	w9, w9, #0x7ff0000
	orr	w21, w8, w9
	ldr	w8, [x0, #12]
	cmp	w20, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x19, #16]
	cmp	w21, w8
	b.ne	LBB0_3
; %bb.2:
	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_3:
	mov	w0, #4
	bl	_BEGIN_DMA
Lloh3:
	adrp	x8, _BCI_CMD_WAIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BCI_CMD_WAIT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _BCI_CMD_WAIT_3D@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BCI_CMD_WAIT_3D@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_DMA_WRITE
Lloh9:
	adrp	x8, _SAVAGE_SCSTART_S3D@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SAVAGE_SCSTART_S3D@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	w1, #2
	bl	_DMA_SET_REGISTERS
	mov	x0, x20
	bl	_DMA_WRITE
	mov	x0, x21
	bl	_DMA_WRITE
	stp	w20, w21, [x19, #12]
	mov	w8, #1
	str	w8, [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	_DMA_COMMIT
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SAVAGE_SCISSOR_MASK_S3D,4,2    ; @SAVAGE_SCISSOR_MASK_S3D
	.comm	_DMA_LOCALS,4,2                 ; @DMA_LOCALS
	.comm	_BCI_CMD_WAIT,4,2               ; @BCI_CMD_WAIT
	.comm	_BCI_CMD_WAIT_3D,4,2            ; @BCI_CMD_WAIT_3D
	.comm	_SAVAGE_SCSTART_S3D,4,2         ; @SAVAGE_SCSTART_S3D
.subsections_via_symbols
