	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function register_slot
_register_slot:                         ## @register_slot
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	8(%rsi), %rax
	movslq	%edi, %rcx
	movq	(%rax,%rcx,8), %r13
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_input_allocate_device
	movq	%rax, 24(%r13)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_grip_name@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r13), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 48(%r15)
	movq	_BUS_GAMEPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r15)
	movq	_GAMEPORT_ID_VENDOR_GRAVIS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r15)
	addl	$256, %ecx                      ## imm = 0x100
	movl	%ecx, 32(%r15)
	movl	$256, 36(%r15)                  ## imm = 0x100
	movq	(%r14), %rax
	movq	%rax, 24(%r15)
	movq	%r15, %rdi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rsi
	callq	_input_set_drvdata
	movq	_grip_open@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	_grip_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_MASK
	movl	%eax, %r12d
	movq	_EV_ABS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_MASK
	orl	%r12d, %eax
	movq	(%r15), %rcx
	movl	%eax, (%rcx)
	movq	_grip_abs@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	(%r13), %rax
	movq	(%rcx,%rax,8), %rcx
	movl	(%rcx), %esi
	testl	%esi, %esi
	js	LBB0_5
## %bb.3:
	movl	$4, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	$-1, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	(%r12), %rcx
	movq	(%r13), %rax
	movq	(%rcx,%rax,8), %rcx
	movl	(%rcx,%rbx), %esi
	addq	$4, %rbx
	testl	%esi, %esi
	jns	LBB0_4
LBB0_5:
	movq	_grip_btn@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	(%rcx,%rax,8), %rdx
	movl	(%rdx), %edi
	testl	%edi, %edi
	js	LBB0_10
## %bb.6:
	movl	$4, %r14d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rcx,%rax,8), %rdx
	movl	(%rdx,%r14), %edi
	addq	$4, %r14
	testl	%edi, %edi
	js	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	testl	%edi, %edi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	8(%r15), %esi
	callq	_set_bit
	movq	(%r12), %rcx
	movq	(%r13), %rax
	jmp	LBB0_9
LBB0_10:
	movq	24(%r13), %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r12d
	movq	24(%r13), %rdi
	callq	_input_free_device
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_14
LBB0_12:
	movl	$1, 8(%r13)
	xorl	%r12d, %r12d
	cmpq	$0, 16(%r13)
	je	LBB0_14
## %bb.13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_report_slot
LBB0_14:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.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_btn,8,3                   ## @grip_btn
	.no_dead_strip	_register_slot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function register_slot
_register_slot:                         ; @register_slot
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1, #8]
	ldr	x23, [x8, w0, sxtw #3]
	bl	_input_allocate_device
	str	x0, [x23, #24]
	cbz	x0, LBB0_11
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x8, _grip_name@GOTPAGE
Lloh1:
	ldr	x8, [x8, _grip_name@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x23]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x0, #48]
Lloh3:
	adrp	x8, _BUS_GAMEPORT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BUS_GAMEPORT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x10, _GAMEPORT_ID_VENDOR_GRAVIS@GOTPAGE
Lloh7:
	ldr	x10, [x10, _GAMEPORT_ID_VENDOR_GRAVIS@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	stp	w10, w8, [x0, #40]
	add	w8, w9, #256
	mov	w9, #256
	stp	w8, w9, [x0, #32]
	ldr	x8, [x20]
	str	x8, [x0, #24]
	mov	x1, x20
	bl	_input_set_drvdata
Lloh9:
	adrp	x8, _grip_open@GOTPAGE
Lloh10:
	ldr	x8, [x8, _grip_open@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _grip_close@GOTPAGE
Lloh13:
	ldr	x9, [x9, _grip_close@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #12]
Lloh15:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_BIT_MASK
	mov	x22, x0
Lloh18:
	adrp	x8, _EV_ABS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EV_ABS@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_BIT_MASK
	orr	w8, w0, w22
	ldr	x9, [x21]
Lloh21:
	adrp	x22, _grip_abs@GOTPAGE
Lloh22:
	ldr	x22, [x22, _grip_abs@GOTPAGEOFF]
	str	w8, [x9]
	ldr	x9, [x22]
	ldr	x8, [x23]
	ldr	x9, [x9, x8, lsl #3]
	ldr	w1, [x9]
	tbnz	w1, #31, LBB0_4
; %bb.2:
	mov	w24, #4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	w2, #-1
	mov	w3, #1
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	ldr	x9, [x22]
	ldr	x8, [x23]
	ldr	x9, [x9, x8, lsl #3]
	ldr	w1, [x9, x24]
	add	x24, x24, #4
	tbz	w1, #31, LBB0_3
LBB0_4:
Lloh23:
	adrp	x22, _grip_btn@GOTPAGE
Lloh24:
	ldr	x22, [x22, _grip_btn@GOTPAGEOFF]
	ldr	x9, [x22]
	ldr	x10, [x9, x8, lsl #3]
	ldr	w0, [x10]
	tbnz	w0, #31, LBB0_9
; %bb.5:
	mov	w24, #4
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x10, [x9, x8, lsl #3]
	ldr	w0, [x10, x24]
	add	x24, x24, #4
	tbnz	w0, #31, LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x21, #8]
	bl	_set_bit
	ldr	x9, [x22]
	ldr	x8, [x23]
	b	LBB0_6
LBB0_9:
	ldr	x0, [x23, #24]
	bl	_input_register_device
	cbz	w0, LBB0_12
; %bb.10:
	mov	x21, x0
	ldr	x0, [x23, #24]
	bl	_input_free_device
	b	LBB0_15
LBB0_11:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_15
LBB0_12:
	mov	w8, #1
	str	w8, [x23, #8]
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_14
; %bb.13:
	mov	x0, x20
	mov	x1, x19
	bl	_report_slot
LBB0_14:
	mov	w21, #0
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.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_btn,8,3                   ; @grip_btn
	.no_dead_strip	_register_slot
.subsections_via_symbols
