	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fgetsSocket                    ## -- Begin function fgetsSocket
	.p2align	4, 0x90
_fgetsSocket:                           ## @fgetsSocket
	.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, %r14
	movl	%edi, %r12d
	movw	$0, -42(%rbp)
	xorl	%ebx, %ebx
	leaq	-42(%rbp), %r15
	movq	_SOCKET_ERROR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	callq	_checkRecv
	movl	%r12d, %edi
	movq	%r15, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_recv
	cmpl	(%r13), %eax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movzbl	-42(%rbp), %eax
	movb	%al, (%r14,%rbx)
	movq	_MAX_ASCII@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	$-3, %ecx
	cmpl	%ecx, %ebx
	je	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	cmpb	$10, %al
	jne	LBB0_1
	jmp	LBB0_10
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_11
LBB0_6:
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.8:
	movw	$10, (%r14,%rbx)
	jmp	LBB0_11
LBB0_5:
	movw	$10, 1(%r14,%rbx)
	addl	$3, %ebx
LBB0_10:
	movslq	%ebx, %rax
	movb	$0, (%r14,%rax)
LBB0_11:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%r14d, %r14d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCKET_ERROR,4,2               ## @SOCKET_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error in fgetssocket"

	.comm	_MAX_ASCII,4,2                  ## @MAX_ASCII
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fgetsSocket                    ; -- Begin function fgetsSocket
	.p2align	2
_fgetsSocket:                           ; @fgetsSocket
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x1
	mov	x20, x0
	mov	x21, #0
	strh	wzr, [sp, #14]
Lloh0:
	adrp	x22, _SOCKET_ERROR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SOCKET_ERROR@GOTPAGEOFF]
Lloh2:
	adrp	x23, _MAX_ASCII@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MAX_ASCII@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_checkRecv
	add	x1, sp, #14
	mov	x0, x20
	mov	w2, #1
	mov	w3, #0
	bl	_recv
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldrb	w8, [sp, #14]
	strb	w8, [x19, x21]
	ldr	w9, [x23]
	sub	w9, w9, #3
	cmp	w21, w9
	b.eq	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x21, x21, #1
	cmp	w8, #10
	b.ne	LBB0_1
	b	LBB0_9
LBB0_5:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	mov	x19, #0
	b	LBB0_10
LBB0_6:
	cbz	w21, LBB0_11
; %bb.7:
	mov	w8, #10
	strh	w8, [x19, x21]
	b	LBB0_10
LBB0_8:
	add	x8, x19, x21
	mov	w9, #10
	sturh	w9, [x8, #1]
	add	w21, w21, #3
LBB0_9:
	strb	wzr, [x19, w21, sxtw]
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
	mov	x19, #0
	b	LBB0_10
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCKET_ERROR,4,2               ; @SOCKET_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error in fgetssocket"

	.comm	_MAX_ASCII,4,2                  ; @MAX_ASCII
.subsections_via_symbols
