	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pe_load_native_module          ## -- Begin function pe_load_native_module
	.p2align	4, 0x90
_pe_load_native_module:                 ## @pe_load_native_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	%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
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_MAX_PATH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movb	$0, (%r14)
	testq	%r13, %r13
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.3:
	testq	%rbx, %rbx
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_strcpyW
	jmp	LBB0_7
LBB0_1:
	movq	%rbx, %rdi
	callq	_assert
	movl	(%r12), %esi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_FindExecutableImageExW
	testq	%rax, %rax
	je	LBB0_22
## %bb.2:
	movq	%rax, %r13
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
LBB0_5:
	movq	_dbghelp_options@GOTPCREL(%rip), %rax
	movq	_SYMOPT_DEFERRED_LOADS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_FIXME
LBB0_7:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_22
## %bb.8:
	movq	%rax, %r15
	movq	%rax, %rsi
	addq	$32, %rsi
	movq	%rsi, (%rax)
	movq	_DMT_PE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r13, %rdi
	callq	_pe_map_file
	testq	%rax, %rax
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_19
## %bb.9:
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	testq	%r8, %r8
	jne	LBB0_11
## %bb.10:
	movq	(%r15), %rax
	movq	(%rax), %r8
LBB0_11:
	movq	(%r15), %rax
	movl	-60(%rbp), %r9d                 ## 4-byte Reload
	testl	%r9d, %r9d
	jne	LBB0_13
## %bb.12:
	movl	12(%rax), %r9d
LBB0_13:
	movl	(%rbx), %edx
	movq	_FALSE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	8(%rax), %ebx
	movl	16(%rax), %eax
	movq	%r14, %rsi
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	pushq	%rbx
	pushq	%rax
	callq	_module_new
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_18
## %bb.14:
	movq	%rax, %r12
	movq	%rax, 24(%r15)
	movq	_pe_module_remove@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	$0, 8(%r15)
	movq	16(%r12), %rax
	movq	_DFI_PE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%r15, (%rax,%rcx,8)
	movq	_dbghelp_options@GOTPCREL(%rip), %rax
	movq	_SYMOPT_DEFERRED_LOADS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_16
## %bb.15:
	movq	_SymDeferred@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	jmp	LBB0_17
LBB0_18:
	movq	%r14, %rdi
	callq	_debugstr_w
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_ERR
	movq	(%r15), %rdi
	callq	_pe_unmap_file
LBB0_19:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_HeapFree
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_22
LBB0_21:
	movq	%r13, %rdi
	callq	_CloseHandle
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.23:
	movq	%r12, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_pe_load_debug_info
LBB0_17:
	movq	(%r15), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	subq	(%rax), %rcx
	movq	%rcx, (%r12)
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_21
	jmp	LBB0_22
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_MAX_PATH,4,2                   ## @MAX_PATH
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_dbghelp_options,4,2            ## @dbghelp_options
	.comm	_SYMOPT_DEFERRED_LOADS,4,2      ## @SYMOPT_DEFERRED_LOADS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Trouble ahead (no module name passed in deferred mode)\n"

	.comm	_DMT_PE,4,2                     ## @DMT_PE
	.comm	_pe_module_remove,4,2           ## @pe_module_remove
	.comm	_DFI_PE,8,3                     ## @DFI_PE
	.comm	_SymDeferred,4,2                ## @SymDeferred
L_.str.1:                               ## @.str.1
	.asciz	"could not load the module '%s'\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pe_load_native_module          ; -- Begin function pe_load_native_module
	.p2align	2
_pe_load_native_module:                 ; @pe_load_native_module
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x22, x4
	mov	x20, x3
	mov	x19, x2
	mov	x24, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x26, _FALSE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _FALSE@GOTPAGEOFF]
	ldr	x25, [x26]
Lloh5:
	adrp	x8, _MAX_PATH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX_PATH@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x23, x9, x8
	mov	sp, x23
	strb	wzr, [x23]
	cbz	x2, LBB0_3
; %bb.1:
	cbz	x24, LBB0_5
; %bb.2:
	mov	x0, x23
	mov	x1, x24
	bl	_strcpyW
	b	LBB0_7
LBB0_3:
	mov	x0, x24
	bl	_assert
	ldr	w1, [x21]
	mov	x0, x24
	mov	x2, x23
	mov	x3, #0
	mov	x4, #0
	bl	_FindExecutableImageExW
	cbz	x0, LBB0_14
; %bb.4:
	mov	x19, x0
Lloh10:
	adrp	x8, _TRUE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh12:
	ldr	x25, [x8]
	b	LBB0_7
LBB0_5:
Lloh13:
	adrp	x8, _dbghelp_options@GOTPAGE
Lloh14:
	ldr	x8, [x8, _dbghelp_options@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _SYMOPT_DEFERRED_LOADS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SYMOPT_DEFERRED_LOADS@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
LBB0_7:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	w2, #56
	bl	_HeapAlloc
	cbz	x0, LBB0_14
; %bb.8:
	mov	x24, x0
	add	x1, x0, #32
	str	x1, [x0]
Lloh21:
	adrp	x27, _DMT_PE@GOTPAGE
Lloh22:
	ldr	x27, [x27, _DMT_PE@GOTPAGEOFF]
	ldr	w2, [x27]
	mov	x0, x19
	bl	_pe_map_file
	cbz	x0, LBB0_18
; %bb.9:
	cbz	x20, LBB0_15
; %bb.10:
	ldr	x8, [x24]
	cbz	w22, LBB0_16
LBB0_11:
	ldr	w2, [x27]
	ldr	x3, [x26]
	ldr	w6, [x8, #16]
	ldr	w7, [x8, #8]
	mov	x0, x21
	mov	x1, x23
	mov	x4, x20
	mov	x5, x22
	bl	_module_new
	cbz	x0, LBB0_17
; %bb.12:
	mov	x22, x0
	str	x0, [x24, #24]
Lloh23:
	adrp	x8, _pe_module_remove@GOTPAGE
Lloh24:
	ldr	x8, [x8, _pe_module_remove@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	xzr, [x24, #8]
Lloh26:
	adrp	x9, _DFI_PE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _DFI_PE@GOTPAGEOFF]
	ldr	x10, [x0, #16]
Lloh28:
	ldr	x9, [x9]
	str	x24, [x10, x9, lsl #3]
Lloh29:
	adrp	x9, _dbghelp_options@GOTPAGE
Lloh30:
	ldr	x9, [x9, _dbghelp_options@GOTPAGEOFF]
	str	w8, [x24, #16]
Lloh31:
	ldr	w8, [x9]
Lloh32:
	adrp	x9, _SYMOPT_DEFERRED_LOADS@GOTPAGE
Lloh33:
	ldr	x9, [x9, _SYMOPT_DEFERRED_LOADS@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_22
; %bb.13:
Lloh35:
	adrp	x8, _SymDeferred@GOTPAGE
Lloh36:
	ldr	x8, [x8, _SymDeferred@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	str	w8, [x22, #8]
	b	LBB0_23
LBB0_14:
	mov	x22, #0
	b	LBB0_20
LBB0_15:
	ldr	x8, [x24]
	ldr	x20, [x8]
	ldr	x8, [x24]
	cbnz	w22, LBB0_11
LBB0_16:
	ldr	w22, [x8, #12]
	b	LBB0_11
LBB0_17:
	mov	x0, x23
	bl	_debugstr_w
	mov	x1, x0
Lloh38:
	adrp	x0, l_.str.1@PAGE
Lloh39:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	ldr	x0, [x24]
	bl	_pe_unmap_file
LBB0_18:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x24
	bl	_HeapFree
	mov	x22, #0
	cbz	x25, LBB0_20
LBB0_19:
	mov	x0, x19
	bl	_CloseHandle
LBB0_20:
	ldur	x8, [x29, #-88]
Lloh40:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh41:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.21:
	mov	x0, x22
	sub	sp, x29, #80
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
	mov	x0, x21
	mov	x1, x22
	bl	_pe_load_debug_info
LBB0_23:
	ldr	x8, [x24]
	ldr	x8, [x8]
	sub	x8, x20, x8
	str	x8, [x22]
	cbnz	x25, LBB0_19
	b	LBB0_20
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_MAX_PATH,4,2                   ; @MAX_PATH
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_dbghelp_options,4,2            ; @dbghelp_options
	.comm	_SYMOPT_DEFERRED_LOADS,4,2      ; @SYMOPT_DEFERRED_LOADS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Trouble ahead (no module name passed in deferred mode)\n"

	.comm	_DMT_PE,4,2                     ; @DMT_PE
	.comm	_pe_module_remove,4,2           ; @pe_module_remove
	.comm	_DFI_PE,8,3                     ; @DFI_PE
	.comm	_SymDeferred,4,2                ; @SymDeferred
l_.str.1:                               ; @.str.1
	.asciz	"could not load the module '%s'\n"

.subsections_via_symbols
