	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps3cdrom_attach
_ps3cdrom_attach:                       ## @ps3cdrom_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	$72, %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
	movq	%rax, %r12
	movl	%r15d, 60(%rax)
	movq	%rax, %rdi
	callq	_PS3CDROM_LOCK_INIT
	leaq	8(%r12), %rdx
	movq	$0, 8(%r12)
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %edi
	callq	_bus_alloc_resource_any
	movl	%eax, (%r12)
	testl	%eax, %eax
	je	LBB0_1
## %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	_ps3cdrom_intr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	leaq	16(%r12), %rbx
	subq	$8, %rsp
	movl	%r15d, %edi
	movl	%eax, %esi
	xorl	%ecx, %ecx
	movq	%r12, %r9
	pushq	%rbx
	callq	_bus_setup_intr
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_27
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_28
LBB0_4:
	movl	%r15d, %edi
	callq	_bus_get_dma_tag
	movq	_BUS_SPACE_MAXADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_BUS_SPACE_UNRESTRICTED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r11d
	movq	_busdma_lock_mutex@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	leaq	44(%r12), %r10
	leaq	20(%r12), %r13
	movl	%eax, %edi
	movl	$4096, %esi                     ## imm = 0x1000
	xorl	%edx, %edx
	movl	%ecx, %r8d
	xorl	%r9d, %r9d
	pushq	%r13
	movq	%r10, -80(%rbp)                 ## 8-byte Spill
	pushq	%r10
	pushq	%rbx
	pushq	$0
	pushq	%r11
	pushq	$1
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	$0
	callq	_bus_dma_tag_create
	addq	$64, %rsp
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_26
LBB0_6:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	leaq	56(%r12), %rdi
	callq	_TAILQ_INIT
	leaq	24(%r12), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_TAILQ_INIT
	movq	_PS3CDROM_MAX_XFERS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%edi, %edi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	jle	LBB0_12
## %bb.7:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%r12), %rbx
	movq	%r12, 8(%rbx,%r15)
	addq	%r15, %rbx
	movl	20(%r12), %edi
	movq	_BUS_DMA_COHERENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_bus_dmamap_create
	testl	%eax, %eax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_x_queue@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_TAIL
	incq	%r14
	movq	_PS3CDROM_MAX_XFERS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	$16, %r15
	cmpq	%rdi, %r14
	jl	LBB0_8
## %bb.11:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %r14
LBB0_12:
	decl	%edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cam_simq_alloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	%rax, %r13
	movq	_ps3cdrom_action@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_ps3cdrom_poll@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r15d, %edi
	callq	_device_get_unit
	movq	_PS3CDROM_MAX_XFERS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	decl	%ebx
	subq	$8, %rsp
	leaq	L_.str.5(%rip), %rdx
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movl	%r14d, %esi
	movq	%r12, %rcx
	movl	%eax, %r8d
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	pushq	%r13
	pushq	$0
	pushq	%rbx
	callq	_cam_sim_alloc
	addq	$32, %rsp
	movq	%rax, 32(%r12)
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	%r12, %rdi
	callq	_PS3CDROM_LOCK
	movq	32(%r12), %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_xpt_bus_register
	movq	_CAM_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_17
## %bb.18:
	movq	%r12, %rbx
	addq	$40, %rbx
	movq	32(%r12), %rdi
	callq	_cam_sim_path
	movq	_CAM_TARGET_WILDCARD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_CAM_LUN_WILDCARD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_xpt_create_path
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_19
## %bb.30:
	leaq	-88(%rbp), %rdi
	movl	40(%r12), %esi
	movl	$5, %edx
	callq	_xpt_setup_ccb
	movq	_XPT_SASYNC_CB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movq	_AC_LOST_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -92(%rbp)
	movq	_ps3cdrom_async@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movq	32(%r12), %rax
	movq	%rax, -104(%rbp)
	leaq	-104(%rbp), %rdi
	callq	_xpt_action
	movl	%r15d, %edi
	movl	40(%r12), %r15d
	movq	_CAM_DEBUG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_device_get_unit
	movslq	%eax, %rdx
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_CAM_DEBUG
	movq	%r12, %rdi
	callq	_PS3CDROM_UNLOCK
	movq	_BUS_PROBE_SPECIFIC@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_29
LBB0_9:
	movl	%eax, %r13d
	leaq	L_.str.3(%rip), %rsi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_21
LBB0_13:
	leaq	L_.str.4(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_25
LBB0_15:
	leaq	L_.str.6(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	%r13, %rdi
	callq	_cam_simq_free
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %r14
	jmp	LBB0_25
LBB0_17:
	leaq	L_.str.7(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r12, %rdi
	callq	_PS3CDROM_UNLOCK
	jmp	LBB0_20
LBB0_19:
	leaq	L_.str.8(%rip), %rsi
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r12, %rdi
	callq	_PS3CDROM_UNLOCK
	movq	32(%r12), %rdi
	callq	_cam_sim_path
	movl	%eax, %edi
	callq	_xpt_bus_deregister
LBB0_20:
	movq	32(%r12), %rdi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_cam_sim_free
LBB0_21:
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %r14
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_25
## %bb.22:
	movq	%rax, %rbx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	_x_queue@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	movl	(%r14), %edi
	movl	(%rbx), %esi
	callq	_bus_dmamap_destroy
	movq	%r15, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_23
## %bb.24:
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %r14
	movl	-44(%rbp), %r15d                ## 4-byte Reload
LBB0_25:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_bus_dma_tag_destroy
LBB0_26:
	movl	(%r12), %esi
	movl	16(%r12), %edx
	movl	%r15d, %edi
	callq	_bus_teardown_intr
LBB0_27:
	movl	(%r14), %esi
	movq	8(%r12), %rdx
	movl	(%r12), %ecx
	movl	%r15d, %edi
	callq	_bus_release_resource
LBB0_28:
	movq	%r12, %rdi
	callq	_PS3CDROM_LOCK_DESTROY
LBB0_29:
	movl	%r13d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.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	_ps3cdrom_intr,4,2              ## @ps3cdrom_intr
L_.str.1:                               ## @.str.1
	.asciz	"Could not setup IRQ\n"

	.comm	_BUS_SPACE_MAXADDR,4,2          ## @BUS_SPACE_MAXADDR
	.comm	_BUS_SPACE_UNRESTRICTED,4,2     ## @BUS_SPACE_UNRESTRICTED
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_busdma_lock_mutex,4,2          ## @busdma_lock_mutex
L_.str.2:                               ## @.str.2
	.asciz	"Could not create DMA tag\n"

	.comm	_PS3CDROM_MAX_XFERS,4,2         ## @PS3CDROM_MAX_XFERS
	.comm	_BUS_DMA_COHERENT,4,2           ## @BUS_DMA_COHERENT
L_.str.3:                               ## @.str.3
	.asciz	"Could not create DMA map (%d)\n"

	.comm	_x_queue,4,2                    ## @x_queue
L_.str.4:                               ## @.str.4
	.asciz	"Could not allocate SIM queue\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ps3cdrom_action,4,2            ## @ps3cdrom_action
	.comm	_ps3cdrom_poll,4,2              ## @ps3cdrom_poll
L_.str.5:                               ## @.str.5
	.asciz	"ps3cdrom"

L_.str.6:                               ## @.str.6
	.asciz	"Could not allocate SIM\n"

	.comm	_CAM_SUCCESS,4,2                ## @CAM_SUCCESS
L_.str.7:                               ## @.str.7
	.asciz	"Could not register XPT bus\n"

	.comm	_CAM_TARGET_WILDCARD,4,2        ## @CAM_TARGET_WILDCARD
	.comm	_CAM_LUN_WILDCARD,4,2           ## @CAM_LUN_WILDCARD
	.comm	_CAM_REQ_CMP,4,2                ## @CAM_REQ_CMP
L_.str.8:                               ## @.str.8
	.asciz	"Could not create XPT path\n"

	.comm	_XPT_SASYNC_CB,4,2              ## @XPT_SASYNC_CB
	.comm	_AC_LOST_DEVICE,4,2             ## @AC_LOST_DEVICE
	.comm	_ps3cdrom_async,4,2             ## @ps3cdrom_async
	.comm	_CAM_DEBUG_TRACE,4,2            ## @CAM_DEBUG_TRACE
	.comm	_BUS_PROBE_SPECIFIC,4,2         ## @BUS_PROBE_SPECIFIC
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_ps3cdrom_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps3cdrom_attach
_ps3cdrom_attach:                       ; @ps3cdrom_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x20, x0
	bl	_device_get_softc
	mov	x19, x0
	str	w20, [x0, #60]
	bl	_PS3CDROM_LOCK_INIT
	mov	x2, x19
	str	xzr, [x2, #8]!
Lloh0:
	adrp	x26, _SYS_RES_IRQ@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SYS_RES_IRQ@GOTPAGEOFF]
	ldr	w1, [x26]
Lloh2:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_bus_alloc_resource_any
	str	w0, [x19]
	cbz	w0, LBB0_3
; %bb.1:
	mov	x1, x0
Lloh5:
	adrp	x8, _INTR_TYPE_CAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _INTR_TYPE_CAM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _INTR_MPSAFE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _INTR_MPSAFE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _INTR_ENTROPY@GOTPAGE
Lloh12:
	ldr	x9, [x9, _INTR_ENTROPY@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w8, w9
Lloh14:
	adrp	x8, _ps3cdrom_intr@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ps3cdrom_intr@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	add	x6, x19, #16
	mov	x0, x20
	mov	x3, #0
	mov	x5, x19
	bl	_bus_setup_intr
	cbz	w0, LBB0_4
; %bb.2:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh19:
	adrp	x8, _ENXIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh21:
	ldr	w22, [x8]
	b	LBB0_28
LBB0_3:
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh24:
	adrp	x8, _ENXIO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh26:
	ldr	w22, [x8]
	b	LBB0_29
LBB0_4:
	mov	x0, x20
	bl	_bus_get_dma_tag
Lloh27:
	adrp	x8, _BUS_SPACE_MAXADDR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _BUS_SPACE_MAXADDR@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
Lloh30:
	adrp	x8, _BUS_SPACE_UNRESTRICTED@GOTPAGE
Lloh31:
	ldr	x8, [x8, _BUS_SPACE_UNRESTRICTED@GOTPAGEOFF]
Lloh32:
	ldr	w7, [x8]
Lloh33:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	adrp	x9, _busdma_lock_mutex@GOTPAGE
Lloh37:
	ldr	x9, [x9, _busdma_lock_mutex@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	add	x23, x19, #44
	add	x27, x19, #20
	stp	x23, x27, [sp, #16]
	stp	wzr, w9, [sp, #8]
	mov	w9, #1
	stp	w9, w8, [sp]
	mov	w1, #4096
	mov	w2, #0
	mov	x4, x3
	mov	x5, #0
	mov	x6, #0
	bl	_bus_dma_tag_create
	cbz	w0, LBB0_6
; %bb.5:
Lloh39:
	adrp	x1, l_.str.2@PAGE
Lloh40:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh41:
	adrp	x8, _ENXIO@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh43:
	ldr	w22, [x8]
	b	LBB0_27
LBB0_6:
	add	x0, x19, #56
	bl	_TAILQ_INIT
	add	x21, x19, #24
	mov	x0, x21
	bl	_TAILQ_INIT
Lloh44:
	adrp	x28, _PS3CDROM_MAX_XFERS@GOTPAGE
Lloh45:
	ldr	x28, [x28, _PS3CDROM_MAX_XFERS@GOTPAGEOFF]
	ldr	w8, [x28]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	stp	x23, x27, [sp, #40]             ; 16-byte Folded Spill
	mov	x25, #0
	mov	x26, #0
Lloh46:
	adrp	x23, _BUS_DMA_COHERENT@GOTPAGE
Lloh47:
	ldr	x23, [x23, _BUS_DMA_COHERENT@GOTPAGEOFF]
Lloh48:
	adrp	x27, _x_queue@GOTPAGE
Lloh49:
	ldr	x27, [x27, _x_queue@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #48]
	add	x24, x8, x25
	str	x19, [x24, #8]
	ldr	w0, [x19, #20]
	ldr	w1, [x23]
	mov	x2, x24
	bl	_bus_dmamap_create
	cbnz	w0, LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w2, [x27]
	mov	x0, x21
	mov	x1, x24
	bl	_TAILQ_INSERT_TAIL
	add	x26, x26, #1
	ldrsw	x8, [x28]
	add	x25, x25, #16
	cmp	x26, x8
	b.lt	LBB0_8
; %bb.10:
Lloh50:
	adrp	x26, _SYS_RES_IRQ@GOTPAGE
Lloh51:
	ldr	x26, [x26, _SYS_RES_IRQ@GOTPAGEOFF]
	ldp	x23, x27, [sp, #40]             ; 16-byte Folded Reload
LBB0_11:
	sub	w0, w8, #1
	bl	_cam_simq_alloc
	cbz	x0, LBB0_17
; %bb.12:
	mov	x22, x0
Lloh52:
	adrp	x8, _ps3cdrom_action@GOTPAGE
Lloh53:
	ldr	x8, [x8, _ps3cdrom_action@GOTPAGEOFF]
Lloh54:
	ldr	w24, [x8]
Lloh55:
	adrp	x8, _ps3cdrom_poll@GOTPAGE
Lloh56:
	ldr	x8, [x8, _ps3cdrom_poll@GOTPAGEOFF]
Lloh57:
	ldr	w25, [x8]
	mov	x0, x20
	bl	_device_get_unit
	mov	x4, x0
	ldr	w8, [x28]
	sub	w6, w8, #1
	str	x22, [sp]
Lloh58:
	adrp	x2, l_.str.5@PAGE
Lloh59:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x24
	mov	x1, x25
	mov	x3, x19
	mov	x5, x23
	mov	w7, #0
	bl	_cam_sim_alloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_18
; %bb.13:
	mov	x0, x19
	bl	_PS3CDROM_LOCK
	ldr	x0, [x19, #32]
	mov	x1, x20
	mov	w2, #0
	bl	_xpt_bus_register
Lloh60:
	adrp	x8, _CAM_SUCCESS@GOTPAGE
Lloh61:
	ldr	x8, [x8, _CAM_SUCCESS@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_20
; %bb.14:
	add	x22, x19, #40
	ldr	x0, [x19, #32]
	bl	_cam_sim_path
	mov	x2, x0
Lloh63:
	adrp	x8, _CAM_TARGET_WILDCARD@GOTPAGE
Lloh64:
	ldr	x8, [x8, _CAM_TARGET_WILDCARD@GOTPAGEOFF]
Lloh65:
	ldr	w3, [x8]
Lloh66:
	adrp	x8, _CAM_LUN_WILDCARD@GOTPAGE
Lloh67:
	ldr	x8, [x8, _CAM_LUN_WILDCARD@GOTPAGEOFF]
Lloh68:
	ldr	w4, [x8]
	mov	x0, x22
	mov	x1, #0
	bl	_xpt_create_path
Lloh69:
	adrp	x8, _CAM_REQ_CMP@GOTPAGE
Lloh70:
	ldr	x8, [x8, _CAM_REQ_CMP@GOTPAGEOFF]
Lloh71:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_21
; %bb.15:
	add	x8, sp, #56
	add	x0, x8, #16
	ldr	w1, [x19, #40]
	mov	w2, #5
	bl	_xpt_setup_ccb
Lloh72:
	adrp	x8, _XPT_SASYNC_CB@GOTPAGE
Lloh73:
	ldr	x8, [x8, _XPT_SASYNC_CB@GOTPAGEOFF]
Lloh74:
	ldr	w8, [x8]
	str	w8, [sp, #72]
Lloh75:
	adrp	x8, _AC_LOST_DEVICE@GOTPAGE
Lloh76:
	ldr	x8, [x8, _AC_LOST_DEVICE@GOTPAGEOFF]
Lloh77:
	adrp	x9, _ps3cdrom_async@GOTPAGE
Lloh78:
	ldr	x9, [x9, _ps3cdrom_async@GOTPAGEOFF]
Lloh79:
	ldr	w8, [x8]
Lloh80:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #64]
	ldr	x8, [x19, #32]
	str	x8, [sp, #56]
	add	x0, sp, #56
	bl	_xpt_action
	ldr	w21, [x19, #40]
Lloh81:
	adrp	x8, _CAM_DEBUG_TRACE@GOTPAGE
Lloh82:
	ldr	x8, [x8, _CAM_DEBUG_TRACE@GOTPAGEOFF]
Lloh83:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_device_get_unit
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x2, w0
	mov	x0, x21
	mov	x1, x22
	bl	_CAM_DEBUG
	mov	x0, x19
	bl	_PS3CDROM_UNLOCK
Lloh84:
	adrp	x8, _BUS_PROBE_SPECIFIC@GOTPAGE
Lloh85:
	ldr	x8, [x8, _BUS_PROBE_SPECIFIC@GOTPAGEOFF]
Lloh86:
	ldr	w22, [x8]
	b	LBB0_30
LBB0_16:
	mov	x22, x0
	str	x22, [sp]
Lloh87:
	adrp	x1, l_.str.3@PAGE
Lloh88:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh89:
	adrp	x26, _SYS_RES_IRQ@GOTPAGE
Lloh90:
	ldr	x26, [x26, _SYS_RES_IRQ@GOTPAGEOFF]
	ldr	x27, [sp, #48]                  ; 8-byte Folded Reload
	b	LBB0_23
LBB0_17:
Lloh91:
	adrp	x1, l_.str.4@PAGE
Lloh92:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_device_printf
	b	LBB0_19
LBB0_18:
Lloh93:
	adrp	x1, l_.str.6@PAGE
Lloh94:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_device_printf
	mov	x0, x22
	bl	_cam_simq_free
LBB0_19:
Lloh95:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh96:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh97:
	ldr	w22, [x8]
	b	LBB0_26
LBB0_20:
Lloh98:
	adrp	x1, l_.str.7@PAGE
Lloh99:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh100:
	adrp	x8, _ENXIO@GOTPAGE
Lloh101:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh102:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_PS3CDROM_UNLOCK
	b	LBB0_22
LBB0_21:
Lloh103:
	adrp	x1, l_.str.8@PAGE
Lloh104:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh105:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh106:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh107:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_PS3CDROM_UNLOCK
	ldr	x0, [x19, #32]
	bl	_cam_sim_path
	bl	_xpt_bus_deregister
LBB0_22:
	ldr	x0, [x19, #32]
Lloh108:
	adrp	x8, _TRUE@GOTPAGE
Lloh109:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh110:
	ldr	w1, [x8]
	bl	_cam_sim_free
LBB0_23:
	mov	x0, x21
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_26
; %bb.24:
	mov	x23, x0
Lloh111:
	adrp	x24, _x_queue@GOTPAGE
Lloh112:
	ldr	x24, [x24, _x_queue@GOTPAGEOFF]
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x24]
	mov	x0, x21
	mov	x1, x23
	bl	_TAILQ_REMOVE
	ldr	w0, [x27]
	ldr	w1, [x23]
	bl	_bus_dmamap_destroy
	mov	x0, x21
	bl	_TAILQ_FIRST
	mov	x23, x0
	cbnz	x0, LBB0_25
LBB0_26:
	ldr	w0, [x27]
	bl	_bus_dma_tag_destroy
LBB0_27:
	ldr	w1, [x19]
	ldr	w2, [x19, #16]
	mov	x0, x20
	bl	_bus_teardown_intr
LBB0_28:
	ldr	w1, [x26]
	ldr	x2, [x19, #8]
	ldr	w3, [x19]
	mov	x0, x20
	bl	_bus_release_resource
LBB0_29:
	mov	x0, x19
	bl	_PS3CDROM_LOCK_DESTROY
LBB0_30:
	mov	x0, x22
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh80
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh79
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGot	Lloh89, Lloh90
	.loh AdrpAdd	Lloh87, Lloh88
	.loh AdrpAdd	Lloh91, Lloh92
	.loh AdrpAdd	Lloh93, Lloh94
	.loh AdrpLdrGotLdr	Lloh95, Lloh96, Lloh97
	.loh AdrpLdrGotLdr	Lloh100, Lloh101, Lloh102
	.loh AdrpAdd	Lloh98, Lloh99
	.loh AdrpLdrGotLdr	Lloh105, Lloh106, Lloh107
	.loh AdrpAdd	Lloh103, Lloh104
	.loh AdrpLdrGotLdr	Lloh108, Lloh109, Lloh110
	.loh AdrpLdrGot	Lloh111, Lloh112
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.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	_ps3cdrom_intr,4,2              ; @ps3cdrom_intr
l_.str.1:                               ; @.str.1
	.asciz	"Could not setup IRQ\n"

	.comm	_BUS_SPACE_MAXADDR,4,2          ; @BUS_SPACE_MAXADDR
	.comm	_BUS_SPACE_UNRESTRICTED,4,2     ; @BUS_SPACE_UNRESTRICTED
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_busdma_lock_mutex,4,2          ; @busdma_lock_mutex
l_.str.2:                               ; @.str.2
	.asciz	"Could not create DMA tag\n"

	.comm	_PS3CDROM_MAX_XFERS,4,2         ; @PS3CDROM_MAX_XFERS
	.comm	_BUS_DMA_COHERENT,4,2           ; @BUS_DMA_COHERENT
l_.str.3:                               ; @.str.3
	.asciz	"Could not create DMA map (%d)\n"

	.comm	_x_queue,4,2                    ; @x_queue
l_.str.4:                               ; @.str.4
	.asciz	"Could not allocate SIM queue\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ps3cdrom_action,4,2            ; @ps3cdrom_action
	.comm	_ps3cdrom_poll,4,2              ; @ps3cdrom_poll
l_.str.5:                               ; @.str.5
	.asciz	"ps3cdrom"

l_.str.6:                               ; @.str.6
	.asciz	"Could not allocate SIM\n"

	.comm	_CAM_SUCCESS,4,2                ; @CAM_SUCCESS
l_.str.7:                               ; @.str.7
	.asciz	"Could not register XPT bus\n"

	.comm	_CAM_TARGET_WILDCARD,4,2        ; @CAM_TARGET_WILDCARD
	.comm	_CAM_LUN_WILDCARD,4,2           ; @CAM_LUN_WILDCARD
	.comm	_CAM_REQ_CMP,4,2                ; @CAM_REQ_CMP
l_.str.8:                               ; @.str.8
	.asciz	"Could not create XPT path\n"

	.comm	_XPT_SASYNC_CB,4,2              ; @XPT_SASYNC_CB
	.comm	_AC_LOST_DEVICE,4,2             ; @AC_LOST_DEVICE
	.comm	_ps3cdrom_async,4,2             ; @ps3cdrom_async
	.comm	_CAM_DEBUG_TRACE,4,2            ; @CAM_DEBUG_TRACE
	.comm	_BUS_PROBE_SPECIFIC,4,2         ; @BUS_PROBE_SPECIFIC
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_ps3cdrom_attach
.subsections_via_symbols
