	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_or_wait
_read_or_wait:                          ## @read_or_wait
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	_PqGSSRecvLength@GOTPCREL(%rip), %r12
	movq	(%r12), %rbx
	cmpq	%rsi, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	_PqGSSRecvBuffer@GOTPCREL(%rip), %r13
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rax
	movq	(%r13), %rsi
	addq	%rax, %rsi
	movq	%r15, %rdx
	subq	%rax, %rdx
	movq	%r14, %rdi
	callq	_secure_raw_read
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_12
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	addq	(%r12), %rbx
	movq	%rbx, (%r12)
	cmpq	%r15, %rbx
	je	LBB0_1
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdx
	subq	%rbx, %rdx
	addq	(%r13), %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_secure_raw_read
	movq	%rax, %rbx
	testq	%rax, %rax
	js	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	jne	LBB0_4
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_MyLatch@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_WL_EXIT_ON_PM_DEATH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WL_SOCKET_READABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	(%r14), %edx
	movq	_WAIT_EVENT_GSS_OPEN_SERVER@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%ecx, %ecx
	callq	_WaitLatchOrSocket
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rbx
	cmpq	%r15, %rbx
	jne	LBB0_5
	jmp	LBB0_1
LBB0_12:
	movq	$-1, %r15
LBB0_1:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PqGSSRecvLength,8,3            ## @PqGSSRecvLength
	.comm	_PqGSSRecvBuffer,8,3            ## @PqGSSRecvBuffer
	.comm	_errno,8,3                      ## @errno
	.comm	_EWOULDBLOCK,8,3                ## @EWOULDBLOCK
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.comm	_MyLatch,4,2                    ## @MyLatch
	.comm	_WL_SOCKET_READABLE,4,2         ## @WL_SOCKET_READABLE
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ## @WL_EXIT_ON_PM_DEATH
	.comm	_WAIT_EVENT_GSS_OPEN_SERVER,4,2 ## @WAIT_EVENT_GSS_OPEN_SERVER
	.no_dead_strip	_read_or_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_or_wait
_read_or_wait:                          ; @read_or_wait
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
Lloh0:
	adrp	x22, _PqGSSRecvLength@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PqGSSRecvLength@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x8, x1
	b.eq	LBB0_10
; %bb.1:
	mov	x20, x0
Lloh2:
	adrp	x23, _PqGSSRecvBuffer@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PqGSSRecvBuffer@GOTPAGEOFF]
Lloh4:
	adrp	x26, _EAGAIN@GOTPAGE
Lloh5:
	ldr	x26, [x26, _EAGAIN@GOTPAGEOFF]
Lloh6:
	adrp	x27, _MyLatch@GOTPAGE
Lloh7:
	ldr	x27, [x27, _MyLatch@GOTPAGEOFF]
Lloh8:
	adrp	x28, _WL_SOCKET_READABLE@GOTPAGE
Lloh9:
	ldr	x28, [x28, _WL_SOCKET_READABLE@GOTPAGEOFF]
Lloh10:
	adrp	x24, _WL_EXIT_ON_PM_DEATH@GOTPAGE
Lloh11:
	ldr	x24, [x24, _WL_EXIT_ON_PM_DEATH@GOTPAGEOFF]
Lloh12:
	adrp	x25, _WAIT_EVENT_GSS_OPEN_SERVER@GOTPAGE
Lloh13:
	ldr	x25, [x25, _WAIT_EVENT_GSS_OPEN_SERVER@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x23]
	ldr	x9, [x22]
	add	x1, x9, x8
	sub	x2, x19, x9
	mov	x0, x20
	bl	_secure_raw_read
	mov	x21, x0
	cbz	x0, LBB0_9
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x22]
	add	x8, x8, x21
	str	x8, [x22]
	cmp	x8, x19
	b.eq	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23]
	add	x1, x9, x8
	sub	x2, x19, x8
	mov	x0, x20
	bl	_secure_raw_read
	mov	x21, x0
	tbnz	x0, #63, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	x21, LBB0_3
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _EWOULDBLOCK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _EWOULDBLOCK@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	x10, [x26]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x27]
	ldr	w8, [x28]
	ldr	w9, [x24]
	orr	w1, w9, w8
	ldr	w2, [x20]
	ldr	w4, [x25]
	mov	w3, #0
	bl	_WaitLatchOrSocket
	cbz	x21, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x22]
	cmp	x8, x19
	b.ne	LBB0_4
	b	LBB0_10
LBB0_9:
	mov	x19, #-1
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PqGSSRecvLength,8,3            ; @PqGSSRecvLength
	.comm	_PqGSSRecvBuffer,8,3            ; @PqGSSRecvBuffer
	.comm	_errno,8,3                      ; @errno
	.comm	_EWOULDBLOCK,8,3                ; @EWOULDBLOCK
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.comm	_MyLatch,4,2                    ; @MyLatch
	.comm	_WL_SOCKET_READABLE,4,2         ; @WL_SOCKET_READABLE
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ; @WL_EXIT_ON_PM_DEATH
	.comm	_WAIT_EVENT_GSS_OPEN_SERVER,4,2 ; @WAIT_EVENT_GSS_OPEN_SERVER
	.no_dead_strip	_read_or_wait
.subsections_via_symbols
