	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sony_mapping
_sony_mapping:                          ## @sony_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	%r9, %rbx
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r14
	callq	_hid_get_drvdata
	movl	(%rax), %eax
	movq	_BUZZ_CONTROLLER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.1:
	movq	%rbx, %r14
	movl	(%r15), %ebx
	movq	_HID_USAGE_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movq	_HID_UP_BUTTON@GOTPCREL(%rip), %rcx
	movl	$-1, %r13d
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.2:
	cmpl	$1, 4(%r15)
	jne	LBB0_11
## %bb.3:
	movq	_HID_USAGE@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_buzz_keymap@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jae	LBB0_11
## %bb.4:
	movq	_buzz_keymap@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %r9d
	testl	%r9d, %r9d
	je	LBB0_11
## %bb.5:
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_hid_map_usage_clear
	movl	$1, %r13d
LBB0_11:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_PS3REMOTE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.12:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	movq	%r15, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	%rbx, %r9
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ps3remote_mapping              ## TAILCALL
LBB0_7:
	movq	_NAVIGATION_CONTROLLER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.13:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	movq	%r15, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	%rbx, %r9
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_navigation_mapping             ## TAILCALL
LBB0_8:
	movq	_SIXAXIS_CONTROLLER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.14:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	movq	%r15, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	%rbx, %r9
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sixaxis_mapping                ## TAILCALL
LBB0_9:
	movq	_DUALSHOCK4_CONTROLLER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.15:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	movq	%r15, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	%rbx, %r9
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ds4_mapping                    ## TAILCALL
LBB0_10:
	xorl	%r13d, %r13d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_BUZZ_CONTROLLER,4,2            ## @BUZZ_CONTROLLER
	.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	_buzz_keymap,8,3                ## @buzz_keymap
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_PS3REMOTE,4,2                  ## @PS3REMOTE
	.comm	_NAVIGATION_CONTROLLER,4,2      ## @NAVIGATION_CONTROLLER
	.comm	_SIXAXIS_CONTROLLER,4,2         ## @SIXAXIS_CONTROLLER
	.comm	_DUALSHOCK4_CONTROLLER,4,2      ## @DUALSHOCK4_CONTROLLER
	.no_dead_strip	_sony_mapping
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sony_mapping
_sony_mapping:                          ; @sony_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	x23, x2
	mov	x22, x1
	mov	x24, x0
	bl	_hid_get_drvdata
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _BUZZ_CONTROLLER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BUZZ_CONTROLLER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.1:
	ldr	w8, [x21]
Lloh3:
	adrp	x9, _HID_USAGE_PAGE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HID_USAGE_PAGE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w9, w9, w8
Lloh6:
	adrp	x10, _HID_UP_BUTTON@GOTPAGE
Lloh7:
	ldr	x10, [x10, _HID_UP_BUTTON@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_6
; %bb.2:
	ldr	w9, [x21, #4]
	cmp	w9, #1
	b.ne	LBB0_6
; %bb.3:
Lloh9:
	adrp	x9, _HID_USAGE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HID_USAGE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w23, w9, w8
Lloh12:
	adrp	x24, _buzz_keymap@GOTPAGE
Lloh13:
	ldr	x24, [x24, _buzz_keymap@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w23, w0
	b.hs	LBB0_6
; %bb.4:
	ldr	x8, [x24]
	ldr	w5, [x8, x23, lsl #2]
	cbz	w5, LBB0_6
; %bb.5:
Lloh14:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh16:
	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_7
LBB0_6:
	mov	w0, #-1
LBB0_7:
	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
LBB0_8:
Lloh17:
	adrp	x9, _PS3REMOTE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PS3REMOTE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	mov	x0, x24
	mov	x1, x22
	mov	x2, x23
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	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
	b	_ps3remote_mapping
LBB0_10:
Lloh20:
	adrp	x9, _NAVIGATION_CONTROLLER@GOTPAGE
Lloh21:
	ldr	x9, [x9, _NAVIGATION_CONTROLLER@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	mov	x0, x24
	mov	x1, x22
	mov	x2, x23
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	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
	b	_navigation_mapping
LBB0_12:
Lloh23:
	adrp	x9, _SIXAXIS_CONTROLLER@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SIXAXIS_CONTROLLER@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	mov	x0, x24
	mov	x1, x22
	mov	x2, x23
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	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
	b	_sixaxis_mapping
LBB0_14:
Lloh26:
	adrp	x9, _DUALSHOCK4_CONTROLLER@GOTPAGE
Lloh27:
	ldr	x9, [x9, _DUALSHOCK4_CONTROLLER@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.15:
	mov	x0, x24
	mov	x1, x22
	mov	x2, x23
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	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
	b	_ds4_mapping
LBB0_16:
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_BUZZ_CONTROLLER,4,2            ; @BUZZ_CONTROLLER
	.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	_buzz_keymap,8,3                ; @buzz_keymap
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_PS3REMOTE,4,2                  ; @PS3REMOTE
	.comm	_NAVIGATION_CONTROLLER,4,2      ; @NAVIGATION_CONTROLLER
	.comm	_SIXAXIS_CONTROLLER,4,2         ; @SIXAXIS_CONTROLLER
	.comm	_DUALSHOCK4_CONTROLLER,4,2      ; @DUALSHOCK4_CONTROLLER
	.no_dead_strip	_sony_mapping
.subsections_via_symbols
