	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _GB18030_wcrtomb
__GB18030_wcrtomb:                      ## @_GB18030_wcrtomb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpq	$0, (%rdx)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_2:
	movl	$1, %eax
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.3:
	testl	%esi, %esi
	js	LBB0_20
## %bb.4:
	testl	$2130706432, %esi               ## imm = 0x7F000000
	je	LBB0_11
## %bb.5:
	movl	%esi, %eax
	shrl	$24, %eax
	cmpl	$127, %eax
	je	LBB0_20
## %bb.6:
	orb	$-128, %al
	movb	%al, (%rdi)
	movl	%esi, %eax
	shrl	$16, %eax
	movzbl	%al, %ecx
	addl	$-58, %ecx
	cmpl	$-10, %ecx
	jb	LBB0_20
## %bb.7:
	movb	%al, 1(%rdi)
	movl	%esi, %eax
	shrl	$8, %eax
	movzbl	%al, %ecx
	cmpl	$129, %ecx
	jb	LBB0_20
## %bb.8:
	cmpl	$255, %ecx
	je	LBB0_20
## %bb.9:
	movb	%al, 2(%rdi)
	movzbl	%sil, %eax
	addl	$-58, %eax
	cmpl	$-10, %eax
	jb	LBB0_20
## %bb.10:
	movb	%sil, 3(%rdi)
	movl	$4, %eax
	popq	%rbp
	retq
LBB0_11:
	testl	$16711680, %esi                 ## imm = 0xFF0000
	je	LBB0_12
LBB0_20:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	$-1, %rax
LBB0_22:
	popq	%rbp
	retq
LBB0_12:
	testl	$65280, %esi                    ## imm = 0xFF00
	je	LBB0_18
## %bb.13:
	movl	%esi, %eax
	shrl	$8, %eax
	movzbl	%al, %ecx
	cmpl	$129, %ecx
	jb	LBB0_20
## %bb.14:
	cmpl	$255, %ecx
	je	LBB0_20
## %bb.15:
	movb	%al, (%rdi)
	movl	%esi, %eax
	notl	%eax
	testb	$127, %al
	je	LBB0_20
## %bb.16:
	movl	%esi, %eax
	andl	$192, %eax
	je	LBB0_20
## %bb.17:
	movb	%sil, 1(%rdi)
	movl	$2, %eax
	popq	%rbp
	retq
LBB0_18:
	cmpl	$127, %esi
	ja	LBB0_20
## %bb.19:
	movb	%sil, (%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.no_dead_strip	__GB18030_wcrtomb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _GB18030_wcrtomb
__GB18030_wcrtomb:                      ; @_GB18030_wcrtomb
	.cfi_startproc
; %bb.0:
	ldr	x8, [x2]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_2:
	cbz	x0, LBB0_11
; %bb.3:
	tbnz	w1, #31, LBB0_13
; %bb.4:
	tst	w1, #0x7f000000
	b.eq	LBB0_12
; %bb.5:
	lsr	w8, w1, #24
	cmp	w8, #127
	b.eq	LBB0_13
; %bb.6:
	orr	w8, w8, #0x80
	strb	w8, [x0]
	ubfx	w8, w1, #16, #8
	sub	w8, w8, #58
	cmn	w8, #10
	b.lo	LBB0_13
; %bb.7:
	lsr	w8, w1, #16
	strb	w8, [x0, #1]
	ubfx	w8, w1, #8, #8
	cmp	w8, #129
	b.lo	LBB0_13
; %bb.8:
	cmp	w8, #255
	b.eq	LBB0_13
; %bb.9:
	lsr	w8, w1, #8
	strb	w8, [x0, #2]
	and	w8, w1, #0xff
	sub	w8, w8, #58
	cmn	w8, #10
	b.lo	LBB0_13
; %bb.10:
	strb	w1, [x0, #3]
	mov	w0, #4
	ret
LBB0_11:
	mov	w0, #1
	ret
LBB0_12:
	tst	w1, #0xff0000
	b.eq	LBB0_15
LBB0_13:
Lloh2:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
Lloh4:
	adrp	x9, _errno@GOTPAGE
Lloh5:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh6:
	str	w8, [x9]
	mov	x0, #-1
	ret
LBB0_15:
	tst	w1, #0xff00
	b.eq	LBB0_21
; %bb.16:
	ubfx	w8, w1, #8, #8
	cmp	w8, #129
	b.lo	LBB0_13
; %bb.17:
	cmp	w8, #255
	b.eq	LBB0_13
; %bb.18:
	mvn	w8, w1
	lsr	w9, w1, #8
	strb	w9, [x0]
	tst	w8, #0x7f
	b.eq	LBB0_13
; %bb.19:
	and	w8, w1, #0xc0
	cbz	w8, LBB0_13
; %bb.20:
	strb	w1, [x0, #1]
	mov	w0, #2
	ret
LBB0_21:
	cmp	w1, #127
	b.hi	LBB0_13
; %bb.22:
	strb	w1, [x0]
	mov	w0, #1
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.no_dead_strip	__GB18030_wcrtomb
.subsections_via_symbols
