	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tsc_connect
_tsc_connect:                           ## @tsc_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	movq	%rax, %r15
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_input_allocate_device
	movq	%rax, %r13
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	testq	%r13, %r13
	je	LBB0_2
## %bb.3:
	movq	%r14, 16(%r15)
	movq	%r13, (%r15)
	movl	8(%r15), %edi
	movq	(%r14), %rcx
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r13)
	movl	8(%r15), %eax
	movl	%eax, 48(%r13)
	movq	_BUS_RS232@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r13)
	movq	_SERIO_TSC40@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r13)
	movabsq	$4294967336, %rax               ## imm = 0x100000028
	movq	%rax, 32(%r13)
	leaq	8(%r14), %rax
	movq	%rax, 24(%r13)
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_MASK
	movl	%eax, %ebx
	movq	_EV_ABS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_MASK
	orl	%ebx, %eax
	movq	8(%r13), %rcx
	movl	%eax, (%rcx)
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r13), %esi
	callq	___set_bit
	movq	(%r15), %rdi
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rbx
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	movl	$1023, %ecx                     ## imm = 0x3FF
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	(%r15), %rdi
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	movl	$1023, %ecx                     ## imm = 0x3FF
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_serio_set_drvdata
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_serio_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	(%r15), %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_serio_close
LBB0_6:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_serio_set_drvdata
	jmp	LBB0_7
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_7:
	movq	%r13, %rdi
	callq	_input_free_device
	movq	%r15, %rdi
	callq	_kfree
	movl	%ebx, %r12d
LBB0_8:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/input0"

L_.str.1:                               ## @.str.1
	.asciz	"TSC-10/25/40 Serial TouchScreen"

	.comm	_BUS_RS232,4,2                  ## @BUS_RS232
	.comm	_SERIO_TSC40,4,2                ## @SERIO_TSC40
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_EV_ABS,4,2                     ## @EV_ABS
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.no_dead_strip	_tsc_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function tsc_connect
lCPI0_0:
	.long	40                              ; 0x28
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_tsc_connect:                           ; @tsc_connect
	.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	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	mov	x19, x0
	bl	_input_allocate_device
	mov	x20, x0
	cmp	x19, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_6
LBB0_2:
	str	x21, [x19, #16]
	str	x20, [x19]
	ldr	w0, [x19, #8]
	mov	x23, x21
	ldr	x3, [x23], #8
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	bl	_snprintf
Lloh8:
	adrp	x8, l_.str.1@PAGE
Lloh9:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x20]
	ldr	w8, [x19, #8]
	str	w8, [x20, #48]
Lloh10:
	adrp	x8, _BUS_RS232@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BUS_RS232@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _SERIO_TSC40@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SERIO_TSC40@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #40]
Lloh16:
	adrp	x8, lCPI0_0@PAGE
Lloh17:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x20, #32]
	str	x23, [x20, #24]
Lloh18:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_BIT_MASK
	mov	x23, x0
Lloh21:
	adrp	x8, _EV_ABS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EV_ABS@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_BIT_MASK
	orr	w8, w0, w23
	ldr	x9, [x20, #8]
	str	w8, [x9]
Lloh24:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	ldr	w1, [x20, #16]
	bl	___set_bit
	ldr	x0, [x19]
Lloh27:
	adrp	x8, _ABS_X@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	w2, #0
	mov	w3, #1023
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	ldr	x0, [x19]
Lloh30:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	w2, #0
	mov	w3, #1023
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	mov	x0, x21
	mov	x1, x19
	bl	_serio_set_drvdata
	mov	x0, x21
	mov	x1, x22
	bl	_serio_open
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	x0, [x19]
	bl	_input_register_device
	mov	x22, x0
	cbz	w0, LBB0_7
; %bb.4:
	mov	x0, x21
	bl	_serio_close
LBB0_5:
	mov	x0, x21
	mov	x1, #0
	bl	_serio_set_drvdata
LBB0_6:
	mov	x0, x20
	bl	_input_free_device
	mov	x0, x19
	bl	_kfree
LBB0_7:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdrp	Lloh16, Lloh18
	.loh AdrpLdr	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/input0"

l_.str.1:                               ; @.str.1
	.asciz	"TSC-10/25/40 Serial TouchScreen"

	.comm	_BUS_RS232,4,2                  ; @BUS_RS232
	.comm	_SERIO_TSC40,4,2                ; @SERIO_TSC40
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_EV_ABS,4,2                     ; @EV_ABS
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.no_dead_strip	_tsc_connect
.subsections_via_symbols
