	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function switch_joypad_poll
_switch_joypad_poll:                    ## @switch_joypad_poll
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	xorl	%eax, %eax
	callq	_hid_get_shared_memory
	movq	(%rax), %rax
	movq	(%rax), %rdx
	movq	8(%rax), %rcx
	leaq	(%rdx,%rdx,4), %rsi
	movq	136(%rax), %rdi
	movq	128(%rax), %rax
	leaq	(%rax,%rax,4), %rax
	movl	(%rdi,%rax,8), %r11d
	movq	8(%rdi,%rax,8), %r9
	movq	16(%rdi,%rax,8), %rdx
	movq	24(%rdi,%rax,8), %r8
	movq	32(%rdi,%rax,8), %rax
	movq	_pad_state@GOTPCREL(%rip), %r10
	movq	%r9, %rdi
	orq	%rdx, %rdi
	jne	LBB0_2
## %bb.1:
	movq	16(%rcx,%rsi,8), %rdx
	movq	8(%rcx,%rsi,8), %r9
LBB0_2:
	orl	(%rcx,%rsi,8), %r11d
	movq	(%r10), %r10
	movq	%r8, %rdi
	orq	%rax, %rdi
	jne	LBB0_4
## %bb.3:
	movq	32(%rcx,%rsi,8), %rax
	movq	24(%rcx,%rsi,8), %r8
LBB0_4:
	movl	%r11d, (%r10)
	movq	_analog_state@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	_RETRO_DEVICE_INDEX_ANALOG_LEFT@GOTPCREL(%rip), %r11
	movq	(%r11), %rdi
	movq	(%rcx,%rdi,8), %rdi
	movq	_RETRO_DEVICE_ID_ANALOG_X@GOTPCREL(%rip), %r10
	movq	(%r10), %rsi
	movq	%r9, (%rdi,%rsi,8)
	negq	%rdx
	movq	(%r11), %rsi
	movq	(%rcx,%rsi,8), %rsi
	movq	_RETRO_DEVICE_ID_ANALOG_Y@GOTPCREL(%rip), %r9
	movq	(%r9), %rdi
	movq	%rdx, (%rsi,%rdi,8)
	movq	_RETRO_DEVICE_INDEX_ANALOG_RIGHT@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movq	(%rcx,%rsi,8), %rsi
	movq	(%r10), %rdi
	movq	%r8, (%rsi,%rdi,8)
	negq	%rax
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	(%r9), %rdx
	movq	%rax, (%rcx,%rdx,8)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pad_state,8,3                  ## @pad_state
	.comm	_analog_state,8,3               ## @analog_state
	.comm	_RETRO_DEVICE_INDEX_ANALOG_LEFT,8,3 ## @RETRO_DEVICE_INDEX_ANALOG_LEFT
	.comm	_RETRO_DEVICE_ID_ANALOG_X,8,3   ## @RETRO_DEVICE_ID_ANALOG_X
	.comm	_RETRO_DEVICE_ID_ANALOG_Y,8,3   ## @RETRO_DEVICE_ID_ANALOG_Y
	.comm	_RETRO_DEVICE_INDEX_ANALOG_RIGHT,8,3 ## @RETRO_DEVICE_INDEX_ANALOG_RIGHT
	.no_dead_strip	_switch_joypad_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function switch_joypad_poll
_switch_joypad_poll:                    ; @switch_joypad_poll
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_hid_get_shared_memory
	ldr	x8, [x0]
	ldp	x10, x9, [x8]
	mov	w11, #40
	madd	x9, x10, x11, x9
	ldr	w10, [x9]
	ldp	x12, x13, [x9, #8]
	ldp	x14, x9, [x9, #24]
	ldp	x8, x15, [x8, #128]
	madd	x8, x8, x11, x15
	ldr	w11, [x8]
	ldp	x15, x16, [x8, #8]
	ldp	x17, x8, [x8, #24]
	orr	w10, w11, w10
Lloh0:
	adrp	x11, _pad_state@GOTPAGE
Lloh1:
	ldr	x11, [x11, _pad_state@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	str	w10, [x11]
	orr	x10, x15, x16
	cmp	x10, #0
	csel	x10, x16, x13, ne
	csel	x11, x15, x12, ne
	orr	x12, x17, x8
	cmp	x12, #0
	csel	x8, x8, x9, ne
Lloh3:
	adrp	x9, _analog_state@GOTPAGE
Lloh4:
	ldr	x9, [x9, _analog_state@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x9, [x9]
Lloh6:
	adrp	x12, _RETRO_DEVICE_INDEX_ANALOG_LEFT@GOTPAGE
Lloh7:
	ldr	x12, [x12, _RETRO_DEVICE_INDEX_ANALOG_LEFT@GOTPAGEOFF]
	ldr	x13, [x12]
	ldr	x13, [x9, x13, lsl #3]
	csel	x14, x17, x14, ne
Lloh8:
	adrp	x15, _RETRO_DEVICE_ID_ANALOG_X@GOTPAGE
Lloh9:
	ldr	x15, [x15, _RETRO_DEVICE_ID_ANALOG_X@GOTPAGEOFF]
	ldr	x16, [x15]
	str	x11, [x13, x16, lsl #3]
	neg	x10, x10
	ldr	x11, [x12]
	ldr	x11, [x9, x11, lsl #3]
Lloh10:
	adrp	x12, _RETRO_DEVICE_ID_ANALOG_Y@GOTPAGE
Lloh11:
	ldr	x12, [x12, _RETRO_DEVICE_ID_ANALOG_Y@GOTPAGEOFF]
	ldr	x13, [x12]
	str	x10, [x11, x13, lsl #3]
Lloh12:
	adrp	x10, _RETRO_DEVICE_INDEX_ANALOG_RIGHT@GOTPAGE
Lloh13:
	ldr	x10, [x10, _RETRO_DEVICE_INDEX_ANALOG_RIGHT@GOTPAGEOFF]
	ldr	x11, [x10]
	ldr	x11, [x9, x11, lsl #3]
	ldr	x13, [x15]
	str	x14, [x11, x13, lsl #3]
	neg	x8, x8
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
	ldr	x10, [x12]
	str	x8, [x9, x10, lsl #3]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_pad_state,8,3                  ; @pad_state
	.comm	_analog_state,8,3               ; @analog_state
	.comm	_RETRO_DEVICE_INDEX_ANALOG_LEFT,8,3 ; @RETRO_DEVICE_INDEX_ANALOG_LEFT
	.comm	_RETRO_DEVICE_ID_ANALOG_X,8,3   ; @RETRO_DEVICE_ID_ANALOG_X
	.comm	_RETRO_DEVICE_ID_ANALOG_Y,8,3   ; @RETRO_DEVICE_ID_ANALOG_Y
	.comm	_RETRO_DEVICE_INDEX_ANALOG_RIGHT,8,3 ; @RETRO_DEVICE_INDEX_ANALOG_RIGHT
	.no_dead_strip	_switch_joypad_poll
.subsections_via_symbols
