	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_read
_handle_read:                           ## @handle_read
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_INITIATORS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	_targ_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	(,%rbx,8), %edx
	movq	%r13, %rsi
	callq	_read
	testl	%eax, %eax
	jle	LBB0_1
## %bb.3:
	cmpl	$8, %eax
	jae	LBB0_4
## %bb.9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_warnx                          ## TAILCALL
LBB0_1:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.2:
	leaq	L_.str(%rip), %rdi
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_warn                           ## TAILCALL
LBB0_4:
	shrl	$3, %eax
	cmpl	$2, %eax
	movl	$1, %r15d
	cmovael	%eax, %r15d
	movq	_periph_links@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %r12
	movq	_CTIO_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movq	%rbx, %rdi
	callq	_queue_io
	movl	(%r12), %edi
	movq	_periph_links@GOTPCREL(%rip), %r12
	callq	_run_queue
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	cmpq	%r14, %r15
	je	LBB0_15
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%r14,8), %rbx
	movl	(%r12), %edx
	movq	_pending_queue@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	movl	(%rbx), %esi
	cmpl	$128, %esi
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$129, %esi
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$130, %esi
	jne	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%rbx), %r12
	movq	%r12, %rdi
	movl	$12, %esi
	callq	_bzero
	leaq	8(%r12), %rdi
	callq	_TAILQ_INIT
	movl	8(%rbx), %eax
	movq	_CAM_TAG_ACTION_VALID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_CAM_DIS_DISCONNECT@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	andl	%eax, %ecx
	movl	%ecx, (%r12)
	xorl	%ecx, %ecx
	movq	_CAM_CDB_POINTER@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	sete	%cl
	movl	(%rbx,%rcx,4), %eax
	movl	%eax, 4(%r12)
	movq	_periph_links@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	_work_queue@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_TAIL
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12), %edx
	movq	_work_queue@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_HEAD
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_14
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_INITIATORS,4,2             ## @MAX_INITIATORS
	.comm	_targ_fd,4,2                    ## @targ_fd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read ccb ptrs"

L_.str.1:                               ## @.str.1
	.asciz	"truncated read ccb ptr?"

	.comm	_pending_queue,4,2              ## @pending_queue
	.comm	_periph_links,4,2               ## @periph_links
	.comm	_CAM_DIS_DISCONNECT,4,2         ## @CAM_DIS_DISCONNECT
	.comm	_CAM_TAG_ACTION_VALID,4,2       ## @CAM_TAG_ACTION_VALID
	.comm	_CAM_CDB_POINTER,4,2            ## @CAM_CDB_POINTER
	.comm	_work_queue,4,2                 ## @work_queue
	.comm	_CTIO_DONE,4,2                  ## @CTIO_DONE
L_.str.2:                               ## @.str.2
	.asciz	"Unhandled ccb type %#x in handle_read"

	.no_dead_strip	_handle_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_read
_handle_read:                           ; @handle_read
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAX_INITIATORS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_INITIATORS@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x8]
	lsl	x8, x12, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh8:
	adrp	x8, _targ_fd@GOTPAGE
Lloh9:
	ldr	x8, [x8, _targ_fd@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	lsl	w2, w12, #3
	mov	x1, x19
	bl	_read
	cmp	w0, #0
	b.le	LBB0_4
; %bb.1:
	cmp	w0, #8
	b.hs	LBB0_6
; %bb.2:
	ldur	x8, [x29, #-88]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.3:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_warnx
LBB0_4:
	ldur	x8, [x29, #-88]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.5:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_warn
LBB0_6:
	lsr	w8, w0, #3
	cmp	w8, #1
	csinc	w25, w8, wzr, hi
Lloh21:
	adrp	x26, _periph_links@GOTPAGE
Lloh22:
	ldr	x26, [x26, _periph_links@GOTPAGEOFF]
Lloh23:
	adrp	x20, _pending_queue@GOTPAGE
Lloh24:
	ldr	x20, [x20, _pending_queue@GOTPAGEOFF]
Lloh25:
	adrp	x21, _work_queue@GOTPAGE
Lloh26:
	ldr	x21, [x21, _work_queue@GOTPAGEOFF]
Lloh27:
	adrp	x27, _CAM_TAG_ACTION_VALID@GOTPAGE
Lloh28:
	ldr	x27, [x27, _CAM_TAG_ACTION_VALID@GOTPAGEOFF]
Lloh29:
	adrp	x22, l_.str.2@PAGE
Lloh30:
	add	x22, x22, l_.str.2@PAGEOFF
Lloh31:
	adrp	x28, _CAM_CDB_POINTER@GOTPAGE
Lloh32:
	ldr	x28, [x28, _CAM_CDB_POINTER@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x24, [x23]
Lloh33:
	adrp	x8, _CTIO_DONE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _CTIO_DONE@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	str	w8, [x24, #4]
	mov	x0, x23
	bl	_queue_io
	ldr	w0, [x24]
	bl	_run_queue
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x19, x19, #8
	subs	x25, x25, #1
	b.eq	LBB0_15
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x19]
	ldr	w2, [x26]
	mov	x0, x20
	mov	x1, x23
	bl	_TAILQ_REMOVE
	ldr	w8, [x23]
	cmp	w8, #128
	b.eq	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w8, #130
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x24, [x23, #16]
	mov	x0, x24
	mov	w1, #12
	bl	_bzero
	add	x0, x24, #8
	bl	_TAILQ_INIT
	ldr	w8, [x23, #8]
Lloh36:
	adrp	x9, _CAM_DIS_DISCONNECT@GOTPAGE
Lloh37:
	ldr	x9, [x9, _CAM_DIS_DISCONNECT@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	ldr	w10, [x27]
	orr	w9, w10, w9
	and	w9, w9, w8
	str	w9, [x24]
	ldr	w9, [x28]
	tst	w9, w8
	cset	w8, eq
	ldr	w8, [x23, w8, uxtw #2]
	str	w8, [x24, #4]
	ldr	w2, [x26]
	mov	x0, x21
	mov	x1, x23
	bl	_TAILQ_INSERT_TAIL
	b	LBB0_8
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w2, [x26]
	mov	x0, x21
	mov	x1, x23
	bl	_TAILQ_INSERT_HEAD
	b	LBB0_8
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=1
	str	x8, [sp, #-16]!
	mov	x0, x22
	bl	_warnx
	add	sp, sp, #16
	b	LBB0_8
LBB0_15:
	ldur	x8, [x29, #-88]
Lloh39:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh40:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_INITIATORS,4,2             ; @MAX_INITIATORS
	.comm	_targ_fd,4,2                    ; @targ_fd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read ccb ptrs"

l_.str.1:                               ; @.str.1
	.asciz	"truncated read ccb ptr?"

	.comm	_pending_queue,4,2              ; @pending_queue
	.comm	_periph_links,4,2               ; @periph_links
	.comm	_CAM_DIS_DISCONNECT,4,2         ; @CAM_DIS_DISCONNECT
	.comm	_CAM_TAG_ACTION_VALID,4,2       ; @CAM_TAG_ACTION_VALID
	.comm	_CAM_CDB_POINTER,4,2            ; @CAM_CDB_POINTER
	.comm	_work_queue,4,2                 ; @work_queue
	.comm	_CTIO_DONE,4,2                  ; @CTIO_DONE
l_.str.2:                               ; @.str.2
	.asciz	"Unhandled ccb type %#x in handle_read"

	.no_dead_strip	_handle_read
.subsections_via_symbols
