	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__kadm5_set_keys_randomly       ## -- Begin function _kadm5_set_keys_randomly
	.p2align	4, 0x90
__kadm5_set_keys_randomly:              ## @_kadm5_set_keys_randomly
	.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	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movl	(%rdi), %edi
	movl	16(%rsi), %esi
	leaq	-48(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	movl	$1, %r8d
	callq	_hdb_generate_key_set
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_22
## %bb.1:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r15
	leaq	(,%r15,4), %r14
	movq	%r14, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_memset
	cmpq	$0, -64(%rbp)
	je	LBB0_21
## %bb.5:
	movl	$-1, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$-1, %r15d
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rax
	movl	(%rax,%r14,4), %edi
	callq	_is_des_key_p
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %edi
	movslq	%r15d, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	leaq	(%rcx,%r14,4), %rbx
	movq	%rbx, %rdx
	callq	_krb5_copy_keyblock_contents
	testq	%rax, %rax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rax
	movl	(%rax,%r14,4), %ecx
	movl	%ecx, (%rbx)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %edi
	movq	-48(%rbp), %rax
	movl	(%rax,%r14,4), %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%rbx,%r14,4), %rdx
	callq	_krb5_generate_random_keyblock
	testq	%rax, %rax
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rax
	movl	(%rax,%r14,4), %edi
	callq	_is_des_key_p
	testq	%rax, %rax
	cmovnel	%r14d, %r15d
	movq	-48(%rbp), %rax
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %edi
	leaq	(%rbx,%r14,4), %rsi
	leaq	(%rax,%r14,4), %rdx
	callq	_krb5_copy_keyblock_contents
	testq	%rax, %rax
	jne	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%r14
	cmpq	-64(%rbp), %r14
	jb	LBB0_7
LBB0_21:
	movl	(%r13), %edi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdx
	callq	__kadm5_free_keys
	movq	-48(%rbp), %rax
	movq	%rax, 8(%rbx)
	movq	-64(%rbp), %rax
	movq	%rax, (%rbx)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%rcx, (%rdx)
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	(%r13), %edi
	xorl	%r12d, %r12d
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_hdb_entry_set_pw_change_time
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_hdb_entry_clear_password
	jmp	LBB0_22
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	jmp	LBB0_3
LBB0_15:
	movq	%rax, %r12
	cmpq	$0, -64(%rbp)
	je	LBB0_17
LBB0_18:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_krb5_free_keyblock_contents
	incq	%r14
	movq	-64(%rbp), %r15
	addq	$4, %rbx
	cmpq	%r15, %r14
	jb	LBB0_19
	jmp	LBB0_20
LBB0_10:
	movq	%rax, %r12
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, -64(%rbp)
	jne	LBB0_18
LBB0_17:
	xorl	%r15d, %r15d
LBB0_20:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
LBB0_3:
	movl	(%r13), %edi
	movq	-48(%rbp), %rdx
	movq	%r15, %rsi
	callq	__kadm5_free_keys
LBB0_22:
	movq	%r12, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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_set_keys_randomly       ; -- Begin function _kadm5_set_keys_randomly
	.p2align	2
__kadm5_set_keys_randomly:              ; @_kadm5_set_keys_randomly
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0]
	ldr	w1, [x1, #16]
	mov	x2, sp
	add	x3, sp, #8
	mov	w4, #1
	bl	_hdb_generate_key_set
	mov	x24, x0
	cbz	x0, LBB0_2
LBB0_1:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_2:
	ldr	x25, [sp, #8]
	lsl	x24, x25, #2
	mov	x0, x24
	bl	_malloc
	cbz	x0, LBB0_14
; %bb.3:
	mov	x20, x0
	mov	w1, #0
	mov	x2, x24
	bl	_memset
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_13
; %bb.4:
	mov	x26, #0
	mov	w27, #-1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x28, x26, #2
	cmn	w27, #1
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp]
	ldr	w0, [x8, x26, lsl #2]
	bl	_is_des_key_p
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19]
	add	x1, x20, w27, sxtw #2
	add	x25, x20, x26, lsl #2
	mov	x2, x25
	bl	_krb5_copy_keyblock_contents
	cbnz	x0, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp]
	ldr	w9, [x8, x26, lsl #2]
	str	w9, [x25]
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19]
	ldr	x8, [sp]
	ldr	w1, [x8, x28]
	add	x2, x20, x28
	bl	_krb5_generate_random_keyblock
	cbnz	x0, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp]
	ldr	w0, [x8, x26, lsl #2]
	bl	_is_des_key_p
	cmp	x0, #0
	csel	w27, w27, w26, eq
	ldr	x8, [sp]
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19]
	add	x1, x20, x28
	add	x2, x8, x28
	bl	_krb5_copy_keyblock_contents
	cbnz	x0, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x26, x26, #1
	ldr	x8, [sp, #8]
	cmp	x26, x8
	b.lo	LBB0_5
LBB0_13:
	ldr	w0, [x19]
	ldp	x1, x2, [x21]
	bl	__kadm5_free_keys
	ldp	x8, x9, [sp]
	stp	x9, x8, [x21]
	str	x20, [x23]
	str	w9, [x22]
	ldr	w0, [x19]
	mov	x1, x21
	mov	w2, #0
	bl	_hdb_entry_set_pw_change_time
	ldr	w0, [x19]
	mov	x1, x21
	bl	_hdb_entry_clear_password
	mov	x24, #0
	b	LBB0_1
LBB0_14:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	ldr	w0, [x19]
	ldr	x2, [sp]
	mov	x1, x25
	bl	__kadm5_free_keys
	b	LBB0_1
LBB0_15:
	mov	x24, x0
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_18
; %bb.16:
	mov	x23, #0
	mov	x22, x20
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	mov	x1, x22
	bl	_krb5_free_keyblock_contents
	add	x23, x23, #1
	ldr	x21, [sp, #8]
	add	x22, x22, #4
	cmp	x23, x21
	b.lo	LBB0_17
	b	LBB0_19
LBB0_18:
	mov	x21, #0
LBB0_19:
	mov	x0, x20
	bl	_free
	ldr	w0, [x19]
	ldr	x2, [sp]
	mov	x1, x21
	bl	__kadm5_free_keys
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,8,3                     ; @ENOMEM
.subsections_via_symbols
