	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function in_gp2x_get_wiz_bits
_in_gp2x_get_wiz_bits:                  ## @in_gp2x_get_wiz_bits
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movl	$0, -4(%rbp)
	movq	_gpiodev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-4(%rbp), %rsi
	movl	$4, %edx
	callq	_read
	movl	-4(%rbp), %eax
	movl	%eax, %ecx
	orl	$5, %ecx
	testb	$2, %al
	cmovel	%eax, %ecx
	movl	%ecx, %eax
	orl	$20, %eax
	testb	$8, %cl
	cmovel	%ecx, %eax
	movl	%eax, %ecx
	orl	$80, %ecx
	testb	$32, %al
	cmovel	%eax, %ecx
	movl	%ecx, %edx
	orl	$65, %edx
	testb	$-128, %cl
	cmovel	%ecx, %edx
	movl	%edx, %esi
	andl	$524117, %esi                   ## imm = 0x7FF55
	shll	$15, %edx
	movq	_GP2X_BTN_VOL_UP@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %edi
	shll	%cl, %edi
	sarl	$31, %edx
	movl	$1, %eax
	andl	%edx, %edi
	orl	%esi, %edi
	movl	%edi, %edx
	shll	$14, %edx
	sarl	$31, %edx
	movq	_GP2X_BTN_VOL_DOWN@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %esi
	shll	%cl, %esi
	andl	%edx, %esi
	orl	%edi, %esi
	movl	%esi, %edx
	shll	$13, %edx
	movq	_GP2X_BTN_PUSH@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	sarl	$31, %edx
	andl	%edx, %eax
	orl	%esi, %eax
	andl	$-458753, %eax                  ## imm = 0xFFF8FFFF
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gpiodev,4,2                    ## @gpiodev
	.comm	_GP2X_BTN_VOL_UP,4,2            ## @GP2X_BTN_VOL_UP
	.comm	_GP2X_BTN_VOL_DOWN,4,2          ## @GP2X_BTN_VOL_DOWN
	.comm	_GP2X_BTN_PUSH,4,2              ## @GP2X_BTN_PUSH
	.no_dead_strip	_in_gp2x_get_wiz_bits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function in_gp2x_get_wiz_bits
_in_gp2x_get_wiz_bits:                  ; @in_gp2x_get_wiz_bits
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.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
	stur	wzr, [x29, #-4]
Lloh0:
	adrp	x8, _gpiodev@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gpiodev@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	sub	x1, x29, #4
	mov	w2, #4
	bl	_read
	ldur	w8, [x29, #-4]
	mov	w9, #5
	orr	w9, w8, w9
	tst	w8, #0x2
	csel	w8, w8, w9, eq
	mov	w9, #20
	orr	w9, w8, w9
	tst	w8, #0x8
	csel	w8, w8, w9, eq
	mov	w9, #80
	orr	w9, w8, w9
	tst	w8, #0x20
	csel	w8, w8, w9, eq
	mov	w9, #65
	orr	w9, w8, w9
	tst	w8, #0x80
	csel	w8, w8, w9, eq
	mov	w9, #65365
	movk	w9, #7, lsl #16
	and	w9, w8, w9
	lsl	w8, w8, #15
Lloh3:
	adrp	x10, _GP2X_BTN_VOL_UP@GOTPAGE
Lloh4:
	ldr	x10, [x10, _GP2X_BTN_VOL_UP@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	mov	w11, #1
	lsl	w10, w11, w10
	and	w8, w10, w8, asr #31
	orr	w8, w9, w8
	lsl	w9, w8, #14
Lloh6:
	adrp	x10, _GP2X_BTN_VOL_DOWN@GOTPAGE
Lloh7:
	ldr	x10, [x10, _GP2X_BTN_VOL_DOWN@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	lsl	w10, w11, w10
	and	w9, w10, w9, asr #31
	orr	w8, w8, w9
	lsl	w9, w8, #13
Lloh9:
	adrp	x10, _GP2X_BTN_PUSH@GOTPAGE
Lloh10:
	ldr	x10, [x10, _GP2X_BTN_PUSH@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	lsl	w10, w11, w10
	and	w9, w10, w9, asr #31
	orr	w8, w8, w9
	and	w0, w8, #0xfff8ffff
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_gpiodev,4,2                    ; @gpiodev
	.comm	_GP2X_BTN_VOL_UP,4,2            ; @GP2X_BTN_VOL_UP
	.comm	_GP2X_BTN_VOL_DOWN,4,2          ; @GP2X_BTN_VOL_DOWN
	.comm	_GP2X_BTN_PUSH,4,2              ; @GP2X_BTN_PUSH
	.no_dead_strip	_in_gp2x_get_wiz_bits
.subsections_via_symbols
