	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_scan                        ## -- Begin function hb_scan
	.p2align	4, 0x90
_hb_scan:                               ## @hb_scan
	.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
                                        ## kill: def $r9d killed $r9d def $r9
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r14d
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_2
LBB0_8:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	testl	%r15d, %r15d
	movl	$10, %r14d
	cmovnsl	%r15d, %r14d
	movq	$0, 16(%r13)
	movq	%r13, %rdi
	callq	_hb_remove_previews
	movl	8(%r13), %edi
	xorl	%esi, %esi
	callq	_hb_list_item
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	leaq	-56(%rbp), %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	8(%r13), %edi
	movq	%rax, %rsi
	callq	_hb_list_rem
	movq	%rbx, %rdi
	callq	_hb_title_close
	movl	8(%r13), %edi
	xorl	%esi, %esi
	callq	_hb_list_item
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	jne	LBB0_10
LBB0_11:
	leaq	16(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rdi
	callq	_free
	movq	$0, (%r13)
	xorl	%eax, %eax
	callq	_hb_get_cpu_name
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_hb_get_cpu_platform_name
	movq	%rax, %rbx
	testq	%r15, %r15
	leaq	L_.str.1(%rip), %rsi
	cmovneq	%r15, %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_hb_log
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_hb_log
LBB0_13:
	xorl	%eax, %eax
	callq	_hb_get_cpu_count
	movslq	%eax, %rsi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_hb_log
	leaq	L_.str.4(%rip), %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_hb_log
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movl	%r12d, %ecx
	movq	%r13, %r8
	movl	%r14d, %r9d
	pushq	-80(%rbp)                       ## 8-byte Folded Reload
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	callq	_hb_scan_init
	addq	$16, %rsp
	movl	%eax, 24(%r13)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	8(%r13), %edi
	callq	_hb_list_count
	testl	%eax, %eax
	jle	LBB0_8
## %bb.3:
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	movl	8(%r13), %edi
	callq	_hb_list_count
	cmpl	%eax, %ebx
	jge	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r13), %edi
	movl	%ebx, %esi
	callq	_hb_list_item
	cmpl	%r12d, (%rax)
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	testl	%r15d, %r15d
	js	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%r15d, 4(%rax)
	jne	LBB0_7
LBB0_14:
	movl	28(%r13), %edi
	callq	_hb_lock
	movq	_HB_STATE_SCANDONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r13)
	movl	28(%r13), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hb_unlock                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HB_STATE_SCANDONE,4,2          ## @HB_STATE_SCANDONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CPU: %s"

L_.str.1:                               ## @.str.1
	.space	1

L_.str.2:                               ## @.str.2
	.asciz	" - %s"

L_.str.3:                               ## @.str.3
	.asciz	" - logical processor count: %d"

L_.str.4:                               ## @.str.4
	.asciz	"hb_scan: path=%s, title_index=%d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hb_scan                        ; -- Begin function hb_scan
	.p2align	2
_hb_scan:                               ; @hb_scan
	.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	x20, x5
	mov	x21, x4
	mov	x24, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x0, [x0]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x1, x23
	bl	_strcmp
	cbz	w0, LBB0_8
LBB0_2:
	mov	w8, #10
	cmp	w24, #0
	csel	w24, w8, w24, lt
	mov	x25, x19
	str	xzr, [x25, #16]!
	mov	x0, x19
	bl	_hb_remove_previews
	ldr	w0, [x19, #8]
	mov	w1, #0
	bl	_hb_list_item
	str	x0, [sp, #8]
	cbz	x0, LBB0_5
; %bb.3:
	mov	x1, x0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #8]
	bl	_hb_list_rem
	add	x0, sp, #8
	bl	_hb_title_close
	ldr	w0, [x19, #8]
	mov	w1, #0
	bl	_hb_list_item
	mov	x1, x0
	str	x0, [sp, #8]
	cbnz	x0, LBB0_4
LBB0_5:
	ldr	x0, [x19]
	bl	_free
	str	xzr, [x19]
	bl	_hb_get_cpu_name
	mov	x27, x0
	bl	_hb_get_cpu_platform_name
	mov	x26, x0
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
	cmp	x27, #0
	csel	x1, x8, x27, eq
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_log
	cbz	x26, LBB0_7
; %bb.6:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x26
	bl	_hb_log
LBB0_7:
	bl	_hb_get_cpu_count
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_hb_log
	str	x22, [sp]
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x23
	bl	_hb_log
	mov	x0, x19
	mov	x1, x25
	mov	x2, x23
	mov	x3, x22
	mov	x4, x19
	mov	x5, x24
	mov	x6, x21
	mov	x7, x20
	bl	_hb_scan_init
	str	w0, [x19, #24]
	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
LBB0_8:
	ldr	w0, [x19, #8]
	bl	_hb_list_count
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.9:
	mov	w25, #0
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w25, w25, #1
	ldr	w0, [x19, #8]
	bl	_hb_list_count
	cmp	w25, w0
	b.ge	LBB0_2
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #8]
	mov	x1, x25
	bl	_hb_list_item
	ldr	w8, [x0]
	cmp	w8, w22
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	tbnz	w24, #31, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x0, #4]
	cmp	w8, w24
	b.ne	LBB0_10
LBB0_14:
	ldr	w0, [x19, #28]
	bl	_hb_lock
Lloh10:
	adrp	x8, _HB_STATE_SCANDONE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HB_STATE_SCANDONE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	ldr	w0, [x19, #28]
	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
	b	_hb_unlock
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_HB_STATE_SCANDONE,4,2          ; @HB_STATE_SCANDONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CPU: %s"

l_.str.1:                               ; @.str.1
	.space	1

l_.str.2:                               ; @.str.2
	.asciz	" - %s"

l_.str.3:                               ; @.str.3
	.asciz	" - logical processor count: %d"

l_.str.4:                               ; @.str.4
	.asciz	"hb_scan: path=%s, title_index=%d"

.subsections_via_symbols
