	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ghb_do_scan                    ## -- Begin function ghb_do_scan
	.p2align	4, 0x90
_ghb_do_scan:                           ## @ghb_do_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	callq	_g_debug
	movq	_last_scan_file@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	testl	%ebx, %ebx
	jne	LBB0_6
## %bb.1:
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.2:
	movq	%r12, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	(%r13), %rdi
LBB0_6:
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_g_free
LBB0_8:
	movq	$0, (%r13)
	testq	%r12, %r12
	je	LBB0_11
## %bb.9:
	movq	%r12, %rdi
	callq	_g_strdup
	movq	%rax, (%r13)
	movl	8(%r15), %edi
	leaq	L_.str.2(%rip), %rbx
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_ghb_dict_set_string
	movq	%r15, %rdi
	callq	_show_scan_progress
	movl	8(%r15), %edi
	movq	%rbx, %rsi
	callq	_ghb_dict_get_string
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_prune_logs
	movq	(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_ghb_dict_get_int
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_start_scan                     ## TAILCALL
LBB0_3:
	movq	_ghb_queue_edit_settings@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	callq	_ghb_dict_get_int
	leaq	-44(%rbp), %rsi
	movl	%eax, %edi
	callq	_ghb_lookup_title
	movl	24(%r15), %edi
	movl	-44(%rbp), %esi
	movq	(%rbx), %rdx
	callq	_ghb_array_replace
	movq	(%rbx), %rax
	movq	%rax, 16(%r15)
	movq	%r15, %rdi
	callq	_ghb_load_settings
	movq	$0, (%rbx)
	jmp	LBB0_11
LBB0_10:
	leaq	-44(%rbp), %rsi
	movl	%r14d, %edi
	callq	_ghb_lookup_title
	movl	-44(%rbp), %esi
	movq	%r15, %rdi
	callq	_load_all_titles
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ghb_do_scan()"

	.comm	_last_scan_file,8,3             ## @last_scan_file
	.comm	_ghb_queue_edit_settings,8,3    ## @ghb_queue_edit_settings
L_.str.1:                               ## @.str.1
	.asciz	"title"

L_.str.2:                               ## @.str.2
	.asciz	"scan_source"

L_.str.3:                               ## @.str.3
	.asciz	"preview_count"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ghb_do_scan                    ; -- Begin function ghb_do_scan
	.p2align	2
_ghb_do_scan:                           ; @ghb_do_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_g_debug
Lloh2:
	adrp	x23, _last_scan_file@GOTPAGE
Lloh3:
	ldr	x23, [x23, _last_scan_file@GOTPAGEOFF]
	ldr	x0, [x23]
	cbnz	w22, LBB0_4
; %bb.1:
	cbz	x0, LBB0_4
; %bb.2:
	mov	x1, x21
	bl	_strcmp
	cbz	x0, LBB0_8
; %bb.3:
	ldr	x0, [x23]
LBB0_4:
	cbz	x0, LBB0_6
; %bb.5:
	bl	_g_free
LBB0_6:
	str	xzr, [x23]
	cbz	x21, LBB0_11
; %bb.7:
	mov	x0, x21
	bl	_g_strdup
	str	x0, [x23]
	ldr	w0, [x19, #8]
Lloh4:
	adrp	x22, l_.str.2@PAGE
Lloh5:
	add	x22, x22, l_.str.2@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	bl	_ghb_dict_set_string
	mov	x0, x19
	bl	_show_scan_progress
	ldr	w0, [x19, #8]
	mov	x1, x22
	bl	_ghb_dict_get_string
	mov	x21, x0
	mov	x0, x19
	bl	_prune_logs
	ldr	x0, [x19]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_ghb_dict_get_int
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_start_scan
LBB0_8:
Lloh8:
	adrp	x21, _ghb_queue_edit_settings@GOTPAGE
Lloh9:
	ldr	x21, [x21, _ghb_queue_edit_settings@GOTPAGEOFF]
	ldr	x0, [x21]
	cbz	x0, LBB0_10
; %bb.9:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ghb_dict_get_int
	add	x1, sp, #12
	bl	_ghb_lookup_title
	ldr	w0, [x19, #24]
	ldr	w1, [sp, #12]
	ldr	x2, [x21]
	bl	_ghb_array_replace
	ldr	x8, [x21]
	str	x8, [x19, #16]
	mov	x0, x19
	bl	_ghb_load_settings
	str	xzr, [x21]
	b	LBB0_11
LBB0_10:
	add	x1, sp, #12
	mov	x0, x20
	bl	_ghb_lookup_title
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_load_all_titles
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ghb_do_scan()"

	.comm	_last_scan_file,8,3             ; @last_scan_file
	.comm	_ghb_queue_edit_settings,8,3    ; @ghb_queue_edit_settings
l_.str.1:                               ; @.str.1
	.asciz	"title"

l_.str.2:                               ; @.str.2
	.asciz	"scan_source"

l_.str.3:                               ; @.str.3
	.asciz	"preview_count"

.subsections_via_symbols
