	.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, %r15
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_mbstowcs
	cmpq	$-1, %rax
	je	LBB0_18
## %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, %r14
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_5:
	movq	%r14, %rdi
	movq	%r15, %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:
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.8:
	cmpl	$10, -4(%r14,%rbx,4)
	jne	LBB0_10
## %bb.9:
	movl	$0, -4(%r14,%rbx,4)
LBB0_10:
	movq	_numfields@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_numchars@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	je	LBB0_14
## %bb.11:
	movq	%r14, %rdi
	callq	_skip
	movl	%eax, %edi
	callq	_wcsdup
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_13:
	movq	%r14, %rdi
	callq	_free
	movq	%rbx, %r14
LBB0_14:
	movq	_iflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_18
## %bb.15:
	movl	(%r14), %edi
	testl	%edi, %edi
	je	LBB0_18
## %bb.16:
	leaq	4(%r14), %rbx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	callq	_towlower
	movl	%eax, -4(%rbx)
	movl	(%rbx), %edi
	addq	$4, %rbx
	testl	%edi, %edi
	jne	LBB0_17
LBB0_18:
	movq	%r14, %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	_numfields,8,3                  ## @numfields
	.comm	_numchars,8,3                   ## @numchars
L_.str.3:                               ## @.str.3
	.asciz	"wcsdup"

	.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	x21, x0
	mov	x0, #0
	mov	x1, x21
	mov	x2, #0
	bl	_mbstowcs
	cmn	x0, #1
	b.eq	LBB0_18
; %bb.1:
	mov	x20, 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, x21
	mov	x2, x22
	bl	_mbstowcs
	cmp	x0, x20
	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:
	cbz	x20, LBB0_10
; %bb.8:
	sub	x8, x20, #1
	ldr	w9, [x19, x8, lsl #2]
	cmp	w9, #10
	b.ne	LBB0_10
; %bb.9:
	str	wzr, [x19, x8, lsl #2]
LBB0_10:
Lloh9:
	adrp	x8, _numfields@GOTPAGE
Lloh10:
	ldr	x8, [x8, _numfields@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _numchars@GOTPAGE
Lloh13:
	ldr	x9, [x9, _numchars@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	orr	x8, x8, x9
	cbz	x8, LBB0_14
; %bb.11:
	mov	x0, x19
	bl	_skip
	bl	_wcsdup
	mov	x20, x0
	cbnz	x0, LBB0_13
; %bb.12:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_13:
	mov	x0, x19
	bl	_free
	mov	x19, x20
LBB0_14:
Lloh17:
	adrp	x8, _iflag@GOTPAGE
Lloh18:
	ldr	x8, [x8, _iflag@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cbz	x8, LBB0_19
; %bb.15:
	ldr	w0, [x19]
	cbz	w0, LBB0_19
; %bb.16:
	add	x20, x19, #4
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	bl	_towlower
	stur	w0, [x20, #-4]
	ldr	w0, [x20], #4
	cbnz	w0, LBB0_17
	b	LBB0_19
LBB0_18:
	mov	x19, #0
LBB0_19:
	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	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.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	_numfields,8,3                  ; @numfields
	.comm	_numchars,8,3                   ; @numchars
l_.str.3:                               ; @.str.3
	.asciz	"wcsdup"

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