	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function task_pl_entry_thumbnail_download_handler
_task_pl_entry_thumbnail_download_handler: ## @task_pl_entry_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	%r15
	pushq	%r14
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_24
## %bb.2:
	movq	%rbx, %rdi
	callq	_task_get_cancelled
	testq	%rax, %rax
	je	LBB0_3
LBB0_24:
	movq	%rbx, %rdi
	movl	$1, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_task_set_finished              ## TAILCALL
LBB0_3:
	movl	(%r14), %eax
	cmpl	$128, %eax
	je	LBB0_18
## %bb.4:
	cmpl	$130, %eax
	jne	LBB0_23
## %bb.5:
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	xorl	%eax, %eax
	callq	_menu_thumbnail_path_init
	movl	%eax, 24(%r14)
	testl	%eax, %eax
	je	LBB0_24
## %bb.6:
	movl	32(%r14), %edx
	movl	36(%r14), %esi
	movl	%eax, %edi
	callq	_menu_thumbnail_set_system
	testl	%eax, %eax
	je	LBB0_24
## %bb.7:
	movl	32(%r14), %esi
	movl	24(%r14), %edi
	movl	28(%r14), %edx
	callq	_menu_thumbnail_set_content_playlist
	testl	%eax, %eax
	je	LBB0_24
## %bb.8:
	movl	$0, 4(%r14)
	movl	24(%r14), %edi
	movq	_MENU_THUMBNAIL_RIGHT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_menu_thumbnail_update_path
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	24(%r14), %edi
	movl	(%r15), %esi
	leaq	-40(%rbp), %rdx
	callq	_menu_thumbnail_get_path
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movq	-40(%rbp), %rdi
	callq	_path_is_valid
	movl	%eax, 4(%r14)
LBB0_11:
	movl	$0, 8(%r14)
	movl	24(%r14), %edi
	movq	_MENU_THUMBNAIL_LEFT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_menu_thumbnail_update_path
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	movl	24(%r14), %edi
	movl	(%r15), %esi
	leaq	-32(%rbp), %rdx
	callq	_menu_thumbnail_get_path
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movq	-32(%rbp), %rdi
	callq	_path_is_valid
	movl	%eax, 8(%r14)
LBB0_14:
	movq	%rbx, %rdi
	callq	_task_free_title
	movl	24(%r14), %edi
	leaq	-48(%rbp), %rsi
	callq	_menu_thumbnail_get_label
	testl	%eax, %eax
	je	LBB0_15
## %bb.16:
	movq	-48(%rbp), %rdi
	jmp	LBB0_17
LBB0_18:
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.19:
	callq	_task_get_finished
	testl	%eax, %eax
	je	LBB0_26
## %bb.20:
	movq	$0, 16(%r14)
LBB0_21:
	movl	12(%r14), %eax
	cmpl	$4, %eax
	jl	LBB0_25
## %bb.22:
	movl	$129, (%r14)
	jmp	LBB0_26
LBB0_23:
	movq	%rbx, %rdi
	movl	$100, %esi
	callq	_task_set_progress
	jmp	LBB0_24
LBB0_25:
	imull	$100, %eax, %eax
	addl	$-100, %eax
	cltq
	imulq	$1431655766, %rax, %rsi         ## imm = 0x55555556
	movq	%rsi, %rax
	shrq	$63, %rax
	shrq	$32, %rsi
	addl	%eax, %esi
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_task_set_progress
	movq	%r14, %rdi
	callq	_download_pl_thumbnail
	incl	12(%r14)
	jmp	LBB0_26
LBB0_15:
	leaq	L_.str(%rip), %rdi
LBB0_17:
	callq	_strdup
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_task_set_title
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_task_set_progress
	movl	$128, (%r14)
LBB0_26:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MENU_THUMBNAIL_RIGHT,4,2       ## @MENU_THUMBNAIL_RIGHT
	.comm	_MENU_THUMBNAIL_LEFT,4,2        ## @MENU_THUMBNAIL_LEFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.no_dead_strip	_task_pl_entry_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_entry_thumbnail_download_handler
_task_pl_entry_thumbnail_download_handler: ; @task_pl_entry_thumbnail_download_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	cbz	x0, LBB0_23
; %bb.1:
	mov	x20, x0
	ldr	x19, [x0]
	cbz	x19, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_task_get_cancelled
	cbz	x0, LBB0_4
LBB0_3:
	mov	x0, x20
	mov	w1, #1
	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
	add	sp, sp, #80
	b	_task_set_finished
LBB0_4:
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_16
; %bb.5:
	cmp	w8, #130
	b.ne	LBB0_21
; %bb.6:
	stp	xzr, xzr, [sp, #16]
	str	xzr, [sp, #8]
	bl	_menu_thumbnail_path_init
	str	w0, [x19, #24]
	cbz	w0, LBB0_3
; %bb.7:
	ldp	w2, w1, [x19, #32]
	bl	_menu_thumbnail_set_system
	cbz	w0, LBB0_3
; %bb.8:
	ldp	w2, w1, [x19, #28]
	ldr	w0, [x19, #24]
	bl	_menu_thumbnail_set_content_playlist
	cbz	w0, LBB0_3
; %bb.9:
	str	wzr, [x19, #4]
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x21, _MENU_THUMBNAIL_RIGHT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MENU_THUMBNAIL_RIGHT@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_menu_thumbnail_update_path
	cbz	w0, LBB0_12
; %bb.10:
	ldr	w0, [x19, #24]
	ldr	w1, [x21]
	add	x2, sp, #16
	bl	_menu_thumbnail_get_path
	cbz	w0, LBB0_12
; %bb.11:
	ldr	x0, [sp, #16]
	bl	_path_is_valid
	str	w0, [x19, #4]
LBB0_12:
	str	wzr, [x19, #8]
	ldr	w0, [x19, #24]
Lloh2:
	adrp	x21, _MENU_THUMBNAIL_LEFT@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MENU_THUMBNAIL_LEFT@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_menu_thumbnail_update_path
	cbz	w0, LBB0_15
; %bb.13:
	ldr	w0, [x19, #24]
	ldr	w1, [x21]
	add	x2, sp, #8
	bl	_menu_thumbnail_get_path
	cbz	w0, LBB0_15
; %bb.14:
	ldr	x0, [sp, #8]
	bl	_path_is_valid
	str	w0, [x19, #8]
LBB0_15:
	mov	x0, x20
	bl	_task_free_title
	ldr	w0, [x19, #24]
	add	x1, sp, #24
	bl	_menu_thumbnail_get_label
	ldr	x8, [sp, #24]
Lloh4:
	adrp	x9, l_.str@PAGE
Lloh5:
	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	x0, x20
	mov	w1, #0
	bl	_task_set_progress
	mov	w8, #128
	str	w8, [x19]
	b	LBB0_23
LBB0_16:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_19
; %bb.17:
	bl	_task_get_finished
	cbz	w0, LBB0_23
; %bb.18:
	str	xzr, [x19, #16]
LBB0_19:
	ldr	w8, [x19, #12]
	cmp	w8, #4
	b.lt	LBB0_22
; %bb.20:
	mov	w8, #129
	str	w8, [x19]
	b	LBB0_23
LBB0_21:
	mov	x0, x20
	mov	w1, #100
	bl	_task_set_progress
	b	LBB0_3
LBB0_22:
	mov	w9, #100
	mul	w8, w8, w9
	sub	w8, w8, #100
	mov	w9, #21846
	movk	w9, #21845, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w1, w8, w9
	mov	x0, x20
	bl	_task_set_progress
	mov	x0, x19
	bl	_download_pl_thumbnail
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
LBB0_23:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MENU_THUMBNAIL_RIGHT,4,2       ; @MENU_THUMBNAIL_RIGHT
	.comm	_MENU_THUMBNAIL_LEFT,4,2        ; @MENU_THUMBNAIL_LEFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.no_dead_strip	_task_pl_entry_thumbnail_download_handler
.subsections_via_symbols
