	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_network_socket_read            ## -- Begin function network_socket_read
	.p2align	4, 0x90
_network_socket_read:                   ## @network_socket_read
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	movq	_NETWORK_SOCKET_SUCCESS@GOTPCREL(%rip), %r15
	testq	%rdi, %rdi
	jle	LBB0_9
## %bb.1:
	callq	_g_string_sized_new
	movq	%rax, %r14
	movq	16(%rbx), %rax
	movl	16(%rax), %edi
	movq	%r14, %rsi
	callq	_g_queue_push_tail
	movq	8(%rbx), %rax
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movl	32(%rbx), %edi
	movl	4(%r14), %esi
	movq	(%rbx), %rdx
	xorl	%ecx, %ecx
	callq	_recv
	jmp	LBB0_4
LBB0_3:
	movl	$4, -28(%rbp)
	movl	32(%rbx), %edi
	movl	4(%r14), %esi
	movq	(%rbx), %rdx
	movq	24(%rbx), %r8
	addq	$4, %r8
	leaq	-28(%rbp), %r9
	xorl	%ecx, %ecx
	callq	_recvfrom
	movl	-28(%rbp), %ecx
	movq	24(%rbx), %rdx
	movl	%ecx, (%rdx)
LBB0_4:
	movq	_NETWORK_SOCKET_WAIT_FOR_EVENT@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.6:
	movq	_errno@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	%edi, %eax
	andl	$-4, %eax
	cmpl	$128, %eax
	je	LBB0_10
## %bb.7:
	movq	_G_STRLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	callq	_g_strerror
	movl	(%rbx), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_g_debug
	movq	_NETWORK_SOCKET_ERROR@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_8:
	movslq	%eax, %rcx
	subq	%rcx, (%rbx)
	movq	16(%rbx), %rcx
	addl	%eax, (%rcx)
	movl	%eax, (%r14)
LBB0_9:
	movq	%r15, %rcx
LBB0_10:
	movl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_STREAM,8,3                ## @SOCK_STREAM
	.comm	_errno,4,2                      ## @errno
	.comm	_NETWORK_SOCKET_WAIT_FOR_EVENT,4,2 ## @NETWORK_SOCKET_WAIT_FOR_EVENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: recv() failed: %s (errno=%d)"

	.comm	_G_STRLOC,4,2                   ## @G_STRLOC
	.comm	_NETWORK_SOCKET_ERROR,4,2       ## @NETWORK_SOCKET_ERROR
	.comm	_NETWORK_SOCKET_SUCCESS,4,2     ## @NETWORK_SOCKET_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_network_socket_read            ; -- Begin function network_socket_read
	.p2align	2
_network_socket_read:                   ; @network_socket_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x0, [x0]
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.1:
	bl	_g_string_sized_new
	mov	x20, x0
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #16]
	mov	x1, x20
	bl	_g_queue_push_tail
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _SOCK_STREAM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SOCK_STREAM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	w0, [x19, #32]
	ldr	w1, [x20, #4]
	ldr	x2, [x19]
	mov	w3, #0
	bl	_recv
	cbnz	w0, LBB0_4
	b	LBB0_6
LBB0_3:
	mov	w8, #4
	str	w8, [sp, #12]
	ldr	w0, [x19, #32]
	ldr	w1, [x20, #4]
	ldr	x2, [x19]
	ldr	x8, [x19, #24]
	add	x4, x8, #4
	add	x5, sp, #12
	mov	w3, #0
	bl	_recvfrom
	ldr	w8, [sp, #12]
	ldr	x9, [x19, #24]
	str	w8, [x9]
	cbz	w0, LBB0_6
LBB0_4:
	cmn	w0, #1
	b.ne	LBB0_7
; %bb.5:
Lloh3:
	adrp	x20, _errno@GOTPAGE
Lloh4:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	w0, [x20]
	and	w8, w0, #0xfffffffc
	cmp	w8, #128
	b.ne	LBB0_10
LBB0_6:
Lloh5:
	adrp	x8, _NETWORK_SOCKET_WAIT_FOR_EVENT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NETWORK_SOCKET_WAIT_FOR_EVENT@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	ldr	x8, [x19]
	sub	x8, x8, w0, sxtw
	str	x8, [x19]
	ldr	x8, [x19, #16]
	ldr	w9, [x8]
	add	w9, w9, w0
	str	w9, [x8]
	str	w0, [x20]
LBB0_8:
Lloh7:
	adrp	x8, _NETWORK_SOCKET_SUCCESS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NETWORK_SOCKET_SUCCESS@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_10:
Lloh9:
	adrp	x8, _G_STRLOC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _G_STRLOC@GOTPAGEOFF]
Lloh11:
	ldr	w19, [x8]
	bl	_g_strerror
	mov	x2, x0
	ldr	w3, [x20]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_g_debug
Lloh14:
	adrp	x8, _NETWORK_SOCKET_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NETWORK_SOCKET_ERROR@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_STREAM,8,3                ; @SOCK_STREAM
	.comm	_errno,4,2                      ; @errno
	.comm	_NETWORK_SOCKET_WAIT_FOR_EVENT,4,2 ; @NETWORK_SOCKET_WAIT_FOR_EVENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: recv() failed: %s (errno=%d)"

	.comm	_G_STRLOC,4,2                   ; @G_STRLOC
	.comm	_NETWORK_SOCKET_ERROR,4,2       ; @NETWORK_SOCKET_ERROR
	.comm	_NETWORK_SOCKET_SUCCESS,4,2     ; @NETWORK_SOCKET_SUCCESS
.subsections_via_symbols
