	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function vscsi_attach
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_vscsi_attach:                          ## @vscsi_attach
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	callq	_device_get_softc
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	%rax, %r13
	movl	%r15d, 116(%rax)
	leaq	4(%rax), %rbx
	movq	_MTX_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mtx_init
	movl	%r15d, %edi
	callq	_ofw_bus_get_node
	leaq	112(%r13), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	movl	$4, %ecx
	callq	_OF_getencprop
	leaq	104(%r13), %rdx
	movq	$0, 104(%r13)
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %edi
	callq	_bus_alloc_resource_any
	movl	%eax, 96(%r13)
	testl	%eax, %eax
	je	LBB0_12
## %bb.2:
	movq	_INTR_TYPE_CAM@GOTPCREL(%rip), %rcx
	movq	_INTR_MPSAFE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_INTR_ENTROPY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_vscsi_intr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	leaq	92(%r13), %r10
	subq	$8, %rsp
	movl	%r15d, %edi
	movl	%eax, %esi
	xorl	%ecx, %ecx
	movq	%r13, %r9
	pushq	%r10
	callq	_bus_setup_intr
	addq	$16, %rsp
	movl	%r15d, %edi
	callq	_bus_get_dma_tag
	movq	_BUS_SPACE_MAXADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_BUS_SPACE_MAXSIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r10d
	movq	_BUS_SPACE_MAXSIZE_32BIT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r14d
	movq	_busdma_lock_mutex@GOTPCREL(%rip), %r11
	leaq	28(%r13), %r12
	movl	%eax, %edi
	movl	$1, %esi
	xorl	%edx, %edx
	movl	%ecx, %r8d
	xorl	%r9d, %r9d
	pushq	%r12
	pushq	%rbx
	pushq	(%r11)
	pushq	$0
	pushq	%r14
	pushq	$256                            ## imm = 0x100
	pushq	%r10
	pushq	$0
	callq	_bus_dma_tag_create
	addq	$64, %rsp
	leaq	88(%r13), %rdi
	callq	_TAILQ_INIT
	movq	%rbx, %r12
	leaq	24(%r13), %rbx
	movq	%rbx, %rdi
	callq	_TAILQ_INIT
	leaq	72(%r13), %r14
	movq	%r13, 80(%r13)
	movl	28(%r13), %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_bus_dmamap_create
	movq	_queue@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_TAILQ_INSERT_TAIL
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	callq	_bus_get_dma_tag
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_BUS_SPACE_MAXADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	(,%rsi,8), %edx
	movq	_BUS_SPACE_MAXSIZE@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	leaq	48(%r13), %rbx
	subq	$64, %rsp
	movq	%rbx, 56(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rsp)
	movl	%edi, 24(%rsp)
	movl	%edx, 8(%rsp)
	movl	$0, 32(%rsp)
	movl	$1, 16(%rsp)
	movq	$0, (%rsp)
	movl	%eax, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%edx, %edx
	movl	%ecx, %r8d
	xorl	%r9d, %r9d
	callq	_bus_dma_tag_create
	addq	$64, %rsp
	movl	48(%r13), %edi
	leaq	40(%r13), %rsi
	movq	_BUS_DMA_WAITOK@GOTPCREL(%rip), %rax
	movq	_BUS_DMA_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r13, %rcx
	addq	$44, %rcx
	callq	_bus_dmamem_alloc
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%r13)
	movl	48(%r13), %edi
	movl	40(%r13), %edx
	movl	44(%r13), %esi
	movl	(%r14), %ecx
	shll	$3, %ecx
	movq	_vscsi_crq_load_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	subq	$8, %rsp
	movq	%r13, %r9
	pushq	$0
	callq	_bus_dmamap_load
	addq	$16, %rsp
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_mtx_lock
	movq	%r13, %rdi
	callq	_vscsi_setup_bus
	movl	(%r13), %edi
	shll	$4, %edi
	movq	_M_VSCSI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_malloc
	movq	%rax, 32(%r13)
	cmpl	$0, (%r13)
	jle	LBB0_8
## %bb.3:
	movq	%rax, %rbx
	movq	%r13, 8(%rax)
	movl	28(%r13), %edi
	xorl	%esi, %esi
	movq	%rax, %rdx
	callq	_bus_dmamap_create
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movl	$16, %r12d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_queue@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_TAIL
	incq	%r14
	movslq	(%r13), %rax
	cmpq	%rax, %r14
	jge	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	16(%r12), %r15
	movq	32(%r13), %rax
	movq	%r14, %rbx
	shlq	$4, %rbx
	addq	%rax, %rbx
	leaq	(%rax,%r12), %rdx
	movq	%r13, 8(%rax,%r12)
	movl	28(%r13), %edi
	xorl	%esi, %esi
	callq	_bus_dmamap_create
	movq	%r15, %r12
	testl	%eax, %eax
	je	LBB0_5
LBB0_7:
	leaq	L_.str.3(%rip), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_device_printf
LBB0_8:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mtx_unlock
	movl	(%r13), %edi
	callq	_cam_simq_alloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	_vscsi_cam_action@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_vscsi_cam_poll@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	callq	_device_get_unit
	movl	(%r13), %ebx
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdx
	movl	%r12d, %edi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	%r14d, %esi
	movq	%r13, %rcx
	movl	%eax, %r8d
	movq	%r12, %r9
	pushq	8(%r13)
	pushq	%rbx
	pushq	%rbx
	callq	_cam_sim_alloc
	addq	$32, %rsp
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	movq	%r12, %rdi
	callq	_mtx_lock
	movq	16(%r13), %rdi
	xorl	%ebx, %ebx
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_xpt_bus_register
	testq	%rax, %rax
	je	LBB0_18
## %bb.11:
	leaq	L_.str.5(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	16(%r13), %rdi
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_cam_sim_free
	movq	$0, 16(%r13)
	movq	8(%r13), %rdi
	callq	_cam_simq_free
	movq	$0, 8(%r13)
	movq	%r12, %rdi
	callq	_mtx_unlock
	jmp	LBB0_15
LBB0_12:
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	%rbx, %rdi
	callq	_mtx_destroy
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_14:
	movq	8(%r13), %rdi
	callq	_cam_simq_free
	movq	$0, 8(%r13)
	leaq	L_.str.4(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	%r12, %rdi
	callq	_mtx_unlock
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vscsi"

	.comm	_MTX_DEF,4,2                    ## @MTX_DEF
L_.str.1:                               ## @.str.1
	.asciz	"reg"

	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
L_.str.2:                               ## @.str.2
	.asciz	"Could not allocate IRQ\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_INTR_TYPE_CAM,4,2              ## @INTR_TYPE_CAM
	.comm	_INTR_MPSAFE,4,2                ## @INTR_MPSAFE
	.comm	_INTR_ENTROPY,4,2               ## @INTR_ENTROPY
	.comm	_vscsi_intr,4,2                 ## @vscsi_intr
	.comm	_BUS_SPACE_MAXADDR,4,2          ## @BUS_SPACE_MAXADDR
	.comm	_BUS_SPACE_MAXSIZE,4,2          ## @BUS_SPACE_MAXSIZE
	.comm	_BUS_SPACE_MAXSIZE_32BIT,4,2    ## @BUS_SPACE_MAXSIZE_32BIT
	.comm	_busdma_lock_mutex,8,3          ## @busdma_lock_mutex
	.comm	_queue,4,2                      ## @queue
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_BUS_DMA_WAITOK,4,2             ## @BUS_DMA_WAITOK
	.comm	_BUS_DMA_ZERO,4,2               ## @BUS_DMA_ZERO
	.comm	_vscsi_crq_load_cb,4,2          ## @vscsi_crq_load_cb
	.comm	_M_VSCSI,4,2                    ## @M_VSCSI
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
L_.str.3:                               ## @.str.3
	.asciz	"Could not create DMA map (%d)\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vscsi_cam_action,4,2           ## @vscsi_cam_action
	.comm	_vscsi_cam_poll,4,2             ## @vscsi_cam_poll
L_.str.4:                               ## @.str.4
	.asciz	"CAM SIM attach failed\n"

L_.str.5:                               ## @.str.5
	.asciz	"XPT bus registration failed\n"

	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_vscsi_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vscsi_attach
_vscsi_attach:                          ; @vscsi_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x0
	bl	_device_get_softc
	cbz	x0, LBB0_15
; %bb.1:
	mov	x19, x0
	str	w21, [x0, #116]
	add	x20, x0, #4
Lloh0:
	adrp	x8, _MTX_DEF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTX_DEF@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, #0
	bl	_mtx_init
	mov	x0, x21
	bl	_ofw_bus_get_node
	add	x2, x19, #112
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w3, #4
	bl	_OF_getencprop
	mov	x22, x19
	str	xzr, [x22, #104]!
Lloh7:
	adrp	x8, _SYS_RES_IRQ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SYS_RES_IRQ@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x2, x22
	bl	_bus_alloc_resource_any
	stur	w0, [x22, #-8]
	cbz	w0, LBB0_12
; %bb.2:
	mov	x1, x0
Lloh13:
	adrp	x8, _INTR_TYPE_CAM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _INTR_TYPE_CAM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _INTR_MPSAFE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _INTR_MPSAFE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _INTR_ENTROPY@GOTPAGE
Lloh20:
	ldr	x9, [x9, _INTR_ENTROPY@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w2, w8, w9
Lloh22:
	adrp	x8, _vscsi_intr@GOTPAGE
Lloh23:
	ldr	x8, [x8, _vscsi_intr@GOTPAGEOFF]
Lloh24:
	ldr	w4, [x8]
	add	x6, x19, #92
	mov	x0, x21
	mov	x3, #0
	mov	x5, x19
	bl	_bus_setup_intr
	mov	x0, x21
	bl	_bus_get_dma_tag
Lloh25:
	adrp	x25, _BUS_SPACE_MAXADDR@GOTPAGE
Lloh26:
	ldr	x25, [x25, _BUS_SPACE_MAXADDR@GOTPAGEOFF]
	ldr	w3, [x25]
Lloh27:
	adrp	x26, _BUS_SPACE_MAXSIZE@GOTPAGE
Lloh28:
	ldr	x26, [x26, _BUS_SPACE_MAXSIZE@GOTPAGEOFF]
Lloh29:
	adrp	x8, _BUS_SPACE_MAXSIZE_32BIT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _BUS_SPACE_MAXSIZE_32BIT@GOTPAGEOFF]
	ldr	w7, [x26]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _busdma_lock_mutex@GOTPAGE
Lloh33:
	ldr	x9, [x9, _busdma_lock_mutex@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	add	x10, x19, #28
	stp	x20, x10, [sp, #24]
	str	x9, [sp, #16]
	stp	w8, wzr, [sp, #4]
	mov	w9, #256
	mov	w27, #1
	str	w9, [sp]
	mov	w1, #1
	mov	w2, #0
	mov	x4, x3
	mov	x5, #0
	mov	x6, #0
	bl	_bus_dma_tag_create
	add	x0, x19, #88
	bl	_TAILQ_INIT
	add	x22, x19, #24
	mov	x0, x22
	bl	_TAILQ_INIT
	add	x23, x19, #72
	str	x19, [x19, #80]
	ldr	w0, [x19, #28]
	mov	w1, #0
	mov	x2, x23
	bl	_bus_dmamap_create
Lloh35:
	adrp	x24, _queue@GOTPAGE
Lloh36:
	ldr	x24, [x24, _queue@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x22
	mov	x1, x23
	bl	_TAILQ_INSERT_TAIL
	mov	x0, x21
	bl	_bus_get_dma_tag
Lloh37:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh38:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w1, [x23]
	ldr	w3, [x25]
	lsl	w7, w1, #3
	ldr	w8, [x26]
	add	x9, x19, #48
	stp	xzr, xzr, [sp, #16]
	str	x9, [sp, #32]
	stp	w8, wzr, [sp, #4]
	str	w27, [sp]
	mov	w2, #0
	mov	x4, x3
	mov	x5, #0
	mov	x6, #0
	bl	_bus_dma_tag_create
	ldr	w0, [x19, #48]
	add	x1, x19, #40
Lloh39:
	adrp	x8, _BUS_DMA_WAITOK@GOTPAGE
Lloh40:
	ldr	x8, [x8, _BUS_DMA_WAITOK@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
Lloh42:
	adrp	x9, _BUS_DMA_ZERO@GOTPAGE
Lloh43:
	ldr	x9, [x9, _BUS_DMA_ZERO@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	orr	w2, w9, w8
	add	x3, x19, #44
	bl	_bus_dmamem_alloc
	stp	xzr, xzr, [x19, #56]
	ldp	w1, w0, [x19, #44]
	ldr	w2, [x19, #40]
	ldr	w8, [x23]
	lsl	w3, w8, #3
Lloh45:
	adrp	x8, _vscsi_crq_load_cb@GOTPAGE
Lloh46:
	ldr	x8, [x8, _vscsi_crq_load_cb@GOTPAGEOFF]
Lloh47:
	ldr	w4, [x8]
	mov	x5, x19
	mov	w6, #0
	bl	_bus_dmamap_load
	mov	x0, x20
	bl	_mtx_lock
	mov	x0, x19
	bl	_vscsi_setup_bus
	ldr	w8, [x19]
	lsl	w0, w8, #4
Lloh48:
	adrp	x8, _M_VSCSI@GOTPAGE
Lloh49:
	ldr	x8, [x8, _M_VSCSI@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
Lloh51:
	adrp	x8, _M_NOWAIT@GOTPAGE
Lloh52:
	ldr	x8, [x8, _M_NOWAIT@GOTPAGEOFF]
Lloh53:
	ldr	w2, [x8]
	bl	_malloc
	str	x0, [x19, #32]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x23, x0
	str	x19, [x0, #8]
	ldr	w0, [x19, #28]
	mov	w1, #0
	mov	x2, x23
	bl	_bus_dmamap_create
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_7
; %bb.4:
	mov	x25, #0
	mov	w26, #24
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x24]
	mov	x0, x22
	mov	x1, x23
	bl	_TAILQ_INSERT_TAIL
	add	x25, x25, #1
	ldrsw	x8, [x19]
	cmp	x25, x8
	b.ge	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x27, x26, #16
	ldr	x8, [x19, #32]
	add	x23, x8, x25, lsl #4
	add	x2, x8, x26
	str	x19, [x2], #-8
	ldr	w0, [x19, #28]
	mov	w1, #0
	bl	_bus_dmamap_create
                                        ; kill: def $w0 killed $w0 def $x0
	mov	x26, x27
	cbz	w0, LBB0_5
LBB0_7:
	str	x0, [sp]
Lloh54:
	adrp	x1, l_.str.3@PAGE
Lloh55:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_device_printf
LBB0_8:
	mov	x0, x20
	bl	_mtx_unlock
	ldr	w0, [x19]
	bl	_cam_simq_alloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_13
; %bb.9:
Lloh56:
	adrp	x8, _vscsi_cam_action@GOTPAGE
Lloh57:
	ldr	x8, [x8, _vscsi_cam_action@GOTPAGEOFF]
Lloh58:
	ldr	w22, [x8]
Lloh59:
	adrp	x8, _vscsi_cam_poll@GOTPAGE
Lloh60:
	ldr	x8, [x8, _vscsi_cam_poll@GOTPAGEOFF]
Lloh61:
	ldr	w23, [x8]
	mov	x0, x21
	bl	_device_get_unit
	mov	x4, x0
	ldr	w6, [x19]
	ldr	x8, [x19, #8]
	str	x8, [sp]
Lloh62:
	adrp	x2, l_.str@PAGE
Lloh63:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	mov	x1, x23
	mov	x3, x19
	mov	x5, x20
	mov	x7, x6
	bl	_cam_sim_alloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_14
; %bb.10:
	mov	x0, x20
	bl	_mtx_lock
	ldr	x0, [x19, #16]
	mov	x1, x21
	mov	w2, #0
	bl	_xpt_bus_register
	cbz	x0, LBB0_18
; %bb.11:
Lloh64:
	adrp	x1, l_.str.5@PAGE
Lloh65:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_device_printf
	ldr	x0, [x19, #16]
Lloh66:
	adrp	x8, _FALSE@GOTPAGE
Lloh67:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh68:
	ldr	w1, [x8]
	bl	_cam_sim_free
	str	xzr, [x19, #16]
	ldr	x0, [x19, #8]
	bl	_cam_simq_free
	str	xzr, [x19, #8]
	mov	x0, x20
	bl	_mtx_unlock
	b	LBB0_15
LBB0_12:
Lloh69:
	adrp	x1, l_.str.2@PAGE
Lloh70:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_device_printf
	mov	x0, x20
	bl	_mtx_destroy
Lloh71:
	adrp	x8, _ENXIO@GOTPAGE
Lloh72:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
Lloh73:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh74:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
	ldr	x0, [x19, #8]
	bl	_cam_simq_free
	str	xzr, [x19, #8]
Lloh75:
	adrp	x1, l_.str.4@PAGE
Lloh76:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_device_printf
LBB0_15:
Lloh77:
	adrp	x8, _EINVAL@GOTPAGE
Lloh78:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_16:
	ldr	w0, [x8]
LBB0_17:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_18:
	mov	x0, x20
	bl	_mtx_unlock
	mov	w0, #0
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpLdrGot	Lloh71, Lloh72
	.loh AdrpAdd	Lloh69, Lloh70
	.loh AdrpLdrGot	Lloh73, Lloh74
	.loh AdrpAdd	Lloh75, Lloh76
	.loh AdrpLdrGot	Lloh77, Lloh78
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vscsi"

	.comm	_MTX_DEF,4,2                    ; @MTX_DEF
l_.str.1:                               ; @.str.1
	.asciz	"reg"

	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
l_.str.2:                               ; @.str.2
	.asciz	"Could not allocate IRQ\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_INTR_TYPE_CAM,4,2              ; @INTR_TYPE_CAM
	.comm	_INTR_MPSAFE,4,2                ; @INTR_MPSAFE
	.comm	_INTR_ENTROPY,4,2               ; @INTR_ENTROPY
	.comm	_vscsi_intr,4,2                 ; @vscsi_intr
	.comm	_BUS_SPACE_MAXADDR,4,2          ; @BUS_SPACE_MAXADDR
	.comm	_BUS_SPACE_MAXSIZE,4,2          ; @BUS_SPACE_MAXSIZE
	.comm	_BUS_SPACE_MAXSIZE_32BIT,4,2    ; @BUS_SPACE_MAXSIZE_32BIT
	.comm	_busdma_lock_mutex,8,3          ; @busdma_lock_mutex
	.comm	_queue,4,2                      ; @queue
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_BUS_DMA_WAITOK,4,2             ; @BUS_DMA_WAITOK
	.comm	_BUS_DMA_ZERO,4,2               ; @BUS_DMA_ZERO
	.comm	_vscsi_crq_load_cb,4,2          ; @vscsi_crq_load_cb
	.comm	_M_VSCSI,4,2                    ; @M_VSCSI
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
l_.str.3:                               ; @.str.3
	.asciz	"Could not create DMA map (%d)\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vscsi_cam_action,4,2           ; @vscsi_cam_action
	.comm	_vscsi_cam_poll,4,2             ; @vscsi_cam_poll
l_.str.4:                               ; @.str.4
	.asciz	"CAM SIM attach failed\n"

l_.str.5:                               ; @.str.5
	.asciz	"XPT bus registration failed\n"

	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_vscsi_attach
.subsections_via_symbols
