	.file	"extr_uart_dev_oct16550.c_oct16550_bus_ioctl.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	oct16550_bus_ioctl, @function
oct16550_bus_ioctl:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	lea	rbp, 4[rdi]
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR [rdi]
	call	uart_lock@PLT
	cmp	ebx, 130
	je	.L2
	jg	.L3
	cmp	ebx, 128
	je	.L4
	cmp	ebx, 129
	jne	.L6
	mov	esi, DWORD PTR REG_LCR[rip]
	mov	rdi, rbp
	call	uart_getreg@PLT
	mov	rdi, rbp
	mov	r14d, eax
	call	uart_barrier@PLT
	mov	esi, DWORD PTR REG_LCR[rip]
	mov	edx, 191
	mov	rdi, rbp
	call	uart_setreg@PLT
	mov	rdi, rbp
	call	uart_barrier@PLT
	mov	esi, DWORD PTR REG_EFR[rip]
	mov	rdi, rbp
	call	uart_getreg@PLT
	mov	edx, eax
	test	r13, r13
	je	.L11
	or	edx, DWORD PTR EFR_RTS[rip]
.L14:
	mov	esi, DWORD PTR REG_EFR[rip]
	mov	rdi, rbp
	call	uart_setreg@PLT
	mov	rdi, rbp
	call	uart_barrier@PLT
	mov	edx, r14d
.L18:
	mov	esi, DWORD PTR REG_LCR[rip]
	mov	rdi, rbp
	xor	r13d, r13d
	call	uart_setreg@PLT
	mov	rdi, rbp
	call	uart_barrier@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	cmp	ebx, 131
	jne	.L6
	mov	esi, DWORD PTR REG_LCR[rip]
	mov	rdi, rbp
	call	uart_getreg@PLT
	mov	edx, DWORD PTR LCR_DLAB[rip]
	mov	esi, DWORD PTR REG_LCR[rip]
	mov	rdi, rbp
	mov	r15d, eax
	or	edx, eax
	call	uart_setreg@PLT
	mov	rdi, rbp
	call	uart_barrier@PLT
	mov	esi, DWORD PTR REG_DLL[rip]
	mov	rdi, rbp
	call	uart_getreg@PLT
	mov	esi, DWORD PTR REG_DLH[rip]
	mov	rdi, rbp
	mov	r14d, eax
	call	uart_getreg@PLT
	mov	rdi, rbp
	sal	eax, 8
	mov	ebx, eax
	call	uart_barrier@PLT
	mov	rdi, rbp
	mov	edx, r15d
	or	ebx, r14d
	mov	esi, DWORD PTR REG_LCR[rip]
	call	uart_setreg@PLT
	mov	rdi, rbp
	call	uart_barrier@PLT
	test	ebx, ebx
	jle	.L20
	mov	DWORD PTR delay_changed[rip], 1
	mov	eax, DWORD PTR 4[r12]
	cdq
	idiv	ebx
	cmp	eax, 15
	jle	.L16
	sar	eax, 4
	mov	DWORD PTR 0[r13], eax
	xor	r13d, r13d
.L10:
	mov	edi, DWORD PTR [r12]
	call	uart_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	eax, DWORD PTR EFR_RTS[rip]
	not	eax
	and	edx, eax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L20:
	mov	DWORD PTR delay_changed[rip], 1
.L16:
	mov	r13d, DWORD PTR ENXIO[rip]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L2:
	mov	esi, DWORD PTR REG_LCR[rip]
	mov	rdi, rbp
	call	uart_getreg@PLT
	mov	edx, eax
	test	r13, r13
	je	.L8
	or	edx, DWORD PTR LCR_SBREAK[rip]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L4:
	mov	esi, DWORD PTR REG_LCR[rip]
	mov	rdi, rbp
	call	uart_getreg@PLT
	mov	rdi, rbp
	mov	r14d, eax
	call	uart_barrier@PLT
	mov	esi, DWORD PTR REG_LCR[rip]
	mov	edx, 191
	mov	rdi, rbp
	call	uart_setreg@PLT
	mov	rdi, rbp
	call	uart_barrier@PLT
	mov	esi, DWORD PTR REG_EFR[rip]
	mov	rdi, rbp
	call	uart_getreg@PLT
	mov	edx, eax
	test	r13, r13
	je	.L13
	or	edx, DWORD PTR EFR_CTS[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r13d, DWORD PTR EINVAL[rip]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	mov	eax, DWORD PTR LCR_SBREAK[rip]
	not	eax
	and	edx, eax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L13:
	mov	eax, DWORD PTR EFR_CTS[rip]
	not	eax
	and	edx, eax
	jmp	.L14
	.cfi_endproc
.LFE0:
	.size	oct16550_bus_ioctl, .-oct16550_bus_ioctl
	.comm	delay_changed,4,4
	.comm	REG_LCR,4,4
	.comm	REG_EFR,4,4
	.comm	REG_DLL,4,4
	.comm	REG_DLH,4,4
	.comm	LCR_SBREAK,4,4
	.comm	LCR_DLAB,4,4
	.comm	ENXIO,4,4
	.comm	EINVAL,4,4
	.comm	EFR_RTS,4,4
	.comm	EFR_CTS,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_uart_dev_oct16550.c_oct16550_bus_ioctl.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	oct16550_bus_ioctl, %function
oct16550_bus_ioctl:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	mov	r5, r1
	mov	r6, r0
	ldr	r0, [r4], #4
	mov	r7, r2
	bl	uart_lock
	sub	r1, r5, #128
	cmp	r1, #3
	ldrls	pc, [pc, r1, asl #2]
	b	.L2
.L4:
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L3:
	ldr	r9, .L22
	mov	r0, r4
	ldr	r1, [r9]
	bl	uart_getreg
	mov	r8, r0
	ldr	r3, .L22+4
	ldr	r1, [r9]
	ldr	r2, [r3]
	mov	r0, r4
	orr	r2, r8, r2
	bl	uart_setreg
	mov	r0, r4
	bl	uart_barrier
	ldr	r3, .L22+8
	mov	r0, r4
	ldr	r1, [r3]
	bl	uart_getreg
	ldr	r3, .L22+12
	mov	r5, r0
	ldr	r1, [r3]
	mov	r0, r4
	bl	uart_getreg
	mov	r3, r0
	mov	r0, r4
	orr	r5, r5, r3, lsl #8
	bl	uart_barrier
	mov	r2, r8
	ldr	r1, [r9]
	mov	r0, r4
	bl	uart_setreg
	mov	r0, r4
	bl	uart_barrier
	cmp	r5, #0
	ble	.L21
	mov	r1, r5
	ldr	r0, [r6, #4]
	bl	__aeabi_idiv
	mov	r2, #1
	ldr	r3, .L22+16
	cmp	r0, #15
	str	r2, [r3]
	ble	.L16
	mov	r4, #0
	asr	r0, r0, #4
	str	r0, [r7]
.L10:
	ldr	r0, [r6]
	bl	uart_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	ldr	r5, .L22
	mov	r0, r4
	ldr	r1, [r5]
	bl	uart_getreg
	mov	r9, r0
	mov	r0, r4
	bl	uart_barrier
	ldr	r8, .L22+20
	mov	r2, #191
	ldr	r1, [r5]
	mov	r0, r4
	bl	uart_setreg
	mov	r0, r4
	bl	uart_barrier
	mov	r0, r4
	ldr	r1, [r8]
	bl	uart_getreg
	ldr	r3, .L22+24
	cmp	r7, #0
	ldr	r2, [r3]
	beq	.L13
.L19:
	orr	r2, r0, r2
.L14:
	ldr	r1, [r8]
	mov	r0, r4
	bl	uart_setreg
	mov	r0, r4
	bl	uart_barrier
	mov	r2, r9
.L18:
	mov	r0, r4
	ldr	r1, [r5]
	bl	uart_setreg
	mov	r0, r4
	bl	uart_barrier
	mov	r4, #0
	b	.L10
.L6:
	ldr	r5, .L22
	mov	r0, r4
	ldr	r1, [r5]
	bl	uart_getreg
	mov	r9, r0
	mov	r0, r4
	bl	uart_barrier
	ldr	r8, .L22+20
	mov	r2, #191
	ldr	r1, [r5]
	mov	r0, r4
	bl	uart_setreg
	mov	r0, r4
	bl	uart_barrier
	mov	r0, r4
	ldr	r1, [r8]
	bl	uart_getreg
	ldr	r3, .L22+28
	cmp	r7, #0
	ldr	r2, [r3]
	bne	.L19
.L13:
	bic	r2, r0, r2
	b	.L14
.L5:
	ldr	r5, .L22
	mov	r0, r4
	ldr	r1, [r5]
	bl	uart_getreg
	ldr	r3, .L22+32
	cmp	r7, #0
	ldr	r2, [r3]
	orrne	r2, r0, r2
	biceq	r2, r0, r2
	b	.L18
.L21:
	mov	r2, #1
	ldr	r3, .L22+16
	str	r2, [r3]
.L16:
	ldr	r3, .L22+36
	ldr	r4, [r3]
	b	.L10
.L2:
	ldr	r3, .L22+40
	ldr	r4, [r3]
	b	.L10
.L23:
	.align	2
.L22:
	.word	REG_LCR
	.word	LCR_DLAB
	.word	REG_DLL
	.word	REG_DLH
	.word	delay_changed
	.word	REG_EFR
	.word	EFR_CTS
	.word	EFR_RTS
	.word	LCR_SBREAK
	.word	ENXIO
	.word	EINVAL
	.size	oct16550_bus_ioctl, .-oct16550_bus_ioctl
	.comm	delay_changed,4,4
	.comm	REG_LCR,4,4
	.comm	REG_EFR,4,4
	.comm	REG_DLL,4,4
	.comm	REG_DLH,4,4
	.comm	LCR_SBREAK,4,4
	.comm	LCR_DLAB,4,4
	.comm	ENXIO,4,4
	.comm	EINVAL,4,4
	.comm	EFR_RTS,4,4
	.comm	EFR_CTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
