	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function x509_get_hash_alg
_x509_get_hash_alg:                     ## @x509_get_hash_alg
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MBEDTLS_ASN1_CONSTRUCTED@GOTPCREL(%rip), %rax
	movq	_MBEDTLS_ASN1_SEQUENCE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	cmpl	%ecx, (%rdi)
	jne	LBB0_1
## %bb.2:
	movq	8(%rdi), %rax
	movq	%rax, -32(%rbp)
	movq	16(%rdi), %r14
	testq	%r14, %r14
	jle	LBB0_3
## %bb.4:
	movq	%rsi, %r15
	addq	%rax, %r14
	movzbl	(%rax), %eax
	movl	%eax, -64(%rbp)
	leaq	-48(%rbp), %rdx
	movq	_MBEDTLS_ASN1_OID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-32(%rbp), %rdi
	movq	%r14, %rsi
	callq	_mbedtls_asn1_get_tag
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:
	movq	-32(%rbp), %rax
	movq	%rax, -56(%rbp)
	addq	-48(%rbp), %rax
	movq	%rax, -32(%rbp)
	leaq	-64(%rbp), %rdi
	movq	%r15, %rsi
	callq	_mbedtls_oid_get_md_alg
	testl	%eax, %eax
	je	LBB0_7
LBB0_5:
	movl	%eax, %ebx
	movq	_MBEDTLS_ERR_X509_INVALID_ALG@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_1:
	movq	_MBEDTLS_ERR_X509_INVALID_ALG@GOTPCREL(%rip), %rax
	movq	_MBEDTLS_ERR_ASN1_UNEXPECTED_TAG@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_3:
	movq	_MBEDTLS_ERR_X509_INVALID_ALG@GOTPCREL(%rip), %rax
	movq	_MBEDTLS_ERR_ASN1_OUT_OF_DATA@GOTPCREL(%rip), %rcx
LBB0_13:
	movl	(%rcx), %ebx
LBB0_14:
	addl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%ebx, %ebx
	cmpq	%r14, -32(%rbp)
	je	LBB0_15
## %bb.8:
	movq	_MBEDTLS_ASN1_NULL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-32(%rbp), %rdi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rsi
	callq	_mbedtls_asn1_get_tag
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	cmpq	$0, -40(%rbp)
	jne	LBB0_10
## %bb.11:
	cmpq	%r14, -32(%rbp)
	je	LBB0_15
## %bb.12:
	movq	_MBEDTLS_ERR_X509_INVALID_ALG@GOTPCREL(%rip), %rax
	movq	_MBEDTLS_ERR_ASN1_LENGTH_MISMATCH@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_10:
	movq	_MBEDTLS_ERR_X509_INVALID_ALG@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movl	%eax, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ASN1_CONSTRUCTED,4,2   ## @MBEDTLS_ASN1_CONSTRUCTED
	.comm	_MBEDTLS_ASN1_SEQUENCE,4,2      ## @MBEDTLS_ASN1_SEQUENCE
	.comm	_MBEDTLS_ERR_X509_INVALID_ALG,4,2 ## @MBEDTLS_ERR_X509_INVALID_ALG
	.comm	_MBEDTLS_ERR_ASN1_UNEXPECTED_TAG,4,2 ## @MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
	.comm	_MBEDTLS_ERR_ASN1_OUT_OF_DATA,4,2 ## @MBEDTLS_ERR_ASN1_OUT_OF_DATA
	.comm	_MBEDTLS_ASN1_OID,4,2           ## @MBEDTLS_ASN1_OID
	.comm	_MBEDTLS_ASN1_NULL,4,2          ## @MBEDTLS_ASN1_NULL
	.comm	_MBEDTLS_ERR_ASN1_LENGTH_MISMATCH,4,2 ## @MBEDTLS_ERR_ASN1_LENGTH_MISMATCH
	.no_dead_strip	_x509_get_hash_alg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function x509_get_hash_alg
_x509_get_hash_alg:                     ; @x509_get_hash_alg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MBEDTLS_ASN1_CONSTRUCTED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MBEDTLS_ASN1_CONSTRUCTED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _MBEDTLS_ASN1_SEQUENCE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MBEDTLS_ASN1_SEQUENCE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.1:
	ldp	x8, x9, [x0, #8]
	stur	x8, [x29, #-24]
	cmp	x9, #0
	b.le	LBB0_6
; %bb.2:
	mov	x20, x1
	add	x19, x8, x9
	ldrb	w8, [x8]
	str	w8, [sp, #16]
	add	x8, sp, #16
	add	x2, x8, #16
Lloh6:
	adrp	x8, _MBEDTLS_ASN1_OID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MBEDTLS_ASN1_OID@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	sub	x0, x29, #24
	mov	x1, x19
	bl	_mbedtls_asn1_get_tag
	cbnz	w0, LBB0_4
; %bb.3:
	ldur	x8, [x29, #-24]
	str	x8, [sp, #24]
	ldr	x9, [sp, #32]
	add	x8, x8, x9
	stur	x8, [x29, #-24]
	add	x0, sp, #16
	mov	x1, x20
	bl	_mbedtls_oid_get_md_alg
	cbz	w0, LBB0_9
LBB0_4:
Lloh9:
	adrp	x8, _MBEDTLS_ERR_X509_INVALID_ALG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MBEDTLS_ERR_X509_INVALID_ALG@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	add	w0, w8, w0
	b	LBB0_8
LBB0_5:
Lloh12:
	adrp	x8, _MBEDTLS_ERR_X509_INVALID_ALG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MBEDTLS_ERR_X509_INVALID_ALG@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _MBEDTLS_ERR_ASN1_UNEXPECTED_TAG@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MBEDTLS_ERR_ASN1_UNEXPECTED_TAG@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh17:
	adrp	x8, _MBEDTLS_ERR_X509_INVALID_ALG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MBEDTLS_ERR_X509_INVALID_ALG@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _MBEDTLS_ERR_ASN1_OUT_OF_DATA@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MBEDTLS_ERR_ASN1_OUT_OF_DATA@GOTPAGEOFF]
LBB0_7:
	ldr	w9, [x9]
	add	w0, w9, w8
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	ldur	x8, [x29, #-24]
	cmp	x8, x19
	b.eq	LBB0_13
; %bb.10:
Lloh22:
	adrp	x8, _MBEDTLS_ASN1_NULL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MBEDTLS_ASN1_NULL@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
	sub	x0, x29, #24
	add	x2, sp, #8
	mov	x1, x19
	bl	_mbedtls_asn1_get_tag
	ldr	x8, [sp, #8]
	cmp	w0, #0
	ccmp	x8, #0, #0, eq
	b.ne	LBB0_4
; %bb.11:
	ldur	x8, [x29, #-24]
	cmp	x8, x19
	b.eq	LBB0_13
; %bb.12:
Lloh25:
	adrp	x8, _MBEDTLS_ERR_X509_INVALID_ALG@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MBEDTLS_ERR_X509_INVALID_ALG@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _MBEDTLS_ERR_ASN1_LENGTH_MISMATCH@GOTPAGE
Lloh29:
	ldr	x9, [x9, _MBEDTLS_ERR_ASN1_LENGTH_MISMATCH@GOTPAGEOFF]
	b	LBB0_7
LBB0_13:
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ASN1_CONSTRUCTED,4,2   ; @MBEDTLS_ASN1_CONSTRUCTED
	.comm	_MBEDTLS_ASN1_SEQUENCE,4,2      ; @MBEDTLS_ASN1_SEQUENCE
	.comm	_MBEDTLS_ERR_X509_INVALID_ALG,4,2 ; @MBEDTLS_ERR_X509_INVALID_ALG
	.comm	_MBEDTLS_ERR_ASN1_UNEXPECTED_TAG,4,2 ; @MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
	.comm	_MBEDTLS_ERR_ASN1_OUT_OF_DATA,4,2 ; @MBEDTLS_ERR_ASN1_OUT_OF_DATA
	.comm	_MBEDTLS_ASN1_OID,4,2           ; @MBEDTLS_ASN1_OID
	.comm	_MBEDTLS_ASN1_NULL,4,2          ; @MBEDTLS_ASN1_NULL
	.comm	_MBEDTLS_ERR_ASN1_LENGTH_MISMATCH,4,2 ; @MBEDTLS_ERR_ASN1_LENGTH_MISMATCH
	.no_dead_strip	_x509_get_hash_alg
.subsections_via_symbols
