	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_client_socket_ipv6             ## -- Begin function client_socket_ipv6
	.p2align	4, 0x90
_client_socket_ipv6:                    ## @client_socket_ipv6
	.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	$1, -44(%rbp)
	movq	_SM_IPV6@GOTPCREL(%rip), %rax
	movl	$-1, %r14d
	testl	%edx, (%rax)
	je	LBB0_11
## %bb.1:
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	%edx, %edi
	movl	$1, %esi
	callq	_new_socket
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.2:
	movl	%eax, %r13d
	movq	_SM_UDP@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_maximize_sndbuf
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_maximize_rcvbuf
	jmp	LBB0_7
LBB0_4:
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_SO_REUSEADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movl	%r13d, %edi
	movl	$4, %r8d
	callq	_setsockopt
	movq	_tcp_maximize_buffers@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_maximize_sndbuf
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_maximize_rcvbuf
LBB0_6:
	movl	(%rbx), %esi
	movq	_SO_KEEPALIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rbx
	movl	%r13d, %edi
	movq	%rbx, %rcx
	movl	$4, %r8d
	callq	_setsockopt
	movq	_IPPROTO_TCP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TCP_NODELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %edi
	movq	%rbx, %rcx
	movl	$4, %r8d
	callq	_setsockopt
LBB0_7:
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movq	_AF_INET6@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	%r12d, %edi
	callq	_htons
	movl	%eax, -52(%rbp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$16, %edx
	callq	_memcpy
	movl	%r13d, %edi
	movq	%rbx, %rsi
	movl	$12, %edx
	callq	_connect
	cmpl	$-1, %eax
	jne	LBB0_10
## %bb.9:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINPROGRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
LBB0_10:
	movl	%r13d, %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	L_.str(%rip), %rdi
	callq	_perror
	movl	%r13d, %edi
	callq	_close
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_SM_IPV6,4,2                    ## @SM_IPV6
	.comm	_SM_UDP,4,2                     ## @SM_UDP
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ## @SO_REUSEADDR
	.comm	_tcp_maximize_buffers,8,3       ## @tcp_maximize_buffers
	.comm	_SO_KEEPALIVE,4,2               ## @SO_KEEPALIVE
	.comm	_IPPROTO_TCP,4,2                ## @IPPROTO_TCP
	.comm	_TCP_NODELAY,4,2                ## @TCP_NODELAY
	.comm	_AF_INET6,4,2                   ## @AF_INET6
	.comm	_errno,8,3                      ## @errno
	.comm	_EINPROGRESS,8,3                ## @EINPROGRESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"connect()"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_client_socket_ipv6             ; -- Begin function client_socket_ipv6
	.p2align	2
_client_socket_ipv6:                    ; @client_socket_ipv6
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	w8, #1
	str	w8, [sp, #12]
Lloh0:
	adrp	x8, _SM_IPV6@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SM_IPV6@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_10
; %bb.1:
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	mov	x0, x2
	mov	w1, #1
	bl	_new_socket
	mov	x19, x0
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.2:
Lloh3:
	adrp	x8, _SM_UDP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SM_UDP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #0
	bl	_maximize_sndbuf
	mov	x0, x19
	mov	w1, #0
	bl	_maximize_rcvbuf
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x22, _SOL_SOCKET@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SOL_SOCKET@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _SO_REUSEADDR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SO_REUSEADDR@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
Lloh11:
	adrp	x8, _tcp_maximize_buffers@GOTPAGE
Lloh12:
	ldr	x8, [x8, _tcp_maximize_buffers@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	w1, #0
	bl	_maximize_sndbuf
	mov	x0, x19
	mov	w1, #0
	bl	_maximize_rcvbuf
LBB0_6:
	ldr	w1, [x22]
Lloh14:
	adrp	x8, _SO_KEEPALIVE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SO_KEEPALIVE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
Lloh17:
	adrp	x8, _IPPROTO_TCP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IPPROTO_TCP@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _TCP_NODELAY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TCP_NODELAY@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
LBB0_7:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #12
	bl	_memset
Lloh23:
	adrp	x8, _AF_INET6@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AF_INET6@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	mov	x0, x21
	bl	_htons
	str	w0, [sp, #20]
	add	x0, sp, #16
	mov	x1, x20
	mov	w2, #16
	bl	_memcpy
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #12
	bl	_connect
	cmn	w0, #1
	b.ne	LBB0_11
; %bb.8:
Lloh26:
	adrp	x8, _errno@GOTPAGE
Lloh27:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
Lloh29:
	adrp	x9, _EINPROGRESS@GOTPAGE
Lloh30:
	ldr	x9, [x9, _EINPROGRESS@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.9:
Lloh32:
	adrp	x0, l_.str@PAGE
Lloh33:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	mov	x0, x19
	bl	_close
LBB0_10:
	mov	w19, #-1
LBB0_11:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_SM_IPV6,4,2                    ; @SM_IPV6
	.comm	_SM_UDP,4,2                     ; @SM_UDP
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ; @SO_REUSEADDR
	.comm	_tcp_maximize_buffers,8,3       ; @tcp_maximize_buffers
	.comm	_SO_KEEPALIVE,4,2               ; @SO_KEEPALIVE
	.comm	_IPPROTO_TCP,4,2                ; @IPPROTO_TCP
	.comm	_TCP_NODELAY,4,2                ; @TCP_NODELAY
	.comm	_AF_INET6,4,2                   ; @AF_INET6
	.comm	_errno,8,3                      ; @errno
	.comm	_EINPROGRESS,8,3                ; @EINPROGRESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"connect()"

.subsections_via_symbols
