	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_modstat_info
_get_modstat_info:                      ## @get_modstat_info
	.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	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_check_permission
	movl	$4096, %r14d                    ## imm = 0x1000
	movq	_errno@GOTPCREL(%rip), %r12
	leaq	-56(%rbp), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_malloc
	movq	%rax, -48(%rbp)
	movq	%r14, -56(%rbp)
	movl	$0, (%r12)
	movq	_MODCTL_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_modctl
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %edi
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	callq	_strerror
	movl	%r15d, %edi
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdx
	callq	_fprintf
	leaq	L_.str.1(%rip), %rdi
	callq	_atf_tc_fail
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rbx
	cmpq	%rbx, %r14
	jae	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rdi
	callq	_free
	movq	-56(%rbp), %r14
	jmp	LBB0_1
LBB0_5:
	xorl	%r14d, %r14d
	cmpq	$4, %rbx
	jb	LBB0_13
## %bb.6:
	shrq	$2, %rbx
	movq	-48(%rbp), %r14
	decq	%rbx
	xorl	%r15d, %r15d
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%r15,4), %edi
	movq	%r13, %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	testq	%r12, %r12
	jne	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpq	%r15, %rbx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	incq	%r15
	testq	%rax, %rax
	jne	LBB0_7
LBB0_12:
	xorl	%r14d, %r14d
	testq	%rax, %rax
	sete	%r14b
	jmp	LBB0_13
LBB0_9:
	movl	(%r14,%r15,4), %eax
	movl	%eax, (%r12)
	movl	$1, %r14d
LBB0_13:
	movq	-48(%rbp), %rdi
	callq	_free
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	_MODCTL_STAT,4,2                ## @MODCTL_STAT
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"modctl(MODCTL_STAT) failed: %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to query module status"

	.no_dead_strip	_get_modstat_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_modstat_info
_get_modstat_info:                      ; @get_modstat_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	bl	_check_permission
	mov	w23, #4096
Lloh0:
	adrp	x25, _errno@GOTPAGE
Lloh1:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
Lloh2:
	adrp	x26, _MODCTL_STAT@GOTPAGE
Lloh3:
	ldr	x26, [x26, _MODCTL_STAT@GOTPAGEOFF]
Lloh4:
	adrp	x27, _stderr@GOTPAGE
Lloh5:
	ldr	x27, [x27, _stderr@GOTPAGEOFF]
Lloh6:
	adrp	x21, l_.str@PAGE
Lloh7:
	add	x21, x21, l_.str@PAGEOFF
Lloh8:
	adrp	x22, l_.str.1@PAGE
Lloh9:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_malloc
	stp	x23, x0, [sp]
	str	wzr, [x25]
	ldr	w0, [x26]
	mov	x1, sp
	bl	_modctl
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x25]
	ldr	w24, [x27]
	bl	_strerror
	mov	x2, x0
	mov	x0, x24
	mov	x1, x21
	bl	_fprintf
	mov	x0, x22
	bl	_atf_tc_fail
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [sp]
	cmp	x23, x8
	b.hs	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [sp, #8]
	bl	_free
	ldr	x23, [sp]
	b	LBB0_1
LBB0_5:
	cmp	x8, #4
	b.hs	LBB0_7
; %bb.6:
	mov	w19, #0
	b	LBB0_13
LBB0_7:
	lsr	x8, x8, #2
	ldr	x21, [sp, #8]
	sub	x22, x8, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	mov	x1, x20
	bl	_strcmp
	cmp	x0, #0
	ccmp	x19, #0, #4, eq
	b.ne	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	subs	x22, x22, #1
	b.lo	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x21, x21, #4
	cbnz	x0, LBB0_8
LBB0_11:
	cmp	x0, #0
	cset	w19, eq
	b	LBB0_13
LBB0_12:
	ldr	w8, [x21]
	str	w8, [x19]
	mov	w19, #1
LBB0_13:
	ldr	x0, [sp, #8]
	bl	_free
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	_MODCTL_STAT,4,2                ; @MODCTL_STAT
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"modctl(MODCTL_STAT) failed: %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to query module status"

	.no_dead_strip	_get_modstat_info
.subsections_via_symbols
