	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function x509_get_key_usage
_x509_get_key_usage:                    ## @x509_get_key_usage
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -32(%rbp)
	movaps	%xmm0, -48(%rbp)
	leaq	-48(%rbp), %rdx
	callq	_mbedtls_asn1_get_bitstring
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_MBEDTLS_ERR_X509_INVALID_EXTENSIONS@GOTPCREL(%rip), %rcx
LBB0_9:
	addl	(%rcx), %eax
	jmp	LBB0_10
LBB0_2:
	movl	-48(%rbp), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.3:
	movq	-40(%rbp), %rcx
	decq	%rax
	cmpq	$3, %rax
	movl	$3, %edx
	cmovbq	%rax, %rdx
	movl	(%rcx), %eax
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.4:
	movl	8(%rcx), %esi
	shll	$8, %esi
	orl	%esi, %eax
	cmpq	$1, %rdx
	je	LBB0_7
## %bb.5:
	movl	16(%rcx), %esi
	shll	$16, %esi
	orl	%esi, %eax
	cmpq	$2, %rdx
	je	LBB0_7
## %bb.6:
	movl	24(%rcx), %ecx
	shll	$24, %ecx
	orl	%ecx, %eax
LBB0_7:
	movl	%eax, (%rbx)
	xorl	%eax, %eax
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	movq	_MBEDTLS_ERR_X509_INVALID_EXTENSIONS@GOTPCREL(%rip), %rcx
	movq	_MBEDTLS_ERR_ASN1_INVALID_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ERR_X509_INVALID_EXTENSIONS,4,2 ## @MBEDTLS_ERR_X509_INVALID_EXTENSIONS
	.comm	_MBEDTLS_ERR_ASN1_INVALID_LENGTH,4,2 ## @MBEDTLS_ERR_ASN1_INVALID_LENGTH
	.no_dead_strip	_x509_get_key_usage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function x509_get_key_usage
_x509_get_key_usage:                    ; @x509_get_key_usage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
	mov	x2, sp
	bl	_mbedtls_asn1_get_bitstring
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _MBEDTLS_ERR_X509_INVALID_EXTENSIONS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBEDTLS_ERR_X509_INVALID_EXTENSIONS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w0, w8, w0
	b	LBB0_9
LBB0_2:
	ldr	w8, [sp]
	cmp	w8, #0
	b.le	LBB0_8
; %bb.3:
	ldr	x9, [sp, #8]
	sub	x8, x8, #1
	mov	w10, #3
	cmp	x8, #3
	csel	x10, x8, x10, lo
	ldr	w8, [x9]
	cbz	x10, LBB0_7
; %bb.4:
	ldr	w11, [x9, #8]
	orr	w8, w8, w11, lsl #8
	cmp	x10, #1
	b.eq	LBB0_7
; %bb.5:
	ldr	w11, [x9, #16]
	orr	w8, w8, w11, lsl #16
	cmp	x10, #2
	b.eq	LBB0_7
; %bb.6:
	ldr	w9, [x9, #24]
	orr	w8, w8, w9, lsl #24
LBB0_7:
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_9
LBB0_8:
Lloh3:
	adrp	x8, _MBEDTLS_ERR_X509_INVALID_EXTENSIONS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_ERR_X509_INVALID_EXTENSIONS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _MBEDTLS_ERR_ASN1_INVALID_LENGTH@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MBEDTLS_ERR_ASN1_INVALID_LENGTH@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	w0, w9, w8
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ERR_X509_INVALID_EXTENSIONS,4,2 ; @MBEDTLS_ERR_X509_INVALID_EXTENSIONS
	.comm	_MBEDTLS_ERR_ASN1_INVALID_LENGTH,4,2 ; @MBEDTLS_ERR_ASN1_INVALID_LENGTH
	.no_dead_strip	_x509_get_key_usage
.subsections_via_symbols
