	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sp2_ci_poll_slot_status        ## -- Begin function sp2_ci_poll_slot_status
	.p2align	4, 0x90
_sp2_ci_poll_slot_status:               ## @sp2_ci_poll_slot_status
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ecx
	movl	%esi, %edx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	(%rdi), %rbx
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movq	8(%rbx), %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$1, %ecx
	callq	_sp2_read_i2c
	movl	%eax, %r15d
	movq	(%r12), %r12
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	addq	%r12, %rax
	movq	%rax, 8(%rbx)
	testl	%r15d, %r15d
	jne	LBB0_6
## %bb.3:
	movq	_SP2_MOD_CTL_DET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_5
## %bb.4:
	movq	_DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPCREL(%rip), %rax
	movq	_DVB_CA_EN50221_POLL_CAM_READY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
	movl	%r14d, (%rbx)
	jmp	LBB0_6
LBB0_1:
	movl	(%rbx), %r14d
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	$0, (%rbx)
	jmp	LBB0_6
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"slot:%d open:%d\n"

	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_SP2_MOD_CTL_DET,4,2            ## @SP2_MOD_CTL_DET
	.comm	_DVB_CA_EN50221_POLL_CAM_PRESENT,4,2 ## @DVB_CA_EN50221_POLL_CAM_PRESENT
	.comm	_DVB_CA_EN50221_POLL_CAM_READY,4,2 ## @DVB_CA_EN50221_POLL_CAM_READY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sp2_ci_poll_slot_status        ; -- Begin function sp2_ci_poll_slot_status
	.p2align	2
_sp2_ci_poll_slot_status:               ; @sp2_ci_poll_slot_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x3, x2
	mov	x2, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldr	x19, [x0]
	ldr	x0, [x19, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh5:
	adrp	x21, _jiffies@GOTPAGE
Lloh6:
	ldr	x21, [x21, _jiffies@GOTPAGEOFF]
	ldr	x0, [x21]
	ldr	x1, [x19, #8]
	bl	_time_after
	cbz	x0, LBB0_4
; %bb.1:
	mov	x2, sp
	mov	x0, x19
	mov	w1, #0
	mov	w3, #1
	bl	_sp2_read_i2c
	mov	x20, x0
	ldr	x21, [x21]
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x8, x0
	mov	w0, #0
	add	x8, x8, x21
	str	x8, [x19, #8]
	cbnz	w20, LBB0_5
; %bb.2:
	ldr	w8, [sp]
Lloh7:
	adrp	x9, _SP2_MOD_CTL_DET@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SP2_MOD_CTL_DET@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.3:
Lloh10:
	adrp	x8, _DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _DVB_CA_EN50221_POLL_CAM_READY@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DVB_CA_EN50221_POLL_CAM_READY@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w0, w9, w8
	str	w0, [x19]
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19]
LBB0_5:
	ldr	x8, [sp, #8]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_5
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"slot:%d open:%d\n"

	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_SP2_MOD_CTL_DET,4,2            ; @SP2_MOD_CTL_DET
	.comm	_DVB_CA_EN50221_POLL_CAM_PRESENT,4,2 ; @DVB_CA_EN50221_POLL_CAM_PRESENT
	.comm	_DVB_CA_EN50221_POLL_CAM_READY,4,2 ; @DVB_CA_EN50221_POLL_CAM_READY
.subsections_via_symbols
