	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dvb_generic_open               ## -- Begin function dvb_generic_open
	.p2align	4, 0x90
_dvb_generic_open:                      ## @dvb_generic_open
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	8(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.5:
	movq	_O_ACCMODE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	(%rsi), %edx
	movq	_O_RDONLY@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jne	LBB0_8
## %bb.6:
	movl	8(%rax), %edx
	testl	%edx, %edx
	je	LBB0_4
## %bb.7:
	leaq	8(%rax), %rsi
	jmp	LBB0_10
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_8:
	movl	4(%rax), %edx
	testl	%edx, %edx
	je	LBB0_4
## %bb.9:
	leaq	4(%rax), %rsi
LBB0_10:
	decl	%edx
	movl	%edx, (%rsi)
	decl	%ecx
	movl	%ecx, (%rax)
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_4:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_O_ACCMODE,4,2                  ## @O_ACCMODE
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dvb_generic_open               ; -- Begin function dvb_generic_open
	.p2align	2
_dvb_generic_open:                      ; @dvb_generic_open
	.cfi_startproc
; %bb.0:
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w9, [x8]
	cbz	w9, LBB0_4
; %bb.2:
	ldr	w10, [x1]
Lloh0:
	adrp	x11, _O_ACCMODE@GOTPAGE
Lloh1:
	ldr	x11, [x11, _O_ACCMODE@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	and	w10, w11, w10
Lloh3:
	adrp	x11, _O_RDONLY@GOTPAGE
Lloh4:
	ldr	x11, [x11, _O_RDONLY@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_7
; %bb.3:
	mov	x10, x8
	ldr	w11, [x10, #8]!
	cbnz	w11, LBB0_8
LBB0_4:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_7:
	mov	x10, x8
	ldr	w11, [x10, #4]!
	cbz	w11, LBB0_4
LBB0_8:
	mov	w0, #0
	sub	w11, w11, #1
	str	w11, [x10]
	sub	w9, w9, #1
	str	w9, [x8]
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_O_ACCMODE,4,2                  ; @O_ACCMODE
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
.subsections_via_symbols
