	.file	"extr_con3215.c_raw3215_shutdown.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	raw3215_shutdown, @function
raw3215_shutdown:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	lea	r12, 8[rbx]
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR wait[rip]
	mov	esi, DWORD PTR current[rip]
	call	DECLARE_WAITQUEUE@PLT
	mov	rdi, r12
	call	tty_port_initialized@PLT
	test	eax, eax
	je	.L1
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR RAW3215_FIXED[rip], eax
	je	.L10
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[rbx]
	xor	ebp, ebp
	call	get_ccwdev_lock@PLT
	mov	rsi, rbp
	mov	edi, eax
	call	spin_lock_irqsave@PLT
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR RAW3215_WORKING[rip], eax
	jne	.L3
	cmp	QWORD PTR 24[rbx], 0
	je	.L11
.L3:
	lea	r13, 12[rbx]
	lea	rsi, wait[rip]
	xor	ebp, ebp
	mov	rdi, r13
	call	add_wait_queue@PLT
	mov	edi, DWORD PTR TASK_INTERRUPTIBLE[rip]
	call	set_current_state@PLT
	mov	edi, DWORD PTR 4[rbx]
	call	get_ccwdev_lock@PLT
	mov	rsi, rbp
	mov	edi, eax
	call	spin_unlock_irqrestore@PLT
	xor	eax, eax
	call	schedule@PLT
	mov	edi, DWORD PTR 4[rbx]
	call	get_ccwdev_lock@PLT
	mov	rsi, rbp
	mov	edi, eax
	call	spin_lock_irqsave@PLT
	lea	rsi, wait[rip]
	mov	rdi, r13
	call	remove_wait_queue@PLT
	mov	edi, DWORD PTR TASK_RUNNING[rip]
	call	set_current_state@PLT
	mov	esi, 1
	mov	rdi, r12
	call	tty_port_set_initialized@PLT
.L4:
	mov	edi, DWORD PTR 4[rbx]
	xor	ebp, ebp
	call	get_ccwdev_lock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rsi, rbp
	pop	rbx
	.cfi_def_cfa_offset 32
	mov	edi, eax
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	spin_unlock_irqrestore@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	cmp	QWORD PTR 16[rbx], 0
	jne	.L3
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	raw3215_shutdown, .-raw3215_shutdown
	.comm	wait,4,4
	.comm	current,4,4
	.comm	TASK_RUNNING,4,4
	.comm	TASK_INTERRUPTIBLE,4,4
	.comm	RAW3215_WORKING,4,4
	.comm	RAW3215_FIXED,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_con3215.c_raw3215_shutdown.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	raw3215_shutdown, %function
raw3215_shutdown:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L14
	ldr	r3, .L14+4
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r1, [r2]
	add	r5, r0, #8
	mov	r4, r0
	ldr	r0, [r3]
	bl	DECLARE_WAITQUEUE
	mov	r0, r5
	bl	tty_port_initialized
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, .L14+8
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	popne	{r4, r5, r6, r7, r8, pc}
	ldr	r0, [r4, #4]
	bl	get_ccwdev_lock
	mov	r1, #0
	bl	spin_lock_irqsave
	ldr	r3, .L14+12
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L3
	ldr	r3, [r4, #20]
	cmp	r3, #0
	beq	.L13
.L3:
	mov	r7, #0
	add	r6, r4, #12
	ldr	r1, .L14+4
	mov	r0, r6
	bl	add_wait_queue
	ldr	r3, .L14+16
	ldr	r0, [r3]
	bl	set_current_state
	ldr	r0, [r4, #4]
	bl	get_ccwdev_lock
	mov	r1, r7
	bl	spin_unlock_irqrestore
	bl	schedule
	ldr	r0, [r4, #4]
	bl	get_ccwdev_lock
	mov	r1, r7
	bl	spin_lock_irqsave
	ldr	r1, .L14+4
	mov	r0, r6
	bl	remove_wait_queue
	ldr	r3, .L14+20
	ldr	r0, [r3]
	bl	set_current_state
	mov	r0, r5
	mov	r1, #1
	bl	tty_port_set_initialized
.L4:
	ldr	r0, [r4, #4]
	bl	get_ccwdev_lock
	pop	{r4, r5, r6, r7, r8, lr}
	mov	r1, #0
	b	spin_unlock_irqrestore
.L13:
	ldr	r3, [r4, #16]
	cmp	r3, #0
	bne	.L3
	b	.L4
.L15:
	.align	2
.L14:
	.word	current
	.word	wait
	.word	RAW3215_FIXED
	.word	RAW3215_WORKING
	.word	TASK_INTERRUPTIBLE
	.word	TASK_RUNNING
	.size	raw3215_shutdown, .-raw3215_shutdown
	.comm	wait,4,4
	.comm	current,4,4
	.comm	TASK_RUNNING,4,4
	.comm	TASK_INTERRUPTIBLE,4,4
	.comm	RAW3215_WORKING,4,4
	.comm	RAW3215_FIXED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
