	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_serial                    ## -- Begin function load_serial
	.p2align	4, 0x90
_load_serial:                           ## @load_serial
	.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	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -1080(%rbp)               ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_ASN1_INTEGER_new
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_BIO_new_file
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_3
## %bb.12:
	leaq	-1072(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$1024, %ecx                     ## imm = 0x400
	callq	_a2i_ASN1_INTEGER
	testl	%eax, %eax
	je	LBB0_13
## %bb.14:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ASN1_INTEGER_to_BN
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_8
## %bb.15:
	movq	_bio_err@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_BIO_printf
	jmp	LBB0_16
LBB0_1:
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_16
LBB0_3:
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.5:
	xorl	%eax, %eax
	callq	_ERR_clear_error
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_rand_serial
	testl	%eax, %eax
	jne	LBB0_8
LBB0_7:
	movq	_bio_err@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_BIO_printf
LBB0_8:
	movq	-1080(%rbp), %rax               ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_16
## %bb.9:
	testq	%r12, %r12
	je	LBB0_16
## %bb.10:
	movq	%r15, (%rax)
	xorl	%r15d, %r15d
	jmp	LBB0_16
LBB0_13:
	movq	_bio_err@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_BIO_printf
LBB0_16:
	movq	%r14, %rdi
	callq	_BIO_free
	movq	%r15, %rdi
	callq	_ASN1_INTEGER_free
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movq	%r12, %rax
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r13, %rdi
	callq	_perror
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	jmp	LBB0_16
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

	.comm	_bio_err,4,2                    ## @bio_err
L_.str.1:                               ## @.str.1
	.asciz	"Out of memory\n"

L_.str.2:                               ## @.str.2
	.asciz	"unable to load number from %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"error converting number from bin to BIGNUM\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_serial                    ; -- Begin function load_serial
	.p2align	2
_load_serial:                           ; @load_serial
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #1040
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_ASN1_INTEGER_new
	mov	x19, x0
	cbz	x0, LBB0_14
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_BIO_new_file
	mov	x20, x0
	cbz	x0, LBB0_5
; %bb.2:
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	mov	w3, #1024
	bl	_a2i_ASN1_INTEGER
	cbz	w0, LBB0_12
; %bb.3:
	mov	x0, x19
	mov	x1, #0
	bl	_ASN1_INTEGER_to_BN
	mov	x22, x0
	cbnz	x0, LBB0_9
; %bb.4:
Lloh5:
	adrp	x8, _bio_err@GOTPAGE
Lloh6:
	ldr	x8, [x8, _bio_err@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_BIO_printf
	b	LBB0_16
LBB0_5:
	cbz	w23, LBB0_13
; %bb.6:
	bl	_ERR_clear_error
	bl	_BN_new
	mov	x22, x0
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x22
	mov	x1, x19
	bl	_rand_serial
	cbnz	w0, LBB0_9
LBB0_8:
Lloh10:
	adrp	x8, _bio_err@GOTPAGE
Lloh11:
	ldr	x8, [x8, _bio_err@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_BIO_printf
LBB0_9:
	cbz	x21, LBB0_16
; %bb.10:
	cbz	x22, LBB0_16
; %bb.11:
	str	x19, [x21]
	mov	x19, #0
	b	LBB0_16
LBB0_12:
Lloh15:
	adrp	x8, _bio_err@GOTPAGE
Lloh16:
	ldr	x8, [x8, _bio_err@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	str	x22, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_BIO_printf
	b	LBB0_15
LBB0_13:
	mov	x0, x22
	bl	_perror
LBB0_14:
	mov	x20, #0
LBB0_15:
	mov	x22, #0
LBB0_16:
	mov	x0, x20
	bl	_BIO_free
	mov	x0, x19
	bl	_ASN1_INTEGER_free
	ldur	x8, [x29, #-56]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	mov	x0, x22
	add	sp, sp, #1040
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

	.comm	_bio_err,4,2                    ; @bio_err
l_.str.1:                               ; @.str.1
	.asciz	"Out of memory\n"

l_.str.2:                               ; @.str.2
	.asciz	"unable to load number from %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"error converting number from bin to BIGNUM\n"

.subsections_via_symbols
