	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$232, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsp, -224(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXUSERLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	_MAXHEXPARAMLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_MAXPARAMLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -216(%rbp)                ## 8-byte Spill
	movq	_MAXSALTLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -232(%rbp)                ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movq	_stdin@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%rbx, %r15
	callq	_fgets
	movq	%r12, %rdi
	callq	_strlen
	cltq
	movb	$0, -1(%rax,%r12)
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_fgets
	movq	%r14, %rdi
	callq	_atoi
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %edi
	callq	_t_getpreparam
	movq	%rax, %rbx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r13), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_fgets
	movq	-232(%rbp), %rdi                ## 8-byte Reload
	movq	%rdi, -264(%rbp)
	movq	%r14, %rsi
	callq	_t_fromb64
	movq	%rax, -256(%rbp)
	leaq	4(%rbx), %rsi
	leaq	-264(%rbp), %rcx
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_t_clientopen
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_t_clientgenexp
	movq	(%rax), %rsi
	movq	8(%rax), %rdx
	movq	%r14, %rdi
	callq	_t_tob64
	leaq	L_.str.4(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_.str.5(%rip), %rdx
	leaq	-208(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$128, %esi
	callq	_t_getpass
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_t_clientpasswd
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movq	_stdin@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_fgets
	movq	-216(%rbp), %rdi                ## 8-byte Reload
	movq	%rdi, -248(%rbp)
	movq	%r14, %rsi
	callq	_t_fromb64
	movq	%rax, -240(%rbp)
	leaq	-248(%rbp), %rsi
	movq	%r12, %rdi
	callq	_t_clientgetkey
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	$40, %edx
	callq	_t_tohex
	leaq	L_.str.7(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_printf
	movq	%r12, %rdi
	callq	_t_clientresponse
	movq	_RESPONSE_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_t_tohex
	leaq	L_.str.8(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_fgets
	movq	%r14, %rdi
	callq	_strlen
	cltq
	movb	$0, -1(%rax,%r14)
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_t_fromhex
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_t_clientverify
	testq	%rax, %rax
	leaq	L_str.12(%rip), %rax
	leaq	L_str(%rip), %rdi
	cmoveq	%rax, %rdi
	callq	_puts
	movq	%r12, %rdi
	callq	_t_clientclose
	movq	-224(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	L_str.13(%rip), %rdi
	callq	_puts
	movl	$1, %edi
	callq	_exit
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXUSERLEN,4,2                 ## @MAXUSERLEN
	.comm	_MAXHEXPARAMLEN,4,2             ## @MAXHEXPARAMLEN
	.comm	_MAXPARAMLEN,4,2                ## @MAXPARAMLEN
	.comm	_MAXSALTLEN,4,2                 ## @MAXSALTLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter username: "

	.comm	_stdin,4,2                      ## @stdin
L_.str.1:                               ## @.str.1
	.asciz	"Enter index (from server): "

L_.str.2:                               ## @.str.2
	.asciz	"Enter salt (from server): "

L_.str.4:                               ## @.str.4
	.asciz	"A (to server): %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"Enter password:"

L_.str.6:                               ## @.str.6
	.asciz	"Enter B (from server): "

L_.str.7:                               ## @.str.7
	.asciz	"Session key: %s\n"

L_.str.8:                               ## @.str.8
	.asciz	"Response (to server): %s\n"

	.comm	_RESPONSE_LEN,4,2               ## @RESPONSE_LEN
L_.str.9:                               ## @.str.9
	.asciz	"Enter server response: "

L_str:                                  ## @str
	.asciz	"Server authentication failed."

L_str.12:                               ## @str.12
	.asciz	"Server authentication successful."

L_str.13:                               ## @str.13
	.asciz	"invalid n, g"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.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
	sub	sp, sp, #192
	mov	x25, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAXUSERLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXUSERLEN@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	mov	x9, x24
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x24, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
Lloh8:
	adrp	x8, _MAXHEXPARAMLEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAXHEXPARAMLEN@GOTPAGEOFF]
Lloh10:
	ldr	w20, [x8]
	mov	x9, x20
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x19, x8, x9
	mov	sp, x19
Lloh13:
	adrp	x8, _MAXPARAMLEN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MAXPARAMLEN@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	mov	x9, x8
Lloh16:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh17:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
Lloh18:
	adrp	x8, _MAXSALTLEN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MAXSALTLEN@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	mov	x9, x8
Lloh21:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh22:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x23, x9, x8
	mov	sp, x23
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
Lloh25:
	adrp	x26, _stdin@GOTPAGE
Lloh26:
	ldr	x26, [x26, _stdin@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x21
	mov	x1, x24
	bl	_fgets
	mov	x0, x21
	bl	_strlen
	add	x8, x21, w0, sxtw
	sturb	wzr, [x8, #-1]
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_fgets
	mov	x0, x19
	bl	_atoi
	sub	w0, w0, #1
	bl	_t_getpreparam
	mov	x24, x0
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_fgets
	stur	x23, [x29, #-256]
	mov	x0, x23
	mov	x1, x19
	bl	_t_fromb64
	stur	x0, [x29, #-248]
	add	x1, x24, #4
	sub	x3, x29, #256
	mov	x0, x21
	mov	x2, x24
	bl	_t_clientopen
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	bl	_t_clientgenexp
	ldp	x1, x2, [x0]
	mov	x0, x19
	bl	_t_tob64
	str	x0, [sp, #-16]!
Lloh31:
	adrp	x0, l_.str.4@PAGE
Lloh32:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printf
	add	sp, sp, #16
Lloh33:
	adrp	x2, l_.str.5@PAGE
Lloh34:
	add	x2, x2, l_.str.5@PAGEOFF
	sub	x0, x29, #236
	mov	w1, #128
	bl	_t_getpass
	sub	x1, x29, #236
	mov	x0, x21
	bl	_t_clientpasswd
Lloh35:
	adrp	x0, l_.str.6@PAGE
Lloh36:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_printf
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_fgets
	sub	x8, x29, #16
	stur	x22, [x8, #-256]
	mov	x0, x22
	mov	x1, x19
	bl	_t_fromb64
	sub	x8, x29, #8
	stur	x0, [x8, #-256]
	sub	x1, x29, #272
	mov	x0, x21
	bl	_t_clientgetkey
	mov	x1, x0
	mov	x0, x19
	mov	w2, #40
	bl	_t_tohex
	str	x0, [sp, #-16]!
Lloh37:
	adrp	x0, l_.str.7@PAGE
Lloh38:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_printf
	add	sp, sp, #16
	mov	x0, x21
	bl	_t_clientresponse
	mov	x1, x0
Lloh39:
	adrp	x8, _RESPONSE_LEN@GOTPAGE
Lloh40:
	ldr	x8, [x8, _RESPONSE_LEN@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_t_tohex
	str	x0, [sp, #-16]!
Lloh42:
	adrp	x0, l_.str.8@PAGE
Lloh43:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_printf
	add	sp, sp, #16
Lloh44:
	adrp	x0, l_.str.9@PAGE
Lloh45:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_printf
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x20
	bl	_fgets
	mov	x0, x19
	bl	_strlen
	add	x8, x19, w0, sxtw
	sturb	wzr, [x8, #-1]
	sub	x0, x29, #108
	mov	x1, x19
	bl	_t_fromhex
	sub	x1, x29, #108
	mov	x0, x21
	bl	_t_clientverify
Lloh46:
	adrp	x8, l_str@PAGE
Lloh47:
	add	x8, x8, l_str@PAGEOFF
Lloh48:
	adrp	x9, l_str.12@PAGE
Lloh49:
	add	x9, x9, l_str.12@PAGEOFF
	cmp	x0, #0
	csel	x0, x9, x8, eq
	bl	_puts
	mov	x0, x21
	bl	_t_clientclose
	mov	sp, x25
	ldur	x8, [x29, #-88]
Lloh50:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh51:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh52:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.2:
	mov	w0, #0
	sub	sp, x29, #80
	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
	ret
LBB0_3:
Lloh53:
	adrp	x0, l_str.13@PAGE
Lloh54:
	add	x0, x0, l_str.13@PAGEOFF
	bl	_puts
	mov	w0, #1
	bl	_exit
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXUSERLEN,4,2                 ; @MAXUSERLEN
	.comm	_MAXHEXPARAMLEN,4,2             ; @MAXHEXPARAMLEN
	.comm	_MAXPARAMLEN,4,2                ; @MAXPARAMLEN
	.comm	_MAXSALTLEN,4,2                 ; @MAXSALTLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter username: "

	.comm	_stdin,4,2                      ; @stdin
l_.str.1:                               ; @.str.1
	.asciz	"Enter index (from server): "

l_.str.2:                               ; @.str.2
	.asciz	"Enter salt (from server): "

l_.str.4:                               ; @.str.4
	.asciz	"A (to server): %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"Enter password:"

l_.str.6:                               ; @.str.6
	.asciz	"Enter B (from server): "

l_.str.7:                               ; @.str.7
	.asciz	"Session key: %s\n"

l_.str.8:                               ; @.str.8
	.asciz	"Response (to server): %s\n"

	.comm	_RESPONSE_LEN,4,2               ; @RESPONSE_LEN
l_.str.9:                               ; @.str.9
	.asciz	"Enter server response: "

l_str:                                  ; @str
	.asciz	"Server authentication failed."

l_str.12:                               ; @str.12
	.asciz	"Server authentication successful."

l_str.13:                               ; @str.13
	.asciz	"invalid n, g"

.subsections_via_symbols
