	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_camellia_setkey_dec    ## -- Begin function mbedtls_camellia_setkey_dec
	.p2align	4, 0x90
_mbedtls_camellia_setkey_dec:           ## @mbedtls_camellia_setkey_dec
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	callq	_mbedtls_camellia_init
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_mbedtls_camellia_setkey_enc
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movl	-48(%rbp), %eax
	movl	%eax, (%r15)
	xorl	%r8d, %r8d
	cmpl	$4, %eax
	sete	%r8b
	movq	8(%r15), %rax
	movq	-40(%rbp), %rbx
	movq	%r8, %rcx
	shlq	$6, %rcx
	leaq	(%rbx,%rcx), %rdi
	addq	$192, %rdi
	movl	192(%rbx,%rcx), %edx
	movl	%edx, (%rax)
	movl	196(%rbx,%rcx), %edx
	movl	%edx, 4(%rax)
	movl	200(%rbx,%rcx), %edx
	movl	%edx, 8(%rax)
	movl	204(%rbx,%rcx), %edx
	leaq	16(%rax), %rsi
	movl	%edx, 12(%rax)
	leal	22(,%r8,8), %r10d
	leaq	(%rbx,%rcx), %rdx
	addq	$184, %rdx
	cmpq	%rdi, %rsi
	jae	LBB0_8
## %bb.2:
	shlq	$4, %r8
	leaq	16(%rax,%r10,8), %r9
	movq	%r8, %rdi
	subq	%r10, %rdi
	subq	%r10, %rdi
	leaq	(%rbx,%rdi,4), %rcx
	addq	$192, %rcx
	cmpq	%r9, %rcx
	jae	LBB0_8
## %bb.3:
	movl	$2, %edi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rsi), %ecx
	movl	%ecx, (%rax,%rdi,8)
	movl	4(%rdx,%rsi), %ecx
	movl	%ecx, 4(%rax,%rdi,8)
	incq	%rdi
	addq	$-8, %rsi
	cmpq	$4, %rdi
	jne	LBB0_4
## %bb.5:
	leaq	(%rbx,%r8,4), %rbx
	shlq	$3, %r10
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	184(%rbx,%rsi), %ecx
	movl	%ecx, (%rax,%rdi,8)
	movl	188(%rbx,%rsi), %ecx
	movl	%ecx, 4(%rax,%rdi,8)
	movl	176(%rbx,%rsi), %ecx
	movl	%ecx, 8(%rax,%rdi,8)
	movl	180(%rbx,%rsi), %ecx
	movl	%ecx, 12(%rax,%rdi,8)
	movl	168(%rbx,%rsi), %ecx
	movl	%ecx, 16(%rax,%rdi,8)
	movl	172(%rbx,%rsi), %ecx
	movl	%ecx, 20(%rax,%rdi,8)
	movl	160(%rbx,%rsi), %ecx
	movl	%ecx, 24(%rax,%rdi,8)
	movl	164(%rbx,%rsi), %ecx
	movl	%ecx, 28(%rax,%rdi,8)
	addq	$-32, %rsi
	addq	$4, %rdi
	movq	%r10, %rcx
	addq	%rsi, %rcx
	jne	LBB0_6
## %bb.7:
	subq	%rsi, %rax
	leaq	8(%rax), %rcx
	leaq	(%rsi,%rbx), %rdx
	addq	$192, %rdx
	leaq	(%rsi,%rbx), %r8
	addq	$184, %r8
	addq	$16, %rax
	jmp	LBB0_11
LBB0_8:
	leaq	(,%r10,8), %r9
	movq	%rdx, %r8
	subq	%r9, %r8
	leaq	(%rsi,%r10,8), %rax
	leaq	-16(,%r10,8), %rdi
	andq	$-16, %rdi
	leaq	-8(%rdx), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx), %xmm0
	pshufd	$78, %xmm0, %xmm0               ## xmm0 = xmm0[2,3,0,1]
	movdqu	%xmm0, (%rsi,%rbx)
	movdqu	-16(%rcx), %xmm0
	pshufd	$78, %xmm0, %xmm0               ## xmm0 = xmm0[2,3,0,1]
	movdqu	%xmm0, 16(%rsi,%rbx)
	addq	$-32, %rcx
	addq	$32, %rbx
	cmpq	%rbx, %rdi
	jne	LBB0_9
## %bb.10:
	movdqu	(%rcx), %xmm0
	pshufd	$78, %xmm0, %xmm0               ## xmm0 = xmm0[2,3,0,1]
	movdqu	%xmm0, (%rsi,%rbx)
	negq	%r9
	orq	$8, %r9
	addq	%r9, %rdx
	leaq	(%rsi,%r10,8), %rcx
	addq	$-8, %rcx
LBB0_11:
	movl	-16(%rdx), %esi
	movl	%esi, (%rax)
	movl	-12(%rdx), %eax
	movl	%eax, 12(%rcx)
	movl	(%r8), %eax
	movl	%eax, 16(%rcx)
	movl	-4(%rdx), %eax
	movl	%eax, 20(%rcx)
LBB0_12:
	leaq	-48(%rbp), %rdi
	callq	_mbedtls_camellia_free
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_camellia_setkey_dec    ; -- Begin function mbedtls_camellia_setkey_dec
	.p2align	2
_mbedtls_camellia_setkey_dec:           ; @mbedtls_camellia_setkey_dec
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x20, x0
	mov	x0, sp
	bl	_mbedtls_camellia_init
	mov	x0, sp
	mov	x1, x21
	mov	x2, x19
	bl	_mbedtls_camellia_setkey_enc
	mov	x19, x0
	cbnz	w0, LBB0_8
; %bb.1:
	ldr	w8, [sp]
	cmp	w8, #4
	cset	w10, eq
	str	w8, [x20]
	ldr	x8, [x20, #8]
	ldr	x12, [sp, #8]
	add	x13, x12, x10, lsl #6
	lsl	x14, x10, #4
	ldr	w9, [x13, #192]!
	str	w9, [x8]
	ldr	w9, [x13, #4]
	str	w9, [x8, #4]
	ldr	w9, [x13, #8]
	str	w9, [x8, #8]
	ldr	w9, [x13, #12]
	add	x11, x8, #16
	str	w9, [x8, #12]
	mov	w9, #22
	bfi	w9, w10, #3, #1
	sub	x10, x13, #8
	add	x15, x8, w9, uxtw #3
	add	x15, x15, #16
	sub	x14, x14, w9, uxtw #1
	add	x12, x12, x14, lsl #2
	add	x12, x12, #192
	cmp	x11, x13
	ccmp	x12, x15, #2, lo
	b.lo	LBB0_5
; %bb.2:
	sub	x12, x10, #24
	ld2.4s	{ v0, v1 }, [x12]
	rev64.4s	v2, v0
	ext.16b	v2, v2, v2, #8
	rev64.4s	v0, v1
	ext.16b	v3, v0, v0, #8
	st2.4s	{ v2, v3 }, [x11]
	sub	x12, x10, #56
	ld2.4s	{ v0, v1 }, [x12]
	rev64.4s	v2, v0
	ext.16b	v2, v2, v2, #8
	rev64.4s	v0, v1
	ext.16b	v3, v0, v0, #8
	add	x12, x8, #48
	st2.4s	{ v2, v3 }, [x12]
	sub	x12, x10, #88
	ld2.4s	{ v0, v1 }, [x12]
	rev64.4s	v2, v0
	ext.16b	v2, v2, v2, #8
	rev64.4s	v0, v1
	ext.16b	v3, v0, v0, #8
	add	x12, x8, #80
	st2.4s	{ v2, v3 }, [x12]
	sub	x12, x10, #120
	ld2.4s	{ v0, v1 }, [x12]
	sub	x9, x9, #2
	rev64.4s	v2, v0
	ext.16b	v2, v2, v2, #8
	rev64.4s	v0, v1
	ext.16b	v3, v0, v0, #8
	add	x12, x8, #112
	st2.4s	{ v2, v3 }, [x12]
	lsl	x13, x9, #3
	sub	x12, x10, #152
	ld2.4s	{ v0, v1 }, [x12]
	sub	x12, x10, x13
	add	x11, x11, x13
	rev64.4s	v2, v0
	ext.16b	v2, v2, v2, #8
	rev64.4s	v0, v1
	ext.16b	v3, v0, v0, #8
	add	x13, x8, #144
	st2.4s	{ v2, v3 }, [x13]
	cmp	x9, #20
	b.eq	LBB0_4
; %bb.3:
	sub	x9, x10, #184
	ld2.4s	{ v0, v1 }, [x9]
	rev64.4s	v2, v0
	ext.16b	v2, v2, v2, #8
	rev64.4s	v0, v1
	ext.16b	v3, v0, v0, #8
	add	x9, x8, #176
	st2.4s	{ v2, v3 }, [x9]
	sub	x9, x10, #216
	ld2.4s	{ v0, v1 }, [x9]
	rev64.4s	v2, v0
	ext.16b	v2, v2, v2, #8
	rev64.4s	v0, v1
	ext.16b	v3, v0, v0, #8
	add	x8, x8, #208
	st2.4s	{ v2, v3 }, [x8]
LBB0_4:
	mov	w9, #2
	b	LBB0_6
LBB0_5:
	mov	x12, x10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x8, x11
	mov	x10, x12
	ldr	w11, [x12]
	str	w11, [x8]
	ldr	w11, [x12, #4]
	str	w11, [x8, #4]
	sub	x12, x12, #8
	add	x11, x8, #8
	sub	x9, x9, #1
	cbnz	x9, LBB0_6
; %bb.7:
	ldur	w9, [x10, #-16]
	str	w9, [x8, #8]
	ldur	w9, [x10, #-12]
	str	w9, [x8, #12]
	ldur	w9, [x10, #-8]
	str	w9, [x8, #16]
	ldur	w9, [x10, #-4]
	str	w9, [x8, #20]
LBB0_8:
	mov	x0, sp
	bl	_mbedtls_camellia_free
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
