	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar8xxx_byte_to_str
_ar8xxx_byte_to_str:                    ## @ar8xxx_byte_to_str
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edx killed $edx def $rdx
	movl	%esi, %r14d
	movq	%rdi, %r15
	cmpl	$1073741824, %edx               ## imm = 0x40000000
	jl	LBB0_2
## %bb.1:
	addl	%edx, %edx
	leal	(%rdx,%rdx,4), %eax
	leal	(%rdx,%rdx,4), %ecx
	addl	$1073741823, %ecx               ## imm = 0x3FFFFFFF
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$30, %ecx
	movslq	%ecx, %rbx
	leaq	L_.str(%rip), %r12
	jmp	LBB0_7
LBB0_2:
	cmpl	$1048576, %edx                  ## imm = 0x100000
	jl	LBB0_4
## %bb.3:
	addl	%edx, %edx
	leal	(%rdx,%rdx,4), %eax
	leal	(%rdx,%rdx,4), %ecx
	addl	$1048575, %ecx                  ## imm = 0xFFFFF
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$20, %ecx
	movslq	%ecx, %rbx
	leaq	L_.str.1(%rip), %r12
	jmp	LBB0_7
LBB0_4:
	cmpl	$1024, %edx                     ## imm = 0x400
	jl	LBB0_6
## %bb.5:
	addl	%edx, %edx
	leal	(%rdx,%rdx,4), %ebx
	shrl	$10, %ebx
	leaq	L_.str.2(%rip), %r12
	jmp	LBB0_7
LBB0_6:
	movslq	%edx, %rbx
	leaq	L_.str.3(%rip), %r12
LBB0_7:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movabsq	$-3689348814741910323, %rcx     ## imm = 0xCCCCCCCCCCCCCCCD
	movq	%rbx, %rax
	mulq	%rcx
	movq	%rdx, %rcx
	shrq	$3, %rcx
	leaq	(%rcx,%rcx), %rax
	leaq	(%rax,%rax,4), %rax
	subq	%rax, %rbx
	leaq	L_.str.4(%rip), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %r8
	movq	%r12, %r9
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snprintf                       ## TAILCALL
LBB0_9:
	leaq	L_.str.5(%rip), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rcx
	movq	%r12, %r8
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snprintf                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GiB"

L_.str.1:                               ## @.str.1
	.asciz	"MiB"

L_.str.2:                               ## @.str.2
	.asciz	"KiB"

L_.str.3:                               ## @.str.3
	.asciz	"Byte"

L_.str.4:                               ## @.str.4
	.asciz	"%lu.%lu %s"

L_.str.5:                               ## @.str.5
	.asciz	"%lu %s"

	.no_dead_strip	_ar8xxx_byte_to_str
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar8xxx_byte_to_str
_ar8xxx_byte_to_str:                    ; @ar8xxx_byte_to_str
	.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
                                        ; kill: def $w2 killed $w2 def $x2
	mov	x19, x1
	mov	x20, x0
	mov	w8, #1073741824
	cmp	w2, #1024
	sxtw	x9, w2
Lloh0:
	adrp	x10, l_.str.3@PAGE
Lloh1:
	add	x10, x10, l_.str.3@PAGEOFF
	add	w11, w2, w2, lsl #2
Lloh2:
	adrp	x12, l_.str.2@PAGE
Lloh3:
	add	x12, x12, l_.str.2@PAGEOFF
	ubfx	w13, w11, #9, #22
	csel	x9, x9, x13, lt
	csel	x10, x10, x12, lt
	lsl	w11, w11, #1
	mov	w12, #1048575
	add	w12, w11, w12
	cmp	w11, #0
	csel	w12, w12, w11, lt
	sbfx	x12, x12, #20, #12
Lloh4:
	adrp	x13, l_.str.1@PAGE
Lloh5:
	add	x13, x13, l_.str.1@PAGEOFF
	cmp	w2, #256, lsl #12               ; =1048576
	csel	x9, x9, x12, lt
	csel	x10, x10, x13, lt
	mov	w12, #1073741823
	add	w12, w11, w12
	cmp	w11, #0
	csel	w11, w12, w11, lt
	sbfx	x11, x11, #30, #2
Lloh6:
	adrp	x12, l_.str@PAGE
Lloh7:
	add	x12, x12, l_.str@PAGEOFF
	cmp	w2, w8
	csel	x21, x9, x11, lt
	csel	x22, x10, x12, lt
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	bl	_strcmp
	cbz	x0, LBB0_2
; %bb.1:
	mov	x8, #-3689348814741910324
	movk	x8, #52429
	umulh	x8, x21, x8
	lsr	x3, x8, #3
	mov	w8, #10
	msub	x8, x3, x8, x21
	stp	x8, x22, [sp]
Lloh10:
	adrp	x2, l_.str.4@PAGE
Lloh11:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	b	LBB0_3
LBB0_2:
	str	x22, [sp]
Lloh12:
	adrp	x2, l_.str.5@PAGE
Lloh13:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	mov	x3, x21
LBB0_3:
	bl	_snprintf
	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 AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GiB"

l_.str.1:                               ; @.str.1
	.asciz	"MiB"

l_.str.2:                               ; @.str.2
	.asciz	"KiB"

l_.str.3:                               ; @.str.3
	.asciz	"Byte"

l_.str.4:                               ; @.str.4
	.asciz	"%lu.%lu %s"

l_.str.5:                               ; @.str.5
	.asciz	"%lu %s"

	.no_dead_strip	_ar8xxx_byte_to_str
.subsections_via_symbols
