	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function applesmc_key_at_index_read_show
_applesmc_key_at_index_read_show:       ## @applesmc_key_at_index_read_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
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movq	_applesmc_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_7
LBB0_2:
	movq	_applesmc_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movsbl	-27(%rbp), %edx
	leaq	-21(%rbp), %rdi
	movq	%r14, %rsi
	callq	_applesmc_read_key
	movl	%eax, %ebx
	movq	_applesmc_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.6:
	movsbl	-27(%rbp), %ebx
	jmp	LBB0_7
	.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
	.no_dead_strip	_applesmc_key_at_index_read_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_read_show
_applesmc_key_at_index_read_show:       ; @applesmc_key_at_index_read_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_6
LBB0_2:
	add	x0, sp, #11
	add	x1, sp, #5
	bl	_applesmc_get_key_type
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
Lloh10:
	adrp	x0, _applesmc_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _applesmc_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	b	LBB0_6
LBB0_4:
	ldrsb	w2, [sp, #5]
	add	x0, sp, #11
	mov	x1, x19
	bl	_applesmc_read_key
	mov	x20, x0
Lloh12:
	adrp	x0, _applesmc_lock@GOTPAGE
Lloh13:
	ldr	x0, [x0, _applesmc_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	cbnz	w20, LBB0_6
; %bb.5:
	ldrsb	w20, [sp, #5]
LBB0_6:
	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 AdrpLdrGot	Lloh12, Lloh13
	.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
	.no_dead_strip	_applesmc_key_at_index_read_show
.subsections_via_symbols
