	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tw_pos
_tw_pos:                                ## @tw_pos
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movb	(%rdi), %al
	cmpb	$42, %al
	jne	LBB0_3
## %bb.1:
	cmpb	$0, 1(%r15)
	je	LBB0_2
LBB0_3:
	movl	$1, %ebx
	testb	%al, %al
	je	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$45, %al
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movzbl	(%r15,%rbx), %eax
	incq	%rbx
	testb	%al, %al
	jne	LBB0_5
LBB0_7:
	movq	%r15, %rdi
	callq	_getn
	cmpl	%r14d, %eax
	sete	%al
	jmp	LBB0_16
LBB0_8:
	cmpq	$1, %rbx
	je	LBB0_9
## %bb.10:
	movb	$0, -1(%r15,%rbx)
	movb	(%r15,%rbx), %r12b
	movq	%r15, %rdi
	callq	_getn
	testb	%r12b, %r12b
	je	LBB0_11
## %bb.12:
	cmpl	%r14d, %eax
	jle	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_2:
	movb	$1, %al
	jmp	LBB0_16
LBB0_9:
	incq	%r15
	jmp	LBB0_15
LBB0_11:
	cmpl	%r14d, %eax
	setle	%al
	jmp	LBB0_16
LBB0_14:
	addq	%rbx, %r15
LBB0_15:
	movq	%r15, %rdi
	callq	_getn
	cmpl	%r14d, %eax
	setge	%al
LBB0_16:
	movzbl	%al, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_tw_pos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tw_pos
_tw_pos:                                ; @tw_pos
	.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	x19, x1
	ldrb	w9, [x0]
	cmp	w9, #42
	b.ne	LBB0_2
; %bb.1:
	ldrb	w8, [x0, #1]
	cbz	w8, LBB0_10
LBB0_2:
	mov	x8, #0
	cbz	w9, LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w9, #45
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x0, x8
	ldrb	w9, [x9, #1]
	add	x8, x8, #1
	cbnz	w9, LBB0_3
LBB0_5:
	bl	_getn
	cmp	w0, w19
	cset	w0, eq
	b	LBB0_15
LBB0_6:
	cbz	x8, LBB0_11
; %bb.7:
	add	x20, x0, x8
	ldrb	w21, [x20, #1]!
	strb	wzr, [x0, x8]
	bl	_getn
	cbz	w21, LBB0_12
; %bb.8:
	cmp	w0, w19
	b.le	LBB0_13
; %bb.9:
	mov	w0, #0
	b	LBB0_15
LBB0_10:
	mov	w0, #1
	b	LBB0_15
LBB0_11:
	add	x0, x0, #1
	b	LBB0_14
LBB0_12:
	cmp	w0, w19
	cset	w0, le
	b	LBB0_15
LBB0_13:
	mov	x0, x20
LBB0_14:
	bl	_getn
	cmp	w0, w19
	cset	w0, ge
LBB0_15:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_tw_pos
.subsections_via_symbols
