	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function khazad_setkey
_khazad_setkey:                         ## @khazad_setkey
	.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, %r15
	callq	_crypto_tfm_ctx
	movq	%rax, %r12
	movq	_T7@GOTPCREL(%rip), %rbx
	movq	(%rbx), %r14
	movl	(%r15), %edi
	callq	_be32_to_cpu
	movl	4(%r15), %edi
	callq	_be32_to_cpu
	movl	8(%r15), %edi
	callq	_be32_to_cpu
	movl	12(%r15), %edi
	callq	_be32_to_cpu
	movq	_KHAZAD_ROUNDS@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	testl	%edi, %edi
	js	LBB0_1
## %bb.2:
	movq	_T4@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	_T5@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	movq	_T6@GOTPCREL(%rip), %rax
	movq	(%rax), %r11
	movq	(%rbx), %r15
	movq	_c@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	(%r12), %r9
	movq	$-1, %rax
                                        ## implicit-def: $ecx
                                        ## implicit-def: $edx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %ebx
	shrl	$24, %ecx
	xorl	(%r8,%rcx,4), %edx
	movl	%ebx, %ecx
	shrl	$16, %ecx
	movzbl	%cl, %ecx
	xorl	(%r10,%rcx,4), %edx
	movzbl	%bh, %ecx
	xorl	(%r11,%rcx,4), %edx
	movzbl	%bl, %ecx
	xorl	(%r15,%rcx,4), %edx
	xorl	4(%rsi,%rax,4), %edx
	movl	%edx, 4(%r9,%rax,4)
	movslq	(%r13), %rdi
	incq	%rax
	movl	%edx, %ecx
	movl	%ebx, %edx
	cmpq	%rdi, %rax
	jl	LBB0_3
## %bb.4:
	movq	_T7@GOTPCREL(%rip), %rbx
	jmp	LBB0_5
LBB0_1:
	movq	(%r12), %r9
LBB0_5:
	movslq	%edi, %rax
	movl	(%r9,%rax,4), %eax
	movq	8(%r12), %r11
	movl	%eax, (%r11)
	movl	(%r13), %r8d
	cmpl	$2, %r8d
	jl	LBB0_8
## %bb.6:
	movq	_T0@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_T1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_T2@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_T3@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_T4@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_T5@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_T6@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	movq	(%rbx), %rsi
	movl	$1, %edx
	movq	$-1, %rdi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%r8d, %rax
	addq	%rdi, %rax
	movl	(%r9,%rax,4), %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	xorl	(%rax), %ecx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	xorl	(%rax), %ecx
	xorl	(%r15), %ecx
	movq	%rbx, %rax
	shrq	$24, %rax
	movzbl	(%r14,%rax,4), %eax
	xorl	(%r13,%rax,4), %ecx
	movq	%rbx, %rax
	shrq	$14, %rax
	andl	$1020, %eax                     ## imm = 0x3FC
	movzbl	(%r14,%rax), %eax
	xorl	(%r12,%rax,4), %ecx
	movzbl	%bh, %eax
	movzbl	(%r14,%rax,4), %eax
	xorl	(%r10,%rax,4), %ecx
	movzbl	%bl, %eax
	movzbl	(%r14,%rax,4), %eax
	xorl	(%rsi,%rax,4), %ecx
	movl	%ecx, (%r11,%rdx,4)
	incq	%rdx
	movq	_KHAZAD_ROUNDS@GOTPCREL(%rip), %rax
	movslq	(%rax), %r8
	decq	%rdi
	cmpq	%r8, %rdx
	jl	LBB0_7
LBB0_8:
	movslq	%r8d, %rax
	movl	(%r9), %ecx
	movl	%ecx, (%r11,%rax,4)
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_T7,8,3                         ## @T7
	.comm	_KHAZAD_ROUNDS,4,2              ## @KHAZAD_ROUNDS
	.comm	_T0,8,3                         ## @T0
	.comm	_T1,8,3                         ## @T1
	.comm	_T2,8,3                         ## @T2
	.comm	_T3,8,3                         ## @T3
	.comm	_T4,8,3                         ## @T4
	.comm	_T5,8,3                         ## @T5
	.comm	_T6,8,3                         ## @T6
	.comm	_c,8,3                          ## @c
	.no_dead_strip	_khazad_setkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function khazad_setkey
_khazad_setkey:                         ; @khazad_setkey
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [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 w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	bl	_crypto_tfm_ctx
	mov	x19, x0
Lloh0:
	adrp	x22, _T7@GOTPAGE
Lloh1:
	ldr	x22, [x22, _T7@GOTPAGEOFF]
	ldr	x21, [x22]
	ldr	w0, [x20]
	bl	_be32_to_cpu
	ldr	w0, [x20, #4]
	bl	_be32_to_cpu
	ldr	w0, [x20, #8]
	bl	_be32_to_cpu
	ldr	w0, [x20, #12]
	bl	_be32_to_cpu
Lloh2:
	adrp	x8, _KHAZAD_ROUNDS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KHAZAD_ROUNDS@GOTPAGEOFF]
	ldr	w1, [x8]
Lloh4:
	adrp	x13, _T4@GOTPAGE
Lloh5:
	ldr	x13, [x13, _T4@GOTPAGEOFF]
Lloh6:
	adrp	x12, _T5@GOTPAGE
Lloh7:
	ldr	x12, [x12, _T5@GOTPAGEOFF]
Lloh8:
	adrp	x11, _T6@GOTPAGE
Lloh9:
	ldr	x11, [x11, _T6@GOTPAGEOFF]
	tbnz	w1, #31, LBB0_3
; %bb.1:
	mov	x14, #0
	ldr	x10, [x13]
	ldr	x15, [x12]
	ldr	x16, [x11]
	ldr	x17, [x22]
Lloh10:
	adrp	x9, _c@GOTPAGE
Lloh11:
	ldr	x9, [x9, _c@GOTPAGEOFF]
Lloh12:
	ldr	x0, [x9]
	ldr	x9, [x19]
                                        ; implicit-def: $w3
                                        ; implicit-def: $w2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w1, w3, #24
	ldr	w1, [x10, w1, uxtw #2]
	ubfx	w4, w3, #16, #8
	ldr	w4, [x15, w4, uxtw #2]
	ubfx	w5, w3, #8, #8
	ldr	w5, [x16, w5, uxtw #2]
	and	w6, w3, #0xff
	ldr	w6, [x17, w6, uxtw #2]
	lsl	x7, x14, #2
	ldr	w20, [x0, x7]
	eor	w1, w1, w2
	eor	w1, w1, w4
	eor	w1, w1, w5
	eor	w1, w1, w6
	mov	x2, x3
	eor	w3, w1, w20
	str	w3, [x9, x7]
	add	x4, x14, #1
	ldrsw	x1, [x8]
	cmp	x14, x1
	mov	x14, x4
	b.lt	LBB0_2
	b	LBB0_4
LBB0_3:
	ldr	x9, [x19]
LBB0_4:
	ldr	w14, [x9, w1, sxtw #2]
	ldr	x10, [x19, #8]
	str	w14, [x10]
	ldr	w3, [x8]
	cmp	w3, #2
	b.lt	LBB0_7
; %bb.5:
Lloh13:
	adrp	x14, _T0@GOTPAGE
Lloh14:
	ldr	x14, [x14, _T0@GOTPAGEOFF]
Lloh15:
	ldr	x14, [x14]
Lloh16:
	adrp	x15, _T1@GOTPAGE
Lloh17:
	ldr	x15, [x15, _T1@GOTPAGEOFF]
Lloh18:
	ldr	x15, [x15]
Lloh19:
	adrp	x16, _T2@GOTPAGE
Lloh20:
	ldr	x16, [x16, _T2@GOTPAGEOFF]
Lloh21:
	ldr	x16, [x16]
Lloh22:
	adrp	x17, _T3@GOTPAGE
Lloh23:
	ldr	x17, [x17, _T3@GOTPAGEOFF]
Lloh24:
	ldr	x17, [x17]
	ldr	x13, [x13]
	ldr	x12, [x12]
	ldr	x11, [x11]
	ldr	x0, [x22]
	mov	x1, #-1
	mov	w2, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x3, x1, w3, sxtw
	ldr	w3, [x9, x3, lsl #2]
	ldr	w4, [x14]
	ldr	w5, [x15]
	eor	w4, w5, w4
	ldr	w5, [x16]
	eor	w4, w4, w5
	ldr	w5, [x17]
	eor	w4, w4, w5
	lsr	x5, x3, #22
	and	x5, x5, #0x3fc
	ldrb	w5, [x21, x5]
	ldr	w5, [x13, x5, lsl #2]
	ubfx	x6, x3, #16, #8
	lsl	x6, x6, #2
	ldrb	w6, [x21, x6]
	eor	w4, w4, w5
	ldr	w5, [x12, x6, lsl #2]
	eor	w4, w4, w5
	ubfx	x5, x3, #8, #8
	lsl	x5, x5, #2
	ldrb	w5, [x21, x5]
	ldr	w5, [x11, x5, lsl #2]
	eor	w4, w4, w5
	and	x3, x3, #0xff
	lsl	x3, x3, #2
	ldrb	w3, [x21, x3]
	ldr	w3, [x0, x3, lsl #2]
	eor	w3, w4, w3
	str	w3, [x10, x2, lsl #2]
	add	x2, x2, #1
	ldrsw	x3, [x8]
	sub	x1, x1, #1
	cmp	x2, x3
	b.lt	LBB0_6
LBB0_7:
	ldr	w8, [x9]
	str	w8, [x10, w3, sxtw #2]
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_T7,8,3                         ; @T7
	.comm	_KHAZAD_ROUNDS,4,2              ; @KHAZAD_ROUNDS
	.comm	_T0,8,3                         ; @T0
	.comm	_T1,8,3                         ; @T1
	.comm	_T2,8,3                         ; @T2
	.comm	_T3,8,3                         ; @T3
	.comm	_T4,8,3                         ; @T4
	.comm	_T5,8,3                         ; @T5
	.comm	_T6,8,3                         ; @T6
	.comm	_c,8,3                          ; @c
	.no_dead_strip	_khazad_setkey
.subsections_via_symbols
