	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_pkcs5_pbes2            ## -- Begin function mbedtls_pkcs5_pbes2
	.p2align	4, 0x90
_mbedtls_pkcs5_pbes2:                   ## @mbedtls_pkcs5_pbes2
	.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	$216, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -132(%rbp)
	movl	$0, -120(%rbp)
	movq	_MBEDTLS_MD_SHA1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -128(%rbp)
	movq	$0, -192(%rbp)
	movq	(%rdi), %r15
	movq	%r15, -160(%rbp)
	movq	_MBEDTLS_ASN1_CONSTRUCTED@GOTPCREL(%rip), %rax
	movq	_MBEDTLS_ASN1_SEQUENCE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	cmpl	%ecx, 12(%rdi)
	jne	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	movl	%esi, %r12d
	movq	%r8, -176(%rbp)                 ## 8-byte Spill
	movq	%r9, -184(%rbp)                 ## 8-byte Spill
	movslq	8(%rdi), %rax
	addq	%rax, %r15
	leaq	-160(%rbp), %rdi
	leaq	-256(%rbp), %rdx
	leaq	-224(%rbp), %rcx
	movq	%r15, %rsi
	callq	_mbedtls_asn1_get_alg
	testl	%eax, %eax
	je	LBB0_4
LBB0_3:
	movl	%eax, %r14d
	movq	_MBEDTLS_ERR_PKCS5_INVALID_FORMAT@GOTPCREL(%rip), %rax
	addl	(%rax), %r14d
	jmp	LBB0_21
LBB0_1:
	movq	_MBEDTLS_ERR_PKCS5_INVALID_FORMAT@GOTPCREL(%rip), %rax
	movq	_MBEDTLS_ERR_ASN1_UNEXPECTED_TAG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	addl	(%rax), %r14d
	jmp	LBB0_21
LBB0_4:
	movq	_MBEDTLS_OID_PKCS5_PBKDF2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-256(%rbp), %rsi
	callq	_MBEDTLS_OID_CMP
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	movq	_MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_21
LBB0_6:
	leaq	-224(%rbp), %rdi
	leaq	-208(%rbp), %rsi
	leaq	-132(%rbp), %rdx
	leaq	-120(%rbp), %rcx
	leaq	-128(%rbp), %r8
	callq	_pkcs5_parse_pbkdf2_params
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_7
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.22:
	movl	%r14d, %eax
	addq	$216, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	-128(%rbp), %edi
	callq	_mbedtls_md_info_from_type
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:
	movq	%rax, -168(%rbp)                ## 8-byte Spill
	leaq	-160(%rbp), %rdi
	leaq	-240(%rbp), %rdx
	leaq	-152(%rbp), %rcx
	movq	%r15, %rsi
	callq	_mbedtls_asn1_get_alg
	testl	%eax, %eax
	jne	LBB0_3
## %bb.9:
	leaq	-240(%rbp), %rdi
	leaq	-136(%rbp), %rsi
	callq	_mbedtls_oid_get_cipher_alg
	testq	%rax, %rax
	jne	LBB0_5
## %bb.10:
	movl	-136(%rbp), %edi
	callq	_mbedtls_cipher_info_from_type
	testq	%rax, %rax
	je	LBB0_5
## %bb.11:
	movq	%rax, %r15
	movl	(%rax), %eax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movl	%ecx, -120(%rbp)
	movslq	-140(%rbp), %rax
	movq	_MBEDTLS_ASN1_OCTET_STRING@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_13
## %bb.12:
	movslq	-144(%rbp), %rax
	cmpq	%rax, 8(%r15)
	jne	LBB0_13
## %bb.14:
	leaq	-124(%rbp), %r14
	movq	%r14, %rdi
	callq	_mbedtls_md_init
	leaq	-116(%rbp), %rdi
	callq	_mbedtls_cipher_init
	movq	-152(%rbp), %rsi
	movslq	-144(%rbp), %rdx
	leaq	-112(%rbp), %rdi
	callq	_memcpy
	movq	%r14, %rdi
	movq	-168(%rbp), %rsi                ## 8-byte Reload
	movl	$1, %edx
	callq	_mbedtls_md_setup
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.15:
	movq	-208(%rbp), %rcx
	movslq	-200(%rbp), %r8
	movl	-132(%rbp), %r9d
	movl	-120(%rbp), %eax
	leaq	-80(%rbp), %r10
	leaq	-124(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	pushq	%r10
	pushq	%rax
	callq	_mbedtls_pkcs5_pbkdf2_hmac
	addq	$16, %rsp
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.16:
	leaq	-116(%rbp), %rdi
	movq	%r15, %rsi
	callq	_mbedtls_cipher_setup
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.17:
	movl	-120(%rbp), %edx
	shll	$3, %edx
	leaq	-116(%rbp), %rdi
	leaq	-80(%rbp), %rsi
	movl	%r12d, %ecx
	callq	_mbedtls_cipher_setkey
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.18:
	movq	16(%rbp), %r9
	movslq	-144(%rbp), %rdx
	subq	$8, %rsp
	leaq	-192(%rbp), %rax
	leaq	-116(%rbp), %rdi
	leaq	-112(%rbp), %rsi
	movq	-176(%rbp), %rcx                ## 8-byte Reload
	movq	-184(%rbp), %r8                 ## 8-byte Reload
	pushq	%rax
	callq	_mbedtls_cipher_crypt
	addq	$16, %rsp
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movq	_MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_20:
	leaq	-124(%rbp), %rdi
	callq	_mbedtls_md_free
	leaq	-116(%rbp), %rdi
	callq	_mbedtls_cipher_free
	jmp	LBB0_21
LBB0_13:
	movq	_MBEDTLS_ERR_PKCS5_INVALID_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_21
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_MD_SHA1,4,2            ## @MBEDTLS_MD_SHA1
	.comm	_MBEDTLS_ASN1_CONSTRUCTED,4,2   ## @MBEDTLS_ASN1_CONSTRUCTED
	.comm	_MBEDTLS_ASN1_SEQUENCE,4,2      ## @MBEDTLS_ASN1_SEQUENCE
	.comm	_MBEDTLS_ERR_PKCS5_INVALID_FORMAT,4,2 ## @MBEDTLS_ERR_PKCS5_INVALID_FORMAT
	.comm	_MBEDTLS_ERR_ASN1_UNEXPECTED_TAG,4,2 ## @MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
	.comm	_MBEDTLS_OID_PKCS5_PBKDF2,4,2   ## @MBEDTLS_OID_PKCS5_PBKDF2
	.comm	_MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE,4,2 ## @MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE
	.comm	_MBEDTLS_ASN1_OCTET_STRING,8,3  ## @MBEDTLS_ASN1_OCTET_STRING
	.comm	_MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH,4,2 ## @MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_pkcs5_pbes2            ; -- Begin function mbedtls_pkcs5_pbes2
	.p2align	2
_mbedtls_pkcs5_pbes2:                   ; @mbedtls_pkcs5_pbes2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #304
	.cfi_def_cfa_offset 304
	stp	x28, x27, [sp, #208]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #224]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #240]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #256]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #272]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #288]            ; 16-byte Folded Spill
	add	x29, sp, #288
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	str	xzr, [sp, #128]
Lloh3:
	adrp	x8, _MBEDTLS_MD_SHA1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_MD_SHA1@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #36]
	str	xzr, [sp, #24]
	ldr	x8, [x0]
	str	x8, [sp, #120]
	ldr	w9, [x0, #12]
Lloh6:
	adrp	x10, _MBEDTLS_ASN1_CONSTRUCTED@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MBEDTLS_ASN1_CONSTRUCTED@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _MBEDTLS_ASN1_SEQUENCE@GOTPAGE
Lloh10:
	ldr	x11, [x11, _MBEDTLS_ASN1_SEQUENCE@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	orr	w10, w11, w10
	cmp	w9, w10
	b.ne	LBB0_3
; %bb.1:
	mov	x19, x6
	mov	x20, x5
	mov	x21, x4
	mov	x23, x3
	mov	x24, x2
	mov	x22, x1
	ldrsw	x9, [x0, #8]
	add	x25, x8, x9
	add	x0, sp, #120
	add	x2, sp, #104
	add	x3, sp, #72
	mov	x1, x25
	bl	_mbedtls_asn1_get_alg
	cbz	w0, LBB0_4
LBB0_2:
Lloh12:
	adrp	x8, _MBEDTLS_ERR_PKCS5_INVALID_FORMAT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MBEDTLS_ERR_PKCS5_INVALID_FORMAT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	add	w26, w8, w0
	b	LBB0_7
LBB0_3:
Lloh15:
	adrp	x8, _MBEDTLS_ERR_PKCS5_INVALID_FORMAT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MBEDTLS_ERR_PKCS5_INVALID_FORMAT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _MBEDTLS_ERR_ASN1_UNEXPECTED_TAG@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MBEDTLS_ERR_ASN1_UNEXPECTED_TAG@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	add	w26, w9, w8
	b	LBB0_7
LBB0_4:
Lloh21:
	adrp	x8, _MBEDTLS_OID_PKCS5_PBKDF2@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MBEDTLS_OID_PKCS5_PBKDF2@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	add	x1, sp, #104
	bl	_MBEDTLS_OID_CMP
	cbz	x0, LBB0_6
LBB0_5:
Lloh24:
	adrp	x8, _MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE@GOTPAGEOFF]
Lloh26:
	ldr	w26, [x8]
	b	LBB0_7
LBB0_6:
	add	x0, sp, #72
	add	x1, sp, #40
	add	x2, sp, #132
	add	x3, sp, #128
	add	x4, sp, #36
	bl	_pkcs5_parse_pbkdf2_params
	mov	x26, x0
	cbz	w0, LBB0_9
LBB0_7:
	ldur	x8, [x29, #-88]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.8:
	mov	x0, x26
	ldp	x29, x30, [sp, #288]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #272]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #256]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #240]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #224]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #208]            ; 16-byte Folded Reload
	add	sp, sp, #304
	ret
LBB0_9:
	ldr	w0, [sp, #36]
	bl	_mbedtls_md_info_from_type
	cbz	x0, LBB0_5
; %bb.10:
	mov	x26, x0
	add	x0, sp, #120
	add	x2, sp, #88
	add	x3, sp, #56
	mov	x1, x25
	bl	_mbedtls_asn1_get_alg
	cbnz	w0, LBB0_2
; %bb.11:
	add	x0, sp, #88
	add	x1, sp, #16
	bl	_mbedtls_oid_get_cipher_alg
	cbnz	x0, LBB0_5
; %bb.12:
	ldr	w0, [sp, #16]
	bl	_mbedtls_cipher_info_from_type
	cbz	x0, LBB0_5
; %bb.13:
	mov	x25, x0
	ldr	w8, [x0]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	str	w8, [sp, #128]
	ldrsw	x8, [sp, #68]
Lloh30:
	adrp	x9, _MBEDTLS_ASN1_OCTET_STRING@GOTPAGE
Lloh31:
	ldr	x9, [x9, _MBEDTLS_ASN1_OCTET_STRING@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.14:
	ldrsw	x8, [sp, #64]
	ldr	x9, [x25, #8]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.15:
	add	x0, sp, #20
	bl	_mbedtls_md_init
	add	x0, sp, #12
	bl	_mbedtls_cipher_init
	ldr	x1, [sp, #56]
	ldrsw	x2, [sp, #64]
	add	x0, sp, #136
	bl	_memcpy
	add	x0, sp, #20
	mov	x1, x26
	mov	w2, #1
	bl	_mbedtls_md_setup
	mov	x26, x0
	cbnz	w0, LBB0_20
; %bb.16:
	ldr	x3, [sp, #40]
	ldrsw	x4, [sp, #48]
	ldp	w6, w5, [sp, #128]
	add	x0, sp, #20
	sub	x7, x29, #120
	mov	x1, x24
	mov	x2, x23
	bl	_mbedtls_pkcs5_pbkdf2_hmac
	mov	x26, x0
	cbnz	w0, LBB0_20
; %bb.17:
	add	x0, sp, #12
	mov	x1, x25
	bl	_mbedtls_cipher_setup
	mov	x26, x0
	cbnz	w0, LBB0_20
; %bb.18:
	ldr	w8, [sp, #128]
	lsl	w2, w8, #3
	add	x0, sp, #12
	sub	x1, x29, #120
	mov	x3, x22
	bl	_mbedtls_cipher_setkey
	mov	x26, x0
	cbnz	w0, LBB0_20
; %bb.19:
	ldrsw	x2, [sp, #64]
	add	x0, sp, #12
	add	x1, sp, #136
	add	x6, sp, #24
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_mbedtls_cipher_crypt
Lloh33:
	adrp	x8, _MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w26, wzr, w8, eq
LBB0_20:
	add	x0, sp, #20
	bl	_mbedtls_md_free
	add	x0, sp, #12
	bl	_mbedtls_cipher_free
	b	LBB0_7
LBB0_21:
Lloh36:
	adrp	x8, _MBEDTLS_ERR_PKCS5_INVALID_FORMAT@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MBEDTLS_ERR_PKCS5_INVALID_FORMAT@GOTPAGEOFF]
Lloh38:
	ldr	w26, [x8]
	b	LBB0_7
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_MD_SHA1,4,2            ; @MBEDTLS_MD_SHA1
	.comm	_MBEDTLS_ASN1_CONSTRUCTED,4,2   ; @MBEDTLS_ASN1_CONSTRUCTED
	.comm	_MBEDTLS_ASN1_SEQUENCE,4,2      ; @MBEDTLS_ASN1_SEQUENCE
	.comm	_MBEDTLS_ERR_PKCS5_INVALID_FORMAT,4,2 ; @MBEDTLS_ERR_PKCS5_INVALID_FORMAT
	.comm	_MBEDTLS_ERR_ASN1_UNEXPECTED_TAG,4,2 ; @MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
	.comm	_MBEDTLS_OID_PKCS5_PBKDF2,4,2   ; @MBEDTLS_OID_PKCS5_PBKDF2
	.comm	_MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE,4,2 ; @MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE
	.comm	_MBEDTLS_ASN1_OCTET_STRING,8,3  ; @MBEDTLS_ASN1_OCTET_STRING
	.comm	_MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH,4,2 ; @MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH
.subsections_via_symbols
