	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__krb5_derive_key               ## -- Begin function _krb5_derive_key
	.p2align	4, 0x90
__krb5_derive_key:                      ## @_krb5_derive_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	%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	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	16(%rsi), %r15
	movq	%rdx, %rsi
	callq	__key_schedule
	testq	%rax, %rax
	jne	LBB0_36
## %bb.1:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movslq	(%rbx), %rbx
	leal	(,%rbx,8), %ecx
	movl	(%r15), %r13d
	cmpl	%r13d, %ecx
	movq	%r15, %r14
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	jl	LBB0_3
## %bb.2:
	cmpq	%r15, %rbx
	jne	LBB0_3
## %bb.17:
	movq	%r15, %rdi
	callq	_malloc
	movq	%rax, %rbx
	leal	7(%r13), %ecx
	leal	14(%r13), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	testq	%r15, %r15
	je	LBB0_20
## %bb.18:
	testq	%rbx, %rbx
	je	LBB0_19
LBB0_20:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	sarl	$3, %eax
	movslq	%eax, %r12
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_memcpy
	movq	$0, (%rsp)
	xorl	%r14d, %r14d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdx
	movq	%r15, %rcx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	callq	*8(%rax)
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_malloc
	movq	%rax, %r12
	decl	%r13d
	cmpl	$-16, %r13d
	ja	LBB0_23
## %bb.21:
	testq	%r12, %r12
	jne	LBB0_23
## %bb.22:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
LBB0_19:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_N_
	xorl	%r14d, %r14d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %r13
	movq	%rbx, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_krb5_set_error_message
	xorl	%r12d, %r12d
	jmp	LBB0_13
LBB0_3:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	leal	(%rcx,%r13), %eax
	decl	%eax
	cltd
	idivl	%ecx
	movl	%eax, %r14d
	movl	%ebx, %edi
	imull	%eax, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%rax, %rdx
	movq	%rbx, %rcx
	callq	__krb5_n_fold
	testq	%rax, %rax
	je	LBB0_6
## %bb.10:
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rbx
	callq	_N_
	jmp	LBB0_11
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_N_
	xorl	%r12d, %r12d
LBB0_11:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %r13
	movq	%rbx, %rsi
LBB0_12:
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_krb5_set_error_message
LBB0_13:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_31:
	cmpq	$0, (%r15)
	je	LBB0_33
## %bb.32:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_free_key_schedule
	movq	$0, (%r15)
LBB0_33:
	testq	%r12, %r12
	je	LBB0_35
## %bb.34:
	imull	(%rbx), %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movq	%r12, %rdi
	callq	_free
LBB0_35:
	movq	%r13, %rax
LBB0_36:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	callq	__krb5_n_fold
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_free
	testq	%r15, %r15
	je	LBB0_24
## %bb.37:
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_N_
	xorl	%r14d, %r14d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, %r13
	movq	%r15, %rsi
	jmp	LBB0_12
LBB0_6:
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.8:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movslq	(%rbx), %rcx
	movq	$0, (%rsp)
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%r12, %rdx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	*8(%rbx)
	cmpl	$1, %r14d
	jne	LBB0_14
## %bb.9:
	movl	$1, %r14d
	jmp	LBB0_26
LBB0_7:
	xorl	%r14d, %r14d
LBB0_24:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_14:
	movq	%r14, %r13
	movq	%rbx, %r14
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edx
	movl	%edx, %edi
	imull	%ebx, %edi
	addq	%r12, %rdi
	leal	-1(%rbx), %esi
	imull	%edx, %esi
	addq	%r12, %rsi
	callq	_memcpy
	movslq	(%r14), %rcx
	movl	%ecx, %edx
	imull	%ebx, %edx
	addq	%r12, %rdx
	movq	$0, (%rsp)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, %rsi
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	*8(%r14)
	incl	%ebx
	cmpl	%ebx, %r13d
	jne	LBB0_15
## %bb.16:
	movq	%r14, %rbx
	movq	%r13, %r14
LBB0_25:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
LBB0_26:
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	4(%rdx), %eax
	leal	-129(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_27
## %bb.29:
	movq	8(%r15), %rax
	movq	(%rax), %rdi
	movl	8(%rax), %edx
	movq	%r12, %rsi
	callq	_memcpy
	xorl	%r13d, %r13d
	jmp	LBB0_31
LBB0_27:
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	cmpl	$128, %eax
	jne	LBB0_30
## %bb.28:
	movq	8(%r15), %rsi
	movl	(%rbx), %ecx
	imull	%r14d, %ecx
	movl	%r13d, %edi
	movq	%r12, %rdx
	callq	__krb5_DES3_random_to_key
	xorl	%r13d, %r13d
	jmp	LBB0_31
LBB0_30:
	movq	_KRB5_CRYPTO_INTERNAL@GOTPCREL(%rip), %rax
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movl	%r13d, %r14d
	movq	(%rax), %r13
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_N_
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %ecx
	movl	%r14d, %edi
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_krb5_set_error_message
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,8,3                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc: out of memory"

L_.str.1:                               ## @.str.1
	.space	1

	.comm	_KRB5_CRYPTO_INTERNAL,8,3       ## @KRB5_CRYPTO_INTERNAL
L_.str.2:                               ## @.str.2
	.asciz	"derive_key() called with unknown keytype (%u)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__krb5_derive_key               ; -- Begin function _krb5_derive_key
	.p2align	2
__krb5_derive_key:                      ; @_krb5_derive_key
	.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	x24, x4
	mov	x25, x3
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x27, [x1, #16]
	mov	x1, x2
	bl	__key_schedule
	mov	x23, x0
	cbnz	x0, LBB0_17
; %bb.1:
	ldrsw	x23, [x19]
	lsl	w8, w23, #3
	ldr	w28, [x27]
	cmp	w8, w28
	ccmp	x23, x24, #0, ge
	b.eq	LBB0_5
; %bb.2:
	add	w9, w28, w8
	sub	w9, w9, #1
	sdiv	w26, w9, w8
	mul	w0, w26, w23
	bl	_malloc
	mov	x22, x0
	cbz	x0, LBB0_11
; %bb.3:
	mov	x0, x25
	mov	x1, x24
	mov	x2, x22
	mov	x3, x23
	bl	__krb5_n_fold
	cbz	x0, LBB0_20
; %bb.4:
	mov	x23, x0
	b	LBB0_12
LBB0_5:
	mov	x0, x24
	bl	_malloc
	mov	x26, x0
	add	w8, w28, #7
	add	w9, w28, #14
	cmp	w8, #0
	csel	w8, w9, w8, lt
	cbz	x24, LBB0_8
; %bb.6:
	cbnz	x26, LBB0_8
; %bb.7:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_N_
	mov	x2, x0
	mov	x0, x21
	mov	x1, x23
	bl	_krb5_set_error_message
	b	LBB0_19
LBB0_8:
	sbfx	x23, x8, #3, #29
	mov	x0, x26
	mov	x1, x25
	mov	x2, x24
	bl	_memcpy
	ldr	x8, [x19, #8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x26
	mov	x3, x24
	mov	w4, #1
	mov	w5, #0
	mov	x6, #0
	blr	x8
	mov	x0, x23
	bl	_malloc
	sub	w8, w28, #1
	cmn	w8, #16
	ccmp	x0, #0, #0, ls
	b.eq	LBB0_18
; %bb.9:
	mov	x22, x0
	mov	x0, x26
	mov	x1, x24
	mov	x2, x22
	mov	x3, x23
	bl	__krb5_n_fold
	mov	x23, x0
	mov	x0, x26
	bl	_free
	cbz	x23, LBB0_24
; %bb.10:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_N_
	mov	x2, x0
	mov	x0, x21
	mov	x1, x23
	bl	_krb5_set_error_message
	mov	w26, #0
	ldr	x8, [x20]
	cbnz	x8, LBB0_14
	b	LBB0_15
LBB0_11:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	x23, [x8]
LBB0_12:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_N_
	mov	x2, x0
LBB0_13:
	mov	x0, x21
	mov	x1, x23
	bl	_krb5_set_error_message
	ldr	x8, [x20]
	cbz	x8, LBB0_15
LBB0_14:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_free_key_schedule
	str	xzr, [x20]
LBB0_15:
	cbz	x22, LBB0_17
; %bb.16:
	ldr	w8, [x19]
	mul	w2, w8, w26
	mov	x0, x22
	mov	w1, #0
	bl	_memset
	mov	x0, x22
	bl	_free
LBB0_17:
	mov	x0, x23
	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_18:
	mov	x0, x26
	bl	_free
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	x23, [x8]
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_N_
	mov	x2, x0
	mov	x0, x21
	mov	x1, x23
	bl	_krb5_set_error_message
	mov	w26, #0
LBB0_19:
	mov	x22, #0
	ldr	x8, [x20]
	cbnz	x8, LBB0_14
	b	LBB0_15
LBB0_20:
	cbz	w26, LBB0_25
; %bb.21:
	ldr	x8, [x19, #8]
	ldrsw	x3, [x19]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	mov	w4, #1
	mov	w5, #0
	mov	x6, #0
	blr	x8
	cmp	w26, #1
	b.eq	LBB0_25
; %bb.22:
	mov	w23, #1
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x19]
	mul	w8, w2, w23
	add	x0, x22, x8
	sub	w8, w23, #1
	mul	w8, w2, w8
	add	x1, x22, x8
	bl	_memcpy
	ldr	x8, [x19, #8]
	ldrsw	x3, [x19]
	mul	w9, w3, w23
	add	x2, x22, x9
	mov	x0, x21
	mov	x1, x20
	mov	w4, #1
	mov	w5, #0
	mov	x6, #0
	blr	x8
	add	w23, w23, #1
	cmp	w26, w23
	b.ne	LBB0_23
	b	LBB0_25
LBB0_24:
	mov	w26, #0
LBB0_25:
	ldr	w8, [x27, #4]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hs	LBB0_27
; %bb.26:
	ldr	x8, [x20, #8]
	ldr	x0, [x8]
	ldr	w2, [x8, #8]
	mov	x1, x22
	bl	_memcpy
	b	LBB0_29
LBB0_27:
	cmp	w8, #128
	b.ne	LBB0_30
; %bb.28:
	ldr	x1, [x20, #8]
	ldr	w8, [x19]
	mul	w3, w8, w26
	mov	x0, x21
	mov	x2, x22
	bl	__krb5_DES3_random_to_key
LBB0_29:
	mov	x23, #0
	ldr	x8, [x20]
	cbnz	x8, LBB0_14
	b	LBB0_15
LBB0_30:
Lloh25:
	adrp	x8, _KRB5_CRYPTO_INTERNAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _KRB5_CRYPTO_INTERNAL@GOTPAGEOFF]
Lloh27:
	ldr	x23, [x8]
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_N_
	mov	x2, x0
	ldr	w8, [x27, #4]
	str	x8, [sp]
	b	LBB0_13
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,8,3                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc: out of memory"

l_.str.1:                               ; @.str.1
	.space	1

	.comm	_KRB5_CRYPTO_INTERNAL,8,3       ; @KRB5_CRYPTO_INTERNAL
l_.str.2:                               ; @.str.2
	.asciz	"derive_key() called with unknown keytype (%u)"

.subsections_via_symbols
