	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dinput_handle_message          ## -- Begin function dinput_handle_message
	.p2align	4, 0x90
_dinput_handle_message:                 ## @dinput_handle_message
	.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
                                        ## kill: def $esi killed $esi def $rsi
	xorl	%r15d, %r15d
	addl	$-128, %esi
	cmpl	$5, %esi
	ja	LBB0_17
## %bb.1:
	movl	%ecx, %r12d
	movl	%edx, %ebx
	movq	%rdi, %r14
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rsi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_7:
	movl	%ebx, %edi
	callq	_GET_POINTERID_WPARAM
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dinput_find_pointer
	movl	$1, %r15d
	testq	%rax, %rax
	je	LBB0_17
## %bb.8:
	movq	%rax, %rdi
	movl	%r12d, %esi
	callq	_dinput_pointer_store_pos
	jmp	LBB0_17
LBB0_6:
	movl	%ebx, %edi
	callq	_GET_POINTERID_WPARAM
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dinput_delete_pointer
	movl	$1, %r15d
	jmp	LBB0_17
LBB0_3:
	movl	$8, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r13
	movl	%ebx, %edi
	callq	_GET_POINTERID_WPARAM
	movq	%rax, (%r13)
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_dinput_pointer_store_pos
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_dinput_add_pointer
	movl	$1, %r15d
	jmp	LBB0_17
LBB0_9:
	movl	%ebx, %edi
	callq	_HIWORD
	cmpw	$120, %ax
	jl	LBB0_11
## %bb.10:
	movl	$1, (%r14)
LBB0_11:
	movl	%ebx, %edi
	callq	_HIWORD
	cmpw	$-120, %ax
	jg	LBB0_17
## %bb.12:
	movl	$1, 4(%r14)
	jmp	LBB0_17
LBB0_2:
	movl	%r12d, %edi
	callq	_GET_X_LPARAM
	movl	%eax, 36(%r14)
	movl	%r12d, %edi
	callq	_GET_Y_LPARAM
	movl	%eax, 32(%r14)
	jmp	LBB0_17
LBB0_13:
	movl	%ebx, %edi
	callq	_HIWORD
	cmpw	$120, %ax
	jl	LBB0_15
## %bb.14:
	movl	$1, 8(%r14)
LBB0_15:
	movl	%ebx, %edi
	callq	_HIWORD
	cmpw	$-120, %ax
	jg	LBB0_17
## %bb.16:
	movl	$1, 12(%r14)
	jmp	LBB0_17
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_ERR
LBB0_17:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_6
	.long	L0_0_set_3
	.long	L0_0_set_9
	.long	L0_0_set_2
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[DINPUT]: dinput_handle_message: pointer allocation in WM_POINTERDOWN failed.\n"

	.comm	_DBT_DEVICEARRIVAL,4,2          ## @DBT_DEVICEARRIVAL
	.comm	_DBT_DEVICEREMOVECOMPLETE,4,2   ## @DBT_DEVICEREMOVECOMPLETE
	.comm	_DBT_DEVTYP_DEVICEINTERFACE,4,2 ## @DBT_DEVTYP_DEVICEINTERFACE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dinput_handle_message          ; -- Begin function dinput_handle_message
	.p2align	2
_dinput_handle_message:                 ; @dinput_handle_message
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	w8, w1, #128
	cmp	w8, #5
	b.hi	LBB0_18
; %bb.1:
	mov	x21, x3
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	x0, x20
	bl	_GET_POINTERID_WPARAM
	mov	x1, x0
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_dinput_find_pointer
	cbz	x0, LBB0_16
; %bb.3:
	mov	x1, x21
	bl	_dinput_pointer_store_pos
	mov	w0, #1
	b	LBB0_19
LBB0_4:
	mov	x0, x20
	bl	_GET_POINTERID_WPARAM
	mov	x1, x0
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_dinput_delete_pointer
	mov	w0, #1
	b	LBB0_19
LBB0_5:
	mov	w0, #8
	bl	_malloc
	cbz	x0, LBB0_17
; %bb.6:
	mov	x22, x0
	mov	x0, x20
	bl	_GET_POINTERID_WPARAM
	str	x0, [x22]
	mov	x0, x22
	mov	x1, x21
	bl	_dinput_pointer_store_pos
	mov	x0, x19
	mov	x1, x22
	bl	_dinput_add_pointer
	mov	w0, #1
	b	LBB0_19
LBB0_7:
	mov	x0, x20
	bl	_HIWORD
	lsl	w8, w0, #16
	cmp	w8, #1904, lsl #12              ; =7798784
	b.le	LBB0_9
; %bb.8:
	mov	w8, #1
	str	w8, [x19]
LBB0_9:
	mov	x0, x20
	bl	_HIWORD
	mov	w8, #-7798784
	cmp	w8, w0, lsl #16
	b.le	LBB0_18
; %bb.10:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #4]
	b	LBB0_19
LBB0_11:
	mov	x0, x21
	bl	_GET_X_LPARAM
	str	w0, [x19, #36]
	mov	x0, x21
	bl	_GET_Y_LPARAM
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #32]
	b	LBB0_19
LBB0_12:
	mov	x0, x20
	bl	_HIWORD
	lsl	w8, w0, #16
	cmp	w8, #1904, lsl #12              ; =7798784
	b.le	LBB0_14
; %bb.13:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_14:
	mov	x0, x20
	bl	_HIWORD
	mov	w8, #-7798784
	cmp	w8, w0, lsl #16
	b.le	LBB0_18
; %bb.15:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #12]
	b	LBB0_19
LBB0_16:
	mov	w0, #1
	b	LBB0_19
LBB0_17:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
LBB0_18:
	mov	w0, #0
LBB0_19:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[DINPUT]: dinput_handle_message: pointer allocation in WM_POINTERDOWN failed.\n"

	.comm	_DBT_DEVICEARRIVAL,4,2          ; @DBT_DEVICEARRIVAL
	.comm	_DBT_DEVICEREMOVECOMPLETE,4,2   ; @DBT_DEVICEREMOVECOMPLETE
	.comm	_DBT_DEVTYP_DEVICEINTERFACE,4,2 ; @DBT_DEVTYP_DEVICEINTERFACE
.subsections_via_symbols
