	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rr13
_rr13:                                  ## @rr13
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	leaq	7(%rsi), %r12
	shrq	$3, %r12
	movl	$13, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpq	$13, %rsi
	ja	LBB0_3
## %bb.2:
	movl	$13, %eax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
LBB0_3:
	movl	%r12d, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movl	%ebx, %r13d
	andl	$7, %r13d
	movq	%rax, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	testl	%r13d, %r13d
	je	LBB0_8
## %bb.6:
	movb	$8, %cl
	subb	%r13b, %cl
	movl	$255, %eax
	shll	%cl, %eax
	leal	-1(%r12), %ecx
	movslq	%ecx, %rdx
	andb	(%r14,%rdx), %al
	movb	%al, (%r14,%rdx)
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r15), %esi
	movl	%r13d, %ecx
	shrl	%cl, %esi
	orb	%sil, %al
	movb	%al, (%r14,%rdx)
	addl	%ebx, %r13d
	cmpl	$8, %r13d
	jl	LBB0_7
LBB0_8:
	testl	%r12d, %r12d
	jle	LBB0_13
## %bb.9:
	leal	(,%r12,8), %r8d
	movl	%r12d, %r9d
	xorl	%r11d, %r11d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	leal	(,%r11,8), %eax
	subl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, %ecx
	leal	(%rcx,%rbx), %eax
	testl	%ecx, %ecx
	js	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%ecx, %edi
	shrq	$3, %rdi
	leal	8(%rcx), %r10d
	movl	%ebx, %esi
	subl	%ecx, %esi
	andb	$7, %cl
	movb	$8, %r13b
	subb	%cl, %r13b
	andb	$7, %sil
	leal	1(%rdi), %eax
	xorl	%edx, %edx
	idivl	%r12d
                                        ## kill: def $edx killed $edx def $rdx
	movzbl	(%r14,%rdi), %eax
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %eax
	cmpl	%r8d, %r10d
	movzbl	%sil, %esi
	movzbl	%r13b, %ecx
	cmovgl	%esi, %ecx
	movzbl	(%r14,%rdx), %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %edx
	orl	%eax, %edx
	movb	%dl, (%r15,%r11)
	incq	%r11
	cmpq	%r9, %r11
	jne	LBB0_10
LBB0_13:
	movq	%r14, %rdi
	callq	_free
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_rr13
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rr13
_rr13:                                  ; @rr13
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x1, LBB0_11
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	add	x23, x1, #7
	lsr	x21, x23, #3
	mov	x0, x21
	bl	_malloc
	cbz	x0, LBB0_12
; %bb.2:
	mov	x22, x0
	and	w24, w19, #0x7
	mov	x1, x20
	mov	x2, x21
	bl	_memcpy
	cbz	w24, LBB0_5
; %bb.3:
	mov	w8, #8
	sub	w8, w8, w24
	mov	w9, #255
	lsl	w9, w9, w8
	sub	w8, w21, #1
	sxtw	x8, w8
	ldrb	w10, [x22, x8]
	and	w9, w10, w9
	strb	w9, [x22, x8]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x20]
	lsr	w10, w10, w24
	orr	w9, w9, w10
	strb	w9, [x22, x8]
	add	w24, w24, w19
	cmp	w24, #8
	b.lt	LBB0_4
LBB0_5:
	cmp	w21, #1
	b.lt	LBB0_10
; %bb.6:
	mov	x8, #0
	mov	w9, #13
	udiv	x10, x9, x19
	msub	w9, w10, w19, w9
	lsl	w10, w21, #3
	ubfx	x11, x23, #3, #32
	mov	w12, #8
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	lsl	w13, w8, #3
	sub	w14, w13, w9
LBB0_8:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x13, x14
	add	w14, w14, w19
	tbnz	w13, #31, LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w14, w13
	lsr	x14, x14, #3
	and	w15, w13, #0x7
	add	w16, w13, #8
	sub	w13, w19, w13
	and	w13, w13, #0x7
	sub	w17, w12, w15
	cmp	w16, w10
	csel	w13, w13, w17, gt
	add	w16, w14, #1
	sdiv	w17, w16, w21
	msub	w16, w17, w21, w16
	ldrb	w14, [x22, x14]
	lsl	w14, w14, w15
	ldrb	w15, [x22, w16, uxtw]
	lsr	w13, w15, w13
	orr	w13, w13, w14
	strb	w13, [x20, x8]
	add	x8, x8, #1
	cmp	x8, x11
	b.ne	LBB0_7
LBB0_10:
	mov	x0, x22
	bl	_free
LBB0_11:
	mov	w0, #0
	b	LBB0_13
LBB0_12:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_13:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_rr13
.subsections_via_symbols
