	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function geode_aes_crypt
_geode_aes_crypt:                       ## @geode_aes_crypt
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	_AES_CTRL_DCA@GOTPCREL(%rip), %rax
	movq	_AES_CTRL_SCA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
	movq	8(%rdi), %rcx
	movq	_AES_DIR_ENCRYPT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.3:
	movq	_AES_CTRL_ENCRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	orl	%eax, %r14d
	movq	_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	16(%rbx), %rax
	movq	_AES_MODE_CBC@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_6
## %bb.5:
	movq	_AES_CTRL_CBC@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_AES_WRITEIV0_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	28(%rbx), %esi
	callq	__writefield
LBB0_6:
	movq	_AES_FLAGS_HIDDENKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 24(%rbx)
	jne	LBB0_8
## %bb.7:
	movq	_AES_CTRL_WRKEY@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_AES_WRITEKEY0_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	40(%rbx), %esi
	callq	__writefield
LBB0_8:
	movl	36(%rbx), %edi
	movl	32(%rbx), %esi
	movq	(%rbx), %rdx
	movl	%r14d, %ecx
	callq	_do_crypt
	movl	%eax, %edi
	callq	_BUG_ON
	movq	16(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_10
## %bb.9:
	movq	_AES_WRITEIV0_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	28(%rbx), %esi
	callq	__readfield
LBB0_10:
	movq	_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movl	(%rbx), %eax
	jmp	LBB0_11
LBB0_1:
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AES_CTRL_DCA,4,2               ## @AES_CTRL_DCA
	.comm	_AES_CTRL_SCA,4,2               ## @AES_CTRL_SCA
	.comm	_AES_DIR_ENCRYPT,8,3            ## @AES_DIR_ENCRYPT
	.comm	_AES_CTRL_ENCRYPT,4,2           ## @AES_CTRL_ENCRYPT
	.comm	_lock,4,2                       ## @lock
	.comm	_AES_MODE_CBC,8,3               ## @AES_MODE_CBC
	.comm	_AES_CTRL_CBC,4,2               ## @AES_CTRL_CBC
	.comm	_AES_WRITEIV0_REG,4,2           ## @AES_WRITEIV0_REG
	.comm	_AES_FLAGS_HIDDENKEY,4,2        ## @AES_FLAGS_HIDDENKEY
	.comm	_AES_CTRL_WRKEY,4,2             ## @AES_CTRL_WRKEY
	.comm	_AES_WRITEKEY0_REG,4,2          ## @AES_WRITEKEY0_REG
	.no_dead_strip	_geode_aes_crypt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function geode_aes_crypt
_geode_aes_crypt:                       ; @geode_aes_crypt
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_8
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _AES_CTRL_DCA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AES_CTRL_DCA@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AES_CTRL_SCA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AES_CTRL_SCA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	x9, [x0, #8]
Lloh6:
	adrp	x10, _AES_DIR_ENCRYPT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AES_DIR_ENCRYPT@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
Lloh9:
	adrp	x11, _AES_CTRL_ENCRYPT@GOTPAGE
Lloh10:
	ldr	x11, [x11, _AES_CTRL_ENCRYPT@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	cmp	x9, x10
	csel	w9, w11, wzr, eq
	orr	w20, w8, w9
Lloh12:
	adrp	x0, _lock@GOTPAGE
Lloh13:
	ldr	x0, [x0, _lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #16]
Lloh14:
	adrp	x21, _AES_MODE_CBC@GOTPAGE
Lloh15:
	ldr	x21, [x21, _AES_MODE_CBC@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh16:
	adrp	x8, _AES_CTRL_CBC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AES_CTRL_CBC@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	orr	w20, w8, w20
Lloh19:
	adrp	x8, _AES_WRITEIV0_REG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AES_WRITEIV0_REG@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	ldr	w1, [x19, #28]
	bl	__writefield
LBB0_3:
	ldr	w8, [x19, #24]
Lloh22:
	adrp	x9, _AES_FLAGS_HIDDENKEY@GOTPAGE
Lloh23:
	ldr	x9, [x9, _AES_FLAGS_HIDDENKEY@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.4:
Lloh25:
	adrp	x8, _AES_CTRL_WRKEY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AES_CTRL_WRKEY@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	orr	w20, w8, w20
Lloh28:
	adrp	x8, _AES_WRITEKEY0_REG@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AES_WRITEKEY0_REG@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	ldr	w1, [x19, #40]
	bl	__writefield
LBB0_5:
	ldp	w1, w0, [x19, #32]
	ldr	x2, [x19]
	mov	x3, x20
	bl	_do_crypt
	bl	_BUG_ON
	ldr	x8, [x19, #16]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
Lloh31:
	adrp	x8, _AES_WRITEIV0_REG@GOTPAGE
Lloh32:
	ldr	x8, [x8, _AES_WRITEIV0_REG@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	ldr	w1, [x19, #28]
	bl	__readfield
LBB0_7:
Lloh34:
	adrp	x0, _lock@GOTPAGE
Lloh35:
	ldr	x0, [x0, _lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19]
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	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	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_AES_CTRL_DCA,4,2               ; @AES_CTRL_DCA
	.comm	_AES_CTRL_SCA,4,2               ; @AES_CTRL_SCA
	.comm	_AES_DIR_ENCRYPT,8,3            ; @AES_DIR_ENCRYPT
	.comm	_AES_CTRL_ENCRYPT,4,2           ; @AES_CTRL_ENCRYPT
	.comm	_lock,4,2                       ; @lock
	.comm	_AES_MODE_CBC,8,3               ; @AES_MODE_CBC
	.comm	_AES_CTRL_CBC,4,2               ; @AES_CTRL_CBC
	.comm	_AES_WRITEIV0_REG,4,2           ; @AES_WRITEIV0_REG
	.comm	_AES_FLAGS_HIDDENKEY,4,2        ; @AES_FLAGS_HIDDENKEY
	.comm	_AES_CTRL_WRKEY,4,2             ; @AES_CTRL_WRKEY
	.comm	_AES_WRITEKEY0_REG,4,2          ; @AES_WRITEKEY0_REG
	.no_dead_strip	_geode_aes_crypt
.subsections_via_symbols
