	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scale_n_add
_scale_n_add:                           ## @scale_n_add
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_BAD_TIME@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	cmpq	%rdi, %r9
	jne	LBB0_3
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_7
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	jmp	LBB0_7
LBB0_3:
	movl	%edx, %r8d
	movq	_MAX_DURATION@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movl	%ecx, %eax
	cltd
	idivl	%r8d
	cltq
	cmpq	%rsi, %rax
	jl	LBB0_4
## %bb.5:
	movslq	%r8d, %rax
	imulq	%rsi, %rax
	subq	%rax, %rcx
	cmpq	%rdi, %rcx
	jge	LBB0_6
LBB0_4:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	%r9, %rdi
	jmp	LBB0_7
LBB0_6:
	addq	%rax, %rdi
LBB0_7:
	movq	%rdi, %rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BAD_TIME,8,3                   ## @BAD_TIME
	.comm	_errno,8,3                      ## @errno
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_MAX_DURATION,4,2               ## @MAX_DURATION
	.comm	_ERANGE,8,3                     ## @ERANGE
	.no_dead_strip	_scale_n_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scale_n_add
_scale_n_add:                           ; @scale_n_add
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w2 killed $w2 def $x2
Lloh0:
	adrp	x8, _BAD_TIME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BAD_TIME@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.ne	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
	ldr	x9, [x8]
	cbz	x9, LBB0_6
; %bb.2:
	ret
LBB0_3:
Lloh5:
	adrp	x9, _MAX_DURATION@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MAX_DURATION@GOTPAGEOFF]
Lloh7:
	ldrsw	x9, [x9]
	sdiv	w10, w9, w2
	sxtw	x10, w10
	cmp	x10, x1
	b.lt	LBB0_5
; %bb.4:
	sxtw	x10, w2
	mul	x10, x10, x1
	sub	x9, x9, x10
	cmp	x9, x0
	b.ge	LBB0_7
LBB0_5:
Lloh8:
	adrp	x9, _ERANGE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ERANGE@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x10, _errno@GOTPAGE
Lloh12:
	ldr	x10, [x10, _errno@GOTPAGEOFF]
Lloh13:
	str	x9, [x10]
	mov	x0, x8
	ret
LBB0_6:
Lloh14:
	adrp	x9, _EINVAL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	str	x9, [x8]
	ret
LBB0_7:
	add	x0, x10, x0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_BAD_TIME,8,3                   ; @BAD_TIME
	.comm	_errno,8,3                      ; @errno
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_MAX_DURATION,4,2               ; @MAX_DURATION
	.comm	_ERANGE,8,3                     ; @ERANGE
	.no_dead_strip	_scale_n_add
.subsections_via_symbols
