	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function next_serial
_next_serial:                           ## @next_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	%rbx
	subq	$1032, %rsp                     ## imm = 0x408
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_ASN1_INTEGER_new
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_BIO_new_file
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %r14
	leaq	-1056(%rbp), %rdx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movl	$1024, %ecx                     ## imm = 0x400
	callq	_a2i_ASN1_INTEGER
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ASN1_INTEGER_to_BN
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_ASN1_INTEGER_free
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_BN_add_word
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_11
## %bb.5:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_BN_to_ASN1_INTEGER
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movq	%rax, %rbx
	jmp	LBB0_12
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_8:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_ERR_clear_error
	movq	_bio_err@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	callq	_BIO_printf
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ASN1_INTEGER_set
	movl	$0, %r15d
	testl	%eax, %eax
	jne	LBB0_12
	jmp	LBB0_11
LBB0_9:
	movq	_bio_err@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdx
	callq	_BIO_printf
LBB0_10:
	xorl	%r15d, %r15d
LBB0_11:
	movq	%rbx, %rdi
	callq	_ASN1_INTEGER_free
	xorl	%ebx, %ebx
LBB0_12:
	movq	%r14, %rdi
	callq	_BIO_free_all
	movq	%r15, %rdi
	callq	_BN_free
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movq	%rbx, %rax
	addq	$1032, %rsp                     ## imm = 0x408
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	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	"Warning: could not open file %s for reading, using serial number: 1\n"

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

	.no_dead_strip	_next_serial
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function next_serial
_next_serial:                           ; @next_serial
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #1040
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_ASN1_INTEGER_new
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_BIO_new_file
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.2:
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	mov	w3, #1024
	bl	_a2i_ASN1_INTEGER
	cbz	w0, LBB0_8
; %bb.3:
	mov	x0, x19
	mov	x1, #0
	bl	_ASN1_INTEGER_to_BN
	mov	x21, x0
	cbz	x0, LBB0_10
; %bb.4:
	mov	x0, x19
	bl	_ASN1_INTEGER_free
	mov	x0, x21
	mov	w1, #1
	bl	_BN_add_word
	cbz	w0, LBB0_9
; %bb.5:
	mov	x0, x21
	mov	x1, #0
	bl	_BN_to_ASN1_INTEGER
	mov	x19, x0
	cbnz	x0, LBB0_11
	b	LBB0_10
LBB0_6:
	mov	x20, #0
	mov	x21, #0
	b	LBB0_10
LBB0_7:
	bl	_ERR_clear_error
Lloh5:
	adrp	x8, _bio_err@GOTPAGE
Lloh6:
	ldr	x8, [x8, _bio_err@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_BIO_printf
	mov	x0, x19
	mov	w1, #1
	bl	_ASN1_INTEGER_set
	mov	x21, #0
	cbnz	w0, LBB0_11
	b	LBB0_10
LBB0_8:
Lloh10:
	adrp	x8, _bio_err@GOTPAGE
Lloh11:
	ldr	x8, [x8, _bio_err@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x21
	bl	_BIO_printf
	mov	x21, #0
	b	LBB0_10
LBB0_9:
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	bl	_ASN1_INTEGER_free
	mov	x19, #0
LBB0_11:
	mov	x0, x20
	bl	_BIO_free_all
	mov	x0, x21
	bl	_BN_free
	ldur	x8, [x29, #-40]
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_13
; %bb.12:
	mov	x0, x19
	add	sp, sp, #1040
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_13:
	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 AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.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	"Warning: could not open file %s for reading, using serial number: 1\n"

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

	.no_dead_strip	_next_serial
.subsections_via_symbols
