	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_net_socket                     ## -- Begin function net_socket
	.p2align	4, 0x90
_net_socket:                            ## @net_socket
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	$-1, %r14d
	cmpl	$128, %esi
	je	LBB0_5
## %bb.1:
	cmpl	$130, %esi
	je	LBB0_4
## %bb.2:
	cmpl	$129, %esi
	jne	LBB0_11
## %bb.3:
	movl	%edx, %ebx
	movq	_SOCKETS_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_LWIP_DEBUGF
	movq	_NETCONN_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_evt_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	callq	_netconn_new_with_proto_and_callback
	jmp	LBB0_7
LBB0_5:
	movq	_SOCKETS_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_LWIP_DEBUGF
	movq	_NETCONN_TCP@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_SOCKETS_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_LWIP_DEBUGF
	movq	_NETCONN_UDP@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	movq	_evt_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_netconn_new_with_callback
LBB0_7:
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	%rbx, %rdi
	callq	_alloc_socket
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, (%rbx)
	movl	%eax, %r14d
	jmp	LBB0_11
LBB0_9:
	movq	%rbx, %rdi
	callq	_netconn_delete
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCKETS_DEBUG,4,2              ## @SOCKETS_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"net_socket(SOCK_RAW)\n"

	.comm	_NETCONN_RAW,4,2                ## @NETCONN_RAW
	.comm	_evt_callback,4,2               ## @evt_callback
L_.str.1:                               ## @.str.1
	.asciz	"net_socket(SOCK_DGRAM)\n"

	.comm	_NETCONN_UDP,4,2                ## @NETCONN_UDP
L_.str.2:                               ## @.str.2
	.asciz	"net_socket(SOCK_STREAM)\n"

	.comm	_NETCONN_TCP,4,2                ## @NETCONN_TCP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_net_socket                     ; -- Begin function net_socket
	.p2align	2
_net_socket:                            ; @net_socket
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cmp	w1, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w1, #130
	b.eq	LBB0_5
; %bb.2:
	cmp	w1, #129
	b.ne	LBB0_10
; %bb.3:
	mov	x19, x2
Lloh0:
	adrp	x8, _SOCKETS_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOCKETS_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_LWIP_DEBUGF
Lloh5:
	adrp	x8, _NETCONN_RAW@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NETCONN_RAW@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _evt_callback@GOTPAGE
Lloh9:
	ldr	x8, [x8, _evt_callback@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_netconn_new_with_proto_and_callback
	mov	x19, x0
	cbnz	x0, LBB0_7
	b	LBB0_10
LBB0_4:
Lloh11:
	adrp	x8, _SOCKETS_DEBUG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SOCKETS_DEBUG@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_LWIP_DEBUGF
Lloh16:
	adrp	x8, _NETCONN_TCP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NETCONN_TCP@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x8, _SOCKETS_DEBUG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SOCKETS_DEBUG@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_LWIP_DEBUGF
Lloh23:
	adrp	x8, _NETCONN_UDP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _NETCONN_UDP@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
Lloh25:
	adrp	x8, _evt_callback@GOTPAGE
Lloh26:
	ldr	x8, [x8, _evt_callback@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	bl	_netconn_new_with_callback
	mov	x19, x0
	cbz	x0, LBB0_10
LBB0_7:
	mov	x0, x19
	bl	_alloc_socket
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.8:
	str	w0, [x19]
	b	LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_netconn_delete
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCKETS_DEBUG,4,2              ; @SOCKETS_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"net_socket(SOCK_RAW)\n"

	.comm	_NETCONN_RAW,4,2                ; @NETCONN_RAW
	.comm	_evt_callback,4,2               ; @evt_callback
l_.str.1:                               ; @.str.1
	.asciz	"net_socket(SOCK_DGRAM)\n"

	.comm	_NETCONN_UDP,4,2                ; @NETCONN_UDP
l_.str.2:                               ; @.str.2
	.asciz	"net_socket(SOCK_STREAM)\n"

	.comm	_NETCONN_TCP,4,2                ; @NETCONN_TCP
.subsections_via_symbols
