	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_rip_sock
_get_rip_sock:                          ## @get_rip_sock
	.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	%esi, %r14d
	movl	%edi, %r15d
	movq	_AF_INET@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_BADERR
LBB0_2:
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	(%r13), %eax
	movl	%eax, -52(%rbp)
	movq	_RIP_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	movl	%eax, -56(%rbp)
	movl	%r15d, -60(%rbp)
	movl	%ebx, %edi
	movq	%r12, %rsi
	movl	$16, %edx
	callq	_bind
	testq	%rax, %rax
	js	LBB0_3
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	callq	_fix_sock
	movb	$1, -41(%rbp)
	movq	_IPPROTO_IP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IP_MULTICAST_TTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-41(%rbp), %rcx
	movl	%ebx, %edi
	movl	$1, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_DBGERR
	jmp	LBB0_8
LBB0_3:
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.4:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EADDRINUSE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_BADERR
LBB0_5:
	movl	%ebx, %edi
	callq	_close
	movl	$-1, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rip_sock = socket()"

	.comm	_RIP_PORT,4,2                   ## @RIP_PORT
	.comm	_errno,8,3                      ## @errno
	.comm	_EADDRINUSE,8,3                 ## @EADDRINUSE
L_.str.1:                               ## @.str.1
	.asciz	"bind(rip_sock)"

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

	.comm	_IPPROTO_IP,4,2                 ## @IPPROTO_IP
	.comm	_IP_MULTICAST_TTL,4,2           ## @IP_MULTICAST_TTL
L_.str.3:                               ## @.str.3
	.asciz	"rip_sock setsockopt(IP_MULTICAST_TTL)"

	.no_dead_strip	_get_rip_sock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_rip_sock
_get_rip_sock:                          ; @get_rip_sock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _AF_INET@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AF_INET@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x19, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_BADERR
LBB0_2:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w8, [x22]
	str	w8, [sp, #28]
Lloh7:
	adrp	x8, _RIP_PORT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RIP_PORT@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_htons
	stp	w21, w0, [sp, #20]
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #16
	bl	_bind
	tbnz	x0, #63, LBB0_5
; %bb.3:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_fix_sock
	mov	w8, #1
	strb	w8, [sp, #15]
Lloh12:
	adrp	x8, _IPPROTO_IP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IPPROTO_IP@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _IP_MULTICAST_TTL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IP_MULTICAST_TTL@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	add	x3, sp, #15
	mov	x0, x19
	mov	w4, #1
	bl	_setsockopt
	tbz	x0, #63, LBB0_8
; %bb.4:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_DBGERR
	b	LBB0_8
LBB0_5:
	cbz	w20, LBB0_7
; %bb.6:
Lloh20:
	adrp	x8, _errno@GOTPAGE
Lloh21:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
Lloh23:
	adrp	x9, _EADDRINUSE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _EADDRINUSE@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_BADERR
LBB0_7:
	mov	x0, x19
	bl	_close
	mov	w19, #-1
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rip_sock = socket()"

	.comm	_RIP_PORT,4,2                   ; @RIP_PORT
	.comm	_errno,8,3                      ; @errno
	.comm	_EADDRINUSE,8,3                 ; @EADDRINUSE
l_.str.1:                               ; @.str.1
	.asciz	"bind(rip_sock)"

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

	.comm	_IPPROTO_IP,4,2                 ; @IPPROTO_IP
	.comm	_IP_MULTICAST_TTL,4,2           ; @IP_MULTICAST_TTL
l_.str.3:                               ; @.str.3
	.asciz	"rip_sock setsockopt(IP_MULTICAST_TTL)"

	.no_dead_strip	_get_rip_sock
.subsections_via_symbols
