	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function safexcel_cipher_token
_safexcel_cipher_token:                 ## @safexcel_cipher_token
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	(%rdi), %rax
	movq	_CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_EIP197_OPTION_4_TOKEN_IV_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
	movq	24(%rdi), %rax
	movq	(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	(%rbx), %rdi
	addq	$8, %rdi
	movq	%r14, %rsi
	movl	$8, %edx
	jmp	LBB0_4
LBB0_2:
	movq	8(%rdi), %rcx
	movq	_EIP197_XCM_MODE_GCM@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.3:
	movq	_EIP197_OPTION_4_TOKEN_IV_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
	movq	(%rbx), %rdi
	movq	%r14, %rsi
	movl	$12, %edx
LBB0_4:
	callq	_memcpy
	movl	$1, %edi
	callq	_cpu_to_be32
	movq	(%rbx), %rcx
	movq	%rax, 24(%rcx)
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	_EIP197_XCM_MODE_CCM@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.11:
	movq	_EIP197_OPTION_4_TOKEN_IV_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
	movq	(%rbx), %rdi
	movl	$15, %edx
	subl	(%r14), %edx
	movq	%r14, %rsi
	callq	_memcpy
	movq	(%rbx), %rax
	movslq	(%r14), %rdx
	leaq	(,%rdx,4), %rcx
	negq	%rcx
	leaq	(%rax,%rcx), %rdi
	addq	$60, %rdi
	incl	%edx
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_memset                         ## TAILCALL
LBB0_7:
	movq	_CONTEXT_CONTROL_CRYPTO_MODE_ECB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.8:
	movl	16(%rdi), %eax
	addl	$-128, %eax
	xorl	%edx, %edx
	cmpl	$2, %eax
	ja	LBB0_10
## %bb.9:
	cltq
	leaq	l_switch.table.safexcel_cipher_token(%rip), %rcx
	movq	(%rcx,%rax,8), %rcx
	leaq	l_switch.table.safexcel_cipher_token.1(%rip), %rdx
	movq	(%rdx,%rax,8), %rax
	movl	(%rcx), %edx
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
LBB0_10:
	movq	(%rbx), %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_memcpy                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD,8,3 ## @CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD
	.comm	_EIP197_OPTION_4_TOKEN_IV_CMD,4,2 ## @EIP197_OPTION_4_TOKEN_IV_CMD
	.comm	_EIP197_XCM_MODE_GCM,8,3        ## @EIP197_XCM_MODE_GCM
	.comm	_EIP197_XCM_MODE_CCM,8,3        ## @EIP197_XCM_MODE_CCM
	.comm	_CONTEXT_CONTROL_CRYPTO_MODE_ECB,8,3 ## @CONTEXT_CONTROL_CRYPTO_MODE_ECB
	.comm	_DES_BLOCK_SIZE,4,2             ## @DES_BLOCK_SIZE
	.comm	_EIP197_OPTION_2_TOKEN_IV_CMD,4,2 ## @EIP197_OPTION_2_TOKEN_IV_CMD
	.comm	_DES3_EDE_BLOCK_SIZE,4,2        ## @DES3_EDE_BLOCK_SIZE
	.comm	_AES_BLOCK_SIZE,4,2             ## @AES_BLOCK_SIZE
	.no_dead_strip	_safexcel_cipher_token
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.safexcel_cipher_token
l_switch.table.safexcel_cipher_token:
	.quad	_DES_BLOCK_SIZE
	.quad	_AES_BLOCK_SIZE
	.quad	_DES3_EDE_BLOCK_SIZE

	.p2align	3                               ## @switch.table.safexcel_cipher_token.1
l_switch.table.safexcel_cipher_token.1:
	.quad	_EIP197_OPTION_2_TOKEN_IV_CMD
	.quad	_EIP197_OPTION_4_TOKEN_IV_CMD
	.quad	_EIP197_OPTION_2_TOKEN_IV_CMD

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function safexcel_cipher_token
_safexcel_cipher_token:                 ; @safexcel_cipher_token
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x1
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EIP197_OPTION_4_TOKEN_IV_CMD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIP197_OPTION_4_TOKEN_IV_CMD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	ldr	x8, [x0, #24]
	ldr	x9, [x19]
	str	x8, [x9]
	ldr	x8, [x19]
	add	x0, x8, #8
	mov	x1, x20
	mov	w2, #8
	b	LBB0_4
LBB0_2:
	ldr	x9, [x0, #8]
Lloh6:
	adrp	x10, _EIP197_XCM_MODE_GCM@GOTPAGE
Lloh7:
	ldr	x10, [x10, _EIP197_XCM_MODE_GCM@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.3:
Lloh9:
	adrp	x8, _EIP197_OPTION_4_TOKEN_IV_CMD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIP197_OPTION_4_TOKEN_IV_CMD@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	ldr	x0, [x19]
	mov	x1, x20
	mov	w2, #12
LBB0_4:
	bl	_memcpy
	mov	w0, #1
	bl	_cpu_to_be32
	ldr	x8, [x19]
	str	x0, [x8, #24]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh12:
	adrp	x10, _EIP197_XCM_MODE_CCM@GOTPAGE
Lloh13:
	ldr	x10, [x10, _EIP197_XCM_MODE_CCM@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.7:
Lloh15:
	adrp	x8, _EIP197_OPTION_4_TOKEN_IV_CMD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIP197_OPTION_4_TOKEN_IV_CMD@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	ldr	x0, [x19]
	ldr	w8, [x20]
	mov	w9, #15
	sub	w2, w9, w8
	mov	x1, x20
	bl	_memcpy
	ldr	x8, [x19]
	ldrsw	x9, [x20]
	sub	x8, x8, x9, lsl #2
	add	x0, x8, #60
	add	w2, w9, #1
	mov	w1, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_memset
LBB0_8:
Lloh18:
	adrp	x9, _CONTEXT_CONTROL_CRYPTO_MODE_ECB@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CONTEXT_CONTROL_CRYPTO_MODE_ECB@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.9:
	ldr	w8, [x0, #16]
	sub	w8, w8, #128
	cmp	w8, #2
	b.hi	LBB0_11
; %bb.10:
	sbfiz	x8, x8, #3, #32
Lloh21:
	adrp	x9, l_switch.table.safexcel_cipher_token@PAGE
Lloh22:
	add	x9, x9, l_switch.table.safexcel_cipher_token@PAGEOFF
	ldr	x9, [x9, x8]
Lloh23:
	adrp	x10, l_switch.table.safexcel_cipher_token.1@PAGE
Lloh24:
	add	x10, x10, l_switch.table.safexcel_cipher_token.1@PAGEOFF
	ldr	x8, [x10, x8]
	ldr	w2, [x9]
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_12
LBB0_11:
	mov	w2, #0
LBB0_12:
	ldr	x0, [x19]
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_memcpy
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD,8,3 ; @CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD
	.comm	_EIP197_OPTION_4_TOKEN_IV_CMD,4,2 ; @EIP197_OPTION_4_TOKEN_IV_CMD
	.comm	_EIP197_XCM_MODE_GCM,8,3        ; @EIP197_XCM_MODE_GCM
	.comm	_EIP197_XCM_MODE_CCM,8,3        ; @EIP197_XCM_MODE_CCM
	.comm	_CONTEXT_CONTROL_CRYPTO_MODE_ECB,8,3 ; @CONTEXT_CONTROL_CRYPTO_MODE_ECB
	.comm	_DES_BLOCK_SIZE,4,2             ; @DES_BLOCK_SIZE
	.comm	_EIP197_OPTION_2_TOKEN_IV_CMD,4,2 ; @EIP197_OPTION_2_TOKEN_IV_CMD
	.comm	_DES3_EDE_BLOCK_SIZE,4,2        ; @DES3_EDE_BLOCK_SIZE
	.comm	_AES_BLOCK_SIZE,4,2             ; @AES_BLOCK_SIZE
	.no_dead_strip	_safexcel_cipher_token
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.safexcel_cipher_token
l_switch.table.safexcel_cipher_token:
	.quad	_DES_BLOCK_SIZE
	.quad	_AES_BLOCK_SIZE
	.quad	_DES3_EDE_BLOCK_SIZE

	.p2align	3                               ; @switch.table.safexcel_cipher_token.1
l_switch.table.safexcel_cipher_token.1:
	.quad	_EIP197_OPTION_2_TOKEN_IV_CMD
	.quad	_EIP197_OPTION_4_TOKEN_IV_CMD
	.quad	_EIP197_OPTION_2_TOKEN_IV_CMD

.subsections_via_symbols
