	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BIO_new_mem_buf                ## -- Begin function BIO_new_mem_buf
	.p2align	4, 0x90
_BIO_new_mem_buf:                       ## @BIO_new_mem_buf
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	testl	%esi, %esi
	js	LBB0_3
## %bb.4:
	movl	%esi, %r14d
	jmp	LBB0_5
LBB0_1:
	movq	_BIO_F_BIO_NEW_MEM_BUF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BIO_R_NULL_PARAMETER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_BIOerr
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_3:
	movq	%r15, %rdi
	callq	_strlen
	movq	%rax, %r14
LBB0_5:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_BIO_s_mem
	movl	%eax, %edi
	callq	_BIO_new
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	16(%rax), %rcx
	movq	(%rcx), %rdx
	movq	%r15, 16(%rdx)
	movq	%r14, (%rdx)
	movq	%r14, 8(%rdx)
	movq	(%rcx), %rdx
	movq	8(%rcx), %rcx
	movq	16(%rdx), %rsi
	movq	%rsi, 16(%rcx)
	movups	(%rdx), %xmm0
	movups	%xmm0, (%rcx)
	movq	_BIO_FLAGS_MEM_RDONLY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%rax)
	movq	$0, (%rax)
	movq	%rax, %rbx
LBB0_7:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BIO_F_BIO_NEW_MEM_BUF,4,2      ## @BIO_F_BIO_NEW_MEM_BUF
	.comm	_BIO_R_NULL_PARAMETER,4,2       ## @BIO_R_NULL_PARAMETER
	.comm	_BIO_FLAGS_MEM_RDONLY,4,2       ## @BIO_FLAGS_MEM_RDONLY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BIO_new_mem_buf                ; -- Begin function BIO_new_mem_buf
	.p2align	2
_BIO_new_mem_buf:                       ; @BIO_new_mem_buf
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	tbnz	w1, #31, LBB0_4
; %bb.2:
	mov	w20, w1
	b	LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _BIO_F_BIO_NEW_MEM_BUF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BIO_F_BIO_NEW_MEM_BUF@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _BIO_R_NULL_PARAMETER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BIO_R_NULL_PARAMETER@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_BIOerr
	mov	x0, #0
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_strlen
	mov	x20, x0
LBB0_5:
	bl	_BIO_s_mem
	bl	_BIO_new
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x8, [x0, #16]
	ldp	x9, x8, [x8]
	stp	x20, x19, [x9, #8]
	str	x20, [x9]
	ldr	q0, [x9]
	str	x19, [x8, #16]
Lloh6:
	adrp	x9, _BIO_FLAGS_MEM_RDONLY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BIO_FLAGS_MEM_RDONLY@GOTPAGEOFF]
	str	q0, [x8]
Lloh8:
	ldr	w8, [x9]
	ldr	w9, [x0, #8]
	orr	w8, w9, w8
	str	w8, [x0, #8]
	str	xzr, [x0]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BIO_F_BIO_NEW_MEM_BUF,4,2      ; @BIO_F_BIO_NEW_MEM_BUF
	.comm	_BIO_R_NULL_PARAMETER,4,2       ; @BIO_R_NULL_PARAMETER
	.comm	_BIO_FLAGS_MEM_RDONLY,4,2       ; @BIO_FLAGS_MEM_RDONLY
.subsections_via_symbols
