	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_findsaddr                      ## -- Begin function findsaddr
	.p2align	4, 0x90
_findsaddr:                             ## @findsaddr
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_AF_INET@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movl	$16, -44(%rbp)
	leaq	-80(%rbp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$16, %edx
	callq	_memcpy
	movl	$65535, %edi                    ## imm = 0xFFFF
	callq	_htons
	movl	%eax, -68(%rbp)
	movl	%ebx, %edi
	movq	%r12, %rsi
	movl	$16, %edx
	callq	_connect
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	leaq	-64(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movl	%ebx, %edi
	callq	_getsockname
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.6:
	leaq	L_.str.3(%rip), %r15
	cmpl	$16, -44(%rbp)
	jne	LBB0_9
## %bb.7:
	movq	-64(%rbp), %rax
	cmpq	(%r13), %rax
	jne	LBB0_9
## %bb.8:
	movl	-56(%rbp), %esi
	movq	%r14, %rdi
	callq	_setsin
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str(%rip), %r15
	jmp	LBB0_10
LBB0_3:
	leaq	L_.str.1(%rip), %r15
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str.2(%rip), %r15
LBB0_9:
	movl	%ebx, %edi
	callq	_close
LBB0_10:
	movq	%r15, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,8,3                    ## @AF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to open DGRAM socket for src addr selection."

L_.str.1:                               ## @.str.1
	.asciz	"failed to connect to peer for src addr selection."

L_.str.2:                               ## @.str.2
	.asciz	"failed to get socket name for src addr selection."

L_.str.3:                               ## @.str.3
	.asciz	"unexpected address family in src addr selection."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_findsaddr                      ; -- Begin function findsaddr
	.p2align	2
_findsaddr:                             ; @findsaddr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _AF_INET@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AF_INET@GOTPAGEOFF]
	ldr	x0, [x22]
Lloh2:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.1:
	mov	x19, x0
	mov	w8, #16
	str	w8, [sp, #12]
	add	x0, sp, #32
	mov	x1, x21
	mov	w2, #16
	bl	_memcpy
	mov	w0, #65535
	bl	_htons
	str	w0, [sp, #44]
	add	x1, sp, #32
	mov	x0, x19
	mov	w2, #16
	bl	_connect
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.2:
	add	x1, sp, #16
	add	x2, sp, #12
	mov	x0, x19
	bl	_getsockname
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.3:
	ldr	w8, [sp, #12]
	cmp	w8, #16
	b.ne	LBB0_8
; %bb.4:
	ldr	x8, [sp, #16]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
	ldr	w1, [sp, #24]
	mov	x0, x20
	bl	_setsin
	mov	x20, #0
	b	LBB0_10
LBB0_6:
Lloh5:
	adrp	x20, l_.str@PAGE
Lloh6:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_11
LBB0_7:
Lloh7:
	adrp	x20, l_.str.1@PAGE
Lloh8:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_8:
Lloh9:
	adrp	x20, l_.str.3@PAGE
Lloh10:
	add	x20, x20, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh11:
	adrp	x20, l_.str.2@PAGE
Lloh12:
	add	x20, x20, l_.str.2@PAGEOFF
LBB0_10:
	mov	x0, x19
	bl	_close
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,8,3                    ; @AF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to open DGRAM socket for src addr selection."

l_.str.1:                               ; @.str.1
	.asciz	"failed to connect to peer for src addr selection."

l_.str.2:                               ; @.str.2
	.asciz	"failed to get socket name for src addr selection."

l_.str.3:                               ; @.str.3
	.asciz	"unexpected address family in src addr selection."

.subsections_via_symbols
