	.file	"extr_aic79xx.c_ahd_fetch_devinfo.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ahd_fetch_devinfo, @function
ahd_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
	mov	r14, rsi
	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, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	ahd_save_modes@PLT
	mov	esi, DWORD PTR AHD_MODE_SCSI[rip]
	mov	rdi, rbp
	mov	r13d, eax
	mov	edx, esi
	call	ahd_set_modes@PLT
	mov	esi, DWORD PTR SSTAT0[rip]
	mov	rdi, rbp
	call	ahd_inb@PLT
	mov	rbx, QWORD PTR ROLE_TARGET[rip]
	test	DWORD PTR TARGET[rip], eax
	je	.L9
.L3:
	mov	esi, DWORD PTR SEQ_FLAGS[rip]
	mov	rdi, rbp
	call	ahd_inb@PLT
	test	DWORD PTR CMDPHASE_PENDING[rip], eax
	jne	.L10
	cmp	QWORD PTR ROLE_TARGET[rip], rbx
	jne	.L4
	mov	esi, DWORD PTR TOWNID[rip]
	mov	rdi, rbp
	call	ahd_inb@PLT
	mov	r15d, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rbx, QWORD PTR ROLE_INITIATOR[rip]
	cmp	QWORD PTR ROLE_TARGET[rip], rbx
	je	.L3
.L4:
	mov	esi, DWORD PTR IOWNID[rip]
	mov	rdi, rbp
	call	ahd_inb@PLT
	mov	r15d, eax
.L6:
	mov	esi, DWORD PTR SAVED_SCSIID[rip]
	mov	rdi, rbp
	call	ahd_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	ahd_inb@PLT
	mov	esi, r12d
	mov	rdi, rbp
	mov	DWORD PTR 8[rsp], eax
	call	SCSIID_TARGET@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	esi, r15d
	mov	rdi, r14
	mov	ecx, DWORD PTR 8[rsp]
	mov	r9, rbx
	mov	edx, eax
	call	ahd_compile_devinfo@PLT
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	esi, r13d
	mov	rdi, rbp
	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	ahd_restore_modes@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	esi, DWORD PTR TARGIDIN[rip]
	mov	rdi, rbp
	call	ahd_inb@PLT
	and	eax, DWORD PTR OID[rip]
	mov	r15d, eax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	ahd_fetch_devinfo, .-ahd_fetch_devinfo
	.comm	TOWNID,4,4
	.comm	TARGIDIN,4,4
	.comm	TARGET,4,4
	.comm	SSTAT0,4,4
	.comm	SEQ_FLAGS,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	IOWNID,4,4
	.comm	CMDPHASE_PENDING,4,4
	.comm	AHD_MODE_SCSI,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_aic79xx.c_ahd_fetch_devinfo.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ahd_fetch_devinfo, %function
ahd_fetch_devinfo:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	sub	sp, sp, #8
	mov	r4, r0
	mov	r7, r1
	bl	ahd_save_modes
	ldr	r3, .L10
	mov	r6, r0
	ldr	r2, [r3]
	mov	r0, r4
	mov	r1, r2
	bl	ahd_set_modes
	ldr	r3, .L10+4
	mov	r0, r4
	ldr	r1, [r3]
	bl	ahd_inb
	ldr	r3, .L10+8
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L2
	ldr	r5, .L10+12
	ldr	r10, [r5]
.L3:
	ldr	r3, .L10+16
	mov	r0, r4
	ldr	r1, [r3]
	bl	ahd_inb
	ldr	r3, .L10+20
	ldr	r3, [r3]
	tst	r0, r3
	bne	.L9
	ldr	r3, [r5]
	cmp	r3, r10
	bne	.L4
	ldr	r3, .L10+24
	mov	r0, r4
	ldr	r1, [r3]
	bl	ahd_inb
	mov	r9, r0
	b	.L6
.L2:
	ldr	r3, .L10+28
	ldr	r5, .L10+12
	ldr	r10, [r3]
	ldr	r3, [r5]
	cmp	r3, r10
	beq	.L3
.L4:
	ldr	r3, .L10+32
	mov	r0, r4
	ldr	r1, [r3]
	bl	ahd_inb
	mov	r9, r0
.L6:
	ldr	r3, .L10+36
	mov	r0, r4
	ldr	r1, [r3]
	bl	ahd_inb
	mov	r5, r0
	mov	r0, r4
	mov	r1, r5
	bl	SCSIID_TARGET
	ldr	r3, .L10+40
	mov	r8, r0
	ldr	r1, [r3]
	mov	r0, r4
	bl	ahd_inb
	mov	r3, r0
	mov	r1, r5
	mov	r0, r4
	mov	r5, r3
	bl	SCSIID_CHANNEL
	mov	r1, r9
	stm	sp, {r0, r10}
	mov	r3, r5
	mov	r2, r8
	mov	r0, r7
	bl	ahd_compile_devinfo
	mov	r1, r6
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	ahd_restore_modes
.L9:
	ldr	r3, .L10+44
	mov	r0, r4
	ldr	r1, [r3]
	bl	ahd_inb
	ldr	r3, .L10+48
	ldr	r3, [r3]
	and	r9, r0, r3
	b	.L6
.L11:
	.align	2
.L10:
	.word	AHD_MODE_SCSI
	.word	SSTAT0
	.word	TARGET
	.word	ROLE_TARGET
	.word	SEQ_FLAGS
	.word	CMDPHASE_PENDING
	.word	TOWNID
	.word	ROLE_INITIATOR
	.word	IOWNID
	.word	SAVED_SCSIID
	.word	SAVED_LUN
	.word	TARGIDIN
	.word	OID
	.size	ahd_fetch_devinfo, .-ahd_fetch_devinfo
	.comm	TOWNID,4,4
	.comm	TARGIDIN,4,4
	.comm	TARGET,4,4
	.comm	SSTAT0,4,4
	.comm	SEQ_FLAGS,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	IOWNID,4,4
	.comm	CMDPHASE_PENDING,4,4
	.comm	AHD_MODE_SCSI,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
