	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_bd_stream_open              ## -- Begin function hb_bd_stream_open
	.p2align	4, 0x90
_hb_bd_stream_open:                     ## @hb_bd_stream_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	%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
	movl	$72, %edi
	movl	$1, %esi
	callq	_calloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rbx, 64(%r15)
	movq	$0, 56(%r15)
	movq	%r14, 48(%r15)
	movq	$0, 40(%r15)
	movq	$0, 24(%r15)
	movl	(%r14), %esi
	movl	4(%r14), %ecx
	movq	_V@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_update_ts_streams
	movl	16(%r14), %edi
	xorl	%esi, %esi
	callq	_hb_list_item
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	$1, %ebx
	movq	_A@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movzwl	(%rax), %esi
	movl	4(%rax), %edx
	movl	8(%rax), %ecx
	movl	(%r12), %r8d
	movq	%r15, %rdi
	xorl	%r9d, %r9d
	callq	_update_ts_streams
	movl	16(%r14), %edi
	movl	%ebx, %esi
	callq	_hb_list_item
	incl	%ebx
	testq	%rax, %rax
	jne	LBB0_4
LBB0_5:
	movl	12(%r14), %edi
	xorl	%esi, %esi
	callq	_hb_list_item
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movl	$1, %ebx
	movq	_HB_SUBTITLE_EMBEDDED_CC_TAG@GOTPCREL(%rip), %r12
	movq	_S@GOTPCREL(%rip), %r13
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	12(%r14), %edi
	movl	%ebx, %esi
	callq	_hb_list_item
	incl	%ebx
	testq	%rax, %rax
	je	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax), %ecx
	cmpl	(%r12), %ecx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movzwl	%cx, %esi
	movl	4(%rax), %ecx
	movl	(%r13), %r8d
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_update_ts_streams
	jmp	LBB0_9
LBB0_10:
	movq	_HBTF_SCAN_COMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_12
## %bb.11:
	movq	_P@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movl	$4097, %esi                     ## imm = 0x1001
	xorl	%edx, %edx
	movl	$-1, %ecx
	xorl	%r9d, %r9d
	callq	_update_ts_streams
LBB0_12:
	movl	$192, (%r15)
	movq	_transport@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r15)
	cmpl	$0, 8(%r15)
	jle	LBB0_16
## %bb.13:
	movl	$192, %edi
	callq	_hb_buffer_init
	movq	16(%r15), %rcx
	movq	%rax, (%rcx)
	movq	$0, (%rax)
	cmpl	$2, 8(%r15)
	jl	LBB0_16
## %bb.14:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_hb_buffer_init
	movq	16(%r15), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	$0, (%rax)
	incq	%rbx
	movslq	8(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_15
	jmp	LBB0_16
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_hb_error
LBB0_16:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hb_bd_stream_open: can't allocate space for stream state"

	.comm	_V,4,2                          ## @V
	.comm	_A,4,2                          ## @A
	.comm	_HB_SUBTITLE_EMBEDDED_CC_TAG,4,2 ## @HB_SUBTITLE_EMBEDDED_CC_TAG
	.comm	_S,4,2                          ## @S
	.comm	_HBTF_SCAN_COMPLETE,4,2         ## @HBTF_SCAN_COMPLETE
	.comm	_P,4,2                          ## @P
	.comm	_transport,4,2                  ## @transport
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_bd_stream_open              ; -- Begin function hb_bd_stream_open
	.p2align	2
_hb_bd_stream_open:                     ; @hb_bd_stream_open
	.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
	mov	w0, #72
	mov	w1, #1
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_15
; %bb.1:
	stp	xzr, x21, [x19, #56]
	stp	xzr, x20, [x19, #40]
	str	xzr, [x19, #24]
	ldp	w1, w3, [x20]
Lloh0:
	adrp	x8, _V@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	x5, #0
	bl	_update_ts_streams
	ldr	w0, [x20, #16]
	mov	w1, #0
	bl	_hb_list_item
	cbz	x0, LBB0_4
; %bb.2:
	mov	w21, #1
Lloh3:
	adrp	x22, _A@GOTPAGE
Lloh4:
	ldr	x22, [x22, _A@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldrh	w1, [x0]
	ldp	w2, w3, [x0, #4]
	ldr	w4, [x22]
	mov	x0, x19
	mov	x5, #0
	bl	_update_ts_streams
	ldr	w0, [x20, #16]
	mov	x1, x21
	bl	_hb_list_item
	add	w21, w21, #1
	cbnz	x0, LBB0_3
LBB0_4:
	ldr	w0, [x20, #12]
	mov	w1, #0
	bl	_hb_list_item
	cbz	x0, LBB0_9
; %bb.5:
	mov	w21, #1
Lloh5:
	adrp	x22, _HB_SUBTITLE_EMBEDDED_CC_TAG@GOTPAGE
Lloh6:
	ldr	x22, [x22, _HB_SUBTITLE_EMBEDDED_CC_TAG@GOTPAGEOFF]
Lloh7:
	adrp	x23, _S@GOTPAGE
Lloh8:
	ldr	x23, [x23, _S@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x20, #12]
	mov	x1, x21
	bl	_hb_list_item
	add	w21, w21, #1
	cbz	x0, LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x0]
	ldr	w9, [x22]
	cmp	w8, w9
	b.eq	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	and	w1, w8, #0xffff
	ldr	w3, [x0, #4]
	ldr	w4, [x23]
	mov	x0, x19
	mov	w2, #0
	mov	x5, #0
	bl	_update_ts_streams
	b	LBB0_6
LBB0_9:
	ldr	w8, [x20, #8]
Lloh9:
	adrp	x9, _HBTF_SCAN_COMPLETE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HBTF_SCAN_COMPLETE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
Lloh12:
	adrp	x8, _P@GOTPAGE
Lloh13:
	ldr	x8, [x8, _P@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
	mov	x0, x19
	mov	w1, #4097
	mov	w2, #0
	mov	w3, #-1
	mov	x5, #0
	bl	_update_ts_streams
LBB0_11:
	mov	w8, #192
	str	w8, [x19]
Lloh15:
	adrp	x8, _transport@GOTPAGE
Lloh16:
	ldr	x8, [x8, _transport@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.12:
	mov	w0, #192
	bl	_hb_buffer_init
	ldr	x8, [x19, #16]
	str	x0, [x8]
	str	xzr, [x0]
	ldr	w8, [x19, #8]
	cmp	w8, #2
	b.lt	LBB0_16
; %bb.13:
	mov	w20, #1
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_hb_buffer_init
	ldr	x8, [x19, #16]
	str	x0, [x8, x20, lsl #3]
	str	xzr, [x0]
	add	x20, x20, #1
	ldrsw	x8, [x19, #8]
	cmp	x20, x8
	b.lt	LBB0_14
	b	LBB0_16
LBB0_15:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_error
LBB0_16:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hb_bd_stream_open: can't allocate space for stream state"

	.comm	_V,4,2                          ; @V
	.comm	_A,4,2                          ; @A
	.comm	_HB_SUBTITLE_EMBEDDED_CC_TAG,4,2 ; @HB_SUBTITLE_EMBEDDED_CC_TAG
	.comm	_S,4,2                          ; @S
	.comm	_HBTF_SCAN_COMPLETE,4,2         ; @HBTF_SCAN_COMPLETE
	.comm	_P,4,2                          ; @P
	.comm	_transport,4,2                  ; @transport
.subsections_via_symbols
