	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vita2d_set_clip_rectangle      ## -- Begin function vita2d_set_clip_rectangle
	.p2align	4, 0x90
_vita2d_set_clip_rectangle:             ## @vita2d_set_clip_rectangle
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_clip_rect_x_min@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	movq	_clip_rect_y_min@GOTPCREL(%rip), %rax
	movl	%esi, (%rax)
	movq	_clip_rect_x_max@GOTPCREL(%rip), %rax
	movl	%edx, (%rax)
	movq	_clip_rect_y_max@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movq	_drawing@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.1:
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movl	%esi, %r15d
	movl	%edi, %r12d
	movq	__vita2d_context@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_SCE_GXM_STENCIL_FUNC_NEVER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SCE_GXM_STENCIL_OP_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$255, (%rsp)
	movl	%ecx, %edx
	movl	%ecx, %r8d
	movl	$255, %r9d
	callq	_sceGxmSetFrontStencilFunc
	movq	_DISPLAY_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DISPLAY_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	callq	_vita2d_draw_rectangle
	movl	(%r13), %edi
	movq	_SCE_GXM_STENCIL_FUNC_NEVER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SCE_GXM_STENCIL_OP_REPLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$255, (%rsp)
	movl	%ecx, %edx
	movl	%ecx, %r8d
	movl	$255, %r9d
	callq	_sceGxmSetFrontStencilFunc
	subl	%r12d, %ebx
	subl	%r15d, %r14d
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	callq	_vita2d_draw_rectangle
	movq	_clipping_enabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	(%r13), %edi
	je	LBB0_5
## %bb.2:
	movq	_SCE_GXM_STENCIL_FUNC_EQUAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_SCE_GXM_STENCIL_FUNC_ALWAYS@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	movq	_SCE_GXM_STENCIL_OP_KEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$255, (%rsp)
	movl	%ecx, %edx
	movl	%ecx, %r8d
	movl	$255, %r9d
	callq	_sceGxmSetFrontStencilFunc
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_clip_rect_x_min,4,2            ## @clip_rect_x_min
	.comm	_clip_rect_y_min,4,2            ## @clip_rect_y_min
	.comm	_clip_rect_x_max,4,2            ## @clip_rect_x_max
	.comm	_clip_rect_y_max,4,2            ## @clip_rect_y_max
	.comm	_drawing,8,3                    ## @drawing
	.comm	__vita2d_context,4,2            ## @_vita2d_context
	.comm	_SCE_GXM_STENCIL_FUNC_NEVER,4,2 ## @SCE_GXM_STENCIL_FUNC_NEVER
	.comm	_SCE_GXM_STENCIL_OP_ZERO,4,2    ## @SCE_GXM_STENCIL_OP_ZERO
	.comm	_DISPLAY_WIDTH,4,2              ## @DISPLAY_WIDTH
	.comm	_DISPLAY_HEIGHT,4,2             ## @DISPLAY_HEIGHT
	.comm	_SCE_GXM_STENCIL_OP_REPLACE,4,2 ## @SCE_GXM_STENCIL_OP_REPLACE
	.comm	_clipping_enabled,8,3           ## @clipping_enabled
	.comm	_SCE_GXM_STENCIL_FUNC_EQUAL,4,2 ## @SCE_GXM_STENCIL_FUNC_EQUAL
	.comm	_SCE_GXM_STENCIL_OP_KEEP,4,2    ## @SCE_GXM_STENCIL_OP_KEEP
	.comm	_SCE_GXM_STENCIL_FUNC_ALWAYS,4,2 ## @SCE_GXM_STENCIL_FUNC_ALWAYS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vita2d_set_clip_rectangle      ; -- Begin function vita2d_set_clip_rectangle
	.p2align	2
_vita2d_set_clip_rectangle:             ; @vita2d_set_clip_rectangle
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _clip_rect_x_min@GOTPAGE
Lloh1:
	ldr	x8, [x8, _clip_rect_x_min@GOTPAGEOFF]
Lloh2:
	str	w0, [x8]
Lloh3:
	adrp	x8, _clip_rect_y_min@GOTPAGE
Lloh4:
	ldr	x8, [x8, _clip_rect_y_min@GOTPAGEOFF]
Lloh5:
	str	w1, [x8]
Lloh6:
	adrp	x8, _clip_rect_x_max@GOTPAGE
Lloh7:
	ldr	x8, [x8, _clip_rect_x_max@GOTPAGEOFF]
Lloh8:
	str	w2, [x8]
Lloh9:
	adrp	x8, _clip_rect_y_max@GOTPAGE
Lloh10:
	ldr	x8, [x8, _clip_rect_y_max@GOTPAGEOFF]
Lloh11:
	str	w3, [x8]
Lloh12:
	adrp	x8, _drawing@GOTPAGE
Lloh13:
	ldr	x8, [x8, _drawing@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x20, x3
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
Lloh15:
	adrp	x23, __vita2d_context@GOTPAGE
Lloh16:
	ldr	x23, [x23, __vita2d_context@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh17:
	adrp	x24, _SCE_GXM_STENCIL_FUNC_NEVER@GOTPAGE
Lloh18:
	ldr	x24, [x24, _SCE_GXM_STENCIL_FUNC_NEVER@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh19:
	adrp	x8, _SCE_GXM_STENCIL_OP_ZERO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SCE_GXM_STENCIL_OP_ZERO@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x3, x2
	mov	x4, x2
	mov	w5, #255
	mov	w6, #255
	bl	_sceGxmSetFrontStencilFunc
Lloh22:
	adrp	x8, _DISPLAY_WIDTH@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DISPLAY_WIDTH@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
Lloh25:
	adrp	x8, _DISPLAY_HEIGHT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DISPLAY_HEIGHT@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
	mov	w0, #0
	mov	w1, #0
	mov	w4, #0
	bl	_vita2d_draw_rectangle
	ldr	w0, [x23]
	ldr	w1, [x24]
Lloh28:
	adrp	x8, _SCE_GXM_STENCIL_OP_REPLACE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SCE_GXM_STENCIL_OP_REPLACE@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x3, x2
	mov	x4, x2
	mov	w5, #255
	mov	w6, #255
	bl	_sceGxmSetFrontStencilFunc
	sub	w2, w22, w21
	sub	w3, w20, w19
	mov	x0, x21
	mov	x1, x19
	mov	w4, #0
	bl	_vita2d_draw_rectangle
Lloh31:
	adrp	x8, _clipping_enabled@GOTPAGE
Lloh32:
	ldr	x8, [x8, _clipping_enabled@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	ldr	w0, [x23]
	cbz	x8, LBB0_4
; %bb.2:
Lloh34:
	adrp	x8, _SCE_GXM_STENCIL_FUNC_EQUAL@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SCE_GXM_STENCIL_FUNC_EQUAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh36:
	adrp	x8, _SCE_GXM_STENCIL_FUNC_ALWAYS@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SCE_GXM_STENCIL_FUNC_ALWAYS@GOTPAGEOFF]
LBB0_5:
	ldr	w1, [x8]
Lloh38:
	adrp	x8, _SCE_GXM_STENCIL_OP_KEEP@GOTPAGE
Lloh39:
	ldr	x8, [x8, _SCE_GXM_STENCIL_OP_KEEP@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
	mov	x3, x2
	mov	x4, x2
	mov	w5, #255
	mov	w6, #255
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_sceGxmSetFrontStencilFunc
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_clip_rect_x_min,4,2            ; @clip_rect_x_min
	.comm	_clip_rect_y_min,4,2            ; @clip_rect_y_min
	.comm	_clip_rect_x_max,4,2            ; @clip_rect_x_max
	.comm	_clip_rect_y_max,4,2            ; @clip_rect_y_max
	.comm	_drawing,8,3                    ; @drawing
	.comm	__vita2d_context,4,2            ; @_vita2d_context
	.comm	_SCE_GXM_STENCIL_FUNC_NEVER,4,2 ; @SCE_GXM_STENCIL_FUNC_NEVER
	.comm	_SCE_GXM_STENCIL_OP_ZERO,4,2    ; @SCE_GXM_STENCIL_OP_ZERO
	.comm	_DISPLAY_WIDTH,4,2              ; @DISPLAY_WIDTH
	.comm	_DISPLAY_HEIGHT,4,2             ; @DISPLAY_HEIGHT
	.comm	_SCE_GXM_STENCIL_OP_REPLACE,4,2 ; @SCE_GXM_STENCIL_OP_REPLACE
	.comm	_clipping_enabled,8,3           ; @clipping_enabled
	.comm	_SCE_GXM_STENCIL_FUNC_EQUAL,4,2 ; @SCE_GXM_STENCIL_FUNC_EQUAL
	.comm	_SCE_GXM_STENCIL_OP_KEEP,4,2    ; @SCE_GXM_STENCIL_OP_KEEP
	.comm	_SCE_GXM_STENCIL_FUNC_ALWAYS,4,2 ; @SCE_GXM_STENCIL_FUNC_ALWAYS
.subsections_via_symbols
