	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_kld
_read_kld:                              ## @read_kld
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	%rdi, %r12
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXMODNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	incl	%r13d
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_verbose@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	_dflag@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	je	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	callq	_printf
	movq	(%r14), %rdx
	jmp	LBB0_3
LBB0_1:
	xorl	%edx, %edx
LBB0_3:
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	callq	_ef_open
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movq	(%r14), %rdx
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	callq	_ef_obj_open
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %ebx
	cmpq	$0, (%r14)
	je	LBB0_21
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movq	%r12, %rdx
	callq	_warnc
	jmp	LBB0_21
LBB0_7:
	leaq	-56(%rbp), %rdi
	callq	_EF_GET_TYPE
	movq	_EFT_KLD@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_9
## %bb.8:
	movq	_EFT_KERNEL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_20
LBB0_9:
	movq	_MDT_SETNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rbx
	leaq	-112(%rbp), %rdx
	leaq	-120(%rbp), %rcx
	leaq	-64(%rbp), %r8
	movq	%rbx, %rdi
	callq	_EF_LOOKUP_SET
	movl	%eax, %edi
	callq	_check
	movq	-112(%rbp), %rsi
	movl	-64(%rbp), %edx
	shll	$3, %edx
	leaq	-80(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_EF_SEG_READ_ENTRY_REL
	movl	%eax, %edi
	callq	_check
	cmpq	$0, -64(%rbp)
	jle	LBB0_19
## %bb.10:
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %r14
	leaq	-96(%rbp), %r12
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	-80(%rbp), %rax
	movl	(%rax,%rbx,8), %esi
	movq	%r14, %rdi
	movl	$16, %edx
	movq	%r12, %rcx
	callq	_EF_SEG_READ_REL
	movl	%eax, %edi
	callq	_check
	movl	-88(%rbp), %esi
	movq	%r14, %rdi
	movl	%r13d, %edx
	movq	%r15, %rcx
	callq	_EF_SEG_READ_STRING
	movl	%eax, %edi
	callq	_check
	movq	-96(%rbp), %rax
	movq	_MDT_MODULE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rbx
	jl	LBB0_12
## %bb.14:
	testq	%rax, %rax
	jg	LBB0_15
	jmp	LBB0_19
LBB0_13:
	leaq	-96(%rbp), %rdi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rsi
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	callq	_parse_entry
	movq	-64(%rbp), %rax
	testq	%rax, %rax
	jle	LBB0_19
LBB0_15:
	xorl	%r14d, %r14d
	leaq	-56(%rbp), %rbx
	leaq	-96(%rbp), %r12
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%r14
	cmpq	-64(%rbp), %r14
	jge	LBB0_19
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	-80(%rbp), %rax
	movl	(%rax,%r14,8), %esi
	movq	%rbx, %rdi
	movl	$16, %edx
	movq	%r12, %rcx
	callq	_EF_SEG_READ_REL
	movl	%eax, %edi
	callq	_check
	movl	-88(%rbp), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	movq	%r15, %rcx
	callq	_EF_SEG_READ_STRING
	movl	%eax, %edi
	callq	_check
	movq	-96(%rbp), %rax
	movq	_MDT_MODULE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	callq	_parse_entry
	jmp	LBB0_18
LBB0_19:
	movq	-80(%rbp), %rdi
	callq	_free
LBB0_20:
	leaq	-56(%rbp), %rdi
	callq	_EF_CLOSE
	xorl	%ebx, %ebx
LBB0_21:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.22:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXMODNAME,4,2                 ## @MAXMODNAME
	.comm	_verbose,8,3                    ## @verbose
	.comm	_dflag,8,3                      ## @dflag
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s\n"

L_.str.1:                               ## @.str.1
	.asciz	"elf_open(%s)"

	.comm	_EFT_KLD,4,2                    ## @EFT_KLD
	.comm	_EFT_KERNEL,4,2                 ## @EFT_KERNEL
	.comm	_MDT_SETNAME,4,2                ## @MDT_SETNAME
	.comm	_MDT_MODULE,8,3                 ## @MDT_MODULE
	.no_dead_strip	_read_kld
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_kld
_read_kld:                              ; @read_kld
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #64
	mov	x19, x1
	mov	x22, x0
	mov	x24, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _MAXMODNAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXMODNAME@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w20, w8, #1
	mov	x9, x20
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
Lloh8:
	adrp	x25, _verbose@GOTPAGE
Lloh9:
	ldr	x25, [x25, _verbose@GOTPAGEOFF]
	ldr	x8, [x25]
Lloh10:
	adrp	x9, _dflag@GOTPAGE
Lloh11:
	ldr	x9, [x9, _dflag@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	orr	x8, x8, x9
	cbz	x8, LBB0_2
; %bb.1:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_printf
	ldr	x2, [x25]
	b	LBB0_3
LBB0_2:
	mov	x2, #0
LBB0_3:
	sub	x1, x29, #96
	mov	x0, x22
	bl	_ef_open
	cbz	w0, LBB0_7
; %bb.4:
	ldr	x2, [x25]
	sub	x1, x29, #96
	mov	x0, x22
	bl	_ef_obj_open
	cbz	w0, LBB0_7
; %bb.5:
	mov	x23, x0
	ldr	x8, [x25]
	cbz	x8, LBB0_20
; %bb.6:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	mov	x2, x22
	bl	_warnc
	b	LBB0_20
LBB0_7:
	sub	x0, x29, #96
	bl	_EF_GET_TYPE
Lloh17:
	adrp	x8, _EFT_KLD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EFT_KLD@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _EFT_KERNEL@GOTPAGE
Lloh21:
	ldr	x9, [x9, _EFT_KERNEL@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	w0, w8
	ccmp	w0, w9, #4, ne
	b.ne	LBB0_19
; %bb.8:
Lloh23:
	adrp	x8, _MDT_SETNAME@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MDT_SETNAME@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	sub	x0, x29, #96
	sub	x2, x29, #112
	sub	x3, x29, #120
	sub	x4, x29, #128
	bl	_EF_LOOKUP_SET
	bl	_check
	ldur	x1, [x29, #-112]
	ldur	w8, [x29, #-128]
	lsl	w2, w8, #3
	sub	x0, x29, #96
	sub	x3, x29, #104
	bl	_EF_SEG_READ_ENTRY_REL
	bl	_check
	ldur	x8, [x29, #-128]
	cmp	x8, #1
	b.lt	LBB0_18
; %bb.9:
	mov	x23, #0
Lloh26:
	adrp	x22, _MDT_MODULE@GOTPAGE
Lloh27:
	ldr	x22, [x22, _MDT_MODULE@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldur	x8, [x29, #-104]
	ldr	x1, [x8, x23, lsl #3]
	sub	x0, x29, #96
	sub	x3, x29, #88
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	w2, #16
	bl	_EF_SEG_READ_REL
	bl	_check
	ldur	w1, [x29, #-80]
	sub	x0, x29, #96
	mov	x2, x20
	mov	x3, x21
	bl	_EF_SEG_READ_STRING
	bl	_check
	ldur	x8, [x29, #-88]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x23, x23, #1
	ldur	x8, [x29, #-128]
	cmp	x23, x8
	b.lt	LBB0_10
; %bb.12:
	cmp	x8, #1
	b.ge	LBB0_14
	b	LBB0_18
LBB0_13:
	sub	x0, x29, #88
	sub	x2, x29, #96
	mov	x1, x21
	mov	x3, x19
	bl	_parse_entry
	ldur	x8, [x29, #-128]
	cmp	x8, #1
	b.lt	LBB0_18
LBB0_14:
	mov	x23, #0
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x23, x23, #1
	ldur	x8, [x29, #-128]
	cmp	x23, x8
	b.ge	LBB0_18
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldur	x8, [x29, #-104]
	ldr	x1, [x8, x23, lsl #3]
	sub	x0, x29, #96
	sub	x3, x29, #88
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	w2, #16
	bl	_EF_SEG_READ_REL
	bl	_check
	ldur	w1, [x29, #-80]
	sub	x0, x29, #96
	mov	x2, x20
	mov	x3, x21
	bl	_EF_SEG_READ_STRING
	bl	_check
	ldur	x8, [x29, #-88]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	sub	x0, x29, #88
	sub	x2, x29, #96
	mov	x1, x21
	mov	x3, x19
	bl	_parse_entry
	b	LBB0_15
LBB0_18:
	ldur	x0, [x29, #-104]
	bl	_free
LBB0_19:
	sub	x0, x29, #96
	bl	_EF_CLOSE
	mov	w23, #0
LBB0_20:
	mov	sp, x24
	ldur	x8, [x29, #-72]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	mov	x0, x23
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXMODNAME,4,2                 ; @MAXMODNAME
	.comm	_verbose,8,3                    ; @verbose
	.comm	_dflag,8,3                      ; @dflag
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s\n"

l_.str.1:                               ; @.str.1
	.asciz	"elf_open(%s)"

	.comm	_EFT_KLD,4,2                    ; @EFT_KLD
	.comm	_EFT_KERNEL,4,2                 ; @EFT_KERNEL
	.comm	_MDT_SETNAME,4,2                ; @MDT_SETNAME
	.comm	_MDT_MODULE,8,3                 ; @MDT_MODULE
	.no_dead_strip	_read_kld
.subsections_via_symbols
