	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_REDIS_ERR@GOTPCREL(%rip), %r12
	cmpq	$0, 16(%rdi)
	jne	LBB0_9
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_sdslen
	testq	%rax, %rax
	jle	LBB0_7
## %bb.2:
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	je	LBB0_7
## %bb.4:
	movl	%eax, %r15d
	movl	(%rbx), %edi
	callq	_sdslen
	movl	(%rbx), %edi
	cmpl	%eax, %r15d
	jne	LBB0_6
## %bb.5:
	callq	_sdsfree
	xorl	%eax, %eax
	callq	_sdsempty
	movl	%eax, (%rbx)
	jmp	LBB0_7
LBB0_6:
	movl	%r15d, %esi
	movl	$-1, %edx
	callq	_sdsrange
LBB0_7:
	movq	_REDIS_OK@GOTPCREL(%rip), %r12
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:
	movl	(%rbx), %edi
	callq	_sdslen
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	movl	%ecx, (%r14)
LBB0_9:
	movl	(%r12), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REDIS_ERR,4,2                  ## @REDIS_ERR
	.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_11
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_sdslen
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.3:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	tbnz	w0, #31, LBB0_1
; %bb.4:
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.5:
	ldr	w0, [x20]
	bl	_sdslen
	mov	x8, x0
	ldr	w0, [x20]
	cmp	w21, w8
	b.ne	LBB0_7
; %bb.6:
	bl	_sdsfree
	bl	_sdsempty
	str	w0, [x20]
	b	LBB0_8
LBB0_7:
	mov	x1, x21
	mov	w2, #-1
	bl	_sdsrange
LBB0_8:
	cbz	x19, LBB0_10
; %bb.9:
	ldr	w0, [x20]
	bl	_sdslen
	cmp	x0, #0
	cset	w8, eq
	str	w8, [x19]
LBB0_10:
Lloh2:
	adrp	x8, _REDIS_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REDIS_OK@GOTPAGEOFF]
LBB0_11:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_REDIS_ERR,4,2                  ; @REDIS_ERR
	.comm	_REDIS_OK,4,2                   ; @REDIS_OK
.subsections_via_symbols
