	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rds_connect
_rds_connect:                           ## @rds_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	(%rdi), %r12
	movq	%r12, %rdi
	callq	_rds_sk_to_rs
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_lock_sock
	cmpl	$24, %ebx
	jne	LBB0_1
## %bb.3:
	movq	(%r14), %rax
	movq	_AF_INET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movq	16(%r14), %rbx
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htonl
	cmpq	%rax, %rbx
	jne	LBB0_7
## %bb.6:
	movq	_EDESTADDRREQ@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_EAFNOSUPPORT@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movq	%r12, %rdi
	callq	_release_sock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	16(%r14), %rax
	movq	%rax, (%r15)
	movl	8(%r14), %eax
	movl	%eax, 8(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AF_INET,8,3                    ## @AF_INET
	.comm	_EAFNOSUPPORT,4,2               ## @EAFNOSUPPORT
	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_EDESTADDRREQ,4,2               ## @EDESTADDRREQ
	.no_dead_strip	_rds_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rds_connect
_rds_connect:                           ; @rds_connect
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x22, x2
	mov	x20, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	_rds_sk_to_rs
	mov	x21, x0
	mov	x0, x19
	bl	_lock_sock
	cmp	w22, #24
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _AF_INET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AF_INET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	ldr	x22, [x20, #16]
Lloh3:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_htonl
	cmp	x22, x0
	b.ne	LBB0_8
; %bb.3:
Lloh6:
	adrp	x8, _EDESTADDRREQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EDESTADDRREQ@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x8, _EAFNOSUPPORT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EAFNOSUPPORT@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
	mov	x0, x19
	bl	_release_sock
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	w22, #0
	ldr	x8, [x20, #16]
	str	x8, [x21]
	ldr	w8, [x20, #8]
	str	w8, [x21, #8]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AF_INET,8,3                    ; @AF_INET
	.comm	_EAFNOSUPPORT,4,2               ; @EAFNOSUPPORT
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_EDESTADDRREQ,4,2               ; @EDESTADDRREQ
	.no_dead_strip	_rds_connect
.subsections_via_symbols
