	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mh_opt_sh2cycles
_mh_opt_sh2cycles:                      ## @mh_opt_sh2cycles
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_MA_32XOPT_MSH2_CYCLES@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	%edi, (%rcx)
	setne	%al
	shlq	$2, %rax
	movq	_PBTN_LEFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_PBTN_RIGHT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	testl	%esi, %edx
	je	LBB0_2
## %bb.1:
	testl	%esi, %ecx
	movl	$50, %ecx
	movl	$-50, %edx
	cmovel	%ecx, %edx
	movq	_currentConfig@GOTPCREL(%rip), %rcx
	addl	%edx, (%rcx,%rax)
LBB0_2:
	movq	_PBTN_L@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_PBTN_R@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	testl	%esi, %edx
	je	LBB0_4
## %bb.3:
	testl	%esi, %ecx
	movl	$500, %edx                      ## imm = 0x1F4
	movl	$-500, %ecx                     ## imm = 0xFE0C
	cmovel	%edx, %ecx
	movq	_currentConfig@GOTPCREL(%rip), %rdx
	addl	(%rdx,%rax), %ecx
	movl	%ecx, (%rdx,%rax)
	testl	%ecx, %ecx
	jle	LBB0_6
LBB0_7:
	movl	$2147483, %edx                  ## imm = 0x20C49B
	cmpl	$2147484, %ecx                  ## imm = 0x20C49C
	jae	LBB0_8
	jmp	LBB0_9
LBB0_4:
	movq	_currentConfig@GOTPCREL(%rip), %rcx
	movl	(%rcx,%rax), %ecx
	testl	%ecx, %ecx
	jg	LBB0_7
LBB0_6:
	movl	$1, %edx
LBB0_8:
	movq	_currentConfig@GOTPCREL(%rip), %rcx
	movl	%edx, (%rcx,%rax)
LBB0_9:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MA_32XOPT_MSH2_CYCLES,4,2      ## @MA_32XOPT_MSH2_CYCLES
	.comm	_currentConfig,8,2              ## @currentConfig
	.comm	_PBTN_LEFT,4,2                  ## @PBTN_LEFT
	.comm	_PBTN_RIGHT,4,2                 ## @PBTN_RIGHT
	.comm	_PBTN_L,4,2                     ## @PBTN_L
	.comm	_PBTN_R,4,2                     ## @PBTN_R
	.no_dead_strip	_mh_opt_sh2cycles
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mh_opt_sh2cycles
_mh_opt_sh2cycles:                      ; @mh_opt_sh2cycles
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _MA_32XOPT_MSH2_CYCLES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_32XOPT_MSH2_CYCLES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	cset	w8, ne
	lsl	x8, x8, #2
Lloh3:
	adrp	x9, _PBTN_LEFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PBTN_LEFT@GOTPAGEOFF]
Lloh5:
	adrp	x11, _PBTN_RIGHT@GOTPAGE
Lloh6:
	ldr	x11, [x11, _PBTN_RIGHT@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x9]
Lloh8:
	ldr	w9, [x11]
	orr	w11, w9, w10
Lloh9:
	adrp	x9, _currentConfig@GOTPAGE
Lloh10:
	ldr	x9, [x9, _currentConfig@GOTPAGEOFF]
	tst	w11, w1
	b.eq	LBB0_2
; %bb.1:
	tst	w10, w1
	mov	w10, #50
	cneg	w10, w10, ne
	ldr	w11, [x9, x8]
	add	w10, w11, w10
	str	w10, [x9, x8]
LBB0_2:
Lloh11:
	adrp	x10, _PBTN_L@GOTPAGE
Lloh12:
	ldr	x10, [x10, _PBTN_L@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	adrp	x11, _PBTN_R@GOTPAGE
Lloh15:
	ldr	x11, [x11, _PBTN_R@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
	orr	w11, w11, w10
	tst	w11, w1
	b.eq	LBB0_6
; %bb.3:
	tst	w10, w1
	mov	w10, #500
	cneg	w10, w10, ne
	ldr	w11, [x9, x8]
	add	w10, w11, w10
	str	w10, [x9, x8]
	cmp	w10, #1
	b.lt	LBB0_7
LBB0_4:
	mov	w11, #50331
	movk	w11, #32, lsl #16
	cmp	w10, w11
	b.hi	LBB0_8
; %bb.5:
	mov	w0, #0
	ret
LBB0_6:
	ldr	w10, [x9, x8]
	cmp	w10, #1
	b.ge	LBB0_4
LBB0_7:
	mov	w11, #1
LBB0_8:
	str	w11, [x9, x8]
	mov	w0, #0
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MA_32XOPT_MSH2_CYCLES,4,2      ; @MA_32XOPT_MSH2_CYCLES
	.comm	_currentConfig,8,2              ; @currentConfig
	.comm	_PBTN_LEFT,4,2                  ; @PBTN_LEFT
	.comm	_PBTN_RIGHT,4,2                 ; @PBTN_RIGHT
	.comm	_PBTN_L,4,2                     ; @PBTN_L
	.comm	_PBTN_R,4,2                     ; @PBTN_R
	.no_dead_strip	_mh_opt_sh2cycles
.subsections_via_symbols
