	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_mobile_ceu_remove_device
_sh_mobile_ceu_remove_device:           ## @sh_mobile_ceu_remove_device
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	4(%rdi), %edi
	callq	_to_soc_camera_host
	movq	%rax, %r15
	movq	8(%rax), %rbx
	xorl	%edi, %edi
	cmpq	%r14, (%rbx)
	setne	%dil
	callq	_BUG_ON
	movq	_CEIER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_ceu_write
	movq	_CAPSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$65536, %edx                    ## imm = 0x10000
	callq	_ceu_write
	leaq	8(%rbx), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	addq	$8, %rdi
	callq	_list_del
	movq	_VIDEOBUF_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%rbx), %rdi
	movl	%eax, 4(%rdi)
	callq	_wake_up_all
	movq	$0, 16(%rbx)
LBB0_2:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%r15), %edi
	callq	_pm_runtime_put_sync
	movl	(%r14), %edx
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movq	$0, (%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CEIER,4,2                      ## @CEIER
	.comm	_CAPSR,4,2                      ## @CAPSR
	.comm	_VIDEOBUF_ERROR,4,2             ## @VIDEOBUF_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SuperH Mobile CEU driver detached from camera %d\n"

	.no_dead_strip	_sh_mobile_ceu_remove_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_mobile_ceu_remove_device
_sh_mobile_ceu_remove_device:           ; @sh_mobile_ceu_remove_device
	.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
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_to_soc_camera_host
	mov	x21, x0
	ldr	x19, [x0, #8]
	ldr	x8, [x19]
	cmp	x8, x20
	cset	w0, ne
	bl	_BUG_ON
Lloh0:
	adrp	x8, _CEIER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CEIER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_ceu_write
Lloh3:
	adrp	x8, _CAPSR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAPSR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #65536
	bl	_ceu_write
	add	x22, x19, #8
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_2
; %bb.1:
	add	x0, x8, #8
	bl	_list_del
Lloh6:
	adrp	x8, _VIDEOBUF_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VIDEOBUF_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x0, [x19, #16]
	str	w8, [x0, #4]
	bl	_wake_up_all
	str	xzr, [x19, #16]
LBB0_2:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	w0, [x21]
	bl	_pm_runtime_put_sync
	ldp	w2, w0, [x20]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	str	xzr, [x19]
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CEIER,4,2                      ; @CEIER
	.comm	_CAPSR,4,2                      ; @CAPSR
	.comm	_VIDEOBUF_ERROR,4,2             ; @VIDEOBUF_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SuperH Mobile CEU driver detached from camera %d\n"

	.no_dead_strip	_sh_mobile_ceu_remove_device
.subsections_via_symbols
