	.file	"extr_package.c_msi_download_file.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"failed to download %s to cache file\n"
	.text
	.p2align 4
	.globl	msi_download_file
	.type	msi_download_file, @function
msi_download_file:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, esi
	xor	esi, esi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, edi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	r13, 4[rsp]
	mov	DWORD PTR 4[rsp], 0
	mov	rdx, r13
	call	GetUrlCacheEntryInfoW@PLT
	xor	eax, eax
	call	GetLastError@PLT
	cmp	rax, QWORD PTR ERROR_FILE_NOT_FOUND[rip]
	je	.L2
	mov	edi, DWORD PTR 4[rsp]
	call	msi_alloc@PLT
	mov	rdx, r13
	mov	edi, ebp
	mov	rsi, rax
	mov	r12, rax
	call	GetUrlCacheEntryInfoW@PLT
	test	eax, eax
	je	.L10
	mov	esi, DWORD PTR [r12]
	mov	edi, r14d
	call	lstrcpyW@PLT
	mov	rdi, r12
	call	msi_free@PLT
	mov	r13, QWORD PTR ERROR_SUCCESS[rip]
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r13
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	call	GetLastError@PLT
	mov	rdi, r12
	mov	r13, rax
	call	msi_free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	ecx, DWORD PTR MAX_PATH[rip]
	xor	r9d, r9d
	xor	r8d, r8d
	mov	edx, r14d
	mov	esi, ebp
	xor	edi, edi
	call	URLDownloadToCacheFileW@PLT
	mov	edi, eax
	call	FAILED@PLT
	mov	r13, QWORD PTR ERROR_SUCCESS[rip]
	test	rax, rax
	je	.L1
	mov	edi, ebp
	call	debugstr_w@PLT
	lea	rdi, .LC0[rip]
	mov	esi, eax
	call	WARN@PLT
	mov	r13, QWORD PTR ERROR_FUNCTION_FAILED[rip]
	jmp	.L1
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	msi_download_file, .-msi_download_file
	.comm	MAX_PATH,4,4
	.comm	ERROR_SUCCESS,8,8
	.comm	ERROR_FUNCTION_FAILED,8,8
	.comm	ERROR_FILE_NOT_FOUND,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_package.c_msi_download_file.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to download %s to cache file\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	msi_download_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	msi_download_file, %function
msi_download_file:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, #0
	sub	sp, sp, #16
	ldr	r3, .L12
	add	r2, sp, #8
	mov	r6, r1
	mov	r1, r5
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r4, r0
	str	r5, [sp, #8]
	bl	GetUrlCacheEntryInfoW
	bl	GetLastError
	ldr	r3, .L12+4
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L2
	ldr	r0, [sp, #8]
	bl	msi_alloc
	mov	r5, r0
	add	r2, sp, #8
	mov	r0, r4
	mov	r1, r5
	bl	GetUrlCacheEntryInfoW
	cmp	r0, #0
	beq	.L9
	ldr	r1, [r5]
	mov	r0, r6
	bl	lstrcpyW
	mov	r0, r5
	bl	msi_free
	ldr	r3, .L12+8
	ldr	r4, [r3]
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	mov	r0, r4
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L9:
	bl	GetLastError
	mov	r4, r0
	mov	r0, r5
	bl	msi_free
	b	.L1
.L2:
	ldr	r3, .L12+12
	str	r5, [sp, #4]
	str	r5, [sp]
	mov	r2, r6
	mov	r1, r4
	ldr	r3, [r3]
	mov	r0, r5
	bl	URLDownloadToCacheFileW
	bl	FAILED
	cmp	r0, #0
	ldreq	r3, .L12+8
	ldreq	r4, [r3]
	beq	.L1
.L11:
	mov	r0, r4
	bl	debugstr_w
	mov	r1, r0
	ldr	r0, .L12+16
	bl	WARN
	ldr	r3, .L12+20
	ldr	r4, [r3]
	b	.L1
.L10:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC1
	.word	ERROR_FILE_NOT_FOUND
	.word	ERROR_SUCCESS
	.word	MAX_PATH
	.word	.LC0
	.word	ERROR_FUNCTION_FAILED
	.size	msi_download_file, .-msi_download_file
	.comm	MAX_PATH,4,4
	.comm	ERROR_SUCCESS,4,4
	.comm	ERROR_FUNCTION_FAILED,4,4
	.comm	ERROR_FILE_NOT_FOUND,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
