	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_process_bitmap
_alps_process_bitmap:                   ## @alps_process_bitmap
	.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	$128, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	$0, -88(%rbp)
	movl	$0, -84(%rbp)
	movl	$0, -112(%rbp)
	movq	$0, -120(%rbp)
	movl	$0, -144(%rbp)
	movq	$0, -152(%rbp)
	movl	$0, -96(%rbp)
	movq	$0, -104(%rbp)
	movl	$0, -128(%rbp)
	movq	$0, -136(%rbp)
	movl	20(%rsi), %edi
	xorl	%r15d, %r15d
	testl	%edi, %edi
	je	LBB0_16
## %bb.1:
	movq	%rsi, %r12
	cmpl	$0, 16(%rsi)
	je	LBB0_16
## %bb.2:
	leaq	-120(%rbp), %rsi
	leaq	-152(%rbp), %rdx
	leaq	-88(%rbp), %rcx
	callq	_alps_get_bitmap_points
	movl	16(%r12), %edi
	leaq	-104(%rbp), %rsi
	leaq	-136(%rbp), %rdx
	leaq	-84(%rbp), %rcx
	callq	_alps_get_bitmap_points
	movl	-88(%rbp), %edi
	movl	-84(%rbp), %esi
	callq	_max
	movq	%rax, %r15
	cmpl	$1, -88(%rbp)
	jne	LBB0_4
## %bb.3:
	movl	-120(%rbp), %eax
	leal	-1(%rax), %ecx
	shrl	$31, %ecx
	leal	(%rax,%rcx), %edi
	decl	%edi
	sarl	%edi
	subl	%edi, %eax
	movl	%eax, -120(%rbp)
	movl	-116(%rbp), %eax
	addl	%edi, %eax
	movl	%eax, -148(%rbp)
	movl	$1, %esi
	callq	_max
	movl	%eax, -152(%rbp)
LBB0_4:
	cmpl	$1, -84(%rbp)
	jne	LBB0_5
## %bb.6:
	movl	-104(%rbp), %eax
	leal	-1(%rax), %ecx
	shrl	$31, %ecx
	leal	(%rax,%rcx), %edi
	decl	%edi
	sarl	%edi
	subl	%edi, %eax
	movl	%eax, -104(%rbp)
	movl	-100(%rbp), %eax
	addl	%edi, %eax
	movl	%eax, -132(%rbp)
	movl	$1, %esi
	callq	_max
	movq	%rax, %r8
	movl	%r8d, -136(%rbp)
	jmp	LBB0_7
LBB0_5:
	movl	-136(%rbp), %r8d
LBB0_7:
	movl	(%r14), %ecx
	movl	4(%r14), %esi
	movl	-120(%rbp), %eax
	movl	-116(%rbp), %edx
	leal	(%rax,%rdx,2), %eax
	decl	%eax
	imull	%ecx, %eax
	addl	%esi, %esi
	addl	$-2, %esi
	cltd
	idivl	%esi
	movl	%eax, %r9d
	movl	%eax, -80(%rbp)
	movl	8(%r14), %r10d
	movl	12(%r14), %edx
	movl	-104(%rbp), %eax
	movl	-100(%rbp), %edi
	leal	(%rax,%rdi,2), %eax
	decl	%eax
	imull	%r10d, %eax
	leal	(%rdx,%rdx), %ebx
	addl	$-2, %ebx
	cltd
	idivl	%ebx
	movl	%eax, %edi
	movl	%eax, -76(%rbp)
	movl	-152(%rbp), %eax
	movl	-148(%rbp), %edx
	leal	(%rax,%rdx,2), %eax
	decl	%eax
	imull	%ecx, %eax
	cltd
	idivl	%esi
	movl	%eax, %r11d
	movl	%eax, -72(%rbp)
	movl	%edi, -68(%rbp)
	movl	%eax, -64(%rbp)
	movl	-132(%rbp), %eax
	leal	(%r8,%rax,2), %eax
	decl	%eax
	imull	%r10d, %eax
	cltd
	idivl	%ebx
	movl	%eax, -60(%rbp)
	movl	%r9d, -56(%rbp)
	movl	%eax, -52(%rbp)
	movq	16(%r14), %rdx
	movq	_ALPS_PROTO_V5@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rdx
	jne	LBB0_9
## %bb.8:
	movl	%ecx, %esi
	subl	%r9d, %esi
	movl	%esi, -80(%rbp)
	subl	%r11d, %ecx
	movl	%ecx, -72(%rbp)
	movl	%ecx, -64(%rbp)
	movl	%esi, -56(%rbp)
	movl	%ecx, %r11d
	movl	%esi, %r9d
LBB0_9:
	movq	_ALPS_PROTO_V3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	je	LBB0_12
## %bb.10:
	movq	_ALPS_PROTO_V4@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	je	LBB0_12
## %bb.11:
	movl	%eax, %r10d
	movl	%edi, %ebx
	cmpl	$-1, 24(%r14)
	jne	LBB0_15
	jmp	LBB0_14
LBB0_12:
	movl	%r10d, %ebx
	subl	%edi, %ebx
	movl	%ebx, -76(%rbp)
	movl	%ebx, -68(%rbp)
	subl	%eax, %r10d
	movl	%r10d, -60(%rbp)
	movl	%r10d, -52(%rbp)
	cmpl	$-1, 24(%r14)
	jne	LBB0_15
LBB0_14:
	movl	8(%r12), %esi
	movl	12(%r12), %eax
	movl	%esi, %edi
	subl	%r9d, %edi
	movl	%eax, %edx
	subl	%ebx, %edx
	imull	%edi, %edi
	imull	%edx, %edx
	leal	(%rdx,%rdi), %r8d
	xorl	%ebx, %ebx
	cmpl	$2147483647, %r8d               ## imm = 0x7FFFFFFF
	sete	%bl
	subl	%r11d, %esi
	imull	%esi, %esi
	addl	%esi, %edx
	subl	%r10d, %eax
	imull	%eax, %eax
	leal	(%rax,%rsi), %r9d
	addl	%edi, %eax
	movl	$2, %ecx
	subl	%ebx, %ecx
	cmpl	%edi, %esi
	cmovael	%r8d, %edx
	movl	$3, %esi
	cmovael	%ecx, %esi
	xorl	%ecx, %ecx
	cmpl	%edx, %r9d
	cmovbl	%r9d, %edx
	cmovael	%esi, %ecx
	cmpl	%edx, %eax
	movl	$1, %eax
	cmovael	%ecx, %eax
	movl	%eax, 24(%r14)
LBB0_15:
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	movq	%rcx, (%rax)
	movq	(%r12), %rax
	movslq	24(%r14), %rcx
	movq	-80(%rbp,%rcx,8), %rcx
	movq	%rcx, 8(%rax)
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movl	%r15d, %eax
	addq	$128, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ALPS_PROTO_V5,8,3              ## @ALPS_PROTO_V5
	.comm	_ALPS_PROTO_V3,8,3              ## @ALPS_PROTO_V3
	.comm	_ALPS_PROTO_V4,8,3              ## @ALPS_PROTO_V4
	.no_dead_strip	_alps_process_bitmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alps_process_bitmap
_alps_process_bitmap:                   ; @alps_process_bitmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	str	xzr, [sp, #64]
	str	wzr, [sp, #56]
	str	xzr, [sp, #48]
	str	wzr, [sp, #40]
	str	xzr, [sp, #32]
	str	wzr, [sp, #24]
	str	xzr, [sp, #16]
	str	wzr, [sp, #8]
	str	xzr, [sp]
	ldr	w0, [x1, #20]
	cbz	w0, LBB0_6
; %bb.1:
	mov	x20, x1
	ldr	w8, [x1, #16]
	cbz	w8, LBB0_6
; %bb.2:
	add	x1, sp, #48
	add	x2, sp, #32
	add	x3, sp, #68
	bl	_alps_get_bitmap_points
	ldr	w0, [x20, #16]
	add	x1, sp, #16
	mov	x2, sp
	add	x3, sp, #64
	bl	_alps_get_bitmap_points
	ldp	w1, w0, [sp, #64]
	bl	_max
	mov	x21, x0
	ldr	w8, [sp, #68]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.3:
	ldp	w8, w9, [sp, #48]
	sub	w10, w8, #1
	cmp	w10, #0
	csel	w10, w8, w10, lt
	asr	w0, w10, #1
	sub	w8, w8, w0
	str	w8, [sp, #48]
	add	w8, w9, w0
	str	w8, [sp, #36]
	mov	w1, #1
	bl	_max
	str	w0, [sp, #32]
LBB0_4:
	ldr	w8, [sp, #64]
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.5:
	ldp	w8, w9, [sp, #16]
	sub	w10, w8, #1
	cmp	w10, #0
	csel	w10, w8, w10, lt
	asr	w0, w10, #1
	sub	w8, w8, w0
	str	w8, [sp, #16]
	add	w8, w9, w0
	str	w8, [sp, #4]
	mov	w1, #1
	bl	_max
	str	w0, [sp]
	b	LBB0_8
LBB0_6:
	mov	w21, #0
	b	LBB0_16
LBB0_7:
	ldr	w0, [sp]
LBB0_8:
	ldp	w9, w8, [sp, #48]
	add	w8, w9, w8, lsl #1
	sub	w8, w8, #1
	ldp	w13, w9, [x19]
	mul	w8, w8, w13
	lsl	w9, w9, #1
	sub	w10, w9, #2
	sdiv	w8, w8, w10
	ldp	w11, w9, [sp, #16]
	add	w9, w11, w9, lsl #1
	sub	w9, w9, #1
	ldp	w12, w11, [x19, #8]
	mul	w9, w9, w12
	lsl	w11, w11, #1
	sub	w11, w11, #2
	sdiv	w9, w9, w11
	stp	w8, w9, [sp, #72]
	ldp	w15, w14, [sp, #32]
	add	w14, w15, w14, lsl #1
	sub	w14, w14, #1
	mul	w14, w14, w13
	sdiv	w10, w14, w10
	stp	w10, w9, [sp, #80]
	ldr	w14, [sp, #4]
	add	w14, w0, w14, lsl #1
	sub	w14, w14, #1
	mul	w14, w14, w12
	sdiv	w11, w14, w11
	stp	w10, w11, [sp, #88]
	stp	w8, w11, [sp, #96]
	ldr	x14, [x19, #16]
Lloh3:
	adrp	x15, _ALPS_PROTO_V5@GOTPAGE
Lloh4:
	ldr	x15, [x15, _ALPS_PROTO_V5@GOTPAGEOFF]
Lloh5:
	ldr	x15, [x15]
	cmp	x14, x15
	b.ne	LBB0_10
; %bb.9:
	sub	w8, w13, w8
	sub	w10, w13, w10
	str	w8, [sp, #72]
	str	w10, [sp, #80]
	str	w10, [sp, #88]
	str	w8, [sp, #96]
LBB0_10:
Lloh6:
	adrp	x13, _ALPS_PROTO_V3@GOTPAGE
Lloh7:
	ldr	x13, [x13, _ALPS_PROTO_V3@GOTPAGEOFF]
Lloh8:
	ldr	x13, [x13]
	cmp	x14, x13
	b.eq	LBB0_12
; %bb.11:
Lloh9:
	adrp	x13, _ALPS_PROTO_V4@GOTPAGE
Lloh10:
	ldr	x13, [x13, _ALPS_PROTO_V4@GOTPAGEOFF]
Lloh11:
	ldr	x13, [x13]
	cmp	x14, x13
	b.ne	LBB0_13
LBB0_12:
	sub	w9, w12, w9
	str	w9, [sp, #76]
	str	w9, [sp, #84]
	sub	w11, w12, w11
	str	w11, [sp, #92]
	str	w11, [sp, #100]
LBB0_13:
	ldr	w12, [x19, #24]
	cmn	w12, #1
	b.ne	LBB0_15
; %bb.14:
	ldp	w12, w13, [x20, #8]
	sub	w8, w12, w8
	sub	w9, w13, w9
	mul	w8, w8, w8
	mul	w9, w9, w9
	sub	w10, w12, w10
	mul	w10, w10, w10
	add	w12, w9, w10
	sub	w11, w13, w11
	mov	w13, #2147483647
	add	w9, w9, w8
	cmp	w9, w13
	mov	w13, #1
	cinc	w13, w13, ne
	cmp	w10, w8
	csel	w9, w12, w9, lo
	mul	w11, w11, w11
	mov	w12, #3
	csel	w12, w12, w13, lo
	add	w10, w11, w10
	cmp	w10, w9
	csel	w9, w10, w9, lo
	csel	w10, wzr, w12, lo
	add	w8, w11, w8
	cmp	w8, w9
	csinc	w8, w10, wzr, hs
	str	w8, [x19, #24]
LBB0_15:
	ldp	x8, x9, [x20]
	str	x9, [x8]
	ldr	x8, [x20]
	ldrsw	x9, [x19, #24]
	add	x10, sp, #72
	ldr	x9, [x10, x9, lsl #3]
	str	x9, [x8, #8]
LBB0_16:
	ldur	x8, [x29, #-40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	mov	x0, x21
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ALPS_PROTO_V5,8,3              ; @ALPS_PROTO_V5
	.comm	_ALPS_PROTO_V3,8,3              ; @ALPS_PROTO_V3
	.comm	_ALPS_PROTO_V4,8,3              ; @ALPS_PROTO_V4
	.no_dead_strip	_alps_process_bitmap
.subsections_via_symbols
