	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bio_nwrite0
_bio_nwrite0:                           ## @bio_nwrite0
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_BIO_clear_retry_flags
	cmpl	$0, 8(%r15)
	je	LBB0_1
## %bb.2:
	movq	(%r15), %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 48(%rbx)
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	setne	%dil
	callq	_assert
	movq	$0, 40(%rbx)
	cmpq	$0, 32(%rbx)
	je	LBB0_4
## %bb.3:
	movq	_BIO_F_BIO_NWRITE0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BIO_R_BROKEN_PIPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_BIOerr
	movl	$-1, %r15d
	jmp	LBB0_9
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_4:
	movq	8(%rbx), %rax
	xorl	%edi, %edi
	cmpq	16(%rbx), %rax
	setbe	%dil
	callq	_assert
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	%rcx, %rdx
	subq	%rax, %rdx
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_BIO_set_retry_write
	movl	$-1, %r15d
	jmp	LBB0_9
LBB0_6:
	addq	24(%rbx), %rax
	xorl	%esi, %esi
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rsi
	subq	%rsi, %rax
	leaq	(%rax,%rdx), %rsi
	movq	%rcx, %r15
	subq	%rax, %r15
	cmpq	%rcx, %rsi
	cmovbeq	%rdx, %r15
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	movq	(%rbx), %rdx
	addq	%rax, %rdx
	movq	%rdx, (%r14)
LBB0_8:
	addq	%r15, %rax
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	setbe	%dil
	callq	_assert
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BIO_F_BIO_NWRITE0,4,2          ## @BIO_F_BIO_NWRITE0
	.comm	_BIO_R_BROKEN_PIPE,4,2          ## @BIO_R_BROKEN_PIPE
	.no_dead_strip	_bio_nwrite0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bio_nwrite0
_bio_nwrite0:                           ; @bio_nwrite0
	.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	x19, x1
	mov	x20, x0
	bl	_BIO_clear_retry_flags
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	x21, [x20]
	cmp	x21, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x21, #48]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x21]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	str	xzr, [x21, #40]
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _BIO_F_BIO_NWRITE0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BIO_F_BIO_NWRITE0@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _BIO_R_BROKEN_PIPE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BIO_R_BROKEN_PIPE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_BIOerr
	mov	w20, #-1
	b	LBB0_9
LBB0_3:
	mov	w20, #0
	b	LBB0_9
LBB0_4:
	ldp	x8, x9, [x21, #8]
	cmp	x8, x9
	cset	w0, ls
	bl	_assert
	ldp	x10, x8, [x21, #8]
	subs	x9, x8, x10
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_BIO_set_retry_write
	mov	w20, #-1
	b	LBB0_9
LBB0_6:
	ldr	x11, [x21, #24]
	add	x10, x11, x10
	cmp	x10, x8
	csel	x11, xzr, x8, lo
	sub	x10, x10, x11
	add	x11, x10, x9
	sub	x12, x8, x10
	cmp	x11, x8
	csel	x20, x12, x9, hi
	cbz	x19, LBB0_8
; %bb.7:
	ldr	x9, [x21]
	add	x9, x9, x10
	str	x9, [x19]
LBB0_8:
	add	x9, x20, x10
	cmp	x9, x8
	cset	w0, ls
	bl	_assert
LBB0_9:
	mov	x0, x20
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BIO_F_BIO_NWRITE0,4,2          ; @BIO_F_BIO_NWRITE0
	.comm	_BIO_R_BROKEN_PIPE,4,2          ; @BIO_R_BROKEN_PIPE
	.no_dead_strip	_bio_nwrite0
.subsections_via_symbols
