	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sgi_clock_set
_sgi_clock_set:                         ## @sgi_clock_set
	.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	%rsi, %r14
	xorl	%eax, %eax
	callq	_rtc_time
	movq	_sgi_clock_period@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movq	(%r14), %rbx
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	leaq	-32(%rbp), %rdx
	movl	%eax, %edi
	callq	_div_u64_rem
	subq	%rax, %rbx
	movq	_sgi_clock_offset@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	-32(%rbp), %rdx
	movq	(%r14), %rcx
	cmpq	8(%r14), %rdx
	jle	LBB0_1
## %bb.2:
	subq	%rdx, %rcx
	addq	(%r15), %rcx
	movq	%rcx, 8(%rax)
	decq	%rbx
	movq	%rbx, (%rax)
	jmp	LBB0_3
LBB0_1:
	subq	%rdx, %rcx
	movq	%rcx, 8(%rax)
LBB0_3:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sgi_clock_period,4,2           ## @sgi_clock_period
	.comm	_NSEC_PER_SEC,8,3               ## @NSEC_PER_SEC
	.comm	_sgi_clock_offset,16,3          ## @sgi_clock_offset
	.no_dead_strip	_sgi_clock_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sgi_clock_set
_sgi_clock_set:                         ; @sgi_clock_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	bl	_rtc_time
Lloh0:
	adrp	x8, _sgi_clock_period@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sgi_clock_period@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mul	w0, w8, w0
	ldr	x21, [x19]
Lloh3:
	adrp	x20, _NSEC_PER_SEC@GOTPAGE
Lloh4:
	ldr	x20, [x20, _NSEC_PER_SEC@GOTPAGEOFF]
	ldr	x1, [x20]
	add	x2, sp, #8
	bl	_div_u64_rem
Lloh5:
	adrp	x8, _sgi_clock_offset@GOTPAGE
Lloh6:
	ldr	x8, [x8, _sgi_clock_offset@GOTPAGEOFF]
	sub	x9, x21, x0
	str	x9, [x8]
	ldr	x10, [sp, #8]
	ldp	x11, x12, [x19]
	cmp	x10, x12
	b.le	LBB0_2
; %bb.1:
	ldr	x12, [x20]
	sub	x10, x11, x10
	add	x10, x10, x12
	sub	x9, x9, #1
	stp	x9, x10, [x8]
	b	LBB0_3
LBB0_2:
	sub	x9, x11, x10
	str	x9, [x8, #8]
LBB0_3:
	mov	w0, #0
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_sgi_clock_period,4,2           ; @sgi_clock_period
	.comm	_NSEC_PER_SEC,8,3               ; @NSEC_PER_SEC
	.comm	_sgi_clock_offset,16,3          ; @sgi_clock_offset
	.no_dead_strip	_sgi_clock_set
.subsections_via_symbols
