	.file	"extr_mfi_cam.c_mfip_cam_rescan.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"mfip"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Couldn't find mfip child device!\n"
	.align 8
.LC2:
	.string	"Cannot allocate ccb for bus rescan.\n"
	.align 8
.LC3:
	.string	"Cannot create path for bus rescan.\n"
	.text
	.p2align 4
	.type	mfip_cam_rescan, @function
mfip_cam_rescan:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	lea	rdi, Giant[rip]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	mtx_lock@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	edx, -1
	lea	rsi, .LC0[rip]
	call	device_find_child@PLT
	lea	rdi, Giant[rip]
	mov	r12, rax
	call	mtx_unlock@PLT
	test	r12, r12
	je	.L10
	mov	rdi, rbp
	call	mtx_lock@PLT
	mov	rdi, r12
	call	device_get_softc@PLT
	mov	r12, rax
	mov	rax, QWORD PTR MFIP_STATE_DETACH[rip]
	cmp	QWORD PTR [r12], rax
	je	.L8
	mov	rax, QWORD PTR MFIP_STATE_RESCAN[rip]
	mov	QWORD PTR [r12], rax
	xor	eax, eax
	call	xpt_alloc_ccb_nowait@PLT
	mov	r13, rax
	test	rax, rax
	je	.L11
	mov	rdi, QWORD PTR 8[r12]
	mov	ebx, DWORD PTR CAM_LUN_WILDCARD[rip]
	call	cam_sim_path@PLT
	xor	esi, esi
	mov	rdi, r13
	mov	r8d, ebx
	mov	edx, eax
	mov	ecx, r14d
	call	xpt_create_path@PLT
	cmp	rax, QWORD PTR CAM_REQ_CMP[rip]
	mov	rdi, r13
	je	.L5
	call	xpt_free_ccb@PLT
	mov	rdi, rbp
	call	mtx_unlock@PLT
	mov	edi, DWORD PTR 4[rbp]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	lea	rsi, .LC3[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	device_printf@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	call	xpt_rescan@PLT
	mov	rax, QWORD PTR MFIP_STATE_NONE[rip]
	mov	QWORD PTR [r12], rax
.L8:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	mtx_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[rbp]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	lea	rsi, .LC1[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	device_printf@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, rbp
	call	mtx_unlock@PLT
	mov	edi, DWORD PTR 4[rbp]
	pop	rbx
	.cfi_def_cfa_offset 40
	lea	rsi, .LC2[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	device_printf@PLT
	.cfi_endproc
.LFE0:
	.size	mfip_cam_rescan, .-mfip_cam_rescan
	.comm	MFIP_STATE_RESCAN,8,8
	.comm	MFIP_STATE_NONE,8,8
	.comm	MFIP_STATE_DETACH,8,8
	.comm	Giant,4,4
	.comm	CAM_REQ_CMP,8,8
	.comm	CAM_LUN_WILDCARD,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_mfi_cam.c_mfip_cam_rescan.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"mfip\000"
	.align	2
.LC1:
	.ascii	"Couldn't find mfip child device!\012\000"
	.align	2
.LC2:
	.ascii	"Cannot allocate ccb for bus rescan.\012\000"
	.align	2
.LC3:
	.ascii	"Cannot create path for bus rescan.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mfip_cam_rescan, %function
mfip_cam_rescan:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r0
	sub	sp, sp, #12
	ldr	r0, .L12
	mov	r7, r1
	bl	mtx_lock
	mvn	r2, #0
	ldr	r1, .L12+4
	ldr	r0, [r4, #4]
	bl	device_find_child
	mov	r5, r0
	ldr	r0, .L12
	bl	mtx_unlock
	cmp	r5, #0
	beq	.L10
	mov	r0, r4
	bl	mtx_lock
	mov	r0, r5
	bl	device_get_softc
	ldr	r3, .L12+8
	ldr	r2, [r0]
	ldr	r3, [r3]
	mov	r5, r0
	cmp	r2, r3
	moveq	r0, r4
	beq	.L8
	ldr	r3, .L12+12
	ldr	r3, [r3]
	str	r3, [r5]
	bl	xpt_alloc_ccb_nowait
	subs	r6, r0, #0
	beq	.L11
	ldr	r0, [r5, #4]
	bl	cam_sim_path
	ldr	r3, .L12+16
	mov	r2, r0
	ldr	r1, [r3]
	mov	r0, r6
	mov	r3, r7
	str	r1, [sp]
	mov	r1, #0
	bl	xpt_create_path
	ldr	r3, .L12+20
	ldr	r3, [r3]
	cmp	r0, r3
	mov	r0, r6
	beq	.L5
	bl	xpt_free_ccb
	mov	r0, r4
	bl	mtx_unlock
	ldr	r0, [r4, #4]
	ldr	r1, .L12+24
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, lr}
	b	device_printf
.L5:
	bl	xpt_rescan
	mov	r0, r4
	ldr	r3, .L12+28
	ldr	r3, [r3]
	str	r3, [r5]
.L8:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, lr}
	b	mtx_unlock
.L10:
	ldr	r0, [r4, #4]
	ldr	r1, .L12+32
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, lr}
	b	device_printf
.L11:
	mov	r0, r4
	bl	mtx_unlock
	ldr	r0, [r4, #4]
	ldr	r1, .L12+36
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, lr}
	b	device_printf
.L13:
	.align	2
.L12:
	.word	Giant
	.word	.LC0
	.word	MFIP_STATE_DETACH
	.word	MFIP_STATE_RESCAN
	.word	CAM_LUN_WILDCARD
	.word	CAM_REQ_CMP
	.word	.LC3
	.word	MFIP_STATE_NONE
	.word	.LC1
	.word	.LC2
	.size	mfip_cam_rescan, .-mfip_cam_rescan
	.comm	MFIP_STATE_RESCAN,4,4
	.comm	MFIP_STATE_NONE,4,4
	.comm	MFIP_STATE_DETACH,4,4
	.comm	Giant,4,4
	.comm	CAM_REQ_CMP,4,4
	.comm	CAM_LUN_WILDCARD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
