	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ksign_calc_pk_keyid
_ksign_calc_pk_keyid:                   ## @ksign_calc_pk_keyid
	.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	%rsi, %r14
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_DSA_NPKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	(,%r15,4), %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	leaq	(,%r15,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	xorl	%eax, %eax
	movq	%r14, %r13
	cmpl	$4, (%r14)
	setl	%al
	leal	(%rax,%rax), %ebx
	addl	$6, %ebx
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	testl	%r15d, %r15d
	jle	LBB0_3
## %bb.1:
	xorl	%r15d, %r15d
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rax
	movl	(%rax,%r15), %edi
	callq	_mpi_get_nbits
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r15)
	movq	16(%r13), %rax
	movl	(%rax,%r15), %edi
	leaq	(%r14,%r15), %rsi
	xorl	%edx, %edx
	callq	_mpi_get_buffer
	movq	%rax, (%r12,%r15,2)
	movl	(%r14,%r15), %eax
	addl	%eax, %ebx
	addl	$2, %ebx
	addq	$4, %r15
	cmpq	%r15, -88(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_2
LBB0_3:
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	$153, %esi
	callq	_SHA1_putc
	movl	%ebx, %esi
	shrl	$8, %esi
	movq	%r12, %rdi
	callq	_SHA1_putc
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_SHA1_putc
	xorl	%eax, %eax
	cmpl	$4, (%r13)
	setl	%al
	movl	$4, %esi
	subl	%eax, %esi
	movq	%r12, %rdi
	callq	_SHA1_putc
	movl	4(%r13), %ebx
	movl	%ebx, %esi
	sarl	$24, %esi
	movq	%r12, %rdi
	callq	_SHA1_putc
	movl	%ebx, %esi
	sarl	$16, %esi
	movq	%r12, %rdi
	callq	_SHA1_putc
	movl	%ebx, %esi
	sarl	$8, %esi
	movq	%r12, %rdi
	callq	_SHA1_putc
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_SHA1_putc
	cmpl	$3, (%r13)
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	jg	LBB0_8
## %bb.4:
	movq	8(%r13), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movslq	4(%r13), %rcx
	subq	%rcx, %rax
	movabsq	$1749024623285053783, %rcx      ## imm = 0x1845C8A0CE512957
	imulq	%rcx
	movq	%rdx, %rbx
	movq	%rdx, %rax
	shrq	$63, %rax
	shrq	$13, %rbx
	addl	%eax, %ebx
	jmp	LBB0_7
LBB0_5:
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %esi
	sarl	$8, %esi
	movq	%r12, %rdi
	callq	_SHA1_putc
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_SHA1_putc
LBB0_8:
	movq	_PUBKEY_ALGO_DSA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_SHA1_putc
	testl	%r15d, %r15d
	movq	%r15, %r13
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jle	LBB0_11
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rbx,4), %r14d
	movl	%r14d, %esi
	shrl	$8, %esi
	movq	%r12, %rdi
	callq	_SHA1_putc
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_SHA1_putc
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rbx,8), %r14
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rbx,4), %edx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_SHA1_write
	movq	%r14, %rdi
	callq	_kfree
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_10
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DSA_NPKEY,4,2                  ## @DSA_NPKEY
	.comm	_PUBKEY_ALGO_DSA,4,2            ## @PUBKEY_ALGO_DSA
	.no_dead_strip	_ksign_calc_pk_keyid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ksign_calc_pk_keyid
_ksign_calc_pk_keyid:                   ; @ksign_calc_pk_keyid
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #16
	mov	x23, x1
	stur	x0, [x29, #-96]                 ; 8-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _DSA_NPKEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DSA_NPKEY@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	lsl	x20, x24, #2
	mov	x9, x20
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x12, x9, #0x7fffffff0
	sub	x25, x8, x12
	mov	sp, x25
	mov	x9, x20
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x26, x8, x12
	mov	sp, x26
	lsl	x8, x24, #3
	mov	x9, x8
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	w8, [x1]
	mov	w9, #6
	mov	w10, #8
	cmp	w8, #4
	csel	w22, w10, w9, lt
	cmp	w24, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x28, #0
	mov	x27, x21
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #16]
	ldr	w0, [x8, x28]
	bl	_mpi_get_nbits
	str	w0, [x25, x28]
	ldr	x8, [x23, #16]
	ldr	w0, [x8, x28]
	mov	x19, x23
	add	x23, x26, x28
	mov	x1, x23
	mov	x2, #0
	bl	_mpi_get_buffer
	str	x0, [x27], #8
	ldr	w8, [x23]
	mov	x23, x19
	add	w8, w22, w8
	add	w22, w8, #2
	add	x28, x28, #4
	cmp	x20, x28
	b.ne	LBB0_2
LBB0_3:
	ldur	x19, [x29, #-96]                ; 8-byte Folded Reload
	mov	x0, x19
	mov	w1, #153
	bl	_SHA1_putc
	lsr	w1, w22, #8
	mov	x0, x19
	bl	_SHA1_putc
	mov	x0, x19
	mov	x1, x22
	bl	_SHA1_putc
	ldr	w8, [x23]
	cmp	w8, #4
	mov	w8, #3
	cinc	w1, w8, ge
	mov	x0, x19
	bl	_SHA1_putc
	ldr	w22, [x23, #4]
	asr	w1, w22, #24
	mov	x0, x19
	bl	_SHA1_putc
	asr	w1, w22, #16
	mov	x0, x19
	bl	_SHA1_putc
	asr	w1, w22, #8
	mov	x0, x19
	bl	_SHA1_putc
	mov	x0, x19
	mov	x1, x22
	bl	_SHA1_putc
	ldr	w8, [x23]
	cmp	w8, #3
	b.gt	LBB0_8
; %bb.4:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_6
; %bb.5:
	ldrsw	x9, [x23, #4]
	sub	x8, x8, x9
	mov	x9, #10583
	movk	x9, #52817, lsl #16
	movk	x9, #51360, lsl #32
	movk	x9, #6213, lsl #48
	smulh	x8, x8, x9
	lsr	x9, x8, #63
	lsr	x8, x8, #13
	add	w20, w8, w9
	b	LBB0_7
LBB0_6:
	mov	w20, #0
LBB0_7:
	asr	w1, w20, #8
	mov	x0, x19
	bl	_SHA1_putc
	mov	x0, x19
	mov	x1, x20
	bl	_SHA1_putc
LBB0_8:
Lloh12:
	adrp	x8, _PUBKEY_ALGO_DSA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PUBKEY_ALGO_DSA@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_SHA1_putc
	cmp	w24, #1
	b.lt	LBB0_10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x25], #4
	lsr	w1, w20, #8
	mov	x0, x19
	bl	_SHA1_putc
	mov	x0, x19
	mov	x1, x20
	bl	_SHA1_putc
	ldr	x20, [x21], #8
	ldr	w2, [x26], #4
	mov	x0, x19
	mov	x1, x20
	bl	_SHA1_write
	mov	x0, x20
	bl	_kfree
	subs	x24, x24, #1
	b.ne	LBB0_9
LBB0_10:
	ldur	x8, [x29, #-88]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DSA_NPKEY,4,2                  ; @DSA_NPKEY
	.comm	_PUBKEY_ALGO_DSA,4,2            ; @PUBKEY_ALGO_DSA
	.no_dead_strip	_ksign_calc_pk_keyid
.subsections_via_symbols
