	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kadm5_s_create_principal       ## -- Begin function kadm5_s_create_principal
	.p2align	4, 0x90
_kadm5_s_create_principal:              ## @kadm5_s_create_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_KADM5_LAST_PWD_CHANGE@GOTPCREL(%rip), %rax
	movq	_KADM5_MOD_TIME@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r9d
	orl	(%rax), %r9d
	movq	_KADM5_MOD_NAME@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	movq	_KADM5_MKVNO@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	movq	_KADM5_AUX_ATTRIBUTES@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	movq	_KADM5_KEY_DATA@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	movq	_KADM5_POLICY_CLR@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	movq	%rcx, %r15
	movl	%edx, %r12d
	movq	%rdi, %r14
	movq	_KADM5_LAST_SUCCESS@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	movq	_KADM5_PRINCIPAL@GOTPCREL(%rip), %rax
	movq	_KADM5_LAST_FAILED@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r9d
	movl	(%rax), %r8d
	movq	_KADM5_FAIL_AUTH_COUNT@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	leaq	-56(%rbp), %rcx
	callq	_create_principal
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.1:
	movq	_KADM5_KVNO@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_3
## %bb.2:
	movl	$1, -56(%rbp)
LBB0_3:
	xorps	%xmm0, %xmm0
	movups	%xmm0, -48(%rbp)
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	__kadm5_set_keys
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.4:
	movl	(%r14), %edi
	movq	8(%r14), %rsi
	leaq	-56(%rbp), %rdx
	callq	_hdb_seal_keys
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movq	8(%r14), %rsi
	movl	(%r14), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	*16(%rsi)
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	8(%r14), %rsi
	movl	(%r14), %edi
	leaq	-56(%rbp), %rcx
	xorl	%edx, %edx
	callq	*8(%rsi)
	movq	%rax, %rbx
	movq	8(%r14), %rsi
	movl	(%r14), %edi
	callq	*(%rsi)
	testq	%rbx, %rbx
	jne	LBB0_8
## %bb.7:
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	callq	_kadm5_log_create
	xorl	%ebx, %ebx
LBB0_8:
	movl	(%r14), %edi
	leaq	-56(%rbp), %rsi
	callq	_hdb_free_entry
	movq	%rbx, %rdi
	callq	__kadm5_error_code
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KADM5_PRINCIPAL,4,2            ## @KADM5_PRINCIPAL
	.comm	_KADM5_LAST_PWD_CHANGE,4,2      ## @KADM5_LAST_PWD_CHANGE
	.comm	_KADM5_MOD_TIME,4,2             ## @KADM5_MOD_TIME
	.comm	_KADM5_MOD_NAME,4,2             ## @KADM5_MOD_NAME
	.comm	_KADM5_MKVNO,4,2                ## @KADM5_MKVNO
	.comm	_KADM5_AUX_ATTRIBUTES,4,2       ## @KADM5_AUX_ATTRIBUTES
	.comm	_KADM5_KEY_DATA,4,2             ## @KADM5_KEY_DATA
	.comm	_KADM5_POLICY_CLR,4,2           ## @KADM5_POLICY_CLR
	.comm	_KADM5_LAST_SUCCESS,4,2         ## @KADM5_LAST_SUCCESS
	.comm	_KADM5_LAST_FAILED,4,2          ## @KADM5_LAST_FAILED
	.comm	_KADM5_FAIL_AUTH_COUNT,4,2      ## @KADM5_FAIL_AUTH_COUNT
	.comm	_KADM5_KVNO,4,2                 ## @KADM5_KVNO
	.comm	_O_RDWR,4,2                     ## @O_RDWR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kadm5_s_create_principal       ; -- Begin function kadm5_s_create_principal
	.p2align	2
_kadm5_s_create_principal:              ; @kadm5_s_create_principal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
Lloh0:
	adrp	x8, _KADM5_PRINCIPAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KADM5_PRINCIPAL@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
Lloh3:
	adrp	x8, _KADM5_LAST_PWD_CHANGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KADM5_LAST_PWD_CHANGE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _KADM5_MOD_TIME@GOTPAGE
Lloh7:
	ldr	x9, [x9, _KADM5_MOD_TIME@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _KADM5_MOD_NAME@GOTPAGE
Lloh10:
	ldr	x9, [x9, _KADM5_MOD_NAME@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _KADM5_MKVNO@GOTPAGE
Lloh13:
	ldr	x9, [x9, _KADM5_MKVNO@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _KADM5_AUX_ATTRIBUTES@GOTPAGE
Lloh16:
	ldr	x9, [x9, _KADM5_AUX_ATTRIBUTES@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh18:
	adrp	x9, _KADM5_KEY_DATA@GOTPAGE
Lloh19:
	ldr	x9, [x9, _KADM5_KEY_DATA@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh21:
	adrp	x9, _KADM5_POLICY_CLR@GOTPAGE
Lloh22:
	ldr	x9, [x9, _KADM5_POLICY_CLR@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh24:
	adrp	x9, _KADM5_LAST_SUCCESS@GOTPAGE
Lloh25:
	ldr	x9, [x9, _KADM5_LAST_SUCCESS@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh27:
	adrp	x9, _KADM5_LAST_FAILED@GOTPAGE
Lloh28:
	ldr	x9, [x9, _KADM5_LAST_FAILED@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh30:
	adrp	x9, _KADM5_FAIL_AUTH_COUNT@GOTPAGE
Lloh31:
	ldr	x9, [x9, _KADM5_FAIL_AUTH_COUNT@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w5, w8, w9
	add	x3, sp, #8
	bl	_create_principal
	mov	x22, x0
	cbnz	x0, LBB0_8
; %bb.1:
Lloh33:
	adrp	x8, _KADM5_KVNO@GOTPAGE
Lloh34:
	ldr	x8, [x8, _KADM5_KVNO@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	tst	w8, w21
	b.ne	LBB0_3
; %bb.2:
	mov	w8, #1
	str	w8, [sp, #8]
LBB0_3:
	stp	xzr, xzr, [sp, #16]
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x20
	bl	__kadm5_set_keys
	mov	x22, x0
	cbnz	x0, LBB0_8
; %bb.4:
	ldr	w0, [x19]
	ldr	x1, [x19, #8]
	add	x2, sp, #8
	bl	_hdb_seal_keys
	mov	x22, x0
	cbnz	x0, LBB0_8
; %bb.5:
	ldr	x1, [x19, #8]
	ldr	x8, [x1, #16]
	ldr	w0, [x19]
Lloh36:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh37:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x9]
	mov	w3, #0
	blr	x8
	mov	x22, x0
	cbnz	x0, LBB0_8
; %bb.6:
	ldr	x1, [x19, #8]
	ldr	x8, [x1, #8]
	ldr	w0, [x19]
	add	x3, sp, #8
	mov	w2, #0
	blr	x8
	mov	x22, x0
	ldr	x1, [x19, #8]
	ldr	x8, [x1]
	ldr	w0, [x19]
	blr	x8
	cbnz	x22, LBB0_8
; %bb.7:
	add	x1, sp, #8
	mov	x0, x19
	bl	_kadm5_log_create
LBB0_8:
	ldr	w0, [x19]
	add	x1, sp, #8
	bl	_hdb_free_entry
	mov	x0, x22
	bl	__kadm5_error_code
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.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
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_KADM5_PRINCIPAL,4,2            ; @KADM5_PRINCIPAL
	.comm	_KADM5_LAST_PWD_CHANGE,4,2      ; @KADM5_LAST_PWD_CHANGE
	.comm	_KADM5_MOD_TIME,4,2             ; @KADM5_MOD_TIME
	.comm	_KADM5_MOD_NAME,4,2             ; @KADM5_MOD_NAME
	.comm	_KADM5_MKVNO,4,2                ; @KADM5_MKVNO
	.comm	_KADM5_AUX_ATTRIBUTES,4,2       ; @KADM5_AUX_ATTRIBUTES
	.comm	_KADM5_KEY_DATA,4,2             ; @KADM5_KEY_DATA
	.comm	_KADM5_POLICY_CLR,4,2           ; @KADM5_POLICY_CLR
	.comm	_KADM5_LAST_SUCCESS,4,2         ; @KADM5_LAST_SUCCESS
	.comm	_KADM5_LAST_FAILED,4,2          ; @KADM5_LAST_FAILED
	.comm	_KADM5_FAIL_AUTH_COUNT,4,2      ; @KADM5_FAIL_AUTH_COUNT
	.comm	_KADM5_KVNO,4,2                 ; @KADM5_KVNO
	.comm	_O_RDWR,4,2                     ; @O_RDWR
.subsections_via_symbols
