	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function openssl_gcm_encrypt
_openssl_gcm_encrypt:                   ## @openssl_gcm_encrypt
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_EVP_CIPHER_CTX_new
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_ERR_get_error
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_ERR_error_string
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movl	%ebx, %edx
	movq	32(%rbp), %rcx
	movl	%eax, %r8d
	callq	_errx
LBB0_2:
	movq	%r13, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	movq	%r12, %rcx
	movq	%r14, %r8
	callq	_EVP_EncryptInit_ex
	cmpl	$1, %eax
	movq	32(%rbp), %r12
	je	LBB0_4
## %bb.3:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_ERR_get_error
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_ERR_error_string
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movl	%r14d, %edx
	movq	%r12, %rcx
	movl	%eax, %r8d
	callq	_errx
LBB0_4:
	movq	24(%rbp), %r14
	movq	16(%rbp), %rbx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_EVP_CIPHER_CTX_set_padding
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.5:
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	callq	_EVP_EncryptUpdate
	cmpl	$1, %eax
	je	LBB0_7
## %bb.6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_ERR_get_error
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_ERR_error_string
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movl	%r15d, %edx
	movq	%r12, %rcx
	movl	%eax, %r8d
	callq	_errx
LBB0_7:
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rcx
	movq	%r12, %r8
	callq	_EVP_EncryptUpdate
	cmpl	$1, %eax
	je	LBB0_9
## %bb.8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_ERR_get_error
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_ERR_error_string
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movl	%r15d, %edx
	movq	%r12, %rcx
	movl	%eax, %r8d
	callq	_errx
LBB0_9:
	movslq	-44(%rbp), %rbx
	leaq	(%r14,%rbx,4), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	callq	_EVP_EncryptFinal_ex
	cmpl	$1, %eax
	je	LBB0_11
## %bb.10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_ERR_get_error
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_ERR_error_string
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	movl	%r14d, %edx
	movq	%r12, %rcx
	movl	%eax, %r8d
	callq	_errx
LBB0_11:
	movq	40(%rbp), %r14
	movslq	-44(%rbp), %r8
	addq	%rbx, %r8
	cmpq	%r12, %r8
	je	LBB0_13
## %bb.12:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	movq	%r12, %rcx
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_errx
LBB0_13:
	movq	_EVP_CTRL_GCM_GET_TAG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AES_GMAC_HASH_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r14, %rcx
	callq	_EVP_CIPHER_CTX_ctrl
	cmpl	$1, %eax
	je	LBB0_15
## %bb.14:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_ERR_get_error
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_ERR_error_string
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	movl	%r14d, %edx
	movq	%r12, %rcx
	movl	%eax, %r8d
	callq	_errx
LBB0_15:
	movq	%r13, %rdi
	callq	_EVP_CIPHER_CTX_free
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OpenSSL %s (%zu) ctx new failed: %s"

L_.str.1:                               ## @.str.1
	.asciz	"OpenSSL %s (%zu) ctx init failed: %s"

L_.str.2:                               ## @.str.2
	.asciz	"OpenSSL %s (%zu) aad update failed: %s"

L_.str.3:                               ## @.str.3
	.asciz	"OpenSSL %s (%zu) encrypt update failed: %s"

L_.str.4:                               ## @.str.4
	.asciz	"OpenSSL %s (%zu) encrypt final failed: %s"

L_.str.5:                               ## @.str.5
	.asciz	"OpenSSL %s (%zu) encrypt size mismatch: %d"

	.comm	_EVP_CTRL_GCM_GET_TAG,4,2       ## @EVP_CTRL_GCM_GET_TAG
	.comm	_AES_GMAC_HASH_LEN,4,2          ## @AES_GMAC_HASH_LEN
L_.str.6:                               ## @.str.6
	.asciz	"OpenSSL %s (%zu) get tag failed: %s"

	.no_dead_strip	_openssl_gcm_encrypt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function openssl_gcm_encrypt
_openssl_gcm_encrypt:                   ; @openssl_gcm_encrypt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x7
	str	x6, [sp]                        ; 8-byte Folded Spill
	mov	x24, x5
	mov	x25, x4
	mov	x26, x3
	mov	x27, x2
	mov	x28, x1
	mov	x21, x0
	ldr	x20, [x29, #16]
	bl	_EVP_CIPHER_CTX_new
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w23, [x21]
	bl	_ERR_get_error
	mov	x1, #0
	bl	_ERR_error_string
	mov	x4, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x23
	mov	x3, x20
	bl	_errx
LBB0_2:
	mov	x0, x19
	mov	x1, x28
	mov	x2, #0
	mov	x3, x27
	mov	x4, x26
	bl	_EVP_EncryptInit_ex
	cmp	w0, #1
	b.eq	LBB0_4
; %bb.3:
	ldr	w23, [x21]
	bl	_ERR_get_error
	mov	x1, #0
	bl	_ERR_error_string
	mov	x4, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x23
	mov	x3, x20
	bl	_errx
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	bl	_EVP_CIPHER_CTX_set_padding
	cbz	x25, LBB0_7
; %bb.5:
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, #0
	mov	x3, x25
	mov	x4, x24
	bl	_EVP_EncryptUpdate
	cmp	w0, #1
	b.eq	LBB0_7
; %bb.6:
	ldr	w23, [x21]
	bl	_ERR_get_error
	mov	x1, #0
	bl	_ERR_error_string
	mov	x4, x0
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x23
	mov	x3, x20
	bl	_errx
LBB0_7:
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x22
	ldr	x3, [sp]                        ; 8-byte Folded Reload
	mov	x4, x20
	bl	_EVP_EncryptUpdate
	cmp	w0, #1
	b.eq	LBB0_9
; %bb.8:
	ldr	w23, [x21]
	bl	_ERR_get_error
	mov	x1, #0
	bl	_ERR_error_string
	mov	x4, x0
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	mov	x2, x23
	mov	x3, x20
	bl	_errx
LBB0_9:
	ldr	x23, [x29, #24]
	ldrsw	x24, [sp, #12]
	add	x1, x22, x24, lsl #2
	add	x2, sp, #12
	mov	x0, x19
	bl	_EVP_EncryptFinal_ex
	cmp	w0, #1
	b.eq	LBB0_11
; %bb.10:
	ldr	w22, [x21]
	bl	_ERR_get_error
	mov	x1, #0
	bl	_ERR_error_string
	mov	x4, x0
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	mov	x2, x22
	mov	x3, x20
	bl	_errx
LBB0_11:
	ldrsw	x8, [sp, #12]
	add	x4, x8, x24
	cmp	x4, x20
	b.eq	LBB0_13
; %bb.12:
	ldr	w2, [x21]
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	mov	x3, x20
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_errx
LBB0_13:
Lloh12:
	adrp	x8, _EVP_CTRL_GCM_GET_TAG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EVP_CTRL_GCM_GET_TAG@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _AES_GMAC_HASH_LEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AES_GMAC_HASH_LEN@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x23
	bl	_EVP_CIPHER_CTX_ctrl
	cmp	w0, #1
	b.eq	LBB0_15
; %bb.14:
	ldr	w21, [x21]
	bl	_ERR_get_error
	mov	x1, #0
	bl	_ERR_error_string
	mov	x4, x0
Lloh18:
	adrp	x1, l_.str.6@PAGE
Lloh19:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	mov	x3, x20
	bl	_errx
LBB0_15:
	mov	x0, x19
	bl	_EVP_CIPHER_CTX_free
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OpenSSL %s (%zu) ctx new failed: %s"

l_.str.1:                               ; @.str.1
	.asciz	"OpenSSL %s (%zu) ctx init failed: %s"

l_.str.2:                               ; @.str.2
	.asciz	"OpenSSL %s (%zu) aad update failed: %s"

l_.str.3:                               ; @.str.3
	.asciz	"OpenSSL %s (%zu) encrypt update failed: %s"

l_.str.4:                               ; @.str.4
	.asciz	"OpenSSL %s (%zu) encrypt final failed: %s"

l_.str.5:                               ; @.str.5
	.asciz	"OpenSSL %s (%zu) encrypt size mismatch: %d"

	.comm	_EVP_CTRL_GCM_GET_TAG,4,2       ; @EVP_CTRL_GCM_GET_TAG
	.comm	_AES_GMAC_HASH_LEN,4,2          ; @AES_GMAC_HASH_LEN
l_.str.6:                               ; @.str.6
	.asciz	"OpenSSL %s (%zu) get tag failed: %s"

	.no_dead_strip	_openssl_gcm_encrypt
.subsections_via_symbols
