	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AddScriptToStack               ## -- Begin function AddScriptToStack
	.p2align	4, 0x90
_AddScriptToStack:                      ## @AddScriptToStack
	.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, %r14
	movq	_script@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	addq	$40, %rax
	movq	%rax, (%r15)
	movq	_scriptstack@GOTPCREL(%rip), %rcx
	movq	_MAX_INCLUDES@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	leaq	(%rdx,%rdx,4), %rdx
	shlq	$3, %rdx
	addq	(%rcx), %rdx
	cmpq	%rdx, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movq	(%r15), %rax
LBB0_2:
	movq	(%rax), %rbx
	movq	%r14, %rdi
	callq	_ExpandPath
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_strcpy
	movq	(%r15), %rsi
	movq	(%rsi), %rdi
	addq	$16, %rsi
	callq	_LoadFile
	movl	%eax, %ebx
	movq	(%r15), %rax
	movq	(%rax), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_printf
	movq	(%r15), %rax
	movl	$1, 8(%rax)
	movq	16(%rax), %rcx
	movq	%rcx, 32(%rax)
	movslq	%ebx, %rdx
	addq	%rcx, %rdx
	movq	%rdx, 24(%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_script,8,3                     ## @script
	.comm	_scriptstack,8,3                ## @scriptstack
	.comm	_MAX_INCLUDES,8,3               ## @MAX_INCLUDES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"script file exceeded MAX_INCLUDES"

L_.str.1:                               ## @.str.1
	.asciz	"entering %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AddScriptToStack               ; -- Begin function AddScriptToStack
	.p2align	2
_AddScriptToStack:                      ; @AddScriptToStack
	.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
Lloh0:
	adrp	x21, _script@GOTPAGE
Lloh1:
	ldr	x21, [x21, _script@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x8, x8, #40
	str	x8, [x21]
Lloh2:
	adrp	x9, _scriptstack@GOTPAGE
Lloh3:
	ldr	x9, [x9, _scriptstack@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _MAX_INCLUDES@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MAX_INCLUDES@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	mov	w11, #40
	madd	x9, x10, x11, x9
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	x8, [x21]
LBB0_2:
	ldr	x20, [x8]
	mov	x0, x19
	bl	_ExpandPath
	mov	x1, x0
	mov	x0, x20
	bl	_strcpy
	ldr	x1, [x21]
	ldr	x0, [x1], #16
	bl	_LoadFile
	mov	x19, x0
	ldr	x8, [x21]
	ldr	x1, [x8]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	ldr	x8, [x21]
	mov	w9, #1
	str	w9, [x8, #8]
	ldr	x9, [x8, #16]
	add	x10, x9, w19, sxtw
	stp	x10, x9, [x8, #24]
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_script,8,3                     ; @script
	.comm	_scriptstack,8,3                ; @scriptstack
	.comm	_MAX_INCLUDES,8,3               ; @MAX_INCLUDES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"script file exceeded MAX_INCLUDES"

l_.str.1:                               ; @.str.1
	.asciz	"entering %s\n"

.subsections_via_symbols
