	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtsp_setup
_rtsp_setup:                            ## @rtsp_setup
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r15
	callq	_rtsp_send_setup_request
	movq	%rax, %r13
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_8
## %bb.1:
	movq	%rbx, %rdi
	callq	_rtsp_read_response
	movq	%rax, %r13
	cmpq	(%r12), %rax
	jne	LBB0_8
## %bb.2:
	movl	(%r15), %edi
	callq	_rtsp_get_session_header
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_strlen
	movq	%rax, %r12
	movq	_SESSION_HEADER_LENGTH_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jbe	LBB0_4
## %bb.3:
	movq	_VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	leaq	1(%r12), %rdi
	callq	_malloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_strncpy
	jmp	LBB0_8
LBB0_6:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
LBB0_7:
	movq	(%rax), %r13
LBB0_8:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_SESSION_HEADER_LENGTH_MAX,8,3  ## @SESSION_HEADER_LENGTH_MAX
	.comm	_VC_CONTAINER_ERROR_FORMAT_INVALID,8,3 ## @VC_CONTAINER_ERROR_FORMAT_INVALID
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ## @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.no_dead_strip	_rtsp_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtsp_setup
_rtsp_setup:                            ; @rtsp_setup
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0]
	ldr	x22, [x8]
	bl	_rtsp_send_setup_request
	mov	x19, x0
Lloh0:
	adrp	x23, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.1:
	mov	x0, x21
	bl	_rtsp_read_response
	mov	x19, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.2:
	ldr	w0, [x22]
	bl	_rtsp_get_session_header
	mov	x21, x0
	bl	_strlen
Lloh2:
	adrp	x8, _SESSION_HEADER_LENGTH_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SESSION_HEADER_LENGTH_MAX@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ls	LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	mov	x22, x0
	add	x0, x0, #1
	bl	_malloc
	str	x0, [x20]
	cbz	x0, LBB0_6
; %bb.5:
	mov	x1, x21
	mov	x2, x22
	bl	_strncpy
	b	LBB0_8
LBB0_6:
Lloh7:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
LBB0_7:
	ldr	x19, [x8]
LBB0_8:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_SESSION_HEADER_LENGTH_MAX,8,3  ; @SESSION_HEADER_LENGTH_MAX
	.comm	_VC_CONTAINER_ERROR_FORMAT_INVALID,8,3 ; @VC_CONTAINER_ERROR_FORMAT_INVALID
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ; @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.no_dead_strip	_rtsp_setup
.subsections_via_symbols
