	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function coff_res_to_bin
_coff_res_to_bin:                       ## @coff_res_to_bin
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	$32, %edi
	callq	_reswr_alloc
	movq	%rax, %r15
	movl	64(%rbx), %eax
	movl	%eax, 24(%r15)
	movl	4(%rbx), %eax
	addl	(%rbx), %eax
	addl	48(%rbx), %eax
	leaq	48(%rbx), %r12
	movl	%eax, (%r15)
	movq	$0, 16(%r15)
	movl	16(%rbx), %edi
	callq	_WR_BFD
	movq	_BFD_RELOC_RVA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_bfd_reloc_type_lookup
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_bfd_fatal
LBB0_2:
	movq	56(%rbx), %rdi
	movl	8(%rbx), %eax
	leal	16(,%rax,8), %esi
	callq	_xrealloc
	movq	%rax, 56(%rbx)
	movslq	8(%rbx), %rcx
	movq	%r15, (%rax,%rcx,8)
	movq	56(%rbx), %rax
	movq	$0, 8(%rax,%rcx,8)
	incq	%rcx
	movl	%ecx, 8(%rbx)
	movq	%r12, %rdi
	movl	$16, %esi
	callq	_coff_alloc
	movq	%rax, %r15
	movl	4(%rbx), %edx
	movl	16(%rbx), %edi
	movl	12(%rax), %esi
	addl	(%rbx), %edx
	addl	12(%rbx), %edx
	addl	24(%rbx), %edx
	callq	_windres_put_32
	movl	16(%rbx), %edi
	movl	8(%r15), %esi
	movl	(%r14), %edx
	callq	_windres_put_32
	movl	16(%rbx), %edi
	movl	4(%r15), %esi
	movl	4(%r14), %edx
	callq	_windres_put_32
	movl	$24, %edi
	callq	_reswr_alloc
	movq	%rax, %r12
	xorl	%edi, %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_res_to_bin
	movl	%eax, (%r12)
	movq	%r14, 16(%r12)
	movq	$0, 8(%r12)
	cmpq	$0, 40(%rbx)
	je	LBB0_3
## %bb.4:
	movq	32(%rbx), %rcx
	addq	$8, %rcx
	jmp	LBB0_5
LBB0_3:
	leaq	40(%rbx), %rcx
LBB0_5:
	movq	%r12, (%rcx)
	movq	%r12, 32(%rbx)
	movl	%eax, %ecx
	addl	$3, %ecx
	andl	$-4, %ecx
	addl	%ecx, 24(%rbx)
	movl	16(%rbx), %edi
	movl	(%r15), %esi
	movl	%eax, %edx
	callq	_windres_put_32
	movl	(%r12), %eax
	addl	$3, %eax
	andl	$-4, %eax
	movl	%eax, (%r12)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BFD_RELOC_RVA,4,2              ## @BFD_RELOC_RVA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't get BFD_RELOC_RVA relocation type"

	.no_dead_strip	_coff_res_to_bin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function coff_res_to_bin
_coff_res_to_bin:                       ; @coff_res_to_bin
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	mov	w0, #32
	bl	_reswr_alloc
	mov	x22, x0
	ldr	w8, [x19, #64]
	str	w8, [x0, #24]
	mov	x21, x19
	ldr	w8, [x21, #48]!
	ldp	w9, w10, [x19]
	add	w9, w10, w9
	add	w8, w9, w8
	str	w8, [x0]
	str	xzr, [x0, #16]
	ldr	w0, [x19, #16]
	bl	_WR_BFD
Lloh0:
	adrp	x8, _BFD_RELOC_RVA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BFD_RELOC_RVA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_bfd_reloc_type_lookup
	str	x0, [x22, #8]
	cbnz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	bl	_bfd_fatal
LBB0_2:
	ldr	x0, [x19, #56]
	ldr	w8, [x19, #8]
	lsl	w8, w8, #3
	add	w1, w8, #16
	bl	_xrealloc
	str	x0, [x19, #56]
	ldrsw	x8, [x19, #8]
	str	x22, [x0, x8, lsl #3]
	ldr	x9, [x19, #56]
	add	x8, x8, #1
	str	xzr, [x9, x8, lsl #3]
	str	w8, [x19, #8]
	mov	x0, x21
	mov	w1, #16
	bl	_coff_alloc
	mov	x21, x0
	ldr	w1, [x0, #12]
	ldp	w8, w9, [x19]
	ldp	w10, w0, [x19, #12]
	add	w8, w9, w8
	add	w8, w8, w10
	ldr	w9, [x19, #24]
	add	w2, w8, w9
	bl	_windres_put_32
	ldr	w0, [x19, #16]
	ldr	w1, [x21, #8]
	ldr	w2, [x20]
	bl	_windres_put_32
	ldr	w0, [x19, #16]
	ldr	w1, [x21, #4]
	ldr	w2, [x20, #4]
	bl	_windres_put_32
	mov	w0, #24
	bl	_reswr_alloc
	mov	x22, x0
	mov	x0, #0
	mov	w1, #0
	mov	x2, x20
	bl	_res_to_bin
	mov	x2, x0
	str	w0, [x22]
	stp	xzr, x20, [x22, #8]
	mov	x8, x19
	ldr	x9, [x8, #40]!
	cbz	x9, LBB0_4
; %bb.3:
	ldr	x8, [x19, #32]
	add	x8, x8, #8
LBB0_4:
	str	x22, [x8]
	str	x22, [x19, #32]
	add	w8, w2, #3
	and	w8, w8, #0xfffffffc
	ldr	w9, [x19, #24]
	add	w8, w9, w8
	str	w8, [x19, #24]
	ldr	w0, [x19, #16]
	ldr	w1, [x21]
	bl	_windres_put_32
	ldr	w8, [x22]
	add	w8, w8, #3
	and	w8, w8, #0xfffffffc
	str	w8, [x22]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_BFD_RELOC_RVA,4,2              ; @BFD_RELOC_RVA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't get BFD_RELOC_RVA relocation type"

	.no_dead_strip	_coff_res_to_bin
.subsections_via_symbols
