	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_aes_setkey
_mtk_aes_setkey:                        ## @mtk_aes_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_crypto_ablkcipher_ctx
	movq	%rax, %r12
	leal	-128(%r15), %eax
	cmpl	$3, %eax
	jae	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.mtk_aes_setkey(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movl	%r15d, %edi
	callq	_SIZE_IN_WORDS
	movl	%eax, 4(%r12)
	movl	(%r12), %edi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_mtk_aes_write_state_le
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_crypto_ablkcipher_set_flags
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AES_TFM_128BITS,4,2            ## @AES_TFM_128BITS
	.comm	_AES_TFM_192BITS,4,2            ## @AES_TFM_192BITS
	.comm	_AES_TFM_256BITS,4,2            ## @AES_TFM_256BITS
	.comm	_CRYPTO_TFM_RES_BAD_KEY_LEN,4,2 ## @CRYPTO_TFM_RES_BAD_KEY_LEN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mtk_aes_setkey
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.mtk_aes_setkey
l_switch.table.mtk_aes_setkey:
	.quad	_AES_TFM_256BITS
	.quad	_AES_TFM_192BITS
	.quad	_AES_TFM_128BITS

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_aes_setkey
_mtk_aes_setkey:                        ; @mtk_aes_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	x19, x2
	mov	x20, x1
	mov	x22, x0
	bl	_crypto_ablkcipher_ctx
	sub	w8, w19, #128
	cmp	w8, #3
	b.hs	LBB0_2
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x9, l_switch.table.mtk_aes_setkey@PAGE
Lloh1:
	add	x9, x9, l_switch.table.mtk_aes_setkey@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w8, [x8]
	str	w8, [x0, #8]
	mov	x0, x19
	bl	_SIZE_IN_WORDS
	str	w0, [x21, #4]
	ldr	w0, [x21]
	mov	x1, x20
	mov	x2, x19
	bl	_mtk_aes_write_state_le
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_crypto_ablkcipher_set_flags
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AES_TFM_128BITS,4,2            ; @AES_TFM_128BITS
	.comm	_AES_TFM_192BITS,4,2            ; @AES_TFM_192BITS
	.comm	_AES_TFM_256BITS,4,2            ; @AES_TFM_256BITS
	.comm	_CRYPTO_TFM_RES_BAD_KEY_LEN,4,2 ; @CRYPTO_TFM_RES_BAD_KEY_LEN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mtk_aes_setkey
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.mtk_aes_setkey
l_switch.table.mtk_aes_setkey:
	.quad	_AES_TFM_256BITS
	.quad	_AES_TFM_192BITS
	.quad	_AES_TFM_128BITS

.subsections_via_symbols
