	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsa_sign_setup
_dsa_sign_setup:                        ## @dsa_sign_setup
	.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	%rdi, %r12
	movq	24(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	cmpq	$0, 8(%r12)
	je	LBB0_3
## %bb.2:
	cmpq	$0, 32(%r12)
	je	LBB0_3
## %bb.5:
	movl	%r9d, %r15d
	movq	%r8, %r14
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	(%rcx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	callq	_BN_is_zero
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	8(%r12), %rdi
	callq	_BN_is_zero
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	32(%r12), %rdi
	callq	_BN_is_zero
	testq	%rax, %rax
	je	LBB0_9
LBB0_8:
	movq	_DSA_F_DSA_SIGN_SETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DSA_R_INVALID_PARAMETERS@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_DSA_F_DSA_SIGN_SETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DSA_R_MISSING_PARAMETERS@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	callq	_DSAerr
	xorl	%ebx, %ebx
LBB0_38:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	cmpq	$0, 56(%r12)
	je	LBB0_10
## %bb.11:
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_BN_new
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_15
## %bb.12:
	movl	$0, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %rax
	testq	%rcx, %rcx
	jne	LBB0_17
## %bb.14:
	xorl	%eax, %eax
	callq	_BN_CTX_new
	testq	%rax, %rax
	je	LBB0_15
LBB0_17:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %rdi
	callq	_BN_num_bits
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movq	8(%r12), %rdi
	callq	_bn_get_top
	addl	$2, %eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%eax, %esi
	callq	_bn_wexpand
	testl	%eax, %eax
	je	LBB0_16
## %bb.18:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_bn_wexpand
	testl	%eax, %eax
	je	LBB0_16
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rsi
	testq	%r14, %r14
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	56(%r12), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rcx
	movl	%r15d, %r8d
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	callq	_BN_generate_dsa_nonce
	jmp	LBB0_22
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_priv_rand_range
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	testl	%eax, %eax
	je	LBB0_16
## %bb.23:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_is_zero
	testq	%rax, %rax
	jne	LBB0_19
## %bb.24:
	movq	_BN_FLG_CONSTTIME@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_BN_set_flags
	movl	(%r14), %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_set_flags
	movq	_DSA_FLAG_CACHE_MONT_P@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_26
## %bb.25:
	leaq	16(%r12), %rdi
	movl	48(%r12), %esi
	movq	24(%r12), %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	_BN_MONT_CTX_set_locked
	testl	%eax, %eax
	je	LBB0_16
LBB0_26:
	movq	8(%r12), %rdx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_BN_add
	testl	%eax, %eax
	je	LBB0_16
## %bb.27:
	movq	8(%r12), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_BN_add
	testl	%eax, %eax
	je	LBB0_16
## %bb.28:
	movq	%r14, %rdi
	movl	-84(%rbp), %esi                 ## 4-byte Reload
	callq	_BN_is_bit_set
	movl	%eax, %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	callq	_BN_consttime_swap
	movq	40(%r12), %rax
	movq	(%rax), %rax
	movq	32(%r12), %rdx
	movq	24(%r12), %r8
	movl	16(%r12), %r9d
	testq	%rax, %rax
	je	LBB0_30
## %bb.29:
	movl	%r9d, (%rsp)
	movq	%r12, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rcx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %r9
	callq	*%rax
	jmp	LBB0_31
LBB0_10:
	movq	_DSA_F_DSA_SIGN_SETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DSA_R_MISSING_PRIVATE_KEY@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_15:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_16:
	movq	_DSA_F_DSA_SIGN_SETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_BN_LIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DSAerr
LBB0_35:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	cmpq	-96(%rbp), %rdi                 ## 8-byte Folded Reload
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_37
## %bb.36:
	callq	_BN_CTX_free
LBB0_37:
	movq	%r14, %rdi
	callq	_BN_clear_free
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_clear_free
	jmp	LBB0_38
LBB0_30:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdx, %rsi
	movq	%r15, %rdx
	movq	%r8, %rcx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %r8
	callq	_BN_mod_exp_mont
LBB0_31:
	testl	%eax, %eax
	je	LBB0_16
## %bb.32:
	movq	8(%r12), %rdx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, %rsi
	movq	%r14, %rcx
	callq	_BN_mod
	testl	%eax, %eax
	je	LBB0_16
## %bb.33:
	movq	8(%r12), %rsi
	movq	%r15, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_dsa_mod_inverse_fermat
	testq	%rax, %rax
	je	LBB0_16
## %bb.34:
	movq	%rax, %r14
	movq	(%r13), %rdi
	callq	_BN_clear_free
	movq	%r14, (%r13)
	movl	$1, %ebx
	jmp	LBB0_35
	.cfi_endproc
                                        ## -- End function
	.comm	_DSA_F_DSA_SIGN_SETUP,4,2       ## @DSA_F_DSA_SIGN_SETUP
	.comm	_DSA_R_MISSING_PARAMETERS,4,2   ## @DSA_R_MISSING_PARAMETERS
	.comm	_DSA_R_INVALID_PARAMETERS,4,2   ## @DSA_R_INVALID_PARAMETERS
	.comm	_DSA_R_MISSING_PRIVATE_KEY,4,2  ## @DSA_R_MISSING_PRIVATE_KEY
	.comm	_BN_FLG_CONSTTIME,4,2           ## @BN_FLG_CONSTTIME
	.comm	_DSA_FLAG_CACHE_MONT_P,4,2      ## @DSA_FLAG_CACHE_MONT_P
	.comm	_ERR_R_BN_LIB,4,2               ## @ERR_R_BN_LIB
	.no_dead_strip	_dsa_sign_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsa_sign_setup
_dsa_sign_setup:                        ; @dsa_sign_setup
	.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, x0
	ldr	x0, [x0, #24]
	cbz	x0, LBB0_7
; %bb.1:
	ldr	x8, [x24, #8]
	cbz	x8, LBB0_7
; %bb.2:
	ldr	x8, [x24, #32]
	cbz	x8, LBB0_7
; %bb.3:
	mov	x26, x5
	mov	x27, x4
	mov	x23, x2
	mov	x19, x1
	ldr	x25, [x3]
	bl	_BN_is_zero
	cbnz	x0, LBB0_6
; %bb.4:
	ldr	x0, [x24, #8]
	bl	_BN_is_zero
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	x0, [x24, #32]
	bl	_BN_is_zero
	cbz	x0, LBB0_10
LBB0_6:
Lloh0:
	adrp	x8, _DSA_F_DSA_SIGN_SETUP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DSA_F_DSA_SIGN_SETUP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _DSA_R_INVALID_PARAMETERS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DSA_R_INVALID_PARAMETERS@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _DSA_F_DSA_SIGN_SETUP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DSA_F_DSA_SIGN_SETUP@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _DSA_R_MISSING_PARAMETERS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DSA_R_MISSING_PARAMETERS@GOTPAGEOFF]
LBB0_8:
	ldr	w1, [x8]
	bl	_DSAerr
	mov	w23, #0
LBB0_9:
	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_10:
	ldr	x8, [x24, #56]
	cbz	x8, LBB0_21
; %bb.11:
	bl	_BN_new
	mov	x20, x0
	bl	_BN_new
	mov	x21, x0
	mov	x22, #0
	cbz	x20, LBB0_32
; %bb.12:
	cbz	x21, LBB0_32
; %bb.13:
	mov	x22, x19
	cbnz	x19, LBB0_15
; %bb.14:
	bl	_BN_CTX_new
	mov	x22, x0
	cbz	x0, LBB0_32
LBB0_15:
	ldr	x0, [x24, #8]
	bl	_BN_num_bits
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	ldr	x0, [x24, #8]
	bl	_bn_get_top
	add	w28, w0, #2
	mov	x0, x20
	mov	x1, x28
	bl	_bn_wexpand
	cbz	w0, LBB0_32
; %bb.16:
	mov	x0, x21
	mov	x1, x28
	bl	_bn_wexpand
	cbnz	w0, LBB0_19
	b	LBB0_32
LBB0_17:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x20
	bl	_BN_priv_rand_range
	cbz	w0, LBB0_32
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x20
	bl	_BN_is_zero
	cbz	x0, LBB0_22
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x24, #8]
	cbz	x27, LBB0_17
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	x2, [x24, #56]
	mov	x0, x20
	mov	x3, x27
	mov	x4, x26
	mov	x5, x22
	bl	_BN_generate_dsa_nonce
	cbnz	w0, LBB0_18
	b	LBB0_32
LBB0_21:
Lloh10:
	adrp	x8, _DSA_F_DSA_SIGN_SETUP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DSA_F_DSA_SIGN_SETUP@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _DSA_R_MISSING_PRIVATE_KEY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DSA_R_MISSING_PRIVATE_KEY@GOTPAGEOFF]
	b	LBB0_8
LBB0_22:
Lloh15:
	adrp	x26, _BN_FLG_CONSTTIME@GOTPAGE
Lloh16:
	ldr	x26, [x26, _BN_FLG_CONSTTIME@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x20
	bl	_BN_set_flags
	ldr	w1, [x26]
	mov	x0, x21
	bl	_BN_set_flags
	ldr	w8, [x24]
Lloh17:
	adrp	x9, _DSA_FLAG_CACHE_MONT_P@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DSA_FLAG_CACHE_MONT_P@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_24
; %bb.23:
	add	x0, x24, #16
	ldr	w1, [x24, #48]
	ldr	x2, [x24, #24]
	mov	x3, x22
	bl	_BN_MONT_CTX_set_locked
	cbz	w0, LBB0_32
LBB0_24:
	ldr	x2, [x24, #8]
	mov	x0, x21
	mov	x1, x20
	bl	_BN_add
	cbz	w0, LBB0_32
; %bb.25:
	ldr	x2, [x24, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_BN_add
	cbz	w0, LBB0_32
; %bb.26:
	mov	x0, x21
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	bl	_BN_is_bit_set
	mov	x1, x20
	mov	x2, x21
	mov	x3, x28
	bl	_BN_consttime_swap
	ldp	x2, x8, [x24, #32]
	ldr	x8, [x8]
	ldr	x4, [x24, #24]
	ldr	w6, [x24, #16]
	cbz	x8, LBB0_28
; %bb.27:
	mov	x0, x24
	mov	x1, x25
	mov	x3, x20
	mov	x5, x22
	blr	x8
	cbnz	w0, LBB0_29
	b	LBB0_32
LBB0_28:
	mov	x0, x25
	mov	x1, x2
	mov	x2, x20
	mov	x3, x4
	mov	x4, x22
	mov	x5, x6
	bl	_BN_mod_exp_mont
	cbz	w0, LBB0_32
LBB0_29:
	ldr	x2, [x24, #8]
	mov	x0, x25
	mov	x1, x25
	mov	x3, x22
	bl	_BN_mod
	cbz	w0, LBB0_32
; %bb.30:
	ldr	x1, [x24, #8]
	mov	x0, x20
	mov	x2, x22
	bl	_dsa_mod_inverse_fermat
	cbz	x0, LBB0_32
; %bb.31:
	mov	x24, x0
	ldr	x0, [x23]
	bl	_BN_clear_free
	str	x24, [x23]
	mov	w23, #1
	b	LBB0_33
LBB0_32:
Lloh20:
	adrp	x8, _DSA_F_DSA_SIGN_SETUP@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DSA_F_DSA_SIGN_SETUP@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x8, _ERR_R_BN_LIB@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ERR_R_BN_LIB@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_DSAerr
	mov	w23, #0
LBB0_33:
	cmp	x22, x19
	b.eq	LBB0_35
; %bb.34:
	mov	x0, x22
	bl	_BN_CTX_free
LBB0_35:
	mov	x0, x20
	bl	_BN_clear_free
	mov	x0, x21
	bl	_BN_clear_free
	b	LBB0_9
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_DSA_F_DSA_SIGN_SETUP,4,2       ; @DSA_F_DSA_SIGN_SETUP
	.comm	_DSA_R_MISSING_PARAMETERS,4,2   ; @DSA_R_MISSING_PARAMETERS
	.comm	_DSA_R_INVALID_PARAMETERS,4,2   ; @DSA_R_INVALID_PARAMETERS
	.comm	_DSA_R_MISSING_PRIVATE_KEY,4,2  ; @DSA_R_MISSING_PRIVATE_KEY
	.comm	_BN_FLG_CONSTTIME,4,2           ; @BN_FLG_CONSTTIME
	.comm	_DSA_FLAG_CACHE_MONT_P,4,2      ; @DSA_FLAG_CACHE_MONT_P
	.comm	_ERR_R_BN_LIB,4,2               ; @ERR_R_BN_LIB
	.no_dead_strip	_dsa_sign_setup
.subsections_via_symbols
