	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdb_sqlite_fetch_kvno
_hdb_sqlite_fetch_kvno:                 ## @hdb_sqlite_fetch_kvno
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	movl	%edi, %r12d
	movq	8(%rsi), %r15
	movq	8(%r15), %r14
	leaq	-56(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdx
	callq	_krb5_unparse_name
	movq	-56(%rbp), %rdx
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %r13
	jmp	LBB0_15
LBB0_2:
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	_SQLITE_STATIC@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$-1, %ecx
	callq	_sqlite3_bind_text
	movl	(%r15), %esi
	movl	%r12d, %edi
	movq	%r14, %rdx
	callq	_hdb_sqlite_step
	movq	_SQLITE_ROW@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_8
## %bb.3:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_sqlite3_column_bytes
	movl	%eax, -80(%rbp)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_sqlite3_column_blob
	movq	%rax, -88(%rbp)
	leaq	-88(%rbp), %rsi
	movl	%r12d, %edi
	movq	%r13, %r15
	movq	%r13, %rdx
	callq	_hdb_value2entry
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_14
## %bb.4:
	cmpq	$0, (%rbx)
	je	LBB0_13
## %bb.5:
	movq	_HDB_F_DECRYPT@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_13
## %bb.6:
	movq	%rbx, %rsi
	movl	%r12d, %edi
	movq	%r15, %rdx
	callq	_hdb_unseal_keys
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:
	movq	%rax, %r13
	movl	%r12d, %edi
	movq	%r15, %rsi
	callq	_hdb_free_entry
	jmp	LBB0_14
LBB0_8:
	movq	_SQLITE_DONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.9:
	movq	_HDB_ERR_NOENTRY@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	jmp	LBB0_14
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
	leaq	L_.str(%rip), %rdx
	movl	%r12d, %edi
	movq	%r13, %rsi
	movl	%eax, %ecx
	callq	_krb5_set_error_message
	jmp	LBB0_14
LBB0_13:
	xorl	%r13d, %r13d
LBB0_14:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_sqlite3_clear_bindings
	movq	%rbx, %rdi
	callq	_sqlite3_reset
	movq	-56(%rbp), %rdx
LBB0_15:
	movq	%rdx, %rdi
	callq	_free
	movq	%r13, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_STATIC,4,2              ## @SQLITE_STATIC
	.comm	_SQLITE_ROW,4,2                 ## @SQLITE_ROW
	.comm	_SQLITE_DONE,4,2                ## @SQLITE_DONE
	.comm	_HDB_ERR_NOENTRY,8,3            ## @HDB_ERR_NOENTRY
	.comm	_EINVAL,8,3                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sqlite fetch failed: %d"

	.comm	_HDB_F_DECRYPT,4,2              ## @HDB_F_DECRYPT
	.no_dead_strip	_hdb_sqlite_fetch_kvno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdb_sqlite_fetch_kvno
_hdb_sqlite_fetch_kvno:                 ; @hdb_sqlite_fetch_kvno
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x5
	mov	x23, x3
	mov	x8, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x25, [x1, #8]
	ldr	x19, [x25, #8]
	add	x2, sp, #24
	mov	x1, x8
	bl	_krb5_unparse_name
	ldr	x2, [sp, #24]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x24, x0
	b	LBB0_13
LBB0_2:
Lloh0:
	adrp	x8, _SQLITE_STATIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_STATIC@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x0, x19
	mov	w1, #1
	mov	w3, #-1
	bl	_sqlite3_bind_text
	ldr	w1, [x25]
	mov	x0, x20
	mov	x2, x19
	bl	_hdb_sqlite_step
Lloh3:
	adrp	x8, _SQLITE_ROW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SQLITE_ROW@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.3:
	mov	x0, x19
	mov	w1, #0
	bl	_sqlite3_column_bytes
	str	w0, [sp, #16]
	mov	x0, x19
	mov	w1, #0
	bl	_sqlite3_column_blob
	str	x0, [sp, #8]
	add	x1, sp, #8
	mov	x0, x20
	mov	x2, x21
	bl	_hdb_value2entry
	mov	x24, x0
	cbnz	x0, LBB0_12
; %bb.4:
	ldr	x8, [x22]
	cbz	x8, LBB0_11
; %bb.5:
Lloh6:
	adrp	x8, _HDB_F_DECRYPT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HDB_F_DECRYPT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_11
; %bb.6:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_hdb_unseal_keys
	mov	x24, x0
	cbz	x0, LBB0_12
; %bb.7:
	mov	x0, x20
	mov	x1, x21
	bl	_hdb_free_entry
	b	LBB0_12
LBB0_8:
	mov	x3, x0
Lloh9:
	adrp	x8, _SQLITE_DONE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SQLITE_DONE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.9:
Lloh12:
	adrp	x8, _HDB_ERR_NOENTRY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HDB_ERR_NOENTRY@GOTPAGEOFF]
Lloh14:
	ldr	x24, [x8]
	b	LBB0_12
LBB0_10:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	x24, [x8]
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x24
	bl	_krb5_set_error_message
	b	LBB0_12
LBB0_11:
	mov	x24, #0
LBB0_12:
	mov	x0, x19
	bl	_sqlite3_clear_bindings
	mov	x0, x19
	bl	_sqlite3_reset
	ldr	x2, [sp, #24]
LBB0_13:
	mov	x0, x2
	bl	_free
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_STATIC,4,2              ; @SQLITE_STATIC
	.comm	_SQLITE_ROW,4,2                 ; @SQLITE_ROW
	.comm	_SQLITE_DONE,4,2                ; @SQLITE_DONE
	.comm	_HDB_ERR_NOENTRY,8,3            ; @HDB_ERR_NOENTRY
	.comm	_EINVAL,8,3                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sqlite fetch failed: %d"

	.comm	_HDB_F_DECRYPT,4,2              ; @HDB_F_DECRYPT
	.no_dead_strip	_hdb_sqlite_fetch_kvno
.subsections_via_symbols
