	.file	"extr_xtkbd.c_xtkbd_connect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s/input0"
.LC1:
	.string	"XT Keyboard"
	.text
	.p2align 4
	.type	xtkbd_connect, @function
xtkbd_connect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	mov	edi, 32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, DWORD PTR ENOMEM[rip]
	call	kmalloc@PLT
	mov	rbp, rax
	xor	eax, eax
	call	input_allocate_device@PLT
	mov	r14, rax
	test	rbp, rbp
	je	.L8
	test	rax, rax
	je	.L8
	mov	rcx, QWORD PTR [r12]
	mov	edi, DWORD PTR 16[rbp]
	mov	QWORD PTR 24[rbp], r12
	mov	esi, 4
	mov	QWORD PTR 0[rbp], rax
	lea	rdx, .LC0[rip]
	call	snprintf@PLT
	mov	esi, DWORD PTR xtkbd_keycode[rip]
	mov	rdi, QWORD PTR 8[rbp]
	mov	edx, 8
	call	memcpy@PLT
	lea	rax, .LC1[rip]
	mov	edi, DWORD PTR EV_KEY[rip]
	mov	QWORD PTR [r14], rax
	mov	eax, DWORD PTR 16[rbp]
	mov	DWORD PTR 56[r14], 256
	mov	DWORD PTR 64[r14], eax
	mov	eax, DWORD PTR BUS_XTKBD[rip]
	mov	DWORD PTR 60[r14], eax
	movabs	rax, 4294967297
	mov	QWORD PTR 48[r14], rax
	lea	rax, 8[r12]
	mov	QWORD PTR 40[r14], rax
	call	BIT_MASK@PLT
	mov	edi, DWORD PTR EV_REP[rip]
	mov	ebx, eax
	call	BIT_MASK@PLT
	mov	rdx, QWORD PTR 8[r14]
	or	ebx, eax
	mov	rax, QWORD PTR 8[rbp]
	mov	DWORD PTR [rdx], ebx
	mov	edi, DWORD PTR xtkbd_keycode[rip]
	xor	ebx, ebx
	mov	QWORD PTR 32[r14], rax
	mov	DWORD PTR 16[r14], 1
	call	ARRAY_SIZE@PLT
	mov	DWORD PTR 24[r14], eax
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR 8[rbp]
	mov	esi, DWORD PTR 20[r14]
	mov	edi, DWORD PTR [rax+rbx]
	add	rbx, 4
	call	set_bit@PLT
	cmp	rbx, 1020
	jne	.L5
	mov	esi, DWORD PTR 20[r14]
	xor	edi, edi
	call	clear_bit@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	serio_set_drvdata@PLT
	mov	rsi, r13
	mov	rdi, r12
	call	serio_open@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L6
	mov	rdi, QWORD PTR 0[rbp]
	call	input_register_device@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L1
	mov	rdi, r12
	call	serio_close@PLT
.L6:
	xor	esi, esi
	mov	rdi, r12
	call	serio_set_drvdata@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	neg	ebx
	mov	r13d, ebx
.L4:
	mov	rdi, r14
	call	input_free_device@PLT
	mov	rdi, rbp
	call	kfree@PLT
.L1:
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	xtkbd_connect, .-xtkbd_connect
	.comm	xtkbd_keycode,4,4
	.comm	GFP_KERNEL,4,4
	.comm	EV_REP,4,4
	.comm	EV_KEY,4,4
	.comm	ENOMEM,4,4
	.comm	BUS_XTKBD,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_xtkbd.c_xtkbd_connect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s/input0\000"
	.align	2
.LC1:
	.ascii	"XT Keyboard\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xtkbd_connect, %function
xtkbd_connect:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L14
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L14+4
	mov	r8, r0
	mov	r9, r1
	mov	r0, #16
	ldr	r1, [r2]
	ldr	r7, [r3]
	bl	kmalloc
	mov	r6, r0
	bl	input_allocate_device
	clz	r4, r0
	cmp	r6, #0
	lsr	r4, r4, #5
	moveq	r4, #1
	cmp	r4, #0
	mov	r5, r0
	rsbne	r7, r7, #0
	beq	.L13
.L3:
	mov	r0, r5
	bl	input_free_device
	mov	r0, r6
	bl	kfree
.L1:
	mov	r0, r7
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	mov	r7, r8
	ldr	r10, .L14+8
	ldr	r3, [r7], #4
	mov	r1, #4
	ldr	r2, .L14+12
	str	r0, [r6]
	str	r8, [r6, #12]
	ldr	r0, [r6, #8]
	bl	snprintf
	mov	r2, #4
	ldr	r1, [r10]
	ldr	r0, [r6, #4]
	bl	memcpy
	mov	fp, #1
	mov	r1, #256
	ldr	r3, [r6, #8]
	ldr	r2, .L14+16
	str	r3, [r5, #44]
	ldr	r0, [r2]
	ldr	r3, .L14+20
	ldr	r2, .L14+24
	str	r1, [r5, #36]
	str	r2, [r5]
	str	r7, [r5, #24]
	str	r0, [r5, #40]
	str	fp, [r5, #28]
	ldr	r0, [r3]
	str	fp, [r5, #32]
	bl	BIT_MASK
	ldr	r3, .L14+28
	mov	r7, r0
	ldr	r0, [r3]
	bl	BIT_MASK
	ldr	r2, [r5, #4]
	ldr	r3, [r6, #4]
	orr	r7, r7, r0
	str	r7, [r2]
	ldr	r0, [r10]
	str	fp, [r5, #8]
	str	r3, [r5, #20]
	bl	ARRAY_SIZE
	str	r0, [r5, #16]
.L4:
	ldr	r3, [r6, #4]
	ldr	r1, [r5, #12]
	ldr	r0, [r3, r4]
	add	r4, r4, #4
	bl	set_bit
	cmp	r4, #1020
	bne	.L4
	ldr	r1, [r5, #12]
	mov	r0, #0
	bl	clear_bit
	mov	r1, r6
	mov	r0, r8
	bl	serio_set_drvdata
	mov	r1, r9
	mov	r0, r8
	bl	serio_open
	subs	r7, r0, #0
	bne	.L5
	ldr	r0, [r6]
	bl	input_register_device
	subs	r7, r0, #0
	beq	.L1
	mov	r0, r8
	bl	serio_close
.L5:
	mov	r0, r8
	mov	r1, #0
	bl	serio_set_drvdata
	b	.L3
.L15:
	.align	2
.L14:
	.word	GFP_KERNEL
	.word	ENOMEM
	.word	xtkbd_keycode
	.word	.LC0
	.word	BUS_XTKBD
	.word	EV_KEY
	.word	.LC1
	.word	EV_REP
	.size	xtkbd_connect, .-xtkbd_connect
	.comm	xtkbd_keycode,4,4
	.comm	GFP_KERNEL,4,4
	.comm	EV_REP,4,4
	.comm	EV_KEY,4,4
	.comm	ENOMEM,4,4
	.comm	BUS_XTKBD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
