	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function x11_open_helper
_x11_open_helper:                       ## @x11_open_helper
	.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
	movq	%rsi, %rbx
	movq	(%rdi), %r12
	cmpq	$0, (%r12)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_monotime
	cmpq	(%r12), %rax
	jge	LBB0_6
LBB0_2:
	movq	%rbx, %rdi
	callq	_sshbuf_len
	xorl	%r15d, %r15d
	cmpl	$12, %eax
	jl	LBB0_15
## %bb.3:
	movq	%rbx, %rdi
	callq	_sshbuf_mutable_ptr
	movl	(%rax), %esi
	cmpl	$108, %esi
	je	LBB0_7
## %bb.4:
	cmpl	$66, %esi
	jne	LBB0_13
## %bb.5:
	movl	24(%rax), %edx
	shll	$8, %edx
	addl	28(%rax), %edx
	movl	32(%rax), %ecx
	shll	$8, %ecx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addl	36(%rax), %ecx
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_verbose
	jmp	LBB0_14
LBB0_7:
	movl	28(%rax), %edx
	shll	$8, %edx
	addl	24(%rax), %edx
	movl	36(%rax), %ecx
	shll	$8, %ecx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addl	32(%rax), %ecx
LBB0_8:
	movslq	%ecx, %r13
	movslq	%edx, %r14
	movq	%rbx, %rdi
	callq	_sshbuf_len
	cltq
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	leaq	3(%r14), %rbx
	andq	$-4, %rbx
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	leaq	3(%r13), %rcx
	andq	$-4, %rcx
	addq	%rbx, %rcx
	addq	$12, %rcx
	cmpq	%rax, %rcx
	jg	LBB0_15
## %bb.9:
	movl	32(%r12), %edi
	callq	_strlen
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, %rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_11
## %bb.10:
	addq	$48, %r14
	movl	32(%r12), %esi
	movq	%r14, %rdi
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_16
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
LBB0_12:
	xorl	%eax, %eax
	callq	_debug2
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug2
LBB0_14:
	movl	$-1, %r15d
LBB0_15:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, 8(%r12)
	jne	LBB0_18
## %bb.17:
	leaq	(%r14,%rbx,4), %rbx
	movl	28(%r12), %esi
	movq	%rbx, %rdi
	callq	_timingsafe_bcmp
	testq	%rax, %rax
	je	LBB0_19
LBB0_18:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_12
LBB0_19:
	movq	8(%r12), %rdx
	movq	16(%r12), %rax
	cmpq	%rax, %rdx
	jne	LBB0_21
## %bb.20:
	movl	24(%r12), %esi
	movq	%rbx, %rdi
	callq	_memcpy
	movl	$1, %r15d
	jmp	LBB0_15
LBB0_21:
	leaq	L_.str.4(%rip), %rdi
	movq	%rdx, %rsi
	movq	%rax, %rdx
	callq	_error
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Rejected X11 connection after ForwardX11Timeout expired"

L_.str.1:                               ## @.str.1
	.asciz	"Initial X11 packet contains bad byte order byte: 0x%x"

L_.str.2:                               ## @.str.2
	.asciz	"X11 connection uses different authentication protocol."

L_.str.3:                               ## @.str.3
	.asciz	"X11 auth data does not match fake data."

L_.str.4:                               ## @.str.4
	.asciz	"X11 fake_data_len %d != saved_data_len %d"

	.no_dead_strip	_x11_open_helper
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function x11_open_helper
_x11_open_helper:                       ; @x11_open_helper
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	ldr	x23, [x0]
	ldr	x8, [x23]
	cbz	x8, LBB0_2
; %bb.1:
	bl	_monotime
	ldr	x8, [x23]
	cmp	x0, x8
	b.ge	LBB0_6
LBB0_2:
	mov	x0, x19
	bl	_sshbuf_len
	cmp	w0, #12
	b.lt	LBB0_9
; %bb.3:
	mov	x0, x19
	bl	_sshbuf_mutable_ptr
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #108
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #66
	b.ne	LBB0_10
; %bb.5:
	ldp	w8, w9, [x20, #24]
	add	w8, w9, w8, lsl #8
	ldp	w9, w10, [x20, #32]
	add	w9, w10, w9, lsl #8
	b	LBB0_8
LBB0_6:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_verbose
	b	LBB0_15
LBB0_7:
	ldp	w8, w9, [x20, #24]
	add	w8, w8, w9, lsl #8
	ldp	w9, w10, [x20, #32]
	add	w9, w9, w10, lsl #8
LBB0_8:
	sxtw	x21, w9
	sxtw	x22, w8
	mov	x0, x19
	bl	_sshbuf_len
	add	x8, x22, #3
	and	x24, x8, #0xfffffffffffffffc
	add	x8, x21, #3
	and	x8, x8, #0xfffffffffffffffc
	add	x8, x24, x8
	add	x8, x8, #12
	cmp	x8, w0, sxtw
	b.le	LBB0_11
LBB0_9:
	mov	w0, #0
	b	LBB0_16
LBB0_10:
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_11:
	ldr	w0, [x23, #32]
	bl	_strlen
	cmp	x0, x22
	b.ne	LBB0_13
; %bb.12:
	add	x19, x20, #48
	ldr	w1, [x23, #32]
	mov	x0, x19
	mov	x2, x22
	bl	_memcmp
	cbz	x0, LBB0_17
LBB0_13:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_14:
	bl	_debug2
LBB0_15:
	mov	w0, #-1
LBB0_16:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_17:
	ldr	x8, [x23, #8]
	cmp	x8, x21
	b.ne	LBB0_19
; %bb.18:
	add	x19, x19, x24, lsl #2
	ldr	w1, [x23, #28]
	mov	x0, x19
	mov	x2, x21
	bl	_timingsafe_bcmp
	cbz	x0, LBB0_20
LBB0_19:
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_20:
	ldp	x8, x2, [x23, #8]
	cmp	x8, x2
	b.ne	LBB0_22
; %bb.21:
	ldr	w1, [x23, #24]
	mov	x0, x19
	mov	x2, x8
	bl	_memcpy
	mov	w0, #1
	b	LBB0_16
LBB0_22:
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x8
	bl	_error
	b	LBB0_15
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Rejected X11 connection after ForwardX11Timeout expired"

l_.str.1:                               ; @.str.1
	.asciz	"Initial X11 packet contains bad byte order byte: 0x%x"

l_.str.2:                               ; @.str.2
	.asciz	"X11 connection uses different authentication protocol."

l_.str.3:                               ; @.str.3
	.asciz	"X11 auth data does not match fake data."

l_.str.4:                               ; @.str.4
	.asciz	"X11 fake_data_len %d != saved_data_len %d"

	.no_dead_strip	_x11_open_helper
.subsections_via_symbols
