	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prepkey
_prepkey:                               ## @prepkey
	.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, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	4(,%rax,4), %edi
	callq	_malloc
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movl	$2, %edi
	xorl	%esi, %esi
	callq	_err
LBB0_2:
	movq	_MB_LEN_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	callq	_mbrtowc
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	movq	%rax, %rbx
	movq	_dflag@GOTPCREL(%rip), %r15
	leaq	-44(%rbp), %r13
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %eax
	movl	%eax, (%r14)
	addq	$4, %r14
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	%rbx, %r12
	movq	_MB_LEN_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	callq	_mbrtowc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_12
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$-2, %rbx
	jb	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edi
	xorl	%edx, %edx
	callq	_errc
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_fflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %edi
	callq	_towlower
	movl	%eax, -44(%rbp)
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, (%r15)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %edi
	callq	_iswalnum
	testq	%rax, %rax
	jne	LBB0_10
	jmp	LBB0_11
LBB0_12:
	movl	$0, (%r14)
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	testl	%esi, %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_15
## %bb.13:
	movq	%rbx, %rdi
	callq	_wcschr
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movl	$0, 4(%rax)
LBB0_15:
	movq	%rbx, %rax
	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	_fflag,8,3                      ## @fflag
	.comm	_dflag,4,2                      ## @dflag
	.no_dead_strip	_prepkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prepkey
_prepkey:                               ; @prepkey
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x21, x0
	bl	_strlen
	lsl	w8, w0, #2
	add	w0, w8, #4
	bl	_malloc
	mov	x20, x0
	cbnz	x0, LBB0_2
; %bb.1:
	mov	w0, #2
	mov	x1, #0
	bl	_err
LBB0_2:
Lloh0:
	adrp	x23, _MB_LEN_MAX@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MB_LEN_MAX@GOTPAGEOFF]
	ldr	w2, [x23]
	add	x0, sp, #12
	mov	x1, x21
	mov	x3, #0
	bl	_mbrtowc
	mov	x25, x20
	cbz	x0, LBB0_12
; %bb.3:
	mov	x22, x0
Lloh2:
	adrp	x24, _EILSEQ@GOTPAGE
Lloh3:
	ldr	x24, [x24, _EILSEQ@GOTPAGEOFF]
Lloh4:
	adrp	x26, _fflag@GOTPAGE
Lloh5:
	ldr	x26, [x26, _fflag@GOTPAGEOFF]
	mov	x25, x20
Lloh6:
	adrp	x27, _dflag@GOTPAGE
Lloh7:
	ldr	x27, [x27, _dflag@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [sp, #12]
	str	w8, [x25], #4
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, x22
	ldr	w2, [x23]
	add	x0, sp, #12
	mov	x1, x21
	mov	x3, #0
	bl	_mbrtowc
	mov	x22, x0
	cbz	x0, LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cmn	x22, #2
	b.lo	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x24]
	mov	w0, #2
	mov	x2, #0
	bl	_errc
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26]
	cbz	x8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [sp, #12]
	bl	_towlower
	str	w0, [sp, #12]
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x27]
	cbz	w8, LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [sp, #12]
	bl	_iswalnum
	cbnz	x0, LBB0_4
	b	LBB0_5
LBB0_12:
	str	wzr, [x25]
	cbz	w19, LBB0_15
; %bb.13:
	mov	x0, x20
	mov	x1, x19
	bl	_wcschr
	cbz	x0, LBB0_15
; %bb.14:
	str	wzr, [x0, #4]
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_LEN_MAX,4,2                 ; @MB_LEN_MAX
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.comm	_fflag,8,3                      ; @fflag
	.comm	_dflag,4,2                      ; @dflag
	.no_dead_strip	_prepkey
.subsections_via_symbols
