	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_plat_init                      ## -- Begin function plat_init
	.p2align	4, 0x90
_plat_init:                             ## @plat_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	xorl	%eax, %eax
	callq	_warm_init
	movq	_gp2x_dev_id@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$130, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_5
## %bb.3:
	xorl	%eax, %eax
	callq	_sharedmem940_init
	xorl	%eax, %eax
	callq	_vid_mmsp2_init
	jmp	LBB0_5
LBB0_4:
	xorl	%eax, %eax
	callq	_vid_pollux_init
LBB0_5:
	movq	_g_menuscreen_w@GOTPCREL(%rip), %rax
	movl	$320, (%rax)                    ## imm = 0x140
	movq	_g_menuscreen_h@GOTPCREL(%rip), %rax
	movl	$240, (%rax)
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$153600, %edx                   ## imm = 0x25800
	callq	_gp2x_memset_all_buffers
	movl	$1, %edi
	callq	_gp2x_make_fb_bufferable
	movq	_gp2x_screens@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%rax), %eax
	movq	_g_menubg_ptr@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_flip_after_sync@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	xorl	%eax, %eax
	callq	_gp2x_menu_init
	movq	_gp2x_evdev_pdata@GOTPCREL(%rip), %rdi
	callq	_in_evdev_init
	movq	_in_gp2x_defbinds@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_in_gp2x_init
	xorl	%eax, %eax
	callq	_in_probe
	xorl	%eax, %eax
	popq	%rbp
	jmp	_plat_target_setup_input        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_gp2x_dev_id,4,2                ## @gp2x_dev_id
	.comm	_g_menuscreen_w,4,2             ## @g_menuscreen_w
	.comm	_g_menuscreen_h,4,2             ## @g_menuscreen_h
	.comm	_gp2x_screens,8,3               ## @gp2x_screens
	.comm	_g_menubg_ptr,4,2               ## @g_menubg_ptr
	.comm	_flip_after_sync,4,2            ## @flip_after_sync
	.comm	_gp2x_evdev_pdata,4,2           ## @gp2x_evdev_pdata
	.comm	_in_gp2x_defbinds,4,2           ## @in_gp2x_defbinds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_plat_init                      ; -- Begin function plat_init
	.p2align	2
_plat_init:                             ; @plat_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_warm_init
Lloh0:
	adrp	x8, _gp2x_dev_id@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gp2x_dev_id@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #130
	b.eq	LBB0_4
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_5
; %bb.3:
	bl	_sharedmem940_init
	bl	_vid_mmsp2_init
	b	LBB0_5
LBB0_4:
	bl	_vid_pollux_init
LBB0_5:
Lloh3:
	adrp	x8, _g_menuscreen_w@GOTPAGE
Lloh4:
	ldr	x8, [x8, _g_menuscreen_w@GOTPAGEOFF]
	mov	w9, #320
Lloh5:
	str	w9, [x8]
Lloh6:
	adrp	x8, _g_menuscreen_h@GOTPAGE
Lloh7:
	ldr	x8, [x8, _g_menuscreen_h@GOTPAGEOFF]
	mov	w9, #240
Lloh8:
	str	w9, [x8]
	mov	w0, #0
	mov	w1, #0
	mov	w2, #22528
	movk	w2, #2, lsl #16
	bl	_gp2x_memset_all_buffers
	mov	w19, #1
	mov	w0, #1
	bl	_gp2x_make_fb_bufferable
Lloh9:
	adrp	x8, _gp2x_screens@GOTPAGE
Lloh10:
	ldr	x8, [x8, _gp2x_screens@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	w8, [x8, #8]
Lloh12:
	adrp	x9, _g_menubg_ptr@GOTPAGE
Lloh13:
	ldr	x9, [x9, _g_menubg_ptr@GOTPAGEOFF]
Lloh14:
	str	w8, [x9]
Lloh15:
	adrp	x8, _flip_after_sync@GOTPAGE
Lloh16:
	ldr	x8, [x8, _flip_after_sync@GOTPAGEOFF]
Lloh17:
	str	w19, [x8]
	bl	_gp2x_menu_init
Lloh18:
	adrp	x0, _gp2x_evdev_pdata@GOTPAGE
Lloh19:
	ldr	x0, [x0, _gp2x_evdev_pdata@GOTPAGEOFF]
	bl	_in_evdev_init
Lloh20:
	adrp	x8, _in_gp2x_defbinds@GOTPAGE
Lloh21:
	ldr	x8, [x8, _in_gp2x_defbinds@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_in_gp2x_init
	bl	_in_probe
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_plat_target_setup_input
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_gp2x_dev_id,4,2                ; @gp2x_dev_id
	.comm	_g_menuscreen_w,4,2             ; @g_menuscreen_w
	.comm	_g_menuscreen_h,4,2             ; @g_menuscreen_h
	.comm	_gp2x_screens,8,3               ; @gp2x_screens
	.comm	_g_menubg_ptr,4,2               ; @g_menubg_ptr
	.comm	_flip_after_sync,4,2            ; @flip_after_sync
	.comm	_gp2x_evdev_pdata,4,2           ; @gp2x_evdev_pdata
	.comm	_in_gp2x_defbinds,4,2           ; @in_gp2x_defbinds
.subsections_via_symbols
