	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar_rdsync                      ## -- Begin function ar_rdsync
	.p2align	4, 0x90
_ar_rdsync:                             ## @ar_rdsync
	.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	_done@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	$-1, %r15d
	jg	LBB0_22
## %bb.1:
	movq	_lstrval@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_22
## %bb.2:
	movq	_act@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_APPND@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.3:
	movq	_ARCHIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.4:
	movq	_io_ok@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.5:
	movq	_did_io@GOTPCREL(%rip), %rdx
	movl	$1, (%rdx)
LBB0_6:
	movq	_artyp@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	leal	-131(%rbx), %edx
	cmpl	$2, %edx
	jb	LBB0_12
## %bb.7:
	cmpl	$129, %ebx
	je	LBB0_12
## %bb.8:
	cmpl	$128, %ebx
	jne	LBB0_16
## %bb.9:
	testq	%rcx, %rcx
	je	LBB0_23
## %bb.10:
	movq	$0, (%rax)
	jmp	LBB0_15
LBB0_11:
	leaq	L_.str(%rip), %rsi
LBB0_20:
	movl	$1, %edi
	jmp	LBB0_21
LBB0_12:
	movq	$0, (%rax)
	movq	_arsb@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_BLKMULT@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_arfd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_lseek
	testl	%eax, %eax
	js	LBB0_17
## %bb.13:
	cmpl	$129, %ebx
	movl	%r12d, %esi
	cmovnel	%r13d, %esi
	testq	%r12, %r12
	cmovlel	%r13d, %esi
	cltd
	idivl	%esi
	subl	%edx, %esi
	movq	_arfd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_lseek
	testl	%eax, %eax
	js	LBB0_17
LBB0_15:
	movq	$1, (%r14)
	jmp	LBB0_18
LBB0_16:
	movq	$0, (%rax)
LBB0_17:
	cmpq	$0, (%r14)
	jle	LBB0_19
LBB0_18:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%edi, %edi
LBB0_21:
	callq	_paxwarn
LBB0_22:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_20
LBB0_23:
	movq	_MTFSR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	$1, -48(%rbp)
	movq	_arfd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MTIOCTOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_ioctl
	testl	%eax, %eax
	jns	LBB0_15
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_done,8,3                       ## @done
	.comm	_lstrval,8,3                    ## @lstrval
	.comm	_act,8,3                        ## @act
	.comm	_APPND,8,3                      ## @APPND
	.comm	_ARCHIVE,8,3                    ## @ARCHIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot allow updates to an archive with flaws."

	.comm	_io_ok,8,3                      ## @io_ok
	.comm	_did_io,4,2                     ## @did_io
	.comm	_artyp,4,2                      ## @artyp
	.comm	_MTFSR,4,2                      ## @MTFSR
	.comm	_arfd,4,2                       ## @arfd
	.comm	_MTIOCTOP,4,2                   ## @MTIOCTOP
	.comm	_arsb,8,3                       ## @arsb
	.comm	_BLKMULT,8,3                    ## @BLKMULT
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
L_.str.1:                               ## @.str.1
	.asciz	"Unable to recover from an archive read failure."

L_.str.2:                               ## @.str.2
	.asciz	"Attempting to recover from an archive read failure."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar_rdsync                      ; -- Begin function ar_rdsync
	.p2align	2
_ar_rdsync:                             ; @ar_rdsync
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
Lloh0:
	adrp	x8, _done@GOTPAGE
Lloh1:
	ldr	x8, [x8, _done@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x19, _lstrval@GOTPAGE
Lloh4:
	ldr	x19, [x19, _lstrval@GOTPAGEOFF]
	ldr	x9, [x19]
	cmp	x8, #0
	ccmp	x9, #0, #4, le
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_18
LBB0_2:
Lloh5:
	adrp	x8, _act@GOTPAGE
Lloh6:
	ldr	x8, [x8, _act@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _APPND@GOTPAGE
Lloh9:
	ldr	x9, [x9, _APPND@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x10, _ARCHIVE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _ARCHIVE@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_5
; %bb.3:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	w0, #1
	bl	_paxwarn
	mov	w0, #-1
	b	LBB0_18
LBB0_5:
Lloh16:
	adrp	x8, _io_ok@GOTPAGE
Lloh17:
	ldr	x8, [x8, _io_ok@GOTPAGEOFF]
	ldr	x9, [x8]
	cbz	x9, LBB0_7
; %bb.6:
Lloh18:
	adrp	x10, _did_io@GOTPAGE
Lloh19:
	ldr	x10, [x10, _did_io@GOTPAGEOFF]
	mov	w11, #1
Lloh20:
	str	w11, [x10]
LBB0_7:
Lloh21:
	adrp	x10, _artyp@GOTPAGE
Lloh22:
	ldr	x10, [x10, _artyp@GOTPAGEOFF]
Lloh23:
	ldr	w20, [x10]
	sub	w10, w20, #131
	cmp	w10, #2
	b.lo	LBB0_12
; %bb.8:
	cmp	w20, #129
	b.eq	LBB0_12
; %bb.9:
	cmp	w20, #128
	b.ne	LBB0_15
; %bb.10:
	cbz	x9, LBB0_20
; %bb.11:
	str	xzr, [x8]
	b	LBB0_14
LBB0_12:
	str	xzr, [x8]
Lloh24:
	adrp	x8, _arsb@GOTPAGE
Lloh25:
	ldr	x8, [x8, _arsb@GOTPAGEOFF]
Lloh26:
	ldr	x23, [x8]
Lloh27:
	adrp	x8, _BLKMULT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _BLKMULT@GOTPAGEOFF]
Lloh29:
	ldr	x24, [x8]
Lloh30:
	adrp	x21, _arfd@GOTPAGE
Lloh31:
	ldr	x21, [x21, _arfd@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh32:
	adrp	x22, _SEEK_CUR@GOTPAGE
Lloh33:
	ldr	x22, [x22, _SEEK_CUR@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #0
	bl	_lseek
	tbnz	w0, #31, LBB0_16
; %bb.13:
	cmp	w20, #129
	ccmp	x23, #1, #8, eq
	csel	w8, w24, w23, lt
	sdiv	w9, w0, w8
	neg	w10, w0
	madd	w9, w9, w8, w10
	add	w1, w8, w9
	ldr	w0, [x21]
	ldr	w2, [x22]
	bl	_lseek
	tbnz	w0, #31, LBB0_16
LBB0_14:
	mov	w8, #1
	str	x8, [x19]
	b	LBB0_17
LBB0_15:
	str	xzr, [x8]
LBB0_16:
	ldr	x8, [x19]
	cmp	x8, #0
	b.le	LBB0_19
LBB0_17:
Lloh34:
	adrp	x1, l_.str.2@PAGE
Lloh35:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #0
	bl	_paxwarn
	mov	w0, #0
LBB0_18:
	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
	add	sp, sp, #80
	ret
LBB0_19:
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_20:
Lloh38:
	adrp	x8, _MTFSR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MTFSR@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	mov	w9, #1
	stp	w9, w8, [sp, #8]
Lloh41:
	adrp	x8, _arfd@GOTPAGE
Lloh42:
	ldr	x8, [x8, _arfd@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
Lloh44:
	adrp	x8, _MTIOCTOP@GOTPAGE
Lloh45:
	ldr	x8, [x8, _MTIOCTOP@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	tbz	w0, #31, LBB0_14
	b	LBB0_16
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_done,8,3                       ; @done
	.comm	_lstrval,8,3                    ; @lstrval
	.comm	_act,8,3                        ; @act
	.comm	_APPND,8,3                      ; @APPND
	.comm	_ARCHIVE,8,3                    ; @ARCHIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot allow updates to an archive with flaws."

	.comm	_io_ok,8,3                      ; @io_ok
	.comm	_did_io,4,2                     ; @did_io
	.comm	_artyp,4,2                      ; @artyp
	.comm	_MTFSR,4,2                      ; @MTFSR
	.comm	_arfd,4,2                       ; @arfd
	.comm	_MTIOCTOP,4,2                   ; @MTIOCTOP
	.comm	_arsb,8,3                       ; @arsb
	.comm	_BLKMULT,8,3                    ; @BLKMULT
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
l_.str.1:                               ; @.str.1
	.asciz	"Unable to recover from an archive read failure."

l_.str.2:                               ; @.str.2
	.asciz	"Attempting to recover from an archive read failure."

.subsections_via_symbols
