	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pe_map_directory               ## -- Begin function pe_map_directory
	.p2align	4, 0x90
_pe_map_directory:                      ## @pe_map_directory
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rax
	movq	_DMT_PE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.1:
	movq	8(%rdi), %rax
	movq	_DFI_PE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.2:
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	_IMAGE_NUMBEROF_DIRECTORY_ENTRIES@GOTPCREL(%rip), %rdx
	cmpl	%esi, (%rdx)
	jle	LBB0_8
## %bb.3:
	movq	(%rcx), %rdi
	leaq	-24(%rbp), %rsi
	callq	_pe_map_full
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	-24(%rbp), %rdi
	movq	(%rdi), %rcx
	movslq	%ebx, %rdx
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	movl	4(%rcx,%rdx,8), %esi
	movl	%esi, (%r14)
LBB0_6:
	movl	(%rcx,%rdx,8), %edx
	movq	%rax, %rsi
	xorl	%ecx, %ecx
	callq	_RtlImageRvaToVa
	jmp	LBB0_8
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMT_PE,8,3                     ## @DMT_PE
	.comm	_DFI_PE,8,3                     ## @DFI_PE
	.comm	_IMAGE_NUMBEROF_DIRECTORY_ENTRIES,4,2 ## @IMAGE_NUMBEROF_DIRECTORY_ENTRIES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pe_map_directory               ; -- Begin function pe_map_directory
	.p2align	2
_pe_map_directory:                      ; @pe_map_directory
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _DMT_PE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMT_PE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x20, x1
	ldr	x8, [x0, #8]
Lloh3:
	adrp	x9, _DFI_PE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DFI_PE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
Lloh6:
	adrp	x9, _IMAGE_NUMBEROF_DIRECTORY_ENTRIES@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IMAGE_NUMBEROF_DIRECTORY_ENTRIES@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	x8, #0
	ccmp	w9, w1, #4, ne
	b.gt	LBB0_4
LBB0_2:
	mov	x0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	mov	x19, x2
	ldr	x0, [x8]
	add	x1, sp, #8
	bl	_pe_map_full
	cbz	x0, LBB0_3
; %bb.5:
	mov	x1, x0
	ldr	x0, [sp, #8]
	ldr	x8, [x0]
	sxtw	x9, w20
	cbz	x19, LBB0_7
; %bb.6:
	add	x10, x8, x9, lsl #3
	ldr	w10, [x10, #4]
	str	w10, [x19]
LBB0_7:
	lsl	x9, x9, #3
	ldr	w2, [x8, x9]
	mov	x3, #0
	bl	_RtlImageRvaToVa
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DMT_PE,8,3                     ; @DMT_PE
	.comm	_DFI_PE,8,3                     ; @DFI_PE
	.comm	_IMAGE_NUMBEROF_DIRECTORY_ENTRIES,4,2 ; @IMAGE_NUMBEROF_DIRECTORY_ENTRIES
.subsections_via_symbols
