	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grip_connect
_grip_connect:                          ## @grip_connect
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_GRIP_LENGTH_XT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rbx, 24(%rax)
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_gameport_set_drvdata
	movq	_GAMEPORT_MODE_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_gameport_open
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_50
## %bb.3:
	movq	%rbx, %rdi
	movl	$4, %esi
	movq	%r13, %rdx
	callq	_grip_gpp_read_packet
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	movl	$4, %esi
	movq	%r13, %rdx
	callq	_grip_xt_read_packet
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	testb	$7, 12(%r13)
	je	LBB0_7
## %bb.8:
	testb	$-16, 8(%r13)
	jne	LBB0_9
## %bb.10:
	movq	_GRIP_MODE_XT@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_51
LBB0_4:
	movq	_GRIP_MODE_GPP@GOTPCREL(%rip), %rax
LBB0_11:
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movq	%rax, (%rcx)
LBB0_12:
	movq	%rbx, %rdi
	movl	$6, %esi
	movq	%r13, %rdx
	callq	_grip_gpp_read_packet
	testl	%eax, %eax
	je	LBB0_20
## %bb.13:
	movq	%rbx, %rdi
	movl	$6, %esi
	movq	%r13, %rdx
	callq	_grip_xt_read_packet
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movq	(%r12), %rax
	jmp	LBB0_22
LBB0_20:
	movq	_GRIP_MODE_GPP@GOTPCREL(%rip), %rax
LBB0_21:
	movq	(%rax), %rcx
	movq	(%r12), %rax
	movq	%rcx, 8(%rax)
LBB0_22:
	cmpq	$0, (%rax)
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_25
## %bb.23:
	cmpq	$0, 8(%rax)
	je	LBB0_24
LBB0_25:
	movq	_grip_poll@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gameport_set_poll_handler
	movq	%rbx, %rdi
	movl	$20, %esi
	callq	_gameport_set_poll_interval
	leaq	8(%rbx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movb	$1, %bl
	xorl	%r13d, %r13d
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_38:                                ##   in Loop: Header=BB0_26 Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%r13,8), %rdi
	callq	_input_register_device
	testl	%eax, %eax
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_45
LBB0_39:                                ##   in Loop: Header=BB0_26 Depth=1
	xorl	%r15d, %r15d
	movl	$1, %r13d
	testb	$1, %bl
	movl	$0, %ebx
	je	LBB0_51
LBB0_26:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_31 Depth 2
                                        ##     Child Loop BB0_35 Depth 2
	movq	(%r12), %rax
	cmpq	$0, (%rax,%r13,8)
	je	LBB0_39
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=1
	xorl	%eax, %eax
	callq	_input_allocate_device
	movq	%rax, %r14
	movq	8(%r12), %rax
	movq	%r14, (%rax,%r13,8)
	testq	%r14, %r14
	je	LBB0_28
## %bb.29:                              ##   in Loop: Header=BB0_26 Depth=1
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	16(%r12), %rax
	movl	(%rax,%r13,4), %edi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movl	$4, %esi
	leaq	L_.str(%rip), %rdx
	movl	%r13d, %r8d
	callq	_snprintf
	movq	_grip_name@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movq	(%rcx,%r13,8), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 60(%r14)
	movq	16(%r12), %rax
	movl	(%rax,%r13,4), %eax
	movl	%eax, 56(%r14)
	movq	_BUS_GAMEPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r14)
	movq	_GAMEPORT_ID_VENDOR_GRAVIS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r14)
	movq	%rcx, 32(%r14)
	movl	$256, 40(%r14)                  ## imm = 0x100
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 24(%r14)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_input_set_drvdata
	movq	_grip_open@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	_grip_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_MASK
	movl	%eax, %r15d
	movq	_EV_ABS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_MASK
	orl	%r15d, %eax
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
	movq	_grip_abs@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	movq	(%r12), %rax
	movq	(%rax,%r13,8), %rcx
	movq	(%rdx,%rcx,8), %rdx
	movl	(%rdx), %esi
	testl	%esi, %esi
	js	LBB0_33
## %bb.30:                              ##   in Loop: Header=BB0_26 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_31
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_31 Depth=2
	movq	%r14, %rdi
	movl	$14, %edx
	movl	$52, %ecx
	movl	$1, %r8d
	movl	$2, %r9d
LBB0_44:                                ##   in Loop: Header=BB0_31 Depth=2
	callq	_input_set_abs_params
	movq	(%r15), %rdx
	movq	(%r12), %rax
	movq	(%rax,%r13,8), %rcx
	movq	(%rdx,%rcx,8), %rdx
	movl	4(%rdx,%rbx,4), %esi
	incq	%rbx
	testl	%esi, %esi
	js	LBB0_33
LBB0_31:                                ##   Parent Loop BB0_26 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_grip_cen@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rax,%rcx,4), %rax
	cmpq	%rax, %rbx
	jl	LBB0_32
## %bb.40:                              ##   in Loop: Header=BB0_31 Depth=2
	movq	_grip_anx@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rax,%rcx,4), %rax
	movq	%r14, %rdi
	cmpq	%rax, %rbx
	jge	LBB0_42
## %bb.41:                              ##   in Loop: Header=BB0_31 Depth=2
	movl	$3, %edx
	movl	$57, %ecx
	movl	$1, %r8d
	jmp	LBB0_43
	.p2align	4, 0x90
LBB0_42:                                ##   in Loop: Header=BB0_31 Depth=2
	movl	$-1, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
LBB0_43:                                ##   in Loop: Header=BB0_31 Depth=2
	xorl	%r9d, %r9d
	jmp	LBB0_44
	.p2align	4, 0x90
LBB0_33:                                ##   in Loop: Header=BB0_26 Depth=1
	movq	_grip_btn@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movl	(%rcx), %edi
	testl	%edi, %edi
	js	LBB0_38
## %bb.34:                              ##   in Loop: Header=BB0_26 Depth=1
	movl	$4, %ebx
	jmp	LBB0_35
	.p2align	4, 0x90
LBB0_37:                                ##   in Loop: Header=BB0_35 Depth=2
	movq	(%rax,%r13,8), %rcx
	movq	(%rdx,%rcx,8), %rcx
	movl	(%rcx,%rbx), %edi
	addq	$4, %rbx
	testl	%edi, %edi
	js	LBB0_38
LBB0_35:                                ##   Parent Loop BB0_26 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%edi, %edi
	je	LBB0_37
## %bb.36:                              ##   in Loop: Header=BB0_35 Depth=2
	movl	8(%r14), %esi
	callq	_set_bit
	movq	(%r15), %rdx
	movq	(%r12), %rax
	jmp	LBB0_37
LBB0_28:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	testb	$1, %bl
	je	LBB0_47
	jmp	LBB0_49
LBB0_45:
	movl	%eax, %r15d
	movq	8(%r12), %rax
	movq	(%rax,%r13,8), %rdi
	callq	_input_free_device
	testb	$1, %bl
	jne	LBB0_49
LBB0_47:
	movq	8(%r12), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_49
## %bb.48:
	callq	_input_unregister_device
	jmp	LBB0_49
LBB0_15:
	testb	$7, 12(%r13)
	je	LBB0_19
## %bb.16:
	testb	$-16, 8(%r13)
	je	LBB0_18
## %bb.17:
	movq	_GRIP_MODE_DC@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_24:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_49:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_gameport_close
LBB0_50:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_gameport_set_drvdata
	movq	%r12, %rdi
	callq	_kfree
LBB0_51:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_53
## %bb.52:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_GRIP_MODE_BD@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_19:
	movq	_GRIP_MODE_BD@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_9:
	movq	_GRIP_MODE_DC@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_18:
	movq	_GRIP_MODE_XT@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_53:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GRIP_LENGTH_XT,4,2             ## @GRIP_LENGTH_XT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GAMEPORT_MODE_RAW,4,2          ## @GAMEPORT_MODE_RAW
	.comm	_GRIP_MODE_GPP,8,3              ## @GRIP_MODE_GPP
	.comm	_GRIP_MODE_BD,8,3               ## @GRIP_MODE_BD
	.comm	_GRIP_MODE_XT,8,3               ## @GRIP_MODE_XT
	.comm	_GRIP_MODE_DC,8,3               ## @GRIP_MODE_DC
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_grip_poll,4,2                  ## @grip_poll
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/input%d"

	.comm	_grip_name,8,3                  ## @grip_name
	.comm	_BUS_GAMEPORT,4,2               ## @BUS_GAMEPORT
	.comm	_GAMEPORT_ID_VENDOR_GRAVIS,4,2  ## @GAMEPORT_ID_VENDOR_GRAVIS
	.comm	_grip_open,4,2                  ## @grip_open
	.comm	_grip_close,4,2                 ## @grip_close
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_EV_ABS,4,2                     ## @EV_ABS
	.comm	_grip_abs,8,3                   ## @grip_abs
	.comm	_grip_cen,8,3                   ## @grip_cen
	.comm	_grip_anx,8,3                   ## @grip_anx
	.comm	_grip_btn,8,3                   ## @grip_btn
	.no_dead_strip	_grip_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grip_connect
_grip_connect:                          ; @grip_connect
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _GRIP_LENGTH_XT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GRIP_LENGTH_XT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	str	x19, [x0, #24]
	mov	x0, x19
	mov	x1, x20
	bl	_gameport_set_drvdata
Lloh11:
	adrp	x8, _GAMEPORT_MODE_RAW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GAMEPORT_MODE_RAW@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x22
	bl	_gameport_open
	mov	x23, x0
	cbnz	w0, LBB0_45
; %bb.2:
	mov	x0, x19
	mov	w1, #4
	mov	x2, x21
	bl	_grip_gpp_read_packet
Lloh14:
	adrp	x22, _GRIP_MODE_GPP@GOTPAGE
Lloh15:
	ldr	x22, [x22, _GRIP_MODE_GPP@GOTPAGEOFF]
	cbz	w0, LBB0_7
; %bb.3:
	mov	x0, x19
	mov	w1, #4
	mov	x2, x21
	bl	_grip_xt_read_packet
	cbnz	w0, LBB0_9
; %bb.4:
	ldrb	w8, [x21, #12]
	tst	w8, #0x7
	b.eq	LBB0_48
; %bb.5:
	ldrb	w8, [x21, #8]
Lloh16:
	adrp	x9, _GRIP_MODE_DC@GOTPAGE
Lloh17:
	ldr	x9, [x9, _GRIP_MODE_DC@GOTPAGEOFF]
Lloh18:
	adrp	x10, _GRIP_MODE_XT@GOTPAGE
Lloh19:
	ldr	x10, [x10, _GRIP_MODE_XT@GOTPAGEOFF]
	tst	w8, #0xf0
	csel	x8, x10, x9, eq
	b	LBB0_8
LBB0_6:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_46
LBB0_7:
	mov	x8, x22
LBB0_8:
	ldr	x8, [x8]
	ldr	x9, [x20]
	str	x8, [x9]
LBB0_9:
	mov	x0, x19
	mov	w1, #6
	mov	x2, x21
	bl	_grip_gpp_read_packet
	cbz	w0, LBB0_12
; %bb.10:
	mov	x0, x19
	mov	w1, #6
	mov	x2, x21
	bl	_grip_xt_read_packet
	cbz	w0, LBB0_40
; %bb.11:
	ldr	x8, [x20]
	ldr	x9, [x8]
	cbnz	x9, LBB0_15
	b	LBB0_14
LBB0_12:
	ldr	x9, [x22]
LBB0_13:
	ldr	x8, [x20]
	str	x9, [x8, #8]
	ldr	x9, [x8]
	cbnz	x9, LBB0_15
LBB0_14:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_43
LBB0_15:
Lloh23:
	adrp	x8, _grip_poll@GOTPAGE
Lloh24:
	ldr	x8, [x8, _grip_poll@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gameport_set_poll_handler
	mov	x0, x19
	mov	w1, #20
	bl	_gameport_set_poll_interval
	mov	x21, #0
	add	x8, x19, #8
	stur	x8, [x29, #-96]                 ; 8-byte Folded Spill
	mov	w8, #1
Lloh26:
	adrp	x28, _grip_abs@GOTPAGE
Lloh27:
	ldr	x28, [x28, _grip_abs@GOTPAGEOFF]
Lloh28:
	adrp	x25, _grip_cen@GOTPAGE
Lloh29:
	ldr	x25, [x25, _grip_cen@GOTPAGEOFF]
Lloh30:
	adrp	x26, _grip_btn@GOTPAGE
Lloh31:
	ldr	x26, [x26, _grip_btn@GOTPAGEOFF]
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x20, #8]
	ldr	x0, [x8, x21, lsl #3]
	bl	_input_register_device
	cbnz	w0, LBB0_37
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	mov	w8, #0
	mov	w21, #1
	tbz	w27, #0, LBB0_35
LBB0_18:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_24 Depth 2
                                        ;     Child Loop BB0_33 Depth 2
	mov	x27, x8
	ldr	x8, [x20]
	ldr	x8, [x8, x21, lsl #3]
	cbz	x8, LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	bl	_input_allocate_device
	ldr	x8, [x20, #8]
	str	x0, [x8, x21, lsl #3]
	cbz	x0, LBB0_36
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x23, x0
	mov	x22, x27
	ldr	x8, [x20, #16]
	lsl	x24, x21, #2
	ldr	w0, [x8, x24]
	mov	x27, x19
	ldr	x3, [x19]
	mov	w1, #4
Lloh32:
	adrp	x2, l_.str@PAGE
Lloh33:
	add	x2, x2, l_.str@PAGEOFF
	mov	x4, x21
	bl	_snprintf
Lloh34:
	adrp	x8, _grip_name@GOTPAGE
Lloh35:
	ldr	x8, [x8, _grip_name@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	ldr	x9, [x20]
	lsl	x19, x21, #3
	ldr	x9, [x9, x19]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x23, #60]
	ldr	x8, [x20, #16]
	ldr	w8, [x8, x24]
	str	w8, [x23, #56]
Lloh37:
	adrp	x8, _BUS_GAMEPORT@GOTPAGE
Lloh38:
	ldr	x8, [x8, _BUS_GAMEPORT@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	str	w8, [x23, #48]
Lloh40:
	adrp	x8, _GAMEPORT_ID_VENDOR_GRAVIS@GOTPAGE
Lloh41:
	ldr	x8, [x8, _GAMEPORT_ID_VENDOR_GRAVIS@GOTPAGEOFF]
Lloh42:
	ldr	w10, [x8]
	mov	w8, #256
	stp	w8, w10, [x23, #40]
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	stp	x8, x9, [x23, #24]
	mov	x0, x23
	mov	x1, x20
	bl	_input_set_drvdata
Lloh43:
	adrp	x8, _grip_open@GOTPAGE
Lloh44:
	ldr	x8, [x8, _grip_open@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
Lloh46:
	adrp	x9, _grip_close@GOTPAGE
Lloh47:
	ldr	x9, [x9, _grip_close@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	stp	w9, w8, [x23, #12]
Lloh49:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh50:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	bl	_BIT_MASK
	mov	x24, x0
Lloh52:
	adrp	x8, _EV_ABS@GOTPAGE
Lloh53:
	ldr	x8, [x8, _EV_ABS@GOTPAGEOFF]
Lloh54:
	ldr	w0, [x8]
	bl	_BIT_MASK
	orr	w8, w0, w24
	ldr	x9, [x23]
	str	w8, [x9]
	ldr	x10, [x28]
	ldr	x8, [x20]
	ldr	x9, [x8, x19]
	ldr	x10, [x10, x9, lsl #3]
	ldr	w1, [x10]
	tbnz	w1, #31, LBB0_29
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x24, #0
	mov	x19, x27
	mov	x27, x22
Lloh55:
	adrp	x22, _grip_anx@GOTPAGE
Lloh56:
	ldr	x22, [x22, _grip_anx@GOTPAGEOFF]
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=2
	mov	x0, x23
	mov	w2, #14
	mov	w3, #52
	mov	w4, #1
	mov	w5, #2
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=2
	bl	_input_set_abs_params
	ldr	x10, [x28]
	ldr	x8, [x20]
	ldr	x9, [x8, x21, lsl #3]
	ldr	x10, [x10, x9, lsl #3]
	add	x10, x10, x24, lsl #2
	add	x24, x24, #1
	ldr	w1, [x10, #4]
	tbnz	w1, #31, LBB0_30
LBB0_24:                                ;   Parent Loop BB0_18 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x25]
	ldrsw	x8, [x8, x9, lsl #2]
	cmp	x24, x8
	b.lt	LBB0_22
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=2
	ldr	x8, [x22]
	ldrsw	x8, [x8, x9, lsl #2]
	mov	x0, x23
	cmp	x24, x8
	b.ge	LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_24 Depth=2
	mov	w2, #3
	mov	w3, #57
	mov	w4, #1
	b	LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_24 Depth=2
	mov	w2, #-1
	mov	w3, #1
	mov	w4, #0
LBB0_28:                                ;   in Loop: Header=BB0_24 Depth=2
	mov	w5, #0
	b	LBB0_23
LBB0_29:                                ;   in Loop: Header=BB0_18 Depth=1
	mov	x19, x27
	mov	x27, x22
LBB0_30:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	x10, [x26]
	ldr	x9, [x10, x9, lsl #3]
	ldr	w0, [x9]
	tbnz	w0, #31, LBB0_16
; %bb.31:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	w24, #4
	b	LBB0_33
LBB0_32:                                ;   in Loop: Header=BB0_33 Depth=2
	ldr	x9, [x8, x21, lsl #3]
	ldr	x9, [x10, x9, lsl #3]
	ldr	w0, [x9, x24]
	add	x24, x24, #4
	tbnz	w0, #31, LBB0_16
LBB0_33:                                ;   Parent Loop BB0_18 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbz	w0, LBB0_32
; %bb.34:                               ;   in Loop: Header=BB0_33 Depth=2
	ldr	w1, [x23, #8]
	bl	_set_bit
	ldr	x10, [x26]
	ldr	x8, [x20]
	b	LBB0_32
LBB0_35:
	mov	w23, #0
	b	LBB0_46
LBB0_36:
Lloh57:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh58:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh59:
	ldr	w8, [x8]
	neg	w23, w8
	tbz	w27, #0, LBB0_38
	b	LBB0_44
LBB0_37:
	mov	x23, x0
	ldr	x8, [x20, #8]
	ldr	x0, [x8, x21, lsl #3]
	bl	_input_free_device
	tbnz	w27, #0, LBB0_44
LBB0_38:
	ldr	x8, [x20, #8]
	ldr	x0, [x8]
	cbz	x0, LBB0_44
; %bb.39:
	bl	_input_unregister_device
	b	LBB0_44
LBB0_40:
	ldrb	w8, [x21, #12]
	tst	w8, #0x7
	b.eq	LBB0_49
; %bb.41:
	ldrb	w8, [x21, #8]
	tst	w8, #0xf0
	b.eq	LBB0_50
; %bb.42:
Lloh60:
	adrp	x8, _GRIP_MODE_DC@GOTPAGE
Lloh61:
	ldr	x8, [x8, _GRIP_MODE_DC@GOTPAGEOFF]
Lloh62:
	ldr	x9, [x8]
	b	LBB0_13
LBB0_43:
Lloh63:
	adrp	x8, _ENODEV@GOTPAGE
Lloh64:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh65:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_44:
	mov	x0, x19
	bl	_gameport_close
LBB0_45:
	mov	x0, x19
	mov	x1, #0
	bl	_gameport_set_drvdata
	mov	x0, x20
	bl	_kfree
LBB0_46:
	ldur	x8, [x29, #-88]
Lloh66:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh67:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh68:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_51
; %bb.47:
	mov	x0, x23
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_48:
Lloh69:
	adrp	x8, _GRIP_MODE_BD@GOTPAGE
Lloh70:
	ldr	x8, [x8, _GRIP_MODE_BD@GOTPAGEOFF]
	b	LBB0_8
LBB0_49:
Lloh71:
	adrp	x8, _GRIP_MODE_BD@GOTPAGE
Lloh72:
	ldr	x8, [x8, _GRIP_MODE_BD@GOTPAGEOFF]
Lloh73:
	ldr	x9, [x8]
	b	LBB0_13
LBB0_50:
Lloh74:
	adrp	x8, _GRIP_MODE_XT@GOTPAGE
Lloh75:
	ldr	x8, [x8, _GRIP_MODE_XT@GOTPAGEOFF]
Lloh76:
	ldr	x9, [x8]
	b	LBB0_13
LBB0_51:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGot	Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.cfi_endproc
                                        ; -- End function
	.comm	_GRIP_LENGTH_XT,4,2             ; @GRIP_LENGTH_XT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GAMEPORT_MODE_RAW,4,2          ; @GAMEPORT_MODE_RAW
	.comm	_GRIP_MODE_GPP,8,3              ; @GRIP_MODE_GPP
	.comm	_GRIP_MODE_BD,8,3               ; @GRIP_MODE_BD
	.comm	_GRIP_MODE_XT,8,3               ; @GRIP_MODE_XT
	.comm	_GRIP_MODE_DC,8,3               ; @GRIP_MODE_DC
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_grip_poll,4,2                  ; @grip_poll
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/input%d"

	.comm	_grip_name,8,3                  ; @grip_name
	.comm	_BUS_GAMEPORT,4,2               ; @BUS_GAMEPORT
	.comm	_GAMEPORT_ID_VENDOR_GRAVIS,4,2  ; @GAMEPORT_ID_VENDOR_GRAVIS
	.comm	_grip_open,4,2                  ; @grip_open
	.comm	_grip_close,4,2                 ; @grip_close
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_EV_ABS,4,2                     ; @EV_ABS
	.comm	_grip_abs,8,3                   ; @grip_abs
	.comm	_grip_cen,8,3                   ; @grip_cen
	.comm	_grip_anx,8,3                   ; @grip_anx
	.comm	_grip_btn,8,3                   ; @grip_btn
	.no_dead_strip	_grip_connect
.subsections_via_symbols
