	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hls_open
_hls_open:                              ## @hls_open
	.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
	movq	_AVIO_FLAG_WRITE@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_1
## %bb.24:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_1:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movl	$1, (%rdi)
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_av_strstart
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movl	28(%r15), %edi
	movq	-40(%rbp), %rsi
	movl	$4, %edx
	callq	_av_strlcpy
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	28(%r15), %ecx
	leaq	L_.str.4(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	28(%r15), %esi
	movq	%r14, %rdi
	callq	_parse_playlist
	testl	%eax, %eax
	js	LBB0_19
## %bb.3:
	movl	(%r15), %eax
	testl	%eax, %eax
	je	LBB0_4
LBB0_20:
	movq	8(%r15), %rcx
	movq	%rcx, 16(%r15)
	xorl	%ebx, %ebx
	cmpl	$0, 24(%r15)
	jne	LBB0_23
## %bb.21:
	cmpl	$3, %eax
	jl	LBB0_23
## %bb.22:
	movl	%eax, %eax
	addq	%rcx, %rax
	addq	$-3, %rax
	movq	%rax, 16(%r15)
	jmp	LBB0_23
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_av_strstart
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	-40(%rbp), %rcx
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	jmp	LBB0_10
LBB0_4:
	movl	4(%r15), %r8d
	testl	%r8d, %r8d
	jle	LBB0_17
## %bb.5:
	movq	32(%r15), %r10
	cmpl	$1, %r8d
	jne	LBB0_11
## %bb.6:
	xorl	%edx, %edx
	movl	$-1, %esi
	xorl	%edi, %edi
	jmp	LBB0_13
LBB0_9:
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rcx
LBB0_10:
	xorl	%eax, %eax
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_19:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_hls_close
LBB0_23:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	%r8d, %r9d
	andl	$-2, %r9d
	xorl	%edx, %edx
	movl	$-1, %esi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r10,%rdx,8), %rbx
	movl	(%rbx), %ebx
	cmpl	%edi, %ebx
	setg	%cl
	testq	%rdx, %rdx
	sete	%al
	orb	%cl, %al
	cmovnel	%ebx, %edi
	movq	8(%r10,%rdx,8), %rax
	movl	%esi, %ecx
	cmovnel	%edx, %ecx
	movl	(%rax), %eax
	leal	1(%rdx), %esi
	cmpl	%edi, %eax
	cmovgl	%eax, %edi
	cmovlel	%ecx, %esi
	addq	$2, %rdx
	cmpq	%r9, %rdx
	jne	LBB0_12
LBB0_13:
	testb	$1, %r8b
	je	LBB0_15
## %bb.14:
	movq	(%r10,%rdx,8), %rax
	testq	%rdx, %rdx
	cmovel	%edx, %esi
	cmpl	%edi, (%rax)
	cmovgl	%edx, %esi
LBB0_15:
	movl	28(%r15), %edi
	movslq	%esi, %rax
	movq	(%r10,%rax,8), %rax
	movq	8(%rax), %rsi
	movl	$4, %edx
	callq	_av_strlcpy
	movl	28(%r15), %esi
	movq	%r14, %rdi
	callq	_parse_playlist
	testl	%eax, %eax
	js	LBB0_19
## %bb.16:
	movl	(%r15), %eax
	testl	%eax, %eax
	jne	LBB0_20
LBB0_17:
	movl	(%r12), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIO_FLAG_WRITE,4,2            ## @AVIO_FLAG_WRITE
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hls+"

L_.str.1:                               ## @.str.1
	.asciz	"hls://"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"No nested protocol specified. Specify e.g. hls+http://%s\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"Unsupported url %s\n"

	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.4:                               ## @.str.4
	.asciz	"Using the hls protocol is discouraged, please try using the hls demuxer instead. The hls demuxer should be more complete and work as well as the protocol implementation. (If not, please report it.) To use the demuxer, simply use %s as url.\n"

L_.str.5:                               ## @.str.5
	.asciz	"Empty playlist\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hls_open
_hls_open:                              ; @hls_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _AVIO_FLAG_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVIO_FLAG_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_AVERROR
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	mov	w8, #1
	str	w8, [x0]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	x0, x20
	bl	_av_strstart
	cbz	x0, LBB0_8
; %bb.3:
	ldr	w0, [x21, #28]
	ldr	x1, [sp, #8]
	mov	w2, #4
	bl	_av_strlcpy
Lloh8:
	adrp	x22, _AV_LOG_WARNING@GOTPAGE
Lloh9:
	ldr	x22, [x22, _AV_LOG_WARNING@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	w8, [x21, #28]
	str	x8, [sp]
Lloh10:
	adrp	x2, l_.str.4@PAGE
Lloh11:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_av_log
	ldr	w1, [x21, #28]
	mov	x0, x19
	bl	_parse_playlist
	tbnz	w0, #31, LBB0_19
; %bb.4:
	ldr	w8, [x21]
	cbz	w8, LBB0_10
LBB0_5:
	mov	w20, #0
	ldr	x9, [x21, #8]
	str	x9, [x21, #16]
	ldr	w10, [x21, #24]
	cbnz	w10, LBB0_20
; %bb.6:
	cmp	w8, #3
	b.lt	LBB0_20
; %bb.7:
	mov	w20, #0
	add	x8, x9, w8, uxtw
	sub	x8, x8, #3
	str	x8, [x21, #16]
	b	LBB0_20
LBB0_8:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #8
	mov	x0, x20
	bl	_av_strstart
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	cbz	x0, LBB0_16
; %bb.9:
	ldr	x8, [sp, #8]
	str	x8, [sp]
Lloh17:
	adrp	x2, l_.str.2@PAGE
Lloh18:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_10:
	ldr	w8, [x21, #4]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.11:
	mov	x10, #0
	mov	w11, #0
	ldr	x9, [x21, #32]
	mov	w12, #-1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x9, x10, lsl #3]
	ldr	w13, [x13]
	cmp	w13, w11
	ccmp	x10, #0, #4, le
	csel	w11, w13, w11, eq
	csel	w12, w10, w12, eq
	add	x10, x10, #1
	cmp	x8, x10
	b.ne	LBB0_12
; %bb.13:
	ldr	w0, [x21, #28]
	ldr	x8, [x9, w12, sxtw #3]
	ldr	x1, [x8, #8]
	mov	w2, #4
	bl	_av_strlcpy
	ldr	w1, [x21, #28]
	mov	x0, x19
	bl	_parse_playlist
	tbnz	w0, #31, LBB0_19
; %bb.14:
	ldr	w8, [x21]
	cbnz	w8, LBB0_5
LBB0_15:
	ldr	w1, [x22]
Lloh19:
	adrp	x2, l_.str.5@PAGE
Lloh20:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh21:
	adrp	x8, _EIO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_18
LBB0_16:
	str	x20, [sp]
Lloh23:
	adrp	x2, l_.str.3@PAGE
Lloh24:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_17:
	mov	x0, x19
	bl	_av_log
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_19:
	mov	x20, x0
	mov	x0, x19
	bl	_hls_close
LBB0_20:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIO_FLAG_WRITE,4,2            ; @AVIO_FLAG_WRITE
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hls+"

l_.str.1:                               ; @.str.1
	.asciz	"hls://"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"No nested protocol specified. Specify e.g. hls+http://%s\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"Unsupported url %s\n"

	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.4:                               ; @.str.4
	.asciz	"Using the hls protocol is discouraged, please try using the hls demuxer instead. The hls demuxer should be more complete and work as well as the protocol implementation. (If not, please report it.) To use the demuxer, simply use %s as url.\n"

l_.str.5:                               ; @.str.5
	.asciz	"Empty playlist\n"

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