	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function elf_load_file
_elf_load_file:                         ## @elf_load_file
	.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	%r8, %r15
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rsi, %rdi
	callq	_debugstr_w
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movq	%r12, %rdx
	callq	_TRACE
	movq	_from_file@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	%rbx, -72(%rbp)
	leaq	-72(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	callq	_elf_map_file
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	%r15, %r14
	testq	%r12, %r12
	jne	LBB0_4
## %bb.2:
	cmpl	$0, -48(%rbp)
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_debugstr_w
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_ERR
LBB0_4:
	leaq	-48(%rbp), %r15
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%r14, %r9
	callq	_elf_load_file_from_fmap
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_elf_unmap_file
LBB0_5:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Processing elf file '%s' at %08lx\n"

	.comm	_from_file,4,2                  ## @from_file
L_.str.1:                               ## @.str.1
	.asciz	"Relocatable ELF %s, but no load address. Loading at 0x0000000\n"

	.no_dead_strip	_elf_load_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function elf_load_file
_elf_load_file:                         ; @elf_load_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	mov	x0, x1
	bl	_debugstr_w
	mov	x1, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x21
	bl	_TRACE
Lloh5:
	adrp	x8, _from_file@GOTPAGE
Lloh6:
	ldr	x8, [x8, _from_file@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	str	x22, [sp, #8]
	add	x0, sp, #8
	add	x1, sp, #24
	bl	_elf_map_file
	cbz	w0, LBB0_5
; %bb.1:
	cbnz	x21, LBB0_4
; %bb.2:
	ldr	w8, [sp, #24]
	cbnz	w8, LBB0_4
; %bb.3:
	mov	x0, x22
	bl	_debugstr_w
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
LBB0_4:
	add	x2, sp, #24
	mov	x0, x23
	mov	x1, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_elf_load_file_from_fmap
	mov	x24, x0
	add	x0, sp, #24
	bl	_elf_unmap_file
LBB0_5:
	mov	x0, x24
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Processing elf file '%s' at %08lx\n"

	.comm	_from_file,4,2                  ; @from_file
l_.str.1:                               ; @.str.1
	.asciz	"Relocatable ELF %s, but no load address. Loading at 0x0000000\n"

	.no_dead_strip	_elf_load_file
.subsections_via_symbols
