	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tuklib_mbstr_fw                ## -- Begin function tuklib_mbstr_fw
	.p2align	4, 0x90
_tuklib_mbstr_fw:                       ## @tuklib_mbstr_fw
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	leaq	-16(%rbp), %rsi
	callq	_tuklib_mbstr_width
	cmpq	$-1, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rcx
	movslq	%ebx, %rdx
	xorl	%eax, %eax
	cmpq	%rdx, %rcx
	ja	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	subq	%rcx, %rdx
	cmovaeq	%rdx, %rax
	addl	-16(%rbp), %eax
	jmp	LBB0_4
LBB0_1:
	movl	$-1, %eax
LBB0_4:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tuklib_mbstr_fw                ; -- Begin function tuklib_mbstr_fw
	.p2align	2
_tuklib_mbstr_fw:                       ; @tuklib_mbstr_fw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	add	x1, sp, #8
	bl	_tuklib_mbstr_width
	cmn	x0, #1
	b.eq	LBB0_3
; %bb.1:
	sxtw	x8, w19
	cmp	x0, x8
	b.ls	LBB0_4
; %bb.2:
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	mov	w0, #-1
	b	LBB0_5
LBB0_4:
	ldr	w9, [sp, #8]
	subs	x8, x8, x0
	csel	x8, xzr, x8, lo
	add	w0, w9, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
