	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pe_init                        ## -- Begin function pe_init
	.p2align	4, 0x90
_pe_init:                               ## @pe_init
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movl	%edi, %r12d
	movl	$1, %edi
	movl	$16, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	%r12d, (%rax)
	movl	%r15d, 4(%rax)
	movl	%r14d, 12(%rax)
	movq	%rax, %rdi
	addq	$8, %rdi
	callq	_STAILQ_INIT
	leal	-129(%r15), %eax
	cmpl	$2, %eax
	jae	LBB0_3
## %bb.7:
	movq	%rbx, %rdi
	callq	_libpe_open_object
	testl	%eax, %eax
	jns	LBB0_10
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_9
LBB0_3:
	cmpl	$128, %r15d
	jne	LBB0_6
## %bb.4:
	movq	_PE_O_PE32@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jg	LBB0_6
## %bb.5:
	movq	_PE_O_COFF@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jge	LBB0_10
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_8:
	movq	%rbx, %rdi
	callq	_pe_finish
LBB0_9:
	xorl	%ebx, %ebx
LBB0_10:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_errno,4,2                      ## @errno
	.comm	_PE_O_PE32,4,2                  ## @PE_O_PE32
	.comm	_PE_O_COFF,4,2                  ## @PE_O_COFF
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pe_init                        ; -- Begin function pe_init
	.p2align	2
_pe_init:                               ; @pe_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	w0, #1
	mov	w1, #16
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_3
; %bb.1:
	stp	w22, w21, [x19]
	add	x0, x19, #8
	str	w20, [x19, #12]
	bl	_STAILQ_INIT
	sub	w8, w21, #129
	cmp	w8, #2
	b.hs	LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_libpe_open_object
	tbz	w0, #31, LBB0_8
	b	LBB0_7
LBB0_3:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _errno@GOTPAGE
Lloh4:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh5:
	str	w8, [x9]
	b	LBB0_8
LBB0_4:
	cmp	w21, #128
	b.ne	LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _PE_O_PE32@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PE_O_PE32@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _PE_O_COFF@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PE_O_COFF@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w20
	ccmp	w9, w20, #8, le
	b.ge	LBB0_8
LBB0_6:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _errno@GOTPAGE
Lloh16:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh17:
	str	w8, [x9]
LBB0_7:
	mov	x0, x19
	bl	_pe_finish
	mov	x19, #0
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_errno,4,2                      ; @errno
	.comm	_PE_O_PE32,4,2                  ; @PE_O_PE32
	.comm	_PE_O_COFF,4,2                  ; @PE_O_COFF
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
