	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reader_close
_reader_close:                          ## @reader_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	testq	%r15, %r15
	je	LBB0_11
## %bb.1:
	movq	48(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	leaq	48(%r15), %r14
	callq	_hb_bd_stop
	movq	%r14, %rdi
	callq	_hb_bd_close
	jmp	LBB0_7
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	40(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	leaq	40(%r15), %r14
	callq	_hb_dvd_stop
	movq	%r14, %rdi
	callq	_hb_dvd_close
	jmp	LBB0_7
LBB0_5:
	cmpq	$0, 32(%r15)
	je	LBB0_7
## %bb.6:
	leaq	32(%r15), %rdi
	callq	_hb_stream_close
LBB0_7:
	cmpl	$0, (%r15)
	jle	LBB0_10
## %bb.8:
	movl	$24, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rdi
	addq	%r14, %rdi
	callq	_hb_buffer_list_close
	incq	%rbx
	movslq	(%r15), %rax
	addq	$56, %r14
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	movq	16(%r15), %rdi
	callq	_free
	movq	8(%r15), %rdi
	callq	_free
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_reader_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reader_close
_reader_close:                          ; @reader_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
	ldr	x19, [x0]
	cbz	x19, LBB0_3
; %bb.1:
	mov	x20, x19
	ldr	x0, [x20, #48]!
	cbz	x0, LBB0_4
; %bb.2:
	bl	_hb_bd_stop
	mov	x0, x20
	bl	_hb_bd_close
	b	LBB0_8
LBB0_3:
	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_4:
	mov	x20, x19
	ldr	x0, [x20, #40]!
	cbz	x0, LBB0_6
; %bb.5:
	bl	_hb_dvd_stop
	mov	x0, x20
	bl	_hb_dvd_close
	b	LBB0_8
LBB0_6:
	mov	x0, x19
	ldr	x8, [x0, #32]!
	cbz	x8, LBB0_8
; %bb.7:
	bl	_hb_stream_close
LBB0_8:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x20, #0
	mov	w21, #24
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x21
	bl	_hb_buffer_list_close
	add	x20, x20, #1
	ldrsw	x8, [x19]
	add	x21, x21, #56
	cmp	x20, x8
	b.lt	LBB0_10
LBB0_11:
	ldr	x0, [x19, #16]
	bl	_free
	ldr	x0, [x19, #8]
	bl	_free
	mov	x0, x19
	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	_free
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_reader_close
.subsections_via_symbols
