	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_get_authentication_socket  ## -- Begin function ssh_get_authentication_socket
	.p2align	4, 0x90
_ssh_get_authentication_socket:         ## @ssh_get_authentication_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movl	$-1, (%r14)
LBB0_2:
	movq	_SSH_AUTHSOCKET_ENV_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	leaq	-32(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_AF_UNIX@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %edi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_strlcpy
	movl	(%r15), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movl	%eax, %ebx
	movq	_F_SETFD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FD_CLOEXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_fcntl
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.7:
	leaq	-32(%rbp), %rsi
	movl	%ebx, %edi
	movl	$8, %edx
	callq	_connect
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	testq	%r14, %r14
	je	LBB0_11
## %bb.10:
	movl	%ebx, (%r14)
	jmp	LBB0_12
LBB0_3:
	movq	_SSH_ERR_AGENT_NOT_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_13
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %r15d
	movl	%ebx, %edi
	callq	_close
	movl	%r15d, (%r14)
LBB0_5:
	movq	_SSH_ERR_SYSTEM_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_13
LBB0_11:
	movl	%ebx, %edi
	callq	_close
LBB0_12:
	xorl	%eax, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_AUTHSOCKET_ENV_NAME,4,2    ## @SSH_AUTHSOCKET_ENV_NAME
	.comm	_SSH_ERR_AGENT_NOT_PRESENT,4,2  ## @SSH_ERR_AGENT_NOT_PRESENT
	.comm	_AF_UNIX,4,2                    ## @AF_UNIX
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_SSH_ERR_SYSTEM_ERROR,4,2       ## @SSH_ERR_SYSTEM_ERROR
	.comm	_F_SETFD,4,2                    ## @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ## @FD_CLOEXEC
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssh_get_authentication_socket  ; -- Begin function ssh_get_authentication_socket
	.p2align	2
_ssh_get_authentication_socket:         ; @ssh_get_authentication_socket
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	cbz	x0, LBB0_2
; %bb.1:
	mov	w8, #-1
	str	w8, [x19]
LBB0_2:
Lloh0:
	adrp	x8, _SSH_AUTHSOCKET_ENV_NAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSH_AUTHSOCKET_ENV_NAME@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_getenv
	cbz	x0, LBB0_8
; %bb.3:
	mov	x20, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh3:
	adrp	x21, _AF_UNIX@GOTPAGE
Lloh4:
	ldr	x21, [x21, _AF_UNIX@GOTPAGEOFF]
	ldr	w8, [x21]
	str	w8, [sp, #12]
	ldr	w0, [sp, #8]
	mov	x1, x20
	mov	w2, #4
	bl	_strlcpy
	ldr	w0, [x21]
Lloh5:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_10
; %bb.4:
	mov	x20, x0
Lloh8:
	adrp	x8, _F_SETFD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _F_SETFD@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _FD_CLOEXEC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FD_CLOEXEC@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_fcntl
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.5:
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #8
	bl	_connect
	tbnz	x0, #63, LBB0_9
; %bb.6:
	cbz	x19, LBB0_13
; %bb.7:
	mov	w0, #0
	str	w20, [x19]
	b	LBB0_12
LBB0_8:
Lloh14:
	adrp	x8, _SSH_ERR_AGENT_NOT_PRESENT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SSH_ERR_AGENT_NOT_PRESENT@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh16:
	adrp	x19, _errno@GOTPAGE
Lloh17:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	ldr	w21, [x19]
	mov	x0, x20
	bl	_close
	str	w21, [x19]
LBB0_10:
Lloh18:
	adrp	x8, _SSH_ERR_SYSTEM_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SSH_ERR_SYSTEM_ERROR@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_13:
	mov	x0, x20
	bl	_close
	mov	w0, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_AUTHSOCKET_ENV_NAME,4,2    ; @SSH_AUTHSOCKET_ENV_NAME
	.comm	_SSH_ERR_AGENT_NOT_PRESENT,4,2  ; @SSH_ERR_AGENT_NOT_PRESENT
	.comm	_AF_UNIX,4,2                    ; @AF_UNIX
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_SSH_ERR_SYSTEM_ERROR,4,2       ; @SSH_ERR_SYSTEM_ERROR
	.comm	_F_SETFD,4,2                    ; @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ; @FD_CLOEXEC
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
