	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function partial_hook
_partial_hook:                          ## @partial_hook
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	movq	8(%r15), %rax
	movq	(%rax), %rbx
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_fclose
LBB0_2:
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	jge	LBB0_5
## %bb.3:
	movq	16(%rbx), %rcx
	leaq	1(%rax), %rdx
	movq	%rdx, (%rbx)
	movq	(%rcx,%rax,8), %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_fopen
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_mrb_parser_set_filename
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_5:
	movq	$0, (%r15)
	jmp	LBB0_7
LBB0_6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rcx
	callq	_fprintf
LBB0_7:
	movl	$-1, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"%s: cannot open program file. (%s)\n"

	.no_dead_strip	_partial_hook
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function partial_hook
_partial_hook:                          ; @partial_hook
	.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	x19, x0
	ldp	x0, x8, [x0]
	ldr	x21, [x8]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_fclose
LBB0_2:
	ldp	x8, x9, [x21]
	cmp	x8, x9
	b.ge	LBB0_5
; %bb.3:
	ldr	x9, [x21, #16]
	add	x10, x8, #1
	str	x10, [x21]
	ldr	x20, [x9, x8, lsl #3]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_fopen
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_mrb_parser_set_filename
	mov	w0, #0
	b	LBB0_8
LBB0_5:
	str	xzr, [x19]
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x8, _stderr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	x2, [x21, #24]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x20
	bl	_fprintf
LBB0_7:
	mov	w0, #-1
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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"%s: cannot open program file. (%s)\n"

	.no_dead_strip	_partial_hook
.subsections_via_symbols
