	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function selinux_socket_connect
_selinux_socket_connect:                ## @selinux_socket_connect
	.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, %rbx
	movq	(%rdi), %r15
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCKET__CONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	callq	_socket_has_perm
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movq	%rbx, %rdi
	callq	_SOCK_INODE
	movq	(%rax), %r13
	movq	(%r13), %rax
	movq	_SECCLASS_TCP_SOCKET@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	je	LBB0_3
## %bb.2:
	movq	_SECCLASS_DCCP_SOCKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
LBB0_12:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_selinux_netlbl_socket_connect
	jmp	LBB0_13
LBB0_3:
	movq	(%r15), %rax
	movq	_PF_INET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	cmpl	$4, %r12d
	jb	LBB0_5
LBB0_7:
	movl	(%r14), %edi
	callq	_ntohs
	movl	8(%r15), %edi
	movzwl	%ax, %r12d
	leaq	-44(%rbp), %rdx
	movl	%r12d, %esi
	callq	_sel_netport_sid
	testl	%eax, %eax
	jne	LBB0_13
## %bb.8:
	movq	(%r13), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_9
## %bb.10:
	movq	_TCP_SOCKET__NAME_CONNECT@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_6:
	movq	_SIN6_LEN_RFC2133@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jle	LBB0_7
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_DCCP_SOCKET__NAME_CONNECT@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %ebx
	movq	_NET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdi
	callq	_COMMON_AUDIT_DATA_INIT
	movl	%r12d, %edi
	callq	_htons
	movl	%eax, -56(%rbp)
	movq	(%r15), %rax
	movq	%rax, -64(%rbp)
	movl	8(%r13), %edi
	movl	-44(%rbp), %esi
	movq	(%r13), %rdx
	movl	%ebx, %ecx
	leaq	-64(%rbp), %r8
	callq	_avc_has_perm
	testl	%eax, %eax
	jne	LBB0_13
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_current,4,2                    ## @current
	.comm	_SOCKET__CONNECT,4,2            ## @SOCKET__CONNECT
	.comm	_SECCLASS_TCP_SOCKET,8,3        ## @SECCLASS_TCP_SOCKET
	.comm	_SECCLASS_DCCP_SOCKET,8,3       ## @SECCLASS_DCCP_SOCKET
	.comm	_PF_INET,8,3                    ## @PF_INET
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SIN6_LEN_RFC2133,4,2           ## @SIN6_LEN_RFC2133
	.comm	_TCP_SOCKET__NAME_CONNECT,4,2   ## @TCP_SOCKET__NAME_CONNECT
	.comm	_DCCP_SOCKET__NAME_CONNECT,4,2  ## @DCCP_SOCKET__NAME_CONNECT
	.comm	_NET,4,2                        ## @NET
	.no_dead_strip	_selinux_socket_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function selinux_socket_connect
_selinux_socket_connect:                ; @selinux_socket_connect
	.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	x21, x2
	mov	x19, x1
	mov	x22, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _current@GOTPAGE
Lloh1:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SOCKET__CONNECT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCKET__CONNECT@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_socket_has_perm
	cbnz	w0, LBB0_9
; %bb.1:
	mov	x0, x22
	bl	_SOCK_INODE
	ldr	x23, [x0]
	ldr	x8, [x23]
Lloh6:
	adrp	x22, _SECCLASS_TCP_SOCKET@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SECCLASS_TCP_SOCKET@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh8:
	adrp	x10, _SECCLASS_DCCP_SOCKET@GOTPAGE
Lloh9:
	ldr	x10, [x10, _SECCLASS_DCCP_SOCKET@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.2:
	ldr	x8, [x20]
Lloh11:
	adrp	x9, _PF_INET@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PF_INET@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.3:
	cmp	w21, #4
	b.lo	LBB0_8
LBB0_4:
	ldr	w0, [x19]
	bl	_ntohs
	mov	x21, x0
	ldr	w0, [x20, #8]
	add	x2, sp, #12
	mov	x1, x21
	bl	_sel_netport_sid
	cbnz	w0, LBB0_9
; %bb.5:
	ldr	x8, [x23]
	ldr	x9, [x22]
Lloh14:
	adrp	x10, _TCP_SOCKET__NAME_CONNECT@GOTPAGE
Lloh15:
	ldr	x10, [x10, _TCP_SOCKET__NAME_CONNECT@GOTPAGEOFF]
Lloh16:
	adrp	x11, _DCCP_SOCKET__NAME_CONNECT@GOTPAGE
Lloh17:
	ldr	x11, [x11, _DCCP_SOCKET__NAME_CONNECT@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w22, [x8]
Lloh18:
	adrp	x8, _NET@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NET@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	add	x0, sp, #16
	bl	_COMMON_AUDIT_DATA_INIT
	mov	x0, x21
	bl	_htons
	str	w0, [sp, #24]
	ldr	x8, [x20]
	str	x8, [sp, #16]
	ldr	w0, [x23, #8]
	ldr	w1, [sp, #12]
	ldr	x2, [x23]
	add	x4, sp, #16
	mov	x3, x22
	bl	_avc_has_perm
	cbnz	w0, LBB0_9
LBB0_6:
	mov	x0, x20
	mov	x1, x19
	bl	_selinux_netlbl_socket_connect
	b	LBB0_9
LBB0_7:
Lloh21:
	adrp	x8, _SIN6_LEN_RFC2133@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SIN6_LEN_RFC2133@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w8, w21
	b.le	LBB0_4
LBB0_8:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_current,4,2                    ; @current
	.comm	_SOCKET__CONNECT,4,2            ; @SOCKET__CONNECT
	.comm	_SECCLASS_TCP_SOCKET,8,3        ; @SECCLASS_TCP_SOCKET
	.comm	_SECCLASS_DCCP_SOCKET,8,3       ; @SECCLASS_DCCP_SOCKET
	.comm	_PF_INET,8,3                    ; @PF_INET
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SIN6_LEN_RFC2133,4,2           ; @SIN6_LEN_RFC2133
	.comm	_TCP_SOCKET__NAME_CONNECT,4,2   ; @TCP_SOCKET__NAME_CONNECT
	.comm	_DCCP_SOCKET__NAME_CONNECT,4,2  ; @DCCP_SOCKET__NAME_CONNECT
	.comm	_NET,4,2                        ; @NET
	.no_dead_strip	_selinux_socket_connect
.subsections_via_symbols
