	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fmt_scaled                     ## -- Begin function fmt_scaled
	.p2align	4, 0x90
_fmt_scaled:                            ## @fmt_scaled
	.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, %rax
	negq	%rax
	cmovsq	%rdi, %rax
	movq	%rax, %r14
	shrq	$10, %r14
	movq	_scale_factors@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r11
	movq	_SCALE_LENGTH@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %r9
	cmpq	-8(%r11,%r9,8), %r14
	jge	LBB0_6
## %bb.1:
	movq	_NONE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r10
	xorl	%r8d, %r8d
	testl	%r9d, %r9d
	je	LBB0_7
## %bb.2:
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %edx
	movq	(%r11,%rdx,8), %r15
	cmpq	%r15, %r14
	jl	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ecx
	cmpl	%ecx, %r9d
	jne	LBB0_3
LBB0_7:
	movq	%r10, %r9
LBB0_26:
	leaq	512(%r8), %rax
	addq	$1535, %r8                      ## imm = 0x5FF
	testq	%rax, %rax
	cmovnsq	%rax, %r8
	sarq	$10, %r8
	xorl	%ebx, %ebx
	testq	%r8, %r8
	cmovleq	%rbx, %r8
	testq	%rdi, %rdi
	je	LBB0_32
## %bb.27:
	cmpq	%r10, %r9
	je	LBB0_33
## %bb.28:
	cmpq	$99, %rdi
	jg	LBB0_33
## %bb.29:
	cmpq	$-99, %rdi
	jl	LBB0_33
## %bb.30:
	movq	%rdi, %rcx
LBB0_31:
	movq	_FMT_SCALED_STRSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_scale_chars@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rdx,%r9,4), %r9d
	leaq	L_.str.2(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%rsi, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_snprintf
	jmp	LBB0_39
LBB0_6:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %ebx
	jmp	LBB0_39
LBB0_32:
	movq	_FMT_SCALED_STRSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rax
	movq	%rsi, %rdi
	movq	%rax, %rsi
	callq	_strlcpy
	jmp	LBB0_39
LBB0_8:
	movq	_units@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	movq	(%rbx,%rdx,8), %r9
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.9:
	movq	%rax, %rdx
	orq	%r15, %rdx
	shrq	$32, %rdx
	je	LBB0_13
## %bb.10:
	cqto
	idivq	%r15
	movq	%rdx, %r8
	jmp	LBB0_14
LBB0_33:
	cmpq	$5, %r8
	jb	LBB0_37
## %bb.34:
	testq	%rdi, %rdi
	js	LBB0_36
## %bb.35:
	incq	%rdi
	jmp	LBB0_37
LBB0_11:
	movq	%rdi, %rax
	orq	%r15, %rax
	shrq	$32, %rax
	je	LBB0_25
## %bb.12:
	movq	%rdi, %rax
	cqto
	idivq	%r15
	xorl	%r8d, %r8d
	movq	%rax, %rdi
	jmp	LBB0_26
LBB0_13:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r15d
	movl	%edx, %r8d
LBB0_14:
	movq	%rdi, %rax
	orq	%r15, %rax
	shrq	$32, %rax
	je	LBB0_16
## %bb.15:
	movq	%rdi, %rax
	cqto
	idivq	%r15
	movq	%rax, %rdi
	jmp	LBB0_17
LBB0_16:
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	%r15d
	movl	%eax, %edi
LBB0_17:
	decl	%ecx
	movq	(%r11,%rcx,8), %rcx
	movq	%r8, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_19
## %bb.18:
	movq	%r8, %rax
	cqto
	idivq	%rcx
	jmp	LBB0_20
LBB0_19:
	movl	%r8d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_20:
	addq	%rax, %rax
	leaq	(%rax,%rax,4), %r8
	cmpq	$9727, %r8                      ## imm = 0x25FF
	jle	LBB0_26
## %bb.21:
	movq	%rdi, %rcx
	sarq	$63, %rcx
	orq	$1, %rcx
	addq	%rdi, %rcx
	cmpq	%r10, %r9
	je	LBB0_38
## %bb.22:
	cmpq	$99, %rcx
	jg	LBB0_38
## %bb.23:
	cmpq	$-99, %rcx
	jl	LBB0_38
## %bb.24:
	xorl	%r8d, %r8d
	jmp	LBB0_31
LBB0_36:
	decq	%rdi
LBB0_37:
	movq	%rdi, %rcx
LBB0_38:
	movq	_FMT_SCALED_STRSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_scale_chars@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movslq	(%rdx,%r9,4), %r8
	leaq	L_.str.1(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%rsi, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_snprintf
LBB0_39:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	xorl	%r8d, %r8d
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	%r15d
	movl	%eax, %edi
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_NONE,8,3                       ## @NONE
	.comm	_scale_factors,8,3              ## @scale_factors
	.comm	_SCALE_LENGTH,4,2               ## @SCALE_LENGTH
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_errno,4,2                      ## @errno
	.comm	_units,8,3                      ## @units
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0B"

	.comm	_FMT_SCALED_STRSIZE,4,2         ## @FMT_SCALED_STRSIZE
L_.str.1:                               ## @.str.1
	.asciz	"%lld%c"

	.comm	_scale_chars,8,3                ## @scale_chars
L_.str.2:                               ## @.str.2
	.asciz	"%lld.%1lld%c"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fmt_scaled                     ; -- Begin function fmt_scaled
	.p2align	2
_fmt_scaled:                            ; @fmt_scaled
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	cmp	x0, #0
	cneg	x10, x0, mi
	lsr	x9, x10, #10
Lloh0:
	adrp	x8, _scale_factors@GOTPAGE
Lloh1:
	ldr	x8, [x8, _scale_factors@GOTPAGEOFF]
Lloh2:
	adrp	x12, _SCALE_LENGTH@GOTPAGE
Lloh3:
	ldr	x12, [x12, _SCALE_LENGTH@GOTPAGEOFF]
Lloh4:
	ldr	x11, [x8]
Lloh5:
	ldr	w12, [x12]
	sub	w8, w12, #1
	ldr	x8, [x11, w8, sxtw #3]
	cmp	x9, x8
	b.ge	LBB0_11
; %bb.1:
	mov	x3, x0
Lloh6:
	adrp	x8, _NONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NONE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbz	w12, LBB0_5
; %bb.2:
	mov	w13, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x11, w13, uxtw #3]
	cmp	x9, x14
	b.lt	LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w13, w13, #1
	cmp	w12, w13
	b.ne	LBB0_3
LBB0_5:
	mov	x10, #0
	mov	x9, x8
LBB0_6:
	add	x11, x10, #512
	add	x10, x10, #1535
	cmp	x11, #0
	csel	x10, x10, x11, lt
	asr	x10, x10, #10
	cmp	x10, #0
	csel	x4, x10, xzr, gt
	cbz	x3, LBB0_12
; %bb.7:
	cmp	x9, x8
	b.eq	LBB0_19
; %bb.8:
	cmp	x3, #99
	b.gt	LBB0_19
; %bb.9:
	cmn	x3, #99
	b.lt	LBB0_19
LBB0_10:
Lloh9:
	adrp	x8, _FMT_SCALED_STRSIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FMT_SCALED_STRSIZE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x10, _scale_chars@GOTPAGE
Lloh13:
	ldr	x10, [x10, _scale_chars@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	ldr	w9, [x10, x9, lsl #2]
Lloh15:
	adrp	x2, l_.str.2@PAGE
Lloh16:
	add	x2, x2, l_.str.2@PAGEOFF
	str	x9, [sp]
	b	LBB0_21
LBB0_11:
Lloh17:
	adrp	x8, _ERANGE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _errno@GOTPAGE
Lloh21:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh22:
	str	w8, [x9]
	mov	w0, #-1
	b	LBB0_23
LBB0_12:
Lloh23:
	adrp	x8, _FMT_SCALED_STRSIZE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FMT_SCALED_STRSIZE@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
Lloh26:
	adrp	x8, l_.str@PAGE
Lloh27:
	add	x8, x8, l_.str@PAGEOFF
	mov	x0, x1
	mov	x1, x8
	bl	_strlcpy
	b	LBB0_22
LBB0_13:
Lloh28:
	adrp	x9, _units@GOTPAGE
Lloh29:
	ldr	x9, [x9, _units@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	ldr	x9, [x9, w13, uxtw #3]
	cbz	w13, LBB0_24
; %bb.14:
	sdiv	x12, x10, x14
	msub	x10, x12, x14, x10
	sub	w12, w13, #1
	ldr	x11, [x11, w12, uxtw #3]
	sdiv	x10, x10, x11
	add	x10, x10, x10, lsl #2
	lsl	x10, x10, #1
	mov	w11, #9727
	sdiv	x3, x3, x14
	cmp	x10, x11
	b.le	LBB0_6
; %bb.15:
	asr	x10, x3, #63
	orr	x10, x10, #0x1
	add	x3, x10, x3
	cmp	x9, x8
	b.eq	LBB0_20
; %bb.16:
	cmp	x3, #99
	b.gt	LBB0_20
; %bb.17:
	cmn	x3, #99
	b.lt	LBB0_20
; %bb.18:
	mov	x4, #0
	b	LBB0_10
LBB0_19:
	sub	x8, x3, #1
	tst	x3, #0x8000000000000000
	csinc	x8, x8, x3, ne
	cmp	x4, #5
	csel	x3, x3, x8, lo
LBB0_20:
Lloh31:
	adrp	x8, _FMT_SCALED_STRSIZE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _FMT_SCALED_STRSIZE@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x10, _scale_chars@GOTPAGE
Lloh35:
	ldr	x10, [x10, _scale_chars@GOTPAGEOFF]
Lloh36:
	ldr	x10, [x10]
	ldrsw	x4, [x10, x9, lsl #2]
Lloh37:
	adrp	x2, l_.str.1@PAGE
Lloh38:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_21:
	mov	x0, x1
	mov	x1, x8
	bl	_snprintf
LBB0_22:
	mov	w0, #0
LBB0_23:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
LBB0_24:
	mov	x10, #0
	sdiv	x3, x3, x14
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_NONE,8,3                       ; @NONE
	.comm	_scale_factors,8,3              ; @scale_factors
	.comm	_SCALE_LENGTH,4,2               ; @SCALE_LENGTH
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_errno,4,2                      ; @errno
	.comm	_units,8,3                      ; @units
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0B"

	.comm	_FMT_SCALED_STRSIZE,4,2         ; @FMT_SCALED_STRSIZE
l_.str.1:                               ; @.str.1
	.asciz	"%lld%c"

	.comm	_scale_chars,8,3                ; @scale_chars
l_.str.2:                               ; @.str.2
	.asciz	"%lld.%1lld%c"

.subsections_via_symbols
