	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function time_alloc
LCPI0_0:
	.quad	0x412e848000000000              ## double 1.0E+6
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_time_alloc:                            ## @time_alloc
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movsd	%xmm1, -48(%rbp)                ## 8-byte Spill
	movsd	%xmm0, -40(%rbp)                ## 8-byte Spill
	movq	%rdi, %r15
	cvttsd2si	%xmm0, %esi
	callq	_mrb_check_num_exact
	cvttsd2si	-48(%rbp), %esi         ## 8-byte Folded Reload
	movq	%r15, %rdi
	callq	_mrb_check_num_exact
	movsd	-40(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	movq	_INT64_MAX@GOTPCREL(%rip), %rax
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%rax), %xmm0
	ucomisd	%xmm0, %xmm1
	ja	LBB0_1
## %bb.2:
	movq	_INT64_MIN@GOTPCREL(%rip), %rax
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%rax), %xmm0
	ucomisd	%xmm1, %xmm0
	jbe	LBB0_4
LBB0_1:
	xorl	%r12d, %r12d
LBB0_8:
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	movsd	-40(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_mrb_float_value
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_mrb_raisef
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r12, %xmm0
LBB0_9:
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	movq	%r15, %rdi
	movl	$24, %esi
	callq	_mrb_malloc
	movq	%rax, %rbx
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	movsd	%xmm1, (%rax)
	movsd	-40(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	subsd	%xmm1, %xmm0
	mulsd	LCPI0_0(%rip), %xmm0
	addsd	-48(%rbp), %xmm0                ## 8-byte Folded Reload
	callq	_llround
	movq	%rax, %rdi
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	js	LBB0_12
## %bb.10:
	cmpq	$1000000, %rdi                  ## imm = 0xF4240
	jb	LBB0_14
## %bb.11:
	movabsq	$4835703278458516699, %rcx      ## imm = 0x431BDE82D7B634DB
	movq	%rdi, %rax
	mulq	%rcx
	movq	%rdx, %rax
	shrq	$18, %rax
	imulq	$-1000000, %rax, %rcx           ## imm = 0xFFF0BDC0
	addq	%rdi, %rcx
	jmp	LBB0_13
LBB0_12:
	movl	$1000000, %esi                  ## imm = 0xF4240
	callq	_NDIV
	imulq	$-1000000, %rax, %rcx           ## imm = 0xFFF0BDC0
	addq	8(%rbx), %rcx
LBB0_13:
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	movq	%rcx, 8(%rbx)
	addsd	(%rbx), %xmm0
	movsd	%xmm0, (%rbx)
LBB0_14:
	movl	%r14d, 16(%rbx)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_time_update_datetime
	movq	%rbx, %rax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cvttsd2si	%xmm1, %r12
	xorpd	%xmm0, %xmm0
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_6
## %bb.5:
	testq	%r12, %r12
	js	LBB0_8
LBB0_6:
	ucomisd	%xmm1, %xmm0
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r12, %xmm0
	jbe	LBB0_9
## %bb.7:
	ucomisd	%xmm1, %xmm0
	ja	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_INT64_MAX,8,3                  ## @INT64_MAX
	.comm	_INT64_MIN,8,3                  ## @INT64_MIN
	.comm	_E_ARGUMENT_ERROR,4,2           ## @E_ARGUMENT_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%S out of Time range"

	.comm	_INT32_MAX,8,3                  ## @INT32_MAX
	.comm	_INT32_MIN,8,3                  ## @INT32_MIN
	.comm	_UINT32_MAX,8,3                 ## @UINT32_MAX
	.comm	_UINT64_MAX,8,3                 ## @UINT64_MAX
	.no_dead_strip	_time_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function time_alloc
_time_alloc:                            ; @time_alloc
	.cfi_startproc
; %bb.0:
	stp	d11, d10, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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 b8, -56
	.cfi_offset b9, -64
	.cfi_offset b10, -72
	.cfi_offset b11, -80
	mov	x19, x1
	fmov	d8, d1
	fmov	d9, d0
	mov	x20, x0
	fcvtzs	w1, d0
	bl	_mrb_check_num_exact
	fcvtzs	w1, d8
	mov	x0, x20
	bl	_mrb_check_num_exact
Lloh0:
	adrp	x8, _INT64_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT64_MAX@GOTPAGEOFF]
Lloh2:
	ldr	d0, [x8]
	scvtf	d0, d0
	fcmp	d0, d9
	b.mi	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _INT64_MIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INT64_MIN@GOTPAGEOFF]
Lloh5:
	ldr	d0, [x8]
	scvtf	d0, d0
	fcmp	d0, d9
	b.le	LBB0_10
LBB0_2:
	mov	x22, #0
LBB0_3:
Lloh6:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
	mov	x0, x20
	fmov	d0, d9
	bl	_mrb_float_value
	mov	x3, x0
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	bl	_mrb_raisef
	scvtf	d10, x22
LBB0_4:
	mov	x0, x20
	mov	w1, #24
	bl	_mrb_malloc
	mov	x21, x0
	str	d10, [x0]
	fsub	d0, d9, d10
	mov	x8, #145685290680320
	movk	x8, #16686, lsl #48
	fmov	d1, x8
	fmadd	d0, d0, d1, d8
	bl	_llround
	mov	x8, x0
	str	x0, [x21, #8]
	tbnz	x0, #63, LBB0_7
; %bb.5:
	mov	w9, #16959
	movk	w9, #15, lsl #16
	cmp	x8, x9
	b.ls	LBB0_9
; %bb.6:
	add	x9, x9, #1
	udiv	x0, x8, x9
	mov	x9, #-16960
	movk	x9, #65520, lsl #16
	madd	x8, x0, x9, x8
	b	LBB0_8
LBB0_7:
	mov	x0, x8
	mov	w1, #16960
	movk	w1, #15, lsl #16
	bl	_NDIV
	mov	x8, #-16960
	movk	x8, #65520, lsl #16
	ldr	x9, [x21, #8]
	madd	x8, x0, x8, x9
LBB0_8:
	str	x8, [x21, #8]
	scvtf	d0, x0
	ldr	d1, [x21]
	fadd	d0, d1, d0
	str	d0, [x21]
LBB0_9:
	str	w19, [x21, #16]
	mov	x0, x20
	mov	x1, x21
	bl	_time_update_datetime
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
	fcvtzs	x22, d9
	fcmp	d9, #0.0
	b.le	LBB0_12
; %bb.11:
	tbnz	x22, #63, LBB0_3
LBB0_12:
	scvtf	d10, x22
	fcmp	d9, #0.0
	b.pl	LBB0_4
; %bb.13:
	fcmp	d10, d9
	b.gt	LBB0_3
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_INT64_MAX,8,3                  ; @INT64_MAX
	.comm	_INT64_MIN,8,3                  ; @INT64_MIN
	.comm	_E_ARGUMENT_ERROR,4,2           ; @E_ARGUMENT_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%S out of Time range"

	.comm	_INT32_MAX,8,3                  ; @INT32_MAX
	.comm	_INT32_MIN,8,3                  ; @INT32_MIN
	.comm	_UINT32_MAX,8,3                 ; @UINT32_MAX
	.comm	_UINT64_MAX,8,3                 ; @UINT64_MAX
	.no_dead_strip	_time_alloc
.subsections_via_symbols
