	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r_cmd_java_get_cp_bytes_and_write
_r_cmd_java_get_cp_bytes_and_write:     ## @r_cmd_java_get_cp_bytes_and_write
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, %r13
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	movl	%edx, %esi
	callq	_r_bin_java_get_item_from_bin_cp_list
	movq	%rax, %r12
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edi
	callq	_r_io_size
	movq	%rax, %r14
	movl	$0, -44(%rbp)
	xorl	%eax, %eax
	testq	%rbx, %rbx
	je	LBB0_22
## %bb.1:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_r_bin_java_cp_get_size
	cmpl	$-1, %eax
	je	LBB0_21
## %bb.2:
	movl	%eax, %ebx
	movl	(%r12), %edi
	leaq	-44(%rbp), %rsi
	movq	%r13, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_r_bin_java_cp_get_bytes
	movl	-44(%rbp), %ecx
	subl	%ebx, %ecx
	jge	LBB0_6
## %bb.3:
	movq	%rax, %r13
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movslq	%ebx, %rbx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	leaq	(%rbx,%r15), %rsi
	xorl	%r14d, %r14d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, %r12
	xorl	%edx, %edx
	callq	_r_core_shift_block
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movl	(%r12), %edi
	movslq	-44(%rbp), %rax
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	subq	%rbx, %rsi
	addq	%rax, %rsi
	callq	_r_io_resize
	xorl	%r14d, %r14d
	testq	%rax, %rax
	setne	%r14b
	jmp	LBB0_8
LBB0_6:
	jle	LBB0_19
## %bb.7:
	movq	%rax, %r13
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, %r12
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	%ecx, %edx
	callq	_r_core_extend_at
	movl	%eax, %r14d
LBB0_8:
	movl	-44(%rbp), %ecx
	testl	%ecx, %ecx
	jle	LBB0_12
## %bb.9:
	testq	%r13, %r13
	je	LBB0_12
## %bb.10:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_r_core_write_at
	testq	%rax, %rax
	je	LBB0_18
## %bb.11:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_r_core_seek
	xorl	%r14d, %r14d
	testq	%rax, %rax
	setne	%r14b
LBB0_12:
	testl	%r14d, %r14d
	je	LBB0_18
## %bb.13:
	movq	%r13, %rdi
	callq	_R_FREE
	movl	%r14d, %eax
	cmpl	$1, %r14d
	jne	LBB0_22
## %bb.14:
	movl	(%r12), %edi
	movq	8(%r12), %rax
	movl	(%rax), %esi
	callq	_r_io_use_fd
	movl	%eax, %r15d
	movl	(%r12), %edi
	callq	_r_io_size
	testq	%rax, %rax
	jle	LBB0_25
## %bb.15:
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_malloc
	movq	%rax, %r14
	testq	%rax, %rax
	movl	%r15d, %eax
	je	LBB0_22
## %bb.16:
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_memset
	movl	(%r12), %edi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %esi
	movq	%r14, %rdx
	movq	%r13, %rcx
	callq	_r_io_read_at
	cmpq	%rax, %r13
	jne	LBB0_23
## %bb.17:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movq	%r13, %rcx
	callq	_r_cmd_java_reload_bin_from_buf
	movl	%eax, %r15d
	jmp	LBB0_24
LBB0_18:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_20
LBB0_19:
	leaq	L_.str(%rip), %rdi
LBB0_20:
	callq	_eprintf
LBB0_21:
	xorl	%eax, %eax
LBB0_22:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	leaq	L_.str.2(%rip), %rdi
	callq	_eprintf
LBB0_24:
	movq	%r14, %rdi
	callq	_free
LBB0_25:
	movl	%r15d, %eax
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[X] r_cmd_java_get_cp_bytes_and_write: Failed to resize the file correctly aborting.\n"

L_.str.1:                               ## @.str.1
	.asciz	"[X] r_cmd_java_get_cp_bytes_and_write: Failed to write the bytes to the file correctly aborting.\n"

L_.str.2:                               ## @.str.2
	.asciz	"[X] r_cmd_java_get_cp_bytes_and_write: Failed to read the file in aborted, bin reload.\n"

	.no_dead_strip	_r_cmd_java_get_cp_bytes_and_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r_cmd_java_get_cp_bytes_and_write
_r_cmd_java_get_cp_bytes_and_write:     ; @r_cmd_java_get_cp_bytes_and_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x5
	mov	x24, x4
	mov	x21, x3
	mov	x25, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	mov	x1, x2
	bl	_r_bin_java_get_item_from_bin_cp_list
	mov	x26, x0
	ldr	w0, [x20]
	bl	_r_io_size
	str	wzr, [sp, #12]
	cbz	x19, LBB0_21
; %bb.1:
	mov	x23, x0
	mov	x0, x19
	mov	x1, x25
	bl	_r_bin_java_cp_get_size
	cmn	w0, #1
	b.eq	LBB0_21
; %bb.2:
	mov	x25, x0
	ldr	w0, [x26]
	add	x1, sp, #12
	mov	x2, x24
	mov	x3, x22
	bl	_r_bin_java_cp_get_bytes
	mov	x22, x0
	ldr	w8, [sp, #12]
	subs	w3, w8, w25
	b.ge	LBB0_5
; %bb.3:
	sxtw	x24, w25
	add	x1, x24, x21
	mov	x0, x20
	mov	w2, #0
	bl	_r_core_shift_block
	cbz	x0, LBB0_8
; %bb.4:
	ldr	w0, [x20]
	ldrsw	x8, [sp, #12]
	sub	x9, x23, x24
	add	x1, x9, x8
	bl	_r_io_resize
	cmp	x0, #0
	cset	w23, ne
	b	LBB0_9
LBB0_5:
	b.le	LBB0_7
; %bb.6:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x3
	bl	_r_core_extend_at
	mov	x23, x0
	b	LBB0_9
LBB0_7:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_20
LBB0_8:
	mov	w23, #0
LBB0_9:
	ldr	w3, [sp, #12]
	cmp	w3, #1
	b.lt	LBB0_13
; %bb.10:
	cbz	x22, LBB0_13
; %bb.11:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_r_core_write_at
	cbz	x0, LBB0_19
; %bb.12:
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	bl	_r_core_seek
	cmp	x0, #0
	cset	w23, ne
LBB0_13:
	cbz	w23, LBB0_19
; %bb.14:
	mov	x0, x22
	bl	_R_FREE
	cmp	w23, #1
	b.ne	LBB0_22
; %bb.15:
	ldr	w0, [x20]
	ldr	x8, [x20, #8]
	ldr	w1, [x8]
	bl	_r_io_use_fd
	mov	x23, x0
	ldr	w0, [x20]
	bl	_r_io_size
	cmp	x0, #1
	b.lt	LBB0_22
; %bb.16:
	mov	x22, x0
	bl	_malloc
	cbz	x0, LBB0_22
; %bb.17:
	mov	x21, x0
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	ldr	w0, [x20]
	ldr	w1, [x19]
	mov	x2, x21
	mov	x3, x22
	bl	_r_io_read_at
	cmp	x22, x0
	b.ne	LBB0_23
; %bb.18:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	mov	x3, x22
	bl	_r_cmd_java_reload_bin_from_buf
	mov	x23, x0
	b	LBB0_24
LBB0_19:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_20:
	bl	_eprintf
LBB0_21:
	mov	w23, #0
LBB0_22:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_23:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_eprintf
	mov	w23, #0
LBB0_24:
	mov	x0, x21
	bl	_free
	b	LBB0_22
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[X] r_cmd_java_get_cp_bytes_and_write: Failed to resize the file correctly aborting.\n"

l_.str.1:                               ; @.str.1
	.asciz	"[X] r_cmd_java_get_cp_bytes_and_write: Failed to write the bytes to the file correctly aborting.\n"

l_.str.2:                               ; @.str.2
	.asciz	"[X] r_cmd_java_get_cp_bytes_and_write: Failed to read the file in aborted, bin reload.\n"

	.no_dead_strip	_r_cmd_java_get_cp_bytes_and_write
.subsections_via_symbols
