	.file	"extr_vpo.c_vpo_attach.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"vpo"
	.text
	.p2align 4
	.type	vpo_attach, @function
vpo_attach:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	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	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	DEVTOSOFTC@PLT
	mov	edi, ebp
	mov	rbx, rax
	call	device_get_parent@PLT
	mov	edi, eax
	mov	r12d, eax
	call	device_get_softc@PLT
	cmp	QWORD PTR 16[rbx], 0
	lea	rdi, 8[rbx]
	mov	r13, rax
	je	.L2
	call	imm_attach@PLT
	test	eax, eax
	jne	.L1
.L6:
	mov	edi, 1
	call	cam_simq_alloc@PLT
	mov	r14, rax
	mov	eax, DWORD PTR ENXIO[rip]
	test	r14, r14
	je	.L1
	mov	edi, ebp
	mov	r13d, DWORD PTR 0[r13]
	call	device_get_unit@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	esi, DWORD PTR vpo_poll[rip]
	mov	edi, DWORD PTR vpo_action[rip]
	push	r14
	.cfi_def_cfa_offset 64
	mov	r8d, eax
	mov	r9d, r13d
	mov	rcx, rbx
	push	0
	.cfi_def_cfa_offset 72
	lea	rdx, .LC0[rip]
	push	1
	.cfi_def_cfa_offset 80
	call	cam_sim_alloc@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 48
	mov	QWORD PTR [rbx], rax
	test	rax, rax
	je	.L13
	mov	edi, r12d
	call	ppb_lock@PLT
	mov	rdi, QWORD PTR [rbx]
	xor	edx, edx
	mov	esi, ebp
	call	xpt_bus_register@PLT
	cmp	rax, QWORD PTR CAM_SUCCESS[rip]
	je	.L8
	mov	esi, DWORD PTR TRUE[rip]
	mov	rdi, QWORD PTR [rbx]
	call	cam_sim_free@PLT
	mov	edi, r12d
	call	ppb_unlock@PLT
	mov	eax, DWORD PTR ENXIO[rip]
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	call	vpoio_attach@PLT
	test	eax, eax
	je	.L6
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edi, r12d
	call	ppb_unlock@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rdi, r14
	call	cam_simq_free@PLT
	mov	eax, DWORD PTR ENXIO[rip]
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	vpo_attach, .-vpo_attach
	.comm	vpo_poll,4,4
	.comm	vpo_action,4,4
	.comm	TRUE,4,4
	.comm	ENXIO,4,4
	.comm	CAM_SUCCESS,8,8
	.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_vpo.c_vpo_attach.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"vpo\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vpo_attach, %function
vpo_attach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #28
	mov	r6, r0
	bl	DEVTOSOFTC
	mov	r5, r0
	mov	r0, r6
	bl	device_get_parent
	mov	r7, r0
	bl	device_get_softc
	ldr	r3, [r5, #8]
	mov	r8, r0
	cmp	r3, #0
	add	r0, r5, #4
	beq	.L2
	bl	imm_attach
	cmp	r0, #0
	bne	.L1
	mov	r0, #1
	bl	cam_simq_alloc
	subs	r9, r0, #0
	beq	.L11
.L9:
	ldr	r2, .L15
	ldr	r3, .L15+4
	mov	r0, r6
	ldr	r10, [r2]
	ldr	fp, [r3]
	bl	device_get_unit
	mov	r4, #0
	mov	r3, #1
	mov	r2, r0
	str	r9, [sp, #16]
	str	r4, [sp, #12]
	str	r3, [sp, #8]
	ldr	r3, [r8]
	mov	r1, fp
	stm	sp, {r2, r3}
	mov	r0, r10
	mov	r3, r5
	ldr	r2, .L15+8
	bl	cam_sim_alloc
	cmp	r0, r4
	str	r0, [r5]
	beq	.L14
	mov	r0, r7
	bl	ppb_lock
	mov	r2, r4
	mov	r1, r6
	ldr	r0, [r5]
	bl	xpt_bus_register
	ldr	r3, .L15+12
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L8
	ldr	r3, .L15+16
	ldr	r0, [r5]
	ldr	r1, [r3]
	bl	cam_sim_free
	mov	r0, r7
	bl	ppb_unlock
	ldr	r3, .L15+20
	ldr	r0, [r3]
.L1:
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	mov	r0, r9
	bl	cam_simq_free
.L11:
	ldr	r3, .L15+20
	ldr	r0, [r3]
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	bl	vpoio_attach
	cmp	r0, #0
	bne	.L1
	mov	r0, #1
	bl	cam_simq_alloc
	subs	r9, r0, #0
	bne	.L9
	b	.L11
.L8:
	mov	r0, r7
	bl	ppb_unlock
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	.align	2
.L15:
	.word	vpo_action
	.word	vpo_poll
	.word	.LC0
	.word	CAM_SUCCESS
	.word	TRUE
	.word	ENXIO
	.size	vpo_attach, .-vpo_attach
	.comm	vpo_poll,4,4
	.comm	vpo_action,4,4
	.comm	TRUE,4,4
	.comm	ENXIO,4,4
	.comm	CAM_SUCCESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
