	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sock_discard                   ## -- Begin function sock_discard
	.p2align	4, 0x90
_sock_discard:                          ## @sock_discard
	.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
	movl	$32776, %eax                    ## imm = 0x8008
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movl	%esi, %ebx
	movl	%edi, %r12d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpl	$32769, %esi                    ## imm = 0x8001
	jl	LBB0_5
## %bb.1:
	leaq	-32816(%rbp), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SOCK_RECEIVEALL_YES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r12d, %edi
	movq	%r13, %rsi
	movl	$32768, %edx                    ## imm = 0x8000
	movq	%r15, %r8
	movl	%r14d, %r9d
	callq	_sock_recv
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-32768(%rbx), %edx
	cmpl	$65536, %ebx                    ## imm = 0x10000
	movl	%edx, %ebx
	jg	LBB0_2
## %bb.4:
	testl	%edx, %edx
	jne	LBB0_6
	jmp	LBB0_7
LBB0_5:
	movl	%ebx, %edx
	testl	%edx, %edx
	je	LBB0_7
LBB0_6:
	movq	_SOCK_RECEIVEALL_YES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-32816(%rbp), %rsi
	movl	%r12d, %edi
	movq	%r15, %r8
	movl	%r14d, %r9d
	callq	_sock_recv
	cmpl	$-1, %eax
	je	LBB0_9
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_SOCK_DEBUG_MESSAGE
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_9:
	movl	$-1, %eax
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_12
## %bb.11:
	addq	$32776, %rsp                    ## imm = 0x8008
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_RECEIVEALL_YES,4,2        ## @SOCK_RECEIVEALL_YES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I'm currently discarding data\n"

	.comm	_TEMP_BUF_SIZE,4,2              ## @TEMP_BUF_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sock_discard                   ; -- Begin function sock_discard
	.p2align	2
_sock_discard:                          ; @sock_discard
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	w9, #32784
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #8, lsl #12             ; =32768
	sub	sp, sp, #16
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	cmp	w1, #8, lsl #12                 ; =32768
	b.le	LBB0_5
; %bb.1:
Lloh5:
	adrp	x23, _SOCK_RECEIVEALL_YES@GOTPAGE
Lloh6:
	ldr	x23, [x23, _SOCK_RECEIVEALL_YES@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x23]
	add	x1, sp, #8
	mov	x0, x21
	mov	w2, #32768
	mov	x4, x20
	mov	x5, x19
	bl	_sock_recv
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w2, w22, #8, lsl #12            ; =32768
	cmp	w22, #16, lsl #12               ; =65536
	mov	x22, x2
	b.gt	LBB0_2
; %bb.4:
	cbnz	w2, LBB0_6
	b	LBB0_7
LBB0_5:
	mov	x2, x22
	cbz	w2, LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _SOCK_RECEIVEALL_YES@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SOCK_RECEIVEALL_YES@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	add	x1, sp, #8
	mov	x0, x21
	mov	x4, x20
	mov	x5, x19
	bl	_sock_recv
	cmn	w0, #1
	b.eq	LBB0_8
LBB0_7:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_SOCK_DEBUG_MESSAGE
	mov	w0, #0
LBB0_8:
	ldur	x8, [x29, #-56]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	add	sp, sp, #8, lsl #12             ; =32768
	add	sp, sp, #16
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_RECEIVEALL_YES,4,2        ; @SOCK_RECEIVEALL_YES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I'm currently discarding data\n"

	.comm	_TEMP_BUF_SIZE,4,2              ; @TEMP_BUF_SIZE
.subsections_via_symbols
