	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_res_file                  ## -- Begin function read_res_file
	.p2align	4, 0x90
_read_res_file:                         ## @read_res_file
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_filename@GOTPCREL(%rip), %rbx
	movq	%rdi, (%rbx)
	callq	_get_file_size
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_fatal
LBB0_2:
	movq	(%rbx), %rdi
	movl	$1, %esi
	callq	_windres_open_as_binary
	movq	%rax, %r14
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	callq	_bfd_get_section_by_name
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	callq	_bfd_fatal
LBB0_4:
	movq	_target_is_bigendian@GOTPCREL(%rip), %r13
	cmpq	$0, (%r13)
	jne	LBB0_5
## %bb.6:
	movq	_WR_KIND_BFD_BIN_L@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_WR_KIND_BFD_BIN_B@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %ecx
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_set_windres_bfd
	movq	$0, -56(%rbp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_probe_binary
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	xorl	%esi, %esi
	cmpq	$0, (%r13)
	sete	%sil
	leaq	-44(%rbp), %rdi
	callq	_set_windres_bfd_endianess
LBB0_9:
	leaq	-44(%rbp), %r15
	leaq	-56(%rbp), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_skip_null_resource
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_read_resource_entry
	testq	%rax, %rax
	jne	LBB0_10
## %bb.11:
	movq	%r14, %rdi
	callq	_bfd_close
	movq	_resources@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_filename,8,3                   ## @filename
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't open '%s' for input."

L_.str.1:                               ## @.str.1
	.asciz	".data"

L_.str.2:                               ## @.str.2
	.asciz	"bfd_get_section_by_name"

	.comm	_target_is_bigendian,8,3        ## @target_is_bigendian
	.comm	_WR_KIND_BFD_BIN_B,4,2          ## @WR_KIND_BFD_BIN_B
	.comm	_WR_KIND_BFD_BIN_L,4,2          ## @WR_KIND_BFD_BIN_L
	.comm	_resources,8,3                  ## @resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_res_file                  ; -- Begin function read_res_file
	.p2align	2
_read_res_file:                         ; @read_res_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x20, _filename@GOTPAGE
Lloh1:
	ldr	x20, [x20, _filename@GOTPAGEOFF]
	str	x0, [x20]
	bl	_get_file_size
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	x1, [x20]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal
LBB0_2:
	ldr	x0, [x20]
	mov	w1, #1
	bl	_windres_open_as_binary
	mov	x20, x0
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_bfd_get_section_by_name
	mov	x21, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_bfd_fatal
LBB0_4:
Lloh8:
	adrp	x22, _target_is_bigendian@GOTPAGE
Lloh9:
	ldr	x22, [x22, _target_is_bigendian@GOTPAGEOFF]
Lloh10:
	adrp	x8, _WR_KIND_BFD_BIN_B@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WR_KIND_BFD_BIN_B@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh12:
	adrp	x10, _WR_KIND_BFD_BIN_L@GOTPAGE
Lloh13:
	ldr	x10, [x10, _WR_KIND_BFD_BIN_L@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w3, [x8]
	add	x0, sp, #4
	mov	x1, x20
	mov	x2, x21
	bl	_set_windres_bfd
	str	xzr, [sp, #8]
	add	x0, sp, #4
	mov	x1, x19
	bl	_probe_binary
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	x8, [x22]
	cmp	x8, #0
	cset	w1, eq
	add	x0, sp, #4
	bl	_set_windres_bfd_endianess
LBB0_6:
	add	x0, sp, #4
	add	x1, sp, #8
	mov	x2, x19
	bl	_skip_null_resource
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #4
	add	x1, sp, #8
	mov	x2, x19
	bl	_read_resource_entry
	cbnz	x0, LBB0_7
; %bb.8:
	mov	x0, x20
	bl	_bfd_close
Lloh14:
	adrp	x8, _resources@GOTPAGE
Lloh15:
	ldr	x8, [x8, _resources@GOTPAGEOFF]
Lloh16:
	ldr	x0, [x8]
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_filename,8,3                   ; @filename
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't open '%s' for input."

l_.str.1:                               ; @.str.1
	.asciz	".data"

l_.str.2:                               ; @.str.2
	.asciz	"bfd_get_section_by_name"

	.comm	_target_is_bigendian,8,3        ; @target_is_bigendian
	.comm	_WR_KIND_BFD_BIN_B,4,2          ; @WR_KIND_BFD_BIN_B
	.comm	_WR_KIND_BFD_BIN_L,4,2          ; @WR_KIND_BFD_BIN_L
	.comm	_resources,8,3                  ; @resources
.subsections_via_symbols
