	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function campoll
_campoll:                               ## @campoll
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	leaq	-12(%rbp), %rdx
	movl	$4, %esi
	callq	_read_reg
	movl	-12(%rbp), %edx
	testl	%edx, %edx
	je	LBB0_14
## %bb.1:
	movq	%rbx, %rdi
	movl	$5, %esi
	callq	_write_reg
	movl	-12(%rbp), %eax
	testb	$64, %al
	jne	LBB0_2
## %bb.3:
	testb	$32, %al
	jne	LBB0_4
LBB0_5:
	testb	$2, %al
	jne	LBB0_6
	jmp	LBB0_14
LBB0_2:
	movl	$1, (%rbx)
	testb	$32, %al
	je	LBB0_5
LBB0_4:
	movq	$0, 24(%rbx)
	testb	$2, %al
	je	LBB0_14
LBB0_6:
	leaq	-16(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_read_reg
	testb	$2, -16(%rbp)
	movl	4(%rbx), %eax
	jne	LBB0_9
## %bb.7:
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	_DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	movl	$3, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_write_regm
	jmp	LBB0_11
LBB0_9:
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	$0, 4(%rbx)
	movq	%rbx, %rdi
	movl	$3, %esi
	xorl	%edx, %edx
	movl	$8, %ecx
	callq	_write_regm
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movl	$0, 8(%rbx)
LBB0_11:
	testb	$8, -12(%rbp)
	je	LBB0_14
## %bb.12:
	movl	4(%rbx), %eax
	movq	_DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.13:
	movl	$1, 8(%rbx)
	movq	_DVB_CA_EN50221_POLL_CAM_READY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 4(%rbx)
LBB0_14:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DVB_CA_EN50221_POLL_CAM_PRESENT,4,2 ## @DVB_CA_EN50221_POLL_CAM_PRESENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NO CAM\n"

	.comm	_DVB_CA_EN50221_POLL_CAM_READY,4,2 ## @DVB_CA_EN50221_POLL_CAM_READY
	.no_dead_strip	_campoll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function campoll
_campoll:                               ; @campoll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x2, sp, #12
	mov	w1, #4
	bl	_read_reg
	ldr	w2, [sp, #12]
	cbz	w2, LBB0_14
; %bb.1:
	mov	x0, x19
	mov	w1, #5
	bl	_write_reg
	ldr	w8, [sp, #12]
	tbnz	w8, #6, LBB0_4
; %bb.2:
	tbnz	w8, #5, LBB0_5
LBB0_3:
	tbnz	w8, #1, LBB0_6
	b	LBB0_14
LBB0_4:
	mov	w9, #1
	str	w9, [x19]
	tbz	w8, #5, LBB0_3
LBB0_5:
	str	xzr, [x19, #24]
	tbz	w8, #1, LBB0_14
LBB0_6:
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #1
	bl	_read_reg
	ldr	w8, [x19, #4]
	ldrb	w9, [sp, #8]
	tbnz	w9, #1, LBB0_9
; %bb.7:
	cbnz	w8, LBB0_11
; %bb.8:
Lloh0:
	adrp	x8, _DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	mov	x0, x19
	mov	w1, #3
	mov	w2, #8
	mov	w3, #8
	bl	_write_regm
	b	LBB0_11
LBB0_9:
	cbz	w8, LBB0_11
; %bb.10:
	str	wzr, [x19, #4]
	mov	x0, x19
	mov	w1, #3
	mov	w2, #0
	mov	w3, #8
	bl	_write_regm
	ldr	x0, [x19, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	str	wzr, [x19, #8]
LBB0_11:
	ldrb	w8, [sp, #12]
	tbz	w8, #3, LBB0_14
; %bb.12:
	ldr	w8, [x19, #4]
Lloh5:
	adrp	x9, _DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.13:
	mov	w9, #1
Lloh8:
	adrp	x10, _DVB_CA_EN50221_POLL_CAM_READY@GOTPAGE
Lloh9:
	ldr	x10, [x10, _DVB_CA_EN50221_POLL_CAM_READY@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w8, w10, w8
	stp	w8, w9, [x19, #4]
LBB0_14:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DVB_CA_EN50221_POLL_CAM_PRESENT,4,2 ; @DVB_CA_EN50221_POLL_CAM_PRESENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NO CAM\n"

	.comm	_DVB_CA_EN50221_POLL_CAM_READY,4,2 ; @DVB_CA_EN50221_POLL_CAM_READY
	.no_dead_strip	_campoll
.subsections_via_symbols
