	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UPDOWN_GetPos
_UPDOWN_GetPos:                         ## @UPDOWN_GetPos
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_UPDOWN_GetBuddyInt
	movl	%eax, %r15d
	movl	(%rbx), %r12d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_UPDOWN_InBounds
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	testq	%r14, %r14
	je	LBB0_4
LBB0_3:
	xorl	%eax, %eax
	testl	%r15d, %r15d
	sete	%al
	movl	%eax, (%r14)
LBB0_4:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	4(%rbx), %eax
	movl	8(%rbx), %ecx
	cmpl	%ecx, %eax
	movl	%ecx, %edx
	cmovgl	%eax, %edx
	cmpl	%eax, %r12d
	cmovlel	%ecx, %edx
	cmpl	%ecx, %eax
	movl	%edx, %ecx
	cmovll	%eax, %ecx
	cmpl	%eax, %r12d
	cmovgel	%edx, %ecx
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%ecx, %r12d
	testq	%r14, %r14
	jne	LBB0_3
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_UPDOWN_GetPos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UPDOWN_GetPos
_UPDOWN_GetPos:                         ; @UPDOWN_GetPos
	.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
	mov	x22, x0
	bl	_UPDOWN_GetBuddyInt
	mov	x21, x0
	ldr	w20, [x22]
	mov	x0, x22
	mov	x1, x20
	bl	_UPDOWN_InBounds
	cbz	w0, LBB0_4
; %bb.1:
	cbz	x19, LBB0_3
LBB0_2:
	cmp	w21, #0
	cset	w8, eq
	str	w8, [x19]
LBB0_3:
	mov	x0, x20
	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_4:
	ldp	w8, w9, [x22, #4]
	cmp	w8, w9
	cset	w10, lt
	cset	w11, gt
	cmp	w20, w8
	cset	w12, lt
	and	w10, w12, w10
	cset	w12, gt
	and	w11, w12, w11
	orr	w10, w10, w11
	cmp	w10, #0
	csel	w20, w8, w9, ne
Lloh0:
	adrp	x8, _FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	cbnz	x19, LBB0_2
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_UPDOWN_GetPos
.subsections_via_symbols
