	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function LISTBOX_SetHorizontalPos
_LISTBOX_SetHorizontalPos:              ## @LISTBOX_SetHorizontalPos
	.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), %rax
	movq	16(%rdi), %r14
	subq	8(%rdi), %rax
	cmpq	%rsi, %rax
	cmovgeq	%rsi, %rax
	xorl	%ebx, %ebx
	testq	%rax, %rax
	cmovgq	%rax, %rbx
	subq	%rbx, %r14
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r15
	movl	24(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rdx
	callq	_TRACE
	movq	%rbx, 16(%r15)
	movq	%r15, %rdi
	callq	_LISTBOX_UpdateScroll
	movq	%r14, %rax
	negq	%rax
	cmovsq	%r14, %rax
	cmpq	8(%r15), %rax
	jge	LBB0_6
## %bb.2:
	movl	28(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	callq	_LISTBOX_GetItemRect
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.3:
	movl	24(%r15), %edi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %rsi
	callq	_InvalidateRect
LBB0_4:
	movq	_SW_INVALIDATE@GOTPCREL(%rip), %rax
	movq	_SW_ERASE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movl	24(%r15), %edi
	movq	_SW_SCROLLCHILDREN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	$0
	callq	_ScrollWindowEx
	addq	$16, %rsp
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	24(%r15), %edi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_InvalidateRect                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[%p]: new horz pos = %d\n"

	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_SW_INVALIDATE,4,2              ## @SW_INVALIDATE
	.comm	_SW_ERASE,4,2                   ## @SW_ERASE
	.comm	_SW_SCROLLCHILDREN,4,2          ## @SW_SCROLLCHILDREN
	.no_dead_strip	_LISTBOX_SetHorizontalPos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LISTBOX_SetHorizontalPos
_LISTBOX_SetHorizontalPos:              ; @LISTBOX_SetHorizontalPos
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldp	x8, x9, [x0]
	sub	x8, x8, x9
	cmp	x8, x1
	csel	x8, x8, x1, lt
	cmp	x8, #0
	csel	x21, x8, xzr, gt
	ldr	x8, [x0, #16]
	subs	x19, x8, x21
	b.eq	LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	w1, [x0, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x21
	bl	_TRACE
	str	x21, [x20, #16]
	mov	x0, x20
	bl	_LISTBOX_UpdateScroll
	cmp	x19, #0
	cneg	x8, x19, mi
	ldr	x9, [x20, #8]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.2:
	ldr	w1, [x20, #28]
	add	x2, sp, #12
	mov	x0, x20
	bl	_LISTBOX_GetItemRect
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x20, #24]
Lloh2:
	adrp	x8, _TRUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x1, sp, #12
	bl	_InvalidateRect
LBB0_4:
	ldr	w0, [x20, #24]
Lloh5:
	adrp	x8, _SW_INVALIDATE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SW_INVALIDATE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _SW_ERASE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SW_ERASE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _SW_SCROLLCHILDREN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SW_SCROLLCHILDREN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w7, w8, w9
	mov	x1, x19
	mov	w2, #0
	mov	x3, #0
	mov	x4, #0
	mov	w5, #0
	mov	x6, #0
	bl	_ScrollWindowEx
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
	ldr	w0, [x20, #24]
Lloh14:
	adrp	x8, _TRUE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x1, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_InvalidateRect
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[%p]: new horz pos = %d\n"

	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_SW_INVALIDATE,4,2              ; @SW_INVALIDATE
	.comm	_SW_ERASE,4,2                   ; @SW_ERASE
	.comm	_SW_SCROLLCHILDREN,4,2          ; @SW_SCROLLCHILDREN
	.no_dead_strip	_LISTBOX_SetHorizontalPos
.subsections_via_symbols
