	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmpcam_calc_dphy
_mmpcam_calc_dphy:                      ## @mmpcam_calc_dphy
	.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
	callq	_mcam_to_cam
	movq	%rax, %rbx
	movq	8(%rax), %r14
	movq	(%r14), %r15
	movl	(%r15), %eax
	cmpl	$129, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_4
## %bb.2:
	movl	16(%r15), %eax
	imull	$35, %eax, %ecx
                                        ## kill: def $eax killed $eax def $rax
	shll	$4, %eax
	leal	(%rax,%rax,4), %eax
	cltq
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rdx
	shrq	$63, %rdx
	shrq	$38, %rax
	addl	%edx, %eax
	shll	$8, %eax
	addl	$256, %eax                      ## imm = 0x100
	movzwl	%ax, %eax
	movslq	%ecx, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	sarq	$38, %rdx
	shrq	$63, %rcx
	addl	%edx, %ecx
	incl	%ecx
	orl	%eax, %ecx
	movq	8(%r15), %rax
	movl	%ecx, (%rax)
	jmp	LBB0_5
LBB0_3:
	movl	16(%r15), %eax
	imull	$110, %eax, %ecx
	movslq	%ecx, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$38, %rcx
	addl	%edx, %ecx
	shll	$8, %ecx
	addl	$512, %ecx                      ## imm = 0x200
	movzwl	%cx, %ecx
	imull	$35, %eax, %eax
	cltq
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rdx
	sarq	$38, %rdx
	shrq	$63, %rax
	addl	%edx, %eax
	incl	%eax
	orl	%ecx, %eax
	movq	8(%r15), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_5:
	movl	(%rbx), %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	(%rbx), %edi
	callq	_clk_prepare_enable
	movl	(%rbx), %edi
	callq	_clk_get_rate
	cltq
	imulq	$375299969, %rax, %rax          ## imm = 0x165E9F81
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$52, %rax
	addl	%ecx, %eax
	movslq	%eax, %r12
	movl	(%rbx), %edi
	callq	_clk_disable_unprepare
	imulq	$534, %r12, %rax                ## imm = 0x216
	shrq	$4, %rax
	movabsq	$147573952589676413, %rcx       ## imm = 0x20C49BA5E353F7D
	mulq	%rcx
	shll	$8, %edx
	addl	$65280, %edx                    ## imm = 0xFF00
	movzwl	%dx, %ecx
	imulq	$38, %r12, %rax
	shrq	$3, %rax
	movabsq	$2361183241434822607, %rdx      ## imm = 0x20C49BA5E353F7CF
	mulq	%rdx
	shrl	$4, %edx
	decl	%edx
	movzbl	%dl, %r8d
	orl	%ecx, %r8d
	movq	8(%r15), %rax
	movl	%r8d, 8(%rax)
	movl	(%rax), %edx
	movl	4(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"camera: use the default CSI2_DPHY3 value\n"

L_.str.1:                               ## @.str.1
	.asciz	"camera: DPHY sets: dphy3=0x%x, dphy5=0x%x, dphy6=0x%x\n"

	.no_dead_strip	_mmpcam_calc_dphy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmpcam_calc_dphy
_mmpcam_calc_dphy:                      ; @mmpcam_calc_dphy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	bl	_mcam_to_cam
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	x21, [x19]
	ldr	w8, [x21]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x21, #16]
	add	w9, w8, w8, lsl #2
	lsl	w9, w9, #4
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	smull	x9, w9, w10
	lsr	x11, x9, #63
	lsr	x9, x9, #38
	add	w9, w9, w11
	lsl	w9, w9, #8
	add	w9, w9, #256
	b	LBB0_4
LBB0_3:
	ldr	w8, [x21, #16]
	mov	w9, #110
	mul	w9, w8, w9
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	smull	x9, w9, w10
	lsr	x11, x9, #63
	lsr	x9, x9, #38
	add	w9, w9, w11
	lsl	w9, w9, #8
	add	w9, w9, #512
LBB0_4:
	and	w9, w9, #0xff00
	mov	w11, #35
	mul	w8, w8, w11
	smull	x8, w8, w10
	lsr	x10, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w10
	add	w8, w8, #1
	orr	w8, w9, w8
	ldr	x9, [x21, #8]
	str	w8, [x9]
	b	LBB0_6
LBB0_5:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
LBB0_6:
	ldr	w0, [x20]
	bl	_IS_ERR
	cbnz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x20]
	bl	_clk_prepare_enable
	ldr	w0, [x20]
	bl	_clk_get_rate
	mov	w8, #40833
	movk	w8, #5726, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #52
	add	w22, w8, w9
	ldr	w0, [x20]
	bl	_clk_disable_unprepare
	mov	w8, #534
	smull	x8, w22, w8
	lsr	x8, x8, #4
	mov	x9, #16253
	movk	x9, #24117, lsl #16
	movk	x9, #18874, lsl #32
	movk	x9, #524, lsl #48
	umulh	x8, x8, x9
	mov	w9, #65280
	add	w8, w9, w8, lsl #8
	and	x8, x8, #0xff00
	mov	w9, #38
	smull	x9, w22, w9
	lsr	x9, x9, #3
	mov	x10, #63439
	movk	x10, #58195, lsl #16
	movk	x10, #39845, lsl #32
	movk	x10, #8388, lsl #48
	umulh	x9, x9, x10
	ubfx	x9, x9, #4, #28
	sub	w9, w9, #1
	bfxil	x8, x9, #0, #8
	ldr	x9, [x21, #8]
	str	w8, [x9, #8]
	ldp	w10, w9, [x9]
	stp	x9, x8, [sp, #8]
	str	x10, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"camera: use the default CSI2_DPHY3 value\n"

l_.str.1:                               ; @.str.1
	.asciz	"camera: DPHY sets: dphy3=0x%x, dphy5=0x%x, dphy6=0x%x\n"

	.no_dead_strip	_mmpcam_calc_dphy
.subsections_via_symbols
