	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtip_get_smart_attr
_mtip_get_smart_attr:                   ## @mtip_get_smart_attr
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdx, %rdx
	je	LBB0_69
## %bb.1:
	movq	%rdi, %r12
	cmpl	$0, 28(%rdi)
	je	LBB0_2
## %bb.4:
	movq	(%r12), %rax
	testb	$1, 328(%rax)
	jne	LBB0_6
## %bb.5:
	movq	8(%r12), %rax
	movq	(%rax), %rdi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_2:
	movq	8(%r12), %rax
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_6:
	testb	$1, 340(%rax)
	jne	LBB0_8
## %bb.7:
	movq	8(%r12), %rax
	movq	(%rax), %rdi
	leaq	L_.str.2(%rip), %rsi
LBB0_3:
	callq	_dev_warn
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_70
LBB0_8:
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	16(%r12), %rdi
	movq	_ATA_SECT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
	movq	16(%r12), %rsi
	movl	24(%r12), %edx
	movq	%r12, %rdi
	callq	_mtip_get_smart_data
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	movq	8(%r12), %rax
	movq	(%rax), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_71
LBB0_10:
	movq	16(%r12), %rax
	leaq	2(%rax), %rsi
	cmpl	%r15d, 2(%rax)
	je	LBB0_11
## %bb.12:
	cmpl	%r15d, 4(%rsi)
	jne	LBB0_14
## %bb.13:
	addq	$4, %rsi
	jmp	LBB0_11
LBB0_14:
	cmpl	%r15d, 8(%rsi)
	jne	LBB0_16
## %bb.15:
	addq	$8, %rsi
	jmp	LBB0_11
LBB0_16:
	cmpl	%r15d, 12(%rsi)
	jne	LBB0_18
## %bb.17:
	addq	$12, %rsi
	jmp	LBB0_11
LBB0_18:
	cmpl	%r15d, 16(%rsi)
	jne	LBB0_20
## %bb.19:
	addq	$16, %rsi
	jmp	LBB0_11
LBB0_20:
	cmpl	%r15d, 20(%rsi)
	jne	LBB0_22
## %bb.21:
	addq	$20, %rsi
	jmp	LBB0_11
LBB0_22:
	cmpl	%r15d, 24(%rsi)
	jne	LBB0_24
## %bb.23:
	addq	$24, %rsi
	jmp	LBB0_11
LBB0_24:
	cmpl	%r15d, 28(%rsi)
	jne	LBB0_26
## %bb.25:
	addq	$28, %rsi
	jmp	LBB0_11
LBB0_26:
	cmpl	%r15d, 32(%rsi)
	jne	LBB0_28
## %bb.27:
	addq	$32, %rsi
	jmp	LBB0_11
LBB0_28:
	cmpl	%r15d, 36(%rsi)
	jne	LBB0_30
## %bb.29:
	addq	$36, %rsi
	jmp	LBB0_11
LBB0_30:
	cmpl	%r15d, 40(%rsi)
	jne	LBB0_32
## %bb.31:
	addq	$40, %rsi
	jmp	LBB0_11
LBB0_32:
	cmpl	%r15d, 44(%rsi)
	jne	LBB0_34
## %bb.33:
	addq	$44, %rsi
	jmp	LBB0_11
LBB0_34:
	cmpl	%r15d, 48(%rsi)
	jne	LBB0_36
## %bb.35:
	addq	$48, %rsi
	jmp	LBB0_11
LBB0_36:
	cmpl	%r15d, 52(%rsi)
	jne	LBB0_38
## %bb.37:
	addq	$52, %rsi
	jmp	LBB0_11
LBB0_38:
	cmpl	%r15d, 56(%rsi)
	jne	LBB0_40
## %bb.39:
	addq	$56, %rsi
	jmp	LBB0_11
LBB0_40:
	cmpl	%r15d, 60(%rsi)
	jne	LBB0_42
## %bb.41:
	addq	$60, %rsi
	jmp	LBB0_11
LBB0_42:
	cmpl	%r15d, 64(%rsi)
	jne	LBB0_44
## %bb.43:
	addq	$64, %rsi
	jmp	LBB0_11
LBB0_44:
	cmpl	%r15d, 68(%rsi)
	jne	LBB0_46
## %bb.45:
	addq	$68, %rsi
	jmp	LBB0_11
LBB0_46:
	cmpl	%r15d, 72(%rsi)
	jne	LBB0_48
## %bb.47:
	addq	$72, %rsi
	jmp	LBB0_11
LBB0_48:
	cmpl	%r15d, 76(%rsi)
	jne	LBB0_50
## %bb.49:
	addq	$76, %rsi
	jmp	LBB0_11
LBB0_50:
	cmpl	%r15d, 80(%rsi)
	jne	LBB0_52
## %bb.51:
	addq	$80, %rsi
	jmp	LBB0_11
LBB0_52:
	cmpl	%r15d, 84(%rsi)
	jne	LBB0_54
## %bb.53:
	addq	$84, %rsi
	jmp	LBB0_11
LBB0_54:
	cmpl	%r15d, 88(%rsi)
	jne	LBB0_56
## %bb.55:
	addq	$88, %rsi
	jmp	LBB0_11
LBB0_56:
	cmpl	%r15d, 92(%rsi)
	jne	LBB0_58
## %bb.57:
	addq	$92, %rsi
	jmp	LBB0_11
LBB0_58:
	cmpl	%r15d, 96(%rsi)
	jne	LBB0_60
## %bb.59:
	addq	$96, %rsi
	jmp	LBB0_11
LBB0_60:
	cmpl	%r15d, 100(%rsi)
	jne	LBB0_62
## %bb.61:
	addq	$100, %rsi
	jmp	LBB0_11
LBB0_62:
	cmpl	%r15d, 104(%rsi)
	jne	LBB0_64
## %bb.63:
	addq	$104, %rsi
	jmp	LBB0_11
LBB0_64:
	cmpl	%r15d, 108(%rsi)
	jne	LBB0_66
## %bb.65:
	addq	$108, %rsi
	jmp	LBB0_11
LBB0_66:
	cmpl	%r15d, 112(%rsi)
	jne	LBB0_68
## %bb.67:
	addq	$112, %rsi
LBB0_11:
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_memcpy
	xorl	%ebx, %ebx
	jmp	LBB0_71
LBB0_68:
	movq	8(%r12), %rax
	movq	(%rax), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_warn
LBB0_69:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_70:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_71:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IDENTIFY DATA not valid\n"

	.comm	_EPERM,4,2                      ## @EPERM
L_.str.1:                               ## @.str.1
	.asciz	"SMART not supported\n"

L_.str.2:                               ## @.str.2
	.asciz	"SMART not enabled\n"

	.comm	_ATA_SECT_SIZE,4,2              ## @ATA_SECT_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"Failed to ge SMART data\n"

L_.str.4:                               ## @.str.4
	.asciz	"Query for invalid SMART attribute ID\n"

	.no_dead_strip	_mtip_get_smart_attr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtip_get_smart_attr
_mtip_get_smart_attr:                   ; @mtip_get_smart_attr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x2, LBB0_42
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0, #28]
	cbz	w8, LBB0_4
; %bb.2:
	ldr	x8, [x20]
	ldrb	w9, [x8, #328]
	tbnz	w9, #0, LBB0_5
; %bb.3:
	ldr	x8, [x20, #8]
	ldr	x0, [x8]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_4:
	ldr	x8, [x20, #8]
	ldr	x0, [x8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldrb	w8, [x8, #340]
	tbnz	w8, #0, LBB0_8
; %bb.6:
	ldr	x8, [x20, #8]
	ldr	x0, [x8]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	bl	_dev_warn
Lloh6:
	adrp	x8, _EPERM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_43
LBB0_8:
	mov	x19, x2
	mov	x21, x1
	ldr	x0, [x20, #16]
Lloh8:
	adrp	x8, _ATA_SECT_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATA_SECT_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	ldr	x1, [x20, #16]
	ldr	w2, [x20, #24]
	mov	x0, x20
	bl	_mtip_get_smart_data
	cbz	w0, LBB0_10
; %bb.9:
	mov	x22, x0
	ldr	x8, [x20, #8]
	ldr	x0, [x8]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_warn
	b	LBB0_44
LBB0_10:
	ldr	x1, [x20, #16]
	ldr	w8, [x1, #2]!
	cmp	w8, w21
	b.eq	LBB0_39
; %bb.11:
	mov	x8, x1
	ldr	w9, [x8, #4]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.12:
	mov	x8, x1
	ldr	w9, [x8, #8]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.13:
	mov	x8, x1
	ldr	w9, [x8, #12]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.14:
	mov	x8, x1
	ldr	w9, [x8, #16]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.15:
	mov	x8, x1
	ldr	w9, [x8, #20]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.16:
	mov	x8, x1
	ldr	w9, [x8, #24]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.17:
	mov	x8, x1
	ldr	w9, [x8, #28]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.18:
	mov	x8, x1
	ldr	w9, [x8, #32]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.19:
	mov	x8, x1
	ldr	w9, [x8, #36]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.20:
	mov	x8, x1
	ldr	w9, [x8, #40]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.21:
	mov	x8, x1
	ldr	w9, [x8, #44]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.22:
	mov	x8, x1
	ldr	w9, [x8, #48]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.23:
	mov	x8, x1
	ldr	w9, [x8, #52]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.24:
	mov	x8, x1
	ldr	w9, [x8, #56]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.25:
	mov	x8, x1
	ldr	w9, [x8, #60]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.26:
	mov	x8, x1
	ldr	w9, [x8, #64]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.27:
	mov	x8, x1
	ldr	w9, [x8, #68]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.28:
	mov	x8, x1
	ldr	w9, [x8, #72]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.29:
	mov	x8, x1
	ldr	w9, [x8, #76]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.30:
	mov	x8, x1
	ldr	w9, [x8, #80]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.31:
	mov	x8, x1
	ldr	w9, [x8, #84]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.32:
	mov	x8, x1
	ldr	w9, [x8, #88]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.33:
	mov	x8, x1
	ldr	w9, [x8, #92]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.34:
	mov	x8, x1
	ldr	w9, [x8, #96]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.35:
	mov	x8, x1
	ldr	w9, [x8, #100]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.36:
	mov	x8, x1
	ldr	w9, [x8, #104]!
	cmp	w9, w21
	b.eq	LBB0_38
; %bb.37:
	mov	x8, x1
	ldr	w9, [x8, #108]!
	cmp	w9, w21
	b.ne	LBB0_40
LBB0_38:
	mov	x1, x8
LBB0_39:
	mov	x0, x19
	mov	w2, #4
	bl	_memcpy
	mov	w22, #0
	b	LBB0_44
LBB0_40:
	ldr	w8, [x1, #112]!
	cmp	w8, w21
	b.eq	LBB0_39
; %bb.41:
	ldr	x8, [x20, #8]
	ldr	x0, [x8]
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_warn
LBB0_42:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_43:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_44:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IDENTIFY DATA not valid\n"

	.comm	_EPERM,4,2                      ; @EPERM
l_.str.1:                               ; @.str.1
	.asciz	"SMART not supported\n"

l_.str.2:                               ; @.str.2
	.asciz	"SMART not enabled\n"

	.comm	_ATA_SECT_SIZE,4,2              ; @ATA_SECT_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"Failed to ge SMART data\n"

l_.str.4:                               ; @.str.4
	.asciz	"Query for invalid SMART attribute ID\n"

	.no_dead_strip	_mtip_get_smart_attr
.subsections_via_symbols
