	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_view_count_screens             ## -- Begin function view_count_screens
	.p2align	4, 0x90
_view_count_screens:                    ## @view_count_screens
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rdx
	movl	(%rdi), %eax
	movl	$-1, %r8d
	testl	%eax, %eax
	jle	LBB0_14
## %bb.1:
	xorl	%esi, %esi
	movq	_VIDEO_LAYOUT_C_SCREEN@GOTPCREL(%rip), %rdi
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %eax
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	incq	%rsi
	movslq	%eax, %rcx
	cmpq	%rcx, %rsi
	jge	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_7 Depth 3
	movq	16(%rdx), %rdx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	shlq	$4, %rsi
	movl	(%rdx,%rsi), %ecx
	testl	%ecx, %ecx
	jle	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rdx,%rsi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	(%rdx,%rsi), %rax
	addq	$8, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=2
	incq	%rsi
	movslq	%ecx, %rax
	cmpq	%rax, %rsi
	jge	LBB0_12
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_7 Depth 3
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
	movq	%rsi, %rbx
	shlq	$4, %rbx
	movl	(%rdx,%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	leaq	(%rdx,%rbx), %r13
	leaq	(%rdx,%rbx), %r14
	addq	$8, %r14
	movl	$8, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=3
	incq	%r15
	movslq	%eax, %rcx
	addq	$16, %r12
	cmpq	%rcx, %r15
	jge	LBB0_10
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	(%r14), %rcx
	movq	-8(%rcx,%r12), %rdx
	cmpq	(%rdi), %rdx
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=3
	movl	(%rcx,%r12), %esi
	movq	%rdi, %rbx
	movl	%r8d, %edi
	callq	_MAX
	movq	%rbx, %rdi
	movl	%eax, %r8d
	movl	(%r13), %eax
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_14:
	cmpl	$0, 4(%rdx)
	je	LBB0_16
## %bb.15:
	movq	8(%rdx), %rdi
	movq	%rdx, %r14
	movl	%r8d, %ebx
	callq	_free
	movl	%ebx, %r8d
	movq	%r14, %rdx
	movl	$0, 4(%r14)
LBB0_16:
	incl	%r8d
	je	LBB0_18
## %bb.17:
	movl	%r8d, %edi
	movl	$4, %esi
	movq	%rdx, %r14
	movl	%r8d, %ebx
	callq	_calloc
	movq	%rax, 8(%r14)
	movl	%ebx, 4(%r14)
LBB0_18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIDEO_LAYOUT_C_SCREEN,8,3      ## @VIDEO_LAYOUT_C_SCREEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_view_count_screens             ; -- Begin function view_count_screens
	.p2align	2
_view_count_screens:                    ; @view_count_screens
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x21, #0
	mov	w20, #-1
Lloh0:
	adrp	x22, _VIDEO_LAYOUT_C_SCREEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _VIDEO_LAYOUT_C_SCREEN@GOTPAGEOFF]
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	ldr	w8, [x19]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, sxtw
	b.ge	LBB0_14
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;       Child Loop BB0_11 Depth 3
	ldr	x9, [x19, #16]
	add	x23, x9, x21, lsl #4
	ldr	w9, [x23]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, #0
	add	x25, x23, #8
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
	ldr	w9, [x23]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x24, x24, #1
	cmp	x24, w9, sxtw
	b.ge	LBB0_2
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_11 Depth 3
	ldr	x8, [x25]
	add	x26, x8, x24, lsl #4
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x27, #0
	mov	x28, #0
	add	x19, x26, #8
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=3
	add	x28, x28, #1
	add	x27, x27, #16
	cmp	x28, w8, sxtw
	b.ge	LBB0_6
LBB0_11:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_8 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x9, [x19]
	ldr	x10, [x9, x27]
	ldr	x11, [x22]
	cmp	x10, x11
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=3
	add	x8, x9, x27
	ldr	w1, [x8, #8]
	mov	x0, x20
	bl	_MAX
	mov	x20, x0
	ldr	w8, [x26]
	b	LBB0_10
LBB0_13:
	mov	w20, #-1
LBB0_14:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_16
; %bb.15:
	ldr	x0, [x19, #8]
	bl	_free
	str	wzr, [x19, #4]
LBB0_16:
	adds	w20, w20, #1
	b.hs	LBB0_18
; %bb.17:
	mov	x0, x20
	mov	w1, #4
	bl	_calloc
	str	x0, [x19, #8]
	str	w20, [x19, #4]
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_VIDEO_LAYOUT_C_SCREEN,8,3      ; @VIDEO_LAYOUT_C_SCREEN
.subsections_via_symbols
