	.file	"extr_stallion.c_stl_sc26198panelinit.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"stl_sc26198panelinit(brdp=%p,panelp=%p)\n"
	.align 8
.LC1:
	.string	"STALLION: sc26198 not responding, brd=%d panel=%d chip=%d\n"
	.text
	.p2align 4
	.type	stl_sc26198panelinit, @function
stl_sc26198panelinit:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	rdx, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	mov	rsi, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	lea	rdi, .LC0[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	pr_debug@PLT
	mov	edi, DWORD PTR 12[rbp]
	mov	esi, DWORD PTR 0[rbp]
	call	BRDENABLE@PLT
	mov	eax, DWORD PTR 4[rbp]
	add	eax, 4
	cdq
	idiv	DWORD PTR SC26198_PORTS[rip]
	mov	r13d, eax
	mov	rax, QWORD PTR BRD_ECHPCI[rip]
	cmp	QWORD PTR [rbx], rax
	je	.L11
	test	r13d, r13d
	jle	.L7
.L12:
	xor	r15d, r15d
	xor	r12d, r12d
	mov	r14d, 1
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rsi, QWORD PTR XP_ADDR[rip]
	mov	ecx, r15d
	mov	edi, DWORD PTR GCCR[rip]
	mov	eax, r14d
	sal	eax, cl
	add	r15d, 1
	add	rsi, rbx
	or	r12d, eax
	call	outb@PLT
	mov	rsi, QWORD PTR XP_DATA[rip]
	mov	edi, DWORD PTR GCCR_IVRTYPCHANACK[rip]
	add	rsi, rbx
	call	outb@PLT
	mov	rsi, QWORD PTR XP_ADDR[rip]
	mov	edi, DWORD PTR WDTRCR[rip]
	add	rsi, rbx
	call	outb@PLT
	add	rbx, QWORD PTR XP_DATA[rip]
	mov	edi, 255
	mov	rsi, rbx
	call	outb@PLT
	cmp	r13d, r15d
	je	.L3
.L6:
	mov	eax, DWORD PTR 8[rbp]
	mov	rsi, QWORD PTR XP_ADDR[rip]
	mov	edi, DWORD PTR SCCR[rip]
	lea	ebx, [rax+r15*4]
	movsx	rbx, ebx
	add	rsi, rbx
	call	outb@PLT
	mov	rsi, QWORD PTR XP_DATA[rip]
	mov	edi, DWORD PTR CR_RESETALL[rip]
	add	rsi, rbx
	call	outb@PLT
	mov	rsi, QWORD PTR XP_ADDR[rip]
	mov	edi, DWORD PTR TSTR[rip]
	add	rsi, rbx
	call	outb@PLT
	mov	rdi, QWORD PTR XP_DATA[rip]
	add	rdi, rbx
	call	inb@PLT
	test	rax, rax
	je	.L4
	mov	edx, DWORD PTR 16[rbp]
	mov	esi, DWORD PTR 12[rbp]
	mov	ecx, r15d
	lea	rdi, .LC1[rip]
	add	r15d, 1
	call	printk@PLT
	cmp	r13d, r15d
	jne	.L6
.L3:
	mov	edi, DWORD PTR 12[rbp]
	call	BRDDISABLE@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rsi, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR 0[rbp]
	call	outb@PLT
	test	r13d, r13d
	jg	.L12
.L7:
	xor	r12d, r12d
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	stl_sc26198panelinit, .-stl_sc26198panelinit
	.comm	XP_DATA,8,8
	.comm	XP_ADDR,8,8
	.comm	WDTRCR,4,4
	.comm	TSTR,4,4
	.comm	SCCR,4,4
	.comm	SC26198_PORTS,4,4
	.comm	GCCR_IVRTYPCHANACK,4,4
	.comm	GCCR,4,4
	.comm	CR_RESETALL,4,4
	.comm	BRD_ECHPCI,8,8
	.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_stallion.c_stl_sc26198panelinit.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"stl_sc26198panelinit(brdp=%p,panelp=%p)\012\000"
	.global	__aeabi_idiv
	.align	2
.LC1:
	.ascii	"STALLION: sc26198 not responding, brd=%d panel=%d c"
	.ascii	"hip=%d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stl_sc26198panelinit, %function
stl_sc26198panelinit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r1
	mov	r4, r0
	mov	r2, r7
	mov	r1, r0
	ldr	r0, .L13
	bl	pr_debug
	ldr	r1, [r7]
	ldr	r0, [r7, #12]
	bl	BRDENABLE
	ldr	r3, .L13+4
	ldr	r0, [r7, #4]
	ldr	r1, [r3]
	add	r0, r0, #4
	bl	__aeabi_idiv
	ldr	r3, .L13+8
	ldr	r2, [r4]
	ldr	r3, [r3]
	mov	r9, r0
	cmp	r2, r3
	beq	.L11
	cmp	r9, #0
	ble	.L7
.L12:
	mov	r10, #0
	ldr	r6, .L13+12
	mov	r8, r10
	ldr	fp, .L13+16
	ldr	r5, .L13+20
	b	.L6
.L4:
	ldr	r3, .L13+24
	ldr	r1, [r6]
	ldr	r0, [r3]
	add	r1, r4, r1
	bl	outb
	ldr	r3, .L13+28
	ldr	r1, [r5]
	ldr	r0, [r3]
	add	r1, r4, r1
	bl	outb
	ldr	r3, .L13+32
	ldr	r1, [r6]
	ldr	r0, [r3]
	add	r1, r4, r1
	bl	outb
	mov	r3, #1
	ldr	r1, [r5]
	orr	r8, r8, r3, lsl r10
	mov	r0, #255
	add	r1, r4, r1
	add	r10, r10, #1
	bl	outb
	cmp	r9, r10
	beq	.L3
.L6:
	ldr	r4, [r7, #8]
	ldr	r1, [r6]
	add	r4, r4, r10, lsl #2
	add	r1, r4, r1
	ldr	r0, [fp]
	bl	outb
	ldr	r3, .L13+36
	ldr	r1, [r5]
	ldr	r0, [r3]
	add	r1, r4, r1
	bl	outb
	ldr	r3, .L13+40
	ldr	r1, [r6]
	ldr	r0, [r3]
	add	r1, r4, r1
	bl	outb
	ldr	r0, [r5]
	add	r0, r4, r0
	bl	inb
	cmp	r0, #0
	beq	.L4
	mov	r3, r10
	ldr	r2, [r7, #16]
	ldr	r1, [r7, #12]
	ldr	r0, .L13+44
	add	r10, r10, #1
	bl	printk
	cmp	r9, r10
	bne	.L6
.L3:
	ldr	r0, [r7, #12]
	bl	BRDDISABLE
	mov	r0, r8
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	ldr	r1, [r4, #4]
	ldr	r0, [r7]
	bl	outb
	cmp	r9, #0
	bgt	.L12
.L7:
	mov	r8, #0
	b	.L3
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	SC26198_PORTS
	.word	BRD_ECHPCI
	.word	XP_ADDR
	.word	SCCR
	.word	XP_DATA
	.word	GCCR
	.word	GCCR_IVRTYPCHANACK
	.word	WDTRCR
	.word	CR_RESETALL
	.word	TSTR
	.word	.LC1
	.size	stl_sc26198panelinit, .-stl_sc26198panelinit
	.comm	XP_DATA,4,4
	.comm	XP_ADDR,4,4
	.comm	WDTRCR,4,4
	.comm	TSTR,4,4
	.comm	SCCR,4,4
	.comm	SC26198_PORTS,4,4
	.comm	GCCR_IVRTYPCHANACK,4,4
	.comm	GCCR,4,4
	.comm	CR_RESETALL,4,4
	.comm	BRD_ECHPCI,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
