	.file	"extr_usb_serial.c_ucom_close.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"tp=%p\n"
.LC1:
	.string	"tp=%p already closed\n"
	.text
	.p2align 4
	.type	ucom_close, @function
ucom_close:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	tty_softc@PLT
	mov	esi, DWORD PTR MA_OWNED[rip]
	mov	rdi, rax
	mov	rbp, rax
	call	UCOM_MTX_ASSERT@PLT
	mov	rsi, r12
	lea	rdi, .LC0[rip]
	call	DPRINTF@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR UCOM_FLAG_HL_READY[rip], eax
	je	.L6
	mov	rdi, rbp
	call	ucom_shutdown@PLT
	mov	rcx, QWORD PTR 16[rbp]
	xor	edx, edx
	mov	rdi, rbp
	mov	esi, DWORD PTR ucom_cfg_close[rip]
	lea	r8, 4[rcx]
	call	ucom_queue_command@PLT
	mov	eax, DWORD PTR UCOM_FLAG_HL_READY[rip]
	or	eax, DWORD PTR UCOM_FLAG_RTS_IFLOW[rip]
	not	eax
	and	DWORD PTR 0[rbp], eax
	mov	rax, QWORD PTR 8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L1
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	rax
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rsi, r12
	lea	rdi, .LC1[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	DPRINTF@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ucom_close, .-ucom_close
	.comm	ucom_cfg_close,4,4
	.comm	UCOM_FLAG_RTS_IFLOW,4,4
	.comm	UCOM_FLAG_HL_READY,4,4
	.comm	MA_OWNED,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_usb_serial.c_ucom_close.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"tp=%p\012\000"
	.align	2
.LC1:
	.ascii	"tp=%p already closed\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ucom_close, %function
ucom_close:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	sub	sp, sp, #8
	mov	r5, r0
	bl	tty_softc
	mov	r4, r0
	ldr	r3, .L7
	ldr	r6, .L7+4
	ldr	r1, [r3]
	bl	UCOM_MTX_ASSERT
	mov	r1, r5
	ldr	r0, .L7+8
	bl	DPRINTF
	ldr	r2, [r4]
	ldr	r3, [r6]
	tst	r2, r3
	beq	.L6
	mov	r0, r4
	bl	ucom_shutdown
	ldr	r3, [r4, #8]
	ldr	r2, .L7+12
	add	r1, r3, #4
	str	r1, [sp]
	ldr	r1, [r2]
	mov	r0, r4
	mov	r2, #0
	bl	ucom_queue_command
	ldr	r3, .L7+16
	ldr	r1, [r4, #4]
	ldr	r0, [r3]
	ldr	r2, [r6]
	ldr	r3, [r4]
	ldr	r1, [r1]
	orr	r2, r2, r0
	bic	r3, r3, r2
	cmp	r1, #0
	str	r3, [r4]
	beq	.L1
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, lr}
	bx	r1
.L6:
	mov	r1, r5
	ldr	r0, .L7+20
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, lr}
	b	DPRINTF
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L8:
	.align	2
.L7:
	.word	MA_OWNED
	.word	UCOM_FLAG_HL_READY
	.word	.LC0
	.word	ucom_cfg_close
	.word	UCOM_FLAG_RTS_IFLOW
	.word	.LC1
	.size	ucom_close, .-ucom_close
	.comm	ucom_cfg_close,4,4
	.comm	UCOM_FLAG_RTS_IFLOW,4,4
	.comm	UCOM_FLAG_HL_READY,4,4
	.comm	MA_OWNED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
