	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepare_str_cp1251             ## -- Begin function prepare_str_cp1251
	.p2align	4, 0x90
_prepare_str_cp1251:                    ## @prepare_str_cp1251
	.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
	movq	$-1, %rax
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$32, 1(%rdi,%rax)
	leaq	1(%rax), %rax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ecx
	leaq	(%rdi,%rcx), %rdx
	cmpb	$0, (%rdi,%rcx)
	je	LBB0_3
## %bb.6:
	movabsq	$4294967296, %rcx               ## imm = 0x100000000
	xorl	%ebx, %ebx
	movq	_words_buf@GOTPCREL(%rip), %r8
	movabsq	$-4294967296, %r9               ## imm = 0xFFFFFFFF00000000
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_12 Depth 2
	movq	(%r8), %rsi
	movq	%rdx, (%rsi,%rbx,8)
	incq	%rbx
	movq	%rax, %rdx
	shlq	$32, %rdx
	movslq	%eax, %rsi
	addq	%rdi, %rsi
	testb	$-33, (%rsi)
	je	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addq	%rcx, %rdx
	incq	%rsi
	incl	%eax
	testb	$-33, (%rsi)
	jne	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	cltq
	movq	%rax, %rsi
	shlq	$32, %rsi
	addq	%r9, %rsi
	decq	%rax
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addq	%rcx, %rsi
	cmpb	$32, 1(%rdi,%rax)
	leaq	1(%rax), %rax
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	sarq	$32, %rsi
	leaq	(%rdi,%rsi), %rdx
	cmpb	$0, (%rdi,%rsi)
	jne	LBB0_8
	jmp	LBB0_4
LBB0_3:
	xorl	%ebx, %ebx
LBB0_4:
	movb	$32, (%rdx)
	movq	_words_buf@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movq	_strcmp_void@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %esi
	movl	$8, %edx
	callq	_qsort
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.13:
	cmpl	$1, %ebx
	jne	LBB0_14
## %bb.35:
	movq	_prep_buf_res@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$1, %r12d
	jmp	LBB0_19
LBB0_5:
	movq	_prep_buf_res@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_34
LBB0_14:
	movl	%ebx, %r15d
	movl	$1, %r12d
	movl	$1, %ebx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	incq	%rbx
	cmpq	%rbx, %r15
	je	LBB0_18
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movq	-8(%rax,%rbx,8), %rdi
	movq	(%rax,%rbx,8), %rsi
	callq	_iseq
	testl	%eax, %eax
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rcx
	movslq	%r12d, %rdx
	incl	%r12d
	movq	%rcx, (%rax,%rdx,8)
	jmp	LBB0_17
LBB0_18:
	movq	_prep_buf_res@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testl	%r12d, %r12d
	jle	LBB0_34
LBB0_19:
	movl	%r12d, %ecx
	cmpl	$1, %r12d
	jne	LBB0_21
## %bb.20:
	xorl	%edx, %edx
LBB0_29:
	testb	$1, %cl
	je	LBB0_34
## %bb.30:
	movq	(%r14), %rcx
	movq	(%rcx,%rdx,8), %rcx
	movb	(%rcx), %dl
	cmpb	$32, %dl
	je	LBB0_33
## %bb.31:
	incq	%rcx
	.p2align	4, 0x90
LBB0_32:                                ## =>This Inner Loop Header: Depth=1
	movb	%dl, (%rax)
	incq	%rax
	movzbl	(%rcx), %edx
	incq	%rcx
	cmpb	$32, %dl
	jne	LBB0_32
LBB0_33:
	movb	$43, (%rax)
	incq	%rax
LBB0_34:
	movb	$0, (%rax)
	movq	_prep_buf_res@GOTPCREL(%rip), %rbx
	subq	(%rbx), %rax
	incq	%rax
	movq	_MAX_NAME_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	setl	%dil
	callq	_assert
	movq	(%rbx), %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movl	%ecx, %esi
	andl	$-2, %esi
	xorl	%edx, %edx
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_22 Depth=1
	movb	$43, (%rax)
	incq	%rax
	addq	$2, %rdx
	cmpq	%rsi, %rdx
	je	LBB0_29
LBB0_22:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_24 Depth 2
                                        ##     Child Loop BB0_27 Depth 2
	movq	(%r14), %rdi
	movq	(%rdi,%rdx,8), %rdi
	movb	(%rdi), %bl
	cmpb	$32, %bl
	je	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	incq	%rdi
	.p2align	4, 0x90
LBB0_24:                                ##   Parent Loop BB0_22 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movb	%bl, (%rax)
	incq	%rax
	movzbl	(%rdi), %ebx
	incq	%rdi
	cmpb	$32, %bl
	jne	LBB0_24
LBB0_25:                                ##   in Loop: Header=BB0_22 Depth=1
	movb	$43, (%rax)
	incq	%rax
	leaq	(,%rdx,8), %rdi
	movq	(%r14), %rbx
	orq	$8, %rdi
	movq	(%rbx,%rdi), %rdi
	movb	(%rdi), %bl
	cmpb	$32, %bl
	je	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_22 Depth=1
	incq	%rdi
	.p2align	4, 0x90
LBB0_27:                                ##   Parent Loop BB0_22 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movb	%bl, (%rax)
	incq	%rax
	movzbl	(%rdi), %ebx
	incq	%rdi
	cmpb	$32, %bl
	jne	LBB0_27
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_words_buf,8,3                  ## @words_buf
	.comm	_strcmp_void,4,2                ## @strcmp_void
	.comm	_prep_buf_res,8,3               ## @prep_buf_res
	.comm	_MAX_NAME_SIZE,4,2              ## @MAX_NAME_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepare_str_cp1251             ; -- Begin function prepare_str_cp1251
	.p2align	2
_prepare_str_cp1251:                    ; @prepare_str_cp1251
	.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
	mov	x8, #0
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x0, x8]
	add	x8, x8, #1
	cmp	w9, #32
	b.eq	LBB0_1
; %bb.2:
	sub	x10, x8, #1
	add	x11, x0, w10, uxtw
	ldrb	w8, [x11]
Lloh0:
	adrp	x20, _words_buf@GOTPAGE
Lloh1:
	ldr	x20, [x20, _words_buf@GOTPAGEOFF]
	cbz	w8, LBB0_10
; %bb.3:
	mov	x19, #0
	mov	x8, #-4294967296
	mov	x9, #4294967296
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x12, [x20]
	str	x11, [x12, x19, lsl #3]
	add	x19, x19, #1
	lsl	x11, x10, #32
	add	x12, x0, w10, sxtw
LBB0_5:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w13, [x12]
	orr	w13, w13, #0x20
	cmp	w13, #32
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x11, x11, x9
	add	x12, x12, #1
	add	w10, w10, #1
	b	LBB0_5
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	asr	x12, x11, #32
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
	add	x10, x8, x10, lsl #32
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w11, [x0, x12]
	add	x12, x12, #1
	add	x10, x10, x9
	cmp	w11, #32
	b.eq	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x11, x0, x10, asr #32
	ldrb	w13, [x11]
	sub	x10, x12, #1
	cbnz	w13, LBB0_4
	b	LBB0_11
LBB0_10:
	mov	w19, #0
LBB0_11:
	mov	w8, #32
	strb	w8, [x11]
	ldr	x0, [x20]
Lloh2:
	adrp	x8, _strcmp_void@GOTPAGE
Lloh3:
	ldr	x8, [x8, _strcmp_void@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x1, x19
	mov	w2, #8
	bl	_qsort
Lloh5:
	adrp	x21, _prep_buf_res@GOTPAGE
Lloh6:
	ldr	x21, [x21, _prep_buf_res@GOTPAGEOFF]
	cbz	w19, LBB0_14
; %bb.12:
	cmp	w19, #1
	b.ne	LBB0_15
; %bb.13:
	ldr	x8, [x21]
	b	LBB0_20
LBB0_14:
	ldr	x8, [x21]
	b	LBB0_25
LBB0_15:
	mov	x22, #0
	mov	w8, w19
	sub	x23, x8, #1
	mov	w19, #1
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x22, x22, #1
	cmp	x23, x22
	b.eq	LBB0_19
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x8, x8, x22, lsl #3
	ldp	x0, x1, [x8]
	bl	_iseq
	cbnz	w0, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [x20]
	add	x9, x8, x22, lsl #3
	ldr	x9, [x9, #8]
	str	x9, [x8, w19, sxtw #3]
	add	w19, w19, #1
	b	LBB0_16
LBB0_19:
	ldr	x8, [x21]
	cmp	w19, #1
	b.lt	LBB0_25
LBB0_20:
	mov	x9, #0
	mov	w10, w19
	mov	w11, #43
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	strb	w11, [x8], #1
	add	x9, x9, #1
	cmp	x9, x10
	b.eq	LBB0_25
LBB0_22:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_24 Depth 2
	ldr	x12, [x20]
	ldr	x13, [x12, x9, lsl #3]
	ldrb	w12, [x13]
	cmp	w12, #32
	b.eq	LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x13, x13, #1
LBB0_24:                                ;   Parent Loop BB0_22 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	strb	w12, [x8], #1
	ldrb	w12, [x13], #1
	cmp	w12, #32
	b.ne	LBB0_24
	b	LBB0_21
LBB0_25:
	strb	wzr, [x8]
	ldr	x9, [x21]
	sub	x8, x8, x9
	add	x8, x8, #1
Lloh7:
	adrp	x9, _MAX_NAME_SIZE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MAX_NAME_SIZE@GOTPAGEOFF]
Lloh9:
	ldrsw	x9, [x9]
	cmp	x8, x9
	cset	w0, lt
	bl	_assert
	ldr	x0, [x21]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_words_buf,8,3                  ; @words_buf
	.comm	_strcmp_void,4,2                ; @strcmp_void
	.comm	_prep_buf_res,8,3               ; @prep_buf_res
	.comm	_MAX_NAME_SIZE,4,2              ; @MAX_NAME_SIZE
.subsections_via_symbols
