	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, -80(%rbp)
	xorl	%r13d, %r13d
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.1:
	testl	%esi, %esi
	je	LBB0_19
## %bb.2:
	movq	%rcx, %r14
	testq	%rcx, %rcx
	je	LBB0_19
## %bb.3:
	movq	%r8, %r12
	testq	%r8, %r8
	je	LBB0_19
## %bb.4:
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movslq	%esi, %r15
	movq	%r15, -72(%rbp)
	movq	%r15, -56(%rbp)
	movq	%r12, %rdi
	callq	_strlen
	movq	_ICONV_CSNMAXLEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	cmpq	%rbx, %rax
	jge	LBB0_18
## %bb.5:
	movq	%r14, %rdi
	callq	_strlen
	cmpq	%rbx, %rax
	jge	LBB0_18
## %bb.6:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_iconv_open
	cmpq	$-1, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r14
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	1(%rax), %edi
	callq	_emalloc
	movq	%rax, %r13
	movq	%rax, -64(%rbp)
	leaq	-80(%rbp), %rbx
	leaq	-56(%rbp), %r15
	leaq	-64(%rbp), %r12
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$0, -56(%rbp)
	je	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	leaq	-72(%rbp), %r8
	callq	_iconv
	cmpq	$-1, %rax
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_E2BIG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rax
	addq	%rax, -72(%rbp)
	movq	%r12, %r15
	movl	-64(%rbp), %r12d
	subl	%r13d, %r12d
	movq	%r14, %rbx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, %r14d
	addl	%eax, %r14d
	leal	(%rcx,%rax), %esi
	incl	%esi
	movq	%r13, %rdi
	callq	_erealloc
	movq	%rax, %r13
	movslq	%r12d, %rax
	movq	%r15, %r12
	addq	%r13, %rax
	movq	%rax, -64(%rbp)
	movl	%r14d, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r14
	leaq	-56(%rbp), %r15
	leaq	-80(%rbp), %rbx
	jmp	LBB0_12
LBB0_18:
	xorl	%r13d, %r13d
LBB0_19:
	movq	%r13, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%r13d, %r13d
	jmp	LBB0_14
LBB0_20:
	movq	%r13, %rdi
	callq	_efree
	xorl	%r13d, %r13d
LBB0_13:
	movq	%r14, %rdi
	callq	_iconv_close
	movq	-72(%rbp), %r15
LBB0_14:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	subl	%r15d, %edx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.15:
	xorl	%eax, %eax
	testq	%r13, %r13
	cmovnel	%edx, %eax
	movl	%eax, (%rcx)
LBB0_16:
	testq	%r13, %r13
	je	LBB0_19
## %bb.17:
	movslq	%edx, %rax
	movb	$0, (%r13,%rax)
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_ICONV_CSNMAXLEN,8,3            ## @ICONV_CSNMAXLEN
	.comm	_errno,8,3                      ## @errno
	.comm	_E2BIG,8,3                      ## @E2BIG
	.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:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, #0
	str	x0, [sp, #24]
	cbz	x0, LBB0_13
; %bb.1:
	mov	x20, x1
	cbz	w1, LBB0_13
; %bb.2:
	mov	x22, x3
	cbz	x3, LBB0_13
; %bb.3:
	mov	x23, x4
	cbz	x4, LBB0_13
; %bb.4:
	mov	x19, x2
	sxtw	x24, w20
	stp	x24, x24, [sp, #8]
	mov	x0, x23
	bl	_strlen
Lloh0:
	adrp	x8, _ICONV_CSNMAXLEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ICONV_CSNMAXLEN@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	cmp	x0, x21
	b.ge	LBB0_12
; %bb.5:
	mov	x0, x22
	bl	_strlen
	cmp	x0, x21
	b.ge	LBB0_12
; %bb.6:
	mov	x0, x23
	mov	x1, x22
	bl	_iconv_open
	cmn	x0, #1
	b.eq	LBB0_14
; %bb.7:
	mov	x22, x0
	add	w0, w20, #1
	bl	_emalloc
	mov	x21, x0
	str	x0, [sp]
Lloh3:
	adrp	x23, _errno@GOTPAGE
Lloh4:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
Lloh5:
	adrp	x24, _E2BIG@GOTPAGE
Lloh6:
	ldr	x24, [x24, _E2BIG@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_16
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #24
	add	x2, sp, #8
	mov	x3, sp
	add	x4, sp, #16
	mov	x0, x22
	bl	_iconv
	cmn	x0, #1
	b.ne	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x23]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [sp]
	sub	w25, w8, w21
	ldp	x8, x9, [sp, #8]
	add	w20, w20, w8
	add	x8, x9, x8
	str	x8, [sp, #16]
	add	w1, w20, #1
	mov	x0, x21
	bl	_erealloc
	mov	x21, x0
	add	x8, x0, w25, sxtw
	str	x8, [sp]
	b	LBB0_8
LBB0_12:
	mov	x21, #0
LBB0_13:
	mov	x0, x21
	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
	add	sp, sp, #112
	ret
LBB0_14:
	mov	x21, #0
	b	LBB0_17
LBB0_15:
	mov	x0, x21
	bl	_efree
	mov	x21, #0
LBB0_16:
	mov	x0, x22
	bl	_iconv_close
	ldr	x24, [sp, #16]
LBB0_17:
	sub	w8, w20, w24
	cbz	x19, LBB0_19
; %bb.18:
	cmp	x21, #0
	csel	w9, wzr, w8, eq
	str	w9, [x19]
LBB0_19:
	cbz	x21, LBB0_13
; %bb.20:
	strb	wzr, [x21, w8, sxtw]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ICONV_CSNMAXLEN,8,3            ; @ICONV_CSNMAXLEN
	.comm	_errno,8,3                      ; @errno
	.comm	_E2BIG,8,3                      ; @E2BIG
	.no_dead_strip	_convert
.subsections_via_symbols
