	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_gyroadc_hw_init
_rcar_gyroadc_hw_init:                  ## @rcar_gyroadc_hw_init
	.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, %r15
	movl	24(%rdi), %edi
	callq	_clk_get_rate
	movl	%eax, %r14d
	movq	(%r15), %r12
	movq	_RCAR_GYROADC_MODE_SELECT_1_MB88101A@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_RCAR_GYROADC_START_STOP@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	8(%r15), %rax
	movq	_RCAR_GYROADC_MODEL_R8A7792@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_RCAR_GYROADC_INTENR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	xorl	%edi, %edi
	callq	_writel
LBB0_2:
	xorl	%eax, %eax
	cmpq	%rbx, %r12
	sete	%al
	leaq	(%rax,%rax,4), %rax
	addq	$5, %rax
	movslq	%r14d, %rcx
	imulq	$1125899907, %rcx, %rcx         ## imm = 0x431BDE83
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$50, %rcx
	addl	%edx, %ecx
	movslq	%ecx, %r14
	imulq	%r14, %rax
	movl	%eax, %ebx
	andl	$1, %ebx
	addq	%rax, %rbx
	movq	(%r15), %rdi
	movq	_RCAR_GYROADC_MODE_SELECT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	callq	_writel
	movq	_RCAR_GYROADC_CLOCK_LENGTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	movq	%rbx, %rdi
	callq	_writel
	imulq	$1250, %r14, %rdi               ## imm = 0x4E2
	movq	_RCAR_GYROADC_1_25MS_LENGTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RCAR_GYROADC_MODE_SELECT_1_MB88101A,8,3 ## @RCAR_GYROADC_MODE_SELECT_1_MB88101A
	.comm	_RCAR_GYROADC_START_STOP,8,3    ## @RCAR_GYROADC_START_STOP
	.comm	_RCAR_GYROADC_MODEL_R8A7792,8,3 ## @RCAR_GYROADC_MODEL_R8A7792
	.comm	_RCAR_GYROADC_INTENR,8,3        ## @RCAR_GYROADC_INTENR
	.comm	_RCAR_GYROADC_MODE_SELECT,8,3   ## @RCAR_GYROADC_MODE_SELECT
	.comm	_RCAR_GYROADC_CLOCK_LENGTH,8,3  ## @RCAR_GYROADC_CLOCK_LENGTH
	.comm	_RCAR_GYROADC_1_25MS_LENGTH,8,3 ## @RCAR_GYROADC_1_25MS_LENGTH
	.no_dead_strip	_rcar_gyroadc_hw_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_gyroadc_hw_init
_rcar_gyroadc_hw_init:                  ; @rcar_gyroadc_hw_init
	.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	x19, x0
	ldr	w0, [x0, #24]
	bl	_clk_get_rate
	mov	x20, x0
	ldr	x21, [x19]
Lloh0:
	adrp	x8, _RCAR_GYROADC_MODE_SELECT_1_MB88101A@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RCAR_GYROADC_MODE_SELECT_1_MB88101A@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	ldr	x8, [x19, #16]
Lloh3:
	adrp	x9, _RCAR_GYROADC_START_STOP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RCAR_GYROADC_START_STOP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, #0
	bl	_writel
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _RCAR_GYROADC_MODEL_R8A7792@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RCAR_GYROADC_MODEL_R8A7792@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19, #16]
Lloh9:
	adrp	x9, _RCAR_GYROADC_INTENR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RCAR_GYROADC_INTENR@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, #0
	bl	_writel
LBB0_2:
	mov	w8, #5
	mov	w9, #10
	cmp	x21, x22
	csel	x8, x9, x8, eq
	mov	w9, #56963
	movk	w9, #17179, lsl #16
	smull	x9, w20, w9
	lsr	x10, x9, #63
	asr	x9, x9, #50
	add	w21, w9, w10
	sxtw	x9, w21
	mul	x8, x8, x9
	and	x9, x8, #0x1
	add	x20, x9, x8
	ldr	x0, [x19]
	ldr	x8, [x19, #16]
Lloh12:
	adrp	x9, _RCAR_GYROADC_MODE_SELECT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _RCAR_GYROADC_MODE_SELECT@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #16]
Lloh15:
	adrp	x9, _RCAR_GYROADC_CLOCK_LENGTH@GOTPAGE
Lloh16:
	ldr	x9, [x9, _RCAR_GYROADC_CLOCK_LENGTH@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writel
	mov	w8, #1250
	smull	x0, w21, w8
	ldr	x8, [x19, #16]
Lloh18:
	adrp	x9, _RCAR_GYROADC_1_25MS_LENGTH@GOTPAGE
Lloh19:
	ldr	x9, [x9, _RCAR_GYROADC_1_25MS_LENGTH@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x1, x9, x8
	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
	b	_writel
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RCAR_GYROADC_MODE_SELECT_1_MB88101A,8,3 ; @RCAR_GYROADC_MODE_SELECT_1_MB88101A
	.comm	_RCAR_GYROADC_START_STOP,8,3    ; @RCAR_GYROADC_START_STOP
	.comm	_RCAR_GYROADC_MODEL_R8A7792,8,3 ; @RCAR_GYROADC_MODEL_R8A7792
	.comm	_RCAR_GYROADC_INTENR,8,3        ; @RCAR_GYROADC_INTENR
	.comm	_RCAR_GYROADC_MODE_SELECT,8,3   ; @RCAR_GYROADC_MODE_SELECT
	.comm	_RCAR_GYROADC_CLOCK_LENGTH,8,3  ; @RCAR_GYROADC_CLOCK_LENGTH
	.comm	_RCAR_GYROADC_1_25MS_LENGTH,8,3 ; @RCAR_GYROADC_1_25MS_LENGTH
	.no_dead_strip	_rcar_gyroadc_hw_init
.subsections_via_symbols
