	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_modstack_setup                 ## -- Begin function modstack_setup
	.p2align	4, 0x90
_modstack_setup:                        ## @modstack_setup
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	cmpl	$0, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_modstack_desetup
LBB0_2:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_modstack_config
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	movq	$0, (%r14)
	movl	$1, %eax
	cmpl	$0, (%r12)
	jle	LBB0_11
## %bb.4:
	xorl	%ebx, %ebx
	movq	_VERB_OPS@GOTPCREL(%rip), %r15
	leaq	L_.str(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %ecx
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_verbose
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movq	8(%rax), %rdi
	callq	_fptr_whitelist_mod_init
	movl	%eax, %edi
	callq	_fptr_ok
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	*8(%rax)
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
## %bb.7:
	movl	$1, %eax
	jmp	LBB0_11
LBB0_9:
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_log_err
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VERB_OPS,4,2                   ## @VERB_OPS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init module %d: %s"

L_.str.1:                               ## @.str.1
	.asciz	"module init for module %s failed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_modstack_setup                 ; -- Begin function modstack_setup
	.p2align	2
_modstack_setup:                        ; @modstack_setup
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_modstack_desetup
LBB0_2:
	mov	x0, x20
	mov	x1, x21
	bl	_modstack_config
	cbz	w0, LBB0_9
; %bb.3:
	str	xzr, [x19]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.4:
	mov	x21, #0
Lloh0:
	adrp	x23, _VERB_OPS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _VERB_OPS@GOTPAGEOFF]
Lloh2:
	adrp	x22, l_.str@PAGE
Lloh3:
	add	x22, x22, l_.str@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	ldr	x8, [x20, #8]
	lsl	x24, x21, #3
	ldr	x8, [x8, x24]
	ldr	w3, [x8]
	mov	x1, x22
	mov	x2, x21
	bl	_verbose
	ldr	x8, [x20, #8]
	ldr	x8, [x8, x24]
	ldr	x0, [x8, #8]
	bl	_fptr_whitelist_mod_init
	bl	_fptr_ok
	ldr	x8, [x20, #8]
	ldr	x8, [x8, x24]
	ldr	x8, [x8, #8]
	mov	x0, x19
	mov	x1, x21
	blr	x8
	cbz	w0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.lt	LBB0_5
LBB0_7:
	mov	w0, #1
	b	LBB0_9
LBB0_8:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, x21, lsl #3]
	ldr	w1, [x8]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_log_err
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_VERB_OPS,4,2                   ; @VERB_OPS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init module %d: %s"

l_.str.1:                               ; @.str.1
	.asciz	"module init for module %s failed"

.subsections_via_symbols
