	.file	"extr_altera_jtaguart.c_altera_jtaguart_probe.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	altera_jtaguart_probe, @function
altera_jtaguart_probe:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	lea	r14, 4[rdi]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	mov	rdi, r14
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	dev_get_platdata@PLT
	mov	ebx, DWORD PTR 0[rbp]
	mov	r13, rax
	mov	eax, 0
	cmp	ebx, -1
	cmove	ebx, eax
	cmp	DWORD PTR ALTERA_JTAGUART_MAXPORTS[rip], ebx
	jg	.L3
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	movsx	rdx, ebx
	mov	esi, DWORD PTR IORESOURCE_MEM[rip]
	mov	rdi, rbp
	lea	rax, 0[0+rdx*8]
	sub	rax, rdx
	mov	rdx, QWORD PTR altera_jtaguart_ports[rip]
	lea	r12, [rdx+rax*8]
	xor	edx, edx
	call	platform_get_resource@PLT
	test	rax, rax
	je	.L5
	mov	eax, DWORD PTR [rax]
	mov	esi, DWORD PTR IORESOURCE_IRQ[rip]
	xor	edx, edx
	mov	rdi, rbp
	mov	DWORD PTR 44[r12], eax
	call	platform_get_resource@PLT
	test	rax, rax
	je	.L16
.L6:
	mov	eax, DWORD PTR [rax]
.L9:
	mov	edi, DWORD PTR 44[r12]
	mov	esi, DWORD PTR ALTERA_JTAGUART_SIZE[rip]
	mov	DWORD PTR 48[r12], eax
	call	ioremap@PLT
	mov	DWORD PTR 40[r12], eax
	test	eax, eax
	jne	.L11
	mov	eax, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	eax, DWORD PTR PORT_ALTERA_JTAGUART[rip]
	mov	DWORD PTR [r12], ebx
	mov	rsi, r12
	lea	rdi, altera_jtaguart_driver[rip]
	mov	QWORD PTR 8[r12], r14
	mov	DWORD PTR 36[r12], eax
	mov	eax, DWORD PTR SERIAL_IO_MEM[rip]
	mov	DWORD PTR 32[r12], eax
	lea	rax, altera_jtaguart_ops[rip]
	mov	QWORD PTR 24[r12], rax
	mov	eax, DWORD PTR UPF_BOOT_AUTOCONF[rip]
	mov	DWORD PTR 16[r12], eax
	call	uart_add_one_port@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	test	r13, r13
	je	.L14
.L10:
	mov	eax, DWORD PTR 0[r13]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	test	r13, r13
	je	.L14
	mov	eax, DWORD PTR 4[r13]
	mov	esi, DWORD PTR IORESOURCE_IRQ[rip]
	xor	edx, edx
	mov	rdi, rbp
	mov	DWORD PTR 44[r12], eax
	call	platform_get_resource@PLT
	test	rax, rax
	jne	.L6
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L14:
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	altera_jtaguart_probe, .-altera_jtaguart_probe
	.comm	altera_jtaguart_ports,8,8
	.comm	altera_jtaguart_ops,4,4
	.comm	altera_jtaguart_driver,4,4
	.comm	UPF_BOOT_AUTOCONF,4,4
	.comm	SERIAL_IO_MEM,4,4
	.comm	PORT_ALTERA_JTAGUART,4,4
	.comm	IORESOURCE_MEM,4,4
	.comm	IORESOURCE_IRQ,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.comm	ALTERA_JTAGUART_SIZE,4,4
	.comm	ALTERA_JTAGUART_MAXPORTS,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_altera_jtaguart.c_altera_jtaguart_probe.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	altera_jtaguart_probe, %function
altera_jtaguart_probe:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	add	r8, r0, #4
	mov	r0, r8
	bl	dev_get_platdata
	ldr	r4, [r5]
	ldr	r3, .L17
	cmn	r4, #1
	moveq	r4, #0
	ldr	r3, [r3]
	cmp	r3, r4
	bgt	.L3
	ldr	r3, .L17+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L3:
	ldr	r3, .L17+8
	ldr	r2, .L17+12
	ldr	r9, [r3]
	ldr	r1, [r2]
	add	r3, r4, r4, lsl #3
	mov	r2, #0
	mov	r7, r0
	mov	r0, r5
	add	r6, r9, r3, lsl #2
	lsl	r10, r3, #2
	bl	platform_get_resource
	subs	r2, r0, #0
	beq	.L5
	ldr	r2, [r2]
	ldr	r3, .L17+16
	str	r2, [r6, #28]
	mov	r0, r5
	mov	r2, #0
	ldr	r1, [r3]
	bl	platform_get_resource
	cmp	r0, #0
	beq	.L16
.L6:
	ldr	r2, [r0]
.L9:
	ldr	r3, .L17+20
	ldr	r0, [r6, #28]
	ldr	r1, [r3]
	str	r2, [r6, #32]
	bl	ioremap
	cmp	r0, #0
	str	r0, [r6, #24]
	bne	.L11
	ldr	r3, .L17+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	ldr	r2, .L17+28
	ldr	r3, .L17+32
	ldr	r0, [r2]
	ldr	r2, .L17+36
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, .L17+40
	str	r4, [r9, r10]
	str	r0, [r6, #20]
	str	r1, [r6, #16]
	str	r8, [r6, #4]
	mov	r1, r6
	str	r2, [r6, #8]
	str	r3, [r6, #12]
	ldr	r0, .L17+44
	bl	uart_add_one_port
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	cmp	r7, #0
	beq	.L14
	ldr	r1, [r7, #4]
	ldr	r3, .L17+16
	str	r1, [r6, #28]
	mov	r0, r5
	ldr	r1, [r3]
	bl	platform_get_resource
	cmp	r0, #0
	bne	.L6
.L10:
	ldr	r2, [r7]
	b	.L9
.L16:
	cmp	r7, #0
	bne	.L10
.L14:
	ldr	r3, .L17+48
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	.align	2
.L17:
	.word	ALTERA_JTAGUART_MAXPORTS
	.word	EINVAL
	.word	altera_jtaguart_ports
	.word	IORESOURCE_MEM
	.word	IORESOURCE_IRQ
	.word	ALTERA_JTAGUART_SIZE
	.word	ENOMEM
	.word	PORT_ALTERA_JTAGUART
	.word	SERIAL_IO_MEM
	.word	UPF_BOOT_AUTOCONF
	.word	altera_jtaguart_ops
	.word	altera_jtaguart_driver
	.word	ENODEV
	.size	altera_jtaguart_probe, .-altera_jtaguart_probe
	.comm	altera_jtaguart_ports,4,4
	.comm	altera_jtaguart_ops,4,4
	.comm	altera_jtaguart_driver,4,4
	.comm	UPF_BOOT_AUTOCONF,4,4
	.comm	SERIAL_IO_MEM,4,4
	.comm	PORT_ALTERA_JTAGUART,4,4
	.comm	IORESOURCE_MEM,4,4
	.comm	IORESOURCE_IRQ,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.comm	ALTERA_JTAGUART_SIZE,4,4
	.comm	ALTERA_JTAGUART_MAXPORTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
