	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_redisBufferWrite               ## -- Begin function redisBufferWrite
	.p2align	4, 0x90
_redisBufferWrite:                      ## @redisBufferWrite
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_REDIS_ERR@GOTPCREL(%rip), %r13
	cmpq	$0, 16(%rdi)
	jne	LBB0_13
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_sdslen
	testq	%rax, %rax
	jle	LBB0_11
## %bb.2:
	movl	4(%rbx), %r15d
	movl	8(%rbx), %r12d
	movl	%r15d, %edi
	callq	_sdslen
	movl	%r12d, %edi
	movl	%r15d, %esi
	movq	%rax, %rdx
	callq	_write
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.7:
	movl	%eax, %r15d
	testl	%eax, %eax
	jle	LBB0_11
## %bb.8:
	movl	4(%rbx), %edi
	callq	_sdslen
	movl	4(%rbx), %edi
	cmpl	%eax, %r15d
	jne	LBB0_10
## %bb.9:
	callq	_sdsfree
	xorl	%eax, %eax
	callq	_sdsempty
	movl	%eax, 4(%rbx)
	jmp	LBB0_11
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	_REDIS_BLOCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_11
LBB0_5:
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.6:
	movq	_REDIS_ERR_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	___redisSetError
	jmp	LBB0_13
LBB0_10:
	movl	%r15d, %esi
	movl	$-1, %edx
	callq	_sdsrange
LBB0_11:
	movq	_REDIS_OK@GOTPCREL(%rip), %r13
	testq	%r14, %r14
	je	LBB0_13
## %bb.12:
	movl	4(%rbx), %edi
	callq	_sdslen
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	movl	%ecx, (%r14)
LBB0_13:
	movl	(%r13), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REDIS_ERR,4,2                  ## @REDIS_ERR
	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.comm	_REDIS_BLOCK,4,2                ## @REDIS_BLOCK
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_REDIS_ERR_IO,4,2               ## @REDIS_ERR_IO
	.comm	_REDIS_OK,4,2                   ## @REDIS_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_redisBufferWrite               ; -- Begin function redisBufferWrite
	.p2align	2
_redisBufferWrite:                      ; @redisBufferWrite
	.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
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _REDIS_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REDIS_ERR@GOTPAGEOFF]
	b	LBB0_14
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_sdslen
	cmp	x0, #1
	b.lt	LBB0_11
; %bb.3:
	ldp	w22, w21, [x20, #4]
	mov	x0, x22
	bl	_sdslen
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_write
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.4:
	mov	x21, x0
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.5:
	ldr	w0, [x20, #4]
	bl	_sdslen
	mov	x8, x0
	ldr	w0, [x20, #4]
	cmp	w21, w8
	b.ne	LBB0_9
; %bb.6:
	bl	_sdsfree
	bl	_sdsempty
	str	w0, [x20, #4]
	b	LBB0_11
LBB0_7:
Lloh2:
	adrp	x8, _errno@GOTPAGE
Lloh3:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.8:
	ldr	w9, [x20]
Lloh8:
	adrp	x10, _REDIS_BLOCK@GOTPAGE
Lloh9:
	ldr	x10, [x10, _REDIS_BLOCK@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	and	w9, w10, w9
Lloh11:
	adrp	x10, _EINTR@GOTPAGE
Lloh12:
	ldr	x10, [x10, _EINTR@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	w9, #0
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_11
	b	LBB0_15
LBB0_9:
	mov	x1, x21
	mov	w2, #-1
	bl	_sdsrange
	b	LBB0_11
LBB0_10:
Lloh14:
	adrp	x9, _EINTR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _EINTR@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
LBB0_11:
	cbz	x19, LBB0_13
; %bb.12:
	ldr	w0, [x20, #4]
	bl	_sdslen
	cmp	x0, #0
	cset	w8, eq
	str	w8, [x19]
LBB0_13:
Lloh17:
	adrp	x8, _REDIS_OK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _REDIS_OK@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
	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_15:
Lloh19:
	adrp	x8, _REDIS_ERR_IO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _REDIS_ERR_IO@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, #0
	bl	___redisSetError
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_REDIS_ERR,4,2                  ; @REDIS_ERR
	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.comm	_REDIS_BLOCK,4,2                ; @REDIS_BLOCK
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_REDIS_ERR_IO,4,2               ; @REDIS_ERR_IO
	.comm	_REDIS_OK,4,2                   ; @REDIS_OK
.subsections_via_symbols
