	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PadButtons
_PadButtons:                            ## @PadButtons
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PAD_PORT@GOTPCREL(%rip), %r12
	movq	_PAD_SLOT@GOTPCREL(%rip), %r15
	movq	_PAD_STATE_FINDCTP1@GOTPCREL(%rip), %r13
	movq	_PAD_STATE_DISCONN@GOTPCREL(%rip), %rbx
	movl	$2, %r14d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	(%r15), %esi
	callq	_padGetState
	xorl	%ecx, %ecx
	cmpl	(%rbx), %eax
	sete	%cl
	cmpl	(%r13), %eax
	cmovel	%r14d, %ecx
	movq	_PAD_STATE_STABLE@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %eax
	cmovel	%r14d, %ecx
	testl	%ecx, %ecx
	je	LBB0_1
## %bb.2:
	cmpl	$2, %ecx
	jne	LBB0_4
## %bb.3:
	movl	(%r12), %edi
	movl	(%r15), %esi
	leaq	-48(%rbp), %rdx
	callq	_padRead
	movl	-48(%rbp), %eax
	notl	%eax
	jmp	LBB0_5
LBB0_4:
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAD_PORT,4,2                   ## @PAD_PORT
	.comm	_PAD_SLOT,4,2                   ## @PAD_SLOT
	.comm	_PAD_STATE_STABLE,4,2           ## @PAD_STATE_STABLE
	.comm	_PAD_STATE_FINDCTP1,4,2         ## @PAD_STATE_FINDCTP1
	.comm	_PAD_STATE_DISCONN,4,2          ## @PAD_STATE_DISCONN
	.no_dead_strip	_PadButtons
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PadButtons
_PadButtons:                            ; @PadButtons
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x19, _PAD_PORT@GOTPAGE
Lloh1:
	ldr	x19, [x19, _PAD_PORT@GOTPAGEOFF]
Lloh2:
	adrp	x20, _PAD_SLOT@GOTPAGE
Lloh3:
	ldr	x20, [x20, _PAD_SLOT@GOTPAGEOFF]
Lloh4:
	adrp	x21, _PAD_STATE_STABLE@GOTPAGE
Lloh5:
	ldr	x21, [x21, _PAD_STATE_STABLE@GOTPAGEOFF]
Lloh6:
	adrp	x22, _PAD_STATE_FINDCTP1@GOTPAGE
Lloh7:
	ldr	x22, [x22, _PAD_STATE_FINDCTP1@GOTPAGEOFF]
	mov	w23, #2
Lloh8:
	adrp	x24, _PAD_STATE_DISCONN@GOTPAGE
Lloh9:
	ldr	x24, [x24, _PAD_STATE_DISCONN@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	ldr	w1, [x20]
	bl	_padGetState
	ldr	w8, [x21]
	ldr	w9, [x22]
	ldr	w10, [x24]
	cmp	w0, w10
	cset	w10, eq
	cmp	w0, w9
	ccmp	w0, w8, #4, ne
	csel	w8, w23, w10, eq
	cbz	w8, LBB0_1
; %bb.2:
	cmp	w8, #2
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x19]
	ldr	w1, [x20]
	add	x2, sp, #8
	bl	_padRead
	ldr	w8, [sp, #8]
	mvn	w0, w8
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PAD_PORT,4,2                   ; @PAD_PORT
	.comm	_PAD_SLOT,4,2                   ; @PAD_SLOT
	.comm	_PAD_STATE_STABLE,4,2           ; @PAD_STATE_STABLE
	.comm	_PAD_STATE_FINDCTP1,4,2         ; @PAD_STATE_FINDCTP1
	.comm	_PAD_STATE_DISCONN,4,2          ; @PAD_STATE_DISCONN
	.no_dead_strip	_PadButtons
.subsections_via_symbols
