	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rand_serial                    ## -- Begin function rand_serial
	.p2align	4, 0x90
_rand_serial:                           ## @rand_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	%rdi, %rbx
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_8
LBB0_2:
	movq	_SERIAL_RAND_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BN_RAND_TOP_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BN_RAND_BOTTOM_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_BN_rand
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	testq	%r12, %r12
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_BN_to_ASN1_INTEGER
	testl	%eax, %eax
	je	LBB0_6
LBB0_5:
	movl	$1, %r15d
LBB0_6:
	cmpq	%r14, %rbx
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_BN_free
LBB0_8:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SERIAL_RAND_BITS,4,2           ## @SERIAL_RAND_BITS
	.comm	_BN_RAND_TOP_ANY,4,2            ## @BN_RAND_TOP_ANY
	.comm	_BN_RAND_BOTTOM_ANY,4,2         ## @BN_RAND_BOTTOM_ANY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rand_serial                    ; -- Begin function rand_serial
	.p2align	2
_rand_serial:                           ; @rand_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
	mov	x21, x1
	mov	x19, x0
	mov	x20, x0
	cbnz	x0, LBB0_2
; %bb.1:
	bl	_BN_new
	mov	x20, x0
	cbz	x0, LBB0_8
LBB0_2:
Lloh0:
	adrp	x8, _SERIAL_RAND_BITS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SERIAL_RAND_BITS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _BN_RAND_TOP_ANY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BN_RAND_TOP_ANY@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _BN_RAND_BOTTOM_ANY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BN_RAND_BOTTOM_ANY@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_BN_rand
	cbz	w0, LBB0_6
; %bb.3:
	cbz	x21, LBB0_5
; %bb.4:
	mov	x0, x20
	mov	x1, x21
	bl	_BN_to_ASN1_INTEGER
	cbz	w0, LBB0_6
LBB0_5:
	mov	w21, #1
	cmp	x20, x19
	b.ne	LBB0_7
	b	LBB0_9
LBB0_6:
	mov	w21, #0
	cmp	x20, x19
	b.eq	LBB0_9
LBB0_7:
	mov	x0, x20
	bl	_BN_free
	b	LBB0_9
LBB0_8:
	mov	w21, #0
LBB0_9:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SERIAL_RAND_BITS,4,2           ; @SERIAL_RAND_BITS
	.comm	_BN_RAND_TOP_ANY,4,2            ; @BN_RAND_TOP_ANY
	.comm	_BN_RAND_BOTTOM_ANY,4,2         ; @BN_RAND_BOTTOM_ANY
.subsections_via_symbols
