	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PxeRead
_PxeRead:                               ## @PxeRead
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	$0, (%rcx)
	movq	__OpenFile@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EBADF@GOTPCREL(%rip), %rdx
	cmpq	%rdi, %rax
	jne	LBB0_11
## %bb.1:
	movq	_NO_FILE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.2:
	movq	%rsi, %r15
	leaq	-56(%rbp), %rdi
	movl	$16, %esi
	callq	_RtlZeroMemory
	movq	__Packet@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movzwl	%ax, %ecx
	shrl	$4, %eax
	andl	$61440, %eax                    ## imm = 0xF000
	movl	%eax, -48(%rbp)
	movl	%ecx, -44(%rbp)
	movq	_ESUCCESS@GOTPCREL(%rip), %rdx
	testq	%r12, %r12
	jle	LBB0_11
## %bb.3:
	movq	__CachedLength@GOTPCREL(%rip), %r14
	movq	(%r14), %rbx
	movq	__PacketPosition@GOTPCREL(%rip), %rsi
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%r15,%rbx,4), %r15
	movq	(%r14), %rbx
	movq	%r13, %rsi
	movq	%rbx, (%r13)
	addq	-56(%rbp), %rbx
	movq	%rbx, (%r14)
	testq	%r12, %r12
	jle	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	__FilePosition@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subq	%rax, %rbx
	cmpq	%rbx, %r12
	cmovlq	%r12, %rbx
	movq	__CachedFile@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	__Packet@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	addq	%rax, %rdx
	movq	%rsi, %r13
	subq	(%rsi), %rdx
	testq	%rcx, %rcx
	leaq	(%rcx,%rax,4), %rsi
	cmoveq	%rdx, %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_RtlCopyMemory
	movq	__FilePosition@GOTPCREL(%rip), %rax
	addq	%rbx, (%rax)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	%rbx, (%rax)
	subq	%rbx, %r12
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_PXENV_TFTP_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rsi
	callq	_CallPxe
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	__CachedFile@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rcx
	leaq	(%rax,%rcx,4), %rdi
	movq	__Packet@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	-56(%rbp), %rdx
	callq	_RtlCopyMemory
	jmp	LBB0_9
LBB0_10:
	movq	_ESUCCESS@GOTPCREL(%rip), %rdx
	jmp	LBB0_11
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rdx
LBB0_11:
	movl	(%rdx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__OpenFile,8,3                  ## @_OpenFile
	.comm	_NO_FILE,8,3                    ## @NO_FILE
	.comm	_EBADF,4,2                      ## @EBADF
	.comm	__Packet,8,3                    ## @_Packet
	.comm	__CachedLength,8,3              ## @_CachedLength
	.comm	__FilePosition,8,3              ## @_FilePosition
	.comm	__CachedFile,8,3                ## @_CachedFile
	.comm	__PacketPosition,8,3            ## @_PacketPosition
	.comm	_PXENV_TFTP_READ,4,2            ## @PXENV_TFTP_READ
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ESUCCESS,4,2                   ## @ESUCCESS
	.no_dead_strip	_PxeRead
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PxeRead
_PxeRead:                               ; @PxeRead
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	xzr, [x3]
Lloh0:
	adrp	x8, __OpenFile@GOTPAGE
Lloh1:
	ldr	x8, [x8, __OpenFile@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _NO_FILE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NO_FILE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x0
	ccmp	x8, x9, #4, eq
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _EBADF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
	b	LBB0_11
LBB0_2:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x0, sp
	mov	w1, #16
	bl	_RtlZeroMemory
Lloh8:
	adrp	x24, __Packet@GOTPAGE
Lloh9:
	ldr	x24, [x24, __Packet@GOTPAGEOFF]
	ldr	w8, [x24]
	lsr	w9, w8, #4
	and	w9, w9, #0xf000
	and	w8, w8, #0xffff
	stp	w9, w8, [sp, #8]
	cmp	x20, #1
	b.lt	LBB0_9
; %bb.3:
Lloh10:
	adrp	x25, __CachedLength@GOTPAGE
Lloh11:
	ldr	x25, [x25, __CachedLength@GOTPAGEOFF]
	ldr	x8, [x25]
Lloh12:
	adrp	x26, __FilePosition@GOTPAGE
Lloh13:
	ldr	x26, [x26, __FilePosition@GOTPAGEOFF]
Lloh14:
	adrp	x27, __CachedFile@GOTPAGE
Lloh15:
	ldr	x27, [x27, __CachedFile@GOTPAGEOFF]
Lloh16:
	adrp	x28, __PacketPosition@GOTPAGE
Lloh17:
	ldr	x28, [x28, __PacketPosition@GOTPAGEOFF]
Lloh18:
	adrp	x23, _PXENV_TFTP_READ@GOTPAGE
Lloh19:
	ldr	x23, [x23, _PXENV_TFTP_READ@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, x22, lsl #2
	ldr	x8, [x25]
	str	x8, [x28]
	ldr	x9, [sp]
	add	x8, x9, x8
	str	x8, [x25]
	cmp	x20, #0
	b.le	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x26]
	sub	x8, x8, x9
	cmp	x20, x8
	csel	x22, x20, x8, lt
	ldr	x8, [x27]
	ldr	x10, [x24]
	ldr	x11, [x28]
	add	x10, x10, x9
	sub	x10, x10, x11
	add	x9, x8, x9, lsl #2
	cmp	x8, #0
	csel	x1, x10, x9, eq
	mov	x0, x21
	mov	x2, x22
	bl	_RtlCopyMemory
	ldr	x8, [x26]
	add	x8, x8, x22
	str	x8, [x26]
	ldr	x8, [x19]
	add	x8, x8, x22
	str	x8, [x19]
	subs	x20, x20, x22
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x23]
	mov	x1, sp
	bl	_CallPxe
	cbz	w0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x27]
	cbz	x8, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x25]
	add	x0, x8, x9, lsl #2
	ldr	x1, [x24]
	ldr	x2, [sp]
	bl	_RtlCopyMemory
	b	LBB0_4
LBB0_9:
Lloh20:
	adrp	x8, _ESUCCESS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ESUCCESS@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh22:
	adrp	x8, _EIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	__OpenFile,8,3                  ; @_OpenFile
	.comm	_NO_FILE,8,3                    ; @NO_FILE
	.comm	_EBADF,4,2                      ; @EBADF
	.comm	__Packet,8,3                    ; @_Packet
	.comm	__CachedLength,8,3              ; @_CachedLength
	.comm	__FilePosition,8,3              ; @_FilePosition
	.comm	__CachedFile,8,3                ; @_CachedFile
	.comm	__PacketPosition,8,3            ; @_PacketPosition
	.comm	_PXENV_TFTP_READ,4,2            ; @PXENV_TFTP_READ
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ESUCCESS,4,2                   ; @ESUCCESS
	.no_dead_strip	_PxeRead
.subsections_via_symbols
