	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function genrange
_genrange:                              ## @genrange
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	$0, -52(%rbp)
	movq	(%rdi), %r13
	leaq	1(%r13), %rsi
	movq	%rsi, (%rdi)
	cmpb	$92, 1(%r13)
	jne	LBB0_2
## %bb.1:
	leaq	-52(%rbp), %rsi
	movq	%r14, %rdi
	callq	_backslash
	movl	%eax, -48(%rbp)
	movl	-52(%rbp), %r15d
	jmp	LBB0_5
LBB0_2:
	movl	%ebx, %r12d
	movq	_MB_LEN_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	leaq	-56(%rbp), %rdi
	xorl	%ecx, %ecx
	callq	_mbrtowc
	movq	%rax, %rbx
	cmpq	$-2, %rax
	jb	LBB0_4
## %bb.3:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	xorl	%edx, %edx
	callq	_errc
LBB0_4:
	movl	-56(%rbp), %eax
	movl	%eax, -48(%rbp)
	addq	%rbx, (%r14)
	movl	%r12d, %ebx
LBB0_5:
	leaq	8(%r14), %r12
	orl	%ebx, %r15d
	jne	LBB0_7
## %bb.6:
	movq	_MB_CUR_MAX@GOTPCREL(%rip), %rcx
	cmpl	$2, (%rcx)
	jge	LBB0_7
## %bb.10:
	leaq	-48(%rbp), %rdi
	movq	%r12, %rsi
	callq	_charcoll
	testq	%rax, %rax
	js	LBB0_8
## %bb.11:
	movq	_NCHARS_SB@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	leal	4(,%rax,4), %edi
	callq	_malloc
	movq	%rax, %r15
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_13:
	movl	$0, -44(%rbp)
	cmpl	$0, (%r13)
	jle	LBB0_19
## %bb.14:
	leaq	-44(%rbp), %rbx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	-44(%rbp), %eax
	incl	%eax
	movl	%eax, -44(%rbp)
	cmpl	(%r13), %eax
	jge	LBB0_19
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_charcoll
	testq	%rax, %rax
	js	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	%rbx, %rdi
	leaq	-48(%rbp), %rsi
	callq	_charcoll
	testq	%rax, %rax
	jg	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	-44(%rbp), %eax
	movl	%eax, (%r15)
	addq	$4, %r15
	jmp	LBB0_18
LBB0_7:
	movl	(%r12), %ecx
	subl	%ecx, %eax
	jge	LBB0_9
LBB0_8:
	movq	%r13, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_19:
	movq	_OOBCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	16(%r14), %rdi
	subq	%rdi, %r15
	shrq	$2, %r15
	movl	$0, 12(%r14)
	movq	_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movl	$1, %ebx
	cmpl	$2, %r15d
	jl	LBB0_21
## %bb.20:
	movq	_charcoll@GOTPCREL(%rip), %rcx
	movl	%r15d, %esi
	movl	$4, %edx
	callq	_mergesort
	jmp	LBB0_21
LBB0_9:
	incl	%eax
	movl	%eax, 12(%r14)
	movq	_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	decl	%ecx
	movl	%ecx, 8(%r14)
	movl	$1, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_LEN_MAX,4,2                 ## @MB_LEN_MAX
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.comm	_MB_CUR_MAX,4,2                 ## @MB_CUR_MAX
	.comm	_RANGE,4,2                      ## @RANGE
	.comm	_NCHARS_SB,4,2                  ## @NCHARS_SB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"genrange() malloc"

	.comm	_OOBCH,4,2                      ## @OOBCH
	.comm	_SET,4,2                        ## @SET
	.no_dead_strip	_genrange
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function genrange
_genrange:                              ; @genrange
	.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
	mov	x20, x1
	mov	x19, x0
	str	wzr, [sp, #8]
	ldr	x22, [x0]
	add	x1, x22, #1
	str	x1, [x0]
	ldrb	w8, [x22, #1]
	cmp	w8, #92
	b.ne	LBB0_2
; %bb.1:
	add	x1, sp, #8
	mov	x0, x19
	bl	_backslash
	str	w0, [sp, #12]
	ldr	w8, [sp, #8]
	b	LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _MB_LEN_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MB_LEN_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, sp
	mov	x3, #0
	bl	_mbrtowc
	mov	x21, x0
	cmn	x0, #2
	b.lo	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #1
	mov	x2, #0
	bl	_errc
LBB0_4:
	mov	w8, #0
	ldr	w0, [sp]
	str	w0, [sp, #12]
	ldr	x9, [x19]
	add	x9, x9, x21
	str	x9, [x19]
LBB0_5:
	orr	w8, w8, w20
Lloh6:
	adrp	x9, _MB_CUR_MAX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MB_CUR_MAX@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	x20, x19, #8
	cmp	w8, #0
	ccmp	w9, #2, #0, eq
	b.lt	LBB0_8
; %bb.6:
	ldr	w8, [x20]
	subs	w9, w0, w8
	b.lt	LBB0_19
; %bb.7:
	add	w9, w9, #1
Lloh9:
	adrp	x10, _RANGE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _RANGE@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	str	w10, [x19, #24]
	sub	w8, w8, #1
	stp	w8, w9, [x19, #8]
	b	LBB0_14
LBB0_8:
	add	x0, sp, #12
	mov	x1, x20
	bl	_charcoll
	tbnz	x0, #63, LBB0_19
; %bb.9:
Lloh12:
	adrp	x22, _NCHARS_SB@GOTPAGE
Lloh13:
	ldr	x22, [x22, _NCHARS_SB@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	w8, w8, #2
	add	w0, w8, #4
	bl	_malloc
	mov	x21, x0
	str	x0, [x19, #16]
	cbnz	x0, LBB0_11
; %bb.10:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_11:
	str	wzr, [sp, #4]
	ldr	w8, [x22]
	cmp	w8, #1
	b.ge	LBB0_16
LBB0_12:
Lloh16:
	adrp	x8, _OOBCH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _OOBCH@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x21]
	ldr	x0, [x19, #16]
	sub	x8, x21, x0
	lsr	x1, x8, #2
	str	wzr, [x19, #12]
Lloh19:
	adrp	x8, _SET@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SET@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	cmp	w1, #1
	b.le	LBB0_14
; %bb.13:
Lloh22:
	adrp	x3, _charcoll@GOTPAGE
Lloh23:
	ldr	x3, [x3, _charcoll@GOTPAGEOFF]
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	w2, #4
	bl	_mergesort
LBB0_14:
	mov	w0, #1
	b	LBB0_20
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w8, [sp, #4]
	add	w8, w8, #1
	str	w8, [sp, #4]
	ldr	w9, [x22]
	cmp	w8, w9
	b.ge	LBB0_12
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #4
	mov	x1, x20
	bl	_charcoll
	tbnz	x0, #63, LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x0, sp, #4
	add	x1, sp, #12
	bl	_charcoll
	cmp	x0, #0
	b.gt	LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w8, [sp, #4]
	str	w8, [x21], #4
	b	LBB0_15
LBB0_19:
	mov	w0, #0
	str	x22, [x19]
LBB0_20:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_LEN_MAX,4,2                 ; @MB_LEN_MAX
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.comm	_MB_CUR_MAX,4,2                 ; @MB_CUR_MAX
	.comm	_RANGE,4,2                      ; @RANGE
	.comm	_NCHARS_SB,4,2                  ; @NCHARS_SB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"genrange() malloc"

	.comm	_OOBCH,4,2                      ; @OOBCH
	.comm	_SET,4,2                        ; @SET
	.no_dead_strip	_genrange
.subsections_via_symbols
