	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_scsiop_read_cap
_ata_scsiop_read_cap:                   ## @ata_scsiop_read_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	%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, %r12
	movq	16(%rdi), %r14
	movl	(%r14), %eax
	movl	4(%r14), %edi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leal	-1(%rax), %r13d
	callq	_ata_id_logical_sector_size
	movl	%eax, %r15d
	movl	4(%r14), %edi
	callq	_ata_id_log2_per_physical_sector
	movl	4(%r14), %edi
	movl	%eax, %r14d
	movl	%eax, %esi
	callq	_ata_id_logical_sector_offset
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	L_.str(%rip), %rdi
	callq	_VPRINTK
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_READ_CAPACITY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	movl	$-1, %eax
	cmovlel	%eax, %r13d
	movl	%r13d, %eax
	sarl	$24, %eax
	movl	%eax, (%rbx)
	movl	%r13d, %eax
	sarl	$16, %eax
	movl	%eax, 4(%rbx)
	movl	%r13d, %eax
	sarl	$8, %eax
	movl	%eax, 8(%rbx)
	movl	%r13d, 12(%rbx)
	movl	%r15d, %eax
	sarl	$24, %eax
	movl	%eax, 16(%rbx)
	movl	%r15d, %eax
	sarl	$16, %eax
	movl	%eax, 20(%rbx)
	movl	%r15d, %eax
	sarl	$8, %eax
	movl	%eax, 24(%rbx)
	movl	%r15d, 28(%rbx)
	jmp	LBB0_5
LBB0_2:
	movl	%r13d, %eax
	sarl	$24, %eax
	movl	%eax, 16(%rbx)
	movl	%r13d, %eax
	sarl	$16, %eax
	movl	%eax, 20(%rbx)
	movl	%r13d, %eax
	sarl	$8, %eax
	movl	%eax, 24(%rbx)
	movl	%r13d, 28(%rbx)
	movl	%r15d, %eax
	sarl	$24, %eax
	movl	%eax, 32(%rbx)
	movl	%r15d, %eax
	sarl	$16, %eax
	movl	%eax, 36(%rbx)
	movl	%r15d, %eax
	sarl	$8, %eax
	movl	%eax, 40(%rbx)
	movl	%r15d, 44(%rbx)
	movl	$0, 48(%rbx)
	movl	%r14d, 52(%rbx)
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %eax
	shrl	$8, %eax
	andl	$63, %eax
	movl	%eax, 56(%rbx)
	movl	%ecx, 60(%rbx)
	movl	(%r12), %edi
	callq	_ata_id_has_trim
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	orb	$-128, 56(%rbx)
	movl	(%r12), %edi
	callq	_ata_id_has_zero_after_trim
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	orb	$64, 56(%rbx)
LBB0_5:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ENTER\n"

	.comm	_READ_CAPACITY,8,3              ## @READ_CAPACITY
	.no_dead_strip	_ata_scsiop_read_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ata_scsiop_read_cap
lCPI0_0:
	.long	4294967272                      ; 0xffffffe8
	.long	4294967280                      ; 0xfffffff0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ata_scsiop_read_cap:                   ; @ata_scsiop_read_cap
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	ldr	x23, [x0, #16]
	ldp	w25, w0, [x23]
	sub	w24, w25, #1
	bl	_ata_id_logical_sector_size
	mov	x21, x0
	ldr	w0, [x23, #4]
	bl	_ata_id_log2_per_physical_sector
	mov	x22, x0
	ldr	w0, [x23, #4]
	mov	x1, x22
	bl	_ata_id_logical_sector_offset
	mov	x23, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_VPRINTK
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh2:
	adrp	x9, _READ_CAPACITY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _READ_CAPACITY@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	cmp	w25, #1
	csinv	w8, w24, wzr, ge
	dup.2s	v0, w8
Lloh5:
	adrp	x9, lCPI0_0@PAGE
Lloh6:
	ldr	d1, [x9, lCPI0_0@PAGEOFF]
	sshl.2s	v0, v0, v1
	str	d0, [x19]
	asr	w9, w8, #8
	dup.2s	v0, w21
	stp	w9, w8, [x19, #8]
	sshl.2s	v0, v0, v1
	str	d0, [x19, #16]
	asr	w8, w21, #8
	stp	w8, w21, [x19, #24]
	b	LBB0_5
LBB0_2:
	dup.2s	v0, w24
Lloh7:
	adrp	x8, lCPI0_0@PAGE
Lloh8:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
	sshl.2s	v0, v0, v1
	str	d0, [x19, #16]
	asr	w8, w24, #8
	dup.2s	v0, w21
	stp	w8, w24, [x19, #24]
	sshl.2s	v0, v0, v1
	str	d0, [x19, #32]
	asr	w8, w21, #8
	stp	w8, w21, [x19, #40]
	stp	wzr, w22, [x19, #48]
	ubfx	w8, w23, #8, #6
	stp	w8, w23, [x19, #56]
	ldr	w0, [x20]
	bl	_ata_id_has_trim
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w8, [x19, #56]
	orr	w8, w8, #0x80
	str	w8, [x19, #56]
	ldr	w0, [x20]
	bl	_ata_id_has_zero_after_trim
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w8, [x19, #56]
	orr	w8, w8, #0x40
	str	w8, [x19, #56]
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpLdr	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ENTER\n"

	.comm	_READ_CAPACITY,8,3              ; @READ_CAPACITY
	.no_dead_strip	_ata_scsiop_read_cap
.subsections_via_symbols
