	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function task_pl_thumbnail_download_handler
_task_pl_thumbnail_download_handler:    ## @task_pl_thumbnail_download_handler
	.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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_13
## %bb.2:
	movq	%rbx, %rdi
	callq	_task_get_cancelled
	testq	%rax, %rax
	jne	LBB0_14
## %bb.3:
	movl	(%r14), %eax
	cmpl	$128, %eax
	je	LBB0_16
## %bb.4:
	cmpl	$129, %eax
	je	LBB0_22
## %bb.5:
	cmpl	$131, %eax
	jne	LBB0_25
## %bb.6:
	movl	36(%r14), %edi
	callq	_path_is_valid
	testl	%eax, %eax
	je	LBB0_14
## %bb.7:
	movl	36(%r14), %edi
	movq	_COLLECTION_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_playlist_init
	movl	%eax, 28(%r14)
	testl	%eax, %eax
	je	LBB0_14
## %bb.8:
	movl	%eax, %edi
	callq	_playlist_size
	movl	%eax, 4(%r14)
	testl	%eax, %eax
	jle	LBB0_14
## %bb.9:
	xorl	%eax, %eax
	callq	_menu_thumbnail_path_init
	movl	%eax, 24(%r14)
	testl	%eax, %eax
	je	LBB0_14
## %bb.10:
	movl	28(%r14), %edx
	movl	32(%r14), %esi
	movl	%eax, %edi
	callq	_menu_thumbnail_set_system
	testl	%eax, %eax
	jne	LBB0_11
	jmp	LBB0_14
LBB0_12:
	xorl	%r14d, %r14d
	jmp	LBB0_15
LBB0_13:
	xorl	%r14d, %r14d
LBB0_14:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_task_set_finished
LBB0_15:
	movq	%r14, %rdi
	movl	$1, %esi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_free_pl_thumb_handle           ## TAILCALL
LBB0_16:
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.17:
	callq	_task_get_finished
	testl	%eax, %eax
	je	LBB0_31
## %bb.18:
	movq	$0, 16(%r14)
LBB0_19:
	cmpl	$4, 12(%r14)
	jl	LBB0_26
## %bb.20:
	movl	8(%r14), %eax
	incl	%eax
	movl	%eax, 8(%r14)
	cmpl	4(%r14), %eax
	jge	LBB0_28
LBB0_11:
	movl	$129, (%r14)
	jmp	LBB0_31
LBB0_22:
	movl	8(%r14), %edx
	movl	24(%r14), %edi
	movl	28(%r14), %esi
	callq	_menu_thumbnail_set_content_playlist
	testl	%eax, %eax
	je	LBB0_27
## %bb.23:
	movq	$0, -24(%rbp)
	movq	%rbx, %rdi
	callq	_task_free_title
	movl	24(%r14), %edi
	leaq	-24(%rbp), %rsi
	callq	_menu_thumbnail_get_label
	testl	%eax, %eax
	je	LBB0_29
## %bb.24:
	movq	-24(%rbp), %rdi
	jmp	LBB0_30
LBB0_25:
	movq	%rbx, %rdi
	movl	$100, %esi
	callq	_task_set_progress
	jmp	LBB0_14
LBB0_26:
	movq	%r14, %rdi
	callq	_download_pl_thumbnail
	incl	12(%r14)
	jmp	LBB0_31
LBB0_27:
	movl	8(%r14), %eax
	incl	%eax
	movl	%eax, 8(%r14)
	cmpl	4(%r14), %eax
	jl	LBB0_31
LBB0_28:
	movl	$130, (%r14)
	jmp	LBB0_31
LBB0_29:
	leaq	L_.str(%rip), %rdi
LBB0_30:
	callq	_strdup
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_task_set_title
	imull	$100, 8(%r14), %eax
	cltd
	idivl	4(%r14)
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_task_set_progress
	movl	$1, 12(%r14)
	movl	$128, (%r14)
LBB0_31:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COLLECTION_SIZE,4,2            ## @COLLECTION_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.no_dead_strip	_task_pl_thumbnail_download_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function task_pl_thumbnail_download_handler
_task_pl_thumbnail_download_handler:    ; @task_pl_thumbnail_download_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	x19, [x0]
	cbz	x19, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_task_get_cancelled
	cbz	x0, LBB0_6
LBB0_3:
	mov	x0, x20
	mov	w1, #1
	bl	_task_set_finished
	b	LBB0_5
LBB0_4:
	mov	x19, #0
LBB0_5:
	mov	x0, x19
	mov	w1, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_free_pl_thumb_handle
LBB0_6:
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_14
; %bb.7:
	cmp	w8, #129
	b.eq	LBB0_20
; %bb.8:
	cmp	w8, #131
	b.ne	LBB0_22
; %bb.9:
	ldr	w0, [x19, #36]
	bl	_path_is_valid
	cbz	w0, LBB0_3
; %bb.10:
	ldr	w0, [x19, #36]
Lloh0:
	adrp	x8, _COLLECTION_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COLLECTION_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_playlist_init
	str	w0, [x19, #28]
	cbz	w0, LBB0_3
; %bb.11:
	bl	_playlist_size
	str	w0, [x19, #4]
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.12:
	bl	_menu_thumbnail_path_init
	str	w0, [x19, #24]
	cbz	w0, LBB0_3
; %bb.13:
	ldp	w2, w1, [x19, #28]
	bl	_menu_thumbnail_set_system
	cbnz	w0, LBB0_19
	b	LBB0_3
LBB0_14:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_17
; %bb.15:
	bl	_task_get_finished
	cbz	w0, LBB0_27
; %bb.16:
	str	xzr, [x19, #16]
LBB0_17:
	ldr	w8, [x19, #12]
	cmp	w8, #4
	b.lt	LBB0_23
; %bb.18:
	ldp	w9, w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #8]
	cmp	w8, w9
	b.ge	LBB0_25
LBB0_19:
	mov	w8, #129
	b	LBB0_26
LBB0_20:
	ldp	w0, w1, [x19, #24]
	ldr	w2, [x19, #8]
	bl	_menu_thumbnail_set_content_playlist
	cbz	w0, LBB0_24
; %bb.21:
	str	xzr, [sp, #8]
	mov	x0, x20
	bl	_task_free_title
	ldr	w0, [x19, #24]
	add	x1, sp, #8
	bl	_menu_thumbnail_get_label
	ldr	x8, [sp, #8]
Lloh3:
	adrp	x9, l_.str@PAGE
Lloh4:
	add	x9, x9, l_.str@PAGEOFF
	cmp	w0, #0
	csel	x0, x9, x8, eq
	bl	_strdup
	mov	x1, x0
	mov	x0, x20
	bl	_task_set_title
	mov	w8, #100
	ldp	w10, w9, [x19, #4]
	mul	w8, w9, w8
	sdiv	w1, w8, w10
	mov	x0, x20
	bl	_task_set_progress
	mov	w8, #1
	str	w8, [x19, #12]
	mov	w8, #128
	b	LBB0_26
LBB0_22:
	mov	x0, x20
	mov	w1, #100
	bl	_task_set_progress
	b	LBB0_3
LBB0_23:
	mov	x0, x19
	bl	_download_pl_thumbnail
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	b	LBB0_27
LBB0_24:
	ldp	w9, w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #8]
	cmp	w8, w9
	b.lt	LBB0_27
LBB0_25:
	mov	w8, #130
LBB0_26:
	str	w8, [x19]
LBB0_27:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_COLLECTION_SIZE,4,2            ; @COLLECTION_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.no_dead_strip	_task_pl_thumbnail_download_handler
.subsections_via_symbols
