	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gopher_open
_gopher_open:                           ## @gopher_open
	.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
	movl	$4128, %eax                     ## imm = 0x1020
	callq	____chkstk_darwin
	subq	%rax, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rax
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -40(%rbp)
	movq	16(%rdi), %r15
	movl	$1, (%rdi)
	leaq	-3120(%rbp), %r10
	leaq	-4148(%rbp), %r11
	leaq	-2096(%rbp), %rdx
	leaq	-1072(%rbp), %r8
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$1024, %ecx                     ## imm = 0x400
	movl	$1024, %r9d                     ## imm = 0x400
	pushq	%rax
	pushq	$1024                           ## imm = 0x400
	pushq	%r10
	pushq	%r11
	callq	_av_url_split
	addq	$32, %rsp
	movl	-4148(%rbp), %r9d
	testl	%r9d, %r9d
	jns	LBB0_2
## %bb.1:
	movl	$70, -4148(%rbp)
	movl	$70, %r9d
LBB0_2:
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdx
	xorl	%r14d, %r14d
	leaq	-4144(%rbp), %r12
	leaq	-1072(%rbp), %r8
	movq	%r12, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	xorl	%ecx, %ecx
	pushq	$0
	callq	_ff_url_join
	addq	$16, %rsp
	movq	$0, (%r15)
	movq	_AVIO_FLAG_READ_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	12(%rbx), %rcx
	movl	4(%rbx), %eax
	movl	8(%rbx), %r9d
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%r8d, %r8d
	pushq	%rbx
	pushq	%rax
	callq	_ffurl_open_whitelist
	addq	$16, %rsp
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	leaq	-3120(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_gopher_connect
	testl	%eax, %eax
	jns	LBB0_5
LBB0_4:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_gopher_close
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%r14d, %eax
	addq	$4128, %rsp                     ## imm = 0x1020
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tcp"

	.comm	_AVIO_FLAG_READ_WRITE,4,2       ## @AVIO_FLAG_READ_WRITE
	.no_dead_strip	_gopher_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gopher_open
_gopher_open:                           ; @gopher_open
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -40
	.cfi_offset w28, -48
	mov	w9, #4128
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #32
	mov	x19, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x20, [x0, #16]
	mov	w8, #1
	str	w8, [x0]
	str	x1, [sp, #8]
	mov	w8, #1024
	str	w8, [sp]
	add	x2, sp, #2072
	add	x4, sp, #3096
	add	x6, sp, #20
	add	x7, sp, #1048
	mov	x0, #0
	mov	w1, #0
	mov	w3, #1024
	mov	w5, #1024
	bl	_av_url_split
	ldr	w5, [sp, #20]
	tbz	w5, #31, LBB0_2
; %bb.1:
	mov	w5, #70
	str	w5, [sp, #20]
LBB0_2:
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #24
	add	x4, sp, #3096
	mov	w1, #1024
	mov	x3, #0
	mov	x6, #0
	bl	_ff_url_join
	str	xzr, [x20]
Lloh7:
	adrp	x8, _AVIO_FLAG_READ_WRITE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AVIO_FLAG_READ_WRITE@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	add	x3, x19, #12
	ldp	w6, w5, [x19, #4]
	add	x1, sp, #24
	mov	x0, x20
	mov	x4, #0
	mov	x7, x19
	bl	_ffurl_open_whitelist
	tbnz	w0, #31, LBB0_5
; %bb.3:
	add	x1, sp, #1048
	mov	x0, x19
	bl	_gopher_connect
	tbnz	w0, #31, LBB0_5
; %bb.4:
	mov	w20, #0
	b	LBB0_6
LBB0_5:
	mov	x20, x0
	mov	x0, x19
	bl	_gopher_close
LBB0_6:
	ldur	x8, [x29, #-40]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x20
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tcp"

	.comm	_AVIO_FLAG_READ_WRITE,4,2       ; @AVIO_FLAG_READ_WRITE
	.no_dead_strip	_gopher_open
.subsections_via_symbols
