	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_socket                     ## -- Begin function sys_socket
	.p2align	4, 0x90
_sys_socket:                            ## @sys_socket
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movl	%esi, %r14d
	movl	%edi, %r15d
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	callq	_STRACE
	movl	%r15d, %edi
	callq	_sock_family_to_real
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movl	%r14d, %edi
	movl	%r13d, %esi
	callq	_sock_type_to_real
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movq	_SOCK_RAW_@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r14d, %ecx
	movq	_IPPROTO_RAW@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%r13d, %edx
	orl	%ecx, %edx
	jne	LBB0_5
## %bb.4:
	movq	_IPPROTO_ICMP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
LBB0_5:
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	%r13d, %edx
	callq	_socket
	testl	%eax, %eax
	js	LBB0_12
## %bb.6:
	movl	%eax, %r12d
	movq	_AF_INET_@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_9
## %bb.7:
	movq	_SOCK_DGRAM_@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_9
## %bb.8:
	movl	$1, -44(%rbp)
	movq	_IPPROTO_IP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IP_STRIPHDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movl	%r12d, %edi
	movl	$4, %r8d
	callq	_setsockopt
LBB0_9:
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	callq	_sock_fd_create
	movq	%rax, %rbx
	testq	%rax, %rax
	jns	LBB0_11
## %bb.10:
	movl	%r12d, %edi
	callq	_close
	jmp	LBB0_11
LBB0_1:
	movq	__EINVAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_11:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_errno_map                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socket(%d, %d, %d)"

	.comm	__EINVAL,8,3                    ## @_EINVAL
	.comm	_SOCK_RAW_,4,2                  ## @SOCK_RAW_
	.comm	_IPPROTO_RAW,4,2                ## @IPPROTO_RAW
	.comm	_IPPROTO_ICMP,4,2               ## @IPPROTO_ICMP
	.comm	_AF_INET_,4,2                   ## @AF_INET_
	.comm	_SOCK_DGRAM_,4,2                ## @SOCK_DGRAM_
	.comm	_IPPROTO_IP,4,2                 ## @IPPROTO_IP
	.comm	_IP_STRIPHDR,4,2                ## @IP_STRIPHDR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_socket                     ; -- Begin function sys_socket
	.p2align	2
_sys_socket:                            ; @sys_socket
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	mov	x3, x21
	bl	_STRACE
	mov	x0, x20
	bl	_sock_family_to_real
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	x23, x0
	mov	x0, x19
	mov	x1, x21
	bl	_sock_type_to_real
	tbnz	w0, #31, LBB0_7
; %bb.2:
	mov	x1, x0
Lloh2:
	adrp	x8, _SOCK_RAW_@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SOCK_RAW_@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _IPPROTO_RAW@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IPPROTO_RAW@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w9, w21
	ccmp	w8, w19, #0, eq
Lloh8:
	adrp	x8, _IPPROTO_ICMP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IPPROTO_ICMP@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	csel	w22, w8, w21, eq
	mov	x0, x23
	mov	x2, x22
	bl	_socket
	tbnz	w0, #31, LBB0_9
; %bb.3:
	mov	x21, x0
Lloh11:
	adrp	x8, _AF_INET_@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AF_INET_@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _SOCK_DGRAM_@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SOCK_DGRAM_@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, w20
	ccmp	w9, w19, #0, eq
	b.ne	LBB0_5
; %bb.4:
	mov	w8, #1
	str	w8, [sp, #12]
Lloh17:
	adrp	x8, _IPPROTO_IP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IPPROTO_IP@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _IP_STRIPHDR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IP_STRIPHDR@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x21
	mov	w4, #4
	bl	_setsockopt
LBB0_5:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	bl	_sock_fd_create
	mov	x19, x0
	tbz	x0, #63, LBB0_8
; %bb.6:
	mov	x0, x21
	bl	_close
	b	LBB0_8
LBB0_7:
Lloh23:
	adrp	x8, __EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, __EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	x19, [x8]
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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_errno_map
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socket(%d, %d, %d)"

	.comm	__EINVAL,8,3                    ; @_EINVAL
	.comm	_SOCK_RAW_,4,2                  ; @SOCK_RAW_
	.comm	_IPPROTO_RAW,4,2                ; @IPPROTO_RAW
	.comm	_IPPROTO_ICMP,4,2               ; @IPPROTO_ICMP
	.comm	_AF_INET_,4,2                   ; @AF_INET_
	.comm	_SOCK_DGRAM_,4,2                ; @SOCK_DGRAM_
	.comm	_IPPROTO_IP,4,2                 ; @IPPROTO_IP
	.comm	_IP_STRIPHDR,4,2                ; @IP_STRIPHDR
.subsections_via_symbols
