	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function udp_CreateDevice
_udp_CreateDevice:                      ## @udp_CreateDevice
	.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	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r14
	movl	$32, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%r13, %rdi
	callq	_GetIpAddr
	movq	%rax, 16(%rbx)
	movq	_INADDR_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r14), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rcx
LBB0_4:
	xorl	%eax, %eax
	callq	_log_Printf
	jmp	LBB0_14
LBB0_1:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	16(%r14), %r14
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r15d, %edi
	movq	%r14, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_log_Printf
	jmp	LBB0_15
LBB0_5:
	movq	%rbx, %r12
	addq	$8, %r12
	movq	%r15, %rdi
	callq	_atoi
	movl	%eax, %edi
	callq	_htons
	movq	%rax, (%r12)
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_getservbyname
	testq	%rax, %rax
	je	LBB0_16
## %bb.7:
	movq	(%rax), %rax
	movq	%rax, (%r12)
LBB0_8:
	movq	_LogPHASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r14), %rdx
	leaq	L_.str.4(%rip), %rsi
	movq	%r13, %rcx
	movq	%r15, %r8
	xorl	%eax, %eax
	callq	_log_Printf
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, (%r14)
	testl	%eax, %eax
	js	LBB0_12
## %bb.9:
	movq	_LogDEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r14), %rcx
	movq	16(%r14), %rdx
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movl	(%r14), %edi
	movq	%r12, %rsi
	movl	$24, %edx
	callq	_connect
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	8(%r14), %r12
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_13
LBB0_12:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	8(%r14), %r12
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.7(%rip), %rsi
LBB0_13:
	movl	%r15d, %edi
	movq	%r12, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_log_Printf
	movl	(%r14), %edi
	callq	_close
	movl	$-1, (%r14)
LBB0_14:
	movq	%rbx, %rdi
	callq	_free
	xorl	%ebx, %ebx
LBB0_15:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_UDP_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_15
LBB0_16:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r14), %rdx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rcx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_LogWARN,4,2                    ## @LogWARN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Cannot allocate a udp device: %s\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_INADDR_NONE,8,3                ## @INADDR_NONE
L_.str.1:                               ## @.str.1
	.asciz	"%s: %s: unknown host\n"

L_.str.2:                               ## @.str.2
	.asciz	"udp"

L_.str.3:                               ## @.str.3
	.asciz	"%s: %s: unknown service\n"

	.comm	_LogPHASE,4,2                   ## @LogPHASE
L_.str.4:                               ## @.str.4
	.asciz	"%s: Connecting to %s:%s/udp\n"

	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_LogDEBUG,4,2                   ## @LogDEBUG
L_.str.5:                               ## @.str.5
	.asciz	"%s: Opened udp socket %s\n"

	.comm	_UDP_CONNECTED,4,2              ## @UDP_CONNECTED
L_.str.6:                               ## @.str.6
	.asciz	"%s: connect: %s\n"

L_.str.7:                               ## @.str.7
	.asciz	"%s: socket: %s\n"

	.no_dead_strip	_udp_CreateDevice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function udp_CreateDevice
_udp_CreateDevice:                      ; @udp_CreateDevice
	.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	x23, x2
	mov	x21, x1
	mov	x20, x0
	mov	w0, #32
	bl	_malloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _AF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	mov	x0, x21
	bl	_GetIpAddr
	str	x0, [x19, #16]
Lloh3:
	adrp	x8, _INADDR_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INADDR_NONE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _LogWARN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	x2, [x20, #16]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x21
	bl	_log_Printf
	b	LBB0_12
LBB0_3:
Lloh11:
	adrp	x8, _LogWARN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh13:
	ldr	w19, [x8]
	ldr	x20, [x20, #16]
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_log_Printf
	b	LBB0_13
LBB0_4:
	add	x22, x19, #8
	mov	x0, x23
	bl	_atoi
	bl	_htons
	str	x0, [x22]
	cbnz	x0, LBB0_7
; %bb.5:
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_getservbyname
	cbz	x0, LBB0_16
; %bb.6:
	ldr	x8, [x0]
	str	x8, [x22]
LBB0_7:
Lloh21:
	adrp	x8, _LogPHASE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LogPHASE@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	x2, [x20, #16]
	str	x23, [sp]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x3, x21
	bl	_log_Printf
Lloh26:
	adrp	x8, _PF_INET@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	str	w0, [x20]
	tbnz	w0, #31, LBB0_10
; %bb.8:
Lloh32:
	adrp	x8, _LogDEBUG@GOTPAGE
Lloh33:
	ldr	x8, [x8, _LogDEBUG@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	ldp	x3, x2, [x20, #8]
Lloh35:
	adrp	x1, l_.str.5@PAGE
Lloh36:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_log_Printf
	ldr	w0, [x20]
	mov	x1, x22
	mov	w2, #24
	bl	_connect
	cbz	x0, LBB0_15
; %bb.9:
Lloh37:
	adrp	x8, _LogWARN@GOTPAGE
Lloh38:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh39:
	ldr	w21, [x8]
	ldr	x22, [x20, #8]
Lloh40:
	adrp	x8, _errno@GOTPAGE
Lloh41:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh43:
	adrp	x1, l_.str.6@PAGE
Lloh44:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh45:
	adrp	x8, _LogWARN@GOTPAGE
Lloh46:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh47:
	ldr	w21, [x8]
	ldr	x22, [x20, #8]
Lloh48:
	adrp	x8, _errno@GOTPAGE
Lloh49:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh50:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh51:
	adrp	x1, l_.str.7@PAGE
Lloh52:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_11:
	mov	x0, x21
	mov	x2, x22
	bl	_log_Printf
	ldr	w0, [x20]
	bl	_close
	mov	w8, #-1
	str	w8, [x20]
LBB0_12:
	mov	x0, x19
	bl	_free
LBB0_13:
	mov	x19, #0
LBB0_14:
	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_15:
Lloh53:
	adrp	x8, _UDP_CONNECTED@GOTPAGE
Lloh54:
	ldr	x8, [x8, _UDP_CONNECTED@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_14
LBB0_16:
Lloh56:
	adrp	x8, _LogWARN@GOTPAGE
Lloh57:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh58:
	ldr	w0, [x8]
	ldr	x2, [x20, #16]
Lloh59:
	adrp	x1, l_.str.3@PAGE
Lloh60:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x3, x23
	bl	_log_Printf
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.comm	_LogWARN,4,2                    ; @LogWARN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Cannot allocate a udp device: %s\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_INADDR_NONE,8,3                ; @INADDR_NONE
l_.str.1:                               ; @.str.1
	.asciz	"%s: %s: unknown host\n"

l_.str.2:                               ; @.str.2
	.asciz	"udp"

l_.str.3:                               ; @.str.3
	.asciz	"%s: %s: unknown service\n"

	.comm	_LogPHASE,4,2                   ; @LogPHASE
l_.str.4:                               ; @.str.4
	.asciz	"%s: Connecting to %s:%s/udp\n"

	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_LogDEBUG,4,2                   ; @LogDEBUG
l_.str.5:                               ; @.str.5
	.asciz	"%s: Opened udp socket %s\n"

	.comm	_UDP_CONNECTED,4,2              ; @UDP_CONNECTED
l_.str.6:                               ; @.str.6
	.asciz	"%s: connect: %s\n"

l_.str.7:                               ; @.str.7
	.asciz	"%s: socket: %s\n"

	.no_dead_strip	_udp_CreateDevice
.subsections_via_symbols
