	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fetch_scsi_capacity
_fetch_scsi_capacity:                   ## @fetch_scsi_capacity
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_cam_getccb
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_CCB_CLEAR_ALL_EXCEPT_HDR
	movq	_MSG_SIMPLE_Q_TAG@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	_SSD_FULL_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %r9d
	subq	$8, %rsp
	leaq	-48(%rbp), %r8
	movq	%r12, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	pushq	$5000                           ## imm = 0x1388
	callq	_scsi_read_capacity
	addq	$16, %rsp
	movq	_CAM_DEV_QFRZDIS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	orl	%eax, 4(%r12)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_cam_send_ccb
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movq	_CAM_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r12), %eax
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.6:
	movl	-48(%rbp), %edi
	callq	_scsi_4btoul
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.7:
	movl	-48(%rbp), %edi
	callq	_scsi_4btoul
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	%r12, %rdi
	callq	_cam_freeccb
LBB0_12:
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_13
LBB0_5:
	movq	%r12, %rdi
	callq	_cam_freeccb
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_13
LBB0_8:
	movq	%r12, %rdi
	callq	_CCB_CLEAR_ALL_EXCEPT_HDR
	movl	(%r13), %ecx
	movl	(%r14), %eax
	subq	$8, %rsp
	leaq	-56(%rbp), %r10
	movq	%r12, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$5000                           ## imm = 0x1388
	pushq	%rax
	pushq	$4
	pushq	%r10
	pushq	$0
	callq	_scsi_read_capacity_16
	addq	$48, %rsp
	movl	(%rbx), %eax
	orl	%eax, 4(%r12)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_cam_send_ccb
	testq	%rax, %rax
	js	LBB0_3
## %bb.9:
	movq	_CAM_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	andl	(%r12), %r14d
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r12, %rdi
	callq	_cam_freeccb
	cmpl	%r15d, %r14d
	jne	LBB0_10
## %bb.11:
	movl	-56(%rbp), %edi
	callq	_scsi_8btou64
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_12
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r12, %rdi
	callq	_cam_freeccb
LBB0_13:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MSG_SIMPLE_Q_TAG,4,2           ## @MSG_SIMPLE_Q_TAG
	.comm	_SSD_FULL_SIZE,4,2              ## @SSD_FULL_SIZE
	.comm	_CAM_DEV_QFRZDIS,4,2            ## @CAM_DEV_QFRZDIS
	.comm	_errno,4,2                      ## @errno
	.comm	_CAM_STATUS_MASK,4,2            ## @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ## @CAM_REQ_CMP
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_fetch_scsi_capacity
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fetch_scsi_capacity
_fetch_scsi_capacity:                   ; @fetch_scsi_capacity
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_cam_getccb
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	bl	_CCB_CLEAR_ALL_EXCEPT_HDR
Lloh0:
	adrp	x25, _MSG_SIMPLE_Q_TAG@GOTPAGE
Lloh1:
	ldr	x25, [x25, _MSG_SIMPLE_Q_TAG@GOTPAGEOFF]
	ldr	w3, [x25]
Lloh2:
	adrp	x26, _SSD_FULL_SIZE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _SSD_FULL_SIZE@GOTPAGEOFF]
	ldr	w5, [x26]
	add	x4, sp, #24
	mov	x0, x20
	mov	w1, #1
	mov	x2, #0
	mov	w6, #5000
	bl	_scsi_read_capacity
Lloh4:
	adrp	x22, _CAM_DEV_QFRZDIS@GOTPAGE
Lloh5:
	ldr	x22, [x22, _CAM_DEV_QFRZDIS@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	mov	x0, x21
	mov	x1, x20
	bl	_cam_send_ccb
	tbnz	x0, #63, LBB0_11
; %bb.2:
	ldr	w8, [x20]
Lloh6:
	adrp	x23, _CAM_STATUS_MASK@GOTPAGE
Lloh7:
	ldr	x23, [x23, _CAM_STATUS_MASK@GOTPAGEOFF]
	ldr	w9, [x23]
	and	w8, w9, w8
Lloh8:
	adrp	x24, _CAM_REQ_CMP@GOTPAGE
Lloh9:
	ldr	x24, [x24, _CAM_REQ_CMP@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.3:
	ldr	w0, [sp, #24]
	bl	_scsi_4btoul
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.4:
	ldr	w0, [sp, #24]
	bl	_scsi_4btoul
	str	w0, [x19]
	mov	x0, x20
	bl	_cam_freeccb
	mov	w21, #0
	b	LBB0_12
LBB0_5:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w21, [x8]
	b	LBB0_12
LBB0_6:
	mov	x0, x20
	bl	_cam_freeccb
LBB0_7:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w21, [x8]
	b	LBB0_12
LBB0_8:
	mov	x0, x20
	bl	_CCB_CLEAR_ALL_EXCEPT_HDR
	ldr	w3, [x25]
	ldr	w8, [x26]
	mov	w9, #5000
	stp	w8, w9, [sp, #4]
	mov	w9, #4
	str	w9, [sp]
	add	x7, sp, #16
	mov	x0, x20
	mov	w1, #1
	mov	x2, #0
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_scsi_read_capacity_16
	ldr	w8, [x22]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	mov	x0, x21
	mov	x1, x20
	bl	_cam_send_ccb
	tbnz	x0, #63, LBB0_11
; %bb.9:
	ldr	w8, [x20]
	ldr	w9, [x23]
	and	w21, w9, w8
	ldr	w22, [x24]
	mov	x0, x20
	bl	_cam_freeccb
	cmp	w21, w22
	b.ne	LBB0_7
; %bb.10:
	ldr	w0, [sp, #16]
	bl	_scsi_8btou64
	mov	w21, #0
	str	w0, [x19]
	b	LBB0_12
LBB0_11:
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_cam_freeccb
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MSG_SIMPLE_Q_TAG,4,2           ; @MSG_SIMPLE_Q_TAG
	.comm	_SSD_FULL_SIZE,4,2              ; @SSD_FULL_SIZE
	.comm	_CAM_DEV_QFRZDIS,4,2            ; @CAM_DEV_QFRZDIS
	.comm	_errno,4,2                      ; @errno
	.comm	_CAM_STATUS_MASK,4,2            ; @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ; @CAM_REQ_CMP
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_fetch_scsi_capacity
.subsections_via_symbols
