	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtsp_read_header
_rtsp_read_header:                      ## @rtsp_read_header
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	cmpq	$0, (%r15)
	jle	LBB0_1
## %bb.2:
	movq	_RTSP_FLAG_LISTEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	8(%r15), %eax
	orl	%ecx, %eax
	movl	%eax, 8(%r15)
	testl	%eax, %ecx
	je	LBB0_6
LBB0_4:
	movq	%r14, %rdi
	callq	_rtsp_listen
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
	jmp	LBB0_5
LBB0_1:
	movl	8(%r15), %eax
	movq	_RTSP_FLAG_LISTEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	jne	LBB0_4
LBB0_6:
	movq	%r14, %rdi
	callq	_ff_rtsp_connect
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.7:
	movl	(%r14), %edi
	testl	%edi, %edi
	je	LBB0_8
## %bb.9:
	movl	$8, %esi
	callq	_av_mallocz_array
	movq	%rax, 24(%r15)
	movslq	(%r14), %rcx
	testq	%rax, %rax
	jne	LBB0_12
## %bb.10:
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_8:
	movq	$0, 24(%r15)
LBB0_11:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
LBB0_12:
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 32(%r15)
	cmpq	$0, 16(%r15)
	jne	LBB0_5
## %bb.13:
	movq	%r14, %rdi
	callq	_rtsp_read_play
	testl	%eax, %eax
	js	LBB0_14
LBB0_5:
	xorl	%ebx, %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_ff_rtsp_close_streams
	movq	%r14, %rdi
	callq	_ff_rtsp_close_connections
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_RTSP_FLAG_LISTEN,4,2           ## @RTSP_FLAG_LISTEN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_rtsp_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtsp_read_header
_rtsp_read_header:                      ; @rtsp_read_header
	.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, x0
	ldr	x21, [x0, #8]
	ldr	x8, [x21]
	cmp	x8, #0
	b.le	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _RTSP_FLAG_LISTEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTSP_FLAG_LISTEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x21, #8]
	orr	w9, w9, w8
	str	w9, [x21, #8]
	tst	w8, w9
	b.eq	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_rtsp_listen
	mov	x20, x0
	cbnz	w0, LBB0_14
	b	LBB0_13
LBB0_3:
	ldr	w9, [x21, #8]
Lloh3:
	adrp	x8, _RTSP_FLAG_LISTEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RTSP_FLAG_LISTEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w9
	b.ne	LBB0_2
LBB0_4:
	mov	x0, x19
	bl	_ff_rtsp_connect
	mov	x20, x0
	cbnz	w0, LBB0_14
; %bb.5:
	ldr	w0, [x19]
	cbz	w0, LBB0_9
; %bb.6:
	mov	w1, #8
	bl	_av_mallocz_array
	str	x0, [x21, #24]
	ldrsw	x8, [x19]
	cbnz	x0, LBB0_11
; %bb.7:
	cbz	w8, LBB0_10
; %bb.8:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	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
LBB0_9:
	mov	x8, #0
	mov	x0, #0
	str	xzr, [x21, #24]
	b	LBB0_11
LBB0_10:
	mov	x8, #0
	mov	x0, #0
LBB0_11:
	add	x8, x0, x8, lsl #2
	str	x8, [x21, #32]
	ldr	x8, [x21, #16]
	cbnz	x8, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_rtsp_read_play
	tbnz	w0, #31, LBB0_15
LBB0_13:
	mov	w20, #0
LBB0_14:
	mov	x0, x20
	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_15:
	mov	x20, x0
	mov	x0, x19
	bl	_ff_rtsp_close_streams
	mov	x0, x19
	bl	_ff_rtsp_close_connections
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RTSP_FLAG_LISTEN,4,2           ; @RTSP_FLAG_LISTEN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_rtsp_read_header
.subsections_via_symbols
