	.file	"extr_wacom_serial4.c_wacom_connect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s/input0"
	.text
	.p2align 4
	.type	wacom_connect, @function
wacom_connect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, DWORD PTR ENOMEM[rip]
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	mov	edi, 64
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	call	kzalloc@PLT
	mov	r12, rax
	xor	eax, eax
	call	input_allocate_device@PLT
	mov	rbp, rax
	test	r12, r12
	je	.L10
	test	rax, rax
	je	.L10
	mov	QWORD PTR 24[r12], rax
	mov	rcx, QWORD PTR 0[r13]
	lea	rdx, .LC0[rip]
	movabs	rax, 17179869185
	mov	QWORD PTR [r12], rax
	mov	edi, DWORD PTR 40[r12]
	mov	esi, 4
	mov	QWORD PTR 48[r12], 0
	mov	QWORD PTR 56[r12], 0
	call	snprintf@PLT
	mov	eax, DWORD PTR 40[r12]
	mov	edi, DWORD PTR EV_KEY[rip]
	mov	DWORD PTR 44[rbp], eax
	mov	eax, DWORD PTR BUS_RS232[rip]
	mov	DWORD PTR 40[rbp], eax
	mov	eax, DWORD PTR SERIO_WACOM_IV[rip]
	mov	DWORD PTR 36[rbp], eax
	mov	eax, DWORD PTR 12[r13]
	mov	DWORD PTR 32[rbp], eax
	lea	rax, 8[r13]
	mov	QWORD PTR 24[rbp], rax
	call	BIT_MASK@PLT
	mov	edi, DWORD PTR EV_ABS[rip]
	mov	r14d, eax
	call	BIT_MASK@PLT
	mov	edi, DWORD PTR EV_REL[rip]
	or	r14d, eax
	call	BIT_MASK@PLT
	mov	rdx, QWORD PTR 0[rbp]
	or	r14d, eax
	mov	DWORD PTR [rdx], r14d
	mov	esi, DWORD PTR 20[rbp]
	mov	edi, DWORD PTR ABS_MISC[rip]
	call	set_bit@PLT
	mov	esi, DWORD PTR 12[rbp]
	mov	edi, DWORD PTR BTN_TOOL_PEN[rip]
	call	set_bit@PLT
	mov	esi, DWORD PTR 12[rbp]
	mov	edi, DWORD PTR BTN_TOOL_RUBBER[rip]
	call	set_bit@PLT
	mov	esi, DWORD PTR 12[rbp]
	mov	edi, DWORD PTR BTN_TOOL_MOUSE[rip]
	call	set_bit@PLT
	mov	esi, DWORD PTR 12[rbp]
	mov	edi, DWORD PTR BTN_TOUCH[rip]
	call	set_bit@PLT
	mov	esi, DWORD PTR 12[rbp]
	mov	edi, DWORD PTR BTN_STYLUS[rip]
	call	set_bit@PLT
	mov	esi, DWORD PTR 12[rbp]
	mov	edi, DWORD PTR BTN_LEFT[rip]
	call	set_bit@PLT
	mov	esi, DWORD PTR 12[rbp]
	mov	edi, DWORD PTR BTN_RIGHT[rip]
	call	set_bit@PLT
	mov	esi, DWORD PTR 12[rbp]
	mov	edi, DWORD PTR BTN_MIDDLE[rip]
	call	set_bit@PLT
	mov	rsi, r12
	mov	rdi, r13
	call	serio_set_drvdata@PLT
	mov	rsi, r15
	mov	rdi, r13
	call	serio_open@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L4
	mov	rsi, r13
	mov	rdi, r12
	call	wacom_setup@PLT
	mov	r14d, eax
	test	eax, eax
	je	.L22
.L5:
	mov	rdi, r13
	call	serio_close@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	neg	r14d
.L4:
	xor	esi, esi
	mov	rdi, r13
	call	serio_set_drvdata@PLT
	mov	rdi, rbp
	call	input_free_device@PLT
	mov	rdi, r12
	call	kfree@PLT
.L1:
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r14d
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	esi, DWORD PTR 16[rbp]
	mov	edi, DWORD PTR INPUT_PROP_DIRECT[rip]
	call	set_bit@PLT
	mov	eax, DWORD PTR 8[r12]
	test	DWORD PTR F_COVERS_SCREEN[rip], eax
	je	.L23
.L6:
	test	DWORD PTR F_HAS_STYLUS2[rip], eax
	jne	.L24
.L7:
	test	DWORD PTR F_HAS_SCROLLWHEEL[rip], eax
	jne	.L25
.L8:
	mov	edx, DWORD PTR 36[r12]
	mov	rdi, QWORD PTR 24[r12]
	mov	esi, DWORD PTR ABS_X[rip]
	call	input_abs_set_res@PLT
	mov	edx, DWORD PTR 32[r12]
	mov	rdi, QWORD PTR 24[r12]
	mov	esi, DWORD PTR ABS_Y[rip]
	call	input_abs_set_res@PLT
	mov	ecx, DWORD PTR 12[r12]
	xor	r9d, r9d
	xor	r8d, r8d
	mov	rdi, QWORD PTR 24[r12]
	mov	esi, DWORD PTR ABS_X[rip]
	xor	edx, edx
	call	input_set_abs_params@PLT
	mov	ecx, DWORD PTR 16[r12]
	xor	r9d, r9d
	xor	r8d, r8d
	mov	rdi, QWORD PTR 24[r12]
	mov	esi, DWORD PTR ABS_Y[rip]
	xor	edx, edx
	call	input_set_abs_params@PLT
	mov	eax, DWORD PTR [r12]
	xor	r9d, r9d
	xor	r8d, r8d
	mov	rdi, QWORD PTR 24[r12]
	mov	esi, DWORD PTR ABS_PRESSURE[rip]
	mov	edx, -1
	lea	ecx, 7[rax]
	mov	eax, 1
	sal	eax, cl
	lea	ecx, -1[rax]
	call	input_set_abs_params@PLT
	mov	rdi, QWORD PTR 24[r12]
	call	input_register_device@PLT
	mov	r14d, eax
	test	eax, eax
	je	.L1
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L23:
	mov	esi, DWORD PTR 16[rbp]
	mov	edi, DWORD PTR INPUT_PROP_POINTER[rip]
	call	__set_bit@PLT
	mov	eax, DWORD PTR 8[r12]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L25:
	mov	esi, DWORD PTR 8[rbp]
	mov	edi, DWORD PTR REL_WHEEL[rip]
	call	__set_bit@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L24:
	mov	esi, DWORD PTR 12[rbp]
	mov	edi, DWORD PTR BTN_STYLUS2[rip]
	call	__set_bit@PLT
	mov	eax, DWORD PTR 8[r12]
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	wacom_connect, .-wacom_connect
	.comm	SERIO_WACOM_IV,4,4
	.comm	REL_WHEEL,4,4
	.comm	INPUT_PROP_POINTER,4,4
	.comm	INPUT_PROP_DIRECT,4,4
	.comm	GFP_KERNEL,4,4
	.comm	F_HAS_STYLUS2,4,4
	.comm	F_HAS_SCROLLWHEEL,4,4
	.comm	F_COVERS_SCREEN,4,4
	.comm	EV_REL,4,4
	.comm	EV_KEY,4,4
	.comm	EV_ABS,4,4
	.comm	ENOMEM,4,4
	.comm	BUS_RS232,4,4
	.comm	BTN_TOUCH,4,4
	.comm	BTN_TOOL_RUBBER,4,4
	.comm	BTN_TOOL_PEN,4,4
	.comm	BTN_TOOL_MOUSE,4,4
	.comm	BTN_STYLUS2,4,4
	.comm	BTN_STYLUS,4,4
	.comm	BTN_RIGHT,4,4
	.comm	BTN_MIDDLE,4,4
	.comm	BTN_LEFT,4,4
	.comm	ABS_Y,4,4
	.comm	ABS_X,4,4
	.comm	ABS_PRESSURE,4,4
	.comm	ABS_MISC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_wacom_serial4.c_wacom_connect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s/input0\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wacom_connect, %function
wacom_connect:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r2, .L25
	ldr	r3, .L25+4
	sub	sp, sp, #12
	mov	r6, r0
	mov	r8, r1
	mov	r0, #44
	ldr	r1, [r2]
	ldr	r7, [r3]
	bl	kzalloc
	mov	r5, r0
	bl	input_allocate_device
	clz	r3, r0
	cmp	r5, #0
	lsr	r3, r3, #5
	moveq	r3, #1
	cmp	r3, #0
	mov	r4, r0
	rsbne	r7, r7, #0
	beq	.L20
.L3:
	mov	r1, #0
	mov	r0, r6
	bl	serio_set_drvdata
	mov	r0, r4
	bl	input_free_device
	mov	r0, r5
	bl	kfree
.L1:
	mov	r0, r7
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L20:
	mov	r1, #4
	mov	r2, #1
	str	r0, [r5, #20]
	str	r3, [r5, #36]
	str	r3, [r5, #40]
	str	r2, [r5]
	ldr	r3, [r6]
	ldr	r2, .L25+8
	str	r1, [r5, #4]
	ldr	r0, [r5, #32]
	bl	snprintf
	ldr	r3, .L25+12
	ldr	r2, .L25+16
	ldr	r3, [r3]
	ldr	ip, [r5, #32]
	ldr	r1, [r6, #8]
	ldr	r0, [r2]
	ldr	r2, .L25+20
	str	r3, [r4, #32]
	add	r3, r6, #4
	str	ip, [r4, #36]
	str	r1, [r4, #24]
	str	r0, [r4, #28]
	str	r3, [r4, #20]
	ldr	r0, [r2]
	bl	BIT_MASK
	ldr	r3, .L25+24
	mov	r7, r0
	ldr	r0, [r3]
	bl	BIT_MASK
	ldr	r3, .L25+28
	orr	r7, r7, r0
	ldr	r0, [r3]
	bl	BIT_MASK
	ldr	r2, [r4]
	ldr	r3, .L25+32
	orr	r7, r7, r0
	str	r7, [r2]
	ldr	r1, [r4, #16]
	ldr	r0, [r3]
	bl	set_bit
	ldr	r3, .L25+36
	ldr	r1, [r4, #8]
	ldr	r0, [r3]
	bl	set_bit
	ldr	r3, .L25+40
	ldr	r1, [r4, #8]
	ldr	r0, [r3]
	bl	set_bit
	ldr	r3, .L25+44
	ldr	r1, [r4, #8]
	ldr	r0, [r3]
	bl	set_bit
	ldr	r3, .L25+48
	ldr	r1, [r4, #8]
	ldr	r0, [r3]
	bl	set_bit
	ldr	r3, .L25+52
	ldr	r1, [r4, #8]
	ldr	r0, [r3]
	bl	set_bit
	ldr	r3, .L25+56
	ldr	r1, [r4, #8]
	ldr	r0, [r3]
	bl	set_bit
	ldr	r3, .L25+60
	ldr	r1, [r4, #8]
	ldr	r0, [r3]
	bl	set_bit
	ldr	r3, .L25+64
	ldr	r1, [r4, #8]
	ldr	r0, [r3]
	bl	set_bit
	mov	r1, r5
	mov	r0, r6
	bl	serio_set_drvdata
	mov	r1, r8
	mov	r0, r6
	bl	serio_open
	subs	r7, r0, #0
	bne	.L3
	mov	r1, r6
	mov	r0, r5
	bl	wacom_setup
	subs	r7, r0, #0
	beq	.L21
.L4:
	mov	r0, r6
	bl	serio_close
	b	.L3
.L21:
	ldr	r3, .L25+68
	ldr	r1, [r4, #12]
	ldr	r0, [r3]
	bl	set_bit
	ldr	r2, .L25+72
	ldr	r3, [r5, #8]
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L22
.L5:
	ldr	r2, .L25+76
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L23
.L6:
	ldr	r2, .L25+80
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L24
.L7:
	mov	r7, #0
	ldr	r9, .L25+84
	ldr	r8, .L25+88
	ldr	r1, [r9]
	ldr	r2, [r5, #28]
	ldr	r0, [r5, #20]
	bl	input_abs_set_res
	ldr	r1, [r8]
	ldr	r2, [r5, #24]
	ldr	r0, [r5, #20]
	bl	input_abs_set_res
	ldr	r3, [r5, #12]
	mov	r2, r7
	ldr	r0, [r5, #20]
	ldr	r1, [r9]
	str	r7, [sp, #4]
	str	r7, [sp]
	bl	input_set_abs_params
	ldr	r3, [r5, #16]
	ldr	r1, [r8]
	mov	r2, r7
	ldr	r0, [r5, #20]
	str	r7, [sp, #4]
	str	r7, [sp]
	bl	input_set_abs_params
	mvn	r1, #0
	ldr	r3, [r5]
	ldr	r2, .L25+92
	ldr	r0, [r5, #20]
	add	r3, r3, #7
	str	r7, [sp, #4]
	str	r7, [sp]
	mvn	r3, r1, lsl r3
	ldr	r1, [r2]
	mvn	r2, #0
	bl	input_set_abs_params
	ldr	r0, [r5, #20]
	bl	input_register_device
	subs	r7, r0, #0
	beq	.L1
	b	.L4
.L22:
	ldr	r3, .L25+96
	ldr	r1, [r4, #12]
	ldr	r0, [r3]
	bl	__set_bit
	ldr	r3, [r5, #8]
	b	.L5
.L24:
	ldr	r3, .L25+100
	ldr	r1, [r4, #4]
	ldr	r0, [r3]
	bl	__set_bit
	b	.L7
.L23:
	ldr	r3, .L25+104
	ldr	r1, [r4, #8]
	ldr	r0, [r3]
	bl	__set_bit
	ldr	r3, [r5, #8]
	b	.L6
.L26:
	.align	2
.L25:
	.word	GFP_KERNEL
	.word	ENOMEM
	.word	.LC0
	.word	BUS_RS232
	.word	SERIO_WACOM_IV
	.word	EV_KEY
	.word	EV_ABS
	.word	EV_REL
	.word	ABS_MISC
	.word	BTN_TOOL_PEN
	.word	BTN_TOOL_RUBBER
	.word	BTN_TOOL_MOUSE
	.word	BTN_TOUCH
	.word	BTN_STYLUS
	.word	BTN_LEFT
	.word	BTN_RIGHT
	.word	BTN_MIDDLE
	.word	INPUT_PROP_DIRECT
	.word	F_COVERS_SCREEN
	.word	F_HAS_STYLUS2
	.word	F_HAS_SCROLLWHEEL
	.word	ABS_X
	.word	ABS_Y
	.word	ABS_PRESSURE
	.word	INPUT_PROP_POINTER
	.word	REL_WHEEL
	.word	BTN_STYLUS2
	.size	wacom_connect, .-wacom_connect
	.comm	SERIO_WACOM_IV,4,4
	.comm	REL_WHEEL,4,4
	.comm	INPUT_PROP_POINTER,4,4
	.comm	INPUT_PROP_DIRECT,4,4
	.comm	GFP_KERNEL,4,4
	.comm	F_HAS_STYLUS2,4,4
	.comm	F_HAS_SCROLLWHEEL,4,4
	.comm	F_COVERS_SCREEN,4,4
	.comm	EV_REL,4,4
	.comm	EV_KEY,4,4
	.comm	EV_ABS,4,4
	.comm	ENOMEM,4,4
	.comm	BUS_RS232,4,4
	.comm	BTN_TOUCH,4,4
	.comm	BTN_TOOL_RUBBER,4,4
	.comm	BTN_TOOL_PEN,4,4
	.comm	BTN_TOOL_MOUSE,4,4
	.comm	BTN_STYLUS2,4,4
	.comm	BTN_STYLUS,4,4
	.comm	BTN_RIGHT,4,4
	.comm	BTN_MIDDLE,4,4
	.comm	BTN_LEFT,4,4
	.comm	ABS_Y,4,4
	.comm	ABS_X,4,4
	.comm	ABS_PRESSURE,4,4
	.comm	ABS_MISC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
