	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pt3_alloc_adapter
_pt3_alloc_adapter:                     ## @pt3_alloc_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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	(%r14), %rax
	movslq	%r15d, %r12
	movq	%rbx, (%rax,%r12,8)
	movl	%r12d, (%rbx)
	movq	_one_adapter@GOTPCREL(%rip), %rax
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.3:
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.6:
	movq	(%r14), %rax
	movq	(%rax), %rax
	addq	$56, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_19
LBB0_4:
	leaq	56(%rbx), %rdi
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	8(%r14), %rcx
	movq	_adapter_nr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_dvb_register_adapter
	testl	%eax, %eax
	js	LBB0_5
LBB0_7:
	movq	%r14, 56(%rbx)
	movq	_DMX_TS_FILTERING@GOTPCREL(%rip), %rax
	movq	_DMX_SECTION_FILTERING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	8(%rbx), %rdi
	movl	%ecx, 16(%rbx)
	movq	%rbx, 32(%rbx)
	movabsq	$1099511628032, %rax            ## imm = 0x10000000100
	movq	%rax, 8(%rbx)
	movq	_pt3_start_feed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_pt3_stop_feed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_dvb_dmx_init
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	leaq	16(%rbx), %rax
	movq	%rbx, %r15
	addq	$40, %r15
	movl	$256, 40(%rbx)                  ## imm = 0x100
	movq	%rax, 48(%rbx)
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_dvb_dmxdev_init
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	movq	%rbx, %rdi
	callq	_pt3_alloc_dmabuf
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movl	%eax, %r13d
	movq	8(%r14), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_pt3_free_dmabuf
	movq	%r15, %rdi
	callq	_dvb_dmxdev_release
	jmp	LBB0_14
LBB0_8:
	movl	%eax, %r13d
	movq	8(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	testl	%r15d, %r15d
	jne	LBB0_16
	jmp	LBB0_17
LBB0_5:
	movl	%eax, %r13d
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_18
LBB0_10:
	movl	%eax, %r13d
	movq	8(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
LBB0_14:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_dvb_dmx_release
	testl	%r15d, %r15d
	je	LBB0_17
LBB0_16:
	movq	_one_adapter@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_18
LBB0_17:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dvb_unregister_adapter
LBB0_18:
	movq	%rbx, %rdi
	callq	_kfree
	movq	(%r14), %rax
	movq	$0, (%rax,%r12,8)
LBB0_19:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%r13d, %r13d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_one_adapter,4,2                ## @one_adapter
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PT3 DVB"

	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_adapter_nr,4,2                 ## @adapter_nr
L_.str.1:                               ## @.str.1
	.asciz	"failed to register adapter dev\n"

	.comm	_DMX_TS_FILTERING,4,2           ## @DMX_TS_FILTERING
	.comm	_DMX_SECTION_FILTERING,4,2      ## @DMX_SECTION_FILTERING
	.comm	_pt3_start_feed,4,2             ## @pt3_start_feed
	.comm	_pt3_stop_feed,4,2              ## @pt3_stop_feed
L_.str.2:                               ## @.str.2
	.asciz	"failed to init dmx dev\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to init dmxdev\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to alloc DMA buffers\n"

	.no_dead_strip	_pt3_alloc_adapter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pt3_alloc_adapter
_pt3_alloc_adapter:                     ; @pt3_alloc_adapter
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #64
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	x8, [x19]
	str	x0, [x8, w20, sxtw #3]
	str	w20, [x0]
Lloh3:
	adrp	x26, _one_adapter@GOTPAGE
Lloh4:
	ldr	x26, [x26, _one_adapter@GOTPAGEOFF]
	cbz	w20, LBB0_5
; %bb.2:
	ldr	w8, [x26]
	cbz	w8, LBB0_5
; %bb.3:
	ldr	x8, [x19]
	ldr	x8, [x8]
	add	x22, x8, #56
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_17
LBB0_5:
Lloh8:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
	add	x22, x21, #56
Lloh10:
	ldr	w2, [x8]
	ldr	x3, [x19, #8]
Lloh11:
	adrp	x8, _adapter_nr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _adapter_nr@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dvb_register_adapter
	tbnz	w0, #31, LBB0_11
LBB0_6:
	str	x19, [x21, #56]
Lloh16:
	adrp	x8, _DMX_TS_FILTERING@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DMX_TS_FILTERING@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _DMX_SECTION_FILTERING@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DMX_SECTION_FILTERING@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
	movi.2s	v0, #1, lsl #8
	mov	x24, x21
	str	d0, [x24, #8]!
	mov	x27, x21
	str	w8, [x27, #16]!
	str	x21, [x21, #32]
Lloh22:
	adrp	x8, _pt3_start_feed@GOTPAGE
Lloh23:
	ldr	x8, [x8, _pt3_start_feed@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _pt3_stop_feed@GOTPAGE
Lloh26:
	ldr	x9, [x9, _pt3_stop_feed@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #20]
	mov	x0, x24
	bl	_dvb_dmx_init
	tbnz	w0, #31, LBB0_10
; %bb.7:
	mov	w8, #256
	mov	x25, x21
	str	w8, [x25, #40]!
	str	x27, [x25, #8]
	mov	x0, x25
	mov	x1, x22
	bl	_dvb_dmxdev_init
	tbnz	w0, #31, LBB0_12
; %bb.8:
	mov	x0, x21
	bl	_pt3_alloc_dmabuf
	mov	x23, x0
	cbz	w0, LBB0_17
; %bb.9:
	ldr	x0, [x19, #8]
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	mov	x0, x21
	bl	_pt3_free_dmabuf
	mov	x0, x25
	bl	_dvb_dmxdev_release
	b	LBB0_13
LBB0_10:
	mov	x23, x0
	ldr	x0, [x19, #8]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	cbnz	w20, LBB0_14
	b	LBB0_15
LBB0_11:
	mov	x23, x0
	ldr	x0, [x19, #8]
Lloh32:
	adrp	x1, l_.str.1@PAGE
Lloh33:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_16
LBB0_12:
	mov	x23, x0
	ldr	x0, [x19, #8]
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
LBB0_13:
	mov	x0, x24
	bl	_dvb_dmx_release
	cbz	w20, LBB0_15
LBB0_14:
	ldr	w8, [x26]
	cbnz	w8, LBB0_16
LBB0_15:
	mov	x0, x22
	bl	_dvb_unregister_adapter
LBB0_16:
	sxtw	x20, w20
	mov	x0, x21
	bl	_kfree
	ldr	x8, [x19]
	str	xzr, [x8, x20, lsl #3]
LBB0_17:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_one_adapter,4,2                ; @one_adapter
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PT3 DVB"

	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_adapter_nr,4,2                 ; @adapter_nr
l_.str.1:                               ; @.str.1
	.asciz	"failed to register adapter dev\n"

	.comm	_DMX_TS_FILTERING,4,2           ; @DMX_TS_FILTERING
	.comm	_DMX_SECTION_FILTERING,4,2      ; @DMX_SECTION_FILTERING
	.comm	_pt3_start_feed,4,2             ; @pt3_start_feed
	.comm	_pt3_stop_feed,4,2              ; @pt3_stop_feed
l_.str.2:                               ; @.str.2
	.asciz	"failed to init dmx dev\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to init dmxdev\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to alloc DMA buffers\n"

	.no_dead_strip	_pt3_alloc_adapter
.subsections_via_symbols
