	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pe_update_data_dir             ## -- Begin function pe_update_data_dir
	.p2align	4, 0x90
_pe_update_data_dir:                    ## @pe_update_data_dir
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.4:
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_PE_C_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	_LIBPE_F_FD_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_7
LBB0_6:
	movq	_EACCES@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %eax
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:
	movl	$4, %edi
	callq	_malloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_9
LBB0_10:
	movl	(%r14), %ecx
	movl	%ecx, (%rax)
	movq	_LIBPE_F_DIRTY_OPT_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_PE_C_READ,8,3                  ## @PE_C_READ
	.comm	_LIBPE_F_FD_DONE,4,2            ## @LIBPE_F_FD_DONE
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_LIBPE_F_DIRTY_OPT_HEADER,4,2   ## @LIBPE_F_DIRTY_OPT_HEADER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pe_update_data_dir             ; -- Begin function pe_update_data_dir
	.p2align	2
_pe_update_data_dir:                    ; @pe_update_data_dir
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_5
; %bb.2:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PE_C_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PE_C_READ@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x9, _LIBPE_F_FD_DONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LIBPE_F_FD_DONE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
LBB0_4:
Lloh6:
	adrp	x8, _EACCES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _errno@GOTPAGE
Lloh11:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh12:
	str	w8, [x9]
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_10
; %bb.9:
	mov	w0, #4
	bl	_malloc
	mov	x8, x0
	str	x0, [x19, #16]
	cbz	x0, LBB0_11
LBB0_10:
	mov	w0, #0
	ldr	w9, [x20]
	str	w9, [x8]
Lloh13:
	adrp	x8, _LIBPE_F_DIRTY_OPT_HEADER@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LIBPE_F_DIRTY_OPT_HEADER@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_7
LBB0_11:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_PE_C_READ,8,3                  ; @PE_C_READ
	.comm	_LIBPE_F_FD_DONE,4,2            ; @LIBPE_F_FD_DONE
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_LIBPE_F_DIRTY_OPT_HEADER,4,2   ; @LIBPE_F_DIRTY_OPT_HEADER
.subsections_via_symbols
