	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ciintf_poll_slot_status
_ciintf_poll_slot_status:               ## @ciintf_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	%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
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_2:
	movl	%edx, %ebx
	movq	%rdi, %r14
	movq	(%rdi), %r13
	movl	(%r13), %ecx
	movq	_SLOTSTATUS_NONE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	cmpl	%eax, %ecx
	jne	LBB0_7
## %bb.3:
	movq	8(%r13), %r15
	movq	_SAA7146_GPIO_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$3, %esi
	callq	_saa7146_setgpio
	movl	$1, %edi
	callq	_udelay
	movq	_PSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_saa7146_read
	movq	_MASK_06@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.4:
	movl	(%r13), %eax
	cmpl	(%r12), %eax
	jne	LBB0_6
## %bb.5:
	movq	_SLOTSTATUS_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
LBB0_6:
	movq	_SAA7146_GPIO_OUTLO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$3, %esi
	callq	_saa7146_setgpio
	movl	(%r13), %ecx
	movl	(%r12), %eax
LBB0_7:
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.8:
	cmpl	%eax, %ecx
	jne	LBB0_12
LBB0_9:
	leaq	8(%r13), %rbx
	movq	8(%r13), %rdi
	movq	_SAA7146_GPIO_OUTLO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %esi
	callq	_saa7146_setgpio
	movq	_DEBICICAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_ttpci_budget_debiread
	movl	(%r13), %ecx
	movl	(%r12), %edx
	testl	%eax, %eax
	js	LBB0_15
## %bb.10:
	cmpl	%edx, %ecx
	jne	LBB0_12
## %bb.11:
	movq	_SLOTSTATUS_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_info
	movl	(%r13), %ecx
	jmp	LBB0_12
LBB0_15:
	cmpl	%edx, %ecx
	jne	LBB0_16
LBB0_12:
	movq	_SLOTSTATUS_RESET@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_18
## %bb.13:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ciintf_read_attribute_mem
	cmpl	$29, %eax
	jne	LBB0_14
## %bb.17:
	movq	_SLOTSTATUS_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%r13)
	jmp	LBB0_18
LBB0_14:
	movl	(%r13), %ecx
LBB0_18:
	xorl	%ebx, %ebx
	cmpl	(%r12), %ecx
	je	LBB0_21
## %bb.19:
	movq	_SLOTSTATUS_READY@GOTPCREL(%rip), %rax
	movq	_DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	testl	%ecx, (%rax)
	je	LBB0_21
## %bb.20:
	movq	_DVB_CA_EN50221_POLL_CAM_READY@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	jmp	LBB0_21
LBB0_16:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ciintf_slot_shutdown
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_info
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SLOTSTATUS_NONE,4,2            ## @SLOTSTATUS_NONE
	.comm	_SAA7146_GPIO_INPUT,4,2         ## @SAA7146_GPIO_INPUT
	.comm	_PSR,4,2                        ## @PSR
	.comm	_MASK_06,4,2                    ## @MASK_06
	.comm	_SLOTSTATUS_PRESENT,8,3         ## @SLOTSTATUS_PRESENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cam inserted A\n"

	.comm	_SAA7146_GPIO_OUTLO,4,2         ## @SAA7146_GPIO_OUTLO
	.comm	_DEBICICAM,4,2                  ## @DEBICICAM
L_.str.1:                               ## @.str.1
	.asciz	"cam inserted B\n"

L_.str.2:                               ## @.str.2
	.asciz	"cam ejected 5\n"

	.comm	_SLOTSTATUS_RESET,4,2           ## @SLOTSTATUS_RESET
	.comm	_SLOTSTATUS_READY,4,2           ## @SLOTSTATUS_READY
	.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
	.no_dead_strip	_ciintf_poll_slot_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ciintf_poll_slot_status
_ciintf_poll_slot_status:               ; @ciintf_poll_slot_status
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	w1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_21
LBB0_2:
	mov	x21, x2
	mov	x19, x0
	ldr	x24, [x0]
	mov	x20, x24
	ldr	x22, [x20, #8]!
	ldr	w8, [x24]
Lloh3:
	adrp	x23, _SLOTSTATUS_NONE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SLOTSTATUS_NONE@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.3:
Lloh5:
	adrp	x8, _SAA7146_GPIO_INPUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SAA7146_GPIO_INPUT@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x22
	mov	w1, #3
	bl	_saa7146_setgpio
	mov	w0, #1
	bl	_udelay
Lloh8:
	adrp	x8, _PSR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PSR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_saa7146_read
Lloh11:
	adrp	x8, _MASK_06@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MASK_06@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.4:
	ldr	w8, [x24]
	ldr	w9, [x23]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.5:
Lloh14:
	adrp	x8, _SLOTSTATUS_PRESENT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SLOTSTATUS_PRESENT@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	w8, [x24]
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
LBB0_6:
Lloh19:
	adrp	x8, _SAA7146_GPIO_OUTLO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SAA7146_GPIO_OUTLO@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x22
	mov	w1, #3
	bl	_saa7146_setgpio
	ldr	w8, [x24]
	ldr	w9, [x23]
LBB0_7:
	cbz	w21, LBB0_9
; %bb.8:
	cmp	w8, w9
	b.ne	LBB0_13
LBB0_9:
	ldr	x0, [x24, #8]
Lloh22:
	adrp	x8, _SAA7146_GPIO_OUTLO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SAA7146_GPIO_OUTLO@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	w1, #1
	bl	_saa7146_setgpio
Lloh25:
	adrp	x8, _DEBICICAM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DEBICICAM@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #1
	mov	w4, #0
	mov	w5, #1
	bl	_ttpci_budget_debiread
	ldr	w8, [x24]
	ldr	w9, [x23]
	cmp	w8, w9
	tbnz	w0, #31, LBB0_12
; %bb.10:
	b.ne	LBB0_13
; %bb.11:
Lloh28:
	adrp	x8, _SLOTSTATUS_PRESENT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SLOTSTATUS_PRESENT@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	str	w8, [x24]
Lloh31:
	adrp	x0, l_.str.1@PAGE
Lloh32:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
	ldr	w8, [x24]
	b	LBB0_13
LBB0_12:
	b.ne	LBB0_22
LBB0_13:
Lloh33:
	adrp	x9, _SLOTSTATUS_RESET@GOTPAGE
Lloh34:
	ldr	x9, [x9, _SLOTSTATUS_RESET@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_17
; %bb.14:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_ciintf_read_attribute_mem
	cmp	w0, #29
	b.ne	LBB0_16
; %bb.15:
Lloh36:
	adrp	x8, _SLOTSTATUS_READY@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SLOTSTATUS_READY@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	str	w8, [x24]
	b	LBB0_17
LBB0_16:
	ldr	w8, [x24]
LBB0_17:
	ldr	w9, [x23]
	cmp	w8, w9
	b.ne	LBB0_19
LBB0_18:
	mov	w0, #0
	b	LBB0_21
LBB0_19:
Lloh39:
	adrp	x9, _SLOTSTATUS_READY@GOTPAGE
Lloh40:
	ldr	x9, [x9, _SLOTSTATUS_READY@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
Lloh42:
	adrp	x10, _DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPAGE
Lloh43:
	ldr	x10, [x10, _DVB_CA_EN50221_POLL_CAM_PRESENT@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x10]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.20:
Lloh45:
	adrp	x8, _DVB_CA_EN50221_POLL_CAM_READY@GOTPAGE
Lloh46:
	ldr	x8, [x8, _DVB_CA_EN50221_POLL_CAM_READY@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	orr	w0, w8, w0
LBB0_21:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_22:
	mov	x0, x19
	mov	w1, #0
	bl	_ciintf_slot_shutdown
Lloh48:
	adrp	x0, l_.str.2@PAGE
Lloh49:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SLOTSTATUS_NONE,4,2            ; @SLOTSTATUS_NONE
	.comm	_SAA7146_GPIO_INPUT,4,2         ; @SAA7146_GPIO_INPUT
	.comm	_PSR,4,2                        ; @PSR
	.comm	_MASK_06,4,2                    ; @MASK_06
	.comm	_SLOTSTATUS_PRESENT,8,3         ; @SLOTSTATUS_PRESENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cam inserted A\n"

	.comm	_SAA7146_GPIO_OUTLO,4,2         ; @SAA7146_GPIO_OUTLO
	.comm	_DEBICICAM,4,2                  ; @DEBICICAM
l_.str.1:                               ; @.str.1
	.asciz	"cam inserted B\n"

l_.str.2:                               ; @.str.2
	.asciz	"cam ejected 5\n"

	.comm	_SLOTSTATUS_RESET,4,2           ; @SLOTSTATUS_RESET
	.comm	_SLOTSTATUS_READY,4,2           ; @SLOTSTATUS_READY
	.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
	.no_dead_strip	_ciintf_poll_slot_status
.subsections_via_symbols
