	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function download_pl_thumbnail
_download_pl_thumbnail:                 ## @download_pl_thumbnail
	.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	%r12
	pushq	%rbx
	subq	$2064, %rsp                     ## imm = 0x810
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movb	$0, (%r12)
	movb	$0, -2096(%rbp)
	leaq	-2096(%rbp), %rcx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	movl	$2048, %r8d                     ## imm = 0x800
	callq	_get_thumbnail_paths
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%r12, %rdi
	callq	_path_is_valid
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	cmpq	$0, 8(%r14)
	je	LBB0_5
LBB0_3:
	movl	$1, %edi
	movl	$8, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %r15
	movq	_MENU_ENUM_LABEL_CB_SINGLE_THUMBNAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movl	(%r15), %edi
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_strlcpy
	movq	_cb_generic_download@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-2096(%rbp), %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	movq	%r15, %r8
	callq	_task_push_http_transfer
	movq	%rax, (%r14)
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ## @PATH_MAX_LENGTH
	.comm	_MENU_ENUM_LABEL_CB_SINGLE_THUMBNAIL,4,2 ## @MENU_ENUM_LABEL_CB_SINGLE_THUMBNAIL
	.comm	_cb_generic_download,4,2        ## @cb_generic_download
	.no_dead_strip	_download_pl_thumbnail
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function download_pl_thumbnail
_download_pl_thumbnail:                 ; @download_pl_thumbnail
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #2064
	mov	x19, sp
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _PATH_MAX_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PATH_MAX_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x9, x2
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
	strb	wzr, [x21]
	strb	wzr, [x19, #8]
	add	x3, x19, #8
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	w4, #2048
	bl	_get_thumbnail_paths
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x21
	bl	_path_is_valid
	cbz	w0, LBB0_3
; %bb.2:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
LBB0_3:
	mov	w0, #1
	mov	w1, #8
	bl	_calloc
	cbz	x0, LBB0_5
; %bb.4:
	mov	x22, x0
Lloh8:
	adrp	x8, _MENU_ENUM_LABEL_CB_SINGLE_THUMBNAIL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MENU_ENUM_LABEL_CB_SINGLE_THUMBNAIL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x0, #4]
	ldr	w0, [x0]
	mov	x1, x21
	mov	w2, #4
	bl	_strlcpy
Lloh11:
	adrp	x8, _cb_generic_download@GOTPAGE
Lloh12:
	ldr	x8, [x8, _cb_generic_download@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	add	x0, x19, #8
	mov	w1, #1
	mov	x2, #0
	mov	x4, x22
	bl	_task_push_http_transfer
	str	x0, [x20]
LBB0_5:
	ldur	x8, [x29, #-56]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ; @PATH_MAX_LENGTH
	.comm	_MENU_ENUM_LABEL_CB_SINGLE_THUMBNAIL,4,2 ; @MENU_ENUM_LABEL_CB_SINGLE_THUMBNAIL
	.comm	_cb_generic_download,4,2        ; @cb_generic_download
	.no_dead_strip	_download_pl_thumbnail
.subsections_via_symbols
