	.file	"extr_aic7xxx_core.c_ahc_fetch_devinfo.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ahc_fetch_devinfo, @function
ahc_fetch_devinfo:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	esi, DWORD PTR SSTAT0[rip]
	call	ahc_inb@PLT
	test	DWORD PTR TARGET[rip], eax
	je	.L2
	mov	rbx, QWORD PTR ROLE_TARGET[rip]
	mov	edx, DWORD PTR 0[rbp]
.L3:
	mov	eax, edx
	test	DWORD PTR AHC_MULTI_TID[rip], edx
	je	.L4
	mov	esi, DWORD PTR SEQ_FLAGS[rip]
	mov	rdi, rbp
	call	ahc_inb@PLT
	mov	r8d, eax
	mov	eax, DWORD PTR CMDPHASE_PENDING[rip]
	or	eax, DWORD PTR TARG_CMD_PENDING[rip]
	or	eax, DWORD PTR NO_DISCONNECT[rip]
	test	eax, r8d
	jne	.L5
	mov	eax, DWORD PTR 0[rbp]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edx, DWORD PTR 0[rbp]
	mov	rbx, QWORD PTR ROLE_INITIATOR[rip]
	cmp	QWORD PTR ROLE_TARGET[rip], rbx
	mov	eax, edx
	je	.L3
.L4:
	test	DWORD PTR AHC_ULTRA2[rip], eax
	jne	.L13
	mov	esi, DWORD PTR SCSIID[rip]
	mov	rdi, rbp
	call	ahc_inb@PLT
	and	eax, DWORD PTR OID[rip]
	mov	r14d, eax
.L6:
	mov	esi, DWORD PTR SAVED_SCSIID[rip]
	mov	rdi, rbp
	call	ahc_inb@PLT
	mov	rdi, rbp
	mov	esi, eax
	mov	r12d, eax
	call	SCSIID_CHANNEL@PLT
	mov	esi, DWORD PTR SAVED_LUN[rip]
	mov	rdi, rbp
	mov	DWORD PTR 12[rsp], eax
	call	ahc_inb@PLT
	mov	esi, r12d
	mov	rdi, rbp
	mov	r15d, eax
	call	SCSIID_TARGET@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	r9, rbx
	mov	ecx, r15d
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	esi, r14d
	mov	rdi, r13
	mov	edx, eax
	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
	jmp	ahc_compile_devinfo@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	esi, DWORD PTR SCSIID_ULTRA2[rip]
	mov	rdi, rbp
	call	ahc_inb@PLT
	and	eax, DWORD PTR OID[rip]
	mov	r14d, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	esi, DWORD PTR TARGIDIN[rip]
	mov	rdi, rbp
	call	ahc_inb@PLT
	and	eax, DWORD PTR OID[rip]
	mov	r14d, eax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	ahc_fetch_devinfo, .-ahc_fetch_devinfo
	.comm	TARG_CMD_PENDING,4,4
	.comm	TARGIDIN,4,4
	.comm	TARGET,4,4
	.comm	SSTAT0,4,4
	.comm	SEQ_FLAGS,4,4
	.comm	SCSIID_ULTRA2,4,4
	.comm	SCSIID,4,4
	.comm	SAVED_SCSIID,4,4
	.comm	SAVED_LUN,4,4
	.comm	ROLE_TARGET,8,8
	.comm	ROLE_INITIATOR,8,8
	.comm	OID,4,4
	.comm	NO_DISCONNECT,4,4
	.comm	CMDPHASE_PENDING,4,4
	.comm	AHC_ULTRA2,4,4
	.comm	AHC_MULTI_TID,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_aic7xxx_core.c_ahc_fetch_devinfo.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ahc_fetch_devinfo, %function
ahc_fetch_devinfo:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L14
	mov	r6, r1
	sub	sp, sp, #12
	ldr	r1, [r3]
	mov	r4, r0
	bl	ahc_inb
	ldr	r3, .L14+4
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L2
	ldr	r3, .L14+8
	ldr	r2, [r4]
	ldr	r9, [r3]
.L3:
	mov	r3, r2
	ldr	r2, .L14+12
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L4
	ldr	r3, .L14+16
	mov	r0, r4
	ldr	r1, [r3]
	bl	ahc_inb
	ldr	r3, .L14+20
	ldr	r1, .L14+24
	ldr	r2, .L14+28
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r2, [r2]
	orr	r3, r3, r1
	orr	r3, r3, r2
	tst	r3, r0
	bne	.L5
	ldr	r3, [r4]
	b	.L4
.L2:
	ldr	r2, .L14+32
	ldr	r3, .L14+8
	ldr	r9, [r2]
	ldr	r3, [r3]
	ldr	r2, [r4]
	cmp	r3, r9
	mov	r3, r2
	beq	.L3
.L4:
	ldr	r2, .L14+36
	ldr	r2, [r2]
	tst	r3, r2
	ldrne	r3, .L14+40
	ldreq	r3, .L14+44
.L12:
	ldr	r1, [r3]
	mov	r0, r4
	bl	ahc_inb
	ldr	r3, .L14+48
	ldr	r3, [r3]
	and	r8, r0, r3
	ldr	r3, .L14+52
	mov	r0, r4
	ldr	r1, [r3]
	bl	ahc_inb
	mov	r5, r0
	mov	r0, r4
	mov	r1, r5
	bl	SCSIID_TARGET
	ldr	r3, .L14+56
	mov	r7, r0
	ldr	r1, [r3]
	mov	r0, r4
	bl	ahc_inb
	mov	r3, r0
	mov	r1, r5
	mov	r0, r4
	mov	r4, r3
	bl	SCSIID_CHANNEL
	mov	r3, r4
	stm	sp, {r0, r9}
	mov	r2, r7
	mov	r1, r8
	mov	r0, r6
	bl	ahc_compile_devinfo
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L5:
	ldr	r3, .L14+60
	b	.L12
.L15:
	.align	2
.L14:
	.word	SSTAT0
	.word	TARGET
	.word	ROLE_TARGET
	.word	AHC_MULTI_TID
	.word	SEQ_FLAGS
	.word	CMDPHASE_PENDING
	.word	TARG_CMD_PENDING
	.word	NO_DISCONNECT
	.word	ROLE_INITIATOR
	.word	AHC_ULTRA2
	.word	SCSIID_ULTRA2
	.word	SCSIID
	.word	OID
	.word	SAVED_SCSIID
	.word	SAVED_LUN
	.word	TARGIDIN
	.size	ahc_fetch_devinfo, .-ahc_fetch_devinfo
	.comm	TARG_CMD_PENDING,4,4
	.comm	TARGIDIN,4,4
	.comm	TARGET,4,4
	.comm	SSTAT0,4,4
	.comm	SEQ_FLAGS,4,4
	.comm	SCSIID_ULTRA2,4,4
	.comm	SCSIID,4,4
	.comm	SAVED_SCSIID,4,4
	.comm	SAVED_LUN,4,4
	.comm	ROLE_TARGET,4,4
	.comm	ROLE_INITIATOR,4,4
	.comm	OID,4,4
	.comm	NO_DISCONNECT,4,4
	.comm	CMDPHASE_PENDING,4,4
	.comm	AHC_ULTRA2,4,4
	.comm	AHC_MULTI_TID,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
