	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elf_load_module                ## -- Begin function elf_load_module
	.p2align	4, 0x90
_elf_load_module:                       ## @elf_load_module
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_debugstr_w
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	movq	%r15, %rcx
	callq	_TRACE
	movq	_ELF_INFO_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_FALSE@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, -56(%rbp)
	cmpq	$0, (%rbx)
	je	LBB0_4
## %bb.1:
	movq	%rbx, -40(%rbp)
	movq	%r14, %rdi
	movl	$47, %esi
	callq	_strrchrW
	leaq	4(%rax), %rcx
	testq	%rax, %rax
	cmoveq	%r14, %rcx
	movq	%rcx, -48(%rbp)
	movq	(%r12), %rax
	movq	%rax, -56(%rbp)
	movq	_elf_load_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	leaq	-72(%rbp), %rcx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_elf_enum_modules_internal
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	cmpq	$0, -56(%rbp)
	jne	LBB0_3
	jmp	LBB0_8
LBB0_4:
	testq	%r15, %r15
	je	LBB0_6
## %bb.5:
	movq	%r14, -48(%rbp)
	leaq	-72(%rbp), %r8
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_elf_search_and_load_file
	movq	%rax, -56(%rbp)
LBB0_6:
	testq	%rax, %rax
	je	LBB0_7
LBB0_3:
	movq	-72(%rbp), %rdi
	callq	_assert
	movq	-72(%rbp), %r14
	jmp	LBB0_8
LBB0_7:
	xorl	%r14d, %r14d
LBB0_8:
	movq	%r14, %rax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%p %s %08lx)\n"

	.comm	_ELF_INFO_MODULE,4,2            ## @ELF_INFO_MODULE
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_elf_load_cb,4,2                ## @elf_load_cb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elf_load_module                ; -- Begin function elf_load_module
	.p2align	2
_elf_load_module:                       ; @elf_load_module
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_debugstr_w
	mov	x2, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x3, x21
	bl	_TRACE
Lloh2:
	adrp	x8, _ELF_INFO_MODULE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ELF_INFO_MODULE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #16]
Lloh5:
	adrp	x22, _FALSE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _FALSE@GOTPAGEOFF]
	ldr	x0, [x22]
	str	x0, [sp, #24]
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.1:
	str	x19, [sp, #40]
	mov	x0, x20
	mov	w1, #47
	bl	_strrchrW
	add	x8, x0, #4
	cmp	x0, #0
	csel	x8, x20, x8, eq
	ldr	x9, [x22]
	stp	x9, x8, [sp, #24]
Lloh7:
	adrp	x8, _elf_load_cb@GOTPAGE
Lloh8:
	ldr	x8, [x8, _elf_load_cb@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, #0
	bl	_elf_enum_modules_internal
	mov	x8, x0
	mov	x0, #0
	ldr	x9, [sp, #24]
	cmp	w8, #0
	ccmp	x9, #0, #4, ne
	b.eq	LBB0_3
LBB0_2:
	ldr	x0, [sp, #8]
	bl	_assert
	ldr	x0, [sp, #8]
LBB0_3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_4:
	cbz	x21, LBB0_6
; %bb.5:
	str	x20, [sp, #32]
	add	x4, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	w3, #0
	bl	_elf_search_and_load_file
	str	x0, [sp, #24]
LBB0_6:
	cbnz	x0, LBB0_2
	b	LBB0_3
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%p %s %08lx)\n"

	.comm	_ELF_INFO_MODULE,4,2            ; @ELF_INFO_MODULE
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_elf_load_cb,4,2                ; @elf_load_cb
.subsections_via_symbols
