	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_mobile_ceu_set_bus_param
_sh_mobile_ceu_set_bus_param:           ## @sh_mobile_ceu_set_bus_param
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movl	8(%rdi), %edi
	callq	_to_soc_camera_host
	movq	(%rax), %r15
	movq	32(%r13), %r14
	movq	%r15, %rdi
	callq	_capture_save_reset
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	24(%r13), %rax
	movq	%r13, %rdi
	callq	*(%rax)
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_make_bus_param
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_soc_camera_bus_param_compatible
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	24(%r13), %rax
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	*8(%rax)
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_SOCAM_DATAWIDTH_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	%r12, %rax
	movl	$0, %ecx
	cmpq	$136, %rax
	je	LBB0_7
## %bb.5:
	cmpq	$137, %rax
	jne	LBB0_1
## %bb.6:
	movl	$1, %ecx
LBB0_7:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, (%r15)
	movq	_CRCNTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_ceu_write
	movq	_CRCMPR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_ceu_write
	movq	16(%r13), %rax
	movl	(%rax), %eax
	leal	-132(%rax), %ecx
	movl	$16, %ebx
	cmpl	$3, %ecx
	ja	LBB0_14
## %bb.8:
	movslq	%ecx, %rcx
	leaq	L_switch.table.sh_mobile_ceu_set_bus_param(%rip), %rdx
	movl	(%rdx,%rcx,4), %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rcx
	movl	(%rcx), %ecx
	addl	$-128, %ecx
	cmpl	$3, %ecx
	ja	LBB0_13
## %bb.9:
	xorl	%ebx, %ebx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_12:
	movl	$768, %ebx                      ## imm = 0x300
	jmp	LBB0_14
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_3:
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_13:
	xorl	%eax, %eax
	callq	_BUG
	movq	16(%r13), %rax
	movl	(%rax), %eax
	jmp	LBB0_14
LBB0_11:
	movl	$512, %ebx                      ## imm = 0x200
	jmp	LBB0_14
LBB0_10:
	movl	$256, %ebx                      ## imm = 0x100
LBB0_14:
	andl	$-2, %eax
	movq	%rbx, %rcx
	xorq	$256, %rcx                      ## imm = 0x100
	cmpl	$132, %eax
	cmovneq	%rbx, %rcx
	movq	_SOCAM_VSYNC_ACTIVE_LOW@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	movq	(%rax), %rax
	andq	%r12, %rax
	setne	%dl
	addq	%rdx, %rdx
	movq	_SOCAM_HSYNC_ACTIVE_LOW@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	andq	(%rax), %r12
	setne	%sil
	orq	%rcx, %rsi
	orq	%rdx, %rsi
	xorl	%edx, %edx
	cmpl	$0, (%r15)
	setne	%dl
	shlq	$12, %rdx
	orq	%rsi, %rdx
	movq	_CAMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ceu_write
	movq	_CAPCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$3145728, %edx                  ## imm = 0x300000
	movq	%r15, %rdi
	callq	_ceu_write
	movq	_CAIFR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r15), %rax
	testq	%rax, %rax
	movl	$257, %edx                      ## imm = 0x101
	cmoveq	%rax, %rdx
	movq	%r15, %rdi
	callq	_ceu_write
	movl	(%r13), %edx
	movl	4(%r13), %esi
	movq	%r13, %rdi
	callq	_sh_mobile_ceu_set_rect
	movl	$1, %edi
	callq	_mdelay
	movq	_CFLCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r15), %rdx
	movq	%r15, %rdi
	callq	_ceu_write
	xorl	%edx, %edx
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	sete	%dl
	shlq	$4, %rdx
	orq	$7, %rdx
	movq	_CDOCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ceu_write
	movq	_CFWCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_ceu_write
	movl	8(%r13), %edi
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movzbl	%al, %edx
	movzbl	%ah, %ecx
	movl	%eax, %r9d
	shrl	$16, %eax
	movzbl	%al, %r8d
	shrl	$24, %r9d
	movl	(%r13), %eax
	movl	4(%r13), %r10d
	leaq	L_.str(%rip), %rsi
	pushq	%rax
	pushq	%r10
	callq	_dev_dbg
	addq	$16, %rsp
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_capture_restore
LBB0_15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_11
	.long	L0_0_set_10
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SOCAM_DATAWIDTH_MASK,8,3       ## @SOCAM_DATAWIDTH_MASK
	.comm	_CRCNTR,4,2                     ## @CRCNTR
	.comm	_CRCMPR,4,2                     ## @CRCMPR
	.comm	_SOCAM_VSYNC_ACTIVE_LOW,8,3     ## @SOCAM_VSYNC_ACTIVE_LOW
	.comm	_SOCAM_HSYNC_ACTIVE_LOW,8,3     ## @SOCAM_HSYNC_ACTIVE_LOW
	.comm	_CAMCR,4,2                      ## @CAMCR
	.comm	_CAPCR,4,2                      ## @CAPCR
	.comm	_CAIFR,4,2                      ## @CAIFR
	.comm	_CFLCR,4,2                      ## @CFLCR
	.comm	_CDOCR,4,2                      ## @CDOCR
	.comm	_CFWCR,4,2                      ## @CFWCR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"S_FMT successful for %c%c%c%c %ux%u\n"

	.no_dead_strip	_sh_mobile_ceu_set_bus_param
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ## @switch.table.sh_mobile_ceu_set_bus_param
L_switch.table.sh_mobile_ceu_set_bus_param:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	1                               ## 0x1

.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_set_bus_param
_sh_mobile_ceu_set_bus_param:           ; @sh_mobile_ceu_set_bus_param
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x22, x0
	ldr	w0, [x0, #8]
	bl	_to_soc_camera_host
	ldr	x19, [x0]
	ldr	x25, [x22, #32]
	mov	x0, x19
	bl	_capture_save_reset
	mov	x20, x0
	ldr	x8, [x22, #24]
	ldr	x8, [x8]
	mov	x0, x22
	blr	x8
	mov	x23, x0
	mov	x0, x19
	bl	_make_bus_param
	mov	x1, x0
	mov	x0, x23
	bl	_soc_camera_bus_param_compatible
	cbz	x0, LBB0_5
; %bb.1:
	mov	x23, x0
	ldr	x8, [x22, #24]
	ldr	x8, [x8, #8]
	mov	x0, x22
	mov	x1, x23
	blr	x8
	tbnz	w0, #31, LBB0_14
; %bb.2:
Lloh0:
	adrp	x8, _SOCAM_DATAWIDTH_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOCAM_DATAWIDTH_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	and	x8, x8, x23
	cmp	x8, #136
	b.eq	LBB0_6
; %bb.3:
	cmp	x8, #137
	b.ne	LBB0_5
; %bb.4:
	mov	w8, #1
	b	LBB0_7
LBB0_5:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_6:
	mov	w8, #0
LBB0_7:
	str	w8, [x19]
Lloh6:
	adrp	x8, _CRCNTR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CRCNTR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_ceu_write
Lloh9:
	adrp	x8, _CRCMPR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CRCMPR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_ceu_write
	ldr	x8, [x22, #16]
	ldr	w8, [x8]
	sub	w9, w8, #132
	cmp	w9, #3
	b.hi	LBB0_11
; %bb.8:
Lloh12:
	adrp	x10, l_switch.table.sh_mobile_ceu_set_bus_param@PAGE
Lloh13:
	add	x10, x10, l_switch.table.sh_mobile_ceu_set_bus_param@PAGEOFF
	ldr	w24, [x10, w9, sxtw #2]
	ldr	x9, [x25]
	ldr	w9, [x9]
	sub	w10, w9, #128
	cmp	w10, #3
	b.hi	LBB0_15
; %bb.9:
	mov	x9, #0
Lloh14:
	adrp	x11, lJTI0_0@PAGE
Lloh15:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_10
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_10:
	mov	w9, #768
	b	LBB0_13
LBB0_11:
	mov	w24, #0
LBB0_12:
	mov	w9, #16
LBB0_13:
	and	w8, w8, #0xfffffffe
	eor	x10, x9, #0x100
	cmp	w8, #132
Lloh16:
	adrp	x8, _SOCAM_VSYNC_ACTIVE_LOW@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SOCAM_VSYNC_ACTIVE_LOW@GOTPAGEOFF]
	csel	x9, x10, x9, eq
Lloh18:
	ldr	x8, [x8]
	tst	x8, x23
	cset	w8, ne
Lloh19:
	adrp	x10, _SOCAM_HSYNC_ACTIVE_LOW@GOTPAGE
Lloh20:
	ldr	x10, [x10, _SOCAM_HSYNC_ACTIVE_LOW@GOTPAGEOFF]
	orr	x8, x9, x8, lsl #1
Lloh21:
	ldr	x9, [x10]
	tst	x9, x23
	cset	w9, ne
	orr	x2, x8, x9
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w8, ne
	bfi	x2, x8, #12, #1
Lloh22:
	adrp	x8, _CAMCR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CAMCR@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ceu_write
Lloh25:
	adrp	x8, _CAPCR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CAPCR@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #3145728
	bl	_ceu_write
Lloh28:
	adrp	x8, _CAIFR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CAIFR@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
	mov	w9, #257
	cmp	x8, #0
	csel	x2, xzr, x9, eq
	mov	x0, x19
	bl	_ceu_write
	ldp	w2, w1, [x22]
	mov	x0, x22
	bl	_sh_mobile_ceu_set_rect
	mov	w0, #1
	bl	_mdelay
Lloh31:
	adrp	x8, _CFLCR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CFLCR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
	mov	x0, x19
	bl	_ceu_write
	cmp	w24, #0
	mov	w8, #7
	mov	w9, #23
	csel	x2, x9, x8, eq
Lloh34:
	adrp	x8, _CDOCR@GOTPAGE
Lloh35:
	ldr	x8, [x8, _CDOCR@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ceu_write
Lloh37:
	adrp	x8, _CFWCR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _CFWCR@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_ceu_write
	ldp	w6, w0, [x22, #4]
	and	w2, w21, #0xff
	ubfx	w3, w21, #8, #8
	ubfx	w4, w21, #16, #8
	ldr	w7, [x22]
	lsr	w5, w21, #24
Lloh40:
	adrp	x1, l_.str@PAGE
Lloh41:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	mov	x1, x20
	bl	_capture_restore
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	_BUG
	ldr	x8, [x22, #16]
	ldr	w8, [x8]
	b	LBB0_12
LBB0_16:
	mov	w9, #512
	b	LBB0_13
LBB0_17:
	mov	w9, #256
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_10)>>2
	.byte	(LBB0_16-LBB0_10)>>2
	.byte	(LBB0_17-LBB0_10)>>2
	.byte	(LBB0_13-LBB0_10)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SOCAM_DATAWIDTH_MASK,8,3       ; @SOCAM_DATAWIDTH_MASK
	.comm	_CRCNTR,4,2                     ; @CRCNTR
	.comm	_CRCMPR,4,2                     ; @CRCMPR
	.comm	_SOCAM_VSYNC_ACTIVE_LOW,8,3     ; @SOCAM_VSYNC_ACTIVE_LOW
	.comm	_SOCAM_HSYNC_ACTIVE_LOW,8,3     ; @SOCAM_HSYNC_ACTIVE_LOW
	.comm	_CAMCR,4,2                      ; @CAMCR
	.comm	_CAPCR,4,2                      ; @CAPCR
	.comm	_CAIFR,4,2                      ; @CAIFR
	.comm	_CFLCR,4,2                      ; @CFLCR
	.comm	_CDOCR,4,2                      ; @CDOCR
	.comm	_CFWCR,4,2                      ; @CFWCR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"S_FMT successful for %c%c%c%c %ux%u\n"

	.no_dead_strip	_sh_mobile_ceu_set_bus_param
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @switch.table.sh_mobile_ceu_set_bus_param
l_switch.table.sh_mobile_ceu_set_bus_param:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	1                               ; 0x1

.subsections_via_symbols
