	.file	"extr_scsi_pass.c_pass_add_physpath.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"GEOM::physpath"
	.text
	.p2align 4
	.type	pass_add_physpath, @function
pass_add_physpath:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	edx, DWORD PTR M_WAITOK[rip]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, esi
	mov	esi, DWORD PTR M_DEVBUF[rip]
	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
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, QWORD PTR 8[rdi]
	mov	edi, DWORD PTR MAXPATHLEN[rip]
	call	malloc@PLT
	mov	rdi, rbp
	mov	r14, rax
	call	cam_periph_mtx@PLT
	mov	rdi, rax
	mov	r12, rax
	call	mtx_lock@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR CAM_PERIPH_INVALID[rip], eax
	je	.L11
.L3:
	mov	eax, DWORD PTR [rbx]
	mov	edx, DWORD PTR PASS_FLAG_INITIAL_PHYSPATH[rip]
	test	eax, edx
	jne	.L5
	or	eax, edx
	mov	DWORD PTR [rbx], eax
.L5:
	lea	ebx, -1[r13]
	test	r13d, r13d
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdi, rbp
	sub	ebx, 1
	call	cam_periph_release_locked@PLT
	cmp	ebx, -1
	jne	.L7
.L6:
	mov	rdi, r12
	call	mtx_unlock@PLT
	mov	esi, DWORD PTR M_DEVBUF[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, r14
	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	free@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	ecx, DWORD PTR 4[rbp]
	mov	esi, DWORD PTR MAXPATHLEN[rip]
	lea	rdx, .LC0[rip]
	mov	rdi, r14
	call	xpt_getattr@PLT
	test	rax, rax
	jne	.L3
	cmp	BYTE PTR [r14], 0
	je	.L3
	mov	rdi, r12
	call	mtx_unlock@PLT
	mov	ecx, DWORD PTR 4[rbx]
	mov	edx, DWORD PTR 8[rbx]
	lea	rsi, 4[rbx]
	mov	edi, DWORD PTR MAKEDEV_WAITOK[rip]
	mov	r8, r14
	call	make_dev_physpath_alias@PLT
	mov	rdi, r12
	call	mtx_lock@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	pass_add_physpath, .-pass_add_physpath
	.comm	PASS_FLAG_INITIAL_PHYSPATH,4,4
	.comm	M_WAITOK,4,4
	.comm	M_DEVBUF,4,4
	.comm	MAXPATHLEN,4,4
	.comm	MAKEDEV_WAITOK,4,4
	.comm	CAM_PERIPH_INVALID,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_scsi_pass.c_pass_add_physpath.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"GEOM::physpath\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pass_add_physpath, %function
pass_add_physpath:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r3, .L15
	ldr	r8, .L15+4
	ldr	r10, .L15+8
	ldr	r2, [r3]
	sub	sp, sp, #8
	mov	r4, r1
	ldr	r0, [r10]
	ldr	r1, [r8]
	ldr	r9, [r5, #8]
	bl	malloc
	mov	r6, r0
	mov	r0, r5
	bl	cam_periph_mtx
	mov	r7, r0
	bl	mtx_lock
	ldr	r3, .L15+12
	ldr	r2, [r5]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L14
.L3:
	ldr	r2, .L15+16
	ldr	r3, [r9]
	ldr	r2, [r2]
	tst	r3, r2
	orreq	r3, r3, r2
	streq	r3, [r9]
	cmp	r4, #0
	sub	r4, r4, #1
	ble	.L6
.L7:
	mov	r0, r5
	sub	r4, r4, #1
	bl	cam_periph_release_locked
	cmn	r4, #1
	bne	.L7
.L6:
	mov	r0, r7
	bl	mtx_unlock
	mov	r0, r6
	ldr	r1, [r8]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	free
.L14:
	mov	r0, r6
	ldr	r1, [r10]
	ldr	r3, [r5, #4]
	ldr	r2, .L15+20
	bl	xpt_getattr
	cmp	r0, #0
	bne	.L3
	ldrb	r3, [r6]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L3
	mov	r0, r7
	bl	mtx_unlock
	ldr	r1, .L15+24
	ldr	r3, [r9, #4]
	ldr	r2, [r9, #8]
	str	r6, [sp]
	ldr	r0, [r1]
	add	r1, r9, #4
	bl	make_dev_physpath_alias
	mov	r0, r7
	bl	mtx_lock
	b	.L3
.L16:
	.align	2
.L15:
	.word	M_WAITOK
	.word	M_DEVBUF
	.word	MAXPATHLEN
	.word	CAM_PERIPH_INVALID
	.word	PASS_FLAG_INITIAL_PHYSPATH
	.word	.LC0
	.word	MAKEDEV_WAITOK
	.size	pass_add_physpath, .-pass_add_physpath
	.comm	PASS_FLAG_INITIAL_PHYSPATH,4,4
	.comm	M_WAITOK,4,4
	.comm	M_DEVBUF,4,4
	.comm	MAXPATHLEN,4,4
	.comm	MAKEDEV_WAITOK,4,4
	.comm	CAM_PERIPH_INVALID,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
