	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_suitable_read_buffer
_setup_suitable_read_buffer:            ## @setup_suitable_read_buffer
	.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	8(%rdi), %rax
	movq	(%rax), %r13
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rax
	cmpq	$0, 32(%r13)
	jne	LBB0_10
## %bb.1:
	movq	%rdi, %r15
	movl	(%r13), %eax
	cmpl	$-1, %eax
	movl	$4096, %r14d                    ## imm = 0x1000
	cmovnel	%eax, %r14d
	movslq	%r14d, %r12
	movslq	4(%r13), %rbx
	cmpq	$-1, %rbx
	jne	LBB0_4
## %bb.2:
	movq	8(%r13), %rax
	movq	16(%r13), %rbx
	testq	%rax, %rax
	cmovsq	%rbx, %rax
	testq	%rbx, %rbx
	cmovsq	%r12, %rbx
	cmovsq	%r12, %rax
	subq	%rax, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	addq	%rax, %rbx
	cmpq	$65536, %rbx                    ## imm = 0x10000
	jb	LBB0_3
LBB0_4:
	leaq	(%rbx,%r12), %rdi
	callq	_malloc
	movq	%rax, 32(%r13)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rcx
	orq	%r12, %rax
	shrq	$32, %rax
	je	LBB0_7
## %bb.8:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%r12
	jmp	LBB0_9
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_archive_set_error
	movq	_ARCHIVE_STATE_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	_ARCHIVE_FATAL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%r14d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_9:
	subq	%rdx, %r12
	testq	%rdx, %rdx
	cmoveq	%rdx, %r12
	leaq	(%rcx,%r12,4), %rax
	movq	%rax, 40(%r13)
	movq	%rbx, 24(%r13)
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't allocate memory"

	.comm	_ARCHIVE_STATE_FATAL,4,2        ## @ARCHIVE_STATE_FATAL
	.comm	_ARCHIVE_FATAL,4,2              ## @ARCHIVE_FATAL
	.comm	_ARCHIVE_OK,4,2                 ## @ARCHIVE_OK
	.no_dead_strip	_setup_suitable_read_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_suitable_read_buffer
_setup_suitable_read_buffer:            ; @setup_suitable_read_buffer
	.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
	ldr	x8, [x0, #8]
	ldr	x20, [x8]
	ldr	x8, [x20, #32]
	cbnz	x8, LBB0_6
; %bb.1:
	mov	x19, x0
	ldp	w8, w22, [x20]
                                        ; kill: def $w22 killed $w22 def $x22
	sxtw	x22, w22
	cmn	w8, #1
	mov	w9, #4096
	csel	w8, w9, w8, eq
	sxtw	x21, w8
	cmn	w22, #1
	b.ne	LBB0_4
; %bb.2:
	ldp	x8, x9, [x20, #8]
	cmp	x8, #0
	csel	x8, x9, x8, lt
	cmp	x9, #0
	csel	x9, x21, x9, lt
	csel	x8, x21, x8, lt
	sub	x22, x9, x8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x22, x22, x8
	cmp	x22, #16, lsl #12               ; =65536
	b.lo	LBB0_3
LBB0_4:
	add	x0, x22, x21
	bl	_malloc
	str	x0, [x20, #32]
	cbz	x0, LBB0_8
; %bb.5:
	udiv	x8, x0, x21
	msub	x8, x8, x21, x0
	sub	x9, x21, x8
	cmp	x8, #0
	csel	x8, xzr, x9, eq
	add	x8, x0, x8, lsl #2
	str	x8, [x20, #40]
	str	x22, [x20, #24]
LBB0_6:
Lloh0:
	adrp	x8, _ARCHIVE_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ARCHIVE_OK@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	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_8:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_archive_set_error
Lloh7:
	adrp	x8, _ARCHIVE_STATE_FATAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ARCHIVE_STATE_FATAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh10:
	adrp	x8, _ARCHIVE_FATAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ARCHIVE_FATAL@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't allocate memory"

	.comm	_ARCHIVE_STATE_FATAL,4,2        ; @ARCHIVE_STATE_FATAL
	.comm	_ARCHIVE_FATAL,4,2              ; @ARCHIVE_FATAL
	.comm	_ARCHIVE_OK,4,2                 ; @ARCHIVE_OK
	.no_dead_strip	_setup_suitable_read_buffer
.subsections_via_symbols
