	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtmp_close
_rtmp_close:                            ## @rtmp_close
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %r12
	xorl	%r14d, %r14d
	cmpl	$0, 48(%r12)
	jne	LBB0_5
## %bb.1:
	movq	$0, 24(%r12)
	cmpq	$0, 40(%r12)
	je	LBB0_3
## %bb.2:
	leaq	40(%r12), %rdi
	callq	_ff_rtmp_packet_destroy
LBB0_3:
	movq	(%r12), %rax
	movq	_STATE_FCPUBLISH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_gen_fcunpublish_stream
	movl	%eax, %r14d
LBB0_5:
	movq	(%r12), %rax
	movq	_STATE_HANDSHAKED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_gen_delete_stream
	movl	%eax, %r14d
LBB0_7:
	movq	8(%r12), %rax
	cmpl	$0, (%rax)
	jle	LBB0_10
## %bb.8:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rax
	movq	(%rax), %rdi
	addq	%r15, %rdi
	callq	_ff_rtmp_packet_destroy
	incq	%rbx
	movq	8(%r12), %rax
	movslq	(%rax), %rax
	addq	$8, %r15
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	movq	32(%r12), %rdi
	callq	_av_freep
	movq	8(%r12), %rax
	cmpl	$0, 4(%rax)
	jle	LBB0_13
## %bb.11:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rax
	movq	8(%rax), %rdi
	addq	%r15, %rdi
	callq	_ff_rtmp_packet_destroy
	incq	%rbx
	movq	8(%r12), %rax
	movslq	4(%rax), %rax
	addq	$8, %r15
	cmpq	%rax, %rbx
	jl	LBB0_12
LBB0_13:
	movq	32(%r12), %rdi
	addq	$8, %rdi
	callq	_av_freep
	movq	%r12, %rdi
	callq	_free_tracked_methods
	leaq	24(%r12), %rdi
	callq	_av_freep
	movl	16(%r12), %edi
	callq	_ffurl_close
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATE_FCPUBLISH,8,3            ## @STATE_FCPUBLISH
	.comm	_STATE_HANDSHAKED,8,3           ## @STATE_HANDSHAKED
	.no_dead_strip	_rtmp_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtmp_close
_rtmp_close:                            ; @rtmp_close
	.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	x21, x0
	ldr	x19, [x0]
	ldr	w8, [x19, #48]
	cbnz	w8, LBB0_5
; %bb.1:
	mov	x0, x19
	ldr	x8, [x0, #40]!
	stur	xzr, [x0, #-16]
	cbz	x8, LBB0_3
; %bb.2:
	bl	_ff_rtmp_packet_destroy
LBB0_3:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _STATE_FCPUBLISH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STATE_FCPUBLISH@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_5
; %bb.4:
	mov	x0, x21
	mov	x1, x19
	bl	_gen_fcunpublish_stream
	mov	x20, x0
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _STATE_HANDSHAKED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STATE_HANDSHAKED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_8
; %bb.7:
	mov	x0, x21
	mov	x1, x19
	bl	_gen_delete_stream
	mov	x20, x0
LBB0_8:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x21, #0
	mov	x22, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	add	x0, x8, x21
	bl	_ff_rtmp_packet_destroy
	add	x22, x22, #1
	ldr	x8, [x19, #8]
	ldrsw	x8, [x8]
	add	x21, x21, #8
	cmp	x22, x8
	b.lt	LBB0_10
LBB0_11:
	ldr	x0, [x19, #32]
	bl	_av_freep
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #4]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x21, #0
	mov	x22, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	x8, [x8, #8]
	add	x0, x8, x21
	bl	_ff_rtmp_packet_destroy
	add	x22, x22, #1
	ldr	x8, [x19, #8]
	ldrsw	x8, [x8, #4]
	add	x21, x21, #8
	cmp	x22, x8
	b.lt	LBB0_13
LBB0_14:
	ldr	x8, [x19, #32]
	add	x0, x8, #8
	bl	_av_freep
	mov	x0, x19
	bl	_free_tracked_methods
	add	x0, x19, #24
	bl	_av_freep
	ldr	w0, [x19, #16]
	bl	_ffurl_close
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_STATE_FCPUBLISH,8,3            ; @STATE_FCPUBLISH
	.comm	_STATE_HANDSHAKED,8,3           ; @STATE_HANDSHAKED
	.no_dead_strip	_rtmp_close
.subsections_via_symbols
