	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kadm5_s_rename_principal       ## -- Begin function kadm5_s_rename_principal
	.p2align	4, 0x90
_kadm5_s_rename_principal:              ## @kadm5_s_rename_principal
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	-80(%rbp), %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	(%rbx), %edi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_krb5_principal_compare
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_KADM5_DUP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_23
LBB0_2:
	movq	8(%rbx), %rsi
	movl	(%rbx), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	*32(%rsi)
	testq	%rax, %rax
	jne	LBB0_23
## %bb.3:
	movq	8(%rbx), %rsi
	movl	(%rbx), %edi
	movq	_HDB_F_GET_ANY@GOTPCREL(%rip), %rax
	movq	_HDB_F_ADMIN_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	-80(%rbp), %r9
	movq	%r14, %rdx
	xorl	%r8d, %r8d
	callq	*24(%rsi)
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %r12
	movq	8(%rbx), %rsi
	movl	(%rbx), %edi
	callq	*(%rsi)
	jmp	LBB0_22
LBB0_5:
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	callq	__kadm5_set_modifier
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_21
## %bb.6:
	leaq	-112(%rbp), %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	(%rbx), %edi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rsi
	callq	_krb5_get_pw_salt
	movq	_hdb_pw_salt@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movl	-48(%rbp), %esi
	movl	%esi, -88(%rbp)
	movq	-72(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	xorl	%r13d, %r13d
	jmp	LBB0_9
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-72(%rbp), %rax
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%r13
	cmpq	%rax, %r13
	jae	LBB0_15
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rcx
	cmpq	$0, (%rcx,%r13,8)
	jne	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	$4, %edi
	callq	_malloc
	movq	-64(%rbp), %rcx
	movq	%rax, (%rcx,%r13,8)
	testq	%rax, %rax
	je	LBB0_24
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	leaq	-112(%rbp), %rdi
	movq	%rax, %rsi
	callq	_copy_Salt
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%rax, %r12
	jmp	LBB0_16
LBB0_7:
	movl	(%rbx), %edi
	callq	_krb5_free_salt
	jmp	LBB0_17
LBB0_15:
	xorl	%r12d, %r12d
LBB0_16:
	movl	-48(%rbp), %esi
	movl	(%rbx), %edi
	callq	_krb5_free_salt
	testq	%r12, %r12
	jne	LBB0_21
LBB0_17:
	movq	-80(%rbp), %r13
	movq	%r15, -80(%rbp)
	movl	(%rbx), %edi
	movq	8(%rbx), %rsi
	leaq	-80(%rbp), %rdx
	callq	_hdb_seal_keys
	testq	%rax, %rax
	jne	LBB0_20
## %bb.18:
	leaq	-80(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_kadm5_log_rename
	movq	8(%rbx), %rsi
	movl	(%rbx), %edi
	xorl	%edx, %edx
	movq	%r15, %rcx
	callq	*16(%rsi)
	testq	%rax, %rax
	jne	LBB0_20
## %bb.19:
	movq	8(%rbx), %rsi
	movl	(%rbx), %edi
	movq	%r13, %rdx
	callq	*8(%rsi)
LBB0_20:
	movq	%rax, %r12
	movq	%r13, -80(%rbp)
LBB0_21:
	movq	8(%rbx), %rsi
	movl	(%rbx), %edi
	callq	*(%rsi)
	movl	(%rbx), %edi
	leaq	-80(%rbp), %rsi
	callq	_hdb_free_entry
LBB0_22:
	movq	%r12, %rdi
	callq	__kadm5_error_code
LBB0_23:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_KADM5_DUP,8,3                  ## @KADM5_DUP
	.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_pw_salt,4,2                ## @hdb_pw_salt
	.comm	_ENOMEM,8,3                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kadm5_s_rename_principal       ; -- Begin function kadm5_s_rename_principal
	.p2align	2
_kadm5_s_rename_principal:              ; @kadm5_s_rename_principal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	add	x0, sp, #48
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	w0, [x19]
	mov	x1, x20
	mov	x2, x21
	bl	_krb5_principal_compare
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _KADM5_DUP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KADM5_DUP@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	b	LBB0_23
LBB0_2:
	ldr	x1, [x19, #8]
	ldr	x8, [x1, #32]
	ldr	w0, [x19]
Lloh3:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x9]
	mov	w3, #0
	blr	x8
	cbnz	x0, LBB0_23
; %bb.3:
	ldr	x1, [x19, #8]
	ldr	x8, [x1, #24]
Lloh6:
	adrp	x9, _HDB_F_GET_ANY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HDB_F_GET_ANY@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _HDB_F_ADMIN_DATA@GOTPAGE
Lloh10:
	ldr	x10, [x10, _HDB_F_ADMIN_DATA@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w3, w10, w9
	add	x5, sp, #48
	mov	x2, x20
	mov	w4, #0
	blr	x8
	cbz	x0, LBB0_5
; %bb.4:
	mov	x22, x0
	ldr	x1, [x19, #8]
	ldr	x8, [x1]
	ldr	w0, [x19]
	blr	x8
	b	LBB0_22
LBB0_5:
	add	x1, sp, #48
	mov	x0, x19
	bl	__kadm5_set_modifier
	mov	x22, x0
	cbnz	x0, LBB0_21
; %bb.6:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	w0, [x19]
	add	x2, sp, #8
	mov	x1, x20
	bl	_krb5_get_pw_salt
Lloh12:
	adrp	x8, _hdb_pw_salt@GOTPAGE
Lloh13:
	ldr	x8, [x8, _hdb_pw_salt@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w1, [sp, #8]
	stp	w1, w8, [sp, #40]
	ldr	x8, [sp, #56]
	cbz	x8, LBB0_14
; %bb.7:
	mov	x23, #0
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [sp, #56]
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x23, x23, #1
	cmp	x23, x8
	b.hs	LBB0_15
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [sp, #64]
	ldr	x9, [x9, x23, lsl #3]
	cbnz	x9, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w0, #4
	bl	_malloc
	ldr	x8, [sp, #64]
	str	x0, [x8, x23, lsl #3]
	cbz	x0, LBB0_24
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x1, x0
	add	x0, sp, #16
	bl	_copy_Salt
	cbz	x0, LBB0_8
; %bb.13:
	mov	x22, x0
	b	LBB0_16
LBB0_14:
	ldr	w0, [x19]
	bl	_krb5_free_salt
	b	LBB0_17
LBB0_15:
	mov	x22, #0
LBB0_16:
	ldr	w1, [sp, #8]
	ldr	w0, [x19]
	bl	_krb5_free_salt
	cbnz	x22, LBB0_21
LBB0_17:
	ldr	x23, [sp, #48]
	str	x21, [sp, #48]
	ldr	w0, [x19]
	ldr	x1, [x19, #8]
	add	x2, sp, #48
	bl	_hdb_seal_keys
	cbnz	x0, LBB0_20
; %bb.18:
	add	x2, sp, #48
	mov	x0, x19
	mov	x1, x20
	bl	_kadm5_log_rename
	ldr	x1, [x19, #8]
	ldr	x8, [x1, #16]
	ldr	w0, [x19]
	add	x3, sp, #48
	mov	w2, #0
	blr	x8
	cbnz	x0, LBB0_20
; %bb.19:
	ldr	x1, [x19, #8]
	ldr	x8, [x1, #8]
	ldr	w0, [x19]
	mov	x2, x23
	blr	x8
LBB0_20:
	mov	x22, x0
	str	x23, [sp, #48]
LBB0_21:
	ldr	x1, [x19, #8]
	ldr	x8, [x1]
	ldr	w0, [x19]
	blr	x8
	ldr	w0, [x19]
	add	x1, sp, #48
	bl	_hdb_free_entry
LBB0_22:
	mov	x0, x22
	bl	__kadm5_error_code
LBB0_23:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_24:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	x0, [x8]
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_KADM5_DUP,8,3                  ; @KADM5_DUP
	.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_pw_salt,4,2                ; @hdb_pw_salt
	.comm	_ENOMEM,8,3                     ; @ENOMEM
.subsections_via_symbols
