	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ts_open
_ts_open:                               ## @ts_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	8(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	(%rax), %r15
	movq	(%r15), %rax
	movq	(%rax), %rcx
	movq	_O_ACCMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r14), %eax
	movq	(%rcx), %r12
	movq	_O_RDONLY@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	jne	LBB0_10
## %bb.2:
	testq	%r12, %r12
	je	LBB0_3
## %bb.5:
	cmpq	$0, 8(%r12)
	jne	LBB0_7
## %bb.6:
	cmpq	$0, (%r12)
	je	LBB0_11
LBB0_7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_8:
	movq	_O_ACCMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r14), %eax
	movq	_O_RDONLY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_3
## %bb.9:
	movq	_O_WRONLY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jmp	LBB0_3
LBB0_10:
	movq	_O_WRONLY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
LBB0_11:
	movq	%r14, %rsi
	callq	_dvb_generic_open
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_16
## %bb.12:
	movq	_O_ACCMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r14), %eax
	cmpl	(%r13), %eax
	jne	LBB0_14
## %bb.13:
	movq	%r12, %rdi
	callq	_ddb_input_start
	jmp	LBB0_16
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_O_WRONLY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_16
## %bb.15:
	movq	%r15, %rdi
	callq	_ddb_output_start
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_O_ACCMODE,4,2                  ## @O_ACCMODE
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.no_dead_strip	_ts_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ts_open
_ts_open:                               ; @ts_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	x21, x1
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	x19, [x8]
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x22, [x8]
	ldr	w8, [x21]
Lloh0:
	adrp	x23, _O_ACCMODE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _O_ACCMODE@GOTPAGEOFF]
	ldr	w9, [x23]
	and	w8, w9, w8
Lloh2:
	adrp	x24, _O_RDONLY@GOTPAGE
Lloh3:
	ldr	x24, [x24, _O_RDONLY@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.2:
	cbz	x22, LBB0_12
; %bb.3:
	ldr	x8, [x22, #8]
	cbnz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x22]
	cbz	x8, LBB0_9
LBB0_5:
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_13
LBB0_6:
	ldr	w8, [x21]
Lloh6:
	adrp	x9, _O_ACCMODE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _O_ACCMODE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh9:
	adrp	x9, _O_RDONLY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _O_RDONLY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_12
; %bb.7:
Lloh12:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w8, w9
	b	LBB0_12
LBB0_8:
Lloh15:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh16:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
LBB0_9:
	mov	x1, x21
	bl	_dvb_generic_open
	mov	x20, x0
	tbnz	w0, #31, LBB0_14
; %bb.10:
	ldr	w8, [x21]
	ldr	w9, [x23]
	and	w8, w9, w8
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_15
; %bb.11:
	mov	x0, x22
	bl	_ddb_input_start
	b	LBB0_14
LBB0_12:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_14:
	mov	x0, x20
	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
LBB0_15:
Lloh20:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh21:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.16:
	mov	x0, x19
	bl	_ddb_output_start
	b	LBB0_14
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_O_ACCMODE,4,2                  ; @O_ACCMODE
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.no_dead_strip	_ts_open
.subsections_via_symbols
