	.file	"extr_vr41xx_siu.c_siu_set_termios.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	siu_set_termios, @function
siu_set_termios:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r9, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r13d, DWORD PTR [rsi]
	mov	eax, DWORD PTR CSIZE[rip]
	and	eax, r13d
	cmp	eax, 129
	je	.L2
	mov	r12d, DWORD PTR UART_LCR_WLEN5[rip]
	cmp	eax, 130
	je	.L6
	mov	r12d, DWORD PTR UART_LCR_WLEN8[rip]
	cmp	eax, 128
	cmove	r12d, DWORD PTR UART_LCR_WLEN7[rip]
.L6:
	test	DWORD PTR CSTOPB[rip], r13d
	je	.L7
	or	r12d, DWORD PTR UART_LCR_STOP[rip]
.L7:
	test	DWORD PTR PARENB[rip], r13d
	je	.L8
	or	r12d, DWORD PTR UART_LCR_PARITY[rip]
.L8:
	mov	eax, DWORD PTR PARODD[rip]
	mov	ecx, eax
	and	ecx, r13d
	cmp	eax, ecx
	je	.L9
	or	r12d, DWORD PTR UART_LCR_EPAR[rip]
.L9:
	test	DWORD PTR CMSPAR[rip], r13d
	je	.L10
	or	r12d, DWORD PTR UART_LCR_SPAR[rip]
.L10:
	mov	eax, DWORD PTR 0[rbp]
	mov	rsi, r9
	mov	rdi, rbp
	mov	QWORD PTR 8[rsp], r9
	lea	r15, 12[rbp]
	test	eax, eax
	lea	r8d, 15[rax]
	cmovns	r8d, eax
	xor	ecx, ecx
	sar	r8d, 4
	call	uart_get_baud_rate@PLT
	mov	rdi, rbp
	mov	esi, eax
	mov	DWORD PTR 4[rsp], eax
	call	uart_get_divisor@PLT
	xor	esi, esi
	mov	rdi, r15
	mov	r14d, DWORD PTR UART_FCR_ENABLE_FIFO[rip]
	mov	ebx, eax
	or	r14d, DWORD PTR UART_FCR_R_TRIG_10[rip]
	call	spin_lock_irqsave@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	esi, r13d
	mov	rdi, rbp
	call	uart_update_timeout@PLT
	mov	esi, DWORD PTR UART_LSR_OE[rip]
	mov	eax, DWORD PTR UART_LSR_THRE[rip]
	mov	edi, DWORD PTR UART_LSR_DR[rip]
	mov	r9, QWORD PTR 8[rsp]
	or	eax, esi
	or	eax, edi
	mov	edx, DWORD PTR 4[r9]
	mov	DWORD PTR 4[rbp], eax
	test	DWORD PTR INPCK[rip], edx
	je	.L11
	mov	ecx, DWORD PTR UART_LSR_FE[rip]
	or	ecx, DWORD PTR UART_LSR_PE[rip]
	or	eax, ecx
	mov	DWORD PTR 4[rbp], eax
.L11:
	mov	eax, DWORD PTR IGNBRK[rip]
	mov	ecx, DWORD PTR BRKINT[rip]
	or	ecx, eax
	or	ecx, DWORD PTR PARMRK[rip]
	test	ecx, edx
	je	.L12
	mov	ecx, DWORD PTR UART_LSR_BI[rip]
	or	DWORD PTR 4[rbp], ecx
.L12:
	mov	DWORD PTR 8[rbp], 0
	and	eax, edx
	test	DWORD PTR IGNPAR[rip], edx
	je	.L13
	mov	edx, DWORD PTR UART_LSR_FE[rip]
	or	edx, DWORD PTR UART_LSR_PE[rip]
	mov	DWORD PTR 8[rbp], edx
	test	eax, eax
	jne	.L14
.L15:
	test	DWORD PTR CREAD[rip], r13d
	jne	.L17
	or	DWORD PTR 8[rbp], edi
.L17:
	mov	esi, DWORD PTR UART_IER[rip]
	mov	rdi, rbp
	call	siu_read@PLT
	mov	edx, DWORD PTR UART_IER_MSI[rip]
	mov	esi, r13d
	mov	rdi, rbp
	not	edx
	and	edx, eax
	mov	DWORD PTR 4[rsp], edx
	call	UART_ENABLE_MS@PLT
	mov	edx, DWORD PTR 4[rsp]
	test	rax, rax
	je	.L18
	or	edx, DWORD PTR UART_IER_MSI[rip]
.L18:
	mov	esi, DWORD PTR UART_IER[rip]
	mov	rdi, rbp
	call	siu_write@PLT
	mov	edx, DWORD PTR UART_LCR_DLAB[rip]
	mov	esi, DWORD PTR UART_LCR[rip]
	mov	rdi, rbp
	or	edx, r12d
	call	siu_write@PLT
	mov	esi, DWORD PTR UART_DLL[rip]
	mov	edx, ebx
	mov	rdi, rbp
	shr	ebx, 8
	call	siu_write@PLT
	mov	esi, DWORD PTR UART_DLM[rip]
	mov	edx, ebx
	mov	rdi, rbp
	call	siu_write@PLT
	mov	esi, DWORD PTR UART_LCR[rip]
	mov	edx, r12d
	mov	rdi, rbp
	call	siu_write@PLT
	mov	esi, DWORD PTR UART_FCR[rip]
	mov	edx, r14d
	mov	rdi, rbp
	call	siu_write@PLT
	mov	esi, DWORD PTR 16[rbp]
	mov	rdi, rbp
	call	siu_set_mctrl@PLT
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r15
	xor	esi, esi
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	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
	jmp	spin_unlock_irqrestore@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	or	esi, DWORD PTR UART_LSR_BI[rip]
	or	esi, edx
	mov	DWORD PTR 8[rbp], esi
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L13:
	test	eax, eax
	je	.L15
	mov	eax, DWORD PTR UART_LSR_BI[rip]
	mov	DWORD PTR 8[rbp], eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r12d, DWORD PTR UART_LCR_WLEN6[rip]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	siu_set_termios, .-siu_set_termios
	.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,4,4
	.comm	UART_LCR_WLEN7,4,4
	.comm	UART_LCR_WLEN6,4,4
	.comm	UART_LCR_WLEN5,4,4
	.comm	UART_LCR_STOP,4,4
	.comm	UART_LCR_SPAR,4,4
	.comm	UART_LCR_PARITY,4,4
	.comm	UART_LCR_EPAR,4,4
	.comm	UART_LCR_DLAB,4,4
	.comm	UART_LCR,4,4
	.comm	UART_IER_MSI,4,4
	.comm	UART_IER,4,4
	.comm	UART_FCR_R_TRIG_10,4,4
	.comm	UART_FCR_ENABLE_FIFO,4,4
	.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	CREAD,4,4
	.comm	CMSPAR,4,4
	.comm	BRKINT,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_vr41xx_siu.c_siu_set_termios.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	siu_set_termios, %function
siu_set_termios:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L44
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r3]
	ldr	r5, [r1]
	mov	r7, r1
	and	r3, r3, r5
	cmp	r3, #129
	mov	r4, r0
	sub	sp, sp, #12
	beq	.L2
	cmp	r3, #130
	beq	.L3
	cmp	r3, #128
	beq	.L43
	ldr	r3, .L44+4
	ldr	r6, [r3]
.L6:
	ldr	r3, .L44+8
	mov	r0, r4
	ldr	r3, [r3]
	add	r10, r4, #12
	tst	r5, r3
	ldrne	r3, .L44+12
	ldrne	r3, [r3]
	orrne	r6, r6, r3
	ldr	r3, .L44+16
	ldr	r3, [r3]
	tst	r5, r3
	ldrne	r3, .L44+20
	ldrne	r3, [r3]
	orrne	r6, r6, r3
	ldr	r3, .L44+24
	ldr	r3, [r3]
	bics	r3, r3, r5
	ldrne	r3, .L44+28
	ldrne	r3, [r3]
	orrne	r6, r6, r3
	ldr	r3, .L44+32
	ldr	r3, [r3]
	tst	r5, r3
	ldrne	r3, .L44+36
	ldrne	r3, [r3]
	orrne	r6, r6, r3
	ldr	r3, [r4]
	cmp	r3, #0
	add	r1, r3, #15
	movlt	r3, r1
	asr	r3, r3, #4
	mov	r1, r7
	str	r3, [sp]
	mov	r3, #0
	bl	uart_get_baud_rate
	mov	fp, r0
	mov	r0, r4
	mov	r1, fp
	bl	uart_get_divisor
	ldr	r2, .L44+40
	ldr	r3, .L44+44
	ldr	r9, [r2]
	ldr	r3, [r3]
	mov	r1, #0
	mov	r8, r0
	mov	r0, r10
	orr	r9, r9, r3
	bl	spin_lock_irqsave
	mov	r2, fp
	mov	r1, r5
	mov	r0, r4
	bl	uart_update_timeout
	ldr	r2, .L44+48
	ldr	r3, .L44+52
	ldr	ip, .L44+56
	ldr	r0, .L44+60
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r7, #4]
	ldr	ip, [ip]
	ldr	r0, [r0]
	orr	r3, r1, r3
	orr	r3, r3, r0
	tst	r2, ip
	str	r3, [r4, #4]
	beq	.L11
	ldr	ip, .L44+64
	ldr	lr, .L44+68
	ldr	ip, [ip]
	ldr	lr, [lr]
	orr	ip, ip, lr
	orr	r3, ip, r3
	str	r3, [r4, #4]
.L11:
	ldr	ip, .L44+72
	ldr	r3, .L44+76
	ldr	lr, .L44+80
	ldr	ip, [ip]
	ldr	r3, [r3]
	ldr	lr, [lr]
	orr	r3, ip, r3
	orr	r3, r3, lr
	tst	r3, r2
	ldrne	lr, .L44+84
	ldrne	r3, [r4, #4]
	ldrne	lr, [lr]
	and	ip, ip, r2
	orrne	r3, r3, lr
	mov	lr, #0
	strne	r3, [r4, #4]
	ldr	r3, .L44+88
	str	lr, [r4, #8]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L13
	ldr	r3, .L44+64
	ldr	r2, .L44+68
	ldr	r3, [r3]
	ldr	r2, [r2]
	cmp	ip, lr
	orr	r3, r3, r2
	str	r3, [r4, #8]
	beq	.L15
	ldr	r2, .L44+84
	ldr	r2, [r2]
	orr	r1, r1, r2
	orr	r1, r1, r3
	str	r1, [r4, #8]
.L15:
	ldr	r3, .L44+92
	ldr	r7, .L44+96
	ldr	r3, [r3]
	ldr	r1, [r7]
	tst	r5, r3
	ldreq	r3, [r4, #8]
	ldr	fp, .L44+100
	orreq	r0, r3, r0
	streq	r0, [r4, #8]
	mov	r0, r4
	bl	siu_read
	mov	r2, r0
	mov	r1, r5
	ldr	r5, [fp]
	mov	r0, r4
	bic	r5, r2, r5
	bl	UART_ENABLE_MS
	cmp	r0, #0
	ldrne	r3, [fp]
	ldr	r1, [r7]
	orrne	r5, r5, r3
	mov	r2, r5
	mov	r0, r4
	bl	siu_write
	ldr	r3, .L44+104
	ldr	r5, .L44+108
	ldr	r2, [r3]
	ldr	r1, [r5]
	orr	r2, r6, r2
	mov	r0, r4
	bl	siu_write
	ldr	r3, .L44+112
	mov	r2, r8
	ldr	r1, [r3]
	mov	r0, r4
	bl	siu_write
	ldr	r3, .L44+116
	lsr	r2, r8, #8
	ldr	r1, [r3]
	mov	r0, r4
	bl	siu_write
	mov	r2, r6
	ldr	r1, [r5]
	mov	r0, r4
	bl	siu_write
	ldr	r3, .L44+120
	mov	r2, r9
	ldr	r1, [r3]
	mov	r0, r4
	bl	siu_write
	ldr	r1, [r4, #16]
	mov	r0, r4
	bl	siu_set_mctrl
	mov	r0, r10
	mov	r1, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	spin_unlock_irqrestore
.L13:
	cmp	ip, #0
	ldrne	r3, .L44+84
	ldrne	r3, [r3]
	strne	r3, [r4, #8]
	b	.L15
.L2:
	ldr	r3, .L44+124
	ldr	r6, [r3]
	b	.L6
.L43:
	ldr	r3, .L44+128
	ldr	r6, [r3]
	b	.L6
.L3:
	ldr	r3, .L44+132
	ldr	r6, [r3]
	b	.L6
.L45:
	.align	2
.L44:
	.word	CSIZE
	.word	UART_LCR_WLEN8
	.word	CSTOPB
	.word	UART_LCR_STOP
	.word	PARENB
	.word	UART_LCR_PARITY
	.word	PARODD
	.word	UART_LCR_EPAR
	.word	CMSPAR
	.word	UART_LCR_SPAR
	.word	UART_FCR_ENABLE_FIFO
	.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	IGNBRK
	.word	BRKINT
	.word	PARMRK
	.word	UART_LSR_BI
	.word	IGNPAR
	.word	CREAD
	.word	UART_IER
	.word	UART_IER_MSI
	.word	UART_LCR_DLAB
	.word	UART_LCR
	.word	UART_DLL
	.word	UART_DLM
	.word	UART_FCR
	.word	UART_LCR_WLEN6
	.word	UART_LCR_WLEN7
	.word	UART_LCR_WLEN5
	.size	siu_set_termios, .-siu_set_termios
	.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,4,4
	.comm	UART_LCR_WLEN7,4,4
	.comm	UART_LCR_WLEN6,4,4
	.comm	UART_LCR_WLEN5,4,4
	.comm	UART_LCR_STOP,4,4
	.comm	UART_LCR_SPAR,4,4
	.comm	UART_LCR_PARITY,4,4
	.comm	UART_LCR_EPAR,4,4
	.comm	UART_LCR_DLAB,4,4
	.comm	UART_LCR,4,4
	.comm	UART_IER_MSI,4,4
	.comm	UART_IER,4,4
	.comm	UART_FCR_R_TRIG_10,4,4
	.comm	UART_FCR_ENABLE_FIFO,4,4
	.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	CREAD,4,4
	.comm	CMSPAR,4,4
	.comm	BRKINT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
