	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gp2x_video_flip_
_gp2x_video_flip_:                      ## @gp2x_video_flip_
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_gp2x_screenaddrs_use@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_screensel@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %esi
	andl	$3, %esi
	movl	(%rax,%rsi,4), %eax
	movl	%eax, %esi
	shrl	$16, %esi
	movq	_memregs@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movw	%si, 10512(%rdi)
	movw	%si, 10516(%rdi)
	movw	%ax, 10510(%rdi)
	movw	%ax, 10514(%rdi)
	movq	_gp2x_screens@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	incl	%edx
	movl	%edx, (%rcx)
	andl	$3, %edx
	movl	(%rax,%rdx,4), %eax
	movq	_g_screen_ptr@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gp2x_screenaddrs_use,8,3       ## @gp2x_screenaddrs_use
	.comm	_screensel,4,2                  ## @screensel
	.comm	_memregs,8,3                    ## @memregs
	.comm	_gp2x_screens,8,3               ## @gp2x_screens
	.comm	_g_screen_ptr,4,2               ## @g_screen_ptr
	.no_dead_strip	_gp2x_video_flip_
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gp2x_video_flip_
_gp2x_video_flip_:                      ; @gp2x_video_flip_
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _gp2x_screenaddrs_use@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gp2x_screenaddrs_use@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _screensel@GOTPAGE
Lloh4:
	ldr	x9, [x9, _screensel@GOTPAGEOFF]
	ldr	w10, [x9]
	and	x11, x10, #0x3
	ldr	w8, [x8, x11, lsl #2]
	lsr	w11, w8, #16
Lloh5:
	adrp	x12, _memregs@GOTPAGE
Lloh6:
	ldr	x12, [x12, _memregs@GOTPAGEOFF]
Lloh7:
	ldr	x12, [x12]
	mov	w13, #10510
	add	x12, x12, x13
	strh	w11, [x12, #2]
	strh	w11, [x12, #6]
	strh	w8, [x12]
	strh	w8, [x12, #4]
Lloh8:
	adrp	x8, _gp2x_screens@GOTPAGE
Lloh9:
	ldr	x8, [x8, _gp2x_screens@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	add	w10, w10, #1
	str	w10, [x9]
	and	w9, w10, #0x3
	ldr	w8, [x8, w9, uxtw #2]
Lloh11:
	adrp	x9, _g_screen_ptr@GOTPAGE
Lloh12:
	ldr	x9, [x9, _g_screen_ptr@GOTPAGEOFF]
Lloh13:
	str	w8, [x9]
	ret
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_gp2x_screenaddrs_use,8,3       ; @gp2x_screenaddrs_use
	.comm	_screensel,4,2                  ; @screensel
	.comm	_memregs,8,3                    ; @memregs
	.comm	_gp2x_screens,8,3               ; @gp2x_screens
	.comm	_g_screen_ptr,4,2               ; @g_screen_ptr
	.no_dead_strip	_gp2x_video_flip_
.subsections_via_symbols
