	.file	"extr_ata_xpt.c_ata_scan_lun.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"xpt_scan_lun\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"xpt_scan_lun: can't allocate CCB, can't continue\n"
	.align 8
.LC2:
	.string	"xpt_scan_lun: can't create path, can't continue\n"
	.section	.rodata.str1.1
.LC3:
	.string	"aprobe"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"xpt_scan_lun: cam_alloc_periph returned an error, can't continue probe\n"
	.text
	.p2align 4
	.type	ata_scan_lun, @function
ata_scan_lun:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rdi, rbp
	mov	ebx, edx
	lea	rdx, .LC0[rip]
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	esi, DWORD PTR CAM_DEBUG_TRACE[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	CAM_DEBUG@PLT
	lea	rdi, 8[rsp]
	mov	rsi, rbp
	call	xpt_path_inq@PLT
	mov	rax, QWORD PTR 8[rsp]
	cmp	rax, QWORD PTR CAM_REQ_CMP[rip]
	je	.L2
	test	r12, r12
	je	.L1
	mov	QWORD PTR [r12], rax
	mov	rdi, r12
	call	xpt_done@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L18
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	test	r12, r12
	je	.L19
.L5:
	mov	rdi, rbp
	call	xpt_path_owned@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L20
.L8:
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	call	cam_periph_find@PLT
	test	rax, rax
	je	.L9
	mov	edx, DWORD PTR [rax]
	test	DWORD PTR CAM_PERIPH_INVALID[rip], edx
	je	.L21
	mov	rax, QWORD PTR CAM_REQ_CMP_ERR[rip]
	mov	rdi, r12
	mov	QWORD PTR [r12], rax
	call	xpt_done@PLT
.L11:
	test	rbx, rbx
	jne	.L1
	mov	rdi, rbp
	call	xpt_path_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	r13, QWORD PTR 8[rax]
	mov	edx, DWORD PTR periph_links[rip]
	mov	rsi, r12
	lea	rdi, 4[r13]
	call	TAILQ_INSERT_TAIL@PLT
	mov	DWORD PTR 0[r13], 1
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L19:
	xor	eax, eax
	call	xpt_alloc_ccb_nowait@PLT
	mov	r12, rax
	test	rax, rax
	je	.L22
	mov	rcx, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR 8[rbp]
	xor	esi, esi
	lea	rdi, 16[rsp]
	mov	rax, QWORD PTR 16[rbp]
	mov	r8d, DWORD PTR [rcx]
	mov	ecx, DWORD PTR [rdx]
	mov	edx, DWORD PTR [rax]
	call	xpt_create_path@PLT
	cmp	QWORD PTR CAM_REQ_CMP[rip], rax
	je	.L7
	mov	rdi, rbp
	lea	rsi, .LC2[rip]
	call	xpt_print@PLT
	mov	rdi, r12
	call	xpt_free_ccb@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdi, rbp
	call	xpt_path_lock@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	mov	ecx, DWORD PTR probestart[rip]
	mov	edx, DWORD PTR probecleanup[rip]
	push	r12
	.cfi_def_cfa_offset 88
	xor	esi, esi
	push	0
	.cfi_def_cfa_offset 96
	mov	eax, DWORD PTR 8[r12]
	lea	r8, .LC3[rip]
	mov	r9d, DWORD PTR CAM_PERIPH_BIO[rip]
	mov	edi, DWORD PTR proberegister[rip]
	push	0
	.cfi_def_cfa_offset 104
	push	rax
	.cfi_def_cfa_offset 112
	call	cam_periph_alloc@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 80
	cmp	QWORD PTR CAM_REQ_CMP[rip], rax
	mov	r13, rax
	je	.L11
	mov	rdi, rbp
	lea	rsi, .LC4[rip]
	call	xpt_print@PLT
	mov	QWORD PTR [r12], r13
	mov	rdi, r12
	call	xpt_done@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edx, DWORD PTR CAM_PRIORITY_XPT[rip]
	mov	rsi, QWORD PTR 16[rsp]
	mov	rdi, r12
	call	xpt_setup_ccb@PLT
	mov	eax, DWORD PTR xptscandone[rip]
	mov	DWORD PTR 20[r12], eax
	mov	eax, DWORD PTR CAM_UNLOCKED[rip]
	or	DWORD PTR 16[r12], eax
	mov	eax, DWORD PTR XPT_SCAN_LUN[rip]
	mov	DWORD PTR [r12], ebx
	mov	DWORD PTR 12[r12], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	xpt_print@PLT
	jmp	.L1
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ata_scan_lun, .-ata_scan_lun
	.comm	xptscandone,4,4
	.comm	probestart,4,4
	.comm	proberegister,4,4
	.comm	probecleanup,4,4
	.comm	periph_links,4,4
	.comm	XPT_SCAN_LUN,4,4
	.comm	CAM_UNLOCKED,4,4
	.comm	CAM_REQ_CMP_ERR,8,8
	.comm	CAM_REQ_CMP,8,8
	.comm	CAM_PRIORITY_XPT,4,4
	.comm	CAM_PERIPH_INVALID,4,4
	.comm	CAM_PERIPH_BIO,4,4
	.comm	CAM_DEBUG_TRACE,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_ata_xpt.c_ata_scan_lun.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"xpt_scan_lun\012\000"
	.align	2
.LC1:
	.ascii	"xpt_scan_lun: can't allocate CCB, can't continue\012"
	.ascii	"\000"
	.align	2
.LC2:
	.ascii	"xpt_scan_lun: can't create path, can't continue\012"
	.ascii	"\000"
	.align	2
.LC3:
	.ascii	"aprobe\000"
	.align	2
.LC4:
	.ascii	"xpt_scan_lun: cam_alloc_periph returned an error, c"
	.ascii	"an't continue probe\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ata_scan_lun, %function
ata_scan_lun:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	mov	r7, r2
	ldr	r2, .L23
	mov	r5, r3
	ldr	r3, .L23+4
	sub	sp, sp, #40
	mov	r0, r1
	ldr	r6, .L23+8
	ldr	r1, [r2]
	ldr	r2, .L23+12
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	bl	CAM_DEBUG
	mov	r1, r4
	add	r0, sp, #28
	bl	xpt_path_inq
	ldr	r1, [r6]
	ldr	r3, [sp, #28]
	cmp	r3, r1
	beq	.L2
	cmp	r5, #0
	beq	.L1
	mov	r0, r5
	str	r3, [r5]
	bl	xpt_done
.L1:
	ldr	r3, .L23+4
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	cmp	r5, #0
	beq	.L19
.L5:
	mov	r0, r4
	bl	xpt_path_owned
	subs	r7, r0, #0
	beq	.L20
.L8:
	ldr	r8, .L23+16
	mov	r0, r4
	mov	r1, r8
	bl	cam_periph_find
	subs	r1, r0, #0
	beq	.L9
	ldr	r3, .L23+20
	ldr	r2, [r1]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L21
	ldr	r3, .L23+24
	mov	r0, r5
	ldr	r3, [r3]
	str	r3, [r5]
	bl	xpt_done
.L11:
	cmp	r7, #0
	bne	.L1
	mov	r0, r4
	bl	xpt_path_unlock
	b	.L1
.L21:
	ldr	r6, [r1, #4]
	ldr	r3, .L23+28
	mov	r1, r5
	ldr	r2, [r3]
	add	r0, r6, #4
	bl	TAILQ_INSERT_TAIL
	mov	r3, #1
	str	r3, [r6]
	b	.L11
.L19:
	bl	xpt_alloc_ccb_nowait
	subs	r5, r0, #0
	beq	.L22
	ldr	r1, [r4]
	ldr	r3, [r4, #4]
	ldr	r2, [r4, #8]
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	r2, [r2]
	add	r0, sp, #32
	str	r1, [sp]
	mov	r1, #0
	bl	xpt_create_path
	ldr	r3, [r6]
	cmp	r3, r0
	beq	.L7
	mov	r0, r4
	ldr	r1, .L23+32
	bl	xpt_print
	mov	r0, r5
	bl	xpt_free_ccb
	b	.L1
.L20:
	mov	r0, r4
	bl	xpt_path_lock
	b	.L8
.L9:
	str	r5, [sp, #20]
	str	r1, [sp, #16]
	str	r1, [sp, #12]
	ldr	r3, .L23+36
	ldr	r2, [r5, #4]
	ldr	ip, [r3]
	ldr	r0, .L23+40
	str	r2, [sp, #8]
	ldr	r3, .L23+44
	ldr	r2, .L23+48
	str	r8, [sp]
	str	ip, [sp, #4]
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r0, [r0]
	bl	cam_periph_alloc
	ldr	r3, [r6]
	mov	r8, r0
	cmp	r3, r0
	beq	.L11
	mov	r0, r4
	ldr	r1, .L23+52
	bl	xpt_print
	mov	r0, r5
	str	r8, [r5]
	bl	xpt_done
	b	.L11
.L7:
	ldr	r3, .L23+56
	ldr	r1, [sp, #32]
	ldr	r2, [r3]
	mov	r0, r5
	bl	xpt_setup_ccb
	ldr	r3, .L23+60
	ldr	r1, .L23+64
	ldr	r2, .L23+68
	ldr	r0, [r3]
	ldr	r3, [r5, #12]
	ldr	r1, [r1]
	ldr	r2, [r2]
	orr	r3, r3, r0
	str	r3, [r5, #12]
	str	r1, [r5, #16]
	str	r2, [r5, #8]
	str	r7, [r5]
	b	.L5
.L22:
	mov	r0, r4
	ldr	r1, .L23+72
	bl	xpt_print
	b	.L1
.L18:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	CAM_DEBUG_TRACE
	.word	.LC5
	.word	CAM_REQ_CMP
	.word	.LC0
	.word	.LC3
	.word	CAM_PERIPH_INVALID
	.word	CAM_REQ_CMP_ERR
	.word	periph_links
	.word	.LC2
	.word	CAM_PERIPH_BIO
	.word	proberegister
	.word	probestart
	.word	probecleanup
	.word	.LC4
	.word	CAM_PRIORITY_XPT
	.word	CAM_UNLOCKED
	.word	xptscandone
	.word	XPT_SCAN_LUN
	.word	.LC1
	.size	ata_scan_lun, .-ata_scan_lun
	.comm	xptscandone,4,4
	.comm	probestart,4,4
	.comm	proberegister,4,4
	.comm	probecleanup,4,4
	.comm	periph_links,4,4
	.comm	XPT_SCAN_LUN,4,4
	.comm	CAM_UNLOCKED,4,4
	.comm	CAM_REQ_CMP_ERR,4,4
	.comm	CAM_REQ_CMP,4,4
	.comm	CAM_PRIORITY_XPT,4,4
	.comm	CAM_PERIPH_INVALID,4,4
	.comm	CAM_PERIPH_BIO,4,4
	.comm	CAM_DEBUG_TRACE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
