	.file	"extr_sdio_uart.c_sdio_uart_startup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sdio_uart_startup, @function
sdio_uart_startup:
.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
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR 24[rdi]
	mov	edi, DWORD PTR TTY_IO_ERROR[rip]
	lea	rsi, 4[rax]
	call	set_bit@PLT
	mov	edi, DWORD PTR GFP_KERNEL[rip]
	call	__get_free_page@PLT
	test	rax, rax
	jne	.L2
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	QWORD PTR 8[rbp], rax
	lea	rdi, 8[rbp]
	call	circ_clear@PLT
	mov	rdi, rbp
	call	sdio_uart_claim_func@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L4
	mov	edi, DWORD PTR 16[rbp]
	call	sdio_enable_func@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L18
.L5:
	mov	rdi, rbp
	call	sdio_uart_release_func@PLT
.L4:
	mov	rdi, QWORD PTR 8[rbp]
	call	free_page@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	edi, DWORD PTR 16[rbp]
	mov	rsi, QWORD PTR sdio_uart_irq@GOTPCREL[rip]
	call	sdio_claim_irq@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L19
	mov	edx, DWORD PTR UART_FCR_ENABLE_FIFO[rip]
	mov	esi, DWORD PTR UART_FCR[rip]
	mov	rdi, rbp
	call	sdio_out@PLT
	mov	esi, DWORD PTR UART_FCR[rip]
	mov	edx, DWORD PTR UART_FCR_ENABLE_FIFO[rip]
	mov	rdi, rbp
	or	edx, DWORD PTR UART_FCR_CLEAR_RCVR[rip]
	or	edx, DWORD PTR UART_FCR_CLEAR_XMIT[rip]
	call	sdio_out@PLT
	mov	esi, DWORD PTR UART_FCR[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	sdio_out@PLT
	mov	esi, DWORD PTR UART_LSR[rip]
	mov	rdi, rbp
	call	sdio_in@PLT
	mov	esi, DWORD PTR UART_RX[rip]
	mov	rdi, rbp
	call	sdio_in@PLT
	mov	esi, DWORD PTR UART_IIR[rip]
	mov	rdi, rbp
	call	sdio_in@PLT
	mov	esi, DWORD PTR UART_MSR[rip]
	mov	rdi, rbp
	call	sdio_in@PLT
	mov	edx, DWORD PTR UART_LCR_WLEN8[rip]
	mov	esi, DWORD PTR UART_LCR[rip]
	mov	rdi, rbp
	call	sdio_out@PLT
	mov	eax, DWORD PTR UART_IER_RLSI[rip]
	xor	edx, edx
	mov	rdi, rbp
	or	eax, DWORD PTR UART_IER_RDI[rip]
	or	eax, DWORD PTR UART_IER_RTOIE[rip]
	or	eax, DWORD PTR UART_IER_UUE[rip]
	mov	DWORD PTR 0[rbp], eax
	mov	eax, DWORD PTR TIOCM_OUT2[rip]
	mov	DWORD PTR 32[rbp], eax
	mov	rax, QWORD PTR 24[rbp]
	mov	rsi, QWORD PTR 8[rax]
	call	sdio_uart_change_speed@PLT
	mov	rsi, QWORD PTR 24[rbp]
	mov	rax, QWORD PTR 8[rsi]
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR CBAUD[rip], eax
	jne	.L20
.L7:
	test	DWORD PTR CRTSCTS[rip], eax
	jne	.L21
.L8:
	mov	edi, DWORD PTR TTY_IO_ERROR[rip]
	add	rsi, 4
	call	clear_bit@PLT
	mov	edi, DWORD PTR 16[rbp]
	call	sdio_uart_irq@PLT
	mov	rdi, rbp
	call	sdio_uart_release_func@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	edi, DWORD PTR 16[rbp]
	call	sdio_disable_func@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, rbp
	call	sdio_uart_get_mctrl@PLT
	mov	rsi, QWORD PTR 24[rbp]
	test	DWORD PTR TIOCM_CTS[rip], eax
	jne	.L8
	mov	DWORD PTR [rsi], 1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L20:
	mov	esi, DWORD PTR TIOCM_RTS[rip]
	mov	rdi, rbp
	or	esi, DWORD PTR TIOCM_DTR[rip]
	call	sdio_uart_set_mctrl@PLT
	mov	rsi, QWORD PTR 24[rbp]
	mov	rax, QWORD PTR 8[rsi]
	mov	eax, DWORD PTR [rax]
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	sdio_uart_startup, .-sdio_uart_startup
	.comm	UART_RX,4,4
	.comm	UART_MSR,4,4
	.comm	UART_LSR,4,4
	.comm	UART_LCR_WLEN8,4,4
	.comm	UART_LCR,4,4
	.comm	UART_IIR,4,4
	.comm	UART_IER_UUE,4,4
	.comm	UART_IER_RTOIE,4,4
	.comm	UART_IER_RLSI,4,4
	.comm	UART_IER_RDI,4,4
	.comm	UART_FCR_ENABLE_FIFO,4,4
	.comm	UART_FCR_CLEAR_XMIT,4,4
	.comm	UART_FCR_CLEAR_RCVR,4,4
	.comm	UART_FCR,4,4
	.comm	TTY_IO_ERROR,4,4
	.comm	TIOCM_RTS,4,4
	.comm	TIOCM_OUT2,4,4
	.comm	TIOCM_DTR,4,4
	.comm	TIOCM_CTS,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	CRTSCTS,4,4
	.comm	CBAUD,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_sdio_uart.c_sdio_uart_startup.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sdio_uart_startup, %function
sdio_uart_startup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r1, [r0, #12]
	ldr	r6, .L22
	add	r1, r1, #4
	mov	r4, r0
	ldr	r0, [r6]
	bl	set_bit
	ldr	r3, .L22+4
	ldr	r0, [r3]
	bl	__get_free_page
	subs	r3, r0, #0
	bne	.L2
	ldr	r3, .L22+8
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r0, r4
	str	r3, [r0, #4]!
	bl	circ_clear
	mov	r0, r4
	bl	sdio_uart_claim_func
	subs	r5, r0, #0
	bne	.L4
	ldr	r0, [r4, #8]
	bl	sdio_enable_func
	subs	r5, r0, #0
	beq	.L18
.L5:
	mov	r0, r4
	bl	sdio_uart_release_func
.L4:
	ldr	r0, [r4, #4]
	bl	free_page
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L18:
	ldr	r1, .L22+12
	ldr	r0, [r4, #8]
	bl	sdio_claim_irq
	subs	r5, r0, #0
	bne	.L19
	ldr	r7, .L22+16
	ldr	r8, .L22+20
	ldr	r1, [r7]
	ldr	r2, [r8]
	mov	r0, r4
	bl	sdio_out
	ldr	r1, .L22+24
	ldr	r2, .L22+28
	ldr	r1, [r1]
	ldr	r3, [r8]
	ldr	r2, [r2]
	orr	r3, r3, r1
	orr	r2, r3, r2
	ldr	r1, [r7]
	mov	r0, r4
	bl	sdio_out
	mov	r2, r5
	ldr	r1, [r7]
	mov	r0, r4
	bl	sdio_out
	ldr	r3, .L22+32
	mov	r0, r4
	ldr	r1, [r3]
	bl	sdio_in
	ldr	r3, .L22+36
	mov	r0, r4
	ldr	r1, [r3]
	bl	sdio_in
	ldr	r3, .L22+40
	mov	r0, r4
	ldr	r1, [r3]
	bl	sdio_in
	ldr	r3, .L22+44
	mov	r0, r4
	ldr	r1, [r3]
	bl	sdio_in
	ldr	r3, .L22+48
	ldr	r2, .L22+52
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r0, r4
	bl	sdio_out
	ldr	r1, .L22+56
	ldr	r3, .L22+60
	ldr	r2, .L22+64
	ldr	ip, [r1]
	ldr	r3, [r3]
	ldr	r0, .L22+68
	ldr	r1, [r2]
	ldr	r2, .L22+72
	ldr	r0, [r0]
	orr	r3, r3, ip
	orr	r3, r3, r1
	ldr	r1, [r2]
	ldr	r2, [r4, #12]
	orr	r3, r3, r0
	str	r3, [r4]
	str	r1, [r4, #16]
	mov	r0, r4
	ldr	r1, [r2, #8]
	mov	r2, r5
	bl	sdio_uart_change_speed
	ldr	r1, [r4, #12]
	ldr	r2, .L22+76
	ldr	r3, [r1, #8]
	ldr	r2, [r2]
	ldr	r3, [r3]
	tst	r3, r2
	bne	.L20
.L7:
	ldr	r2, .L22+80
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L21
.L8:
	add	r1, r1, #4
	ldr	r0, [r6]
	bl	clear_bit
	ldr	r0, [r4, #8]
	bl	sdio_uart_irq
	mov	r0, r4
	bl	sdio_uart_release_func
	b	.L1
.L19:
	ldr	r0, [r4, #8]
	bl	sdio_disable_func
	b	.L5
.L21:
	mov	r0, r4
	bl	sdio_uart_get_mctrl
	ldr	r3, .L22+84
	ldr	r3, [r3]
	tst	r0, r3
	moveq	r3, #1
	ldreq	r1, [r4, #12]
	ldrne	r1, [r4, #12]
	streq	r3, [r1]
	b	.L8
.L20:
	ldr	r2, .L22+88
	ldr	r3, .L22+92
	ldr	r1, [r2]
	ldr	r3, [r3]
	mov	r0, r4
	orr	r1, r1, r3
	bl	sdio_uart_set_mctrl
	ldr	r1, [r4, #12]
	ldr	r3, [r1, #8]
	ldr	r3, [r3]
	b	.L7
.L23:
	.align	2
.L22:
	.word	TTY_IO_ERROR
	.word	GFP_KERNEL
	.word	ENOMEM
	.word	sdio_uart_irq
	.word	UART_FCR
	.word	UART_FCR_ENABLE_FIFO
	.word	UART_FCR_CLEAR_RCVR
	.word	UART_FCR_CLEAR_XMIT
	.word	UART_LSR
	.word	UART_RX
	.word	UART_IIR
	.word	UART_MSR
	.word	UART_LCR
	.word	UART_LCR_WLEN8
	.word	UART_IER_RDI
	.word	UART_IER_RLSI
	.word	UART_IER_RTOIE
	.word	UART_IER_UUE
	.word	TIOCM_OUT2
	.word	CBAUD
	.word	CRTSCTS
	.word	TIOCM_CTS
	.word	TIOCM_RTS
	.word	TIOCM_DTR
	.size	sdio_uart_startup, .-sdio_uart_startup
	.comm	UART_RX,4,4
	.comm	UART_MSR,4,4
	.comm	UART_LSR,4,4
	.comm	UART_LCR_WLEN8,4,4
	.comm	UART_LCR,4,4
	.comm	UART_IIR,4,4
	.comm	UART_IER_UUE,4,4
	.comm	UART_IER_RTOIE,4,4
	.comm	UART_IER_RLSI,4,4
	.comm	UART_IER_RDI,4,4
	.comm	UART_FCR_ENABLE_FIFO,4,4
	.comm	UART_FCR_CLEAR_XMIT,4,4
	.comm	UART_FCR_CLEAR_RCVR,4,4
	.comm	UART_FCR,4,4
	.comm	TTY_IO_ERROR,4,4
	.comm	TIOCM_RTS,4,4
	.comm	TIOCM_OUT2,4,4
	.comm	TIOCM_DTR,4,4
	.comm	TIOCM_CTS,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	CRTSCTS,4,4
	.comm	CBAUD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
