	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pe_update_section_header       ## -- Begin function pe_update_section_header
	.p2align	4, 0x90
_pe_update_section_header:              ## @pe_update_section_header
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.4:
	movq	8(%rdi), %rax
	movq	(%rax), %rcx
	movq	_PE_C_READ@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_6
## %bb.5:
	movl	8(%rax), %ecx
	movq	_LIBPE_F_FD_DONE@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	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
	popq	%rbp
	retq
LBB0_7:
	movl	(%rsi), %edx
	movl	%edx, (%rdi)
	movq	_LIBPE_F_DIRTY_SEC_HEADER@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, 8(%rax)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.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	_LIBPE_F_DIRTY_SEC_HEADER,4,2   ## @LIBPE_F_DIRTY_SEC_HEADER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pe_update_section_header       ; -- Begin function pe_update_section_header
	.p2align	2
_pe_update_section_header:              ; @pe_update_section_header
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_5
; %bb.1:
	cbz	x1, LBB0_5
; %bb.2:
	ldr	x9, [x0, #8]
	ldr	x8, [x9]
Lloh0:
	adrp	x10, _PE_C_READ@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PE_C_READ@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x8, x10
	b.eq	LBB0_4
; %bb.3:
	ldr	w10, [x9, #8]
Lloh3:
	adrp	x8, _LIBPE_F_FD_DONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LIBPE_F_FD_DONE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w10
	b.eq	LBB0_7
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
	ret
LBB0_7:
	ldr	w11, [x1]
	str	w11, [x0]
Lloh13:
	adrp	x11, _LIBPE_F_DIRTY_SEC_HEADER@GOTPAGE
Lloh14:
	ldr	x11, [x11, _LIBPE_F_DIRTY_SEC_HEADER@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x11]
	orr	w10, w11, w10
	str	w10, [x9, #8]
	mov	w0, #0
	ret
	.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
	.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	_LIBPE_F_DIRTY_SEC_HEADER,4,2   ; @LIBPE_F_DIRTY_SEC_HEADER
.subsections_via_symbols
