	.file	"extr_sdio_uart.c_sdio_uart_change_speed.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sdio_uart_change_speed, @function
sdio_uart_change_speed:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdx
	mov	edx, DWORD PTR CSIZE[rip]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	eax, DWORD PTR [rsi]
	and	edx, eax
	cmp	edx, 130
	je	.L2
	movzx	ebx, BYTE PTR UART_LCR_WLEN5[rip]
	cmp	edx, 131
	je	.L6
	cmp	edx, 129
	movzx	ebx, BYTE PTR UART_LCR_WLEN8[rip]
	movzx	edx, BYTE PTR UART_LCR_WLEN7[rip]
	cmove	ebx, edx
.L6:
	test	DWORD PTR CSTOPB[rip], eax
	je	.L7
	or	bl, BYTE PTR UART_LCR_STOP[rip]
.L7:
	test	DWORD PTR PARENB[rip], eax
	je	.L8
	or	bl, BYTE PTR UART_LCR_PARITY[rip]
.L8:
	test	DWORD PTR PARODD[rip], eax
	jne	.L9
	or	bl, BYTE PTR UART_LCR_EPAR[rip]
.L9:
	mov	ebp, 9600
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L44:
	and	ecx, DWORD PTR [r14]
	or	eax, ecx
.L14:
	mov	DWORD PTR [r12], eax
	xor	r14d, r14d
.L10:
	mov	rdi, r12
	call	tty_termios_baud_rate@PLT
	mov	esi, DWORD PTR [r12]
	mov	ecx, eax
	test	eax, eax
	mov	eax, DWORD PTR 0[r13]
	cmove	ecx, ebp
	cmp	eax, ecx
	jnb	.L12
	mov	ecx, DWORD PTR CBAUD[rip]
	mov	eax, ecx
	not	eax
	and	eax, esi
	mov	DWORD PTR [r12], eax
	test	r14, r14
	jne	.L44
	or	eax, DWORD PTR B9600[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L12:
	lea	eax, [rcx+rax*2]
	lea	edi, [rcx+rcx]
	xor	edx, edx
	movzx	r14d, BYTE PTR UART_FCR_ENABLE_FIFO[rip]
	div	edi
	mov	ebp, eax
	cmp	ecx, 2399
	ja	.L15
	or	r14b, BYTE PTR UART_FCR_TRIGGER_1[rip]
.L16:
	mov	ecx, DWORD PTR UART_LSR_OE[rip]
	mov	edx, DWORD PTR UART_LSR_THRE[rip]
	mov	edi, DWORD PTR UART_LSR_DR[rip]
	mov	eax, DWORD PTR 4[r12]
	or	edx, ecx
	or	edx, edi
	mov	DWORD PTR 4[r13], edx
	test	DWORD PTR INPCK[rip], eax
	je	.L17
	mov	r8d, DWORD PTR UART_LSR_FE[rip]
	or	r8d, DWORD PTR UART_LSR_PE[rip]
	or	edx, r8d
	mov	DWORD PTR 4[r13], edx
.L17:
	mov	edx, DWORD PTR BRKINT[rip]
	or	edx, DWORD PTR PARMRK[rip]
	test	edx, eax
	je	.L18
	mov	edx, DWORD PTR UART_LSR_BI[rip]
	or	DWORD PTR 4[r13], edx
.L18:
	mov	edx, DWORD PTR IGNBRK[rip]
	mov	DWORD PTR 8[r13], 0
	and	edx, eax
	test	DWORD PTR IGNPAR[rip], eax
	je	.L19
	mov	eax, DWORD PTR UART_LSR_PE[rip]
	or	eax, DWORD PTR UART_LSR_FE[rip]
	mov	DWORD PTR 8[r13], eax
	test	edx, edx
	jne	.L20
.L21:
	test	DWORD PTR CREAD[rip], esi
	jne	.L23
	or	DWORD PTR 8[r13], edi
.L23:
	movzx	eax, BYTE PTR UART_IER_MSI[rip]
	mov	edx, eax
	not	edx
	and	dl, BYTE PTR 12[r13]
	mov	BYTE PTR 12[r13], dl
	test	DWORD PTR CRTSCTS[rip], esi
	jne	.L24
	test	DWORD PTR CLOCAL[rip], esi
	jne	.L25
.L24:
	or	edx, eax
	mov	BYTE PTR 12[r13], dl
.L25:
	mov	BYTE PTR 13[r13], bl
	mov	esi, DWORD PTR UART_IER[rip]
	mov	rdi, r13
	movzx	edx, dl
	call	sdio_out@PLT
	movzx	edx, BYTE PTR UART_LCR_DLAB[rip]
	mov	esi, DWORD PTR UART_LCR[rip]
	mov	rdi, r13
	or	edx, ebx
	movzx	edx, dl
	call	sdio_out@PLT
	mov	esi, DWORD PTR UART_DLL[rip]
	movzx	edx, bpl
	mov	rdi, r13
	call	sdio_out@PLT
	mov	eax, ebp
	mov	esi, DWORD PTR UART_DLM[rip]
	mov	rdi, r13
	movzx	edx, ah
	call	sdio_out@PLT
	mov	esi, DWORD PTR UART_LCR[rip]
	movzx	edx, bl
	mov	rdi, r13
	call	sdio_out@PLT
	mov	esi, DWORD PTR UART_FCR[rip]
	mov	rdi, r13
	movzx	edx, r14b
	call	sdio_out@PLT
	mov	esi, DWORD PTR 16[r13]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, r13
	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
	jmp	sdio_uart_write_mctrl@PLT
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	test	edx, edx
	je	.L21
	mov	eax, DWORD PTR UART_LSR_BI[rip]
	mov	DWORD PTR 8[r13], eax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L15:
	or	r14b, BYTE PTR UART_FCR_R_TRIG_10[rip]
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L20:
	or	ecx, DWORD PTR UART_LSR_BI[rip]
	or	ecx, eax
	mov	DWORD PTR 8[r13], ecx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L2:
	movzx	ebx, BYTE PTR UART_LCR_WLEN6[rip]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	sdio_uart_change_speed, .-sdio_uart_change_speed
	.comm	UART_LSR_THRE,4,4
	.comm	UART_LSR_PE,4,4
	.comm	UART_LSR_OE,4,4
	.comm	UART_LSR_FE,4,4
	.comm	UART_LSR_DR,4,4
	.comm	UART_LSR_BI,4,4
	.comm	UART_LCR_WLEN8,1,1
	.comm	UART_LCR_WLEN7,1,1
	.comm	UART_LCR_WLEN6,1,1
	.comm	UART_LCR_WLEN5,1,1
	.comm	UART_LCR_STOP,1,1
	.comm	UART_LCR_PARITY,1,1
	.comm	UART_LCR_EPAR,1,1
	.comm	UART_LCR_DLAB,1,1
	.comm	UART_LCR,4,4
	.comm	UART_IER_MSI,1,1
	.comm	UART_IER,4,4
	.comm	UART_FCR_TRIGGER_1,1,1
	.comm	UART_FCR_R_TRIG_10,1,1
	.comm	UART_FCR_ENABLE_FIFO,1,1
	.comm	UART_FCR,4,4
	.comm	UART_DLM,4,4
	.comm	UART_DLL,4,4
	.comm	PARODD,4,4
	.comm	PARMRK,4,4
	.comm	PARENB,4,4
	.comm	INPCK,4,4
	.comm	IGNPAR,4,4
	.comm	IGNBRK,4,4
	.comm	CSTOPB,4,4
	.comm	CSIZE,4,4
	.comm	CRTSCTS,4,4
	.comm	CREAD,4,4
	.comm	CLOCAL,4,4
	.comm	CBAUD,4,4
	.comm	BRKINT,4,4
	.comm	B9600,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_sdio_uart.c_sdio_uart_change_speed.c"
	.text
	.global	__aeabi_uidiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sdio_uart_change_speed, %function
sdio_uart_change_speed:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L46
	mov	r5, r1
	ldr	r3, [r3]
	ldr	r1, [r1]
	mov	r9, r0
	and	r3, r3, r1
	cmp	r3, #130
	mov	r10, r2
	beq	.L2
	cmp	r3, #131
	beq	.L3
	cmp	r3, #129
	beq	.L44
	ldr	r3, .L46+4
	ldrb	r7, [r3]	@ zero_extendqisi2
.L6:
	ldr	r3, .L46+8
	ldr	r6, .L46+12
	ldr	r3, [r3]
	ldr	r8, .L46+16
	tst	r1, r3
	ldrne	r3, .L46+20
	ldrbne	r3, [r3]	@ zero_extendqisi2
	orrne	r7, r7, r3
	ldr	r3, .L46+24
	ldr	r3, [r3]
	tst	r1, r3
	ldrne	r3, .L46+28
	ldrbne	r3, [r3]	@ zero_extendqisi2
	orrne	r7, r7, r3
	ldr	r3, .L46+32
	ldr	r3, [r3]
	tst	r1, r3
	ldreq	r3, .L46+36
	ldrbeq	r3, [r3]	@ zero_extendqisi2
	orreq	r7, r7, r3
	b	.L10
.L45:
	ldr	r1, [r6]
	cmp	r10, #0
	bic	r3, fp, r1
	str	r3, [r5]
	ldrne	r2, [r10]
	mov	r10, #0
	ldreq	r2, [r8]
	andne	r1, r1, r2
	orrne	r3, r1, r3
	orreq	r3, r3, r2
	str	r3, [r5]
.L10:
	mov	r0, r5
	bl	tty_termios_baud_rate
	subs	r4, r0, #0
	moveq	r4, #9600
	ldr	r0, [r9]
	ldr	fp, [r5]
	cmp	r0, r4
	bcc	.L45
	lsl	r1, r4, #1
	add	r0, r4, r0, lsl #1
	bl	__aeabi_uidiv
	ldr	r3, .L46+40
	cmp	r4, #2400
	ldrb	r6, [r3]	@ zero_extendqisi2
	ldrcc	r3, .L46+44
	ldrcs	r3, .L46+48
	ldr	r2, .L46+52
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r4, r0
	orr	r6, r6, r3
	ldr	r3, .L46+56
	ldr	ip, .L46+60
	ldr	r0, .L46+64
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	ip, [ip]
	ldr	r3, [r5, #4]
	ldr	r0, [r0]
	orr	r2, r1, r2
	orr	r2, r2, r0
	tst	r3, ip
	str	r2, [r9, #4]
	beq	.L17
	ldr	ip, .L46+68
	ldr	lr, .L46+72
	ldr	ip, [ip]
	ldr	lr, [lr]
	orr	ip, ip, lr
	orr	r2, ip, r2
	str	r2, [r9, #4]
.L17:
	ldr	r2, .L46+76
	ldr	ip, .L46+80
	ldr	r2, [r2]
	ldr	ip, [ip]
	ldr	lr, .L46+84
	orr	r2, r2, ip
	tst	r2, r3
	ldrne	ip, .L46+88
	ldrne	r2, [r9, #4]
	ldrne	ip, [ip]
	ldr	lr, [lr]
	orrne	r2, r2, ip
	strne	r2, [r9, #4]
	mov	r2, #0
	ldr	ip, .L46+92
	tst	r3, lr
	ldr	ip, [ip]
	str	r2, [r9, #8]
	and	r3, r3, ip
	beq	.L19
	ldr	r2, .L46+72
	ldr	ip, .L46+68
	ldr	r2, [r2]
	ldr	ip, [ip]
	cmp	r3, #0
	orr	r3, r2, ip
	str	r3, [r9, #8]
	bne	.L20
.L21:
	ldr	r3, .L46+96
	ldr	r1, .L46+100
	ldr	r3, [r3]
	ldrb	r2, [r9, #12]	@ zero_extendqisi2
	tst	fp, r3
	ldreq	r3, [r9, #8]
	ldr	r1, [r1]
	orreq	r0, r3, r0
	ldr	r3, .L46+104
	streq	r0, [r9, #8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	tst	fp, r1
	bic	r2, r2, r3
	strb	r2, [r9, #12]
	bne	.L24
	ldr	r1, .L46+108
	ldr	r1, [r1]
	tst	fp, r1
	bne	.L25
.L24:
	orr	r2, r3, r2
	strb	r2, [r9, #12]
.L25:
	ldr	r3, .L46+112
	mov	r0, r9
	ldr	r1, [r3]
	strb	r7, [r9, #13]
	bl	sdio_out
	ldr	r3, .L46+116
	ldr	r5, .L46+120
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, [r5]
	orr	r2, r7, r2
	mov	r0, r9
	bl	sdio_out
	ldr	r3, .L46+124
	and	r2, r4, #255
	ldr	r1, [r3]
	mov	r0, r9
	bl	sdio_out
	ldr	r3, .L46+128
	lsr	r2, r4, #8
	ldr	r1, [r3]
	mov	r0, r9
	and	r2, r2, #255
	bl	sdio_out
	mov	r2, r7
	ldr	r1, [r5]
	mov	r0, r9
	bl	sdio_out
	ldr	r3, .L46+132
	mov	r2, r6
	ldr	r1, [r3]
	mov	r0, r9
	bl	sdio_out
	mov	r0, r9
	ldr	r1, [r9, #16]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	sdio_uart_write_mctrl
.L19:
	cmp	r3, #0
	ldrne	r3, .L46+88
	ldrne	r3, [r3]
	strne	r3, [r9, #8]
	b	.L21
.L20:
	ldr	r2, .L46+88
	ldr	r2, [r2]
	orr	r1, r1, r2
	orr	r1, r1, r3
	str	r1, [r9, #8]
	b	.L21
.L44:
	ldr	r3, .L46+136
	ldrb	r7, [r3]	@ zero_extendqisi2
	b	.L6
.L3:
	ldr	r3, .L46+140
	ldrb	r7, [r3]	@ zero_extendqisi2
	b	.L6
.L2:
	ldr	r3, .L46+144
	ldrb	r7, [r3]	@ zero_extendqisi2
	b	.L6
.L47:
	.align	2
.L46:
	.word	CSIZE
	.word	UART_LCR_WLEN8
	.word	CSTOPB
	.word	CBAUD
	.word	B9600
	.word	UART_LCR_STOP
	.word	PARENB
	.word	UART_LCR_PARITY
	.word	PARODD
	.word	UART_LCR_EPAR
	.word	UART_FCR_ENABLE_FIFO
	.word	UART_FCR_TRIGGER_1
	.word	UART_FCR_R_TRIG_10
	.word	UART_LSR_OE
	.word	UART_LSR_THRE
	.word	INPCK
	.word	UART_LSR_DR
	.word	UART_LSR_FE
	.word	UART_LSR_PE
	.word	BRKINT
	.word	PARMRK
	.word	IGNPAR
	.word	UART_LSR_BI
	.word	IGNBRK
	.word	CREAD
	.word	CRTSCTS
	.word	UART_IER_MSI
	.word	CLOCAL
	.word	UART_IER
	.word	UART_LCR_DLAB
	.word	UART_LCR
	.word	UART_DLL
	.word	UART_DLM
	.word	UART_FCR
	.word	UART_LCR_WLEN7
	.word	UART_LCR_WLEN5
	.word	UART_LCR_WLEN6
	.size	sdio_uart_change_speed, .-sdio_uart_change_speed
	.comm	UART_LSR_THRE,4,4
	.comm	UART_LSR_PE,4,4
	.comm	UART_LSR_OE,4,4
	.comm	UART_LSR_FE,4,4
	.comm	UART_LSR_DR,4,4
	.comm	UART_LSR_BI,4,4
	.comm	UART_LCR_WLEN8,1,1
	.comm	UART_LCR_WLEN7,1,1
	.comm	UART_LCR_WLEN6,1,1
	.comm	UART_LCR_WLEN5,1,1
	.comm	UART_LCR_STOP,1,1
	.comm	UART_LCR_PARITY,1,1
	.comm	UART_LCR_EPAR,1,1
	.comm	UART_LCR_DLAB,1,1
	.comm	UART_LCR,4,4
	.comm	UART_IER_MSI,1,1
	.comm	UART_IER,4,4
	.comm	UART_FCR_TRIGGER_1,1,1
	.comm	UART_FCR_R_TRIG_10,1,1
	.comm	UART_FCR_ENABLE_FIFO,1,1
	.comm	UART_FCR,4,4
	.comm	UART_DLM,4,4
	.comm	UART_DLL,4,4
	.comm	PARODD,4,4
	.comm	PARMRK,4,4
	.comm	PARENB,4,4
	.comm	INPCK,4,4
	.comm	IGNPAR,4,4
	.comm	IGNBRK,4,4
	.comm	CSTOPB,4,4
	.comm	CSIZE,4,4
	.comm	CRTSCTS,4,4
	.comm	CREAD,4,4
	.comm	CLOCAL,4,4
	.comm	CBAUD,4,4
	.comm	BRKINT,4,4
	.comm	B9600,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
