	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function applesmc_key_at_index_data_length_show
_applesmc_key_at_index_data_length_show: ## @applesmc_key_at_index_data_length_show
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	_applesmc_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_key_at_index@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-21(%rbp), %rsi
	callq	_applesmc_get_key_at_index
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	cmpb	$0, -21(%rbp)
	je	LBB0_2
## %bb.3:
	leaq	-21(%rbp), %rdi
	leaq	-27(%rbp), %rsi
	callq	_applesmc_get_key_type
	movl	%eax, %ebx
	movq	_applesmc_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_5
## %bb.4:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movsbl	-27(%rbp), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_snprintf
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_2:
	movq	_applesmc_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_applesmc_lock,4,2              ## @applesmc_lock
	.comm	_key_at_index,4,2               ## @key_at_index
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d\n"

	.no_dead_strip	_applesmc_key_at_index_data_length_show
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function applesmc_key_at_index_data_length_show
_applesmc_key_at_index_data_length_show: ; @applesmc_key_at_index_data_length_show
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
Lloh0:
	adrp	x0, _applesmc_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _applesmc_lock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh2:
	adrp	x8, _key_at_index@GOTPAGE
Lloh3:
	ldr	x8, [x8, _key_at_index@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x1, sp, #11
	bl	_applesmc_get_key_at_index
	ldrb	w8, [sp, #11]
	cmp	w0, #0
	ccmp	w8, #0, #4, eq
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, _applesmc_lock@GOTPAGE
Lloh6:
	ldr	x0, [x0, _applesmc_lock@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_4
LBB0_2:
	add	x0, sp, #11
	add	x1, sp, #5
	bl	_applesmc_get_key_type
	mov	x20, x0
Lloh10:
	adrp	x0, _applesmc_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _applesmc_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	cbnz	w20, LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldrsb	w3, [sp, #5]
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_snprintf
	mov	x20, x0
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_applesmc_lock,4,2              ; @applesmc_lock
	.comm	_key_at_index,4,2               ; @key_at_index
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d\n"

	.no_dead_strip	_applesmc_key_at_index_data_length_show
.subsections_via_symbols
