	.file	"extr_updown.c_UPDOWN_SetBuddyInt.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"set new value(%d) to buddy.\n"
	.text
	.p2align 4
	.type	UPDOWN_SetBuddyInt, @function
UPDOWN_SetBuddyInt:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pxor	xmm0, xmm0
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 88
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -64[rbp], 0
	mov	eax, DWORD PTR [rdi]
	movaps	XMMWORD PTR -80[rbp], xmm0
	test	DWORD PTR FLAG_BUDDYINT[rip], eax
	jne	.L2
.L36:
	mov	eax, DWORD PTR FALSE[rip]
.L1:
	mov	rcx, QWORD PTR -56[rbp]
	xor	rcx, QWORD PTR fs:40
	jne	.L38
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rbx, rdi
	mov	edi, DWORD PTR 12[rdi]
	call	IsWindow@PLT
	test	rax, rax
	je	.L36
	mov	esi, DWORD PTR 16[rbx]
	lea	rdi, .LC0[rip]
	call	TRACE@PLT
	mov	rdi, rbx
	call	UPDOWN_IsBuddyListbox@PLT
	test	rax, rax
	jne	.L39
	cmp	DWORD PTR 4[rbx], 16
	lea	rax, fmt_dec_oct.1968[rip]
	mov	edx, DWORD PTR 16[rbx]
	lea	r13, -112[rbp]
	lea	rsi, fmt_hex.1967[rip]
	mov	rdi, r13
	cmovne	rsi, rax
	call	wsprintfW@PLT
	cmp	DWORD PTR 4[rbx], 10
	mov	r12d, eax
	je	.L40
.L7:
	lea	r12, -80[rbp]
	mov	rdi, r12
	call	ARRAY_SIZE@PLT
	mov	edi, DWORD PTR 12[rbx]
	mov	rsi, r12
	mov	edx, eax
	call	GetWindowTextW@PLT
	mov	rsi, r13
	mov	rdi, r12
	call	lstrcmpiW@PLT
	test	rax, rax
	je	.L36
	mov	edi, DWORD PTR 12[rbx]
	mov	rsi, r13
	call	SetWindowTextW@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L40:
	mov	eax, DWORD PTR 8[rbx]
	test	DWORD PTR UDS_NOTHOUSANDS[rip], eax
	jne	.L7
	cmp	r12d, 3
	jle	.L7
	mov	rdi, r13
	mov	r15, rsp
	call	ARRAY_SIZE@PLT
	mov	rcx, rsp
	cdqe
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L9
.L41:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L41
.L9:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L10
	or	QWORD PTR -8[rsp+rdx], 0
.L10:
	xor	eax, eax
	call	UPDOWN_GetThousandSep@PLT
	movsx	rcx, r12d
	mov	edx, 20
	mov	rsi, r13
	imul	rcx, rcx, 1431655766
	mov	r14d, eax
	mov	eax, r12d
	mov	rdi, rsp
	sar	eax, 31
	shr	rcx, 32
	sub	ecx, eax
	lea	eax, [rcx+rcx*2]
	mov	ecx, r12d
	sub	ecx, eax
	mov	DWORD PTR -116[rbp], ecx
	call	memcpy@PLT
	movsx	rcx, DWORD PTR -116[rbp]
	mov	eax, 3
	test	ecx, ecx
	cmove	rcx, rax
	lea	r8, [rsp+rcx]
	lea	rdx, 0[r13+rcx]
	movzx	ecx, BYTE PTR [r8]
	test	cl, cl
	je	.L12
	xor	eax, eax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L42:
	mov	BYTE PTR [rdx], r14b
	add	rdx, 2
.L13:
	add	rax, 1
	mov	BYTE PTR [rsi], cl
	movzx	ecx, BYTE PTR [r8+rax]
	test	cl, cl
	je	.L12
.L14:
	imul	edi, eax, -1431655765
	lea	rsi, 1[rdx]
	cmp	edi, 1431655765
	jbe	.L42
	mov	rdi, rsi
	mov	rsi, rdx
	mov	rdx, rdi
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L39:
	mov	edx, DWORD PTR 16[rbx]
	mov	edi, DWORD PTR 12[rbx]
	xor	ecx, ecx
	mov	esi, DWORD PTR LB_SETCURSEL[rip]
	call	SendMessageW@PLT
	cmp	QWORD PTR LB_ERR[rip], rax
	setne	al
	movzx	eax, al
	jmp	.L1
.L12:
	mov	BYTE PTR [rdx], 0
	mov	rsp, r15
	jmp	.L7
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	UPDOWN_SetBuddyInt, .-UPDOWN_SetBuddyInt
	.section	.rodata
	.type	fmt_dec_oct.1968, @object
	.size	fmt_dec_oct.1968, 3
fmt_dec_oct.1968:
	.string	"%d"
	.type	fmt_hex.1967, @object
	.size	fmt_hex.1967, 7
fmt_hex.1967:
	.string	"0x%04X"
	.comm	UDS_NOTHOUSANDS,4,4
	.comm	LB_SETCURSEL,4,4
	.comm	LB_ERR,8,8
	.comm	FLAG_BUDDYINT,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_updown.c_UPDOWN_SetBuddyInt.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"set new value(%d) to buddy.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	UPDOWN_SetBuddyInt, %function
UPDOWN_SetBuddyInt:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #48
	mov	r4, #0
	ldr	r3, .L32
	ldr	r2, [r0]
	ldr	r3, [r3]
	tst	r2, r3
	ldr	r3, .L32+4
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	str	r4, [fp, #-52]
	str	r4, [fp, #-48]
	str	r4, [fp, #-44]
	str	r4, [fp, #-40]
	str	r4, [fp, #-36]
	bne	.L2
.L27:
	ldr	r3, .L32+8
	ldr	r0, [r3]
.L1:
	ldr	r3, .L32+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L29
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L2:
	mov	r5, r0
	ldr	r0, [r0, #12]
	bl	IsWindow
	cmp	r0, #0
	beq	.L27
	ldr	r1, [r5, #16]
	ldr	r0, .L32+12
	bl	TRACE
	mov	r0, r5
	bl	UPDOWN_IsBuddyListbox
	subs	r6, r0, #0
	bne	.L30
	ldr	r3, .L32+16
	ldr	r1, [r5, #4]
	add	r2, r3, #8
	cmp	r1, #16
	moveq	r1, r3
	movne	r1, r2
	sub	r0, fp, #72
	ldr	r2, [r5, #16]
	bl	wsprintfW
	ldr	r3, [r5, #4]
	mov	r8, r0
	cmp	r3, #10
	beq	.L31
.L7:
	sub	r0, fp, #52
	ldr	r4, [r5, #12]
	bl	ARRAY_SIZE
	sub	r1, fp, #52
	mov	r2, r0
	mov	r0, r4
	bl	GetWindowTextW
	sub	r1, fp, #72
	sub	r0, fp, #52
	bl	lstrcmpiW
	cmp	r0, #0
	beq	.L27
	ldr	r0, [r5, #12]
	sub	r1, fp, #72
	bl	SetWindowTextW
	b	.L1
.L31:
	ldr	r2, .L32+20
	ldr	r3, [r5, #8]
	ldr	r2, [r2]
	cmp	r0, #3
	and	r3, r3, r2
	movle	r2, #0
	movgt	r2, #1
	cmp	r3, #0
	movne	r2, #0
	cmp	r2, #0
	beq	.L7
	sub	r0, fp, #72
	bl	ARRAY_SIZE
	add	r3, r0, #7
	bic	r3, r3, #7
	mov	r7, sp
	sub	sp, sp, r3
	bl	UPDOWN_GetThousandSep
	ldr	r2, .L32+24
	sub	r1, fp, #72
	smull	r3, r2, r8, r2
	sub	r9, r2, r8, asr #31
	add	r2, r9, r9, lsl #1
	sub	r9, r8, r2
	mov	r4, r0
	mov	r2, #20
	mov	r0, sp
	bl	memcpy
	cmp	r9, #0
	moveq	r9, #3
	ldrb	r0, [sp, r9]	@ zero_extendqisi2
	sub	r3, fp, #72
	cmp	r0, #0
	add	r1, r3, r9
	add	r2, sp, r9
	beq	.L9
	ldr	ip, .L32+28
.L11:
	add	r3, r6, r6, lsl #2
	add	r3, r3, r3, lsl #4
	add	r3, r3, r3, lsl #8
	add	r3, r3, r3, lsl #16
	add	r3, r6, r3, lsl #1
	cmp	r3, ip
	add	r3, r1, #1
	movhi	lr, r3
	movhi	r3, r1
	strbls	r4, [r1], #2
	strb	r0, [r3]
	ldrb	r0, [r2, #1]!	@ zero_extendqisi2
	movhi	r1, lr
	cmp	r0, #0
	add	r6, r6, #1
	bne	.L11
.L9:
	mov	r3, #0
	strb	r3, [r1]
	mov	sp, r7
	b	.L7
.L30:
	ldr	r2, .L32+32
	mov	r3, r4
	ldr	r1, [r2]
	ldr	r0, [r5, #12]
	ldr	r2, [r5, #16]
	bl	SendMessageW
	ldr	r3, .L32+36
	ldr	r3, [r3]
	subs	r0, r3, r0
	movne	r0, #1
	b	.L1
.L29:
	bl	__stack_chk_fail
.L33:
	.align	2
.L32:
	.word	FLAG_BUDDYINT
	.word	.LC1
	.word	FALSE
	.word	.LC0
	.word	.LANCHOR0
	.word	UDS_NOTHOUSANDS
	.word	1431655766
	.word	1431655765
	.word	LB_SETCURSEL
	.word	LB_ERR
	.size	UPDOWN_SetBuddyInt, .-UPDOWN_SetBuddyInt
	.comm	UDS_NOTHOUSANDS,4,4
	.comm	LB_SETCURSEL,4,4
	.comm	LB_ERR,4,4
	.comm	FLAG_BUDDYINT,4,4
	.comm	FALSE,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	fmt_hex.4251, %object
	.size	fmt_hex.4251, 7
fmt_hex.4251:
	.ascii	"0x%04X\000"
	.space	1
	.type	fmt_dec_oct.4252, %object
	.size	fmt_dec_oct.4252, 3
fmt_dec_oct.4252:
	.ascii	"%d\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
