	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ds4_mapping
_ds4_mapping:                           ## @ds4_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, %r13
	movl	(%rcx), %ebx
	movq	_HID_USAGE_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	%ebx, %ecx
	movq	_HID_UP_BUTTON@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_3
## %bb.1:
	movq	%rsi, %r15
	movq	%r8, %r12
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	_HID_USAGE@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_ds4_keymap@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %ecx
	movl	$-1, %eax
	cmpl	%ecx, %ebx
	jae	LBB0_8
## %bb.2:
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	movq	_HID_UP_GENDESK@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	jne	LBB0_8
## %bb.4:
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	_HID_GD_HATSWITCH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	je	LBB0_8
## %bb.5:
	movq	%rsi, %r15
	movq	%r8, %r12
	movq	_HID_USAGE@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_ds4_absmap@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %ecx
	movl	$-1, %eax
	cmpl	%ecx, %ebx
	jae	LBB0_8
## %bb.6:
	movq	_EV_ABS@GOTPCREL(%rip), %rax
LBB0_7:
	movq	(%r14), %rcx
	movl	%ebx, %edx
	movl	(%rcx,%rdx,4), %r9d
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	_hid_map_usage_clear
	movl	$1, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HID_USAGE_PAGE,4,2             ## @HID_USAGE_PAGE
	.comm	_HID_UP_BUTTON,4,2              ## @HID_UP_BUTTON
	.comm	_HID_USAGE,4,2                  ## @HID_USAGE
	.comm	_ds4_keymap,8,3                 ## @ds4_keymap
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_HID_UP_GENDESK,4,2             ## @HID_UP_GENDESK
	.comm	_HID_GD_HATSWITCH,4,2           ## @HID_GD_HATSWITCH
	.comm	_ds4_absmap,8,3                 ## @ds4_absmap
	.comm	_EV_ABS,4,2                     ## @EV_ABS
	.no_dead_strip	_ds4_mapping
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ds4_mapping
_ds4_mapping:                           ; @ds4_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
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x1
	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_3
; %bb.1:
Lloh6:
	adrp	x9, _HID_USAGE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HID_USAGE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w23, w9, w8
Lloh9:
	adrp	x24, _ds4_keymap@GOTPAGE
Lloh10:
	ldr	x24, [x24, _ds4_keymap@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w23, w0
	b.hs	LBB0_8
; %bb.2:
Lloh11:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
Lloh13:
	adrp	x10, _HID_UP_GENDESK@GOTPAGE
Lloh14:
	ldr	x10, [x10, _HID_UP_GENDESK@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
Lloh16:
	adrp	x11, _HID_GD_HATSWITCH@GOTPAGE
Lloh17:
	ldr	x11, [x11, _HID_GD_HATSWITCH@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	cmp	w9, w10
	ccmp	w8, w11, #4, eq
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_9
LBB0_5:
Lloh19:
	adrp	x9, _HID_USAGE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _HID_USAGE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	and	w23, w9, w8
Lloh22:
	adrp	x24, _ds4_absmap@GOTPAGE
Lloh23:
	ldr	x24, [x24, _ds4_absmap@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w23, w0
	b.hs	LBB0_8
; %bb.6:
Lloh24:
	adrp	x8, _EV_ABS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EV_ABS@GOTPAGEOFF]
LBB0_7:
	ldr	x9, [x24]
	ldr	w5, [x9, w23, uxtw #2]
	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 AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_HID_USAGE_PAGE,4,2             ; @HID_USAGE_PAGE
	.comm	_HID_UP_BUTTON,4,2              ; @HID_UP_BUTTON
	.comm	_HID_USAGE,4,2                  ; @HID_USAGE
	.comm	_ds4_keymap,8,3                 ; @ds4_keymap
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_HID_UP_GENDESK,4,2             ; @HID_UP_GENDESK
	.comm	_HID_GD_HATSWITCH,4,2           ; @HID_GD_HATSWITCH
	.comm	_ds4_absmap,8,3                 ; @ds4_absmap
	.comm	_EV_ABS,4,2                     ; @EV_ABS
	.no_dead_strip	_ds4_mapping
.subsections_via_symbols
