	.file	"extr_serial_ks8695.c_ks8695uart_startup.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"UART TX"
.LC1:
	.string	"UART RX"
.LC2:
	.string	"UART LineStatus"
.LC3:
	.string	"UART ModemStatus"
	.text
	.p2align 4
	.type	ks8695uart_startup, @function
ks8695uart_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	edi, DWORD PTR KS8695_IRQ_UART_TX[rip]
	mov	esi, DWORD PTR IRQF_VALID[rip]
	or	esi, DWORD PTR IRQF_NOAUTOEN[rip]
	call	set_irq_flags@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	tx_enable@PLT
	mov	esi, 1
	mov	rdi, rbp
	call	rx_enable@PLT
	mov	esi, 1
	mov	rdi, rbp
	call	ms_enable@PLT
	mov	edx, DWORD PTR IRQF_DISABLED[rip]
	mov	esi, DWORD PTR ks8695uart_tx_chars[rip]
	mov	r8, rbp
	mov	edi, DWORD PTR KS8695_IRQ_UART_TX[rip]
	lea	rcx, .LC0[rip]
	call	request_irq@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L10
.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
.L10:
	.cfi_restore_state
	mov	edx, DWORD PTR IRQF_DISABLED[rip]
	mov	esi, DWORD PTR ks8695uart_rx_chars[rip]
	mov	r8, rbp
	lea	rcx, .LC1[rip]
	mov	edi, DWORD PTR KS8695_IRQ_UART_RX[rip]
	call	request_irq@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L3
	mov	edx, DWORD PTR IRQF_DISABLED[rip]
	mov	esi, DWORD PTR ks8695uart_rx_chars[rip]
	mov	r8, rbp
	lea	rcx, .LC2[rip]
	mov	edi, DWORD PTR KS8695_IRQ_UART_LINE_STATUS[rip]
	call	request_irq@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L11
.L4:
	mov	edi, DWORD PTR KS8695_IRQ_UART_RX[rip]
	mov	rsi, rbp
	call	free_irq@PLT
.L3:
	mov	edi, DWORD PTR KS8695_IRQ_UART_TX[rip]
	mov	rsi, rbp
	call	free_irq@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
.L11:
	.cfi_restore_state
	mov	edx, DWORD PTR IRQF_DISABLED[rip]
	mov	esi, DWORD PTR ks8695uart_modem_status[rip]
	mov	r8, rbp
	lea	rcx, .LC3[rip]
	mov	edi, DWORD PTR KS8695_IRQ_UART_MODEM_STATUS[rip]
	call	request_irq@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	mov	edi, DWORD PTR KS8695_IRQ_UART_LINE_STATUS[rip]
	mov	rsi, rbp
	call	free_irq@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	ks8695uart_startup, .-ks8695uart_startup
	.comm	ks8695uart_tx_chars,4,4
	.comm	ks8695uart_rx_chars,4,4
	.comm	ks8695uart_modem_status,4,4
	.comm	KS8695_IRQ_UART_TX,4,4
	.comm	KS8695_IRQ_UART_RX,4,4
	.comm	KS8695_IRQ_UART_MODEM_STATUS,4,4
	.comm	KS8695_IRQ_UART_LINE_STATUS,4,4
	.comm	IRQF_VALID,4,4
	.comm	IRQF_NOAUTOEN,4,4
	.comm	IRQF_DISABLED,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_serial_ks8695.c_ks8695uart_startup.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"UART TX\000"
	.align	2
.LC1:
	.ascii	"UART RX\000"
	.align	2
.LC2:
	.ascii	"UART LineStatus\000"
	.align	2
.LC3:
	.ascii	"UART ModemStatus\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ks8695uart_startup, %function
ks8695uart_startup:
	@ 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
	ldr	r2, .L12
	ldr	r3, .L12+4
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r6, .L12+8
	sub	sp, sp, #8
	orr	r1, r1, r3
	ldr	r0, [r6]
	bl	set_irq_flags
	mov	r1, #0
	mov	r0, r4
	bl	tx_enable
	mov	r1, #1
	mov	r0, r4
	bl	rx_enable
	mov	r1, #1
	mov	r0, r4
	bl	ms_enable
	ldr	r7, .L12+12
	ldr	r3, .L12+16
	str	r4, [sp]
	ldr	r1, [r3]
	ldr	r0, [r6]
	ldr	r2, [r7]
	ldr	r3, .L12+20
	bl	request_irq
	subs	r5, r0, #0
	beq	.L10
.L1:
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	ldr	r10, .L12+24
	ldr	r8, .L12+28
	ldr	r1, [r10]
	ldr	r0, [r8]
	ldr	r3, .L12+32
	ldr	r2, [r7]
	str	r4, [sp]
	bl	request_irq
	subs	r5, r0, #0
	bne	.L3
	ldr	r9, .L12+36
	ldr	r1, [r10]
	ldr	r0, [r9]
	ldr	r3, .L12+40
	ldr	r2, [r7]
	str	r4, [sp]
	bl	request_irq
	subs	r5, r0, #0
	beq	.L11
.L4:
	mov	r1, r4
	ldr	r0, [r8]
	bl	free_irq
.L3:
	mov	r1, r4
	ldr	r0, [r6]
	bl	free_irq
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	ldr	r3, .L12+44
	ldr	r1, .L12+48
	str	r4, [sp]
	ldr	r0, [r3]
	ldr	r2, [r7]
	ldr	r1, [r1]
	ldr	r3, .L12+52
	bl	request_irq
	subs	r5, r0, #0
	beq	.L1
	mov	r1, r4
	ldr	r0, [r9]
	bl	free_irq
	b	.L4
.L13:
	.align	2
.L12:
	.word	IRQF_VALID
	.word	IRQF_NOAUTOEN
	.word	KS8695_IRQ_UART_TX
	.word	IRQF_DISABLED
	.word	ks8695uart_tx_chars
	.word	.LC0
	.word	ks8695uart_rx_chars
	.word	KS8695_IRQ_UART_RX
	.word	.LC1
	.word	KS8695_IRQ_UART_LINE_STATUS
	.word	.LC2
	.word	KS8695_IRQ_UART_MODEM_STATUS
	.word	ks8695uart_modem_status
	.word	.LC3
	.size	ks8695uart_startup, .-ks8695uart_startup
	.comm	ks8695uart_tx_chars,4,4
	.comm	ks8695uart_rx_chars,4,4
	.comm	ks8695uart_modem_status,4,4
	.comm	KS8695_IRQ_UART_TX,4,4
	.comm	KS8695_IRQ_UART_RX,4,4
	.comm	KS8695_IRQ_UART_MODEM_STATUS,4,4
	.comm	KS8695_IRQ_UART_LINE_STATUS,4,4
	.comm	IRQF_VALID,4,4
	.comm	IRQF_NOAUTOEN,4,4
	.comm	IRQF_DISABLED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
