	.file	"extr_serdev-ttyport.c_ttyport_open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ttyport_open, @function
ttyport_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	serdev_controller_get_drvdata@PLT
	mov	edi, DWORD PTR 16[rax]
	mov	esi, DWORD PTR [rax]
	mov	rbx, rax
	call	tty_init_dev@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L14
	mov	rax, QWORD PTR 0[rbp]
	mov	QWORD PTR 8[rbx], rbp
	mov	rdx, QWORD PTR [rax]
	test	rdx, rdx
	je	.L4
	cmp	QWORD PTR 8[rax], 0
	je	.L4
	xor	esi, esi
	mov	rdi, rbp
	call	rdx
	mov	r12d, eax
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR 0[rbp]
	xor	esi, esi
	mov	rdi, rbp
	call	[QWORD PTR 8[rax]]
.L6:
	mov	rdi, rbp
	call	tty_unlock@PLT
	mov	esi, DWORD PTR [rbx]
	mov	rdi, rbp
	call	tty_release_struct@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L15
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rbx]
	call	tty_unlock@PLT
	movdqu	xmm0, XMMWORD PTR 8[rbp]
	mov	rsi, rsp
	mov	rdi, rbp
	mov	eax, DWORD PTR OPOST[rip]
	mov	edx, DWORD PTR IGNBRK[rip]
	movaps	XMMWORD PTR [rsp], xmm0
	or	edx, DWORD PTR BRKINT[rip]
	or	edx, DWORD PTR PARMRK[rip]
	not	eax
	and	DWORD PTR 12[rsp], eax
	mov	eax, DWORD PTR ECHO[rip]
	or	eax, DWORD PTR ECHONL[rip]
	or	eax, DWORD PTR ICANON[rip]
	or	eax, DWORD PTR ISIG[rip]
	or	eax, DWORD PTR IEXTEN[rip]
	or	edx, DWORD PTR ISTRIP[rip]
	not	eax
	or	edx, DWORD PTR INLCR[rip]
	and	DWORD PTR 4[rsp], eax
	or	edx, DWORD PTR IGNCR[rip]
	mov	eax, DWORD PTR CSIZE[rip]
	or	edx, DWORD PTR ICRNL[rip]
	or	eax, DWORD PTR PARENB[rip]
	or	edx, DWORD PTR IXON[rip]
	not	edx
	not	eax
	and	DWORD PTR [rsp], edx
	and	eax, DWORD PTR 8[rsp]
	mov	edx, DWORD PTR CS8[rip]
	or	edx, DWORD PTR CRTSCTS[rip]
	or	edx, DWORD PTR CLOCAL[rip]
	or	eax, edx
	mov	DWORD PTR 8[rsp], eax
	call	tty_set_termios@PLT
	mov	edi, DWORD PTR SERPORT_ACTIVE[rip]
	lea	rsi, 4[rbx]
	call	set_bit@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	r12d, DWORD PTR ENODEV[rip]
	neg	r12d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, rbp
	call	PTR_ERR@PLT
	mov	r12d, eax
	jmp	.L1
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ttyport_open, .-ttyport_open
	.comm	SERPORT_ACTIVE,4,4
	.comm	PARMRK,4,4
	.comm	PARENB,4,4
	.comm	OPOST,4,4
	.comm	IXON,4,4
	.comm	ISTRIP,4,4
	.comm	ISIG,4,4
	.comm	INLCR,4,4
	.comm	IGNCR,4,4
	.comm	IGNBRK,4,4
	.comm	IEXTEN,4,4
	.comm	ICRNL,4,4
	.comm	ICANON,4,4
	.comm	ENODEV,4,4
	.comm	ECHONL,4,4
	.comm	ECHO,4,4
	.comm	CSIZE,4,4
	.comm	CS8,4,4
	.comm	CRTSCTS,4,4
	.comm	CLOCAL,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_serdev-ttyport.c_ttyport_open.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ttyport_open, %function
ttyport_open:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L16
	sub	sp, sp, #28
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	serdev_controller_get_drvdata
	ldr	r1, [r0]
	mov	r5, r0
	ldr	r0, [r0, #12]
	bl	tty_init_dev
	mov	r4, r0
	bl	IS_ERR
	subs	r6, r0, #0
	bne	.L14
	ldr	r3, [r4]
	str	r4, [r5, #8]
	ldr	r2, [r3]
	cmp	r2, #0
	beq	.L4
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L4
	mov	r1, r6
	mov	r0, r4
	blx	r2
	subs	r7, r0, #0
	beq	.L7
	ldr	r3, [r4]
	mov	r1, r6
	mov	r0, r4
	ldr	r3, [r3, #4]
	blx	r3
.L6:
	mov	r0, r4
	bl	tty_unlock
	mov	r0, r4
	ldr	r1, [r5]
	bl	tty_release_struct
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	mov	r0, r7
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L7:
	ldr	r0, [r5, #8]
	bl	tty_unlock
	ldmib	r4, {r0, r1, r2, r3}
	ldr	ip, .L16+4
	ldr	lr, .L16+8
	ldr	ip, [ip]
	ldr	lr, [lr]
	ldr	r6, .L16+12
	orr	ip, ip, lr
	ldr	lr, .L16+16
	ldr	r6, [r6]
	ldr	r9, [lr]
	add	lr, sp, #4
	stm	lr, {r0, r1, r2, r3}
	orr	ip, ip, r6
	ldr	r3, .L16+20
	ldr	r6, .L16+24
	ldr	r2, .L16+28
	ldr	r1, .L16+32
	ldr	r8, [r6]
	ldr	r2, [r2]
	ldr	r6, [r3]
	ldr	r0, .L16+36
	ldr	r1, [r1]
	orr	r3, ip, r9
	ldr	ip, .L16+40
	ldr	r0, [r0]
	orr	r2, r2, r6
	ldr	r6, .L16+44
	ldr	ip, [ip]
	orr	r3, r3, r8
	orr	r2, r2, r1
	ldr	r1, .L16+48
	ldr	r6, [r6]
	orr	r3, r3, r0
	ldr	r0, .L16+52
	ldr	r1, [r1]
	orr	r3, r3, ip
	ldr	ip, .L16+56
	ldr	r0, [r0]
	orr	r2, r2, r6
	orr	r2, r2, r1
	ldr	r6, [ip]
	ldr	r1, [sp, #16]
	ldr	ip, [sp, #4]
	orr	r3, r3, r0
	ldr	r0, [sp, #8]
	bic	r3, ip, r3
	bic	r1, r1, r6
	ldr	ip, .L16+60
	ldr	r9, .L16+64
	ldr	r6, .L16+68
	ldr	r8, .L16+72
	bic	r2, r0, r2
	ldr	r0, .L16+76
	ldr	r8, [r8]
	str	r3, [sp, #4]
	str	r2, [sp, #8]
	ldr	r3, [sp, #12]
	ldr	r2, [r9]
	str	r1, [sp, #16]
	ldr	r1, [ip]
	ldr	ip, [r6]
	ldr	r0, [r0]
	orr	r1, r1, r8
	orr	r2, r2, ip
	orr	r2, r2, r0
	bic	r3, r3, r1
	orr	r3, r3, r2
	mov	r1, lr
	mov	r0, r4
	str	r3, [sp, #12]
	bl	tty_set_termios
	ldr	r3, .L16+80
	add	r1, r5, #4
	ldr	r0, [r3]
	bl	set_bit
	b	.L1
.L4:
	ldr	r3, .L16+84
	ldr	r7, [r3]
	rsb	r7, r7, #0
	b	.L6
.L14:
	mov	r0, r4
	bl	PTR_ERR
	mov	r7, r0
	b	.L1
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	IGNBRK
	.word	BRKINT
	.word	PARMRK
	.word	ISTRIP
	.word	ECHONL
	.word	INLCR
	.word	ECHO
	.word	ICANON
	.word	IGNCR
	.word	ICRNL
	.word	ISIG
	.word	IEXTEN
	.word	IXON
	.word	OPOST
	.word	CSIZE
	.word	CS8
	.word	CRTSCTS
	.word	PARENB
	.word	CLOCAL
	.word	SERPORT_ACTIVE
	.word	ENODEV
	.size	ttyport_open, .-ttyport_open
	.comm	SERPORT_ACTIVE,4,4
	.comm	PARMRK,4,4
	.comm	PARENB,4,4
	.comm	OPOST,4,4
	.comm	IXON,4,4
	.comm	ISTRIP,4,4
	.comm	ISIG,4,4
	.comm	INLCR,4,4
	.comm	IGNCR,4,4
	.comm	IGNBRK,4,4
	.comm	IEXTEN,4,4
	.comm	ICRNL,4,4
	.comm	ICANON,4,4
	.comm	ENODEV,4,4
	.comm	ECHONL,4,4
	.comm	ECHO,4,4
	.comm	CSIZE,4,4
	.comm	CS8,4,4
	.comm	CRTSCTS,4,4
	.comm	CLOCAL,4,4
	.comm	BRKINT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
