	.file	"extr_rescoff.c_read_coff_rsrc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"filename required for COFF input"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	".rsrc"
.LC2:
	.string	"%s: no resource section"
	.text
	.p2align 4
	.globl	read_coff_rsrc
	.type	read_coff_rsrc, @function
read_coff_rsrc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	test	rdi, rdi
	je	.L10
.L2:
	mov	rdi, r14
	call	bfd_openr@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L11
.L3:
	mov	esi, DWORD PTR bfd_object[rip]
	lea	rdx, 24[rsp]
	mov	rdi, rbp
	call	bfd_check_format_matches@PLT
	test	eax, eax
	je	.L12
.L4:
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	bfd_get_section_by_name@PLT
	mov	r13, rax
	test	rax, rax
	je	.L13
.L6:
	mov	ecx, DWORD PTR WR_KIND_BFD[rip]
	lea	r15, 20[rsp]
	mov	rdx, r13
	mov	rsi, rbp
	mov	rdi, r15
	call	set_windres_bfd@PLT
	mov	rsi, r13
	mov	rdi, rbp
	call	bfd_section_size@PLT
	movsx	rbx, eax
	mov	edi, ebx
	call	res_alloc@PLT
	mov	ecx, ebx
	xor	edx, edx
	mov	rdi, r15
	mov	r12, rax
	mov	rsi, rax
	call	get_windres_bfd_content@PLT
	lea	rax, [r12+rbx*4]
	mov	rsi, r13
	mov	rdi, rbp
	mov	QWORD PTR 56[rsp], r12
	mov	QWORD PTR 32[rsp], r14
	mov	QWORD PTR 48[rsp], rax
	call	bfd_get_section_vma@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	pe_data@PLT
	xor	r8d, r8d
	xor	ecx, ecx
	mov	rsi, r12
	sub	rbx, QWORD PTR [rax]
	lea	rdx, 32[rsp]
	mov	rdi, r15
	mov	QWORD PTR 40[rsp], rbx
	call	read_coff_res_dir@PLT
	mov	rdi, rbp
	mov	r12, rax
	call	bfd_close@PLT
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rdi, rbp
	call	bfd_get_filename@PLT
	mov	edi, eax
	call	bfd_nonfatal@PLT
	xor	eax, eax
	call	bfd_get_error@PLT
	cmp	rax, QWORD PTR bfd_error_file_ambiguously_recognized[rip]
	je	.L15
.L5:
	mov	edi, 1
	call	xexit@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, r14
	call	bfd_fatal@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	lea	rdi, .LC2[rip]
	call	_@PLT
	mov	rsi, r14
	mov	edi, eax
	xor	eax, eax
	call	fatal@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rdi, .LC0[rip]
	mov	QWORD PTR 8[rsp], rsi
	call	_@PLT
	mov	edi, eax
	xor	eax, eax
	call	fatal@PLT
	mov	rsi, QWORD PTR 8[rsp]
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdi, QWORD PTR 24[rsp]
	call	list_matching_formats@PLT
	jmp	.L5
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	read_coff_rsrc, .-read_coff_rsrc
	.comm	bfd_object,4,4
	.comm	bfd_error_file_ambiguously_recognized,8,8
	.comm	WR_KIND_BFD,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_rescoff.c_read_coff_rsrc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"filename required for COFF input\000"
	.align	2
.LC1:
	.ascii	".rsrc\000"
	.align	2
.LC2:
	.ascii	"%s: no resource section\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_coff_rsrc
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_coff_rsrc, %function
read_coff_rsrc:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L16
	sub	sp, sp, #48
	subs	r8, r0, #0
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	beq	.L10
.L2:
	mov	r0, r8
	bl	bfd_openr
	subs	r4, r0, #0
	beq	.L11
.L3:
	ldr	r3, .L16+4
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #24
	bl	bfd_check_format_matches
	cmp	r0, #0
	beq	.L12
.L4:
	mov	r0, r4
	ldr	r1, .L16+8
	bl	bfd_get_section_by_name
	subs	r7, r0, #0
	beq	.L13
.L6:
	ldr	r3, .L16+12
	mov	r2, r7
	ldr	r3, [r3]
	mov	r1, r4
	add	r0, sp, #20
	bl	set_windres_bfd
	mov	r1, r7
	mov	r0, r4
	bl	bfd_section_size
	mov	r6, r0
	bl	res_alloc
	mov	r5, r0
	mov	r3, r6
	mov	r2, #0
	mov	r1, r0
	add	r0, sp, #20
	bl	get_windres_bfd_content
	add	r6, r5, r6, lsl #2
	mov	r1, r7
	mov	r0, r4
	str	r6, [sp, #36]
	str	r5, [sp, #40]
	str	r8, [sp, #28]
	bl	bfd_get_section_vma
	mov	r6, r0
	mov	r0, r4
	bl	pe_data
	mov	r3, #0
	ldr	r2, [r0]
	mov	r1, r5
	sub	r6, r6, r2
	str	r3, [sp]
	add	r2, sp, #28
	add	r0, sp, #20
	str	r6, [sp, #32]
	bl	read_coff_res_dir
	mov	r3, r0
	mov	r0, r4
	mov	r4, r3
	bl	bfd_close
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r4
	add	sp, sp, #48
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	mov	r0, r4
	bl	bfd_get_filename
	bl	bfd_nonfatal
	bl	bfd_get_error
	ldr	r3, .L16+16
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L15
.L5:
	mov	r0, #1
	bl	xexit
	b	.L4
.L11:
	mov	r0, r8
	bl	bfd_fatal
	b	.L3
.L13:
	ldr	r0, .L16+20
	bl	_
	mov	r1, r8
	bl	fatal
	b	.L6
.L10:
	ldr	r0, .L16+24
	str	r1, [sp, #12]
	bl	_
	bl	fatal
	ldr	r1, [sp, #12]
	b	.L2
.L15:
	ldr	r0, [sp, #24]
	bl	list_matching_formats
	b	.L5
.L14:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC3
	.word	bfd_object
	.word	.LC1
	.word	WR_KIND_BFD
	.word	bfd_error_file_ambiguously_recognized
	.word	.LC2
	.word	.LC0
	.size	read_coff_rsrc, .-read_coff_rsrc
	.comm	bfd_object,4,4
	.comm	bfd_error_file_ambiguously_recognized,4,4
	.comm	WR_KIND_BFD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
