	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcmd_rd_cap
_tcmd_rd_cap:                           ## @tcmd_rd_cap
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	16(%rsi), %r15
	movq	_volume_size@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	decl	%ebx
	movq	_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	8(%rdi), %rax
	movl	(%rax), %eax
	movl	(%rdi), %edx
	movq	_sector_size@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%ebx, %ecx
	callq	_cdb_debug
LBB0_2:
	movq	%r15, %rdi
	movl	$8, %esi
	callq	_bzero
	movl	4(%r15), %esi
	movl	%ebx, %edi
	callq	_scsi_ulto4b
	movq	_sector_size@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	callq	_scsi_ulto4b
	movl	$8, (%r14)
	movq	_CAM_DIR_IN@GOTPCREL(%rip), %rax
	movq	_CAM_SEND_STATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, 8(%r14)
	movq	_SCSI_STATUS_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_volume_size,4,2                ## @volume_size
	.comm	_debug,8,3                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"READ CAP from %u (%u, %u): "

	.comm	_sector_size,4,2                ## @sector_size
	.comm	_CAM_DIR_IN,4,2                 ## @CAM_DIR_IN
	.comm	_CAM_SEND_STATUS,4,2            ## @CAM_SEND_STATUS
	.comm	_SCSI_STATUS_OK,4,2             ## @SCSI_STATUS_OK
	.no_dead_strip	_tcmd_rd_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tcmd_rd_cap
_tcmd_rd_cap:                           ; @tcmd_rd_cap
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	ldr	x20, [x1, #16]
Lloh0:
	adrp	x8, _volume_size@GOTPAGE
Lloh1:
	ldr	x8, [x8, _volume_size@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w21, w8, #1
Lloh3:
	adrp	x8, _debug@GOTPAGE
Lloh4:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x22, _sector_size@GOTPAGE
Lloh7:
	ldr	x22, [x22, _sector_size@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	ldr	w2, [x0]
	ldr	w4, [x22]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	mov	x3, x21
	bl	_cdb_debug
LBB0_2:
	mov	w23, #8
	mov	x0, x20
	mov	w1, #8
	bl	_bzero
	ldr	w1, [x20, #4]
	mov	x0, x21
	bl	_scsi_ulto4b
	ldr	w0, [x22]
	ldr	w1, [x20]
	bl	_scsi_ulto4b
	str	w23, [x19]
Lloh10:
	adrp	x8, _CAM_DIR_IN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CAM_DIR_IN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _CAM_SEND_STATUS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CAM_SEND_STATUS@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19, #8]
	orr	w8, w8, w9
Lloh16:
	adrp	x9, _SCSI_STATUS_OK@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SCSI_STATUS_OK@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #4]
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_volume_size,4,2                ; @volume_size
	.comm	_debug,8,3                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"READ CAP from %u (%u, %u): "

	.comm	_sector_size,4,2                ; @sector_size
	.comm	_CAM_DIR_IN,4,2                 ; @CAM_DIR_IN
	.comm	_CAM_SEND_STATUS,4,2            ; @CAM_SEND_STATUS
	.comm	_SCSI_STATUS_OK,4,2             ; @SCSI_STATUS_OK
	.no_dead_strip	_tcmd_rd_cap
.subsections_via_symbols
