	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk3368_calc_drv_reg_and_bit
_rk3368_calc_drv_reg_and_bit:           ## @rk3368_calc_drv_reg_and_bit
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	8(%rdi), %rax
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movq	_RK3368_DRV_GRF_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	-16(%rax), %edx
	movl	%edx, (%rcx)
	movq	_RK3288_DRV_BANK_STRIDE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	imull	(%rdi), %edx
	leal	(%rdx,%rax), %edi
	addl	$-16, %edi
	jmp	LBB0_3
LBB0_1:
	movq	8(%rax), %rax
	movq	%rax, (%rdx)
	movq	_RK3368_DRV_PMU_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_3:
	movl	%edi, (%rcx)
	movq	_RK3288_DRV_PINS_PER_REG@GOTPCREL(%rip), %r9
	movl	%esi, %eax
	cltd
	idivl	(%r9)
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rdi,%rax,4), %eax
	movl	%eax, (%rcx)
	movl	%esi, %eax
	cltd
	idivl	(%r9)
	movl	%edx, (%r8)
	movq	_RK3288_DRV_BITS_PER_PIN@GOTPCREL(%rip), %rax
	imull	(%rax), %edx
	movl	%edx, (%r8)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RK3368_DRV_PMU_OFFSET,4,2      ## @RK3368_DRV_PMU_OFFSET
	.comm	_RK3288_DRV_PINS_PER_REG,4,2    ## @RK3288_DRV_PINS_PER_REG
	.comm	_RK3288_DRV_BITS_PER_PIN,4,2    ## @RK3288_DRV_BITS_PER_PIN
	.comm	_RK3368_DRV_GRF_OFFSET,4,2      ## @RK3368_DRV_GRF_OFFSET
	.comm	_RK3288_DRV_BANK_STRIDE,4,2     ## @RK3288_DRV_BANK_STRIDE
	.no_dead_strip	_rk3368_calc_drv_reg_and_bit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk3368_calc_drv_reg_and_bit
_rk3368_calc_drv_reg_and_bit:           ; @rk3368_calc_drv_reg_and_bit
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0, #8]
	ldr	w9, [x0]
	cbz	w9, LBB0_2
; %bb.1:
	ldr	x8, [x8]
	str	x8, [x2]
Lloh0:
	adrp	x8, _RK3368_DRV_GRF_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RK3368_DRV_GRF_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w8, w8, #16
	str	w8, [x3]
	ldr	w9, [x0]
Lloh3:
	adrp	x10, _RK3288_DRV_BANK_STRIDE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _RK3288_DRV_BANK_STRIDE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	madd	w8, w10, w9, w8
	b	LBB0_3
LBB0_2:
	ldr	x8, [x8, #8]
	str	x8, [x2]
Lloh6:
	adrp	x8, _RK3368_DRV_PMU_OFFSET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RK3368_DRV_PMU_OFFSET@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
LBB0_3:
	str	w8, [x3]
Lloh9:
	adrp	x9, _RK3288_DRV_PINS_PER_REG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RK3288_DRV_PINS_PER_REG@GOTPAGEOFF]
	ldr	w10, [x9]
	sdiv	w10, w1, w10
	add	w8, w8, w10, lsl #2
	str	w8, [x3]
	ldr	w8, [x9]
	sdiv	w9, w1, w8
	msub	w8, w9, w8, w1
	str	w8, [x4]
Lloh11:
	adrp	x9, _RK3288_DRV_BITS_PER_PIN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _RK3288_DRV_BITS_PER_PIN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	mul	w8, w9, w8
	str	w8, [x4]
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_RK3368_DRV_PMU_OFFSET,4,2      ; @RK3368_DRV_PMU_OFFSET
	.comm	_RK3288_DRV_PINS_PER_REG,4,2    ; @RK3288_DRV_PINS_PER_REG
	.comm	_RK3288_DRV_BITS_PER_PIN,4,2    ; @RK3288_DRV_BITS_PER_PIN
	.comm	_RK3368_DRV_GRF_OFFSET,4,2      ; @RK3368_DRV_GRF_OFFSET
	.comm	_RK3288_DRV_BANK_STRIDE,4,2     ; @RK3288_DRV_BANK_STRIDE
	.no_dead_strip	_rk3368_calc_drv_reg_and_bit
.subsections_via_symbols
