	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mga_emit_clip_rect
_mga_emit_clip_rect:                    ## @mga_emit_clip_rect
	.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, %rbx
	movq	16(%rdi), %r12
	movl	(%rdi), %r15d
	movl	$2, %edi
	callq	_BEGIN_DMA
	movq	8(%rbx), %rax
	movq	_MGA_CARD_TYPE_G400@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_2
## %bb.1:
	movq	_MGA_DWGCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	movq	_MGA_LEN@GOTPCREL(%rip), %rax
	movq	_MGA_EXEC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	addq	(%rax), %rdx
	movl	$-2147483648, %ecx              ## imm = 0x80000000
	movl	%edi, %r8d
	movl	%esi, %r9d
	pushq	$-2147483648                    ## imm = 0x80000000
	pushq	%rdx
	callq	_DMA_BLOCK
	addq	$16, %rsp
LBB0_2:
	movq	_MGA_DMAPAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MGA_CXBNDRY@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	(%r14), %ecx
	shll	$16, %ecx
	addl	$-65536, %ecx                   ## imm = 0xFFFF0000
	orl	4(%r14), %ecx
	movl	12(%r14), %eax
	movq	_MGA_YTOP@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	movl	8(%r14), %r9d
	imull	%r15d, %r9d
	movq	_MGA_YBOT@GOTPCREL(%rip), %rbx
	decl	%eax
	imull	%r15d, %eax
	xorl	%esi, %esi
	pushq	%rax
	pushq	(%rbx)
	callq	_DMA_BLOCK
	addq	$16, %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ADVANCE_DMA                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_LOCALS,4,2                 ## @DMA_LOCALS
	.comm	_MGA_CARD_TYPE_G400,8,3         ## @MGA_CARD_TYPE_G400
	.comm	_MGA_DWGCTL,4,2                 ## @MGA_DWGCTL
	.comm	_MGA_LEN,8,3                    ## @MGA_LEN
	.comm	_MGA_EXEC,8,3                   ## @MGA_EXEC
	.comm	_MGA_DMAPAD,4,2                 ## @MGA_DMAPAD
	.comm	_MGA_CXBNDRY,8,3                ## @MGA_CXBNDRY
	.comm	_MGA_YTOP,4,2                   ## @MGA_YTOP
	.comm	_MGA_YBOT,8,3                   ## @MGA_YBOT
	.no_dead_strip	_mga_emit_clip_rect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mga_emit_clip_rect
_mga_emit_clip_rect:                    ; @mga_emit_clip_rect
	.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, x1
	mov	x20, x0
	ldr	x22, [x0, #16]
	ldr	w21, [x0]
	mov	w0, #2
	bl	_BEGIN_DMA
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _MGA_CARD_TYPE_G400@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MGA_CARD_TYPE_G400@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MGA_DWGCTL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MGA_DWGCTL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _MGA_LEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MGA_LEN@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _MGA_EXEC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MGA_EXEC@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x2, x9, x8
	mov	w3, #-2147483648
	mov	x4, x0
	mov	x5, x1
	mov	x6, x2
	mov	w7, #-2147483648
	bl	_DMA_BLOCK
LBB0_2:
Lloh12:
	adrp	x8, _MGA_DMAPAD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MGA_DMAPAD@GOTPAGEOFF]
Lloh14:
	adrp	x9, _MGA_CXBNDRY@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MGA_CXBNDRY@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	ldr	x2, [x9]
	ldp	w8, w9, [x19]
	lsl	w8, w8, #16
	sub	w8, w8, #16, lsl #12            ; =65536
	orr	w3, w8, w9
Lloh18:
	adrp	x8, _MGA_YTOP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MGA_YTOP@GOTPAGEOFF]
Lloh20:
	ldr	w4, [x8]
	ldp	w8, w9, [x19, #8]
	mul	w5, w8, w21
Lloh21:
	adrp	x8, _MGA_YBOT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MGA_YBOT@GOTPAGEOFF]
Lloh23:
	ldr	x6, [x8]
	sub	w8, w9, #1
	mul	w7, w8, w21
	mov	w1, #0
	bl	_DMA_BLOCK
	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	_ADVANCE_DMA
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_LOCALS,4,2                 ; @DMA_LOCALS
	.comm	_MGA_CARD_TYPE_G400,8,3         ; @MGA_CARD_TYPE_G400
	.comm	_MGA_DWGCTL,4,2                 ; @MGA_DWGCTL
	.comm	_MGA_LEN,8,3                    ; @MGA_LEN
	.comm	_MGA_EXEC,8,3                   ; @MGA_EXEC
	.comm	_MGA_DMAPAD,4,2                 ; @MGA_DMAPAD
	.comm	_MGA_CXBNDRY,8,3                ; @MGA_CXBNDRY
	.comm	_MGA_YTOP,4,2                   ; @MGA_YTOP
	.comm	_MGA_YBOT,8,3                   ; @MGA_YBOT
	.no_dead_strip	_mga_emit_clip_rect
.subsections_via_symbols
