	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rawv6_bind
_rawv6_bind:                            ## @rawv6_bind
	.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, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_inet_sk
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_inet6_sk
	movq	%rax, %rbx
	movq	_SIN6_LEN_RFC2133@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jle	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	callq	_ipv6_addr_type
	movq	_IPV6_ADDR_MAPPED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.4:
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_24
LBB0_5:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_lock_sock
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	(%r13), %rax
	movq	_TCP_CLOSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_23
## %bb.6:
	movq	_IPV6_ADDR_ANY@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	(%rax), %ecx
	je	LBB0_21
## %bb.7:
	movq	_IPV6_ADDR_LINKLOCAL@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_8
## %bb.13:
	cmpl	$16, %r12d
	jb	LBB0_16
## %bb.14:
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	%rax, 8(%r13)
LBB0_16:
	cmpq	$0, 8(%r13)
	je	LBB0_23
## %bb.17:
	movq	%r13, %rdi
	callq	_sock_net
	movq	8(%r13), %rsi
	movl	%eax, %edi
	callq	_dev_get_by_index
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_9
## %bb.18:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_23
LBB0_8:
	xorl	%r12d, %r12d
LBB0_9:
	movq	_LOOPBACK4_IPV6@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IPV6_ADDR_MULTICAST@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	jne	LBB0_19
## %bb.10:
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	%r13, %rdi
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	callq	_sock_net
	movl	%eax, %edi
	movq	%r14, %rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_ipv6_chk_addr
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%eax, %eax
	je	LBB0_11
LBB0_19:
	testq	%r12, %r12
	je	LBB0_21
## %bb.20:
	movq	%r12, %rdi
	movl	%edx, %r15d
	callq	_dev_put
	movl	%r15d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
LBB0_21:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%edx, (%rax)
	movl	%edx, 4(%rax)
	movq	%rbx, %r12
	leaq	4(%rbx), %rdi
	movq	%r14, %rsi
	movl	%ecx, %ebx
	callq	_ipv6_addr_copy
	movq	_IPV6_ADDR_MULTICAST@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	testl	%ebx, (%rax)
	jne	LBB0_23
## %bb.22:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_ipv6_addr_copy
LBB0_23:
	movq	%r13, %rdi
	callq	_release_sock
LBB0_24:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	testq	%r12, %r12
	je	LBB0_23
## %bb.12:
	movq	%r12, %rdi
	callq	_dev_put
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_SIN6_LEN_RFC2133,4,2           ## @SIN6_LEN_RFC2133
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IPV6_ADDR_MAPPED,4,2           ## @IPV6_ADDR_MAPPED
	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
	.comm	_TCP_CLOSE,8,3                  ## @TCP_CLOSE
	.comm	_IPV6_ADDR_ANY,4,2              ## @IPV6_ADDR_ANY
	.comm	_IPV6_ADDR_LINKLOCAL,4,2        ## @IPV6_ADDR_LINKLOCAL
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_LOOPBACK4_IPV6,4,2             ## @LOOPBACK4_IPV6
	.comm	_IPV6_ADDR_MULTICAST,4,2        ## @IPV6_ADDR_MULTICAST
	.no_dead_strip	_rawv6_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rawv6_bind
_rawv6_bind:                            ; @rawv6_bind
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x2
	mov	x20, x1
	mov	x19, x0
	bl	_inet_sk
	mov	x22, x0
	mov	x0, x19
	bl	_inet6_sk
Lloh0:
	adrp	x8, _SIN6_LEN_RFC2133@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIN6_LEN_RFC2133@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w25
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x21, x0
	mov	x0, x20
	bl	_ipv6_addr_type
Lloh5:
	adrp	x8, _IPV6_ADDR_MAPPED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IPV6_ADDR_MAPPED@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.3:
Lloh8:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_24
LBB0_5:
	mov	x23, x0
	mov	x0, x19
	bl	_lock_sock
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w24, w8
	ldr	x8, [x19]
Lloh13:
	adrp	x9, _TCP_CLOSE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _TCP_CLOSE@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_23
; %bb.6:
Lloh16:
	adrp	x8, _IPV6_ADDR_ANY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IPV6_ADDR_ANY@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x26, _IPV6_ADDR_MULTICAST@GOTPAGE
Lloh20:
	ldr	x26, [x26, _IPV6_ADDR_MULTICAST@GOTPAGEOFF]
	cmp	w23, w8
	b.ne	LBB0_8
; %bb.7:
	mov	w24, #0
	b	LBB0_20
LBB0_8:
Lloh21:
	adrp	x8, _IPV6_ADDR_LINKLOCAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IPV6_ADDR_LINKLOCAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_15
; %bb.9:
	cmp	w25, #16
	b.lo	LBB0_12
; %bb.10:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_12
; %bb.11:
	str	x8, [x19, #8]
LBB0_12:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_23
; %bb.13:
	mov	x0, x19
	bl	_sock_net
	ldr	x1, [x19, #8]
	bl	_dev_get_by_index
	mov	x25, x0
	cbnz	x0, LBB0_16
; %bb.14:
Lloh24:
	adrp	x8, _ENODEV@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_23
LBB0_15:
	mov	x25, #0
LBB0_16:
Lloh27:
	adrp	x8, _LOOPBACK4_IPV6@GOTPAGE
Lloh28:
	ldr	x8, [x8, _LOOPBACK4_IPV6@GOTPAGEOFF]
Lloh29:
	ldr	w24, [x8]
	ldr	w8, [x26]
	tst	w8, w23
	b.ne	LBB0_18
; %bb.17:
Lloh30:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
Lloh32:
	ldr	w27, [x8]
	mov	x0, x19
	bl	_sock_net
	mov	x1, x20
	mov	x2, x25
	mov	w3, #0
	bl	_ipv6_chk_addr
	cbz	w0, LBB0_25
LBB0_18:
	cbz	x25, LBB0_20
; %bb.19:
	mov	x0, x25
	bl	_dev_put
LBB0_20:
	stp	w24, w24, [x22]
	add	x0, x21, #4
	mov	x1, x20
	bl	_ipv6_addr_copy
	ldr	w8, [x26]
	tst	w8, w23
	b.ne	LBB0_22
; %bb.21:
	mov	x0, x21
	mov	x1, x20
	bl	_ipv6_addr_copy
LBB0_22:
	mov	w24, #0
LBB0_23:
	mov	x0, x19
	bl	_release_sock
LBB0_24:
	mov	x0, x24
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_25:
	neg	w24, w27
	cbz	x25, LBB0_23
; %bb.26:
	mov	x0, x25
	bl	_dev_put
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_SIN6_LEN_RFC2133,4,2           ; @SIN6_LEN_RFC2133
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IPV6_ADDR_MAPPED,4,2           ; @IPV6_ADDR_MAPPED
	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
	.comm	_TCP_CLOSE,8,3                  ; @TCP_CLOSE
	.comm	_IPV6_ADDR_ANY,4,2              ; @IPV6_ADDR_ANY
	.comm	_IPV6_ADDR_LINKLOCAL,4,2        ; @IPV6_ADDR_LINKLOCAL
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_LOOPBACK4_IPV6,4,2             ; @LOOPBACK4_IPV6
	.comm	_IPV6_ADDR_MULTICAST,4,2        ; @IPV6_ADDR_MULTICAST
	.no_dead_strip	_rawv6_bind
.subsections_via_symbols
