	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$2, %edi
	jl	LBB0_6
## %bb.1:
	movq	8(%rsi), %rax
	movb	$1, %cl
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	cmpb	$45, (%rax)
	jne	LBB0_5
## %bb.2:
	movb	1(%rax), %al
	cmpb	$107, %al
	je	LBB0_7
## %bb.3:
	cmpb	$115, %al
	jne	LBB0_5
## %bb.4:
	addq	$8, %rsi
	decl	%edi
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_5:
	cmpl	$2, %edi
	jne	LBB0_6
## %bb.9:
	movq	8(%rsi), %rdi
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_getpass
	movq	%rax, %rdi
LBB0_10:
	callq	_setup
LBB0_11:
	xorl	%eax, %eax
	callq	_getchar
	cmpl	$-1, %eax
	je	LBB0_21
## %bb.12:
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	_deck@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_shuffle
LBB0_20:                                ##   in Loop: Header=BB0_13 Depth=1
	xorl	%eax, %eax
	callq	_getchar
	movl	%r14d, %r13d
	cmpl	$-1, %eax
	je	LBB0_21
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%r13d, %ecx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	_deck@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movslq	%r13d, %rcx
	movq	_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	(%rsi,%rcx,4), %ecx
	andl	%edx, %ecx
	movslq	%ecx, %rdi
	movl	(%rsi,%rdi,4), %r12d
	andl	%edx, %r12d
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	_t2@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	_t3@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movq	_t1@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	addl	%ecx, %eax
	andl	%edx, %eax
	cltq
	movl	(%rbx,%rax,4), %eax
	addl	%r12d, %eax
	andl	%edx, %eax
	cltq
	movl	(%rdi,%rax,4), %eax
	subl	%r12d, %eax
	andl	%edx, %eax
	cltq
	movl	(%rsi,%rax,4), %edi
	subl	%ecx, %edi
	callq	_putchar
	leal	1(%r13), %r14d
	movq	_ROTORSZ@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	xorl	%r14d, %r14d
	cmpl	%r13d, %r15d
	leal	1(%r15), %eax
	movl	%eax, %r15d
	cmovel	%r14d, %r15d
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%r15d, %r12d
	jmp	LBB0_20
LBB0_21:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_MINUSKVAR@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_22
## %bb.8:
	movq	%rax, %rdi
	callq	_setup
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_11
LBB0_22:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_MINUSKVAR,8,3                  ## @MINUSKVAR
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s not set\n"

L_.str.1:                               ## @.str.1
	.asciz	"Enter key:"

	.comm	_deck,8,3                       ## @deck
	.comm	_MASK,4,2                       ## @MASK
	.comm	_t2,8,3                         ## @t2
	.comm	_t3,8,3                         ## @t3
	.comm	_t1,8,3                         ## @t1
	.comm	_ROTORSZ,4,2                    ## @ROTORSZ
.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
	cmp	w0, #2
	b.lt	LBB0_5
; %bb.1:
	mov	x8, x1
	ldr	x9, [x8, #8]!
	ldrb	w10, [x9]
	cmp	w10, #45
	b.ne	LBB0_6
; %bb.2:
	ldrb	w9, [x9, #1]
	cmp	w9, #107
	b.eq	LBB0_21
; %bb.3:
	cmp	w9, #115
	b.ne	LBB0_6
; %bb.4:
	mov	w19, #0
	sub	w0, w0, #1
	mov	x1, x8
	cmp	w0, #2
	b.eq	LBB0_7
	b	LBB0_8
LBB0_5:
	mov	w19, #1
	b	LBB0_8
LBB0_6:
	mov	w19, #1
	cmp	w0, #2
	b.ne	LBB0_8
LBB0_7:
	ldr	x0, [x1, #8]
	b	LBB0_9
LBB0_8:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getpass
LBB0_9:
	bl	_setup
LBB0_10:
	bl	_getchar
	cmn	w0, #1
	b.eq	LBB0_20
; %bb.11:
	mov	w27, #0
	mov	w20, #0
	mov	w26, #0
Lloh2:
	adrp	x21, _MASK@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MASK@GOTPAGEOFF]
Lloh4:
	adrp	x22, _t2@GOTPAGE
Lloh5:
	ldr	x22, [x22, _t2@GOTPAGEOFF]
Lloh6:
	adrp	x23, _t3@GOTPAGE
Lloh7:
	ldr	x23, [x23, _t3@GOTPAGEOFF]
Lloh8:
	adrp	x24, _t1@GOTPAGE
Lloh9:
	ldr	x24, [x24, _t1@GOTPAGEOFF]
Lloh10:
	adrp	x25, _ROTORSZ@GOTPAGE
Lloh11:
	ldr	x25, [x25, _ROTORSZ@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
Lloh12:
	adrp	x8, _deck@GOTPAGE
Lloh13:
	ldr	x8, [x8, _deck@GOTPAGEOFF]
Lloh14:
	ldr	x0, [x8]
	bl	_shuffle
	mov	w28, #0
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	bl	_getchar
	mov	x26, x28
	cmn	w0, #1
	b.eq	LBB0_20
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	cbz	w19, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x21]
	mov	x9, x26
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_14 Depth=1
Lloh15:
	adrp	x8, _deck@GOTPAGE
Lloh16:
	ldr	x8, [x8, _deck@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x8]
	ldr	w9, [x10, w26, sxtw #2]
	ldr	w8, [x21]
	and	w9, w8, w9
	ldr	w10, [x10, w9, sxtw #2]
	and	w27, w10, w8
LBB0_17:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x10, [x23]
	ldr	x11, [x24]
	add	w12, w9, w0
	and	w12, w8, w12
	ldr	w11, [x11, w12, sxtw #2]
	add	w11, w11, w27
	and	w11, w11, w8
	ldr	w10, [x10, w11, sxtw #2]
	ldr	x11, [x22]
	sub	w10, w10, w27
	and	w8, w10, w8
	ldr	w8, [x11, w8, sxtw #2]
	sub	w0, w8, w9
	bl	_putchar
	add	w28, w26, #1
	ldr	w8, [x25]
	cmp	w28, w8
	b.ne	LBB0_13
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=1
	cmp	w20, w26
	csinc	w20, wzr, w20, eq
	tbz	w19, #0, LBB0_12
; %bb.19:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	w28, #0
	mov	x27, x20
	b	LBB0_13
LBB0_20:
	mov	w0, #0
	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_21:
Lloh18:
	adrp	x8, _MINUSKVAR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MINUSKVAR@GOTPAGEOFF]
Lloh20:
	ldr	x19, [x8]
	mov	x0, x19
	bl	_getenv
	cbz	x0, LBB0_23
; %bb.22:
	bl	_setup
	mov	w19, #1
	b	LBB0_10
LBB0_23:
Lloh21:
	adrp	x8, _stderr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MINUSKVAR,8,3                  ; @MINUSKVAR
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s not set\n"

l_.str.1:                               ; @.str.1
	.asciz	"Enter key:"

	.comm	_deck,8,3                       ; @deck
	.comm	_MASK,4,2                       ; @MASK
	.comm	_t2,8,3                         ; @t2
	.comm	_t3,8,3                         ; @t3
	.comm	_t1,8,3                         ; @t1
	.comm	_ROTORSZ,4,2                    ; @ROTORSZ
.subsections_via_symbols
