	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function findlocalinterface
_findlocalinterface:                    ## @findlocalinterface
	.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
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_stoa
	movslq	%eax, %rsi
	movl	$4, %edi
	callq	_DPRINTF
	movq	_AF_UNSPEC@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r12, %rdi
	callq	_AF
	cmpq	%rax, %rbx
	jne	LBB0_2
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_2:
	movq	%r12, %rdi
	callq	_AF
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_socket
	movq	%rax, %r15
	movq	_INVALID_SOCKET@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	je	LBB0_13
## %bb.3:
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.4:
	movl	$1, -52(%rbp)
	movq	_SOCKET_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_BROADCAST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-52(%rbp), %rcx
	movq	%r15, %rdi
	movl	$4, %r8d
	callq	_setsockopt
	cmpl	%eax, %ebx
	je	LBB0_6
LBB0_5:
	movq	%r12, %rdi
	callq	_SOCKLEN
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_connect
	movq	_SOCKET_ERROR@GOTPCREL(%rip), %r13
	cmpl	%eax, (%r13)
	jne	LBB0_7
LBB0_6:
	movq	%r15, %rdi
	callq	_closesocket
	xorl	%ebx, %ebx
LBB0_13:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	$4, -56(%rbp)
	leaq	-48(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	callq	_getsockname
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_closesocket
	cmpl	%ebx, (%r13)
	je	LBB0_1
## %bb.9:
	movq	%r12, %rdi
	callq	_stoa
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_stoa
	movslq	%eax, %rsi
	movl	$4, %edi
	callq	_DPRINTF
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_getinterface
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%rax, %rbx
	cmpq	$0, (%rax)
	je	LBB0_13
LBB0_11:
	movq	_INT_LOOPBACK@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	leaq	-48(%rbp), %rdi
	movl	%r14d, %esi
	callq	_findclosestinterface
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	cmpq	$0, (%rax)
	cmoveq	%rax, %rbx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_UNSPEC,8,3                  ## @AF_UNSPEC
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_INVALID_SOCKET,8,3             ## @INVALID_SOCKET
	.comm	_SOCKET_ERROR,4,2               ## @SOCKET_ERROR
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_BROADCAST,4,2               ## @SO_BROADCAST
	.comm	_INT_LOOPBACK,4,2               ## @INT_LOOPBACK
	.no_dead_strip	_findlocalinterface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function findlocalinterface
_findlocalinterface:                    ; @findlocalinterface
	.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	x22, x2
	mov	x19, x1
	mov	x20, x0
	bl	_stoa
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	mov	w0, #4
	bl	_DPRINTF
Lloh0:
	adrp	x8, _AF_UNSPEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_UNSPEC@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	mov	x0, x20
	bl	_AF
	cmp	x21, x0
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_AF
Lloh3:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
Lloh6:
	adrp	x8, _INVALID_SOCKET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INVALID_SOCKET@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x0
	b.ne	LBB0_4
LBB0_2:
	mov	x0, #0
LBB0_3:
	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_4:
	mov	x21, x0
Lloh9:
	adrp	x23, _SOCKET_ERROR@GOTPAGE
Lloh10:
	ldr	x23, [x23, _SOCKET_ERROR@GOTPAGEOFF]
	cbz	w22, LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [sp, #4]
	ldr	w22, [x23]
Lloh11:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _SO_BROADCAST@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SO_BROADCAST@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	add	x3, sp, #4
	mov	x0, x21
	mov	w4, #4
	bl	_setsockopt
	cmp	w22, w0
	b.eq	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_SOCKLEN
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_connect
	ldr	w8, [x23]
	cmp	w8, w0
	b.ne	LBB0_8
LBB0_7:
	mov	x0, x21
	bl	_closesocket
	mov	x0, #0
	b	LBB0_3
LBB0_8:
	mov	w8, #4
	str	w8, [sp, #12]
	add	x1, sp, #8
	add	x2, sp, #12
	mov	x0, x21
	bl	_getsockname
	mov	x22, x0
	mov	x0, x21
	bl	_closesocket
	ldr	w8, [x23]
	cmp	w8, w22
	b.eq	LBB0_2
; %bb.9:
	mov	x0, x20
	bl	_stoa
	add	x0, sp, #8
	bl	_stoa
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	mov	w0, #4
	bl	_DPRINTF
	add	x0, sp, #8
	mov	x1, x19
	bl	_getinterface
	cbz	x0, LBB0_11
; %bb.10:
	ldr	x8, [x0]
	cbz	x8, LBB0_3
LBB0_11:
Lloh17:
	adrp	x8, _INT_LOOPBACK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _INT_LOOPBACK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	orr	w1, w8, w19
	add	x0, sp, #8
	bl	_findclosestinterface
	cbz	x0, LBB0_3
; %bb.12:
	ldr	x8, [x0]
	cmp	x8, #0
	csel	x0, x0, xzr, eq
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_UNSPEC,8,3                  ; @AF_UNSPEC
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_INVALID_SOCKET,8,3             ; @INVALID_SOCKET
	.comm	_SOCKET_ERROR,4,2               ; @SOCKET_ERROR
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_BROADCAST,4,2               ; @SO_BROADCAST
	.comm	_INT_LOOPBACK,4,2               ; @INT_LOOPBACK
	.no_dead_strip	_findlocalinterface
.subsections_via_symbols
