	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_cipher_check_tag       ## -- Begin function mbedtls_cipher_check_tag
	.p2align	4, 0x90
_mbedtls_cipher_check_tag:              ## @mbedtls_cipher_check_tag
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movq	16(%rdi), %rcx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.2:
	movq	_MBEDTLS_DECRYPT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%rdi), %rax
	jne	LBB0_5
## %bb.3:
	movq	%rdx, %rbx
	movq	_MBEDTLS_MODE_GCM@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	xorl	%eax, %eax
	cmpq	(%rcx), %rdx
	jne	LBB0_7
## %bb.4:
	cmpq	$17, %rbx
	jb	LBB0_9
LBB0_5:
	movq	_MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_22
## %bb.8:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	movq	%rsi, %r14
	movq	8(%rdi), %rdi
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_mbedtls_gcm_finish
	testl	%eax, %eax
	jne	LBB0_7
## %bb.10:
	testq	%rbx, %rbx
	je	LBB0_21
## %bb.11:
	cmpq	$4, %rbx
	jae	LBB0_13
## %bb.12:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_13:
	movq	%rbx, %rax
	andq	$-4, %rax
	movd	(%r14), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	pxor	-48(%rbp), %xmm0
	cmpq	$4, %rax
	je	LBB0_17
## %bb.14:
	movl	-44(%rbp), %ecx
	xorl	4(%r14), %ecx
	movd	%ecx, %xmm1
	por	%xmm1, %xmm0
	cmpq	$8, %rax
	je	LBB0_17
## %bb.15:
	movd	8(%r14), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	movq	-40(%rbp), %xmm2                ## xmm2 = mem[0],zero
	pxor	%xmm1, %xmm2
	por	%xmm2, %xmm0
	cmpq	$12, %rax
	je	LBB0_17
## %bb.16:
	movl	-36(%rbp), %ecx
	xorl	12(%r14), %ecx
	movd	%ecx, %xmm1
	por	%xmm1, %xmm0
LBB0_17:
	pmovzxbd	%xmm0, %xmm0                    ## xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	por	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	por	%xmm1, %xmm0
	movd	%xmm0, %ecx
	cmpq	%rbx, %rax
	je	LBB0_19
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movzbl	-48(%rbp,%rax), %edx
	xorb	(%r14,%rax), %dl
	movzbl	%dl, %edx
	orl	%edx, %ecx
	incq	%rax
	cmpq	%rax, %rbx
	jne	LBB0_18
LBB0_19:
	testl	%ecx, %ecx
	je	LBB0_21
## %bb.20:
	movq	_MBEDTLS_ERR_CIPHER_AUTH_FAILED@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_21:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_DECRYPT,8,3            ## @MBEDTLS_DECRYPT
	.comm	_MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA,4,2 ## @MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
	.comm	_MBEDTLS_MODE_GCM,8,3           ## @MBEDTLS_MODE_GCM
	.comm	_MBEDTLS_ERR_CIPHER_AUTH_FAILED,4,2 ## @MBEDTLS_ERR_CIPHER_AUTH_FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function mbedtls_cipher_check_tag
lCPI0_0:
	.byte	0                               ; 0x0
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	1                               ; 0x1
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	2                               ; 0x2
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	3                               ; 0x3
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
lCPI0_1:
	.byte	4                               ; 0x4
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	5                               ; 0x5
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	6                               ; 0x6
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	7                               ; 0x7
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_mbedtls_cipher_check_tag
	.p2align	2
_mbedtls_cipher_check_tag:              ; @mbedtls_cipher_check_tag
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	cbz	x0, LBB0_5
; %bb.1:
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_5
; %bb.2:
Lloh0:
	adrp	x9, _MBEDTLS_DECRYPT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MBEDTLS_DECRYPT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x10, [x0]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.3:
Lloh3:
	adrp	x9, _MBEDTLS_MODE_GCM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MBEDTLS_MODE_GCM@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.4:
	mov	x20, x2
	cmp	x2, #17
	b.lo	LBB0_8
LBB0_5:
Lloh6:
	adrp	x8, _MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
	mov	x19, x1
	ldr	x0, [x0, #8]
	mov	x1, sp
	mov	x2, x20
	bl	_mbedtls_gcm_finish
	cbnz	w0, LBB0_7
; %bb.9:
	cbz	x20, LBB0_23
; %bb.10:
	cmp	x20, #8
	b.hs	LBB0_12
; %bb.11:
	mov	w9, #0
	mov	x8, #0
	b	LBB0_19
LBB0_12:
	cmp	x20, #16
	b.hs	LBB0_14
; %bb.13:
	mov	w9, #0
	mov	x8, #0
	b	LBB0_16
LBB0_14:
	and	x8, x20, #0xfffffffffffffff0
	ldr	q0, [x19]
	ldr	q1, [sp]
	eor.16b	v0, v1, v0
	ushll2.8h	v1, v0, #0
	ext.16b	v2, v1, v1, #8
	ushll.8h	v0, v0, #0
	ext.16b	v3, v0, v0, #8
	orr.8b	v0, v0, v1
	orr.8b	v1, v3, v2
	orr.8b	v0, v0, v1
	ushll.4s	v0, v0, #0
	ext.16b	v1, v0, v0, #8
	orr.8b	v0, v0, v1
	mov.s	w9, v0[1]
	fmov	w10, s0
	orr	w9, w10, w9
	cmp	x8, x20
	b.eq	LBB0_21
; %bb.15:
	tbz	w20, #3, LBB0_19
LBB0_16:
	mov	x11, x8
	and	x8, x20, #0xfffffffffffffff8
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	mov.s	v1[0], w9
	mov	x9, sp
	add	x9, x9, x11
	add	x10, x19, x11
	sub	x11, x11, x8
Lloh8:
	adrp	x12, lCPI0_0@PAGE
Lloh9:
	ldr	q2, [x12, lCPI0_0@PAGEOFF]
Lloh10:
	adrp	x12, lCPI0_1@PAGE
Lloh11:
	ldr	q3, [x12, lCPI0_1@PAGEOFF]
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	d4, [x10], #8
	ldr	d5, [x9], #8
	eor.8b	v4, v5, v4
	tbl.16b	v5, { v4 }, v2
	tbl.16b	v4, { v4 }, v3
	orr.16b	v0, v0, v4
	orr.16b	v1, v1, v5
	adds	x11, x11, #8
	b.ne	LBB0_17
; %bb.18:
	orr.16b	v0, v1, v0
	ext.16b	v1, v0, v0, #8
	orr.8b	v0, v0, v1
	mov.s	w9, v0[1]
	fmov	w10, s0
	orr	w9, w10, w9
	cmp	x8, x20
	b.eq	LBB0_21
LBB0_19:
	mov	x10, sp
	add	x10, x10, x8
	sub	x11, x20, x8
	add	x8, x19, x8
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w12, [x8], #1
	ldrb	w13, [x10], #1
	eor	w12, w13, w12
	orr	w9, w9, w12
	subs	x11, x11, #1
	b.ne	LBB0_20
LBB0_21:
	cbz	w9, LBB0_23
; %bb.22:
Lloh12:
	adrp	x8, _MBEDTLS_ERR_CIPHER_AUTH_FAILED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MBEDTLS_ERR_CIPHER_AUTH_FAILED@GOTPAGEOFF]
	b	LBB0_6
LBB0_23:
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpAdrp	Lloh8, Lloh10
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_DECRYPT,8,3            ; @MBEDTLS_DECRYPT
	.comm	_MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA,4,2 ; @MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
	.comm	_MBEDTLS_MODE_GCM,8,3           ; @MBEDTLS_MODE_GCM
	.comm	_MBEDTLS_ERR_CIPHER_AUTH_FAILED,4,2 ; @MBEDTLS_ERR_CIPHER_AUTH_FAILED
.subsections_via_symbols
