	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function convert
_convert:                               ## @convert
	.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	%rdi, %r14
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_mbstowcs
	cmpq	$-1, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %rbx
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	shrq	$2, %rax
	leaq	1(%rbx), %r12
	cmpq	%rbx, %rax
	ja	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_3:
	leaq	(,%r12,4), %rdi
	callq	_malloc
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_5:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_mbstowcs
	cmpq	%rbx, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_7:
	movq	_iflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.8:
	movl	(%r15), %edi
	testl	%edi, %edi
	je	LBB0_11
## %bb.9:
	movq	%r15, %rbx
	addq	$4, %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	callq	_towlower
	movl	%eax, -4(%rbx)
	movl	(%rbx), %edi
	addq	$4, %rbx
	testl	%edi, %edi
	jne	LBB0_10
LBB0_11:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,4,2                   ## @SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"conversion buffer length overflow"

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

L_.str.2:                               ## @.str.2
	.asciz	"internal mbstowcs() error"

	.comm	_iflag,8,3                      ## @iflag
	.no_dead_strip	_convert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert
_convert:                               ; @convert
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
	mov	x0, #0
	mov	x1, x20
	mov	x2, #0
	bl	_mbstowcs
	cmn	x0, #1
	b.eq	LBB0_11
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	add	x22, x0, #1
	cmp	x0, x8, lsr #2
	b.lo	LBB0_3
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_3:
	lsl	x0, x22, #2
	bl	_malloc
	mov	x19, x0
	cbnz	x0, LBB0_5
; %bb.4:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_mbstowcs
	cmp	x0, x21
	b.eq	LBB0_7
; %bb.6:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_7:
Lloh9:
	adrp	x8, _iflag@GOTPAGE
Lloh10:
	ldr	x8, [x8, _iflag@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.8:
	ldr	w0, [x19]
	cbz	w0, LBB0_12
; %bb.9:
	add	x20, x19, #4
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	bl	_towlower
	stur	w0, [x20, #-4]
	ldr	w0, [x20], #4
	cbnz	w0, LBB0_10
	b	LBB0_12
LBB0_11:
	mov	x19, #0
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,4,2                   ; @SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"conversion buffer length overflow"

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

l_.str.2:                               ; @.str.2
	.asciz	"internal mbstowcs() error"

	.comm	_iflag,8,3                      ; @iflag
	.no_dead_strip	_convert
.subsections_via_symbols
