	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbfl_filt_conv_wchar_sjis      ## -- Begin function mbfl_filt_conv_wchar_sjis
	.p2align	4, 0x90
_mbfl_filt_conv_wchar_sjis:             ## @mbfl_filt_conv_wchar_sjis
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	_ucs_a1_jis_table_min@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%edi, %eax
	jg	LBB0_3
## %bb.1:
	movq	_ucs_a1_jis_table_max@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jle	LBB0_3
## %bb.2:
	movq	_ucs_a1_jis_table@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_3:
	movq	_ucs_a2_jis_table_min@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%r15d, %eax
	jg	LBB0_6
## %bb.4:
	movq	_ucs_a2_jis_table_max@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jle	LBB0_6
## %bb.5:
	movq	_ucs_a2_jis_table@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_6:
	movq	_ucs_i_jis_table_min@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%r15d, %eax
	jg	LBB0_9
## %bb.7:
	movq	_ucs_i_jis_table_max@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jle	LBB0_9
## %bb.8:
	movq	_ucs_i_jis_table@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_9:
	movq	_ucs_r_jis_table_min@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	cmpl	%r15d, %eax
	jg	LBB0_13
## %bb.10:
	movq	_ucs_r_jis_table_max@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jle	LBB0_13
## %bb.11:
	movq	_ucs_r_jis_table@GOTPCREL(%rip), %rcx
LBB0_12:
	movq	(%rcx), %rcx
	movl	%r15d, %edx
	subl	%eax, %edx
	movslq	%edx, %rax
	movl	(%rcx,%rax,4), %edi
	testl	%edi, %edi
	jle	LBB0_13
## %bb.36:
	cmpl	$32895, %edi                    ## imm = 0x807F
	jbe	LBB0_37
LBB0_42:
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_mbfl_filt_conv_illegal_output
	jmp	LBB0_43
LBB0_13:
	movq	_MBFL_WCSPLANE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	notl	%ecx
	andl	%r15d, %ecx
	movq	_MBFL_WCSPLANE_JIS0208@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_17
## %bb.14:
	andl	%r15d, %eax
	movl	%eax, %edi
LBB0_15:
	testl	%r15d, %r15d
	je	LBB0_16
## %bb.41:
	testl	%edi, %edi
	jle	LBB0_42
LBB0_37:
	movl	%edi, %ebx
	cmpl	$255, %edi
	jbe	LBB0_38
LBB0_40:
	movzbl	%bh, %edi
	movzbl	%bl, %esi
	movl	%ebx, %edx
	callq	_SJIS_ENCODE
	movl	(%r14), %esi
	movl	%ebx, %edi
	callq	*8(%r14)
	movl	%eax, %edi
	callq	_CK
                                        ## implicit-def: $edi
LBB0_38:
	movl	(%r14), %esi
	callq	*8(%r14)
LBB0_43:
	movl	%eax, %edi
	callq	_CK
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	cmpl	$65339, %r15d                   ## imm = 0xFF3B
	jle	LBB0_18
## %bb.25:
	cmpl	$65503, %r15d                   ## imm = 0xFFDF
	jle	LBB0_26
## %bb.29:
	cmpl	$65504, %r15d                   ## imm = 0xFFE0
	je	LBB0_34
## %bb.30:
	cmpl	$65505, %r15d                   ## imm = 0xFFE1
	je	LBB0_35
## %bb.31:
	cmpl	$65506, %r15d                   ## imm = 0xFFE2
	jne	LBB0_15
## %bb.32:
	movl	$8780, %ebx                     ## imm = 0x224C
	jmp	LBB0_40
LBB0_18:
	cmpl	$8740, %r15d                    ## imm = 0x2224
	jg	LBB0_22
## %bb.19:
	movl	$8559, %ebx                     ## imm = 0x216F
	cmpl	$165, %r15d
	je	LBB0_40
## %bb.20:
	cmpl	$8254, %r15d                    ## imm = 0x203E
	jne	LBB0_15
## %bb.21:
	movl	$8497, %ebx                     ## imm = 0x2131
	jmp	LBB0_40
LBB0_16:
	xorl	%edi, %edi
	jmp	LBB0_38
LBB0_26:
	cmpl	$65340, %r15d                   ## imm = 0xFF3C
	je	LBB0_39
## %bb.27:
	cmpl	$65374, %r15d                   ## imm = 0xFF5E
	jne	LBB0_15
## %bb.28:
	movl	$8513, %ebx                     ## imm = 0x2141
	jmp	LBB0_40
LBB0_22:
	cmpl	$8741, %r15d                    ## imm = 0x2225
	je	LBB0_33
## %bb.23:
	cmpl	$65293, %r15d                   ## imm = 0xFF0D
	jne	LBB0_15
## %bb.24:
	movl	$8541, %ebx                     ## imm = 0x215D
	jmp	LBB0_40
LBB0_34:
	movl	$8561, %ebx                     ## imm = 0x2171
	jmp	LBB0_40
LBB0_35:
	movl	$8562, %ebx                     ## imm = 0x2172
	jmp	LBB0_40
LBB0_39:
	movl	$8512, %ebx                     ## imm = 0x2140
	jmp	LBB0_40
LBB0_33:
	movl	$8514, %ebx                     ## imm = 0x2142
	jmp	LBB0_40
	.cfi_endproc
                                        ## -- End function
	.comm	_ucs_a1_jis_table_min,4,2       ## @ucs_a1_jis_table_min
	.comm	_ucs_a1_jis_table_max,4,2       ## @ucs_a1_jis_table_max
	.comm	_ucs_a1_jis_table,8,3           ## @ucs_a1_jis_table
	.comm	_ucs_a2_jis_table_min,4,2       ## @ucs_a2_jis_table_min
	.comm	_ucs_a2_jis_table_max,4,2       ## @ucs_a2_jis_table_max
	.comm	_ucs_a2_jis_table,8,3           ## @ucs_a2_jis_table
	.comm	_ucs_i_jis_table_min,4,2        ## @ucs_i_jis_table_min
	.comm	_ucs_i_jis_table_max,4,2        ## @ucs_i_jis_table_max
	.comm	_ucs_i_jis_table,8,3            ## @ucs_i_jis_table
	.comm	_ucs_r_jis_table_min,4,2        ## @ucs_r_jis_table_min
	.comm	_ucs_r_jis_table_max,4,2        ## @ucs_r_jis_table_max
	.comm	_ucs_r_jis_table,8,3            ## @ucs_r_jis_table
	.comm	_MBFL_WCSPLANE_MASK,4,2         ## @MBFL_WCSPLANE_MASK
	.comm	_MBFL_WCSPLANE_JIS0208,4,2      ## @MBFL_WCSPLANE_JIS0208
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbfl_filt_conv_wchar_sjis      ; -- Begin function mbfl_filt_conv_wchar_sjis
	.p2align	2
_mbfl_filt_conv_wchar_sjis:             ; @mbfl_filt_conv_wchar_sjis
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ucs_a1_jis_table_min@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ucs_a1_jis_table_min@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _ucs_a1_jis_table_max@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ucs_a1_jis_table_max@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w0
	ccmp	w9, w0, #4, le
	b.gt	LBB0_5
; %bb.1:
Lloh6:
	adrp	x8, _ucs_a2_jis_table_min@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ucs_a2_jis_table_min@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _ucs_a2_jis_table_max@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ucs_a2_jis_table_max@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w19
	ccmp	w9, w19, #4, le
	b.gt	LBB0_6
; %bb.2:
Lloh12:
	adrp	x8, _ucs_i_jis_table_min@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ucs_i_jis_table_min@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _ucs_i_jis_table_max@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ucs_i_jis_table_max@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w19
	ccmp	w9, w19, #4, le
	b.gt	LBB0_7
; %bb.3:
Lloh18:
	adrp	x8, _ucs_r_jis_table_min@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ucs_r_jis_table_min@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _ucs_r_jis_table_max@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ucs_r_jis_table_max@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	cmp	w8, w19
	ccmp	w9, w19, #4, le
	b.gt	LBB0_8
; %bb.4:
	mov	w21, #0
	b	LBB0_12
LBB0_5:
Lloh24:
	adrp	x9, _ucs_a1_jis_table@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ucs_a1_jis_table@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
Lloh26:
	adrp	x9, _ucs_a2_jis_table@GOTPAGE
Lloh27:
	ldr	x9, [x9, _ucs_a2_jis_table@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh28:
	adrp	x9, _ucs_i_jis_table@GOTPAGE
Lloh29:
	ldr	x9, [x9, _ucs_i_jis_table@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh30:
	adrp	x9, _ucs_r_jis_table@GOTPAGE
Lloh31:
	ldr	x9, [x9, _ucs_r_jis_table@GOTPAGEOFF]
LBB0_9:
	ldr	x9, [x9]
	sub	w8, w19, w8
	ldr	w21, [x9, w8, sxtw #2]
	cmp	w21, #0
	b.le	LBB0_12
; %bb.10:
	lsr	w8, w21, #7
	cmp	w8, #256
	b.ls	LBB0_16
LBB0_11:
	mov	x0, x19
	mov	x1, x20
	bl	_mbfl_filt_conv_illegal_output
	b	LBB0_31
LBB0_12:
Lloh32:
	adrp	x8, _MBFL_WCSPLANE_MASK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MBFL_WCSPLANE_MASK@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	bic	w9, w19, w8
Lloh35:
	adrp	x10, _MBFL_WCSPLANE_JIS0208@GOTPAGE
Lloh36:
	ldr	x10, [x10, _MBFL_WCSPLANE_JIS0208@GOTPAGEOFF]
Lloh37:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_18
; %bb.13:
	and	w21, w8, w19
LBB0_14:
	cbz	w19, LBB0_28
; %bb.15:
	cmp	w21, #1
	b.lt	LBB0_11
LBB0_16:
	cmp	w21, #255
	b.ls	LBB0_29
LBB0_17:
	ubfx	w0, w21, #8, #8
	and	w1, w21, #0xff
	mov	x2, x21
	bl	_SJIS_ENCODE
	ldr	x8, [x20, #8]
	ldr	w1, [x20]
	mov	x0, x21
	blr	x8
	bl	_CK
	ldr	x8, [x20, #8]
	ldr	w1, [x20]
                                        ; implicit-def: $w0
	b	LBB0_30
LBB0_18:
	mov	w8, #65339
	cmp	w19, w8
	b.le	LBB0_24
; %bb.19:
	mov	w8, #65503
	cmp	w19, w8
	b.le	LBB0_32
; %bb.20:
	mov	w8, #65504
	cmp	w19, w8
	b.eq	LBB0_38
; %bb.21:
	mov	w8, #65505
	cmp	w19, w8
	b.eq	LBB0_39
; %bb.22:
	mov	w8, #65506
	cmp	w19, w8
	b.ne	LBB0_14
; %bb.23:
	mov	w21, #8780
	b	LBB0_17
LBB0_24:
	mov	w8, #8740
	cmp	w19, w8
	b.gt	LBB0_35
; %bb.25:
	cmp	w19, #165
	b.eq	LBB0_40
; %bb.26:
	mov	w8, #8254
	cmp	w19, w8
	b.ne	LBB0_14
; %bb.27:
	mov	w21, #8497
	b	LBB0_17
LBB0_28:
	mov	w21, #0
LBB0_29:
	ldr	x8, [x20, #8]
	ldr	w1, [x20]
	mov	x0, x21
LBB0_30:
	blr	x8
LBB0_31:
	bl	_CK
	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
LBB0_32:
	mov	w8, #65340
	cmp	w19, w8
	b.eq	LBB0_41
; %bb.33:
	mov	w8, #65374
	cmp	w19, w8
	b.ne	LBB0_14
; %bb.34:
	mov	w21, #8513
	b	LBB0_17
LBB0_35:
	mov	w8, #8741
	cmp	w19, w8
	b.eq	LBB0_42
; %bb.36:
	mov	w8, #65293
	cmp	w19, w8
	b.ne	LBB0_14
; %bb.37:
	mov	w21, #8541
	b	LBB0_17
LBB0_38:
	mov	w21, #8561
	b	LBB0_17
LBB0_39:
	mov	w21, #8562
	b	LBB0_17
LBB0_40:
	mov	w21, #8559
	b	LBB0_17
LBB0_41:
	mov	w21, #8512
	b	LBB0_17
LBB0_42:
	mov	w21, #8514
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_ucs_a1_jis_table_min,4,2       ; @ucs_a1_jis_table_min
	.comm	_ucs_a1_jis_table_max,4,2       ; @ucs_a1_jis_table_max
	.comm	_ucs_a1_jis_table,8,3           ; @ucs_a1_jis_table
	.comm	_ucs_a2_jis_table_min,4,2       ; @ucs_a2_jis_table_min
	.comm	_ucs_a2_jis_table_max,4,2       ; @ucs_a2_jis_table_max
	.comm	_ucs_a2_jis_table,8,3           ; @ucs_a2_jis_table
	.comm	_ucs_i_jis_table_min,4,2        ; @ucs_i_jis_table_min
	.comm	_ucs_i_jis_table_max,4,2        ; @ucs_i_jis_table_max
	.comm	_ucs_i_jis_table,8,3            ; @ucs_i_jis_table
	.comm	_ucs_r_jis_table_min,4,2        ; @ucs_r_jis_table_min
	.comm	_ucs_r_jis_table_max,4,2        ; @ucs_r_jis_table_max
	.comm	_ucs_r_jis_table,8,3            ; @ucs_r_jis_table
	.comm	_MBFL_WCSPLANE_MASK,4,2         ; @MBFL_WCSPLANE_MASK
	.comm	_MBFL_WCSPLANE_JIS0208,4,2      ; @MBFL_WCSPLANE_JIS0208
.subsections_via_symbols
