	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kadm5_s_chpass_principal_with_key ## -- Begin function kadm5_s_chpass_principal_with_key
	.p2align	4, 0x90
_kadm5_s_chpass_principal_with_key:     ## @kadm5_s_chpass_principal_with_key
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	leaq	-40(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	(%rbx), %rsi
	movl	8(%rbx), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	*(%rsi)
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	movq	(%rbx), %rsi
	movl	8(%rbx), %edi
	movq	_HDB_F_GET_ANY@GOTPCREL(%rip), %rax
	movq	_HDB_F_ADMIN_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	orl	(%rax), %r8d
	leaq	-40(%rbp), %r9
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	callq	*8(%rsi)
	movq	%rax, %r12
	movq	_HDB_ERR_NOENTRY@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	je	LBB0_9
## %bb.2:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	movq	%r14, %rcx
	callq	__kadm5_set_keys2
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_8
## %bb.3:
	incl	-40(%rbp)
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	__kadm5_set_modifier
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_8
## %bb.4:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	__kadm5_bump_pw_expire
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movl	8(%rbx), %edi
	movq	(%rbx), %rsi
	leaq	-40(%rbp), %rdx
	callq	_hdb_seal_keys
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	(%rbx), %rsi
	movl	8(%rbx), %edi
	movq	_HDB_F_REPLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %rcx
	callq	*16(%rsi)
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	_KADM5_PRINCIPAL@GOTPCREL(%rip), %rax
	movq	_KADM5_MOD_NAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_KADM5_MOD_TIME@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_KADM5_KEY_DATA@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_KADM5_KVNO@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_KADM5_PW_EXPIRATION@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_KADM5_TL_DATA@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_kadm5_log_modify
	xorl	%r12d, %r12d
LBB0_8:
	movl	8(%rbx), %edi
	leaq	-40(%rbp), %rsi
	callq	_hdb_free_entry
LBB0_9:
	movq	(%rbx), %rsi
	movl	8(%rbx), %edi
	callq	*24(%rsi)
	movq	%r12, %rdi
	callq	__kadm5_error_code
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_HDB_F_GET_ANY,4,2              ## @HDB_F_GET_ANY
	.comm	_HDB_F_ADMIN_DATA,4,2           ## @HDB_F_ADMIN_DATA
	.comm	_HDB_ERR_NOENTRY,8,3            ## @HDB_ERR_NOENTRY
	.comm	_HDB_F_REPLACE,4,2              ## @HDB_F_REPLACE
	.comm	_KADM5_PRINCIPAL,4,2            ## @KADM5_PRINCIPAL
	.comm	_KADM5_MOD_NAME,4,2             ## @KADM5_MOD_NAME
	.comm	_KADM5_MOD_TIME,4,2             ## @KADM5_MOD_TIME
	.comm	_KADM5_KEY_DATA,4,2             ## @KADM5_KEY_DATA
	.comm	_KADM5_KVNO,4,2                 ## @KADM5_KVNO
	.comm	_KADM5_PW_EXPIRATION,4,2        ## @KADM5_PW_EXPIRATION
	.comm	_KADM5_TL_DATA,4,2              ## @KADM5_TL_DATA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kadm5_s_chpass_principal_with_key ; -- Begin function kadm5_s_chpass_principal_with_key
	.p2align	2
_kadm5_s_chpass_principal_with_key:     ; @kadm5_s_chpass_principal_with_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x1, [x19]
	ldr	x8, [x1]
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x9]
	mov	w3, #0
	blr	x8
	cbnz	x0, LBB0_10
; %bb.1:
	ldr	x1, [x19]
	ldr	x8, [x1, #8]
Lloh3:
	adrp	x9, _HDB_F_GET_ANY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HDB_F_GET_ANY@GOTPAGEOFF]
	ldr	w0, [x19, #8]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _HDB_F_ADMIN_DATA@GOTPAGE
Lloh7:
	ldr	x10, [x10, _HDB_F_ADMIN_DATA@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w4, w10, w9
	add	x5, sp, #8
	mov	x2, x22
	mov	w3, #0
	blr	x8
	mov	x22, x0
Lloh9:
	adrp	x8, _HDB_ERR_NOENTRY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HDB_ERR_NOENTRY@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.2:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	__kadm5_set_keys2
	mov	x22, x0
	cbnz	x0, LBB0_8
; %bb.3:
	ldr	w8, [sp, #8]
	add	w8, w8, #1
	str	w8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	__kadm5_set_modifier
	mov	x22, x0
	cbnz	x0, LBB0_8
; %bb.4:
	add	x1, sp, #8
	mov	x0, x19
	bl	__kadm5_bump_pw_expire
	mov	x22, x0
	cbnz	x0, LBB0_8
; %bb.5:
	ldr	w0, [x19, #8]
	ldr	x1, [x19]
	add	x2, sp, #8
	bl	_hdb_seal_keys
	mov	x22, x0
	cbnz	x0, LBB0_8
; %bb.6:
	ldr	x1, [x19]
	ldr	x8, [x1, #16]
	ldr	w0, [x19, #8]
Lloh12:
	adrp	x9, _HDB_F_REPLACE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _HDB_F_REPLACE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x9]
	add	x3, sp, #8
	blr	x8
	mov	x22, x0
	cbnz	x0, LBB0_8
; %bb.7:
Lloh15:
	adrp	x8, _KADM5_PRINCIPAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KADM5_PRINCIPAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _KADM5_MOD_NAME@GOTPAGE
Lloh19:
	ldr	x9, [x9, _KADM5_MOD_NAME@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh21:
	adrp	x9, _KADM5_MOD_TIME@GOTPAGE
Lloh22:
	ldr	x9, [x9, _KADM5_MOD_TIME@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh24:
	adrp	x9, _KADM5_KEY_DATA@GOTPAGE
Lloh25:
	ldr	x9, [x9, _KADM5_KEY_DATA@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh27:
	adrp	x9, _KADM5_KVNO@GOTPAGE
Lloh28:
	ldr	x9, [x9, _KADM5_KVNO@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh30:
	adrp	x9, _KADM5_PW_EXPIRATION@GOTPAGE
Lloh31:
	ldr	x9, [x9, _KADM5_PW_EXPIRATION@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh33:
	adrp	x9, _KADM5_TL_DATA@GOTPAGE
Lloh34:
	ldr	x9, [x9, _KADM5_TL_DATA@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w2, w8, w9
	add	x1, sp, #8
	mov	x0, x19
	bl	_kadm5_log_modify
LBB0_8:
	ldr	w0, [x19, #8]
	add	x1, sp, #8
	bl	_hdb_free_entry
LBB0_9:
	ldr	x1, [x19]
	ldr	x8, [x1, #24]
	ldr	w0, [x19, #8]
	blr	x8
	mov	x0, x22
	bl	__kadm5_error_code
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_HDB_F_GET_ANY,4,2              ; @HDB_F_GET_ANY
	.comm	_HDB_F_ADMIN_DATA,4,2           ; @HDB_F_ADMIN_DATA
	.comm	_HDB_ERR_NOENTRY,8,3            ; @HDB_ERR_NOENTRY
	.comm	_HDB_F_REPLACE,4,2              ; @HDB_F_REPLACE
	.comm	_KADM5_PRINCIPAL,4,2            ; @KADM5_PRINCIPAL
	.comm	_KADM5_MOD_NAME,4,2             ; @KADM5_MOD_NAME
	.comm	_KADM5_MOD_TIME,4,2             ; @KADM5_MOD_TIME
	.comm	_KADM5_KEY_DATA,4,2             ; @KADM5_KEY_DATA
	.comm	_KADM5_KVNO,4,2                 ; @KADM5_KVNO
	.comm	_KADM5_PW_EXPIRATION,4,2        ; @KADM5_PW_EXPIRATION
	.comm	_KADM5_TL_DATA,4,2              ; @KADM5_TL_DATA
.subsections_via_symbols
