	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_iface                      ## -- Begin function get_iface
	.p2align	4, 0x90
_get_iface:                             ## @get_iface
	.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, %rsi
	leaq	-68(%rbp), %rdi
	movl	$4, %edx
	callq	_memcpy
	movl	$60000, %edi                    ## imm = 0xEA60
	callq	_htons
	movq	%rax, -64(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	%rax, -56(%rbp)
	movl	$24, -72(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htonl
	movl	%eax, _get_iface.local+4(%rip)
	movl	$60000, %edi                    ## imm = 0xEA60
	callq	_htons
	movq	%rax, _get_iface.local+8(%rip)
	movq	(%rbx), %rax
	movq	%rax, _get_iface.local+16(%rip)
	movl	$24, _get_iface.local(%rip)
	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, %r13d
	movl	$-1, %eax
	testl	%r13d, %r13d
	js	LBB0_12
## %bb.1:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	leaq	_get_iface.local(%rip), %r12
	movq	_errno@GOTPCREL(%rip), %r14
	movq	_EADDRINUSE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	movq	%r12, %rsi
	movl	$24, %edx
	callq	_bind
	movl	%eax, %ebx
	movq	_get_iface.local+8(%rip), %rdi
	callq	_ntohs
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edi
	callq	_htons
	movq	%rax, _get_iface.local+8(%rip)
	testl	%ebx, %ebx
	jns	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	cmpq	%rax, (%r14)
	je	LBB0_2
LBB0_4:
	testl	%ebx, %ebx
	js	LBB0_9
## %bb.5:
	leaq	-72(%rbp), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	movq	%r12, %rsi
	movl	$24, %edx
	callq	_connect
	movl	%eax, %ebx
	movq	-64(%rbp), %rdi
	callq	_ntohs
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edi
	callq	_htons
	movq	%rax, -64(%rbp)
	testl	%ebx, %ebx
	jns	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r15), %rax
	cmpq	%rax, (%r14)
	je	LBB0_6
LBB0_8:
	testl	%ebx, %ebx
	js	LBB0_9
## %bb.10:
	movl	$24, -44(%rbp)
	leaq	_get_iface.local(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movl	%r13d, %edi
	callq	_getsockname
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_close
	testl	%ebx, %ebx
	movl	$-1, %eax
	js	LBB0_12
## %bb.11:
	leaq	_get_iface.local+4(%rip), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	$4, %edx
	callq	_memcpy
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_9:
	movl	%r13d, %edi
	callq	_close
	movl	$-1, %eax
LBB0_12:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_get_iface.local,24,3 ## @get_iface.local
	.comm	_AF_INET,8,3                    ## @AF_INET
	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_errno,8,3                      ## @errno
	.comm	_EADDRINUSE,8,3                 ## @EADDRINUSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_iface                      ; -- Begin function get_iface
	.p2align	2
_get_iface:                             ; @get_iface
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x1, x0
	add	x8, sp, #8
	orr	x0, x8, #0x4
	mov	w2, #4
	bl	_memcpy
	mov	w0, #60000
	bl	_htons
Lloh0:
	adrp	x20, _AF_INET@GOTPAGE
Lloh1:
	ldr	x20, [x20, _AF_INET@GOTPAGEOFF]
	ldr	x8, [x20]
	stp	x0, x8, [sp, #16]
	mov	w22, #24
	str	w22, [sp, #8]
Lloh2:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_htonl
Lloh5:
	adrp	x21, _get_iface.local@PAGE
Lloh6:
	add	x21, x21, _get_iface.local@PAGEOFF
	str	w0, [x21, #4]
	mov	w0, #60000
	bl	_htons
	ldr	x8, [x20]
	stp	x0, x8, [x21, #8]
	str	w22, [x21]
Lloh7:
	adrp	x8, _PF_INET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_11
; %bb.1:
	mov	x20, x0
Lloh13:
	adrp	x23, _errno@GOTPAGE
Lloh14:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
Lloh15:
	adrp	x24, _EADDRINUSE@GOTPAGE
Lloh16:
	ldr	x24, [x24, _EADDRINUSE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	w2, #24
	bl	_bind
	mov	x22, x0
	ldr	x0, [x21, #8]
	bl	_ntohs
	add	w0, w0, #1
	bl	_htons
	str	x0, [x21, #8]
	tbz	w22, #31, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_2
LBB0_4:
	tbnz	w22, #31, LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #24
	bl	_connect
	mov	x21, x0
	ldr	x0, [sp, #16]
	bl	_ntohs
	add	w0, w0, #1
	bl	_htons
	str	x0, [sp, #16]
	tbz	w21, #31, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x23]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_5
LBB0_7:
	tbnz	w21, #31, LBB0_10
; %bb.8:
	mov	w8, #24
	str	w8, [sp, #4]
Lloh17:
	adrp	x1, _get_iface.local@PAGE
Lloh18:
	add	x1, x1, _get_iface.local@PAGEOFF
	add	x2, sp, #4
	mov	x0, x20
	bl	_getsockname
	mov	x21, x0
	mov	x0, x20
	bl	_close
	tbnz	w21, #31, LBB0_11
; %bb.9:
Lloh19:
	adrp	x1, _get_iface.local@PAGE+4
Lloh20:
	add	x1, x1, _get_iface.local@PAGEOFF+4
	mov	x0, x19
	mov	w2, #4
	bl	_memcpy
	mov	w0, #0
	b	LBB0_12
LBB0_10:
	mov	x0, x20
	bl	_close
LBB0_11:
	mov	w0, #-1
LBB0_12:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_get_iface.local,24,3 ; @get_iface.local
	.comm	_AF_INET,8,3                    ; @AF_INET
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_errno,8,3                      ; @errno
	.comm	_EADDRINUSE,8,3                 ; @EADDRINUSE
.subsections_via_symbols
