	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pemu_validate_config           ## -- Begin function pemu_validate_config
	.p2align	4, 0x90
_pemu_validate_config:                  ## @pemu_validate_config
	.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_dev_id@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_GP2X_DEV_GP2X@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_POPT_EXT_FM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	movq	_PicoOpt@GOTPCREL(%rip), %rdx
	andl	%ecx, (%rdx)
LBB0_2:
	movq	_GP2X_DEV_WIZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	_EOPT_WIZ_TEAR_FIX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	_currentConfig@GOTPCREL(%rip), %rcx
	andl	%eax, 8(%rcx)
LBB0_4:
	movq	_currentConfig@GOTPCREL(%rip), %rax
	movl	$-301, %ecx                     ## imm = 0xFED3
	addl	(%rax), %ecx
	cmpl	$-292, %ecx                     ## imm = 0xFEDC
	ja	LBB0_6
## %bb.5:
	movl	$100, (%rax)
LBB0_6:
	movl	$-1025, %ecx                    ## imm = 0xFBFF
	addl	4(%rax), %ecx
	cmpl	$-1016, %ecx                    ## imm = 0xFC08
	ja	LBB0_8
## %bb.7:
	movq	_default_cpu_clock@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
LBB0_8:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gp2x_dev_id,8,3                ## @gp2x_dev_id
	.comm	_GP2X_DEV_GP2X,8,3              ## @GP2X_DEV_GP2X
	.comm	_POPT_EXT_FM,4,2                ## @POPT_EXT_FM
	.comm	_PicoOpt,4,2                    ## @PicoOpt
	.comm	_GP2X_DEV_WIZ,8,3               ## @GP2X_DEV_WIZ
	.comm	_EOPT_WIZ_TEAR_FIX,4,2          ## @EOPT_WIZ_TEAR_FIX
	.comm	_currentConfig,12,2             ## @currentConfig
	.comm	_default_cpu_clock,4,2          ## @default_cpu_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pemu_validate_config           ; -- Begin function pemu_validate_config
	.p2align	2
_pemu_validate_config:                  ; @pemu_validate_config
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _gp2x_dev_id@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gp2x_dev_id@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
Lloh3:
	adrp	x8, _GP2X_DEV_GP2X@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GP2X_DEV_GP2X@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _POPT_EXT_FM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _POPT_EXT_FM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x10, _PicoOpt@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PicoOpt@GOTPAGEOFF]
	ldr	w11, [x10]
	bic	w8, w11, w8
	str	w8, [x10]
LBB0_2:
Lloh11:
	adrp	x8, _GP2X_DEV_WIZ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GP2X_DEV_WIZ@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x8]
Lloh14:
	adrp	x8, _currentConfig@GOTPAGE
Lloh15:
	ldr	x8, [x8, _currentConfig@GOTPAGEOFF]
	cmp	x9, x10
	b.eq	LBB0_4
; %bb.3:
Lloh16:
	adrp	x9, _EOPT_WIZ_TEAR_FIX@GOTPAGE
Lloh17:
	ldr	x9, [x9, _EOPT_WIZ_TEAR_FIX@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	ldr	w10, [x8, #8]
	bic	w9, w10, w9
	str	w9, [x8, #8]
LBB0_4:
	ldr	w9, [x8]
	sub	w9, w9, #301
	cmn	w9, #292
	b.hi	LBB0_6
; %bb.5:
	mov	w9, #100
	str	w9, [x8]
LBB0_6:
	ldr	w9, [x8, #4]
	sub	w9, w9, #1025
	cmn	w9, #1016
	b.hi	LBB0_8
; %bb.7:
Lloh19:
	adrp	x9, _default_cpu_clock@GOTPAGE
Lloh20:
	ldr	x9, [x9, _default_cpu_clock@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	str	w9, [x8, #4]
LBB0_8:
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_gp2x_dev_id,8,3                ; @gp2x_dev_id
	.comm	_GP2X_DEV_GP2X,8,3              ; @GP2X_DEV_GP2X
	.comm	_POPT_EXT_FM,4,2                ; @POPT_EXT_FM
	.comm	_PicoOpt,4,2                    ; @PicoOpt
	.comm	_GP2X_DEV_WIZ,8,3               ; @GP2X_DEV_WIZ
	.comm	_EOPT_WIZ_TEAR_FIX,4,2          ; @EOPT_WIZ_TEAR_FIX
	.comm	_currentConfig,12,2             ; @currentConfig
	.comm	_default_cpu_clock,4,2          ; @default_cpu_clock
.subsections_via_symbols
