	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ddb_port_attach
_ddb_port_attach:                       ## @ddb_port_attach
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	(%rdi), %eax
	cmpl	$130, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_7
## %bb.2:
	xorl	%ebx, %ebx
	cmpl	$128, %eax
	jne	LBB0_12
## %bb.3:
	movq	32(%r14), %rax
	movq	(%rax), %rdi
	callq	_dvb_input_attach
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:
	movq	32(%r14), %rax
	movq	8(%rax), %rdi
	callq	_dvb_input_attach
	movl	%eax, %ebx
	movq	32(%r14), %rax
	movq	(%rax), %rdi
	testl	%ebx, %ebx
	js	LBB0_10
## %bb.5:
	movq	%rdi, (%rdi)
	movq	8(%rax), %rax
	movq	%rax, (%rax)
	jmp	LBB0_12
LBB0_6:
	movq	_ci_bitrate@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ddb_ci_attach
	testl	%eax, %eax
	js	LBB0_9
LBB0_7:
	movq	16(%r14), %rcx
	movq	24(%r14), %rsi
	movl	4(%rsi), %edi
	movq	_DVB_DEVICE_SEC@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_dvbdev_ci@GOTPCREL(%rip), %rdx
	xorl	%r9d, %r9d
	callq	_dvb_register_device
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_12
	jmp	LBB0_11
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_10:
	callq	_dvb_input_detach
LBB0_11:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ci_bitrate,4,2                 ## @ci_bitrate
	.comm	_dvbdev_ci,4,2                  ## @dvbdev_ci
	.comm	_DVB_DEVICE_SEC,4,2             ## @DVB_DEVICE_SEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"port_attach on port %d failed\n"

	.no_dead_strip	_ddb_port_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ddb_port_attach
_ddb_port_attach:                       ; @ddb_port_attach
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #130
	b.eq	LBB0_6
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.3:
	ldr	x8, [x19, #32]
	ldr	x0, [x8]
	bl	_dvb_input_attach
	tbnz	w0, #31, LBB0_9
; %bb.4:
	ldr	x8, [x19, #32]
	ldr	x0, [x8, #8]
	bl	_dvb_input_attach
	mov	x20, x0
	ldr	x8, [x19, #32]
	ldr	x0, [x8]
	tbnz	w20, #31, LBB0_10
; %bb.5:
	str	x0, [x0]
	ldr	x8, [x8, #8]
	str	x8, [x8]
	b	LBB0_12
LBB0_6:
Lloh0:
	adrp	x8, _ci_bitrate@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ci_bitrate@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ddb_ci_attach
	tbnz	w0, #31, LBB0_9
LBB0_7:
	ldp	x3, x1, [x19, #16]
	ldr	w0, [x1, #4]
Lloh3:
	adrp	x8, _DVB_DEVICE_SEC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DVB_DEVICE_SEC@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
Lloh6:
	adrp	x2, _dvbdev_ci@GOTPAGE
Lloh7:
	ldr	x2, [x2, _dvbdev_ci@GOTPAGEOFF]
	mov	w5, #0
	bl	_dvb_register_device
	mov	x20, x0
	tbz	w0, #31, LBB0_12
	b	LBB0_11
LBB0_8:
	mov	w20, #0
	b	LBB0_12
LBB0_9:
	mov	x20, x0
	b	LBB0_11
LBB0_10:
	bl	_dvb_input_detach
LBB0_11:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w2, [x19, #4]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ci_bitrate,4,2                 ; @ci_bitrate
	.comm	_dvbdev_ci,4,2                  ; @dvbdev_ci
	.comm	_DVB_DEVICE_SEC,4,2             ; @DVB_DEVICE_SEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"port_attach on port %d failed\n"

	.no_dead_strip	_ddb_port_attach
.subsections_via_symbols
