	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pe_getbuffer                   ## -- Begin function pe_getbuffer
	.p2align	4, 0x90
_pe_getbuffer:                          ## @pe_getbuffer
	.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_1
## %bb.4:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_LIBPE_F_LOAD_SECTION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_5
LBB0_11:
	testq	%r14, %r14
	je	LBB0_13
## %bb.12:
	movq	_sb_next@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_STAILQ_NEXT                    ## TAILCALL
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movq	8(%rbx), %rdi
	movl	(%rdi), %eax
	movq	_LIBPE_F_FD_DONE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movq	_EACCES@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_3:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_13:
	addq	$4, %rbx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_STAILQ_FIRST                   ## TAILCALL
LBB0_7:
	movq	_LIBPE_F_SPECIAL_FILE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:
	callq	_libpe_load_all_sections
	testq	%rax, %rax
	jns	LBB0_11
	jmp	LBB0_3
LBB0_9:
	movq	%rbx, %rsi
	callq	_libpe_load_section
	testq	%rax, %rax
	jns	LBB0_11
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_LIBPE_F_LOAD_SECTION,4,2       ## @LIBPE_F_LOAD_SECTION
	.comm	_LIBPE_F_FD_DONE,4,2            ## @LIBPE_F_FD_DONE
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_LIBPE_F_SPECIAL_FILE,4,2       ## @LIBPE_F_SPECIAL_FILE
	.comm	_sb_next,4,2                    ## @sb_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pe_getbuffer                   ; -- Begin function pe_getbuffer
	.p2align	2
_pe_getbuffer:                          ; @pe_getbuffer
	.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_4
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _LIBPE_F_LOAD_SECTION@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LIBPE_F_LOAD_SECTION@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
LBB0_2:
	cbz	x19, LBB0_9
; %bb.3:
Lloh3:
	adrp	x8, _sb_next@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sb_next@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_STAILQ_NEXT
LBB0_4:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	ldr	x0, [x20, #8]
	ldr	w8, [x0]
Lloh8:
	adrp	x9, _LIBPE_F_FD_DONE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _LIBPE_F_FD_DONE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.6:
Lloh11:
	adrp	x8, _EACCES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _errno@GOTPAGE
Lloh14:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh15:
	str	w8, [x9]
LBB0_8:
	mov	x0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	add	x0, x20, #4
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_STAILQ_FIRST
LBB0_10:
Lloh16:
	adrp	x9, _LIBPE_F_SPECIAL_FILE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _LIBPE_F_SPECIAL_FILE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	bl	_libpe_load_all_sections
	tbz	x0, #63, LBB0_2
	b	LBB0_8
LBB0_12:
	mov	x1, x20
	bl	_libpe_load_section
	tbz	x0, #63, LBB0_2
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_LIBPE_F_LOAD_SECTION,4,2       ; @LIBPE_F_LOAD_SECTION
	.comm	_LIBPE_F_FD_DONE,4,2            ; @LIBPE_F_FD_DONE
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_LIBPE_F_SPECIAL_FILE,4,2       ; @LIBPE_F_SPECIAL_FILE
	.comm	_sb_next,4,2                    ; @sb_next
.subsections_via_symbols
