	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function archive_write_ar_data
_archive_write_ar_data:                 ## @archive_write_ar_data
	.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	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	(%r12), %rax
	cmpq	%rdx, %rax
	cmovbq	%rax, %rbx
	cmpq	$0, 8(%r12)
	jle	LBB0_5
## %bb.1:
	cmpl	$0, 16(%r12)
	jle	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_archive_set_error
	movq	_ARCHIVE_WARN@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_3:
	leaq	1(%rbx), %rdi
	callq	_malloc
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	movq	24(%r12), %rax
	movb	$0, (%rax,%rbx)
	movl	$1, 16(%r12)
LBB0_5:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	___archive_write_output
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.6:
	subq	%rbx, (%r12)
	movl	%ebx, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_archive_set_error
	movq	_ARCHIVE_FATAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"More than one string tables exist"

	.comm	_ARCHIVE_WARN,4,2               ## @ARCHIVE_WARN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Can't allocate strtab buffer"

	.comm	_ARCHIVE_FATAL,4,2              ## @ARCHIVE_FATAL
	.comm	_ARCHIVE_OK,4,2                 ## @ARCHIVE_OK
	.no_dead_strip	_archive_write_ar_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function archive_write_ar_data
_archive_write_ar_data:                 ; @archive_write_ar_data
	.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	x21, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldp	x8, x9, [x22]
	cmp	x8, x2
	csel	x19, x8, x2, lo
	cmp	x9, #1
	b.lt	LBB0_6
; %bb.1:
	ldr	w8, [x22, #16]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_archive_set_error
Lloh5:
	adrp	x8, _ARCHIVE_WARN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ARCHIVE_WARN@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_4:
	add	x0, x19, #1
	bl	_malloc
	str	x0, [x22, #24]
	cbz	x0, LBB0_9
; %bb.5:
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
	ldr	x8, [x22, #24]
	strb	wzr, [x8, x19]
	mov	w8, #1
	str	w8, [x22, #16]
LBB0_6:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	___archive_write_output
Lloh7:
	adrp	x8, _ARCHIVE_OK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ARCHIVE_OK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x22]
	sub	x8, x8, x19
	str	x8, [x22]
	mov	x0, x19
LBB0_8:
	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
LBB0_9:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_archive_set_error
Lloh15:
	adrp	x8, _ARCHIVE_FATAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ARCHIVE_FATAL@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"More than one string tables exist"

	.comm	_ARCHIVE_WARN,4,2               ; @ARCHIVE_WARN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Can't allocate strtab buffer"

	.comm	_ARCHIVE_FATAL,4,2              ; @ARCHIVE_FATAL
	.comm	_ARCHIVE_OK,4,2                 ; @ARCHIVE_OK
	.no_dead_strip	_archive_write_ar_data
.subsections_via_symbols
