	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function login_negotiate
LCPI0_0:
	.long	16777215                        ## 0xffffff
	.long	16777215                        ## 0xffffff
	.long	16777215                        ## 0xffffff
	.long	16777215                        ## 0xffffff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_login_negotiate:                       ## @login_negotiate
	.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, %r15
	movq	(%rdi), %rax
	movq	_CONN_SESSION_TYPE_NORMAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	xorl	%edi, %edi
	cmpq	$0, 56(%r15)
	setne	%dil
	callq	_assert
	leaq	8(%r15), %rsi
	leaq	12(%r15), %rdx
	leaq	16(%r15), %rcx
	leaq	20(%r15), %r8
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [16777215,16777215,16777215,16777215]
	movups	%xmm0, 8(%r15)
	movq	48(%r15), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edi
	callq	_kernel_limits
	xorl	%edi, %edi
	cmpl	$512, 8(%r15)                   ## imm = 0x200
	setge	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpl	$16777216, 8(%r15)              ## imm = 0x1000000
	setl	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpl	$512, 12(%r15)                  ## imm = 0x200
	setge	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpl	$16777216, 12(%r15)             ## imm = 0x1000000
	setl	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpl	$512, 16(%r15)                  ## imm = 0x200
	setge	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpl	$16777216, 16(%r15)             ## imm = 0x1000000
	setl	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpl	$512, 20(%r15)                  ## imm = 0x200
	setge	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpl	$16777216, 20(%r15)             ## imm = 0x1000000
	setl	%dil
	callq	_assert
	movl	20(%r15), %eax
	xorl	%edi, %edi
	cmpl	16(%r15), %eax
	setle	%dil
	callq	_assert
	movl	12(%r15), %eax
	cmpl	24(%r15), %eax
	jge	LBB0_4
## %bb.2:
	movl	%eax, 24(%r15)
	jmp	LBB0_4
LBB0_3:
	movq	_MAX_DATA_SEGMENT_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movl	%eax, 12(%r15)
LBB0_4:
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, %r12
	testq	%rbx, %rbx
	jne	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_log_debugx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_login_receive
	movq	%rax, %r12
LBB0_6:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_login_target_redirect
	testl	%eax, %eax
	jne	LBB0_20
## %bb.7:
	xorl	%eax, %eax
	callq	_keys_new
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_keys_load
	movq	%r12, %rdi
	callq	_login_new_response
	movq	%rax, %r13
	movq	(%rax), %r14
	movl	$47837, %edi                    ## imm = 0xBADD
	callq	_htons
	movl	%eax, (%r14)
	movq	_BHSLR_STAGE_OPERATIONAL_NEGOTIATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_login_set_csg
	movq	_BHSLR_STAGE_FULL_FEATURE_PHASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_login_set_nsg
	xorl	%eax, %eax
	callq	_keys_new
	movq	%rax, %r14
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_12
## %bb.8:
	movq	(%r15), %rax
	movq	_CONN_SESSION_TYPE_NORMAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.9:
	movq	56(%r15), %rax
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.10:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_keys_add
LBB0_11:
	movq	48(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_keys_add_int
LBB0_12:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	_KEYS_MAX@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_16
## %bb.13:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movq	(%rax,%r13,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	(%rbx), %rax
	movl	(%rax,%r13,4), %edx
	movq	%r12, %rdi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	%r14, %r8
	callq	_login_negotiate_key
	incq	%r13
	movslq	(%r15), %rax
	cmpq	%rax, %r13
	jl	LBB0_14
LBB0_16:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	movq	_CONN_SESSION_TYPE_NORMAL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_19
## %bb.17:
	movq	32(%rcx), %rax
	cmpq	40(%rcx), %rax
	jle	LBB0_19
## %bb.18:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_log_errx
LBB0_19:
	leaq	L_.str.5(%rip), %rdi
	callq	_log_debugx
	movq	%r14, %rdi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_keys_save
	movq	%r15, %rdi
	callq	_pdu_send
	movq	%r15, %rdi
	callq	_pdu_delete
	movq	%r14, %rdi
	callq	_keys_delete
	movq	%r12, %rdi
	callq	_pdu_delete
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_keys_delete                    ## TAILCALL
LBB0_20:
	leaq	L_.str.1(%rip), %rdi
	callq	_log_debugx
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_CONN_SESSION_TYPE_NORMAL,8,3   ## @CONN_SESSION_TYPE_NORMAL
	.comm	_MAX_DATA_SEGMENT_LENGTH,8,3    ## @MAX_DATA_SEGMENT_LENGTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"beginning operational parameter negotiation; waiting for Login PDU"

L_.str.1:                               ## @.str.1
	.asciz	"initiator redirected; exiting"

	.comm	_BHSLR_STAGE_OPERATIONAL_NEGOTIATION,4,2 ## @BHSLR_STAGE_OPERATIONAL_NEGOTIATION
	.comm	_BHSLR_STAGE_FULL_FEATURE_PHASE,4,2 ## @BHSLR_STAGE_FULL_FEATURE_PHASE
L_.str.2:                               ## @.str.2
	.asciz	"TargetAlias"

L_.str.3:                               ## @.str.3
	.asciz	"TargetPortalGroupTag"

	.comm	_KEYS_MAX,4,2                   ## @KEYS_MAX
L_.str.4:                               ## @.str.4
	.asciz	"initiator sent FirstBurstLength > MaxBurstLength"

L_.str.5:                               ## @.str.5
	.asciz	"operational parameter negotiation done; transitioning to Full Feature Phase"

	.no_dead_strip	_login_negotiate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function login_negotiate
_login_negotiate:                       ; @login_negotiate
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x26, _CONN_SESSION_TYPE_NORMAL@GOTPAGE
Lloh1:
	ldr	x26, [x26, _CONN_SESSION_TYPE_NORMAL@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	ldr	x8, [x19, #56]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	movi.2d	v0, #0xffffff00ffffff
	mov	x21, x19
	str	q0, [x21, #8]!
	add	x2, x21, #4
	add	x3, x21, #8
	add	x4, x21, #12
	ldr	x8, [x21, #40]
	ldr	x8, [x8]
	ldr	w0, [x8, #4]
	mov	x1, x21
	bl	_kernel_limits
	ldr	w8, [x21]
	cmp	w8, #511
	cset	w0, gt
	bl	_assert
	ldr	w8, [x21]
	mov	w22, #16777216
	cmp	w8, w22
	cset	w0, lt
	bl	_assert
	ldr	w8, [x21, #4]
	cmp	w8, #511
	cset	w0, gt
	bl	_assert
	ldr	w8, [x21, #4]
	cmp	w8, w22
	cset	w0, lt
	bl	_assert
	ldr	w8, [x21, #8]
	cmp	w8, #511
	cset	w0, gt
	bl	_assert
	ldr	w8, [x21, #8]
	cmp	w8, w22
	cset	w0, lt
	bl	_assert
	ldr	w8, [x21, #12]
	cmp	w8, #511
	cset	w0, gt
	bl	_assert
	ldr	w8, [x21, #12]
	cmp	w8, w22
	cset	w0, lt
	bl	_assert
	ldp	w9, w8, [x21, #8]
	cmp	w8, w9
	cset	w0, le
	bl	_assert
	ldr	w8, [x21, #4]
	ldr	w9, [x21, #16]
	cmp	w8, w9
	b.ge	LBB0_3
; %bb.2:
	str	w8, [x19, #24]
LBB0_3:
	cbz	x20, LBB0_6
LBB0_4:
	mov	w24, #1
	mov	x21, x20
	b	LBB0_7
LBB0_5:
Lloh2:
	adrp	x8, _MAX_DATA_SEGMENT_LENGTH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_DATA_SEGMENT_LENGTH@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	stp	w8, w8, [x19, #8]
	cbnz	x20, LBB0_4
LBB0_6:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_log_debugx
	mov	x0, x19
	mov	w1, #0
	bl	_login_receive
	mov	x21, x0
	mov	w24, #0
LBB0_7:
	mov	x0, x19
	mov	x1, x21
	bl	_login_target_redirect
	cbnz	w0, LBB0_21
; %bb.8:
	bl	_keys_new
	mov	x22, x0
	mov	x1, x21
	bl	_keys_load
	mov	x0, x21
	bl	_login_new_response
	mov	x23, x0
	ldr	x25, [x0]
	mov	w0, #47837
	bl	_htons
	str	w0, [x25]
Lloh7:
	adrp	x8, _BHSLR_STAGE_OPERATIONAL_NEGOTIATION@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BHSLR_STAGE_OPERATIONAL_NEGOTIATION@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_login_set_csg
Lloh10:
	adrp	x8, _BHSLR_STAGE_FULL_FEATURE_PHASE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BHSLR_STAGE_FULL_FEATURE_PHASE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_login_set_nsg
	bl	_keys_new
	mov	x25, x0
	cbz	x20, LBB0_13
; %bb.9:
	ldr	x8, [x19]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.10:
	ldr	x8, [x19, #56]
	ldr	x2, [x8]
	cbz	x2, LBB0_12
; %bb.11:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x25
	bl	_keys_add
LBB0_12:
	ldr	x8, [x19, #48]
	ldr	x8, [x8]
	ldr	w2, [x8]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x25
	bl	_keys_add_int
LBB0_13:
Lloh17:
	adrp	x20, _KEYS_MAX@GOTPAGE
Lloh18:
	ldr	x20, [x20, _KEYS_MAX@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.14:
	mov	x27, #0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	x1, [x8, x27, lsl #3]
	cbz	x1, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x22]
	ldr	w2, [x8, x27, lsl #2]
	mov	x0, x21
	mov	x3, x24
	mov	x4, x25
	bl	_login_negotiate_key
	add	x27, x27, #1
	ldrsw	x8, [x20]
	cmp	x27, x8
	b.lt	LBB0_15
LBB0_17:
	ldr	x8, [x19]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.18:
	ldp	x8, x9, [x19, #32]
	cmp	x8, x9
	b.le	LBB0_20
; %bb.19:
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_log_errx
LBB0_20:
Lloh21:
	adrp	x0, l_.str.5@PAGE
Lloh22:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_log_debugx
	mov	x0, x25
	mov	x1, x23
	bl	_keys_save
	mov	x0, x23
	bl	_pdu_send
	mov	x0, x23
	bl	_pdu_delete
	mov	x0, x25
	bl	_keys_delete
	mov	x0, x21
	bl	_pdu_delete
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_keys_delete
LBB0_21:
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_log_debugx
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_CONN_SESSION_TYPE_NORMAL,8,3   ; @CONN_SESSION_TYPE_NORMAL
	.comm	_MAX_DATA_SEGMENT_LENGTH,8,3    ; @MAX_DATA_SEGMENT_LENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"beginning operational parameter negotiation; waiting for Login PDU"

l_.str.1:                               ; @.str.1
	.asciz	"initiator redirected; exiting"

	.comm	_BHSLR_STAGE_OPERATIONAL_NEGOTIATION,4,2 ; @BHSLR_STAGE_OPERATIONAL_NEGOTIATION
	.comm	_BHSLR_STAGE_FULL_FEATURE_PHASE,4,2 ; @BHSLR_STAGE_FULL_FEATURE_PHASE
l_.str.2:                               ; @.str.2
	.asciz	"TargetAlias"

l_.str.3:                               ; @.str.3
	.asciz	"TargetPortalGroupTag"

	.comm	_KEYS_MAX,4,2                   ; @KEYS_MAX
l_.str.4:                               ; @.str.4
	.asciz	"initiator sent FirstBurstLength > MaxBurstLength"

l_.str.5:                               ; @.str.5
	.asciz	"operational parameter negotiation done; transitioning to Full Feature Phase"

	.no_dead_strip	_login_negotiate
.subsections_via_symbols
