	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps3remote_mapping
_ps3remote_mapping:                     ## @ps3remote_mapping
	.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	%rcx, %rbx
	movl	(%rcx), %r14d
	movq	_HID_USAGE_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	movq	_HID_UP_BUTTON@GOTPCREL(%rip), %rcx
	movl	$-1, %r12d
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.1:
	movq	%r8, %r15
	movq	%rsi, %r13
	movq	_HID_USAGE@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	movl	4(%rbx), %eax
	cmpl	$2, %eax
	je	LBB0_5
## %bb.2:
	cmpl	$1, %eax
	jne	LBB0_9
## %bb.3:
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	_ps3remote_keymap_joypad_buttons@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r14d
	jae	LBB0_9
## %bb.4:
	movq	_ps3remote_keymap_joypad_buttons@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r14,4), %r9d
	testl	%r9d, %r9d
	jne	LBB0_8
	jmp	LBB0_9
LBB0_5:
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	_ps3remote_keymap_remote_buttons@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r14d
	jae	LBB0_9
## %bb.6:
	movq	_ps3remote_keymap_remote_buttons@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r14d, %ecx
	movl	(%rax,%rcx,4), %r9d
	testl	%r9d, %r9d
	je	LBB0_9
LBB0_8:
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	_hid_map_usage_clear
	movl	$1, %r12d
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HID_USAGE,4,2                  ## @HID_USAGE
	.comm	_HID_USAGE_PAGE,4,2             ## @HID_USAGE_PAGE
	.comm	_HID_UP_BUTTON,4,2              ## @HID_UP_BUTTON
	.comm	_ps3remote_keymap_joypad_buttons,8,3 ## @ps3remote_keymap_joypad_buttons
	.comm	_ps3remote_keymap_remote_buttons,8,3 ## @ps3remote_keymap_remote_buttons
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.no_dead_strip	_ps3remote_mapping
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps3remote_mapping
_ps3remote_mapping:                     ; @ps3remote_mapping
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x3]
Lloh0:
	adrp	x9, _HID_USAGE_PAGE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HID_USAGE_PAGE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w9, w9, w8
Lloh3:
	adrp	x10, _HID_UP_BUTTON@GOTPAGE
Lloh4:
	ldr	x10, [x10, _HID_UP_BUTTON@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_8
; %bb.1:
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x1
Lloh6:
	adrp	x9, _HID_USAGE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HID_USAGE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w23, w9, w8
	ldr	w8, [x3, #4]
	cmp	w8, #2
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.3:
Lloh9:
	adrp	x24, _ps3remote_keymap_joypad_buttons@GOTPAGE
Lloh10:
	ldr	x24, [x24, _ps3remote_keymap_joypad_buttons@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w23, w0
	b.hs	LBB0_8
; %bb.4:
	ldr	x8, [x24]
	ldr	w5, [x8, x23, lsl #2]
	cbnz	w5, LBB0_7
	b	LBB0_8
LBB0_5:
Lloh11:
	adrp	x24, _ps3remote_keymap_remote_buttons@GOTPAGE
Lloh12:
	ldr	x24, [x24, _ps3remote_keymap_remote_buttons@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w23, w0
	b.hs	LBB0_8
; %bb.6:
	ldr	x8, [x24]
	ldr	w5, [x8, w23, uxtw #2]
	cbz	w5, LBB0_8
LBB0_7:
Lloh13:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh15:
	ldr	w4, [x8]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_hid_map_usage_clear
	mov	w0, #1
	b	LBB0_9
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_HID_USAGE,4,2                  ; @HID_USAGE
	.comm	_HID_USAGE_PAGE,4,2             ; @HID_USAGE_PAGE
	.comm	_HID_UP_BUTTON,4,2              ; @HID_UP_BUTTON
	.comm	_ps3remote_keymap_joypad_buttons,8,3 ; @ps3remote_keymap_joypad_buttons
	.comm	_ps3remote_keymap_remote_buttons,8,3 ; @ps3remote_keymap_remote_buttons
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.no_dead_strip	_ps3remote_mapping
.subsections_via_symbols
