	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ciintf_write_cam_control
_ciintf_write_cam_control:              ## @ciintf_write_cam_control
	.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
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_2:
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movl	(%r12), %edi
	movq	_SAA7146_GPIO_OUTLO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %esi
	callq	_saa7146_setgpio
	movl	$1, %edi
	callq	_udelay
	movq	_DEBICICAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$3, %ebx
	movl	$0, (%rsp)
	movq	%r12, %rdi
	movl	%ebx, %edx
	movl	$1, %ecx
	movl	%r15d, %r8d
	xorl	%r9d, %r9d
	callq	_ttpci_budget_debiwrite
	movl	%eax, %ebx
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	addl	(%rax), %ecx
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ciintf_slot_shutdown
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
LBB0_4:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SAA7146_GPIO_OUTLO,4,2         ## @SAA7146_GPIO_OUTLO
	.comm	_DEBICICAM,4,2                  ## @DEBICICAM
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cam ejected 5\n"

	.no_dead_strip	_ciintf_write_cam_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ciintf_write_cam_control
_ciintf_write_cam_control:              ; @ciintf_write_cam_control
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	cbz	w1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_4
LBB0_2:
	mov	x20, x3
	mov	x21, x2
	mov	x19, x0
	ldr	x22, [x0]
	ldr	w0, [x22]
Lloh3:
	adrp	x8, _SAA7146_GPIO_OUTLO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SAA7146_GPIO_OUTLO@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #1
	bl	_saa7146_setgpio
	mov	w0, #1
	bl	_udelay
Lloh6:
	adrp	x8, _DEBICICAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DEBICICAM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	and	w2, w21, #0x3
	mov	x0, x22
	mov	w3, #1
	mov	x4, x20
	mov	w5, #0
	mov	w6, #0
	bl	_ttpci_budget_debiwrite
	mov	x20, x0
Lloh9:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #0
	bl	_ciintf_slot_shutdown
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SAA7146_GPIO_OUTLO,4,2         ; @SAA7146_GPIO_OUTLO
	.comm	_DEBICICAM,4,2                  ; @DEBICICAM
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cam ejected 5\n"

	.no_dead_strip	_ciintf_write_cam_control
.subsections_via_symbols
