	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function append_packet_chunked
_append_packet_chunked:                 ## @append_packet_chunked
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %ebx
	movl	4(%rsi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %r15d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SANE_CHUNK_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	movl	%r13d, %r12d
	cmpl	%eax, %r13d
	jle	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_ffio_limit
	movl	%eax, %r12d
	cmpq	$0, (%rbx)
	jns	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_SANE_CHUNK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_FFMIN
	movl	%eax, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_av_grow_packet
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movslq	%r15d, %rbx
	movq	16(%r14), %rsi
	addq	%rbx, %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_avio_read
	cmpl	%r12d, %eax
	jne	LBB0_7
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	subl	%r12d, %r13d
	jle	LBB0_10
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r14), %r15d
	jmp	LBB0_1
LBB0_5:
	movl	%eax, %r12d
	testl	%r13d, %r13d
	jg	LBB0_9
	jmp	LBB0_10
LBB0_7:
	movl	%eax, %r15d
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_FFMAX
	addq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_av_shrink_packet
	movl	%r15d, %r12d
	testl	%r13d, %r13d
	jle	LBB0_10
LBB0_9:
	movq	_AV_PKT_FLAG_CORRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r14)
LBB0_10:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r14)
	movl	(%r14), %eax
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_av_packet_unref
	movl	(%r14), %eax
LBB0_12:
	subl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	cmovgl	%eax, %r12d
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SANE_CHUNK_SIZE,4,2            ## @SANE_CHUNK_SIZE
	.comm	_AV_PKT_FLAG_CORRUPT,4,2        ## @AV_PKT_FLAG_CORRUPT
	.no_dead_strip	_append_packet_chunked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function append_packet_chunked
_append_packet_chunked:                 ; @append_packet_chunked
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldp	w24, w25, [x1]
Lloh0:
	adrp	x26, _SANE_CHUNK_SIZE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SANE_CHUNK_SIZE@GOTPAGEOFF]
	mov	w27, #26215
	movk	w27, #26214, lsl #16
	mov	x23, x24
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x26]
	mul	x8, x8, x27
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w8, w8, w9
	cmp	w20, w8
	mov	x22, x20
	b.le	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_ffio_limit
	mov	x22, x0
	ldr	x8, [x21]
	tbz	x8, #63, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w1, [x26]
	mov	x0, x22
	bl	_FFMIN
	mov	x22, x0
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_av_grow_packet
	tbnz	w0, #31, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19, #16]
	sxtw	x28, w23
	add	x1, x8, x28
	mov	x0, x21
	mov	x2, x22
	bl	_avio_read
	cmp	w0, w22
	b.ne	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w20, w20, w22
	cmp	w20, #1
	b.lt	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w23, [x19]
	b	LBB0_1
LBB0_8:
	mov	x22, x0
	cmp	w20, #0
	b.gt	LBB0_10
	b	LBB0_11
LBB0_9:
	mov	x23, x0
	mov	w1, #0
	bl	_FFMAX
	add	x1, x0, x28
	mov	x0, x19
	bl	_av_shrink_packet
	mov	x22, x23
	cmp	w20, #0
	b.le	LBB0_11
LBB0_10:
Lloh2:
	adrp	x8, _AV_PKT_FLAG_CORRUPT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_PKT_FLAG_CORRUPT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_11:
	str	w25, [x19, #4]
	ldr	w8, [x19]
	cbnz	w8, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_av_packet_unref
	ldr	w8, [x19]
LBB0_13:
	subs	w8, w8, w24
	csel	w0, w8, w22, gt
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SANE_CHUNK_SIZE,4,2            ; @SANE_CHUNK_SIZE
	.comm	_AV_PKT_FLAG_CORRUPT,4,2        ; @AV_PKT_FLAG_CORRUPT
	.no_dead_strip	_append_packet_chunked
.subsections_via_symbols
