	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_client_socket                  ## -- Begin function client_socket
	.p2align	4, 0x90
_client_socket:                         ## @client_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
	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)
	jne	LBB0_1
## %bb.2:
	movl	%edx, %ebx
	movl	%esi, %r12d
	movl	%edi, %r15d
	movl	%edx, %edi
	movl	$1, %esi
	callq	_new_socket
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.3:
	movl	%eax, %r13d
	movq	_SM_UDP@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
## %bb.4:
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_maximize_sndbuf
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_maximize_rcvbuf
	movq	_IP_RECVERR@GOTPCREL(%rip), %rax
	movq	_SOL_IP@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_5:
	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_7
## %bb.6:
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_maximize_sndbuf
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_maximize_rcvbuf
LBB0_7:
	movl	(%rbx), %esi
	movq	_SO_KEEPALIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movl	%r13d, %edi
	movl	$4, %r8d
	callq	_setsockopt
	movq	_TCP_NODELAY@GOTPCREL(%rip), %rax
	movq	_IPPROTO_TCP@GOTPCREL(%rip), %rcx
LBB0_8:
	movl	(%rcx), %esi
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movl	%r13d, %edi
	movl	$4, %r8d
	callq	_setsockopt
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	%r12d, %edi
	callq	_htons
	movl	%eax, -52(%rbp)
	movl	%r15d, -56(%rbp)
	movl	%r13d, %edi
	movq	%rbx, %rsi
	movl	$12, %edx
	callq	_connect
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.10:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINPROGRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
LBB0_9:
	movl	%r13d, %r14d
LBB0_1:
	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_1
	.cfi_endproc
                                        ## -- End function
	.comm	_SM_IPV6,4,2                    ## @SM_IPV6
	.comm	_SM_UDP,4,2                     ## @SM_UDP
	.comm	_SOL_IP,4,2                     ## @SOL_IP
	.comm	_IP_RECVERR,4,2                 ## @IP_RECVERR
	.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_INET,4,2                    ## @AF_INET
	.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                  ; -- Begin function client_socket
	.p2align	2
_client_socket:                         ; @client_socket
	.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_3
LBB0_1:
	mov	w19, #-1
LBB0_2:
	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
LBB0_3:
	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_2
; %bb.4:
Lloh3:
	adrp	x8, _SM_UDP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SM_UDP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	mov	w1, #0
	bl	_maximize_sndbuf
	mov	x0, x19
	mov	w1, #0
	bl	_maximize_rcvbuf
Lloh6:
	adrp	x8, _IP_RECVERR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IP_RECVERR@GOTPAGEOFF]
Lloh8:
	adrp	x9, _SOL_IP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SOL_IP@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
Lloh10:
	adrp	x22, _SOL_SOCKET@GOTPAGE
Lloh11:
	ldr	x22, [x22, _SOL_SOCKET@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh12:
	adrp	x8, _SO_REUSEADDR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SO_REUSEADDR@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
Lloh15:
	adrp	x8, _tcp_maximize_buffers@GOTPAGE
Lloh16:
	ldr	x8, [x8, _tcp_maximize_buffers@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #0
	bl	_maximize_sndbuf
	mov	x0, x19
	mov	w1, #0
	bl	_maximize_rcvbuf
LBB0_8:
	ldr	w1, [x22]
Lloh18:
	adrp	x8, _SO_KEEPALIVE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SO_KEEPALIVE@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
Lloh21:
	adrp	x8, _TCP_NODELAY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TCP_NODELAY@GOTPAGEOFF]
Lloh23:
	adrp	x9, _IPPROTO_TCP@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IPPROTO_TCP@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x9]
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #12
	bl	_memset
Lloh25:
	adrp	x8, _AF_INET@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	mov	x0, x21
	bl	_htons
	stp	w20, w0, [sp, #16]
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #12
	bl	_connect
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.10:
Lloh28:
	adrp	x8, _errno@GOTPAGE
Lloh29:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
Lloh31:
	adrp	x9, _EINPROGRESS@GOTPAGE
Lloh32:
	ldr	x9, [x9, _EINPROGRESS@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.11:
Lloh34:
	adrp	x0, l_.str@PAGE
Lloh35:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	mov	x0, x19
	bl	_close
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_SM_IPV6,4,2                    ; @SM_IPV6
	.comm	_SM_UDP,4,2                     ; @SM_UDP
	.comm	_SOL_IP,4,2                     ; @SOL_IP
	.comm	_IP_RECVERR,4,2                 ; @IP_RECVERR
	.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_INET,4,2                    ; @AF_INET
	.comm	_errno,8,3                      ; @errno
	.comm	_EINPROGRESS,8,3                ; @EINPROGRESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"connect()"

.subsections_via_symbols
