	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xinput_joypad_poll
_xinput_joypad_poll:                    ## @xinput_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
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_g_xinput_states@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	$4, %rsi
	xorl	%edi, %edi
	callq	_g_XInputGetStateEx
	movq	_ERROR_DEVICE_NOT_CONNECTED@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	xorl	%ecx, %ecx
	cmpq	%rdx, %rax
	setne	%cl
	movq	(%rbx), %rsi
	cmpl	%ecx, (%rsi)
	je	LBB0_3
## %bb.1:
	cmpq	%rdx, %rax
	jne	LBB0_13
## %bb.2:
	movl	%ecx, (%rsi)
	xorl	%edi, %edi
	callq	_xinput_joypad_name
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_input_autoconfigure_disconnect
	movq	(%rbx), %rsi
LBB0_3:
	addq	$12, %rsi
	movl	$1, %edi
	callq	_g_XInputGetStateEx
	movq	(%r14), %rdx
	xorl	%ecx, %ecx
	cmpq	%rdx, %rax
	setne	%cl
	movq	(%rbx), %rsi
	cmpl	%ecx, 8(%rsi)
	je	LBB0_6
## %bb.4:
	cmpq	%rdx, %rax
	jne	LBB0_13
## %bb.5:
	movl	%ecx, 8(%rsi)
	movl	$1, %edi
	callq	_xinput_joypad_name
	movl	$1, %edi
	movl	%eax, %esi
	callq	_input_autoconfigure_disconnect
	movq	(%rbx), %rsi
LBB0_6:
	addq	$20, %rsi
	movl	$2, %edi
	callq	_g_XInputGetStateEx
	movq	(%r14), %rdx
	xorl	%ecx, %ecx
	cmpq	%rdx, %rax
	setne	%cl
	movq	(%rbx), %rsi
	cmpl	%ecx, 16(%rsi)
	je	LBB0_9
## %bb.7:
	cmpq	%rdx, %rax
	jne	LBB0_13
## %bb.8:
	movl	%ecx, 16(%rsi)
	movl	$2, %edi
	callq	_xinput_joypad_name
	movl	$2, %edi
	movl	%eax, %esi
	callq	_input_autoconfigure_disconnect
	movq	(%rbx), %rsi
LBB0_9:
	addq	$28, %rsi
	movl	$3, %edi
	callq	_g_XInputGetStateEx
	movq	(%r14), %rdx
	xorl	%ecx, %ecx
	cmpq	%rdx, %rax
	setne	%cl
	movq	(%rbx), %rsi
	cmpl	%ecx, 24(%rsi)
	jne	LBB0_10
## %bb.12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	cmpq	%rdx, %rax
	je	LBB0_11
LBB0_13:
	xorl	%eax, %eax
	callq	_xinput_joypad_destroy
	xorl	%edi, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_xinput_joypad_init             ## TAILCALL
LBB0_11:
	movl	%ecx, 24(%rsi)
	movl	$3, %edi
	callq	_xinput_joypad_name
	movl	$3, %edi
	movl	%eax, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_input_autoconfigure_disconnect ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_g_xinput_states,8,3            ## @g_xinput_states
	.comm	_ERROR_DEVICE_NOT_CONNECTED,8,3 ## @ERROR_DEVICE_NOT_CONNECTED
	.comm	_dinput_joypad,8,3              ## @dinput_joypad
	.no_dead_strip	_xinput_joypad_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xinput_joypad_poll
_xinput_joypad_poll:                    ; @xinput_joypad_poll
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _g_xinput_states@GOTPAGE
Lloh1:
	ldr	x19, [x19, _g_xinput_states@GOTPAGEOFF]
	ldr	x8, [x19]
	add	x1, x8, #4
	mov	w0, #0
	bl	_g_XInputGetStateEx
Lloh2:
	adrp	x20, _ERROR_DEVICE_NOT_CONNECTED@GOTPAGE
Lloh3:
	ldr	x20, [x20, _ERROR_DEVICE_NOT_CONNECTED@GOTPAGEOFF]
	ldr	x10, [x20]
	cmp	x0, x10
	cset	w9, ne
	ldr	x8, [x19]
	ldr	w11, [x8]
	cmp	w11, w9
	b.eq	LBB0_3
; %bb.1:
	cmp	x0, x10
	b.ne	LBB0_12
; %bb.2:
	str	w9, [x8]
	mov	w0, #0
	bl	_xinput_joypad_name
	mov	x1, x0
	mov	w0, #0
	bl	_input_autoconfigure_disconnect
	ldr	x8, [x19]
LBB0_3:
	add	x1, x8, #12
	mov	w0, #1
	bl	_g_XInputGetStateEx
	ldr	x10, [x20]
	cmp	x0, x10
	cset	w9, ne
	ldr	x8, [x19]
	ldr	w11, [x8, #8]
	cmp	w11, w9
	b.eq	LBB0_6
; %bb.4:
	cmp	x0, x10
	b.ne	LBB0_12
; %bb.5:
	str	w9, [x8, #8]
	mov	w0, #1
	bl	_xinput_joypad_name
	mov	x1, x0
	mov	w0, #1
	bl	_input_autoconfigure_disconnect
	ldr	x8, [x19]
LBB0_6:
	add	x1, x8, #20
	mov	w0, #2
	bl	_g_XInputGetStateEx
	ldr	x10, [x20]
	cmp	x0, x10
	cset	w9, ne
	ldr	x8, [x19]
	ldr	w11, [x8, #16]
	cmp	w11, w9
	b.eq	LBB0_9
; %bb.7:
	cmp	x0, x10
	b.ne	LBB0_12
; %bb.8:
	str	w9, [x8, #16]
	mov	w0, #2
	bl	_xinput_joypad_name
	mov	x1, x0
	mov	w0, #2
	bl	_input_autoconfigure_disconnect
	ldr	x8, [x19]
LBB0_9:
	add	x1, x8, #28
	mov	w0, #3
	bl	_g_XInputGetStateEx
	ldr	x10, [x20]
	cmp	x0, x10
	cset	w8, ne
	ldr	x9, [x19]
	ldr	w11, [x9, #24]
	cmp	w11, w8
	b.ne	LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	cmp	x0, x10
	b.eq	LBB0_13
LBB0_12:
	bl	_xinput_joypad_destroy
	mov	x0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_xinput_joypad_init
LBB0_13:
	str	w8, [x9, #24]
	mov	w0, #3
	bl	_xinput_joypad_name
	mov	x1, x0
	mov	w0, #3
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_input_autoconfigure_disconnect
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_g_xinput_states,8,3            ; @g_xinput_states
	.comm	_ERROR_DEVICE_NOT_CONNECTED,8,3 ; @ERROR_DEVICE_NOT_CONNECTED
	.comm	_dinput_joypad,8,3              ; @dinput_joypad
	.no_dead_strip	_xinput_joypad_poll
.subsections_via_symbols
