	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psp_pad_read                   ## -- Begin function psp_pad_read
	.p2align	4, 0x90
_psp_pad_read:                          ## @psp_pad_read
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	testl	%edi, %edi
	je	LBB0_2
## %bb.1:
	leaq	-24(%rbp), %rdi
	movl	$1, %esi
	callq	_sceCtrlReadBufferPositive
	jmp	LBB0_3
LBB0_2:
	leaq	-24(%rbp), %rdi
	movl	$1, %esi
	callq	_sceCtrlPeekBufferPositive
LBB0_3:
	movq	_PBTN_NUB_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_PBTN_NUB_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r8d, %eax
	orl	%r10d, %eax
	movq	_PBTN_NUB_LEFT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r9d
	movq	_PBTN_NUB_RIGHT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edi
	movl	%r9d, %esi
	orl	%edi, %esi
	orl	%eax, %esi
	notl	%esi
	andl	-24(%rbp), %esi
	movq	_ANALOG_DEADZONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$128, %ecx
	subl	%edx, %ecx
	movl	-20(%rbp), %r11d
	movl	-16(%rbp), %ebx
	xorl	%eax, %eax
	cmpl	%ecx, %r11d
	cmovgel	%eax, %r9d
	subl	$-128, %edx
	cmpl	%edx, %r11d
	cmovlel	%eax, %edi
	orl	%r9d, %edi
	cmpl	%ecx, %ebx
	cmovgel	%eax, %r10d
	orl	%edi, %r10d
	cmpl	%edx, %ebx
	cmovgl	%r8d, %eax
	orl	%r10d, %eax
	orl	%esi, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PBTN_NUB_UP,4,2                ## @PBTN_NUB_UP
	.comm	_PBTN_NUB_DOWN,4,2              ## @PBTN_NUB_DOWN
	.comm	_PBTN_NUB_LEFT,4,2              ## @PBTN_NUB_LEFT
	.comm	_PBTN_NUB_RIGHT,4,2             ## @PBTN_NUB_RIGHT
	.comm	_ANALOG_DEADZONE,4,2            ## @ANALOG_DEADZONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psp_pad_read                   ; -- Begin function psp_pad_read
	.p2align	2
_psp_pad_read:                          ; @psp_pad_read
	.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
	cbz	w0, LBB0_2
; %bb.1:
	mov	x0, sp
	mov	w1, #1
	bl	_sceCtrlReadBufferPositive
	b	LBB0_3
LBB0_2:
	mov	x0, sp
	mov	w1, #1
	bl	_sceCtrlPeekBufferPositive
LBB0_3:
Lloh0:
	adrp	x8, _PBTN_NUB_UP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PBTN_NUB_UP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PBTN_NUB_DOWN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PBTN_NUB_DOWN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _PBTN_NUB_LEFT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PBTN_NUB_LEFT@GOTPAGEOFF]
	orr	w11, w9, w8
Lloh8:
	ldr	w10, [x10]
	orr	w11, w11, w10
Lloh9:
	adrp	x12, _PBTN_NUB_RIGHT@GOTPAGE
Lloh10:
	ldr	x12, [x12, _PBTN_NUB_RIGHT@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	orr	w11, w11, w12
	ldp	w13, w14, [sp]
	bic	w11, w13, w11
Lloh12:
	adrp	x13, _ANALOG_DEADZONE@GOTPAGE
Lloh13:
	ldr	x13, [x13, _ANALOG_DEADZONE@GOTPAGEOFF]
Lloh14:
	ldr	w13, [x13]
	mov	w15, #128
	sub	w15, w15, w13
	cmp	w14, w15
	csel	w10, w10, wzr, lt
	orr	w10, w10, w11
	add	w11, w13, #128
	cmp	w14, w11
	csel	w12, w12, wzr, gt
	orr	w10, w10, w12
	ldr	w12, [sp, #8]
	cmp	w12, w15
	csel	w8, w8, wzr, lt
	orr	w8, w10, w8
	cmp	w12, w11
	csel	w9, w9, wzr, gt
	orr	w0, w8, w9
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.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	_PBTN_NUB_UP,4,2                ; @PBTN_NUB_UP
	.comm	_PBTN_NUB_DOWN,4,2              ; @PBTN_NUB_DOWN
	.comm	_PBTN_NUB_LEFT,4,2              ; @PBTN_NUB_LEFT
	.comm	_PBTN_NUB_RIGHT,4,2             ; @PBTN_NUB_RIGHT
	.comm	_ANALOG_DEADZONE,4,2            ; @ANALOG_DEADZONE
.subsections_via_symbols
