	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_device_type                ## -- Begin function get_device_type
	.p2align	4, 0x90
_get_device_type:                       ## @get_device_type
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testq	%rsi, %rsi
	movq	_DI8DEVTYPE_JOYSTICK@GOTPCREL(%rip), %rcx
	cmoveq	_DI8DEVTYPE_GAMEPAD@GOTPCREL(%rip), %rcx
	movq	_DIDEVTYPEJOYSTICK_TRADITIONAL@GOTPCREL(%rip), %rax
	cmoveq	_DIDEVTYPEJOYSTICK_GAMEPAD@GOTPCREL(%rip), %rax
	cmpl	$2048, %edi                     ## imm = 0x800
	cmovlq	_DIDEVTYPE_JOYSTICK@GOTPCREL(%rip), %rcx
	cmovgeq	_DI8DEVTYPEJOYSTICK_STANDARD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$8, %eax
	orl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DI8DEVTYPE_JOYSTICK,4,2        ## @DI8DEVTYPE_JOYSTICK
	.comm	_DI8DEVTYPEJOYSTICK_STANDARD,4,2 ## @DI8DEVTYPEJOYSTICK_STANDARD
	.comm	_DIDEVTYPE_JOYSTICK,4,2         ## @DIDEVTYPE_JOYSTICK
	.comm	_DIDEVTYPEJOYSTICK_TRADITIONAL,4,2 ## @DIDEVTYPEJOYSTICK_TRADITIONAL
	.comm	_DI8DEVTYPE_GAMEPAD,4,2         ## @DI8DEVTYPE_GAMEPAD
	.comm	_DIDEVTYPEJOYSTICK_GAMEPAD,4,2  ## @DIDEVTYPEJOYSTICK_GAMEPAD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_device_type                ; -- Begin function get_device_type
	.p2align	2
_get_device_type:                       ; @get_device_type
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _DI8DEVTYPE_GAMEPAD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DI8DEVTYPE_GAMEPAD@GOTPAGEOFF]
Lloh2:
	adrp	x9, _DI8DEVTYPE_JOYSTICK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DI8DEVTYPE_JOYSTICK@GOTPAGEOFF]
	cmp	x1, #0
	csel	x8, x8, x9, eq
Lloh4:
	adrp	x9, _DIDEVTYPE_JOYSTICK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DIDEVTYPE_JOYSTICK@GOTPAGEOFF]
Lloh6:
	adrp	x10, _DIDEVTYPEJOYSTICK_GAMEPAD@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DIDEVTYPEJOYSTICK_GAMEPAD@GOTPAGEOFF]
Lloh8:
	adrp	x11, _DIDEVTYPEJOYSTICK_TRADITIONAL@GOTPAGE
Lloh9:
	ldr	x11, [x11, _DIDEVTYPEJOYSTICK_TRADITIONAL@GOTPAGEOFF]
	csel	x10, x10, x11, eq
	cmp	w0, #2047
	csel	x8, x8, x9, gt
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _DI8DEVTYPEJOYSTICK_STANDARD@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DI8DEVTYPEJOYSTICK_STANDARD@GOTPAGEOFF]
	csel	x9, x9, x10, gt
	ldr	w9, [x9]
	orr	w0, w8, w9, lsl #8
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DI8DEVTYPE_JOYSTICK,4,2        ; @DI8DEVTYPE_JOYSTICK
	.comm	_DI8DEVTYPEJOYSTICK_STANDARD,4,2 ; @DI8DEVTYPEJOYSTICK_STANDARD
	.comm	_DIDEVTYPE_JOYSTICK,4,2         ; @DIDEVTYPE_JOYSTICK
	.comm	_DIDEVTYPEJOYSTICK_TRADITIONAL,4,2 ; @DIDEVTYPEJOYSTICK_TRADITIONAL
	.comm	_DI8DEVTYPE_GAMEPAD,4,2         ; @DI8DEVTYPE_GAMEPAD
	.comm	_DIDEVTYPEJOYSTICK_GAMEPAD,4,2  ; @DIDEVTYPEJOYSTICK_GAMEPAD
.subsections_via_symbols
