	.file	"extr_nsp_cs.c_nsphw_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"in base=0x%x"
.LC1:
	.string	"terminator power on"
	.text
	.p2align 4
	.type	nsphw_init, @function
nsphw_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	lea	rsi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	ebp, DWORD PTR [rdi]
	mov	edi, DWORD PTR NSP_DEBUG_INIT[rip]
	mov	edx, ebp
	call	nsp_dbg@PLT
	mov	eax, DWORD PTR CLOCK_40M[rip]
	mov	rdi, r12
	or	eax, DWORD PTR FAST_20[rip]
	mov	DWORD PTR 4[r12], eax
	mov	eax, DWORD PTR MODE_IO8[rip]
	mov	QWORD PTR 24[r12], 0
	mov	QWORD PTR 16[r12], 0
	mov	DWORD PTR 8[r12], eax
	call	nsphw_init_sync@PLT
	mov	edx, DWORD PTR IRQCONTROL_ALLMASK[rip]
	mov	esi, DWORD PTR IRQCONTROL[rip]
	mov	edi, ebp
	call	nsp_write@PLT
	mov	edx, DWORD PTR IF_IFSEL[rip]
	mov	esi, DWORD PTR IFSELECT[rip]
	mov	edi, ebp
	call	nsp_write@PLT
	mov	esi, DWORD PTR SCSIIRQMODE[rip]
	xor	edx, edx
	mov	edi, ebp
	call	nsp_index_write@PLT
	mov	edx, DWORD PTR MODE_IO8[rip]
	mov	esi, DWORD PTR TRANSFERMODE[rip]
	mov	edi, ebp
	call	nsp_index_write@PLT
	mov	edx, DWORD PTR 4[r12]
	mov	esi, DWORD PTR CLOCKDIV[rip]
	mov	edi, ebp
	call	nsp_index_write@PLT
	mov	esi, DWORD PTR PARITYCTRL[rip]
	xor	edx, edx
	mov	edi, ebp
	call	nsp_index_write@PLT
	mov	esi, DWORD PTR POINTERCLR[rip]
	mov	edx, DWORD PTR POINTER_CLEAR[rip]
	mov	edi, ebp
	or	edx, DWORD PTR ACK_COUNTER_CLEAR[rip]
	or	edx, DWORD PTR REQ_COUNTER_CLEAR[rip]
	or	edx, DWORD PTR HOST_COUNTER_CLEAR[rip]
	call	nsp_index_write@PLT
	mov	edx, DWORD PTR IF_REGSEL[rip]
	mov	esi, DWORD PTR IFSELECT[rip]
	mov	edi, ebp
	call	nsp_write@PLT
	mov	esi, DWORD PTR TERMPWRCTRL[rip]
	xor	edx, edx
	mov	edi, ebp
	call	nsp_index_write@PLT
	mov	esi, DWORD PTR OTHERCONTROL[rip]
	mov	edi, ebp
	call	nsp_index_read@PLT
	test	DWORD PTR TPWR_SENSE[rip], eax
	je	.L5
.L2:
	mov	esi, DWORD PTR TIMERCOUNT[rip]
	mov	edi, ebp
	xor	edx, edx
	call	nsp_index_write@PLT
	mov	esi, DWORD PTR TIMERCOUNT[rip]
	mov	edi, ebp
	xor	edx, edx
	call	nsp_index_write@PLT
	mov	esi, DWORD PTR SYNCREG[rip]
	mov	edi, ebp
	xor	edx, edx
	call	nsp_index_write@PLT
	mov	esi, DWORD PTR ACKWIDTH[rip]
	mov	edi, ebp
	xor	edx, edx
	call	nsp_index_write@PLT
	mov	esi, DWORD PTR SCSIIRQMODE[rip]
	mov	edi, ebp
	mov	edx, DWORD PTR SCSI_PHASE_CHANGE_EI[rip]
	or	edx, DWORD PTR RESELECT_EI[rip]
	or	edx, DWORD PTR SCSI_RESET_IRQ_EI[rip]
	call	nsp_index_write@PLT
	mov	edx, DWORD PTR IRQCONTROL_ALLCLEAR[rip]
	mov	esi, DWORD PTR IRQCONTROL[rip]
	mov	edi, ebp
	call	nsp_write@PLT
	mov	esi, DWORD PTR FALSE[rip]
	mov	rdi, r12
	call	nsp_setup_fifo@PLT
	mov	eax, DWORD PTR TRUE[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edi, DWORD PTR KERN_INFO[rip]
	lea	rsi, .LC1[rip]
	call	nsp_msg@PLT
	mov	edx, DWORD PTR POWER_ON[rip]
	mov	esi, DWORD PTR TERMPWRCTRL[rip]
	mov	edi, ebp
	call	nsp_index_write@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	nsphw_init, .-nsphw_init
	.comm	TRUE,4,4
	.comm	TRANSFERMODE,4,4
	.comm	TPWR_SENSE,4,4
	.comm	TIMERCOUNT,4,4
	.comm	TERMPWRCTRL,4,4
	.comm	SYNCREG,4,4
	.comm	SCSI_RESET_IRQ_EI,4,4
	.comm	SCSI_PHASE_CHANGE_EI,4,4
	.comm	SCSIIRQMODE,4,4
	.comm	RESELECT_EI,4,4
	.comm	REQ_COUNTER_CLEAR,4,4
	.comm	POWER_ON,4,4
	.comm	POINTER_CLEAR,4,4
	.comm	POINTERCLR,4,4
	.comm	PARITYCTRL,4,4
	.comm	OTHERCONTROL,4,4
	.comm	NSP_DEBUG_INIT,4,4
	.comm	MODE_IO8,4,4
	.comm	KERN_INFO,4,4
	.comm	IRQCONTROL_ALLMASK,4,4
	.comm	IRQCONTROL_ALLCLEAR,4,4
	.comm	IRQCONTROL,4,4
	.comm	IF_REGSEL,4,4
	.comm	IF_IFSEL,4,4
	.comm	IFSELECT,4,4
	.comm	HOST_COUNTER_CLEAR,4,4
	.comm	FAST_20,4,4
	.comm	FALSE,4,4
	.comm	CLOCK_40M,4,4
	.comm	CLOCKDIV,4,4
	.comm	ACK_COUNTER_CLEAR,4,4
	.comm	ACKWIDTH,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_nsp_cs.c_nsphw_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"in base=0x%x\000"
	.align	2
.LC1:
	.ascii	"terminator power on\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nsphw_init, %function
nsphw_init:
	@ 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
	mov	r6, #0
	ldr	r4, [r0]
	ldr	r3, .L6
	mov	r2, r4
	ldr	r0, [r3]
	ldr	r1, .L6+4
	bl	nsp_dbg
	ldr	r2, .L6+8
	ldr	r3, .L6+12
	ldr	r10, .L6+16
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r10]
	orr	r3, r3, r1
	str	r3, [r5, #4]
	str	r2, [r5, #8]
	mov	r0, r5
	str	r6, [r5, #16]
	str	r6, [r5, #12]
	bl	nsphw_init_sync
	ldr	r7, .L6+20
	ldr	r3, .L6+24
	ldr	r1, [r7]
	ldr	r2, [r3]
	mov	r0, r4
	bl	nsp_write
	ldr	r9, .L6+28
	ldr	r3, .L6+32
	ldr	r8, .L6+36
	ldr	r2, [r3]
	ldr	r1, [r9]
	mov	r0, r4
	bl	nsp_write
	mov	r2, r6
	ldr	r1, [r8]
	mov	r0, r4
	bl	nsp_index_write
	ldr	r3, .L6+40
	ldr	r2, [r10]
	ldr	r1, [r3]
	mov	r0, r4
	bl	nsp_index_write
	ldr	r3, .L6+44
	ldr	r2, [r5, #4]
	ldr	r1, [r3]
	mov	r0, r4
	bl	nsp_index_write
	ldr	r3, .L6+48
	mov	r2, r6
	ldr	r1, [r3]
	mov	r0, r4
	bl	nsp_index_write
	ldr	r3, .L6+52
	ldr	r2, .L6+56
	ldr	r0, .L6+60
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r1, .L6+64
	ldr	r0, [r0]
	orr	r3, r3, r2
	ldr	r2, [r1]
	ldr	r1, .L6+68
	orr	r3, r3, r0
	orr	r2, r3, r2
	ldr	r1, [r1]
	mov	r0, r4
	bl	nsp_index_write
	ldr	r3, .L6+72
	ldr	r10, .L6+76
	ldr	r2, [r3]
	ldr	r1, [r9]
	mov	r0, r4
	bl	nsp_write
	mov	r2, r6
	ldr	r1, [r10]
	mov	r0, r4
	bl	nsp_index_write
	ldr	r3, .L6+80
	mov	r0, r4
	ldr	r1, [r3]
	bl	nsp_index_read
	ldr	r3, .L6+84
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L5
.L2:
	ldr	r6, .L6+88
	mov	r2, #0
	ldr	r1, [r6]
	mov	r0, r4
	bl	nsp_index_write
	ldr	r1, [r6]
	mov	r2, #0
	mov	r0, r4
	bl	nsp_index_write
	ldr	r3, .L6+92
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r4
	bl	nsp_index_write
	ldr	r3, .L6+96
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r4
	bl	nsp_index_write
	ldr	r3, .L6+100
	ldr	r1, .L6+104
	ldr	r2, .L6+108
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r1
	orr	r2, r3, r2
	ldr	r1, [r8]
	mov	r0, r4
	bl	nsp_index_write
	ldr	r3, .L6+112
	ldr	r1, [r7]
	ldr	r2, [r3]
	mov	r0, r4
	bl	nsp_write
	ldr	r3, .L6+116
	mov	r0, r5
	ldr	r1, [r3]
	bl	nsp_setup_fifo
	ldr	r3, .L6+120
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	ldr	r3, .L6+124
	ldr	r1, .L6+128
	ldr	r0, [r3]
	bl	nsp_msg
	ldr	r3, .L6+132
	mov	r0, r4
	ldr	r1, [r10]
	ldr	r2, [r3]
	bl	nsp_index_write
	b	.L2
.L7:
	.align	2
.L6:
	.word	NSP_DEBUG_INIT
	.word	.LC0
	.word	FAST_20
	.word	CLOCK_40M
	.word	MODE_IO8
	.word	IRQCONTROL
	.word	IRQCONTROL_ALLMASK
	.word	IFSELECT
	.word	IF_IFSEL
	.word	SCSIIRQMODE
	.word	TRANSFERMODE
	.word	CLOCKDIV
	.word	PARITYCTRL
	.word	POINTER_CLEAR
	.word	ACK_COUNTER_CLEAR
	.word	REQ_COUNTER_CLEAR
	.word	HOST_COUNTER_CLEAR
	.word	POINTERCLR
	.word	IF_REGSEL
	.word	TERMPWRCTRL
	.word	OTHERCONTROL
	.word	TPWR_SENSE
	.word	TIMERCOUNT
	.word	SYNCREG
	.word	ACKWIDTH
	.word	SCSI_PHASE_CHANGE_EI
	.word	RESELECT_EI
	.word	SCSI_RESET_IRQ_EI
	.word	IRQCONTROL_ALLCLEAR
	.word	FALSE
	.word	TRUE
	.word	KERN_INFO
	.word	.LC1
	.word	POWER_ON
	.size	nsphw_init, .-nsphw_init
	.comm	TRUE,4,4
	.comm	TRANSFERMODE,4,4
	.comm	TPWR_SENSE,4,4
	.comm	TIMERCOUNT,4,4
	.comm	TERMPWRCTRL,4,4
	.comm	SYNCREG,4,4
	.comm	SCSI_RESET_IRQ_EI,4,4
	.comm	SCSI_PHASE_CHANGE_EI,4,4
	.comm	SCSIIRQMODE,4,4
	.comm	RESELECT_EI,4,4
	.comm	REQ_COUNTER_CLEAR,4,4
	.comm	POWER_ON,4,4
	.comm	POINTER_CLEAR,4,4
	.comm	POINTERCLR,4,4
	.comm	PARITYCTRL,4,4
	.comm	OTHERCONTROL,4,4
	.comm	NSP_DEBUG_INIT,4,4
	.comm	MODE_IO8,4,4
	.comm	KERN_INFO,4,4
	.comm	IRQCONTROL_ALLMASK,4,4
	.comm	IRQCONTROL_ALLCLEAR,4,4
	.comm	IRQCONTROL,4,4
	.comm	IF_REGSEL,4,4
	.comm	IF_IFSEL,4,4
	.comm	IFSELECT,4,4
	.comm	HOST_COUNTER_CLEAR,4,4
	.comm	FAST_20,4,4
	.comm	FALSE,4,4
	.comm	CLOCK_40M,4,4
	.comm	CLOCKDIV,4,4
	.comm	ACK_COUNTER_CLEAR,4,4
	.comm	ACKWIDTH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
