	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dvb_usb_adapter_frontend_init  ## -- Begin function dvb_usb_adapter_frontend_init
	.p2align	4, 0x90
_dvb_usb_adapter_frontend_init:         ## @dvb_usb_adapter_frontend_init
	.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	%rdi, %r14
	cmpl	$0, 8(%rdi)
	jle	LBB0_14
## %bb.1:
	xorl	%ebx, %ebx
	movq	_dvb_usb_fe_wakeup@GOTPCREL(%rip), %r15
	movq	_dvb_usb_fe_sleep@GOTPCREL(%rip), %r13
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	4(%r14)
	incq	%r12
	movslq	8(%r14), %rax
	addq	$16, %rbx
	cmpq	%rax, %r12
	jge	LBB0_14
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movq	(%rax,%rbx), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	*%rax
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r14), %rax
	movq	(%rax,%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, (%rsi)
	movl	8(%rsi), %ecx
	movl	%ecx, 12(%rax,%rbx)
	movl	(%r15), %ecx
	movl	%ecx, 8(%rsi)
	movl	4(%rsi), %ecx
	movl	%ecx, 8(%rax,%rbx)
	movl	(%r13), %eax
	movl	%eax, 4(%rsi)
	movq	%r14, %rdi
	callq	_dvb_register_frontend
	testq	%rax, %rax
	jne	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r14), %rax
	movq	8(%rax,%rbx), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	*%rax
	jmp	LBB0_13
LBB0_14:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_dvb_create_media_graph
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.16:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dvb_usb_media_device_register  ## TAILCALL
LBB0_6:
	xorl	%r15d, %r15d
	testl	%r12d, %r12d
	jne	LBB0_15
## %bb.7:
	movq	32(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_15
LBB0_3:
	movq	32(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movl	40(%r14), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_15
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_err
	movq	24(%r14), %rax
	movq	(%rax,%rbx), %rdi
	callq	_dvb_frontend_detach
	movq	24(%r14), %rax
	movq	$0, (%rax,%rbx)
	testl	%r12d, %r12d
	jne	LBB0_15
## %bb.10:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_15:
	movl	%r15d, %eax
	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	"strange: '%s' #%d,%d doesn't want to attach a frontend."

L_.str.1:                               ## @.str.1
	.asciz	"no frontend was attached by '%s'"

	.comm	_dvb_usb_fe_wakeup,4,2          ## @dvb_usb_fe_wakeup
	.comm	_dvb_usb_fe_sleep,4,2           ## @dvb_usb_fe_sleep
L_.str.2:                               ## @.str.2
	.asciz	"Frontend %d registration failed."

	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dvb_usb_adapter_frontend_init  ; -- Begin function dvb_usb_adapter_frontend_init
	.p2align	2
_dvb_usb_adapter_frontend_init:         ; @dvb_usb_adapter_frontend_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	w8, [x0, #8]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x21, #0
	mov	x20, #0
Lloh0:
	adrp	x22, _dvb_usb_fe_wakeup@GOTPAGE
Lloh1:
	ldr	x22, [x22, _dvb_usb_fe_wakeup@GOTPAGEOFF]
Lloh2:
	adrp	x23, _dvb_usb_fe_sleep@GOTPAGE
Lloh3:
	ldr	x23, [x23, _dvb_usb_fe_sleep@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldp	w8, w9, [x19, #4]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	w8, w8, #1
	str	w8, [x19, #4]
	add	x20, x20, #1
	add	x21, x21, #16
	cmp	x20, x9
	b.ge	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x21]
	cbz	x8, LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	blr	x8
	cbnz	w0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #24]
	ldr	x1, [x8, x21]
	cbz	x1, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	str	w20, [x1]
	add	x8, x8, x21
	ldp	w10, w9, [x1, #4]
	str	w9, [x8, #12]
	ldr	w9, [x22]
	str	w10, [x8, #8]
	ldr	w8, [x23]
	stp	w8, w9, [x1, #4]
	mov	x0, x19
	bl	_dvb_register_frontend
	cbnz	x0, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	blr	x8
	b	LBB0_2
LBB0_9:
	mov	x0, x19
	mov	w1, #1
	bl	_dvb_create_media_graph
	cbnz	w0, LBB0_17
; %bb.10:
	mov	x0, x19
	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
	add	sp, sp, #80
	b	_dvb_usb_media_device_register
LBB0_11:
	cbnz	w20, LBB0_16
; %bb.12:
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldr	w1, [x8]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_13:
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldr	w1, [x8]
	ldr	w8, [x19, #40]
	stp	x8, x20, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
LBB0_14:
	bl	_err
	b	LBB0_16
LBB0_15:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_err
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x21]
	bl	_dvb_frontend_detach
	ldr	x8, [x19, #24]
	str	xzr, [x8, x21]
	cbz	w20, LBB0_18
LBB0_16:
	mov	w0, #0
LBB0_17:
	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
	add	sp, sp, #80
	ret
LBB0_18:
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"strange: '%s' #%d,%d doesn't want to attach a frontend."

l_.str.1:                               ; @.str.1
	.asciz	"no frontend was attached by '%s'"

	.comm	_dvb_usb_fe_wakeup,4,2          ; @dvb_usb_fe_wakeup
	.comm	_dvb_usb_fe_sleep,4,2           ; @dvb_usb_fe_sleep
l_.str.2:                               ; @.str.2
	.asciz	"Frontend %d registration failed."

	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
