	.file	"extr_charlcd.c_charlcd_init_display.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	charlcd_init_display, @function
charlcd_init_display:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	charlcd_to_priv@PLT
	mov	rbx, rax
	mov	eax, DWORD PTR 0[rbp]
	sub	eax, 4
	and	eax, -5
	jne	.L32
	xor	edx, edx
	cmp	DWORD PTR 4[rbp], 1
	jle	.L4
	mov	edx, DWORD PTR LCD_FLAG_N[rip]
.L4:
	mov	eax, DWORD PTR LCD_FLAG_D[rip]
	or	eax, DWORD PTR LCD_FLAG_C[rip]
	mov	edi, 20
	or	eax, DWORD PTR LCD_FLAG_B[rip]
	or	eax, edx
	mov	DWORD PTR [rbx], eax
	call	long_sleep@PLT
	mov	r12d, DWORD PTR LCD_CMD_FUNCTION_SET[rip]
	or	r12d, DWORD PTR LCD_CMD_DATA_LEN_8BITS[rip]
	cmp	DWORD PTR 0[rbp], 4
	je	.L33
	mov	rax, QWORD PTR 8[rbp]
	mov	r13, QWORD PTR 8[rax]
.L6:
	mov	esi, r12d
	mov	rdi, rbp
	call	r13
	mov	edi, 10
	call	long_sleep@PLT
	mov	esi, r12d
	mov	rdi, rbp
	call	r13
	mov	edi, 10
	call	long_sleep@PLT
	mov	esi, r12d
	mov	rdi, rbp
	call	r13
	mov	edi, 10
	call	long_sleep@PLT
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 4
	jne	.L7
	mov	esi, DWORD PTR LCD_CMD_FUNCTION_SET[rip]
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, rbp
	sar	esi, 4
	call	[QWORD PTR [rax]]
	mov	edi, 10
	call	long_sleep@PLT
	mov	eax, DWORD PTR 0[rbp]
.L7:
	mov	rdx, QWORD PTR 8[rbp]
	cmp	eax, 8
	mov	esi, 0
	mov	eax, DWORD PTR [rbx]
	cmove	esi, DWORD PTR LCD_CMD_DATA_LEN_8BITS[rip]
	or	esi, DWORD PTR LCD_CMD_FUNCTION_SET[rip]
	mov	rdx, QWORD PTR 8[rdx]
	test	DWORD PTR LCD_FLAG_F[rip], eax
	je	.L9
	or	esi, DWORD PTR LCD_CMD_FONT_5X10_DOTS[rip]
.L9:
	test	DWORD PTR LCD_FLAG_N[rip], eax
	je	.L10
	or	esi, DWORD PTR LCD_CMD_TWO_LINES[rip]
.L10:
	mov	rdi, rbp
	call	rdx
	mov	edi, 10
	call	long_sleep@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	esi, DWORD PTR LCD_CMD_DISPLAY_CTRL[rip]
	mov	rdi, rbp
	call	[QWORD PTR 8[rax]]
	mov	edi, 10
	call	long_sleep@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rbx]
	mov	esi, eax
	and	esi, DWORD PTR LCD_FLAG_D[rip]
	cmovne	esi, DWORD PTR LCD_CMD_DISPLAY_ON[rip]
	or	esi, DWORD PTR LCD_CMD_DISPLAY_CTRL[rip]
	test	DWORD PTR LCD_FLAG_C[rip], eax
	je	.L12
	or	esi, DWORD PTR LCD_CMD_CURSOR_ON[rip]
.L12:
	test	DWORD PTR LCD_FLAG_B[rip], eax
	je	.L13
	or	esi, DWORD PTR LCD_CMD_BLINK_ON[rip]
.L13:
	mov	rdi, rbp
	call	rdx
	mov	eax, DWORD PTR [rbx]
	xor	esi, esi
	test	DWORD PTR LCD_FLAG_L[rip], eax
	setne	sil
	mov	rdi, rbp
	call	charlcd_backlight@PLT
	mov	edi, 10
	call	long_sleep@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, rbp
	mov	esi, DWORD PTR LCD_CMD_ENTRY_MODE[rip]
	or	esi, DWORD PTR LCD_CMD_CURSOR_INC[rip]
	call	[QWORD PTR 8[rax]]
	mov	rdi, rbp
	call	charlcd_clear_display@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rbp]
	sar	r12d, 4
	mov	r13, QWORD PTR [rax]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L32:
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	charlcd_init_display, .-charlcd_init_display
	.comm	LCD_FLAG_N,4,4
	.comm	LCD_FLAG_L,4,4
	.comm	LCD_FLAG_F,4,4
	.comm	LCD_FLAG_D,4,4
	.comm	LCD_FLAG_C,4,4
	.comm	LCD_FLAG_B,4,4
	.comm	LCD_CMD_TWO_LINES,4,4
	.comm	LCD_CMD_FUNCTION_SET,4,4
	.comm	LCD_CMD_FONT_5X10_DOTS,4,4
	.comm	LCD_CMD_ENTRY_MODE,4,4
	.comm	LCD_CMD_DISPLAY_ON,4,4
	.comm	LCD_CMD_DISPLAY_CTRL,4,4
	.comm	LCD_CMD_DATA_LEN_8BITS,4,4
	.comm	LCD_CMD_CURSOR_ON,4,4
	.comm	LCD_CMD_CURSOR_INC,4,4
	.comm	LCD_CMD_BLINK_ON,4,4
	.comm	EINVAL,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_charlcd.c_charlcd_init_display.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	charlcd_init_display, %function
charlcd_init_display:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	sub	sp, sp, #12
	bl	charlcd_to_priv
	ldr	r3, [r4]
	sub	r3, r3, #4
	bics	r3, r3, #4
	bne	.L33
	mov	r5, r0
	ldr	r2, [r4, #4]
	ldr	r8, .L35
	cmp	r2, #1
	ldrle	r2, .L35+4
	ldr	r7, .L35+8
	ldr	r6, .L35+12
	ldrgt	r3, .L35+4
	ldr	r0, [r7]
	strle	r2, [sp, #4]
	ldr	r2, [r8]
	ldr	r1, [r6]
	strgt	r3, [sp, #4]
	orr	r2, r2, r0
	ldrgt	r3, [r3]
	orr	r2, r2, r1
	orr	r3, r2, r3
	ldr	r9, .L35+16
	ldr	fp, .L35+20
	str	r3, [r5]
	mov	r0, #20
	bl	long_sleep
	ldr	r2, [r9]
	ldr	r1, [fp]
	ldr	r0, [r4]
	orr	r1, r2, r1
	ldr	r2, [r4, #8]
	cmp	r0, #4
	asreq	r1, r1, #4
	ldreq	r10, [r2]
	ldrne	r10, [r2, #4]
	mov	r0, r4
	str	r1, [sp]
	blx	r10
	mov	r0, #10
	bl	long_sleep
	ldr	r1, [sp]
	mov	r0, r4
	blx	r10
	mov	r0, #10
	bl	long_sleep
	mov	r0, r4
	ldr	r1, [sp]
	blx	r10
	mov	r0, #10
	bl	long_sleep
	ldr	r2, [r4]
	cmp	r2, #4
	beq	.L34
.L7:
	ldr	r1, [r4, #8]
	cmp	r2, #8
	ldr	r2, [r1, #4]
	movne	r1, #0
	ldr	ip, .L35+24
	ldr	r0, [r5]
	ldr	ip, [ip]
	ldr	r3, [r9]
	ldreq	r1, [fp]
	tst	r0, ip
	orr	r1, r1, r3
	ldrne	r3, .L35+28
	ldr	r9, .L35+32
	ldrne	r3, [r3]
	orrne	r1, r1, r3
	ldr	r3, [sp, #4]
	ldr	r3, [r3]
	tst	r0, r3
	ldrne	r3, .L35+36
	mov	r0, r4
	ldrne	r3, [r3]
	orrne	r1, r1, r3
	blx	r2
	mov	r0, #10
	bl	long_sleep
	ldr	r3, [r4, #8]
	ldr	r1, [r9]
	mov	r0, r4
	ldr	r3, [r3, #4]
	blx	r3
	mov	r0, #10
	bl	long_sleep
	ldr	ip, [r5]
	ldr	r1, [r8]
	ldr	r0, [r7]
	ands	r1, ip, r1
	ldrne	r2, .L35+40
	ldr	r3, [r4, #8]
	ldrne	r1, [r2]
	ldr	r2, [r9]
	tst	ip, r0
	orr	r1, r1, r2
	ldrne	r2, .L35+44
	mov	r0, r4
	ldrne	r2, [r2]
	ldr	r3, [r3, #4]
	orrne	r1, r1, r2
	ldr	r2, [r6]
	tst	ip, r2
	ldrne	r2, .L35+48
	ldrne	r2, [r2]
	orrne	r1, r1, r2
	blx	r3
	ldr	r3, .L35+52
	ldr	r2, [r5]
	ldr	r3, [r3]
	mov	r0, r4
	tst	r2, r3
	movne	r1, #1
	moveq	r1, #0
	bl	charlcd_backlight
	mov	r0, #10
	bl	long_sleep
	ldr	r2, .L35+56
	ldr	r3, .L35+60
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, [r4, #8]
	mov	r0, r4
	ldr	r3, [r3, #4]
	orr	r1, r1, r2
	blx	r3
	mov	r0, r4
	bl	charlcd_clear_display
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L34:
	ldr	r1, [r9]
	ldr	r2, [r4, #8]
	mov	r0, r4
	ldr	r2, [r2]
	asr	r1, r1, #4
	blx	r2
	mov	r0, #10
	bl	long_sleep
	ldr	r2, [r4]
	b	.L7
.L33:
	ldr	r3, .L35+64
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L36:
	.align	2
.L35:
	.word	LCD_FLAG_D
	.word	LCD_FLAG_N
	.word	LCD_FLAG_C
	.word	LCD_FLAG_B
	.word	LCD_CMD_FUNCTION_SET
	.word	LCD_CMD_DATA_LEN_8BITS
	.word	LCD_FLAG_F
	.word	LCD_CMD_FONT_5X10_DOTS
	.word	LCD_CMD_DISPLAY_CTRL
	.word	LCD_CMD_TWO_LINES
	.word	LCD_CMD_DISPLAY_ON
	.word	LCD_CMD_CURSOR_ON
	.word	LCD_CMD_BLINK_ON
	.word	LCD_FLAG_L
	.word	LCD_CMD_ENTRY_MODE
	.word	LCD_CMD_CURSOR_INC
	.word	EINVAL
	.size	charlcd_init_display, .-charlcd_init_display
	.comm	LCD_FLAG_N,4,4
	.comm	LCD_FLAG_L,4,4
	.comm	LCD_FLAG_F,4,4
	.comm	LCD_FLAG_D,4,4
	.comm	LCD_FLAG_C,4,4
	.comm	LCD_FLAG_B,4,4
	.comm	LCD_CMD_TWO_LINES,4,4
	.comm	LCD_CMD_FUNCTION_SET,4,4
	.comm	LCD_CMD_FONT_5X10_DOTS,4,4
	.comm	LCD_CMD_ENTRY_MODE,4,4
	.comm	LCD_CMD_DISPLAY_ON,4,4
	.comm	LCD_CMD_DISPLAY_CTRL,4,4
	.comm	LCD_CMD_DATA_LEN_8BITS,4,4
	.comm	LCD_CMD_CURSOR_ON,4,4
	.comm	LCD_CMD_CURSOR_INC,4,4
	.comm	LCD_CMD_BLINK_ON,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
