	.file	"extr_initio.c_wait_tulip.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	wait_tulip, @function
wait_tulip:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	xor	eax, eax
	call	cpu_relax@PLT
.L2:
	mov	rdi, QWORD PTR TUL_SStatus0[rip]
	add	rdi, QWORD PTR 16[rbp]
	call	inb@PLT
	mov	DWORD PTR 0[rbp], eax
	test	DWORD PTR TSS_INT_PENDING[rip], eax
	je	.L3
	mov	rdi, QWORD PTR TUL_SInt[rip]
	add	rdi, QWORD PTR 16[rbp]
	call	inb@PLT
	mov	rdi, QWORD PTR TUL_SStatus1[rip]
	add	rdi, QWORD PTR 16[rbp]
	mov	DWORD PTR 4[rbp], eax
	mov	eax, DWORD PTR 0[rbp]
	and	eax, DWORD PTR TSS_PH_MASK[rip]
	mov	DWORD PTR 8[rbp], eax
	call	inb@PLT
	mov	QWORD PTR 40[rbp], rax
	mov	eax, DWORD PTR 4[rbp]
	test	DWORD PTR TSS_RESEL_INT[rip], eax
	jne	.L17
	test	DWORD PTR TSS_SEL_TIMEOUT[rip], eax
	jne	.L10
	test	DWORD PTR TSS_SCSIRST_INT[rip], eax
	jne	.L18
	test	DWORD PTR TSS_DISC_INT[rip], eax
	je	.L7
	mov	eax, DWORD PTR 12[rbp]
	test	DWORD PTR HCF_EXPECT_DONE_DISC[rip], eax
	jne	.L19
	test	DWORD PTR HCF_EXPECT_DISC[rip], eax
	jne	.L20
.L10:
	mov	rdi, rbp
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	int_initio_busfree@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	eax, DWORD PTR 8[rbp]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rdi, rbp
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	int_initio_resel@PLT
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	rdi, rbp
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	int_initio_scsi_rst@PLT
.L20:
	.cfi_restore_state
	mov	edi, DWORD PTR TSC_FLUSH_FIFO[rip]
	mov	rsi, QWORD PTR TUL_SCtrl0[rip]
	add	rsi, QWORD PTR 16[rbp]
	call	outb@PLT
	mov	QWORD PTR 32[rbp], 0
	mov	eax, DWORD PTR HCF_EXPECT_DISC[rip]
	mov	QWORD PTR 24[rbp], 0
.L15:
	not	eax
	and	DWORD PTR 12[rbp], eax
	mov	edi, DWORD PTR TSC_INITDEFAULT[rip]
	mov	rsi, QWORD PTR TUL_SConfig[rip]
	add	rsi, QWORD PTR 16[rbp]
	call	outb@PLT
	mov	edi, DWORD PTR TSC_HW_RESELECT[rip]
	mov	rsi, QWORD PTR TUL_SCtrl1[rip]
	add	rsi, QWORD PTR 16[rbp]
	call	outb@PLT
	mov	eax, -1
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	mov	edi, DWORD PTR TSC_FLUSH_FIFO[rip]
	mov	rsi, QWORD PTR TUL_SCtrl0[rip]
	add	rsi, QWORD PTR 16[rbp]
	call	outb@PLT
	mov	rsi, QWORD PTR 32[rbp]
	mov	rdi, rbp
	call	initio_unlink_busy_scb@PLT
	mov	rsi, QWORD PTR 32[rbp]
	mov	rdi, rbp
	mov	QWORD PTR [rsi], 0
	call	initio_append_done_scb@PLT
	mov	QWORD PTR 32[rbp], 0
	mov	eax, DWORD PTR HCF_EXPECT_DONE_DISC[rip]
	mov	QWORD PTR 24[rbp], 0
	jmp	.L15
	.cfi_endproc
.LFE0:
	.size	wait_tulip, .-wait_tulip
	.comm	TUL_SStatus1,8,8
	.comm	TUL_SStatus0,8,8
	.comm	TUL_SInt,8,8
	.comm	TUL_SCtrl1,8,8
	.comm	TUL_SCtrl0,8,8
	.comm	TUL_SConfig,8,8
	.comm	TSS_SEL_TIMEOUT,4,4
	.comm	TSS_SCSIRST_INT,4,4
	.comm	TSS_RESEL_INT,4,4
	.comm	TSS_PH_MASK,4,4
	.comm	TSS_INT_PENDING,4,4
	.comm	TSS_FUNC_COMP,4,4
	.comm	TSS_DISC_INT,4,4
	.comm	TSS_BUS_SERV,4,4
	.comm	TSC_INITDEFAULT,4,4
	.comm	TSC_HW_RESELECT,4,4
	.comm	TSC_FLUSH_FIFO,4,4
	.comm	HCF_EXPECT_DONE_DISC,4,4
	.comm	HCF_EXPECT_DISC,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_initio.c_wait_tulip.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wait_tulip, %function
wait_tulip:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r6, .L21
	ldr	r5, .L21+4
	b	.L2
.L3:
	bl	cpu_relax
.L2:
	ldr	r3, [r6]
	ldr	r0, [r4, #16]
	add	r0, r0, r3
	bl	inb
	ldr	r3, [r5]
	str	r0, [r4]
	tst	r0, r3
	beq	.L3
	ldr	r3, .L21+8
	ldr	r0, [r4, #16]
	ldr	r3, [r3]
	add	r0, r0, r3
	bl	inb
	ldr	r3, .L21+12
	ldr	r2, .L21+16
	ldr	ip, [r3]
	ldr	r3, [r4]
	ldr	r2, [r2]
	ldr	r1, [r4, #16]
	and	r3, r3, ip
	stmib	r4, {r0, r3}
	add	r0, r1, r2
	bl	inb
	ldr	r2, .L21+20
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	str	r0, [r4, #28]
	tst	r3, r2
	bne	.L17
	ldr	r2, .L21+24
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L10
	ldr	r2, .L21+28
	ldr	r2, [r2]
	ands	r5, r3, r2
	bne	.L18
	ldr	r2, .L21+32
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L7
	ldr	r7, .L21+36
	ldr	r3, [r4, #12]
	ldr	r2, [r7]
	ands	r6, r3, r2
	bne	.L19
	ldr	r5, .L21+40
	ldr	r2, [r5]
	tst	r3, r2
	bne	.L20
.L10:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	int_initio_busfree
.L7:
	ldr	r0, [r4, #8]
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	int_initio_resel
.L18:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	int_initio_scsi_rst
.L20:
	ldr	r3, .L21+44
	ldr	r1, [r4, #16]
	ldr	r2, [r3]
	ldr	r3, .L21+48
	add	r1, r1, r2
	ldr	r0, [r3]
	bl	outb
	ldr	r2, [r5]
	ldr	r1, .L21+52
	ldr	r3, [r4, #12]
	ldr	r1, [r1]
	bic	r3, r3, r2
	ldr	r0, [r4, #16]
	ldr	r2, .L21+56
	str	r6, [r4, #24]
	str	r6, [r4, #20]
.L15:
	str	r3, [r4, #12]
	add	r1, r0, r1
	ldr	r0, [r2]
	bl	outb
	ldr	r3, .L21+60
	ldr	r1, [r4, #16]
	ldr	r2, [r3]
	ldr	r3, .L21+64
	add	r1, r1, r2
	ldr	r0, [r3]
	bl	outb
	mvn	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	ldr	r3, .L21+44
	ldr	r1, [r4, #16]
	ldr	r2, [r3]
	ldr	r3, .L21+48
	add	r1, r1, r2
	ldr	r0, [r3]
	bl	outb
	ldr	r1, [r4, #24]
	mov	r0, r4
	bl	initio_unlink_busy_scb
	ldr	r1, [r4, #24]
	mov	r0, r4
	str	r5, [r1]
	bl	initio_append_done_scb
	ldr	r2, [r7]
	ldr	r1, .L21+52
	ldr	r3, [r4, #12]
	ldr	r1, [r1]
	bic	r3, r3, r2
	ldr	r0, [r4, #16]
	ldr	r2, .L21+56
	str	r5, [r4, #24]
	str	r5, [r4, #20]
	b	.L15
.L22:
	.align	2
.L21:
	.word	TUL_SStatus0
	.word	TSS_INT_PENDING
	.word	TUL_SInt
	.word	TSS_PH_MASK
	.word	TUL_SStatus1
	.word	TSS_RESEL_INT
	.word	TSS_SEL_TIMEOUT
	.word	TSS_SCSIRST_INT
	.word	TSS_DISC_INT
	.word	HCF_EXPECT_DONE_DISC
	.word	HCF_EXPECT_DISC
	.word	TUL_SCtrl0
	.word	TSC_FLUSH_FIFO
	.word	TUL_SConfig
	.word	TSC_INITDEFAULT
	.word	TUL_SCtrl1
	.word	TSC_HW_RESELECT
	.size	wait_tulip, .-wait_tulip
	.comm	TUL_SStatus1,4,4
	.comm	TUL_SStatus0,4,4
	.comm	TUL_SInt,4,4
	.comm	TUL_SCtrl1,4,4
	.comm	TUL_SCtrl0,4,4
	.comm	TUL_SConfig,4,4
	.comm	TSS_SEL_TIMEOUT,4,4
	.comm	TSS_SCSIRST_INT,4,4
	.comm	TSS_RESEL_INT,4,4
	.comm	TSS_PH_MASK,4,4
	.comm	TSS_INT_PENDING,4,4
	.comm	TSS_FUNC_COMP,4,4
	.comm	TSS_DISC_INT,4,4
	.comm	TSS_BUS_SERV,4,4
	.comm	TSC_INITDEFAULT,4,4
	.comm	TSC_HW_RESELECT,4,4
	.comm	TSC_FLUSH_FIFO,4,4
	.comm	HCF_EXPECT_DONE_DISC,4,4
	.comm	HCF_EXPECT_DISC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
