	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_gcm_finish             ## -- Begin function mbedtls_gcm_finish
	.p2align	4, 0x90
_mbedtls_gcm_finish:                    ## @mbedtls_gcm_finish
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-17(%rdx), %rax
	cmpq	$-14, %rax
	ja	LBB0_2
## %bb.1:
	movq	_MBEDTLS_ERR_GCM_BAD_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_10
LBB0_2:
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %r13d
	movl	4(%rdi), %r12d
	movl	16(%rdi), %esi
	movq	%r14, %rdi
	callq	_memcpy
	xorl	%eax, %eax
	movl	%r13d, %ecx
	orl	%r12d, %ecx
	je	LBB0_10
## %bb.3:
	shll	$3, %r13d
	shll	$3, %r12d
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	leaq	-64(%rbp), %rsi
	xorl	%edx, %edx
	callq	_PUT_UINT32_BE
	movl	%r12d, %edi
	leaq	-64(%rbp), %r12
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_PUT_UINT32_BE
	movq	%r12, %rsi
	movl	$8, %edx
	callq	_PUT_UINT32_BE
	movl	%r13d, %edi
	movq	%r12, %rsi
	movl	$12, %edx
	callq	_PUT_UINT32_BE
	movb	-64(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, (%rcx)
	movb	-63(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 1(%rcx)
	movb	-62(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 2(%rcx)
	movb	-61(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 3(%rcx)
	movb	-60(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 4(%rcx)
	movb	-59(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 5(%rcx)
	movb	-58(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 6(%rcx)
	movb	-57(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 7(%rcx)
	movb	-56(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 8(%rcx)
	movb	-55(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 9(%rcx)
	movb	-54(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 10(%rcx)
	movb	-53(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 11(%rcx)
	movb	-52(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 12(%rcx)
	movb	-51(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 13(%rcx)
	movb	-50(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 14(%rcx)
	movb	-49(%rbp), %al
	movq	8(%rbx), %rcx
	xorb	%al, 15(%rcx)
	movq	8(%rbx), %rdx
	movq	%rbx, %rdi
	movq	%rdx, %rsi
	callq	_gcm_mult
	cmpq	$1, %r15
	jne	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movq	%r15, %rcx
	andq	$-2, %rcx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rdx
	movzbl	(%rdx,%rax), %edx
	xorb	%dl, (%r14,%rax)
	movq	8(%rbx), %rdx
	movzbl	1(%rdx,%rax), %edx
	xorb	%dl, 1(%r14,%rax)
	addq	$2, %rax
	cmpq	%rax, %rcx
	jne	LBB0_6
LBB0_7:
	testb	$1, %r15b
	je	LBB0_9
## %bb.8:
	movq	8(%rbx), %rcx
	movb	(%rcx,%rax), %cl
	xorb	%cl, (%r14,%rax)
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_12
## %bb.11:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ERR_GCM_BAD_INPUT,4,2  ## @MBEDTLS_ERR_GCM_BAD_INPUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_gcm_finish             ; -- Begin function mbedtls_gcm_finish
	.p2align	2
_mbedtls_gcm_finish:                    ; @mbedtls_gcm_finish
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	sub	x8, x2, #17
	cmn	x8, #14
	b.hi	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MBEDTLS_ERR_GCM_BAD_INPUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_ERR_GCM_BAD_INPUT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_2:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldp	w22, w23, [x0]
	ldr	w1, [x0, #16]
	mov	x0, x20
	bl	_memcpy
	orr	w8, w22, w23
	cbz	w8, LBB0_5
; %bb.3:
	lsl	w22, w22, #3
	lsl	w23, w23, #3
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	add	x1, sp, #8
	mov	w2, #0
	bl	_PUT_UINT32_BE
	add	x1, sp, #8
	mov	x0, x23
	mov	w2, #4
	bl	_PUT_UINT32_BE
	add	x1, sp, #8
	mov	w2, #8
	bl	_PUT_UINT32_BE
	add	x1, sp, #8
	mov	x0, x22
	mov	w2, #12
	bl	_PUT_UINT32_BE
	ldrb	w8, [sp, #8]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9]
	eor	w8, w10, w8
	strb	w8, [x9]
	ldrb	w8, [sp, #9]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #1]
	eor	w8, w10, w8
	strb	w8, [x9, #1]
	ldrb	w8, [sp, #10]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #2]
	eor	w8, w10, w8
	strb	w8, [x9, #2]
	ldrb	w8, [sp, #11]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #3]
	eor	w8, w10, w8
	strb	w8, [x9, #3]
	ldrb	w8, [sp, #12]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #4]
	eor	w8, w10, w8
	strb	w8, [x9, #4]
	ldrb	w8, [sp, #13]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #5]
	eor	w8, w10, w8
	strb	w8, [x9, #5]
	ldrb	w8, [sp, #14]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #6]
	eor	w8, w10, w8
	strb	w8, [x9, #6]
	ldrb	w8, [sp, #15]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #7]
	eor	w8, w10, w8
	strb	w8, [x9, #7]
	ldrb	w8, [sp, #16]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #8]
	eor	w8, w10, w8
	strb	w8, [x9, #8]
	ldrb	w8, [sp, #17]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #9]
	eor	w8, w10, w8
	strb	w8, [x9, #9]
	ldrb	w8, [sp, #18]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #10]
	eor	w8, w10, w8
	strb	w8, [x9, #10]
	ldrb	w8, [sp, #19]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #11]
	eor	w8, w10, w8
	strb	w8, [x9, #11]
	ldrb	w8, [sp, #20]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #12]
	eor	w8, w10, w8
	strb	w8, [x9, #12]
	ldrb	w8, [sp, #21]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #13]
	eor	w8, w10, w8
	strb	w8, [x9, #13]
	ldrb	w8, [sp, #22]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #14]
	eor	w8, w10, w8
	strb	w8, [x9, #14]
	ldrb	w8, [sp, #23]
	ldr	x9, [x21, #8]
	ldrb	w10, [x9, #15]
	eor	w8, w10, w8
	strb	w8, [x9, #15]
	ldr	x1, [x21, #8]
	mov	x0, x21
	mov	x2, x1
	bl	_gcm_mult
	mov	x8, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21, #8]
	ldrb	w9, [x9, x8]
	ldrb	w10, [x20, x8]
	eor	w9, w10, w9
	strb	w9, [x20, x8]
	add	x8, x8, #1
	cmp	x19, x8
	b.ne	LBB0_4
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldr	x8, [sp, #24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ERR_GCM_BAD_INPUT,4,2  ; @MBEDTLS_ERR_GCM_BAD_INPUT
.subsections_via_symbols
