	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UPDOWN_GetBuddyInt
_UPDOWN_GetBuddyInt:                    ## @UPDOWN_GetBuddyInt
	.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
	subq	$192, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_FLAG_BUDDYINT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_FALSE@GOTPCREL(%rip), %r12
	testl	%eax, (%rdi)
	je	LBB0_13
## %bb.1:
	movq	%rdi, %r14
	movl	12(%rdi), %edi
	callq	_IsWindow
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	movq	%r14, %rdi
	callq	_UPDOWN_IsBuddyListbox
	movl	12(%r14), %r15d
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_LB_GETCARETINDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_SendMessageW
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
LBB0_12:
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_TRACE
	movl	%ebx, 4(%r14)
	movq	_TRUE@GOTPCREL(%rip), %r12
	jmp	LBB0_13
LBB0_4:
	leaq	-208(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movl	%r15d, %edi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_GetWindowTextW
	testq	%rax, %rax
	js	LBB0_13
## %bb.5:
	xorl	%eax, %eax
	callq	_UPDOWN_GetThousandSep
	movq	-208(%rbp), %rdx
	movq	%rbx, %rcx
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.6:
	leaq	-208(%rbp), %rcx
	movq	%rcx, %rbx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%rbx), %rdx
	addq	$8, %rbx
	testq	%rdx, %rdx
	je	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, %rdx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rdx, (%rcx)
	addq	$8, %rcx
	jmp	LBB0_9
LBB0_10:
	movq	%rbx, -216(%rbp)
	movq	$0, (%rcx)
	movl	8(%r14), %edx
	leaq	-208(%rbp), %rdi
	leaq	-216(%rbp), %rsi
	callq	_strtolW
	movl	%eax, %ebx
	movq	-216(%rbp), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
LBB0_13:
	movl	(%r12), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_15
## %bb.14:
	addq	$192, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_UPDOWN_InBounds
	testl	%eax, %eax
	jne	LBB0_12
	jmp	LBB0_13
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_FLAG_BUDDYINT,4,2              ## @FLAG_BUDDYINT
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_LB_GETCARETINDEX,4,2           ## @LB_GETCARETINDEX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"new value(%d) from buddy (old=%d)\n"

	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_UPDOWN_GetBuddyInt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UPDOWN_GetBuddyInt
_UPDOWN_GetBuddyInt:                    ; @UPDOWN_GetBuddyInt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _FLAG_BUDDYINT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FLAG_BUDDYINT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #12]
	bl	_IsWindow
	cbz	x0, LBB0_13
; %bb.2:
	mov	x0, x19
	bl	_UPDOWN_IsBuddyListbox
	ldr	w20, [x19, #12]
	cbz	x0, LBB0_5
; %bb.3:
Lloh6:
	adrp	x8, _LB_GETCARETINDEX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LB_GETCARETINDEX@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_SendMessageW
	mov	x20, x0
	tbnz	w0, #31, LBB0_13
LBB0_4:
	ldr	w2, [x19, #4]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	str	w20, [x19, #4]
Lloh11:
	adrp	x8, _TRUE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_14
LBB0_5:
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	mov	x2, x0
	add	x1, sp, #8
	mov	x0, x20
	bl	_GetWindowTextW
	tbnz	x0, #63, LBB0_13
; %bb.6:
	bl	_UPDOWN_GetThousandSep
	ldr	x10, [sp, #8]
	cbz	x10, LBB0_11
; %bb.7:
	add	x8, sp, #8
	add	x9, sp, #8
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x10, [x9, #8]!
	cbz	x10, LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x10, x0
	b.eq	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	str	x10, [x8], #8
	b	LBB0_8
LBB0_11:
	add	x9, sp, #8
	add	x8, sp, #8
LBB0_12:
	str	x9, [sp]
	str	xzr, [x8]
	ldr	w2, [x19, #8]
	add	x0, sp, #8
	mov	x1, sp
	bl	_strtolW
	ldr	x8, [sp]
	ldr	x8, [x8]
	cbz	x8, LBB0_16
LBB0_13:
Lloh13:
	adrp	x8, _FALSE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
	ldur	x8, [x29, #-24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.15:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_16:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_UPDOWN_InBounds
	cbnz	w0, LBB0_4
	b	LBB0_13
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_FLAG_BUDDYINT,4,2              ; @FLAG_BUDDYINT
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_LB_GETCARETINDEX,4,2           ; @LB_GETCARETINDEX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"new value(%d) from buddy (old=%d)\n"

	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_UPDOWN_GetBuddyInt
.subsections_via_symbols
