	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ravb_set_gti
_ravb_set_gti:                          ## @ravb_set_gti
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	(%rbx), %r14
	movl	(%rax), %edi
	callq	_clk_get_rate
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movabsq	$1048576000000000, %r15         ## imm = 0x3B9ACA0000000
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_do_div
	movq	_GTI_TIV_MIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_GTI_TIV_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	cmpq	%r15, %rcx
	ja	LBB0_4
## %bb.3:
	cmpq	%r15, %r8
	jb	LBB0_4
## %bb.5:
	movq	_GTI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ravb_write
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_dev_err
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GTI_TIV_MIN,8,3                ## @GTI_TIV_MIN
	.comm	_GTI_TIV_MAX,8,3                ## @GTI_TIV_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gti.tiv increment 0x%llx is outside the range 0x%x - 0x%x\n"

	.comm	_GTI,4,2                        ## @GTI
	.no_dead_strip	_ravb_set_gti
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ravb_set_gti
_ravb_set_gti:                          ; @ravb_set_gti
	.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
	bl	_netdev_priv
	ldr	x20, [x19]
	ldr	w0, [x0]
	bl	_clk_get_rate
	cbz	x0, LBB0_3
; %bb.1:
	mov	x1, x0
	mov	x21, #2684354560
	movk	x21, #47532, lsl #32
	movk	x21, #3, lsl #48
	mov	x0, #2684354560
	movk	x0, #47532, lsl #32
	movk	x0, #3, lsl #48
	bl	_do_div
Lloh0:
	adrp	x8, _GTI_TIV_MIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GTI_TIV_MIN@GOTPAGEOFF]
Lloh2:
	ldr	x3, [x8]
Lloh3:
	adrp	x8, _GTI_TIV_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GTI_TIV_MAX@GOTPAGEOFF]
Lloh5:
	ldr	x4, [x8]
	cmp	x3, x21
	ccmp	x4, x21, #0, ls
	b.hs	LBB0_4
; %bb.2:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, #2684354560
	movk	x2, #47532, lsl #32
	movk	x2, #3, lsl #48
	bl	_dev_err
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _GTI@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GTI@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, #2684354560
	movk	x1, #47532, lsl #32
	movk	x1, #3, lsl #48
	bl	_ravb_write
	mov	w0, #0
LBB0_5:
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GTI_TIV_MIN,8,3                ; @GTI_TIV_MIN
	.comm	_GTI_TIV_MAX,8,3                ; @GTI_TIV_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gti.tiv increment 0x%llx is outside the range 0x%x - 0x%x\n"

	.comm	_GTI,4,2                        ; @GTI
	.no_dead_strip	_ravb_set_gti
.subsections_via_symbols
