	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_ip_multicast_membership
_test_ip_multicast_membership:          ## @test_ip_multicast_membership
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$4, -76(%rbp)
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-80(%rbp), %rcx
	leaq	-76(%rbp), %r8
	callq	_getsockopt
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_err
LBB0_2:
	movl	-80(%rbp), %eax
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_20
## %bb.3:
	movq	_dorandom@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.5:
	xorl	%eax, %eax
	callq	_srandomdev
	xorl	%eax, %eax
	callq	_random
	cltq
	imulq	$-2146434559, %rax, %r14        ## imm = 0x80100201
	shrq	$32, %r14
	addl	%eax, %r14d
	movl	%r14d, %ecx
	shrl	$31, %ecx
	shrl	$10, %r14d
	addl	%ecx, %r14d
	movl	%r14d, %ecx
	shll	$11, %ecx
	subl	%ecx, %r14d
	addl	%eax, %r14d
	shll	$16, %r14d
	orl	$-301989888, %r14d              ## imm = 0xEE000000
	jmp	LBB0_6
LBB0_4:
	movl	$-301924096, %r14d              ## imm = 0xEE010100
LBB0_6:
	movq	_nmcastgroups@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_20
## %bb.7:
	incl	%r14d
	leaq	-96(%rbp), %r12
	leaq	-64(%rbp), %rbx
	xorl	%r13d, %r13d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	_nmcastgroups@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incl	%r13d
	cmpl	%eax, %r13d
	jge	LBB0_13
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r14,%r13), %edi
	callq	_htonl
	movq	%rax, -96(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	movl	$16, %ecx
	callq	_inet_ntop
	movq	_verbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_fprintf
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	_IPPROTO_IP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IP_ADD_MEMBERSHIP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movq	%r12, %rcx
	movl	$16, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	jns	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	$-1, %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rbx, %r8
	leaq	L_.str.3(%rip), %r9
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_12
LBB0_13:
	testl	%eax, %eax
	jle	LBB0_20
## %bb.14:
	leaq	-96(%rbp), %r12
	leaq	-64(%rbp), %rbx
	xorl	%r13d, %r13d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_15 Depth=1
	incl	%r13d
	movq	_nmcastgroups@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jge	LBB0_20
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	leal	(%r14,%r13), %edi
	callq	_htonl
	movq	%rax, -96(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	movl	$16, %ecx
	callq	_inet_ntop
	movq	_verbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdx
	callq	_fprintf
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	_IPPROTO_IP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IP_DROP_MEMBERSHIP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movq	%r12, %rcx
	movl	$16, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	jns	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	$-1, %edi
	leaq	L_.str.5(%rip), %rsi
	movl	%r15d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rbx, %r8
	leaq	L_.str.3(%rip), %r9
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_19
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_TYPE,4,2                    ## @SO_TYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test_ip_multicast_membership(%s): so_type getsockopt()"

	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_dorandom,8,3                   ## @dorandom
	.comm	_nmcastgroups,4,2               ## @nmcastgroups
	.comm	_INADDR_ANY,8,3                 ## @INADDR_ANY
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_verbose,8,3                    ## @verbose
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"IP_ADD_MEMBERSHIP %s INADDR_ANY\n"

	.comm	_IPPROTO_IP,4,2                 ## @IPPROTO_IP
	.comm	_IP_ADD_MEMBERSHIP,4,2          ## @IP_ADD_MEMBERSHIP
L_.str.2:                               ## @.str.2
	.asciz	"test_ip_multicast_membership(%d, %s): failed IP_ADD_MEMBERSHIP (%s, %s)"

L_.str.3:                               ## @.str.3
	.asciz	"INADDR_ANY"

L_.str.4:                               ## @.str.4
	.asciz	"IP_DROP_MEMBERSHIP %s INADDR_ANY\n"

	.comm	_IP_DROP_MEMBERSHIP,4,2         ## @IP_DROP_MEMBERSHIP
L_.str.5:                               ## @.str.5
	.asciz	"test_ip_multicast_membership(%d, %s): failed IP_DROP_MEMBERSHIP (%s, %s)"

	.no_dead_strip	_test_ip_multicast_membership
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_ip_multicast_membership
_test_ip_multicast_membership:          ; @test_ip_multicast_membership
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	x1, [sp, #40]                   ; 8-byte Folded Spill
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #88]
	mov	w8, #4
	str	w8, [sp, #48]
Lloh3:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _SO_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SO_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x3, sp, #52
	add	x4, sp, #48
	bl	_getsockopt
	tbz	x0, #63, LBB0_2
; %bb.1:
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	str	x8, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_2:
	ldr	w8, [sp, #52]
Lloh11:
	adrp	x9, _SOCK_STREAM@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SOCK_STREAM@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_20
; %bb.3:
Lloh14:
	adrp	x8, _dorandom@GOTPAGE
Lloh15:
	ldr	x8, [x8, _dorandom@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	bl	_srandomdev
	bl	_random
	mov	w8, #513
	movk	w8, #32784, lsl #16
	smull	x8, w0, w8
	lsr	x8, x8, #32
	add	w8, w8, w0
	lsr	w9, w8, #10
	add	w8, w9, w8, lsr #31
	sub	w8, w8, w8, lsl #11
	add	w8, w0, w8
	mov	w9, #-301989888
	orr	w9, w9, w8, lsl #16
	b	LBB0_6
LBB0_5:
	mov	w9, #256
	movk	w9, #60929, lsl #16
LBB0_6:
Lloh17:
	adrp	x23, _nmcastgroups@GOTPAGE
Lloh18:
	ldr	x23, [x23, _nmcastgroups@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.7:
	mov	w21, #0
Lloh19:
	adrp	x24, _INADDR_ANY@GOTPAGE
Lloh20:
	ldr	x24, [x24, _INADDR_ANY@GOTPAGEOFF]
	str	w9, [sp, #36]                   ; 4-byte Folded Spill
	add	w19, w9, #1
Lloh21:
	adrp	x25, _AF_INET@GOTPAGE
Lloh22:
	ldr	x25, [x25, _AF_INET@GOTPAGEOFF]
Lloh23:
	adrp	x26, _verbose@GOTPAGE
Lloh24:
	ldr	x26, [x26, _verbose@GOTPAGEOFF]
Lloh25:
	adrp	x27, _IPPROTO_IP@GOTPAGE
Lloh26:
	ldr	x27, [x27, _IPPROTO_IP@GOTPAGEOFF]
Lloh27:
	adrp	x28, _IP_ADD_MEMBERSHIP@GOTPAGE
Lloh28:
	ldr	x28, [x28, _IP_ADD_MEMBERSHIP@GOTPAGEOFF]
Lloh29:
	adrp	x22, l_.str.1@PAGE
Lloh30:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x23]
	add	w21, w21, #1
	cmp	w21, w8
	b.ge	LBB0_13
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	w0, w19, w21
	bl	_htonl
	ldr	x8, [x24]
	stp	x0, x8, [sp, #56]
	ldr	w0, [x25]
	add	x1, sp, #56
	add	x2, sp, #72
	mov	w3, #16
	bl	_inet_ntop
	ldr	x8, [x26]
	cbz	x8, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
Lloh31:
	adrp	x8, _stderr@GOTPAGE
Lloh32:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	add	x2, sp, #72
	mov	x1, x22
	bl	_fprintf
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w1, [x27]
	ldr	w2, [x28]
	add	x3, sp, #56
	mov	x0, x20
	mov	w4, #16
	bl	_setsockopt
	tbz	x0, #63, LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
Lloh34:
	adrp	x8, l_.str.3@PAGE
Lloh35:
	add	x9, x8, l_.str.3@PAGEOFF
	add	x8, sp, #72
	stp	x8, x9, [sp, #16]
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	stp	x20, x8, [sp]
	mov	w0, #-1
Lloh36:
	adrp	x1, l_.str.2@PAGE
Lloh37:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_err
	b	LBB0_8
LBB0_13:
	cmp	w8, #1
	ldr	w8, [sp, #36]                   ; 4-byte Folded Reload
	b.lt	LBB0_20
; %bb.14:
	mov	w19, #0
	add	w21, w8, #1
Lloh38:
	adrp	x28, _IP_DROP_MEMBERSHIP@GOTPAGE
Lloh39:
	ldr	x28, [x28, _IP_DROP_MEMBERSHIP@GOTPAGEOFF]
	mov	x22, x20
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w8, [x23]
	add	w19, w19, #1
	cmp	w19, w8
	b.ge	LBB0_20
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	add	w0, w21, w19
	bl	_htonl
	ldr	x8, [x24]
	stp	x0, x8, [sp, #56]
	ldr	w0, [x25]
	add	x1, sp, #56
	add	x2, sp, #72
	mov	w3, #16
	bl	_inet_ntop
	ldr	x8, [x26]
	cbz	x8, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
Lloh40:
	adrp	x8, _stderr@GOTPAGE
Lloh41:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	add	x2, sp, #72
Lloh43:
	adrp	x1, l_.str.4@PAGE
Lloh44:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
LBB0_18:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w1, [x27]
	ldr	w2, [x28]
	add	x3, sp, #56
	mov	x0, x20
	mov	w4, #16
	bl	_setsockopt
	tbz	x0, #63, LBB0_15
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
Lloh45:
	adrp	x8, l_.str.3@PAGE
Lloh46:
	add	x9, x8, l_.str.3@PAGEOFF
	add	x8, sp, #72
	stp	x8, x9, [sp, #16]
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	stp	x22, x8, [sp]
	mov	w0, #-1
Lloh47:
	adrp	x1, l_.str.5@PAGE
Lloh48:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_err
	b	LBB0_15
LBB0_20:
	ldr	x8, [sp, #88]
Lloh49:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh50:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh51:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_TYPE,4,2                    ; @SO_TYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test_ip_multicast_membership(%s): so_type getsockopt()"

	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_dorandom,8,3                   ; @dorandom
	.comm	_nmcastgroups,4,2               ; @nmcastgroups
	.comm	_INADDR_ANY,8,3                 ; @INADDR_ANY
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_verbose,8,3                    ; @verbose
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"IP_ADD_MEMBERSHIP %s INADDR_ANY\n"

	.comm	_IPPROTO_IP,4,2                 ; @IPPROTO_IP
	.comm	_IP_ADD_MEMBERSHIP,4,2          ; @IP_ADD_MEMBERSHIP
l_.str.2:                               ; @.str.2
	.asciz	"test_ip_multicast_membership(%d, %s): failed IP_ADD_MEMBERSHIP (%s, %s)"

l_.str.3:                               ; @.str.3
	.asciz	"INADDR_ANY"

l_.str.4:                               ; @.str.4
	.asciz	"IP_DROP_MEMBERSHIP %s INADDR_ANY\n"

	.comm	_IP_DROP_MEMBERSHIP,4,2         ; @IP_DROP_MEMBERSHIP
l_.str.5:                               ; @.str.5
	.asciz	"test_ip_multicast_membership(%d, %s): failed IP_DROP_MEMBERSHIP (%s, %s)"

	.no_dead_strip	_test_ip_multicast_membership
.subsections_via_symbols
