	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function send_command_packet
_send_command_packet:                   ## @send_command_packet
	.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	%rdi, %r12
	movl	(%rdi), %r15d
	subl	4(%rdi), %r15d
	movl	%r15d, %edi
	movl	$8, %esi
	callq	_FFALIGN
	movl	%eax, %r14d
	leal	-16(%r14), %esi
	leal	-9(%r14), %ebx
	testl	%esi, %esi
	cmovnsl	%esi, %ebx
	sarl	$3, %ebx
	movl	4(%r12), %edi
	addl	$8, %edi
	callq	_AV_WL32
	movl	4(%r12), %edi
	addl	$16, %edi
	movl	%ebx, %esi
	callq	_AV_WL32
	movl	4(%r12), %edi
	addl	$32, %edi
	addl	$-2, %ebx
	movl	%ebx, %esi
	callq	_AV_WL32
	movl	(%r12), %edi
	movl	%r14d, %edx
	subl	%r15d, %edx
	xorl	%esi, %esi
	callq	_memset
	movl	4(%r12), %esi
	movl	8(%r12), %edi
	movl	%r14d, %edx
	callq	_ffurl_write
	cmpl	%r14d, %eax
	jne	LBB0_1
## %bb.5:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%eax, %r15d
	movl	8(%r12), %r12d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%r15d, %r15d
	js	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %r9
	jmp	LBB0_4
LBB0_3:
	movl	%r15d, %edi
	callq	_AVUNERROR
	movl	%eax, %edi
	callq	_strerror
	movq	%rax, %r9
LBB0_4:
	leaq	L_.str(%rip), %rdx
	movl	%r12d, %edi
	movl	%ebx, %esi
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to write data of length %d: %d (%s)\n"

L_.str.1:                               ## @.str.1
	.asciz	"The server closed the connection"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_send_command_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function send_command_packet
_send_command_packet:                   ; @send_command_packet
	.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	x20, x0
	ldp	w8, w9, [x0]
	sub	w21, w8, w9
	mov	x0, x21
	mov	w1, #8
	bl	_FFALIGN
	mov	x19, x0
	sub	w1, w0, #16
	sub	w8, w0, #9
	cmp	w1, #0
	csel	w8, w8, w1, lt
	asr	w22, w8, #3
	ldr	w8, [x20, #4]
	add	w0, w8, #8
	bl	_AV_WL32
	ldr	w8, [x20, #4]
	add	w0, w8, #16
	mov	x1, x22
	bl	_AV_WL32
	ldr	w8, [x20, #4]
	add	w0, w8, #32
	sub	w1, w22, #2
	bl	_AV_WL32
	ldr	w0, [x20]
	sub	w2, w19, w21
	mov	w1, #0
	bl	_memset
	ldp	w1, w0, [x20, #4]
	mov	x2, x19
	bl	_ffurl_write
	cmp	w0, w19
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	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_2:
	mov	x21, x0
	ldr	w20, [x20, #8]
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	tbnz	w0, #31, LBB0_4
; %bb.3:
Lloh3:
	adrp	x5, l_.str.1@PAGE
Lloh4:
	add	x5, x5, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:
	mov	x0, x21
	bl	_AVUNERROR
	bl	_strerror
	mov	x5, x0
LBB0_5:
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x22
	mov	x3, x19
	mov	x4, x21
	bl	_av_log
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	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
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to write data of length %d: %d (%s)\n"

l_.str.1:                               ; @.str.1
	.asciz	"The server closed the connection"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_send_command_packet
.subsections_via_symbols
