	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function url_open_dyn_buf_internal
_url_open_dyn_buf_internal:             ## @url_open_dyn_buf_internal
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	testl	%esi, %esi
	movl	$1024, %ebx                     ## imm = 0x400
	cmovnel	%esi, %ebx
	leal	8(%rbx), %edi
	callq	_av_mallocz
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r12
	xorl	%eax, %eax
	testl	%r15d, %r15d
	movl	%ebx, (%r12)
	movl	4(%r12), %edi
	movq	_dyn_packet_buf_write@GOTPCREL(%rip), %rcx
	cmoveq	_dyn_buf_write@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	_dyn_buf_seek@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmovneq	%rax, %rcx
	movq	%rcx, (%rsp)
	movl	%ebx, %esi
	movl	$1, %edx
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	callq	_avio_alloc_context
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movl	%r15d, (%rax)
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r12, %rdi
	callq	_av_free
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_dyn_packet_buf_write,4,2       ## @dyn_packet_buf_write
	.comm	_dyn_buf_write,4,2              ## @dyn_buf_write
	.comm	_dyn_buf_seek,8,3               ## @dyn_buf_seek
	.no_dead_strip	_url_open_dyn_buf_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function url_open_dyn_buf_internal
_url_open_dyn_buf_internal:             ; @url_open_dyn_buf_internal
	.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
	mov	w8, #1024
	cmp	w1, #0
	csel	w22, w8, w1, eq
	add	w0, w22, #8
	bl	_av_mallocz
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	str	w22, [x0]
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x8, _dyn_packet_buf_write@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dyn_packet_buf_write@GOTPAGEOFF]
Lloh2:
	adrp	x9, _dyn_buf_write@GOTPAGE
Lloh3:
	ldr	x9, [x9, _dyn_buf_write@GOTPAGEOFF]
	cmp	w19, #0
	csel	x8, x9, x8, eq
	ldr	w5, [x8]
Lloh4:
	adrp	x8, _dyn_buf_seek@GOTPAGE
Lloh5:
	ldr	x8, [x8, _dyn_buf_seek@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	csel	x6, x8, xzr, eq
	mov	x1, x22
	mov	w2, #1
	mov	x3, x21
	mov	x4, #0
	bl	_avio_alloc_context
	str	x0, [x20]
	cbz	x0, LBB0_3
; %bb.2:
	str	w19, [x0]
	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_3:
	mov	x0, x21
	bl	_av_free
LBB0_4:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_dyn_packet_buf_write,4,2       ; @dyn_packet_buf_write
	.comm	_dyn_buf_write,4,2              ; @dyn_buf_write
	.comm	_dyn_buf_seek,8,3               ; @dyn_buf_seek
	.no_dead_strip	_url_open_dyn_buf_internal
.subsections_via_symbols
