	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vita2d_start_drawing_advanced  ## -- Begin function vita2d_start_drawing_advanced
	.p2align	4, 0x90
_vita2d_start_drawing_advanced:         ## @vita2d_start_drawing_advanced
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdi, %rax
	movq	__vita2d_context@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	8(%rax), %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rax
	addq	$4, %rax
	jmp	LBB0_3
LBB0_1:
	movq	_renderTarget@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_displayBufferSync@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	_backBufferIndex@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movq	(%r8,%rax,8), %r9
	movq	_displaySurface@GOTPCREL(%rip), %rcx
	shlq	$2, %rax
	addq	(%rcx), %rax
	movq	_depthSurface@GOTPCREL(%rip), %r10
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	%r10
LBB0_3:
	pushq	%rax
	callq	_sceGxmBeginScene
	addq	$16, %rsp
	movq	_drawing@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_clipping_enabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.5:
	movq	_clip_rect_x_min@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_clip_rect_y_min@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_clip_rect_x_max@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_clip_rect_y_max@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	popq	%rbp
	jmp	_vita2d_set_clip_rectangle      ## TAILCALL
LBB0_4:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__vita2d_context,4,2            ## @_vita2d_context
	.comm	_renderTarget,4,2               ## @renderTarget
	.comm	_displayBufferSync,8,3          ## @displayBufferSync
	.comm	_backBufferIndex,8,3            ## @backBufferIndex
	.comm	_displaySurface,8,3             ## @displaySurface
	.comm	_depthSurface,4,2               ## @depthSurface
	.comm	_drawing,4,2                    ## @drawing
	.comm	_clipping_enabled,8,3           ## @clipping_enabled
	.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
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vita2d_start_drawing_advanced  ; -- Begin function vita2d_start_drawing_advanced
	.p2align	2
_vita2d_start_drawing_advanced:         ; @vita2d_start_drawing_advanced
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x7, x0
Lloh0:
	adrp	x8, __vita2d_context@GOTPAGE
Lloh1:
	ldr	x8, [x8, __vita2d_context@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	cbz	x7, LBB0_2
; %bb.1:
	ldr	w2, [x7, #8]
	add	x6, x7, #4
	mov	x3, #0
	mov	x4, #0
	mov	x5, #0
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _renderTarget@GOTPAGE
Lloh4:
	ldr	x8, [x8, _renderTarget@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _displayBufferSync@GOTPAGE
Lloh7:
	ldr	x8, [x8, _displayBufferSync@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _backBufferIndex@GOTPAGE
Lloh10:
	ldr	x9, [x9, _backBufferIndex@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	x5, [x8, x9, lsl #3]
Lloh12:
	adrp	x8, _displaySurface@GOTPAGE
Lloh13:
	ldr	x8, [x8, _displaySurface@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	add	x6, x8, x9, lsl #2
Lloh15:
	adrp	x7, _depthSurface@GOTPAGE
Lloh16:
	ldr	x7, [x7, _depthSurface@GOTPAGEOFF]
	mov	x3, #0
	mov	x4, #0
LBB0_3:
	bl	_sceGxmBeginScene
Lloh17:
	adrp	x8, _drawing@GOTPAGE
Lloh18:
	ldr	x8, [x8, _drawing@GOTPAGEOFF]
	mov	w9, #1
Lloh19:
	str	w9, [x8]
Lloh20:
	adrp	x8, _clipping_enabled@GOTPAGE
Lloh21:
	ldr	x8, [x8, _clipping_enabled@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
Lloh23:
	adrp	x8, _clip_rect_x_min@GOTPAGE
Lloh24:
	ldr	x8, [x8, _clip_rect_x_min@GOTPAGEOFF]
Lloh25:
	adrp	x9, _clip_rect_y_min@GOTPAGE
Lloh26:
	ldr	x9, [x9, _clip_rect_y_min@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	ldr	w1, [x9]
Lloh29:
	adrp	x8, _clip_rect_x_max@GOTPAGE
Lloh30:
	ldr	x8, [x8, _clip_rect_x_max@GOTPAGEOFF]
Lloh31:
	adrp	x9, _clip_rect_y_max@GOTPAGE
Lloh32:
	ldr	x9, [x9, _clip_rect_y_max@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
Lloh34:
	ldr	w3, [x9]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_vita2d_set_clip_rectangle
LBB0_5:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh33
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	__vita2d_context,4,2            ; @_vita2d_context
	.comm	_renderTarget,4,2               ; @renderTarget
	.comm	_displayBufferSync,8,3          ; @displayBufferSync
	.comm	_backBufferIndex,8,3            ; @backBufferIndex
	.comm	_displaySurface,8,3             ; @displaySurface
	.comm	_depthSurface,4,2               ; @depthSurface
	.comm	_drawing,4,2                    ; @drawing
	.comm	_clipping_enabled,8,3           ; @clipping_enabled
	.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
.subsections_via_symbols
