	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ravb_ptp_update_compare
_ravb_ptp_update_compare:               ## @ravb_ptp_update_compare
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	8(%rdi), %r14
	movl	(%rdi), %r12d
	movq	_GCCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ravb_read
	movq	_GCCR_LPTC@GOTPCREL(%rip), %r13
	testq	%rax, (%r13)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_3
LBB0_2:
	movq	%rax, %rbx
	sarl	$20, %r12d
	incl	%r12d
	movslq	%r12d, %rax
	movq	%rax, %rsi
	negq	%rsi
	cmpq	%r15, %rsi
	cmovgeq	%r15, %rsi
	cmpq	%r15, %rax
	cmovgq	%rax, %rsi
	movq	_GPTC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_ravb_write
	orq	(%r13), %rbx
	movq	_GCCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ravb_write
	xorl	%eax, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GCCR,4,2                       ## @GCCR
	.comm	_GCCR_LPTC,8,3                  ## @GCCR_LPTC
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_GPTC,4,2                       ## @GPTC
	.no_dead_strip	_ravb_ptp_update_compare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ravb_ptp_update_compare
_ravb_ptp_update_compare:               ; @ravb_ptp_update_compare
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	ldr	x19, [x0, #8]
	ldr	w24, [x0]
Lloh0:
	adrp	x22, _GCCR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GCCR@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ravb_read
Lloh2:
	adrp	x23, _GCCR_LPTC@GOTPAGE
Lloh3:
	ldr	x23, [x23, _GCCR_LPTC@GOTPAGEOFF]
	ldr	x8, [x23]
	tst	x8, x0
	b.eq	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	mov	x21, x0
	asr	w8, w24, #20
	add	w8, w8, #1
	sxtw	x8, w8
	neg	x9, x8
	cmp	x9, x20
	csneg	x9, x20, x8, ge
	cmp	x8, x20
	csel	x1, x8, x9, gt
Lloh7:
	adrp	x8, _GPTC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GPTC@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ravb_write
	ldr	x8, [x23]
	orr	x1, x8, x21
	ldr	w2, [x22]
	mov	x0, x19
	bl	_ravb_write
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GCCR,4,2                       ; @GCCR
	.comm	_GCCR_LPTC,8,3                  ; @GCCR_LPTC
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_GPTC,4,2                       ; @GPTC
	.no_dead_strip	_ravb_ptp_update_compare
.subsections_via_symbols
