	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_udp_Create                     ## -- Begin function udp_Create
	.p2align	4, 0x90
_udp_Create:                            ## @udp_Create
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	testl	%edi, %edi
	js	LBB0_10
## %bb.1:
	leaq	-48(%rbp), %rsi
	callq	_fstat
	cmpl	$-1, %eax
	je	LBB0_13
## %bb.2:
	movq	_S_IFSOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_13
## %bb.3:
	movl	$4, -44(%rbp)
	movl	(%r14), %edi
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-52(%rbp), %rcx
	leaq	-44(%rbp), %r8
	callq	_getsockopt
	cmpl	$-1, %eax
	je	LBB0_16
## %bb.4:
	cmpl	$4, -44(%rbp)
	jne	LBB0_13
## %bb.5:
	movl	-52(%rbp), %eax
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.6:
	movl	$8, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_27
## %bb.7:
	movq	%rax, %rbx
	movl	(%r14), %edi
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_getpeername
	movq	_LogPHASE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	24(%r14), %edx
	testq	%rax, %rax
	je	LBB0_34
## %bb.8:
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movq	_UDP_MAYBEUNCONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	16(%r14), %rax
	movq	_OPEN_PASSIVE@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	je	LBB0_31
## %bb.9:
	movl	(%r15), %edi
	movl	24(%r14), %edx
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movq	(%r12), %rax
	movq	%rax, 16(%r14)
	testq	%rbx, %rbx
	jne	LBB0_32
	jmp	LBB0_35
LBB0_13:
	xorl	%ebx, %ebx
	testq	%rbx, %rbx
	jne	LBB0_32
	jmp	LBB0_35
LBB0_10:
	movq	32(%r14), %rdi
	movl	$58, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_35
## %bb.11:
	movq	%rax, %r15
	leaq	1(%rax), %rbx
	movq	%rbx, %rdi
	movl	$58, %esi
	callq	_strchr
	testq	%rax, %rax
	jne	LBB0_35
## %bb.17:
	movb	$0, (%r15)
	movq	32(%r14), %r13
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strchr
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_23
## %bb.18:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_22
## %bb.19:
	movb	$58, (%r15)
	jmp	LBB0_35
LBB0_16:
	movq	_LogPHASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movl	(%r14), %edi
	callq	_close
	movl	$-1, (%r14)
	jmp	LBB0_35
LBB0_22:
	decl	(%r14)
	movb	$0, (%r12)
LBB0_23:
	cmpb	$0, (%r13)
	je	LBB0_28
## %bb.24:
	cmpb	$0, (%rbx)
	je	LBB0_28
## %bb.25:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_udp_CreateDevice
	movq	%rax, %rbx
	jmp	LBB0_29
LBB0_28:
	xorl	%ebx, %ebx
LBB0_29:
	movb	$58, (%r15)
	testq	%r12, %r12
	je	LBB0_31
## %bb.30:
	movb	$47, (%r12)
LBB0_31:
	testq	%rbx, %rbx
	je	LBB0_35
LBB0_32:
	movq	_baseudpdevice@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_memcpy
	movl	(%rbx), %esi
	movq	_PHYSICAL_FORCE_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_physical_SetupStack
	movq	8(%r14), %rax
	movq	_CD_DEFAULT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_36
## %bb.33:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	jmp	LBB0_36
LBB0_27:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	24(%r14), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_log_Printf
LBB0_35:
	xorl	%ebx, %ebx
LBB0_36:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_34:
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movq	_UDP_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	testq	%rbx, %rbx
	jne	LBB0_32
	jmp	LBB0_35
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/udp"

	.comm	_S_IFSOCK,4,2                   ## @S_IFSOCK
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_TYPE,4,2                    ## @SO_TYPE
	.comm	_LogPHASE,4,2                   ## @LogPHASE
L_.str.1:                               ## @.str.1
	.asciz	"%s: Link is a closed socket !\n"

	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_LogWARN,4,2                    ## @LogWARN
L_.str.2:                               ## @.str.2
	.asciz	"%s: Cannot allocate a udp device: %s\n"

	.comm	_errno,4,2                      ## @errno
L_.str.3:                               ## @.str.3
	.asciz	"%s: Link is a connected udp socket\n"

	.comm	_UDP_CONNECTED,4,2              ## @UDP_CONNECTED
L_.str.4:                               ## @.str.4
	.asciz	"%s: Link is a disconnected udp socket\n"

	.comm	_UDP_MAYBEUNCONNECTED,4,2       ## @UDP_MAYBEUNCONNECTED
	.comm	_OPEN_PASSIVE,8,3               ## @OPEN_PASSIVE
L_.str.5:                               ## @.str.5
	.asciz	"%s:   Changing openmode to PASSIVE\n"

	.comm	_baseudpdevice,4,2              ## @baseudpdevice
	.comm	_PHYSICAL_FORCE_SYNC,4,2        ## @PHYSICAL_FORCE_SYNC
	.comm	_CD_DEFAULT,8,3                 ## @CD_DEFAULT
L_.str.6:                               ## @.str.6
	.asciz	"Carrier settings ignored\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_udp_Create                     ; -- Begin function udp_Create
	.p2align	2
_udp_Create:                            ; @udp_Create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	w0, [x0]
	tbnz	w0, #31, LBB0_11
; %bb.1:
	add	x1, sp, #40
	bl	_fstat
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.2:
	ldr	w8, [sp, #40]
Lloh0:
	adrp	x9, _S_IFSOCK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S_IFSOCK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.3:
	mov	w8, #4
	str	w8, [sp, #32]
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _SO_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SO_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x3, sp, #36
	add	x4, sp, #32
	bl	_getsockopt
	cmn	w0, #1
	b.eq	LBB0_16
; %bb.4:
	ldr	w8, [sp, #32]
	cmp	w8, #4
	b.ne	LBB0_10
; %bb.5:
	ldr	w8, [sp, #36]
Lloh9:
	adrp	x9, _SOCK_DGRAM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SOCK_DGRAM@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.6:
	mov	w0, #8
	bl	_malloc
	cbz	x0, LBB0_29
; %bb.7:
	mov	x20, x0
	ldr	w0, [x19]
	add	x1, sp, #24
	add	x2, sp, #32
	bl	_getpeername
	mov	x8, x0
Lloh12:
	adrp	x21, _LogPHASE@GOTPAGE
Lloh13:
	ldr	x21, [x21, _LogPHASE@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w9, [x19, #24]
	cbz	x8, LBB0_30
; %bb.8:
	str	x9, [sp]
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_log_Printf
Lloh16:
	adrp	x8, _UDP_MAYBEUNCONNECTED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _UDP_MAYBEUNCONNECTED@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x20, #4]
	ldr	x8, [x19, #16]
Lloh19:
	adrp	x22, _OPEN_PASSIVE@GOTPAGE
Lloh20:
	ldr	x22, [x22, _OPEN_PASSIVE@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_25
; %bb.9:
	ldr	w0, [x21]
	ldr	w8, [x19, #24]
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_log_Printf
	ldr	x8, [x22]
	str	x8, [x19, #16]
	cbnz	x20, LBB0_26
	b	LBB0_28
LBB0_10:
	mov	x20, #0
	cbnz	x20, LBB0_26
	b	LBB0_28
LBB0_11:
	ldr	x0, [x19, #32]
	mov	w1, #58
	bl	_strchr
	cbz	x0, LBB0_17
; %bb.12:
	mov	x21, x0
	add	x20, x0, #1
	mov	x0, x20
	mov	w1, #58
	bl	_strchr
	cbnz	x0, LBB0_17
; %bb.13:
	strb	wzr, [x21]
	ldr	x23, [x19, #32]
	mov	x0, x20
	mov	w1, #47
	bl	_strchr
	mov	x22, x0
	cbz	x0, LBB0_19
; %bb.14:
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_strcasecmp
	cbz	x0, LBB0_18
; %bb.15:
	mov	x20, #0
	mov	w8, #58
	strb	w8, [x21]
	b	LBB0_28
LBB0_16:
Lloh25:
	adrp	x8, _LogPHASE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LogPHASE@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	ldr	w8, [x19, #24]
	str	x8, [sp]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_log_Printf
	ldr	w0, [x19]
	bl	_close
	mov	w8, #-1
	str	w8, [x19]
LBB0_17:
	mov	x20, #0
	b	LBB0_28
LBB0_18:
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	strb	wzr, [x22]
LBB0_19:
	ldrb	w8, [x23]
	cbz	w8, LBB0_22
; %bb.20:
	ldrb	w8, [x20]
	cbz	w8, LBB0_22
; %bb.21:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x20
	bl	_udp_CreateDevice
	mov	x20, x0
	b	LBB0_23
LBB0_22:
	mov	x20, #0
LBB0_23:
	mov	w8, #58
	strb	w8, [x21]
	cbz	x22, LBB0_25
; %bb.24:
	mov	w8, #47
	strb	w8, [x22]
LBB0_25:
	cbz	x20, LBB0_28
LBB0_26:
Lloh30:
	adrp	x1, _baseudpdevice@GOTPAGE
Lloh31:
	ldr	x1, [x1, _baseudpdevice@GOTPAGEOFF]
	mov	x0, x20
	mov	w2, #4
	bl	_memcpy
	ldr	w1, [x20]
Lloh32:
	adrp	x8, _PHYSICAL_FORCE_SYNC@GOTPAGE
Lloh33:
	ldr	x8, [x8, _PHYSICAL_FORCE_SYNC@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_physical_SetupStack
	ldr	x8, [x19, #8]
Lloh35:
	adrp	x9, _CD_DEFAULT@GOTPAGE
Lloh36:
	ldr	x9, [x9, _CD_DEFAULT@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_28
; %bb.27:
Lloh38:
	adrp	x8, _LogWARN@GOTPAGE
Lloh39:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
Lloh41:
	adrp	x1, l_.str.6@PAGE
Lloh42:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_log_Printf
LBB0_28:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_29:
Lloh43:
	adrp	x8, _LogWARN@GOTPAGE
Lloh44:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh45:
	ldr	w20, [x8]
Lloh46:
	adrp	x8, _errno@GOTPAGE
Lloh47:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
	ldr	w19, [x19, #24]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp]
Lloh49:
	adrp	x1, l_.str.2@PAGE
Lloh50:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_log_Printf
	b	LBB0_17
LBB0_30:
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	str	x9, [sp]
Lloh51:
	adrp	x1, l_.str.3@PAGE
Lloh52:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_log_Printf
Lloh53:
	adrp	x8, _UDP_CONNECTED@GOTPAGE
Lloh54:
	ldr	x8, [x8, _UDP_CONNECTED@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	str	w8, [x20, #4]
	cbnz	x20, LBB0_26
	b	LBB0_28
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/udp"

	.comm	_S_IFSOCK,4,2                   ; @S_IFSOCK
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_TYPE,4,2                    ; @SO_TYPE
	.comm	_LogPHASE,4,2                   ; @LogPHASE
l_.str.1:                               ; @.str.1
	.asciz	"%s: Link is a closed socket !\n"

	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_LogWARN,4,2                    ; @LogWARN
l_.str.2:                               ; @.str.2
	.asciz	"%s: Cannot allocate a udp device: %s\n"

	.comm	_errno,4,2                      ; @errno
l_.str.3:                               ; @.str.3
	.asciz	"%s: Link is a connected udp socket\n"

	.comm	_UDP_CONNECTED,4,2              ; @UDP_CONNECTED
l_.str.4:                               ; @.str.4
	.asciz	"%s: Link is a disconnected udp socket\n"

	.comm	_UDP_MAYBEUNCONNECTED,4,2       ; @UDP_MAYBEUNCONNECTED
	.comm	_OPEN_PASSIVE,8,3               ; @OPEN_PASSIVE
l_.str.5:                               ; @.str.5
	.asciz	"%s:   Changing openmode to PASSIVE\n"

	.comm	_baseudpdevice,4,2              ; @baseudpdevice
	.comm	_PHYSICAL_FORCE_SYNC,4,2        ; @PHYSICAL_FORCE_SYNC
	.comm	_CD_DEFAULT,8,3                 ; @CD_DEFAULT
l_.str.6:                               ; @.str.6
	.asciz	"Carrier settings ignored\n"

.subsections_via_symbols
