	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wgetnext
_wgetnext:                              ## @wgetnext
	.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	%rdi, %rbx
	leaq	-32(%rbp), %r15
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdx
	subq	%rsi, %rdx
	leaq	-28(%rbp), %rdi
	movq	%r15, %rcx
	callq	_mbrtowc
	cmpq	$-2, %rax
	jb	LBB0_2
## %bb.1:
	movq	_REG_ILLSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SETERROR
	jmp	LBB0_3
LBB0_2:
	testq	%rax, %rax
	movl	$1, %ecx
	cmovneq	%rax, %rcx
	addq	%rcx, (%rbx)
	movl	-28(%rbp), %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_ILLSEQ,4,2                 ## @REG_ILLSEQ
	.no_dead_strip	_wgetnext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wgetnext
_wgetnext:                              ; @wgetnext
	.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, x0
	add	x0, sp, #12
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldp	x1, x8, [x19]
	sub	x2, x8, x1
	add	x0, sp, #8
	add	x3, sp, #12
	bl	_mbrtowc
	cmn	x0, #2
	b.lo	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _REG_ILLSEQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_ILLSEQ@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_SETERROR
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	cmp	x0, #0
	csinc	x8, x0, xzr, ne
	ldr	x9, [x19]
	add	x8, x9, x8
	str	x8, [x19]
	ldr	w0, [sp, #8]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_ILLSEQ,4,2                 ; @REG_ILLSEQ
	.no_dead_strip	_wgetnext
.subsections_via_symbols
