	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _BIG5_mbrtowc
__BIG5_mbrtowc:                         ## @_BIG5_mbrtowc
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rcx), %eax
	cmpl	$256, %eax                      ## imm = 0x100
	jae	LBB0_1
## %bb.3:
	movq	%rcx, %r15
	movq	%rdx, %rbx
	movq	%rdi, %r14
	testq	%rsi, %rsi
	movl	$1, %ecx
	cmoveq	%rcx, %rbx
	leaq	L_.str(%rip), %r13
	cmovneq	%rsi, %r13
	cmoveq	%rsi, %r14
	movq	$-2, %r12
	testq	%rbx, %rbx
	je	LBB0_19
## %bb.4:
	movzbl	(%r13), %ecx
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.7:
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:
	shll	$8, %eax
	orl	%ecx, %eax
	movl	%eax, (%r14)
LBB0_9:
	movl	$0, (%r15)
	movl	$1, %r12d
	jmp	LBB0_19
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	$-1, %r12
LBB0_19:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movsbl	%cl, %edi
	callq	__big5_check
	movzbl	(%r13), %ecx
	cmpq	$2, %rax
	jne	LBB0_16
## %bb.11:
	cmpq	$1, %rbx
	ja	LBB0_13
## %bb.12:
	movl	%ecx, (%r15)
	jmp	LBB0_19
LBB0_16:
	testq	%r14, %r14
	je	LBB0_18
## %bb.17:
	movl	%ecx, (%r14)
LBB0_18:
	xorl	%r12d, %r12d
	testl	%ecx, %ecx
	setne	%r12b
	jmp	LBB0_19
LBB0_13:
	movzbl	1(%r13), %eax
	testl	%eax, %eax
	je	LBB0_6
## %bb.14:
	movl	$2, %r12d
	testq	%r14, %r14
	je	LBB0_19
## %bb.15:
	shll	$8, %ecx
	orl	%eax, %ecx
	movl	%ecx, (%r14)
	jmp	LBB0_19
LBB0_6:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.no_dead_strip	__BIG5_mbrtowc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _BIG5_mbrtowc
__BIG5_mbrtowc:                         ; @_BIG5_mbrtowc
	.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
	ldr	w8, [x3]
	cmp	w8, #256
	b.hs	LBB0_7
; %bb.1:
Lloh0:
	adrp	x9, l_.str@PAGE
Lloh1:
	add	x9, x9, l_.str@PAGEOFF
	cmp	x1, #0
	csel	x21, x9, x1, eq
	csinc	x22, x2, xzr, ne
	csel	x20, xzr, x0, eq
	cbz	x22, LBB0_9
; %bb.2:
	mov	x19, x3
	ldrb	w9, [x21]
	cbz	w8, LBB0_10
; %bb.3:
	cbz	w9, LBB0_20
; %bb.4:
	cbz	x20, LBB0_6
; %bb.5:
	bfi	w9, w8, #8, #24
	str	w9, [x20]
LBB0_6:
	str	wzr, [x19]
	mov	w0, #1
	b	LBB0_16
LBB0_7:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
Lloh4:
	adrp	x9, _errno@GOTPAGE
Lloh5:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh6:
	str	w8, [x9]
	mov	x0, #-1
	b	LBB0_16
LBB0_9:
	mov	x0, #-2
	b	LBB0_16
LBB0_10:
	sxtb	w0, w9
	bl	__big5_check
	ldrb	w8, [x21]
	cmp	x0, #2
	b.ne	LBB0_13
; %bb.11:
	cmp	x22, #1
	b.hi	LBB0_17
; %bb.12:
	str	w8, [x19]
	mov	x0, #-2
	b	LBB0_16
LBB0_13:
	cbz	x20, LBB0_15
; %bb.14:
	str	w8, [x20]
LBB0_15:
	cmp	w8, #0
	cset	w0, ne
LBB0_16:
	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_17:
	ldrb	w9, [x21, #1]
	cbz	w9, LBB0_20
; %bb.18:
	cbz	x20, LBB0_21
; %bb.19:
	bfi	w9, w8, #8, #8
	str	w9, [x20]
	mov	w0, #2
	b	LBB0_16
LBB0_20:
Lloh7:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
	b	LBB0_8
LBB0_21:
	mov	w0, #2
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.no_dead_strip	__BIG5_mbrtowc
.subsections_via_symbols
