	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_archive
_write_archive:                         ## @write_archive
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_bfd_get_filename
	movl	%eax, %edi
	callq	_strlen
	leaq	1(%rax), %rdi
	callq	_xmalloc
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_bfd_get_filename
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_strcpy
	movq	%r14, %rdi
	callq	_make_tempname
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_bfd_fatal
LBB0_2:
	movq	_output_filename@GOTPCREL(%rip), %rax
	movq	%r13, (%rax)
	movq	%r15, %rdi
	callq	_bfd_get_target
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_bfd_openw
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_bfd_fatal
LBB0_4:
	movq	_output_bfd@GOTPCREL(%rip), %r12
	movq	%rbx, (%r12)
	movq	_bfd_archive@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bfd_set_format
	movq	_write_armap@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, (%rbx)
	movq	_ar_truncate@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_BFD_TRADITIONAL_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
LBB0_6:
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_bfd_set_archive_head
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_bfd_fatal
LBB0_8:
	movq	%rbx, %rdi
	callq	_bfd_close
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	callq	_bfd_fatal
LBB0_10:
	movq	$0, (%r12)
	movq	_output_filename@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	%r15, %rdi
	callq	_bfd_close
	movq	%r13, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_smart_rename
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movl	$1, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xexit                          ## TAILCALL
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not create temporary file whilst writing archive"

	.comm	_output_filename,8,3            ## @output_filename
	.comm	_output_bfd,8,3                 ## @output_bfd
	.comm	_bfd_archive,4,2                ## @bfd_archive
	.comm	_write_armap,8,3                ## @write_armap
	.comm	_ar_truncate,8,3                ## @ar_truncate
	.comm	_BFD_TRADITIONAL_FORMAT,4,2     ## @BFD_TRADITIONAL_FORMAT
	.no_dead_strip	_write_archive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_archive
_write_archive:                         ; @write_archive
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x22, [x0, #8]
	bl	_bfd_get_filename
	bl	_strlen
	add	x0, x0, #1
	bl	_xmalloc
	mov	x20, x0
	mov	x0, x19
	bl	_bfd_get_filename
	mov	x1, x0
	mov	x0, x20
	bl	_strcpy
	mov	x0, x20
	bl	_make_tempname
	mov	x21, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_bfd_fatal
LBB0_2:
Lloh2:
	adrp	x24, _output_filename@GOTPAGE
Lloh3:
	ldr	x24, [x24, _output_filename@GOTPAGEOFF]
	str	x21, [x24]
	mov	x0, x19
	bl	_bfd_get_target
	mov	x1, x0
	mov	x0, x21
	bl	_bfd_openw
	mov	x23, x0
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_bfd_fatal
LBB0_4:
Lloh4:
	adrp	x25, _output_bfd@GOTPAGE
Lloh5:
	ldr	x25, [x25, _output_bfd@GOTPAGEOFF]
	str	x23, [x25]
Lloh6:
	adrp	x8, _bfd_archive@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bfd_archive@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_bfd_set_format
Lloh9:
	adrp	x8, _write_armap@GOTPAGE
Lloh10:
	ldr	x8, [x8, _write_armap@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	lsr	x8, x8, #63
	eor	w8, w8, #0x1
	str	w8, [x23]
Lloh12:
	adrp	x8, _ar_truncate@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ar_truncate@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
Lloh15:
	adrp	x8, _BFD_TRADITIONAL_FORMAT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BFD_TRADITIONAL_FORMAT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x23, #4]
	orr	w8, w9, w8
	str	w8, [x23, #4]
LBB0_6:
	mov	x0, x23
	mov	x1, x22
	bl	_bfd_set_archive_head
	cbnz	w0, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_bfd_fatal
LBB0_8:
	mov	x0, x23
	bl	_bfd_close
	cbnz	w0, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_bfd_fatal
LBB0_10:
	str	xzr, [x25]
	str	xzr, [x24]
	mov	x0, x19
	bl	_bfd_close
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	bl	_smart_rename
	cbz	x0, LBB0_12
; %bb.11:
	mov	w0, #1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_xexit
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not create temporary file whilst writing archive"

	.comm	_output_filename,8,3            ; @output_filename
	.comm	_output_bfd,8,3                 ; @output_bfd
	.comm	_bfd_archive,4,2                ; @bfd_archive
	.comm	_write_armap,8,3                ; @write_armap
	.comm	_ar_truncate,8,3                ; @ar_truncate
	.comm	_BFD_TRADITIONAL_FORMAT,4,2     ; @BFD_TRADITIONAL_FORMAT
	.no_dead_strip	_write_archive
.subsections_via_symbols
