	.file	"extr_create_s.c_kadm5_s_create_principal.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	kadm5_s_create_principal
	.type	kadm5_s_create_principal, @function
kadm5_s_create_principal:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	r8d, DWORD PTR KADM5_PRINCIPAL[rip]
	mov	r9d, DWORD PTR KADM5_LAST_PWD_CHANGE[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	r14, rsp
	or	r9d, DWORD PTR KADM5_MOD_TIME[rip]
	or	r9d, DWORD PTR KADM5_MOD_NAME[rip]
	mov	rcx, r14
	or	r9d, DWORD PTR KADM5_MKVNO[rip]
	or	r9d, DWORD PTR KADM5_AUX_ATTRIBUTES[rip]
	or	r9d, DWORD PTR KADM5_KEY_DATA[rip]
	or	r9d, DWORD PTR KADM5_POLICY_CLR[rip]
	or	r9d, DWORD PTR KADM5_LAST_SUCCESS[rip]
	or	r9d, DWORD PTR KADM5_LAST_FAILED[rip]
	or	r9d, DWORD PTR KADM5_FAIL_AUTH_COUNT[rip]
	call	create_principal@PLT
	mov	r13, rax
	test	rax, rax
	jne	.L2
	test	DWORD PTR KADM5_KVNO[rip], ebp
	jne	.L3
	mov	DWORD PTR [rsp], 1
.L3:
	mov	rdx, r12
	mov	rsi, r14
	mov	rdi, rbx
	mov	QWORD PTR 16[rsp], 0
	mov	QWORD PTR 8[rsp], 0
	call	_kadm5_set_keys@PLT
	mov	r13, rax
	test	rax, rax
	je	.L7
.L2:
	mov	edi, DWORD PTR [rbx]
	mov	rsi, r14
	call	hdb_free_entry@PLT
	mov	rdi, r13
	call	_kadm5_error_code@PLT
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L8
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	rsi, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR [rbx]
	mov	rdx, r14
	call	hdb_seal_keys@PLT
	mov	r13, rax
	test	rax, rax
	jne	.L2
	mov	rax, QWORD PTR 8[rbx]
	mov	edx, DWORD PTR O_RDWR[rip]
	xor	ecx, ecx
	mov	edi, DWORD PTR [rbx]
	mov	rsi, rax
	call	[QWORD PTR 16[rax]]
	mov	r13, rax
	test	rax, rax
	jne	.L2
	mov	rax, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR [rbx]
	xor	edx, edx
	mov	rcx, r14
	mov	rsi, rax
	call	[QWORD PTR 8[rax]]
	mov	edi, DWORD PTR [rbx]
	mov	r13, rax
	mov	rax, QWORD PTR 8[rbx]
	mov	rsi, rax
	call	[QWORD PTR [rax]]
	test	r13, r13
	jne	.L2
	mov	rsi, r14
	mov	rdi, rbx
	call	kadm5_log_create@PLT
	jmp	.L2
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	kadm5_s_create_principal, .-kadm5_s_create_principal
	.comm	O_RDWR,4,4
	.comm	KADM5_PRINCIPAL,4,4
	.comm	KADM5_POLICY_CLR,4,4
	.comm	KADM5_MOD_TIME,4,4
	.comm	KADM5_MOD_NAME,4,4
	.comm	KADM5_MKVNO,4,4
	.comm	KADM5_LAST_SUCCESS,4,4
	.comm	KADM5_LAST_PWD_CHANGE,4,4
	.comm	KADM5_LAST_FAILED,4,4
	.comm	KADM5_KVNO,4,4
	.comm	KADM5_KEY_DATA,4,4
	.comm	KADM5_FAIL_AUTH_COUNT,4,4
	.comm	KADM5_AUX_ATTRIBUTES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_create_s.c_kadm5_s_create_principal.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	kadm5_s_create_principal
	.syntax unified
	.arm
	.fpu softvfp
	.type	kadm5_s_create_principal, %function
kadm5_s_create_principal:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r7, r3
	ldr	r4, .L9
	ldr	r3, .L9+4
	ldr	lr, .L9+8
	ldr	r4, [r4]
	ldr	r3, [r3]
	ldr	lr, [lr]
	orr	r3, r3, r4
	ldr	r4, .L9+12
	orr	r3, r3, lr
	ldr	lr, .L9+16
	ldr	r4, [r4]
	ldr	lr, [lr]
	orr	r3, r3, r4
	ldr	r4, .L9+20
	orr	r3, r3, lr
	ldr	lr, .L9+24
	ldr	r4, [r4]
	ldr	lr, [lr]
	orr	r3, r3, r4
	ldr	r4, .L9+28
	orr	r3, r3, lr
	ldr	lr, .L9+32
	ldr	r4, [r4]
	ldr	lr, [lr]
	orr	r3, r3, r4
	ldr	r4, .L9+36
	orr	r3, r3, lr
	ldr	lr, .L9+40
	ldr	r4, [r4]
	ldr	lr, [lr]
	sub	sp, sp, #28
	orr	r3, r3, r4
	ldr	ip, .L9+44
	str	r3, [sp, #4]
	str	lr, [sp]
	add	r3, sp, #8
	ldr	ip, [ip]
	str	ip, [sp, #20]
	mov	ip,#0
	mov	r5, r0
	mov	r6, r2
	bl	create_principal
	subs	r4, r0, #0
	bne	.L2
	ldr	r3, .L9+48
	mov	r2, r7
	ldr	r3, [r3]
	mov	r0, r5
	tst	r6, r3
	moveq	r3, #1
	streq	r3, [sp, #8]
	mov	r3, #0
	add	r1, sp, #8
	str	r3, [sp, #16]
	str	r3, [sp, #12]
	bl	_kadm5_set_keys
	subs	r4, r0, #0
	beq	.L7
.L2:
	add	r1, sp, #8
	ldr	r0, [r5]
	bl	hdb_free_entry
	mov	r0, r4
	bl	_kadm5_error_code
	ldr	r3, .L9+44
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L7:
	add	r2, sp, #8
	ldm	r5, {r0, r1}
	bl	hdb_seal_keys
	subs	r4, r0, #0
	bne	.L2
	ldr	r1, [r5, #4]
	ldr	r2, .L9+52
	mov	r3, r4
	ldr	r2, [r2]
	ldr	r4, [r1, #8]
	ldr	r0, [r5]
	blx	r4
	subs	r4, r0, #0
	bne	.L2
	ldr	r1, [r5, #4]
	mov	r2, r4
	add	r3, sp, #8
	ldr	r4, [r1, #4]
	ldr	r0, [r5]
	blx	r4
	mov	r4, r0
	ldm	r5, {r0, r1}
	ldr	r3, [r1]
	blx	r3
	cmp	r4, #0
	bne	.L2
	mov	r0, r5
	add	r1, sp, #8
	bl	kadm5_log_create
	b	.L2
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	KADM5_MOD_TIME
	.word	KADM5_LAST_PWD_CHANGE
	.word	KADM5_MOD_NAME
	.word	KADM5_MKVNO
	.word	KADM5_AUX_ATTRIBUTES
	.word	KADM5_KEY_DATA
	.word	KADM5_POLICY_CLR
	.word	KADM5_LAST_SUCCESS
	.word	KADM5_LAST_FAILED
	.word	KADM5_FAIL_AUTH_COUNT
	.word	KADM5_PRINCIPAL
	.word	.LC0
	.word	KADM5_KVNO
	.word	O_RDWR
	.size	kadm5_s_create_principal, .-kadm5_s_create_principal
	.comm	O_RDWR,4,4
	.comm	KADM5_PRINCIPAL,4,4
	.comm	KADM5_POLICY_CLR,4,4
	.comm	KADM5_MOD_TIME,4,4
	.comm	KADM5_MOD_NAME,4,4
	.comm	KADM5_MKVNO,4,4
	.comm	KADM5_LAST_SUCCESS,4,4
	.comm	KADM5_LAST_PWD_CHANGE,4,4
	.comm	KADM5_LAST_FAILED,4,4
	.comm	KADM5_KVNO,4,4
	.comm	KADM5_KEY_DATA,4,4
	.comm	KADM5_FAIL_AUTH_COUNT,4,4
	.comm	KADM5_AUX_ATTRIBUTES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
