	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sock_recv_dgram                ## -- Begin function sock_recv_dgram
	.p2align	4, 0x90
_sock_recv_dgram:                       ## @sock_recv_dgram
	.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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movl	%r8d, %r14d
	movq	%rcx, %r15
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rdx, %rcx
	jae	LBB0_5
## %bb.3:
	movl	$-1, %ebx
	testq	%r15, %r15
	je	LBB0_8
## %bb.4:
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_pcap_snprintf
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_SOCK_DEBUG_MESSAGE
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	xorps	%xmm0, %xmm0
	movups	%xmm0, -56(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	leaq	-40(%rbp), %rax
	movq	%rax, -64(%rbp)
	movl	$1, -88(%rbp)
	leaq	-88(%rbp), %rsi
	xorl	%edx, %edx
	callq	_recvmsg
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.6:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINTR@GOTPCREL(%rip), %rcx
	movl	$-3, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_sock_geterror
	movl	$-1, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I have been requested to read zero bytes"

	.comm	_INT_MAX,8,3                    ## @INT_MAX
L_.str.1:                               ## @.str.1
	.asciz	"Can't read more than %u bytes with sock_recv_dgram"

	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
L_.str.2:                               ## @.str.2
	.asciz	"recv(): "

	.comm	_MSG_TRUNC,4,2                  ## @MSG_TRUNC
	.comm	_SOCKET_ERROR,4,2               ## @SOCKET_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sock_recv_dgram                ; -- Begin function sock_recv_dgram
	.p2align	2
_sock_recv_dgram:                       ; @sock_recv_dgram
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	cbz	x2, LBB0_4
; %bb.1:
	mov	x19, x4
	mov	x20, x3
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x2
	b.hs	LBB0_5
; %bb.2:
	cbz	x20, LBB0_9
; %bb.3:
	str	x8, [sp]
Lloh3:
	adrp	x2, l_.str.1@PAGE
Lloh4:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	bl	_pcap_snprintf
	b	LBB0_9
LBB0_4:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_SOCK_DEBUG_MESSAGE
	mov	w0, #0
	b	LBB0_10
LBB0_5:
	stp	xzr, xzr, [sp, #64]
	stp	x2, x1, [sp, #16]
	add	x8, sp, #16
	str	x8, [sp, #56]
	mov	w8, #1
	str	w8, [sp, #32]
	add	x1, sp, #32
	mov	w2, #0
	bl	_recvmsg
	cmn	w0, #1
	b.ne	LBB0_10
; %bb.6:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _EINTR@GOTPAGE
Lloh11:
	ldr	x9, [x9, _EINTR@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	mov	w0, #-3
	b	LBB0_10
LBB0_8:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	bl	_sock_geterror
LBB0_9:
	mov	w0, #-1
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I have been requested to read zero bytes"

	.comm	_INT_MAX,8,3                    ; @INT_MAX
l_.str.1:                               ; @.str.1
	.asciz	"Can't read more than %u bytes with sock_recv_dgram"

	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
l_.str.2:                               ; @.str.2
	.asciz	"recv(): "

	.comm	_MSG_TRUNC,4,2                  ; @MSG_TRUNC
	.comm	_SOCKET_ERROR,4,2               ; @SOCKET_ERROR
.subsections_via_symbols
