	.file	"extr_iso.c_ExtractISOFile.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"  Could not create file %s: %s"
	.align 8
.LC1:
	.string	"Could not locate UDF root directory"
	.align 8
.LC2:
	.string	"Could not locate file %s in ISO image"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"Error reading UDF file %s"
.LC4:
	.string	"  Error writing file %s: %s"
.LC5:
	.string	"Unable to open image '%s'"
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	"Could not get ISO-9660 file information for file %s"
	.align 8
.LC7:
	.string	"  Error reading ISO9660 file %s at LSN %lu"
	.text
	.p2align 4
	.globl	ExtractISOFile
	.type	ExtractISOFile, @function
ExtractISOFile:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	mov	r13, rdi
	push	r12
	push	rbx
	sub	rsp, 88
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	QWORD PTR -112[rbp], rdx
	mov	QWORD PTR -88[rbp], rsi
	mov	rbx, rsp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR UDF_BLOCKSIZE[rip]
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rbx, rax
	and	rdx, -16
	mov	rax, rbx
	cmp	rsp, rax
	je	.L3
.L42:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L42
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L43
.L4:
	mov	rbx, rsp
	sub	rsp, 8
	mov	edx, DWORD PTR FILE_SHARE_READ[rip]
	mov	r9, rcx
	mov	r8d, DWORD PTR CREATE_ALWAYS[rip]
	mov	rdi, QWORD PTR -112[rbp]
	push	0
	xor	ecx, ecx
	mov	esi, DWORD PTR GENERIC_READ[rip]
	or	esi, DWORD PTR GENERIC_WRITE[rip]
	call	CreateFileU@PLT
	mov	r12, rax
	cmp	QWORD PTR INVALID_HANDLE_VALUE[rip], r12
	pop	rax
	pop	rdx
	je	.L44
	mov	rdi, r13
	call	udf_open@PLT
	mov	QWORD PTR -96[rbp], rax
	test	rax, rax
	je	.L45
	mov	rdi, QWORD PTR -96[rbp]
	xor	edx, edx
	mov	esi, 1
	call	udf_get_root@PLT
	mov	QWORD PTR -104[rbp], rax
	test	rax, rax
	je	.L46
	mov	rsi, QWORD PTR -88[rbp]
	mov	rdi, QWORD PTR -104[rbp]
	call	udf_fopen@PLT
	mov	r13, rax
	test	rax, rax
	je	.L47
	mov	rdi, rax
	xor	r14d, r14d
	call	udf_get_file_length@PLT
	mov	r15, rax
	test	rax, rax
	jle	.L13
	lea	rax, -64[rbp]
	mov	QWORD PTR -72[rbp], r14
	mov	QWORD PTR -80[rbp], rax
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rsi, rax
	mov	rdi, r15
	call	MIN@PLT
	mov	rcx, QWORD PTR -80[rbp]
	mov	rsi, rbx
	mov	rdi, r12
	mov	r8d, DWORD PTR WRITE_RETRIES[rip]
	mov	rdx, rax
	call	WriteFileWithRetry@PLT
	test	eax, eax
	je	.L48
	sub	r15, r14
	add	QWORD PTR -72[rbp], r14
	test	r15, r15
	jle	.L49
.L17:
	movsx	rdx, DWORD PTR UDF_BLOCKSIZE[rip]
	xor	esi, esi
	mov	rdi, rbx
	call	memset@PLT
	mov	edx, 1
	mov	rsi, rbx
	mov	rdi, r13
	call	udf_read_block@PLT
	mov	r14, rax
	test	rax, rax
	jns	.L14
	mov	rsi, QWORD PTR -88[rbp]
	lea	rdi, .LC3[rip]
	xor	eax, eax
	mov	r14, QWORD PTR -72[rbp]
	call	uprintf@PLT
	mov	rdi, r12
	call	safe_closehandle@PLT
.L40:
	xor	edi, edi
	call	safe_free@PLT
	mov	rdi, QWORD PTR -104[rbp]
	call	udf_dirent_free@PLT
	mov	rdi, r13
	call	udf_dirent_free@PLT
.L11:
	mov	rdi, QWORD PTR -96[rbp]
	call	udf_close@PLT
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L50
	lea	rsp, -40[rbp]
	mov	rax, r14
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L44:
	.cfi_restore_state
	xor	eax, eax
	call	WindowsErrorString@PLT
	mov	rsi, QWORD PTR -112[rbp]
	lea	rdi, .LC0[rip]
	mov	rdx, rax
	xor	eax, eax
	call	uprintf@PLT
	mov	rdi, r12
	call	safe_closehandle@PLT
	xor	edi, edi
	call	safe_free@PLT
.L6:
	xor	r14d, r14d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L43:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L45:
	mov	rdi, r13
	call	iso9660_open@PLT
	mov	QWORD PTR -72[rbp], rax
	test	rax, rax
	je	.L51
	mov	rsi, QWORD PTR -88[rbp]
	mov	rdi, QWORD PTR -72[rbp]
	call	iso9660_ifs_stat_translate@PLT
	mov	r15, rax
	test	rax, rax
	je	.L18
	xor	r14d, r14d
	lea	rax, -64[rbp]
	cmp	QWORD PTR [r15], 0
	mov	QWORD PTR -128[rbp], 0
	mov	QWORD PTR -120[rbp], rax
	je	.L20
	mov	QWORD PTR -96[rbp], r12
	mov	QWORD PTR -104[rbp], r14
.L19:
	mov	rcx, QWORD PTR -128[rbp]
	lea	rax, 0[0+rcx*8]
	mov	QWORD PTR -80[rbp], rax
	mov	rax, QWORD PTR 8[r15]
	mov	r12, QWORD PTR [rax+rcx*8]
	test	r12, r12
	jle	.L21
	mov	rdx, QWORD PTR ISO_BLOCKSIZE[rip]
	xor	r13d, r13d
	mov	r14, r12
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rdi, r14
	call	MIN@PLT
	mov	rcx, QWORD PTR -120[rbp]
	mov	rdi, QWORD PTR -96[rbp]
	mov	rsi, rbx
	mov	r8d, DWORD PTR WRITE_RETRIES[rip]
	mov	rdx, rax
	call	WriteFileWithRetry@PLT
	test	eax, eax
	je	.L52
	mov	rdx, QWORD PTR ISO_BLOCKSIZE[rip]
	add	r13, 1
	add	QWORD PTR -104[rbp], rdx
	sub	r14, rdx
	test	r14, r14
	jle	.L21
.L24:
	xor	esi, esi
	mov	rdi, rbx
	call	memset@PLT
	mov	rcx, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR 24[r15]
	mov	rsi, rbx
	mov	rdi, QWORD PTR -72[rbp]
	mov	r12, QWORD PTR [rax+rcx]
	mov	ecx, 1
	add	r12, r13
	mov	rdx, r12
	call	iso9660_iso_seek_read@PLT
	cmp	rax, QWORD PTR ISO_BLOCKSIZE[rip]
	mov	rsi, rax
	je	.L22
	mov	rsi, QWORD PTR -88[rbp]
	mov	rdx, r12
	lea	rdi, .LC7[rip]
	xor	eax, eax
	mov	r12, QWORD PTR -96[rbp]
	mov	r14, QWORD PTR -104[rbp]
	call	uprintf@PLT
.L20:
	mov	rdi, r12
	call	safe_closehandle@PLT
	mov	rdi, QWORD PTR 16[r15]
	call	safe_free@PLT
	mov	rdi, r15
	call	safe_free@PLT
	mov	rdi, QWORD PTR -72[rbp]
	call	iso9660_close@PLT
	jmp	.L1
.L18:
	mov	rsi, QWORD PTR -88[rbp]
	lea	rdi, .LC6[rip]
	xor	eax, eax
	call	uprintf@PLT
	mov	rdi, r12
	call	safe_closehandle@PLT
	xor	edi, edi
	call	safe_free@PLT
	mov	rdi, QWORD PTR -72[rbp]
	call	iso9660_close@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L48:
	mov	r14, QWORD PTR -72[rbp]
	call	WindowsErrorString@PLT
	mov	rsi, QWORD PTR -112[rbp]
	lea	rdi, .LC4[rip]
	mov	rdx, rax
	xor	eax, eax
	call	uprintf@PLT
	mov	rdi, r12
	call	safe_closehandle@PLT
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L49:
	mov	r14, QWORD PTR -72[rbp]
.L13:
	mov	rdi, r12
	call	safe_closehandle@PLT
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L46:
	lea	rdi, .LC1[rip]
	xor	r14d, r14d
	call	uprintf@PLT
	mov	rdi, r12
	call	safe_closehandle@PLT
	xor	edi, edi
	call	safe_free@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L47:
	mov	rsi, QWORD PTR -88[rbp]
	lea	rdi, .LC2[rip]
	xor	eax, eax
	xor	r14d, r14d
	call	uprintf@PLT
	mov	rdi, r12
	call	safe_closehandle@PLT
	xor	edi, edi
	call	safe_free@PLT
	mov	rdi, QWORD PTR -104[rbp]
	call	udf_dirent_free@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L21:
	add	QWORD PTR -128[rbp], 1
	mov	rax, QWORD PTR -128[rbp]
	cmp	QWORD PTR [r15], rax
	ja	.L19
	mov	r12, QWORD PTR -96[rbp]
	mov	r14, QWORD PTR -104[rbp]
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L52:
	mov	r12, QWORD PTR -96[rbp]
	mov	r14, QWORD PTR -104[rbp]
	call	WindowsErrorString@PLT
	mov	rsi, QWORD PTR -112[rbp]
	lea	rdi, .LC4[rip]
	mov	rdx, rax
	xor	eax, eax
	call	uprintf@PLT
	jmp	.L20
.L51:
	mov	rsi, r13
	lea	rdi, .LC5[rip]
	xor	eax, eax
	call	uprintf@PLT
	mov	rdi, r12
	call	safe_closehandle@PLT
	xor	edi, edi
	call	safe_free@PLT
	jmp	.L6
.L50:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ExtractISOFile, .-ExtractISOFile
	.comm	WRITE_RETRIES,4,4
	.comm	UDF_BLOCKSIZE,4,4
	.comm	ISO_BLOCKSIZE,8,8
	.comm	INVALID_HANDLE_VALUE,8,8
	.comm	GENERIC_WRITE,4,4
	.comm	GENERIC_READ,4,4
	.comm	FILE_SHARE_READ,4,4
	.comm	CREATE_ALWAYS,4,4
	.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_iso.c_ExtractISOFile.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"  Could not create file %s: %s\000"
	.align	2
.LC1:
	.ascii	"Could not locate UDF root directory\000"
	.align	2
.LC2:
	.ascii	"Could not locate file %s in ISO image\000"
	.align	2
.LC3:
	.ascii	"Error reading UDF file %s\000"
	.align	2
.LC4:
	.ascii	"  Error writing file %s: %s\000"
	.align	2
.LC5:
	.ascii	"Unable to open image '%s'\000"
	.align	2
.LC6:
	.ascii	"Could not get ISO-9660 file information for file %s"
	.ascii	"\000"
	.align	2
.LC7:
	.ascii	"  Error reading ISO9660 file %s at LSN %lu\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ExtractISOFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	ExtractISOFile, %function
ExtractISOFile:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #52
	mov	r9, #0
	mov	ip, r1
	mov	r4, r2
	str	r2, [fp, #-64]
	ldr	r2, .L43
	mov	r6, r0
	ldr	r2, [r2]
	ldr	r0, .L43+4
	add	r2, r2, #7
	ldr	r0, [r0]
	bic	r2, r2, #7
	ldr	lr, .L43+8
	ldr	r1, .L43+12
	sub	sp, sp, r2
	ldr	lr, [lr]
	ldr	r1, [r1]
	stm	sp, {r0, r3, r9}
	ldr	r2, .L43+16
	str	ip, [fp, #-56]
	ldr	ip, .L43+20
	mov	r3, r9
	mov	r0, r4
	ldr	r2, [r2]
	orr	r1, lr, r1
	ldr	ip, [ip]
	str	ip, [fp, #-40]
	mov	ip,#0
	bl	CreateFileU
	ldr	r3, .L43+24
	ldr	r8, [r3]
	cmp	r8, r0
	beq	.L34
	mov	r7, r0
	mov	r0, r6
	bl	udf_open
	subs	r3, r0, #0
	add	r5, sp, #16
	str	r3, [fp, #-48]
	beq	.L35
	mov	r2, r9
	mov	r1, #1
	bl	udf_get_root
	subs	r3, r0, #0
	str	r3, [fp, #-52]
	beq	.L36
	ldr	r1, [fp, #-56]
	bl	udf_fopen
	subs	r8, r0, #0
	beq	.L37
	bl	udf_get_file_length
	subs	r6, r0, #0
	ble	.L10
	ldr	r10, .L43+28
	b	.L14
.L11:
	mov	r1, r4
	mov	r0, r6
	bl	MIN
	ldr	r3, [r10]
	mov	r2, r0
	str	r3, [sp]
	mov	r1, r5
	mov	r0, r7
	sub	r3, fp, #44
	bl	WriteFileWithRetry
	cmp	r0, #0
	beq	.L38
	sub	r6, r6, r4
	cmp	r6, #0
	add	r9, r9, r4
	ble	.L10
.L14:
	ldr	r3, .L43
	mov	r1, #0
	ldr	r2, [r3]
	mov	r0, r5
	bl	memset
	mov	r2, #1
	mov	r1, r5
	mov	r0, r8
	bl	udf_read_block
	subs	r4, r0, #0
	bge	.L11
	ldr	r1, [fp, #-56]
	ldr	r0, .L43+32
	bl	uprintf
	mov	r0, r7
	bl	safe_closehandle
.L32:
	mov	r0, #0
	bl	safe_free
	ldr	r0, [fp, #-52]
	bl	udf_dirent_free
	mov	r0, r8
	bl	udf_dirent_free
.L8:
	ldr	r0, [fp, #-48]
	bl	udf_close
.L1:
	ldr	r3, .L43+20
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L39
	mov	r0, r9
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L34:
	bl	WindowsErrorString
	ldr	r1, [fp, #-64]
	mov	r2, r0
	ldr	r0, .L43+36
	bl	uprintf
	mov	r0, r8
	bl	safe_closehandle
	mov	r0, r9
	bl	safe_free
.L3:
	mov	r9, #0
	b	.L1
.L37:
	ldr	r1, [fp, #-56]
	ldr	r0, .L43+40
	bl	uprintf
	mov	r0, r7
	bl	safe_closehandle
	mov	r0, r8
	bl	safe_free
	ldr	r0, [fp, #-52]
	bl	udf_dirent_free
	mov	r9, r8
	b	.L8
.L35:
	mov	r0, r6
	bl	iso9660_open
	subs	r3, r0, #0
	str	r3, [fp, #-52]
	beq	.L40
	ldr	r1, [fp, #-56]
	bl	iso9660_ifs_stat_translate
	subs	r8, r0, #0
	beq	.L15
	ldr	r3, [r8]
	cmp	r3, #0
	moveq	r9, r3
	beq	.L17
	ldr	r9, [fp, #-48]
	ldr	r10, .L43+44
	str	r9, [fp, #-68]
.L16:
	ldr	r1, [fp, #-68]
	ldr	r2, [r8, #4]
	lsl	r0, r1, #2
	ldr	r4, [r2, r1, lsl #2]
	str	r0, [fp, #-60]
	cmp	r4, #0
	ble	.L18
	mov	r6, #0
	ldr	r2, [r10]
	b	.L21
.L19:
	mov	r0, r4
	bl	MIN
	ldr	r3, .L43+28
	mov	r2, r0
	ldr	r3, [r3]
	mov	r1, r5
	str	r3, [sp]
	mov	r0, r7
	sub	r3, fp, #44
	bl	WriteFileWithRetry
	cmp	r0, #0
	beq	.L41
	ldr	r2, [r10]
	add	r6, r6, #1
	sub	r4, r4, r2
	cmp	r4, #0
	add	r9, r9, r2
	ble	.L42
.L21:
	mov	r1, #0
	mov	r0, r5
	bl	memset
	ldr	r1, [fp, #-60]
	ldr	r2, [r8, #12]
	mov	r3, #1
	ldr	r2, [r2, r1]
	ldr	r0, [fp, #-52]
	add	r2, r6, r2
	mov	r1, r5
	str	r2, [fp, #-48]
	bl	iso9660_iso_seek_read
	ldr	r3, [r10]
	mov	r1, r0
	cmp	r0, r3
	ldr	r2, [fp, #-48]
	beq	.L19
	ldr	r1, [fp, #-56]
	ldr	r0, .L43+48
	bl	uprintf
.L17:
	mov	r0, r7
	bl	safe_closehandle
	ldr	r0, [r8, #8]
	bl	safe_free
	mov	r0, r8
	bl	safe_free
	ldr	r0, [fp, #-52]
	bl	iso9660_close
	b	.L1
.L15:
	ldr	r1, [fp, #-56]
	ldr	r0, .L43+52
	bl	uprintf
	mov	r0, r7
	bl	safe_closehandle
	mov	r0, r8
	bl	safe_free
	ldr	r0, [fp, #-52]
	bl	iso9660_close
	b	.L3
.L38:
	bl	WindowsErrorString
	ldr	r1, [fp, #-64]
	mov	r2, r0
	ldr	r0, .L43+56
	bl	uprintf
	mov	r0, r7
	bl	safe_closehandle
	b	.L32
.L36:
	ldr	r0, .L43+60
	bl	uprintf
	mov	r0, r7
	bl	safe_closehandle
	ldr	r9, [fp, #-52]
	mov	r0, r9
	bl	safe_free
	b	.L8
.L42:
	ldr	r3, [r8]
.L18:
	ldr	r2, [fp, #-68]
	add	r2, r2, #1
	cmp	r3, r2
	str	r2, [fp, #-68]
	bhi	.L16
	b	.L17
.L41:
	bl	WindowsErrorString
	ldr	r1, [fp, #-64]
	mov	r2, r0
	ldr	r0, .L43+56
	bl	uprintf
	b	.L17
.L40:
	mov	r1, r6
	ldr	r0, .L43+64
	bl	uprintf
	mov	r0, r7
	bl	safe_closehandle
	ldr	r0, [fp, #-52]
	bl	safe_free
	b	.L3
.L39:
	bl	__stack_chk_fail
.L10:
	mov	r0, r7
	bl	safe_closehandle
	b	.L32
.L44:
	.align	2
.L43:
	.word	UDF_BLOCKSIZE
	.word	CREATE_ALWAYS
	.word	GENERIC_READ
	.word	GENERIC_WRITE
	.word	FILE_SHARE_READ
	.word	.LC8
	.word	INVALID_HANDLE_VALUE
	.word	WRITE_RETRIES
	.word	.LC3
	.word	.LC0
	.word	.LC2
	.word	ISO_BLOCKSIZE
	.word	.LC7
	.word	.LC6
	.word	.LC4
	.word	.LC1
	.word	.LC5
	.size	ExtractISOFile, .-ExtractISOFile
	.comm	WRITE_RETRIES,4,4
	.comm	UDF_BLOCKSIZE,4,4
	.comm	ISO_BLOCKSIZE,4,4
	.comm	INVALID_HANDLE_VALUE,4,4
	.comm	GENERIC_WRITE,4,4
	.comm	GENERIC_READ,4,4
	.comm	FILE_SHARE_READ,4,4
	.comm	CREATE_ALWAYS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
