	.file	"extr_savage_state.c_savage_emit_clip_rect_s4.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	savage_emit_clip_rect_s4
	.type	savage_emit_clip_rect_s4, @function
savage_emit_clip_rect_s4:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	eax, DWORD PTR SAVAGE_SCISSOR_MASK_S4[rip]
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ecx, DWORD PTR 8[rsi]
	not	eax
	mov	ebp, DWORD PTR 4[rdi]
	mov	edx, DWORD PTR 24[rsi]
	lea	ebx, -1[rcx]
	and	ebp, eax
	and	ebx, 2047
	and	eax, DWORD PTR 8[rdi]
	and	edx, 2047
	or	eax, ebx
	mov	rbx, QWORD PTR [rsi]
	or	edx, ebp
	mov	ebp, DWORD PTR 16[rsi]
	sub	ebx, 1
	sal	ebp, 12
	sal	ebx, 12
	and	ebp, 16773120
	and	ebx, 16773120
	or	ebp, edx
	or	ebx, eax
	cmp	DWORD PTR 12[rdi], ebp
	jne	.L2
	cmp	DWORD PTR 16[rdi], ebx
	je	.L1
.L2:
	mov	edi, 4
	call	BEGIN_DMA@PLT
	mov	edi, DWORD PTR BCI_CMD_WAIT[rip]
	or	edi, DWORD PTR BCI_CMD_WAIT_3D[rip]
	call	DMA_WRITE@PLT
	mov	edi, DWORD PTR SAVAGE_DRAWCTRL0_S4[rip]
	mov	esi, 2
	call	DMA_SET_REGISTERS@PLT
	mov	edi, ebp
	call	DMA_WRITE@PLT
	mov	edi, ebx
	call	DMA_WRITE@PLT
	mov	DWORD PTR 12[r12], ebp
	xor	eax, eax
	mov	DWORD PTR 16[r12], ebx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	DWORD PTR [r12], 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	DMA_COMMIT@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	savage_emit_clip_rect_s4, .-savage_emit_clip_rect_s4
	.comm	SAVAGE_SCISSOR_MASK_S4,4,4
	.comm	SAVAGE_DRAWCTRL0_S4,4,4
	.comm	DMA_LOCALS,4,4
	.comm	BCI_CMD_WAIT_3D,4,4
	.comm	BCI_CMD_WAIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_savage_state.c_savage_emit_clip_rect_s4.c"
	.text
	.align	2
	.global	savage_emit_clip_rect_s4
	.syntax unified
	.arm
	.fpu softvfp
	.type	savage_emit_clip_rect_s4, %function
savage_emit_clip_rect_s4:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r0, .L6
	ldr	r2, [r1, #8]
	ldr	ip, [r0]
	ldr	r3, .L6+4
	ldr	r0, .L6+8
	ldr	r6, [r1, #12]
	ldr	lr, [r4, #4]
	ldm	r1, {r1, r5}
	sub	r5, r5, #1
	and	r2, r3, r2, lsl #12
	bic	lr, lr, ip
	and	r6, r6, r0
	and	r5, r5, r0
	ldr	r0, [r4, #8]
	orr	r2, r2, lr
	ldr	lr, [r4, #12]
	orr	r6, r6, r2
	sub	r2, r1, #1
	bic	r1, r0, ip
	orr	r5, r5, r1
	and	r3, r3, r2, lsl #12
	cmp	lr, r6
	orr	r5, r3, r5
	bne	.L2
	ldr	r3, [r4, #16]
	cmp	r3, r5
	popeq	{r4, r5, r6, pc}
.L2:
	mov	r0, #4
	bl	BEGIN_DMA
	ldr	r2, .L6+12
	ldr	r3, .L6+16
	ldr	r0, [r2]
	ldr	r3, [r3]
	orr	r0, r0, r3
	bl	DMA_WRITE
	ldr	r3, .L6+20
	mov	r1, #2
	ldr	r0, [r3]
	bl	DMA_SET_REGISTERS
	mov	r0, r6
	bl	DMA_WRITE
	mov	r0, r5
	bl	DMA_WRITE
	mov	r3, #1
	str	r6, [r4, #12]
	str	r5, [r4, #16]
	str	r3, [r4]
	pop	{r4, r5, r6, lr}
	b	DMA_COMMIT
.L7:
	.align	2
.L6:
	.word	SAVAGE_SCISSOR_MASK_S4
	.word	16773120
	.word	2047
	.word	BCI_CMD_WAIT
	.word	BCI_CMD_WAIT_3D
	.word	SAVAGE_DRAWCTRL0_S4
	.size	savage_emit_clip_rect_s4, .-savage_emit_clip_rect_s4
	.comm	SAVAGE_SCISSOR_MASK_S4,4,4
	.comm	SAVAGE_DRAWCTRL0_S4,4,4
	.comm	DMA_LOCALS,4,4
	.comm	BCI_CMD_WAIT_3D,4,4
	.comm	BCI_CMD_WAIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
