	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dvb_register_adapter           ## -- Begin function dvb_register_adapter
	.p2align	4, 0x90
_dvb_register_adapter:                  ## @dvb_register_adapter
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	_dvbdev_register_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_DVB_MAX_ADAPTERS@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_7
## %bb.1:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movswl	(%r14,%r12,2), %ebx
	testl	%ebx, %ebx
	js	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%ebx, %eax
	jle	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	callq	_dvbdev_check_free_adapter_num
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movslq	(%r15), %rax
	cmpq	%rax, %r12
	jl	LBB0_3
	jmp	LBB0_7
LBB0_10:
	xorl	%eax, %eax
	callq	_dvbdev_get_free_adapter_num
	movl	%eax, %ebx
LBB0_6:
	testl	%ebx, %ebx
	js	LBB0_7
## %bb.8:
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$72, %edx
	callq	_memset
	leaq	64(%r13), %rdi
	callq	_INIT_LIST_HEAD
	leaq	L_.str(%rip), %rdi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_pr_info
	movl	%ebx, (%r13)
	movq	%r14, 8(%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 56(%r13)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 48(%r13)
	leaq	24(%r13), %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%r13)
	callq	_mutex_init
	addq	$16, %r13
	movq	_dvb_adapter_list@GOTPCREL(%rip), %rsi
	movq	%r13, %rdi
	callq	_list_add_tail
	movq	_dvbdev_register_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_9
LBB0_7:
	movq	_dvbdev_register_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_ENFILE@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dvbdev_register_lock,4,2       ## @dvbdev_register_lock
	.comm	_DVB_MAX_ADAPTERS,4,2           ## @DVB_MAX_ADAPTERS
	.comm	_ENFILE,4,2                     ## @ENFILE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DVB: registering new adapter (%s)\n"

	.comm	_dvb_adapter_list,4,2           ## @dvb_adapter_list
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dvb_register_adapter           ; -- Begin function dvb_register_adapter
	.p2align	2
_dvb_register_adapter:                  ; @dvb_register_adapter
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x0, _dvbdev_register_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _dvbdev_register_lock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh2:
	adrp	x25, _DVB_MAX_ADAPTERS@GOTPAGE
Lloh3:
	ldr	x25, [x25, _DVB_MAX_ADAPTERS@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x26, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrsh	w23, [x24, x26, lsl #1]
	tbnz	w23, #31, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, w23
	b.le	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	bl	_dvbdev_check_free_adapter_num
	cbnz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x26, x26, #1
	ldrsw	x8, [x25]
	cmp	x26, x8
	b.lt	LBB0_2
	b	LBB0_9
LBB0_6:
	bl	_dvbdev_get_free_adapter_num
	mov	x23, x0
LBB0_7:
	tbnz	w23, #31, LBB0_9
; %bb.8:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #72
	bl	_memset
	add	x0, x19, #64
	bl	_INIT_LIST_HEAD
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_pr_info
	str	w23, [x19]
	str	x22, [x19, #8]
	stp	x20, x21, [x19, #48]
	add	x0, x19, #24
	stp	xzr, xzr, [x19, #32]
	bl	_mutex_init
	add	x0, x19, #16
Lloh6:
	adrp	x1, _dvb_adapter_list@GOTPAGE
Lloh7:
	ldr	x1, [x1, _dvb_adapter_list@GOTPAGEOFF]
	bl	_list_add_tail
Lloh8:
	adrp	x0, _dvbdev_register_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _dvbdev_register_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	b	LBB0_10
LBB0_9:
Lloh10:
	adrp	x0, _dvbdev_register_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _dvbdev_register_lock@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh12:
	adrp	x8, _ENFILE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENFILE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_10:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_dvbdev_register_lock,4,2       ; @dvbdev_register_lock
	.comm	_DVB_MAX_ADAPTERS,4,2           ; @DVB_MAX_ADAPTERS
	.comm	_ENFILE,4,2                     ; @ENFILE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DVB: registering new adapter (%s)\n"

	.comm	_dvb_adapter_list,4,2           ; @dvb_adapter_list
.subsections_via_symbols
