	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_x509_crt_check_key_usage ## -- Begin function mbedtls_x509_crt_check_key_usage
	.p2align	4, 0x90
_mbedtls_x509_crt_check_key_usage:      ## @mbedtls_x509_crt_check_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
	movq	_MBEDTLS_X509_EXT_KEY_USAGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rdi)
	je	LBB0_1
## %bb.2:
	movl	%esi, %eax
	movq	_MBEDTLS_X509_KU_ENCIPHER_ONLY@GOTPCREL(%rip), %rdx
	movq	_MBEDTLS_X509_KU_DECIPHER_ONLY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movl	%ecx, %esi
	notl	%esi
	andl	%eax, %esi
	movl	4(%rdi), %edx
	movl	%edx, %edi
	notl	%edi
	testl	%edi, %esi
	jne	LBB0_4
## %bb.3:
	andl	%ecx, %eax
	andl	%ecx, %edx
	notl	%eax
	andl	%edx, %eax
	je	LBB0_5
LBB0_4:
	movq	_MBEDTLS_ERR_X509_BAD_INPUT_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_X509_KU_ENCIPHER_ONLY,4,2 ## @MBEDTLS_X509_KU_ENCIPHER_ONLY
	.comm	_MBEDTLS_X509_KU_DECIPHER_ONLY,4,2 ## @MBEDTLS_X509_KU_DECIPHER_ONLY
	.comm	_MBEDTLS_X509_EXT_KEY_USAGE,4,2 ## @MBEDTLS_X509_EXT_KEY_USAGE
	.comm	_MBEDTLS_ERR_X509_BAD_INPUT_DATA,4,2 ## @MBEDTLS_ERR_X509_BAD_INPUT_DATA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_x509_crt_check_key_usage ; -- Begin function mbedtls_x509_crt_check_key_usage
	.p2align	2
_mbedtls_x509_crt_check_key_usage:      ; @mbedtls_x509_crt_check_key_usage
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MBEDTLS_X509_EXT_KEY_USAGE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MBEDTLS_X509_EXT_KEY_USAGE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _MBEDTLS_X509_KU_ENCIPHER_ONLY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_X509_KU_ENCIPHER_ONLY@GOTPAGEOFF]
Lloh5:
	adrp	x9, _MBEDTLS_X509_KU_DECIPHER_ONLY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MBEDTLS_X509_KU_DECIPHER_ONLY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w10, w1, w8
	ldr	w9, [x0, #4]
	bics	wzr, w10, w9
	b.ne	LBB0_4
; %bb.2:
	and	w10, w8, w1
	and	w8, w9, w8
	orr	w8, w8, w10
Lloh9:
	adrp	x9, _MBEDTLS_ERR_X509_BAD_INPUT_DATA@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MBEDTLS_ERR_X509_BAD_INPUT_DATA@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w10
	csel	w0, wzr, w9, eq
	ret
LBB0_3:
	mov	w0, #0
	ret
LBB0_4:
Lloh12:
	adrp	x8, _MBEDTLS_ERR_X509_BAD_INPUT_DATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MBEDTLS_ERR_X509_BAD_INPUT_DATA@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_X509_KU_ENCIPHER_ONLY,4,2 ; @MBEDTLS_X509_KU_ENCIPHER_ONLY
	.comm	_MBEDTLS_X509_KU_DECIPHER_ONLY,4,2 ; @MBEDTLS_X509_KU_DECIPHER_ONLY
	.comm	_MBEDTLS_X509_EXT_KEY_USAGE,4,2 ; @MBEDTLS_X509_EXT_KEY_USAGE
	.comm	_MBEDTLS_ERR_X509_BAD_INPUT_DATA,4,2 ; @MBEDTLS_ERR_X509_BAD_INPUT_DATA
.subsections_via_symbols
