	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gopher_connect
_gopher_connect:                        ## @gopher_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	%r14
	pushq	%rbx
	subq	$1040, %rsp                     ## imm = 0x410
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	cmpb	$0, (%rsi)
	je	LBB0_1
## %bb.3:
	movq	%rdi, %rbx
	movsbl	1(%rsi), %ecx
	cmpl	$57, %ecx
	je	LBB0_5
## %bb.4:
	cmpl	$53, %ecx
	jne	LBB0_10
LBB0_5:
	incq	%rsi
	movq	%rsi, %rdi
	movl	$47, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	leaq	L_.str.1(%rip), %rdx
	leaq	-1056(%rbp), %r14
	movq	%r14, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	movq	%rax, %rcx
	callq	_snprintf
	movq	%r14, %rdi
	callq	_strlen
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_gopher_write
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_8
## %bb.7:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_9
## %bb.11:
	addq	$1040, %rsp                     ## imm = 0x410
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_9
## %bb.2:
	addq	$1040, %rsp                     ## imm = 0x410
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Gopher protocol type '%c' not supported yet!\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s\r\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_gopher_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gopher_connect
_gopher_connect:                        ; @gopher_connect
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	sub	sp, sp, #1040
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldrb	w8, [x1]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x19, x0
	ldrsb	w8, [x1, #1]!
	cmp	w8, #57
	b.eq	LBB0_3
; %bb.2:
	cmp	w8, #53
	b.ne	LBB0_6
LBB0_3:
	mov	x0, x1
	mov	w1, #47
	bl	_strchr
	cbz	x0, LBB0_7
; %bb.4:
	mov	x3, x0
Lloh3:
	adrp	x2, l_.str.1@PAGE
Lloh4:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x0, sp, #8
	mov	w1, #1024
	bl	_snprintf
	add	x0, sp, #8
	bl	_strlen
	mov	x2, x0
	add	x1, sp, #8
	mov	x0, x19
	bl	_gopher_write
	tbnz	x0, #63, LBB0_9
; %bb.5:
	mov	w0, #0
	b	LBB0_10
LBB0_6:
	and	w8, w8, #0xff
Lloh5:
	adrp	x9, _AV_LOG_WARNING@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x9]
	sxtb	w3, w8
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_7:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldur	x8, [x29, #-24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.8:
	add	sp, sp, #1040
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_9:
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_10:
	ldur	x8, [x29, #-24]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	add	sp, sp, #1040
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Gopher protocol type '%c' not supported yet!\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s\r\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_gopher_connect
.subsections_via_symbols
