	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PAGER_Scroll
_PAGER_Scroll:                          ## @PAGER_Scroll
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$96, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpq	$0, 32(%rdi)
	je	LBB0_11
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	-80(%rbp), %rdi
	movl	$56, %esi
	callq	_ZeroMemory
	movl	24(%rbx), %edi
	movl	%edi, -48(%rbp)
	movq	_GWLP_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetWindowLongPtrW
	movl	%eax, -56(%rbp)
	movq	_PGN_SCROLL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movl	24(%rbx), %edi
	leaq	-112(%rbp), %rsi
	callq	_GetWindowRect
	movl	24(%rbx), %edi
	leaq	-32(%rbp), %rsi
	callq	_GetClientRect
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	%r14, -40(%rbp)
	movq	_PGS_HORZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_3
## %bb.2:
	movq	-112(%rbp), %rax
	subq	-104(%rbp), %rax
	movq	8(%rbx), %rcx
	movq	%rcx, -80(%rbp)
	jmp	LBB0_4
LBB0_3:
	movq	-96(%rbp), %rax
	subq	-88(%rbp), %rax
	movq	8(%rbx), %rcx
	movq	%rcx, -72(%rbp)
LBB0_4:
	movslq	16(%rbx), %rcx
	addq	%rcx, %rcx
	subq	%rcx, %rax
	movq	%rax, -64(%rbp)
	movl	28(%rbx), %edi
	movq	_WM_NOTIFY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-56(%rbp), %edx
	leaq	-80(%rbp), %rcx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_SendMessageW
	movl	24(%rbx), %esi
	movq	-64(%rbp), %rdx
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	movq	-64(%rbp), %rax
	testq	%rax, %rax
	jle	LBB0_10
## %bb.5:
	movl	%r14d, 20(%rbx)
	movq	_PGF_SCROLLLEFT@GOTPCREL(%rip), %rcx
	movq	8(%rbx), %rsi
	cmpq	%r14, (%rcx)
	je	LBB0_7
## %bb.6:
	movq	_PGF_SCROLLUP@GOTPCREL(%rip), %rcx
	cmpq	%r14, (%rcx)
	je	LBB0_7
## %bb.9:
	addq	%rax, %rsi
	jmp	LBB0_8
LBB0_10:
	movl	$-1, 20(%rbx)
	jmp	LBB0_11
LBB0_7:
	subq	%rax, %rsi
LBB0_8:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%ecx, %edx
	callq	_PAGER_SetPos
LBB0_11:
	addq	$96, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GWLP_ID,4,2                    ## @GWLP_ID
	.comm	_PGN_SCROLL,4,2                 ## @PGN_SCROLL
	.comm	_PGS_HORZ,4,2                   ## @PGS_HORZ
	.comm	_WM_NOTIFY,4,2                  ## @WM_NOTIFY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[%p] PGN_SCROLL returns iScroll=%d\n"

	.comm	_PGF_SCROLLLEFT,8,3             ## @PGF_SCROLLLEFT
	.comm	_PGF_SCROLLUP,8,3               ## @PGF_SCROLLUP
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_PAGER_Scroll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PAGER_Scroll
_PAGER_Scroll:                          ; @PAGER_Scroll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_11
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	add	x21, sp, #40
	add	x0, sp, #40
	mov	w1, #56
	bl	_ZeroMemory
	ldr	w0, [x19, #24]
	str	w0, [sp, #72]
Lloh0:
	adrp	x8, _GWLP_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GWLP_ID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_GetWindowLongPtrW
Lloh3:
	adrp	x8, _PGN_SCROLL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PGN_SCROLL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	stp	w0, w8, [sp, #64]
	ldr	w0, [x19, #24]
	add	x1, sp, #8
	bl	_GetWindowRect
	ldr	w0, [x19, #24]
	add	x1, x21, #48
	bl	_GetClientRect
	stp	xzr, xzr, [sp, #40]
	str	x20, [sp, #80]
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _PGS_HORZ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PGS_HORZ@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldp	x8, x9, [sp, #8]
	sub	x8, x8, x9
	ldr	x9, [x19, #8]
	str	x9, [sp, #40]
	b	LBB0_4
LBB0_3:
	ldp	x8, x9, [sp, #24]
	sub	x8, x8, x9
	ldr	x9, [x19, #8]
	str	x9, [sp, #48]
LBB0_4:
	ldrsw	x9, [x19, #16]
	sub	x8, x8, x9, lsl #1
	str	x8, [sp, #56]
	ldr	w0, [x19, #28]
Lloh9:
	adrp	x8, _WM_NOTIFY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WM_NOTIFY@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [sp, #64]
	add	x3, sp, #40
	bl	_SendMessageW
	ldr	w1, [x19, #24]
	ldr	x2, [sp, #56]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	ldr	x8, [sp, #56]
	cmp	x8, #1
	b.lt	LBB0_8
; %bb.5:
	str	w20, [x19, #20]
Lloh14:
	adrp	x9, _PGF_SCROLLLEFT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PGF_SCROLLLEFT@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x9]
	ldr	x9, [x19, #8]
	cmp	x10, x20
	b.eq	LBB0_9
; %bb.6:
Lloh17:
	adrp	x10, _PGF_SCROLLUP@GOTPAGE
Lloh18:
	ldr	x10, [x10, _PGF_SCROLLUP@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	cmp	x10, x20
	b.eq	LBB0_9
; %bb.7:
	add	x1, x9, x8
	b	LBB0_10
LBB0_8:
	mov	w8, #-1
	str	w8, [x19, #20]
	b	LBB0_11
LBB0_9:
	sub	x1, x9, x8
LBB0_10:
Lloh20:
	adrp	x8, _TRUE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	bl	_PAGER_SetPos
LBB0_11:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GWLP_ID,4,2                    ; @GWLP_ID
	.comm	_PGN_SCROLL,4,2                 ; @PGN_SCROLL
	.comm	_PGS_HORZ,4,2                   ; @PGS_HORZ
	.comm	_WM_NOTIFY,4,2                  ; @WM_NOTIFY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[%p] PGN_SCROLL returns iScroll=%d\n"

	.comm	_PGF_SCROLLLEFT,8,3             ; @PGF_SCROLLLEFT
	.comm	_PGF_SCROLLUP,8,3               ; @PGF_SCROLLUP
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_PAGER_Scroll
.subsections_via_symbols
