	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vhba_attach
_vhba_attach:                           ## @vhba_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	addq	$28, %rdi
	callq	_TAILQ_INIT
	leaq	24(%rbx), %rdi
	callq	_TAILQ_INIT
	movq	_VHBA_MAXCMDS@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_cam_simq_alloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	_vhba_action@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_vhba_poll@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_VHBA_MOD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%r14), %r10d
	subq	$8, %rsp
	movq	%rbx, %rcx
	xorl	%r8d, %r8d
	movq	%rbx, %r9
	pushq	%rax
	pushq	%r10
	pushq	%r10
	callq	_cam_sim_alloc
	addq	$32, %rsp
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	callq	_vhba_init
	movq	%rbx, %rdi
	callq	_mtx_lock
	movq	8(%rbx), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_xpt_bus_register
	movq	_CAM_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	callq	_mtx_unlock
	jmp	LBB0_8
LBB0_4:
	movq	16(%rbx), %rdi
	callq	_cam_simq_free
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	8(%rbx), %rdi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_cam_sim_free
	movq	%rbx, %rdi
	callq	_mtx_unlock
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VHBA_MAXCMDS,4,2               ## @VHBA_MAXCMDS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vhba_action,4,2                ## @vhba_action
	.comm	_vhba_poll,4,2                  ## @vhba_poll
	.comm	_VHBA_MOD,4,2                   ## @VHBA_MOD
	.comm	_CAM_SUCCESS,8,3                ## @CAM_SUCCESS
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_vhba_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vhba_attach
_vhba_attach:                           ; @vhba_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x0, x0, #28
	bl	_TAILQ_INIT
	add	x0, x19, #24
	bl	_TAILQ_INIT
Lloh0:
	adrp	x20, _VHBA_MAXCMDS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _VHBA_MAXCMDS@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_cam_simq_alloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_5
; %bb.1:
Lloh2:
	adrp	x8, _vhba_action@GOTPAGE
Lloh3:
	ldr	x8, [x8, _vhba_action@GOTPAGEOFF]
Lloh4:
	adrp	x9, _vhba_poll@GOTPAGE
Lloh5:
	ldr	x9, [x9, _vhba_poll@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	ldr	w1, [x9]
Lloh8:
	adrp	x9, _VHBA_MOD@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VHBA_MOD@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x9]
	ldr	w6, [x20]
	str	x0, [sp]
	mov	x0, x8
	mov	x3, x19
	mov	w4, #0
	mov	x5, x19
	mov	x7, x6
	bl	_cam_sim_alloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_vhba_init
	mov	x0, x19
	bl	_mtx_lock
	ldr	x0, [x19, #8]
	mov	w1, #0
	mov	w2, #0
	bl	_xpt_bus_register
Lloh11:
	adrp	x8, _CAM_SUCCESS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CAM_SUCCESS@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_mtx_unlock
	mov	w0, #0
	b	LBB0_8
LBB0_4:
	ldr	x0, [x19, #16]
	bl	_cam_simq_free
LBB0_5:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	ldr	x0, [x19, #8]
Lloh16:
	adrp	x8, _TRUE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_cam_sim_free
	mov	x0, x19
	bl	_mtx_unlock
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_VHBA_MAXCMDS,4,2               ; @VHBA_MAXCMDS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vhba_action,4,2                ; @vhba_action
	.comm	_vhba_poll,4,2                  ; @vhba_poll
	.comm	_VHBA_MOD,4,2                   ; @VHBA_MOD
	.comm	_CAM_SUCCESS,8,3                ; @CAM_SUCCESS
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_vhba_attach
.subsections_via_symbols
