	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function multicast_open
_multicast_open:                        ## @multicast_open
	.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
	movq	%rdx, %r15
	movq	%rdi, %r14
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%edx, %edx
	callq	_socket
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	movl	$16, %esi
	callq	_bzero
	movq	_MULTICAST_IP@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_inet_addr
	movq	%rax, -48(%rbp)
	movq	_DISC_IP@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_inet_addr
	movq	%rax, -56(%rbp)
	movq	_IPPROTO_IP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IP_ADD_MEMBERSHIP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movq	%r15, %rcx
	movl	$16, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	js	LBB0_4
## %bb.2:
	movl	%ebx, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_5
LBB0_4:
	movslq	(%r12), %rsi
	movl	(%r13), %edx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	movl	%ebx, %edi
	callq	_close
LBB0_5:
	movl	$-1, %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_INET,4,2                    ## @PF_INET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"multicast_test: socket(PF_INET, %s, 0)"

	.comm	_MULTICAST_IP,4,2               ## @MULTICAST_IP
	.comm	_DISC_IP,4,2                    ## @DISC_IP
	.comm	_IPPROTO_IP,4,2                 ## @IPPROTO_IP
	.comm	_IP_ADD_MEMBERSHIP,4,2          ## @IP_ADD_MEMBERSHIP
L_.str.1:                               ## @.str.1
	.asciz	"multicast_test: setsockopt(IPPROTO_IP, IP_ADD_MEMBERSHIP, {%s, %s})"

	.no_dead_strip	_multicast_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function multicast_open
_multicast_open:                        ; @multicast_open
	.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	x21, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _PF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x19, x0
	add	x0, sp, #16
	mov	w1, #16
	bl	_bzero
Lloh3:
	adrp	x21, _MULTICAST_IP@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MULTICAST_IP@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_inet_addr
	str	x0, [sp, #24]
Lloh5:
	adrp	x22, _DISC_IP@GOTPAGE
Lloh6:
	ldr	x22, [x22, _DISC_IP@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_inet_addr
	str	x0, [sp, #16]
Lloh7:
	adrp	x8, _IPPROTO_IP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IPPROTO_IP@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _IP_ADD_MEMBERSHIP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IP_ADD_MEMBERSHIP@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	add	x3, sp, #16
	mov	x0, x19
	mov	w4, #16
	bl	_setsockopt
	tbnz	x0, #63, LBB0_4
; %bb.2:
	mov	w0, #0
	str	w19, [x20]
	b	LBB0_6
LBB0_3:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_warn
	b	LBB0_5
LBB0_4:
	ldrsw	x1, [x21]
	ldr	w8, [x22]
	str	x8, [sp]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	mov	x0, x19
	bl	_close
LBB0_5:
	mov	w0, #-1
LBB0_6:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_INET,4,2                    ; @PF_INET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"multicast_test: socket(PF_INET, %s, 0)"

	.comm	_MULTICAST_IP,4,2               ; @MULTICAST_IP
	.comm	_DISC_IP,4,2                    ; @DISC_IP
	.comm	_IPPROTO_IP,4,2                 ; @IPPROTO_IP
	.comm	_IP_ADD_MEMBERSHIP,4,2          ; @IP_ADD_MEMBERSHIP
l_.str.1:                               ; @.str.1
	.asciz	"multicast_test: setsockopt(IPPROTO_IP, IP_ADD_MEMBERSHIP, {%s, %s})"

	.no_dead_strip	_multicast_open
.subsections_via_symbols
