	.file	"extr_hil_mlc.c_hil_mlc_register.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"HIL_SERIO%d"
.LC1:
	.string	"HIL%d"
	.text
	.p2align 4
	.globl	hil_mlc_register
	.type	hil_mlc_register, @function
hil_mlc_register:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	test	rdi, rdi
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	sete	dil
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movzx	edi, dil
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	lea	rbx, .LC0[rip]
	call	BUG_ON@PLT
	mov	QWORD PTR 104[r14], 0
	lea	rdi, 88[r14]
	mov	QWORD PTR 96[r14], 0
	call	rwlock_init@PLT
	lea	rdi, 84[r14]
	mov	esi, 1
	call	sema_init@PLT
	lea	rdi, 80[r14]
	mov	esi, 1
	call	sema_init@PLT
	mov	DWORD PTR [r14], -1
	xor	esi, esi
	lea	rdi, 56[r14]
	mov	QWORD PTR 72[r14], 0
	mov	QWORD PTR 64[r14], 0
	call	sema_init@PLT
	mov	rdi, r14
	call	hil_mlc_clear_di_scratch@PLT
	xor	esi, esi
	mov	rdi, r14
	call	hil_mlc_clear_di_map@PLT
	mov	eax, DWORD PTR HIL_MLC_DEVMEM[rip]
	test	eax, eax
	jg	.L2
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, DWORD PTR 28[rbp]
	mov	ecx, r12d
	mov	rdx, rbx
	mov	esi, 3
	call	snprintf@PLT
	mov	edi, DWORD PTR 24[rbp]
	mov	ecx, r12d
	mov	esi, 3
	lea	rdx, .LC1[rip]
	call	snprintf@PLT
	mov	eax, DWORD PTR hil_mlc_serio_write[rip]
	mov	DWORD PTR 20[rbp], r12d
	mov	rdi, rbp
	mov	DWORD PTR 16[rbp], eax
	mov	eax, DWORD PTR hil_mlc_serio_open[rip]
	mov	DWORD PTR 12[rbp], eax
	mov	eax, DWORD PTR hil_mlc_serio_close[rip]
	mov	DWORD PTR 8[rbp], eax
	mov	rax, r12
	sal	rax, 4
	add	rax, QWORD PTR 40[r14]
	mov	QWORD PTR 0[rbp], rax
	mov	DWORD PTR [rax], r12d
	mov	QWORD PTR 8[rax], r14
	mov	DWORD PTR 4[rax], -1
	mov	rax, QWORD PTR 32[r14]
	mov	QWORD PTR [rax+r12*8], 0
	mov	rax, QWORD PTR 24[r14]
	mov	QWORD PTR [rax+r12*8], 0
	add	r12, 1
	call	serio_register_port@PLT
	cmp	DWORD PTR HIL_MLC_DEVMEM[rip], r12d
	jle	.L7
.L2:
	mov	esi, r12d
	mov	rdi, r14
	movsx	r13, r12d
	call	hil_mlc_copy_di_scratch@PLT
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 32
	call	kzalloc@PLT
	mov	rbp, rax
	mov	rax, QWORD PTR 48[r14]
	mov	QWORD PTR [rax+r12*8], rbp
	test	rbp, rbp
	jne	.L4
	lea	rbx, -8[0+r13*8]
	mov	r12, -8
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rax, QWORD PTR 48[r14]
	mov	rbp, QWORD PTR [rax+rbx]
	sub	rbx, 8
.L6:
	mov	rdi, rbp
	call	kfree@PLT
	cmp	r12, rbx
	jne	.L14
	mov	eax, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	lea	rbp, hil_mlcs_tasklet[rip]
	xor	r12d, r12d
	lea	rdi, hil_mlcs_lock[rip]
	mov	QWORD PTR 16[r14], rbp
	mov	rsi, r12
	call	write_lock_irqsave@PLT
	lea	rdi, 8[r14]
	lea	rsi, hil_mlcs[rip]
	call	list_add_tail@PLT
	mov	eax, DWORD PTR HILSEN_START[rip]
	mov	rsi, r12
	lea	rdi, hil_mlcs_lock[rip]
	mov	DWORD PTR 4[r14], eax
	call	write_unlock_irqrestore@PLT
	mov	rdi, rbp
	call	tasklet_schedule@PLT
	pop	rbx
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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	hil_mlc_register, .-hil_mlc_register
	.comm	hil_mlcs_tasklet,4,4
	.comm	hil_mlcs_lock,4,4
	.comm	hil_mlcs,4,4
	.comm	hil_mlc_serio_write,4,4
	.comm	hil_mlc_serio_open,4,4
	.comm	hil_mlc_serio_id,4,4
	.comm	hil_mlc_serio_close,4,4
	.comm	HIL_MLC_DEVMEM,4,4
	.comm	HILSEN_START,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_hil_mlc.c_hil_mlc_register.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"HIL_SERIO%d\000"
	.align	2
.LC1:
	.ascii	"HIL%d\000"
	.text
	.align	2
	.global	hil_mlc_register
	.syntax unified
	.arm
	.fpu softvfp
	.type	hil_mlc_register, %function
hil_mlc_register:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	clz	r0, r0
	mov	r7, #0
	lsr	r0, r0, #5
	bl	BUG_ON
	str	r7, [r6, #60]
	str	r7, [r6, #56]
	add	r0, r6, #52
	bl	rwlock_init
	mov	r1, #1
	add	r0, r6, #48
	bl	sema_init
	mov	r1, #1
	add	r0, r6, #44
	bl	sema_init
	mvn	r3, #0
	mov	r1, r7
	str	r3, [r6]
	str	r7, [r6, #40]
	str	r7, [r6, #36]
	add	r0, r6, #32
	bl	sema_init
	ldr	r8, .L13
	mov	r0, r6
	bl	hil_mlc_clear_di_scratch
	mov	r1, r7
	mov	r0, r6
	bl	hil_mlc_clear_di_map
	ldr	r3, [r8]
	cmp	r3, r7
	ble	.L7
	mov	r5, r7
	ldr	r10, .L13+4
	ldr	r9, .L13+8
	b	.L2
.L4:
	mov	r3, r5
	mov	r1, #3
	ldr	r2, .L13+12
	ldr	r0, [r0, #24]
	bl	snprintf
	mov	r3, r5
	mov	r1, #3
	ldr	r2, .L13+16
	ldr	r0, [r4, #20]
	bl	snprintf
	mvn	fp, #0
	mov	r2, #0
	ldr	r0, [r10]
	ldr	ip, [r6, #24]
	str	r0, [r4, #12]
	ldr	r0, .L13+20
	ldr	lr, [r9]
	ldr	r0, [r0]
	add	r1, r7, r7, lsl #1
	add	r3, ip, r1
	str	r5, [r4, #16]
	str	lr, [r4, #8]
	str	r3, [r4]
	str	r0, [r4, #4]
	ldr	lr, [r6, #20]
	str	r6, [r3, #8]
	str	r5, [ip, r1]
	ldr	r1, [r6, #16]
	mov	r0, r4
	str	fp, [r3, #4]
	str	r2, [lr, r7]
	str	r2, [r1, r7]
	bl	serio_register_port
	ldr	r3, [r8]
	add	r5, r5, #1
	cmp	r3, r5
	add	r7, r7, #4
	ble	.L7
.L2:
	mov	r1, r5
	mov	r0, r6
	bl	hil_mlc_copy_di_scratch
	ldr	r3, .L13+24
	mov	r0, #28
	ldr	r1, [r3]
	bl	kzalloc
	ldr	r3, [r6, #28]
	cmp	r0, #0
	mov	r4, r0
	str	r0, [r3, r7]
	bne	.L4
	b	.L6
.L12:
	ldr	r3, [r6, #28]
	ldr	r0, [r3, r5, lsl #2]
.L6:
	sub	r5, r5, #1
	bl	kfree
	cmn	r5, #1
	bne	.L12
	ldr	r3, .L13+28
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	mov	r5, #0
	ldr	r4, .L13+32
	mov	r1, r5
	str	r4, [r6, #12]
	ldr	r0, .L13+36
	bl	write_lock_irqsave
	ldr	r1, .L13+40
	add	r0, r6, #8
	bl	list_add_tail
	ldr	r3, .L13+44
	mov	r1, r5
	ldr	r3, [r3]
	ldr	r0, .L13+36
	str	r3, [r6, #4]
	bl	write_unlock_irqrestore
	mov	r0, r4
	bl	tasklet_schedule
	mov	r0, r5
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	.align	2
.L13:
	.word	HIL_MLC_DEVMEM
	.word	hil_mlc_serio_write
	.word	hil_mlc_serio_open
	.word	.LC0
	.word	.LC1
	.word	hil_mlc_serio_close
	.word	GFP_KERNEL
	.word	ENOMEM
	.word	hil_mlcs_tasklet
	.word	hil_mlcs_lock
	.word	hil_mlcs
	.word	HILSEN_START
	.size	hil_mlc_register, .-hil_mlc_register
	.comm	hil_mlcs_tasklet,4,4
	.comm	hil_mlcs_lock,4,4
	.comm	hil_mlcs,4,4
	.comm	hil_mlc_serio_write,4,4
	.comm	hil_mlc_serio_open,4,4
	.comm	hil_mlc_serio_id,4,4
	.comm	hil_mlc_serio_close,4,4
	.comm	HIL_MLC_DEVMEM,4,4
	.comm	HILSEN_START,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
