	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_socket
_create_socket:                         ## @create_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	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rsi), %rax
	movq	_IPPROTO_UDP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	8(%r14), %rcx
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
LBB0_2:
	movl	40(%rbx), %esi
	movq	%r14, %rdi
	callq	_create_socket_udp
	movq	%rax, 8(%rbx)
	movq	_SF_GETADDRINFO_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 40(%rbx)
	cmpq	$0, 32(%rbx)
	je	LBB0_8
## %bb.3:
	movups	(%r14), %xmm0
	movaps	%xmm0, -48(%rbp)
	movq	16(%r14), %rax
	movq	%rax, -32(%rbp)
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_IPPROTO_TCP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-48(%rbp), %rdi
	callq	_create_socket_tcp
	movq	%rax, 24(%rbx)
	jmp	LBB0_8
LBB0_4:
	movq	_IPPROTO_TCP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_6
## %bb.5:
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_6
## %bb.7:
	xorl	%edi, %edi
	callq	_ASSERT
	jmp	LBB0_8
LBB0_6:
	movq	%r14, %rdi
	callq	_create_socket_tcp
	movq	%rax, 8(%rbx)
LBB0_8:
	movq	8(%rbx), %rdi
	leaq	16(%rbx), %rsi
	callq	_socket_set_buffers
	movq	8(%rbx), %rdi
	movl	(%rbx), %esi
	callq	_socket_set_mark
	movl	16(%r14), %esi
	movq	%rbx, %rdi
	callq	_bind_local
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPPROTO_UDP,8,3                ## @IPPROTO_UDP
	.comm	_SOCK_DGRAM,8,3                 ## @SOCK_DGRAM
	.comm	_SF_GETADDRINFO_DGRAM,4,2       ## @SF_GETADDRINFO_DGRAM
	.comm	_SOCK_STREAM,8,3                ## @SOCK_STREAM
	.comm	_IPPROTO_TCP,8,3                ## @IPPROTO_TCP
	.no_dead_strip	_create_socket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_socket
_create_socket:                         ; @create_socket
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _IPPROTO_UDP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IPPROTO_UDP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	ldr	x9, [x20, #8]
Lloh3:
	adrp	x10, _SOCK_DGRAM@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SOCK_DGRAM@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
LBB0_2:
	ldr	w1, [x19, #40]
	mov	x0, x20
	bl	_create_socket_udp
Lloh6:
	adrp	x8, _SF_GETADDRINFO_DGRAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SF_GETADDRINFO_DGRAM@GOTPAGEOFF]
	str	x0, [x19, #8]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #40]
	orr	w8, w9, w8
	str	w8, [x19, #40]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_7
; %bb.3:
	ldr	q0, [x20]
	str	q0, [sp]
	ldr	x8, [x20, #16]
	str	x8, [sp, #16]
Lloh9:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _IPPROTO_TCP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IPPROTO_TCP@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	stp	x9, x8, [sp]
	mov	x0, sp
	bl	_create_socket_tcp
	str	x0, [x19, #24]
	b	LBB0_7
LBB0_4:
Lloh15:
	adrp	x10, _IPPROTO_TCP@GOTPAGE
Lloh16:
	ldr	x10, [x10, _IPPROTO_TCP@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
Lloh18:
	adrp	x11, _SOCK_STREAM@GOTPAGE
Lloh19:
	ldr	x11, [x11, _SOCK_STREAM@GOTPAGEOFF]
Lloh20:
	ldr	x11, [x11]
	cmp	x8, x10
	ccmp	x9, x11, #4, ne
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_create_socket_tcp
	str	x0, [x19, #8]
	b	LBB0_7
LBB0_6:
	mov	w0, #0
	bl	_ASSERT
LBB0_7:
	ldr	x0, [x19, #8]
	add	x1, x19, #16
	bl	_socket_set_buffers
	ldr	x0, [x19, #8]
	ldr	w1, [x19]
	bl	_socket_set_mark
	ldr	w1, [x20, #16]
	mov	x0, x19
	bl	_bind_local
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IPPROTO_UDP,8,3                ; @IPPROTO_UDP
	.comm	_SOCK_DGRAM,8,3                 ; @SOCK_DGRAM
	.comm	_SF_GETADDRINFO_DGRAM,4,2       ; @SF_GETADDRINFO_DGRAM
	.comm	_SOCK_STREAM,8,3                ; @SOCK_STREAM
	.comm	_IPPROTO_TCP,8,3                ; @IPPROTO_TCP
	.no_dead_strip	_create_socket
.subsections_via_symbols
