	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_convert
_do_convert:                            ## @do_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_NEWJISSTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdx, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_OLDJISSTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_2
## %bb.19:
	movq	_SJISSTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_20
## %bb.35:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_error                          ## TAILCALL
LBB0_2:
	movb	(%r13), %dl
	xorl	%ebx, %ebx
	movq	_BUFSIZ@GOTPCREL(%rip), %r11
	movl	(%r11), %ecx
	testb	%dl, %dl
	je	LBB0_31
## %bb.3:
	testl	%ecx, %ecx
	movq	_FALSE@GOTPCREL(%rip), %r15
	jle	LBB0_31
## %bb.4:
	xorl	%ebx, %ebx
	movq	_ESC@GOTPCREL(%rip), %r10
	movq	_TRUE@GOTPCREL(%rip), %r9
	movq	_SS2@GOTPCREL(%rip), %r8
	movq	%r13, %rax
	movl	%r12d, %esi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	(%r10), %dl
	jne	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movslq	%edi, %rax
	movzbl	1(%r13,%rax), %ecx
	cmpb	$40, %cl
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$36, %cl
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r9), %esi
	movl	(%r15), %r12d
	addl	$2, %edi
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	testl	%esi, %esi
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	addb	$-128, %dl
	movslq	%ebx, %rax
	incl	%ebx
	movb	%dl, (%r14,%rax)
	jmp	LBB0_17
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	testl	%r12d, %r12d
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movzbl	(%r8), %ecx
	movslq	%ebx, %rdx
	movb	%cl, (%r14,%rdx)
	movzbl	(%rax), %eax
	addb	$-128, %al
	addl	$2, %ebx
	movb	%al, 1(%r14,%rdx)
	xorl	%esi, %esi
	jmp	LBB0_17
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %esi
	leaq	2(%rax), %rdi
	cmpb	$73, 2(%r13,%rax)
	movl	%esi, %r12d
	jne	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r9), %r12d
	jmp	LBB0_17
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rax
	movl	%eax, %edi
	jmp	LBB0_17
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	movslq	%ebx, %rax
	incl	%ebx
	movb	%dl, (%r14,%rax)
	xorl	%esi, %esi
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	movslq	%edi, %rdi
	movzbl	1(%r13,%rdi), %edx
	movl	(%r11), %ecx
	testb	%dl, %dl
	je	LBB0_31
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=1
	leaq	(%rdi,%r13), %rax
	incq	%rax
	incq	%rdi
	cmpl	%ecx, %ebx
	jl	LBB0_5
	jmp	LBB0_31
LBB0_20:
	movb	(%r13), %al
	xorl	%ebx, %ebx
	movq	_BUFSIZ@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ecx
	testb	%al, %al
	je	LBB0_31
## %bb.21:
	testl	%ecx, %ecx
	jle	LBB0_31
## %bb.22:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movzbl	%al, %ecx
	movl	%ecx, -48(%rbp)
	movl	$1, %edx
	cmpb	$127, %cl
	jae	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=1
	movl	%ebx, %ecx
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_23 Depth=1
	leal	95(%rax), %ecx
	movl	%ebx, %r15d
	cmpb	$62, %cl
	ja	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_23 Depth=1
	movq	_SS2@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %edx
	leal	1(%rbx), %ecx
	movb	%dl, (%r14,%r15)
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_23 Depth=1
	movslq	%r12d, %r12
	movzbl	1(%r13,%r12), %eax
	incq	%r12
	movl	%eax, -44(%rbp)
	leaq	-48(%rbp), %rdi
	movq	%rsi, %r14
	leaq	-44(%rbp), %rsi
	callq	_SJIStoJIS
	movq	%r14, %rsi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movzbl	-48(%rbp), %eax
	addb	$-128, %al
	leal	1(%rbx), %ecx
	movb	%al, (%r14,%r15)
	movzbl	-44(%rbp), %eax
	addb	$-128, %al
LBB0_28:                                ##   in Loop: Header=BB0_23 Depth=1
	movl	$2, %edx
LBB0_29:                                ##   in Loop: Header=BB0_23 Depth=1
	addl	%edx, %ebx
	movslq	%ecx, %rcx
	movb	%al, (%r14,%rcx)
	movslq	%r12d, %r12
	movzbl	1(%r13,%r12), %eax
	movl	(%rsi), %ecx
	testb	%al, %al
	je	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_23 Depth=1
	incq	%r12
	cmpl	%ecx, %ebx
	jl	LBB0_23
LBB0_31:
	cmpl	%ecx, %ebx
	jge	LBB0_32
## %bb.33:
	movslq	%ebx, %rax
	movb	$0, (%r14,%rax)
	jmp	LBB0_34
LBB0_32:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_error
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_ustrcpy
LBB0_34:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_NEWJISSTR,4,2                  ## @NEWJISSTR
	.comm	_OLDJISSTR,4,2                  ## @OLDJISSTR
	.comm	_BUFSIZ,4,2                     ## @BUFSIZ
	.comm	_ESC,1,0                        ## @ESC
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_SS2,1,0                        ## @SS2
	.comm	_SJISSTR,4,2                    ## @SJISSTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid code specification: \"%s\""

L_.str.1:                               ## @.str.1
	.asciz	"output buffer overflow at do_convert()"

	.comm	_E2BIG,8,3                      ## @E2BIG
	.comm	_EILSEQ,8,3                     ## @EILSEQ
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_EUCSTR,4,2                     ## @EUCSTR
	.comm	_errno,8,3                      ## @errno
	.no_dead_strip	_do_convert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_convert
_do_convert:                            ; @do_convert
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _FALSE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _FALSE@GOTPAGEOFF]
	ldr	w23, [x22]
Lloh2:
	adrp	x8, _NEWJISSTR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NEWJISSTR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x2
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.1:
Lloh5:
	adrp	x8, _OLDJISSTR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OLDJISSTR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.2:
Lloh8:
	adrp	x8, _SJISSTR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SJISSTR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_strcmp
	cbz	x0, LBB0_23
; %bb.3:
	str	x21, [sp]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
	b	LBB0_8
LBB0_4:
	ldrb	w15, [x20]
Lloh13:
	adrp	x8, _BUFSIZ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BUFSIZ@GOTPAGEOFF]
	ldr	w14, [x8]
	cmp	w15, #0
	mov	w21, #0
	ccmp	w14, #1, #8, ne
	b.ge	LBB0_9
LBB0_5:
	cmp	w21, w14
	b.ge	LBB0_7
; %bb.6:
	strb	wzr, [x19, w21, sxtw]
	b	LBB0_8
LBB0_7:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_error
	mov	x0, x19
	mov	x1, x20
	bl	_ustrcpy
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	mov	w13, #0
Lloh17:
	adrp	x9, _ESC@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ESC@GOTPAGEOFF]
Lloh19:
	adrp	x10, _TRUE@GOTPAGE
Lloh20:
	ldr	x10, [x10, _TRUE@GOTPAGEOFF]
Lloh21:
	adrp	x11, _SS2@GOTPAGE
Lloh22:
	ldr	x11, [x11, _SS2@GOTPAGEOFF]
	mov	x16, x20
	mov	x12, x23
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w12, [x22]
	add	x13, x15, #2
	ldrb	w14, [x20, x13]
	ldr	w15, [x10]
	cmp	w14, #73
	csel	w23, w15, w12, eq
                                        ; kill: def $w13 killed $w13 killed $x13 def $x13
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	sxtw	x13, w13
	add	x13, x13, #1
	add	x16, x20, x13
	ldrb	w15, [x16]
	ldr	w14, [x8]
	cmp	w15, #0
	ccmp	w21, w14, #0, ne
                                        ; kill: def $w13 killed $w13 killed $x13 def $x13
	b.ge	LBB0_5
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w14, [x9]
	cmp	w15, w14
	b.ne	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x14, x13
	sxtw	x15, w14
	add	x14, x15, #1
	ldrb	w16, [x20, x14]
	cmp	w16, #40
	b.eq	LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	w16, #36
	b.ne	LBB0_21
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w12, [x10]
	ldr	w23, [x22]
	add	w13, w13, #2
	b	LBB0_11
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	cbz	w12, LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	eor	w14, w15, #0x80
	strb	w14, [x19, w21, sxtw]
LBB0_18:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w21, w21, #1
	b	LBB0_11
LBB0_19:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w12, #0
	cbz	w23, LBB0_22
; %bb.20:                               ;   in Loop: Header=BB0_12 Depth=1
	ldrb	w14, [x11]
	add	x15, x19, w21, sxtw
	strb	w14, [x15]
	ldrb	w14, [x16]
	eor	w14, w14, #0x80
	add	w21, w21, #2
	strb	w14, [x15, #1]
	b	LBB0_11
LBB0_21:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x13, x14
	b	LBB0_11
LBB0_22:                                ;   in Loop: Header=BB0_12 Depth=1
	strb	w15, [x19, w21, sxtw]
	b	LBB0_18
LBB0_23:
	mov	w21, #0
	ldrb	w8, [x20]
Lloh23:
	adrp	x22, _BUFSIZ@GOTPAGE
Lloh24:
	ldr	x22, [x22, _BUFSIZ@GOTPAGEOFF]
	ldr	w14, [x22]
	cbz	w8, LBB0_5
; %bb.24:
	cmp	w14, #1
	b.lt	LBB0_5
; %bb.25:
	mov	w21, #0
	mov	w9, #0
Lloh25:
	adrp	x23, _SS2@GOTPAGE
Lloh26:
	ldr	x23, [x23, _SS2@GOTPAGEOFF]
	b	LBB0_28
LBB0_26:                                ;   in Loop: Header=BB0_28 Depth=1
	mov	w11, #1
	mov	x10, x21
LBB0_27:                                ;   in Loop: Header=BB0_28 Depth=1
	add	w21, w21, w11
	strb	w8, [x19, w10, sxtw]
	sxtw	x8, w9
	add	x9, x8, #1
	ldrb	w8, [x20, x9]
	ldr	w14, [x22]
	cmp	w8, #0
	ccmp	w21, w14, #0, ne
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	b.ge	LBB0_5
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	and	w10, w8, #0xff
	str	w10, [sp, #12]
	cmp	w10, #127
	b.lo	LBB0_26
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	add	w10, w8, #95
	and	w10, w10, #0xff
	cmp	w10, #62
	b.hi	LBB0_31
; %bb.30:                               ;   in Loop: Header=BB0_28 Depth=1
	ldrb	w11, [x23]
	add	w10, w21, #1
	strb	w11, [x19, w21, uxtw]
	mov	w11, #2
	b	LBB0_27
LBB0_31:                                ;   in Loop: Header=BB0_28 Depth=1
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	sxtw	x8, w9
	add	x24, x8, #1
	ldrb	w8, [x20, x24]
	str	w8, [sp, #8]
	add	x0, sp, #12
	add	x1, sp, #8
	bl	_SJIStoJIS
	ldrb	w8, [sp, #12]
	eor	w8, w8, #0x80
	add	w10, w21, #1
	strb	w8, [x19, w21, uxtw]
	ldrb	w8, [sp, #8]
	eor	w8, w8, #0xffffff80
	mov	w11, #2
	mov	x9, x24
	b	LBB0_27
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_NEWJISSTR,4,2                  ; @NEWJISSTR
	.comm	_OLDJISSTR,4,2                  ; @OLDJISSTR
	.comm	_BUFSIZ,4,2                     ; @BUFSIZ
	.comm	_ESC,1,0                        ; @ESC
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_SS2,1,0                        ; @SS2
	.comm	_SJISSTR,4,2                    ; @SJISSTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid code specification: \"%s\""

l_.str.1:                               ; @.str.1
	.asciz	"output buffer overflow at do_convert()"

	.comm	_E2BIG,8,3                      ; @E2BIG
	.comm	_EILSEQ,8,3                     ; @EILSEQ
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_EUCSTR,4,2                     ; @EUCSTR
	.comm	_errno,8,3                      ; @errno
	.no_dead_strip	_do_convert
.subsections_via_symbols
