	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dinput_poll
_dinput_poll:                           ## @dinput_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
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.1:
	movq	%rdi, %rbx
	movq	80(%rdi), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	88(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.2:
	movq	80(%rbx), %rdx
	movl	$8, %esi
	callq	_IDirectInputDevice8_GetDeviceState
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	88(%rbx), %rdi
	callq	_IDirectInputDevice8_Acquire
	movq	80(%rbx), %rdx
	movq	88(%rbx), %rdi
	movl	$8, %esi
	callq	_IDirectInputDevice8_GetDeviceState
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	80(%rbx), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
LBB0_5:
	cmpq	$0, 72(%rbx)
	je	LBB0_15
## %bb.6:
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	leaq	-32(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	72(%rbx), %rdi
	movl	$16, %esi
	movq	%r14, %rdx
	callq	_IDirectInputDevice8_GetDeviceState
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	72(%rbx), %rdi
	callq	_IDirectInputDevice8_Acquire
	movq	72(%rbx), %rdi
	leaq	-32(%rbp), %rdx
	movl	$16, %esi
	callq	_IDirectInputDevice8_GetDeviceState
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	-32(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
LBB0_9:
	movl	-20(%rbp), %eax
	movl	%eax, 68(%rbx)
	movl	-24(%rbp), %eax
	movl	%eax, 64(%rbx)
	movq	-32(%rbp), %rax
	cmpq	$0, (%rax)
	jne	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	callq	_unset_doubleclick_on_titlebar
LBB0_11:
	xorl	%eax, %eax
	callq	_doubleclick_on_titlebar_pressed
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	$0, 56(%rbx)
	movq	-32(%rbp), %rax
	jmp	LBB0_14
LBB0_13:
	movq	-32(%rbp), %rax
	movq	(%rax), %rcx
	movq	%rcx, 56(%rbx)
LBB0_14:
	movq	8(%rax), %rcx
	movq	%rcx, 48(%rbx)
	movq	16(%rax), %rcx
	movq	%rcx, 40(%rbx)
	movq	24(%rax), %rcx
	movq	%rcx, 32(%rbx)
	movq	32(%rax), %rax
	movq	%rax, 24(%rbx)
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	callq	_GetCursorPos
	xorl	%eax, %eax
	callq	_video_driver_window_get
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_ScreenToClient
	movaps	-48(%rbp), %xmm0
	movups	%xmm0, 8(%rbx)
LBB0_15:
	movq	(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_17
## %bb.16:
	xorl	%eax, %eax
	callq	*(%rcx)
LBB0_17:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_dinput_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dinput_poll
_dinput_poll:                           ; @dinput_poll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	cbz	x0, LBB0_17
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0, #80]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x0, [x19, #88]
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x2, [x19, #80]
	mov	w1, #8
	bl	_IDirectInputDevice8_GetDeviceState
	bl	_FAILED
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x0, [x19, #88]
	bl	_IDirectInputDevice8_Acquire
	ldp	x2, x0, [x19, #80]
	mov	w1, #8
	bl	_IDirectInputDevice8_GetDeviceState
	bl	_FAILED
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x0, [x19, #80]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
LBB0_5:
	ldr	x8, [x19, #72]
	cbz	x8, LBB0_15
; %bb.6:
	stp	xzr, xzr, [sp, #16]
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	x0, [x19, #72]
	mov	x2, sp
	mov	w1, #16
	bl	_IDirectInputDevice8_GetDeviceState
	bl	_FAILED
	cbz	x0, LBB0_9
; %bb.7:
	ldr	x0, [x19, #72]
	bl	_IDirectInputDevice8_Acquire
	ldr	x0, [x19, #72]
	mov	x2, sp
	mov	w1, #16
	bl	_IDirectInputDevice8_GetDeviceState
	bl	_FAILED
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
LBB0_9:
	ldr	d0, [sp, #8]
	str	d0, [x19, #64]
	ldr	x8, [sp]
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.10:
	bl	_doubleclick_on_titlebar_pressed
	cbz	x0, LBB0_13
LBB0_11:
	str	xzr, [x19, #56]
	ldr	x8, [sp]
	b	LBB0_14
LBB0_12:
	bl	_unset_doubleclick_on_titlebar
	bl	_doubleclick_on_titlebar_pressed
	cbnz	x0, LBB0_11
LBB0_13:
	ldr	x8, [sp]
	ldr	x9, [x8]
	str	x9, [x19, #56]
LBB0_14:
	ldr	x9, [x8, #8]
	str	x9, [x19, #48]
	ldr	x9, [x8, #16]
	str	x9, [x19, #40]
	ldr	x9, [x8, #24]
	str	x9, [x19, #32]
	ldr	x8, [x8, #32]
	str	x8, [x19, #24]
	add	x0, sp, #16
	bl	_GetCursorPos
	bl	_video_driver_window_get
	add	x1, sp, #16
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ScreenToClient
	ldr	q0, [sp, #16]
	stur	q0, [x19, #8]
LBB0_15:
	ldr	x8, [x19]
	cbz	x8, LBB0_17
; %bb.16:
	ldr	x8, [x8]
	blr	x8
LBB0_17:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_dinput_poll
.subsections_via_symbols
