	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_key_usage
_check_key_usage:                       ## @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
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$304, %rsp                      ## imm = 0x130
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	$0, -328(%rbp)
	movq	%rsi, %rdi
	callq	__hx509_cert_get_version
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	$3, %ecx
	jl	LBB0_8
## %bb.1:
	movq	_asn1_oid_id_x509_ce_keyUsage@GOTPCREL(%rip), %rsi
	leaq	-328(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_find_extension
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movl	(%rax), %esi
	movl	4(%rax), %edi
	leaq	-308(%rbp), %rdx
	leaq	-336(%rbp), %rcx
	callq	_decode_KeyUsage
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movl	-308(%rbp), %edi
	callq	_KeyUsage2int
	movl	%eax, %r12d
	notl	%r12d
	movl	$0, %eax
	testl	%r12d, %r15d
	je	LBB0_8
## %bb.6:
	andl	%r15d, %r12d
	xorl	%eax, %eax
	callq	_asn1_KeyUsage_units
	leaq	-304(%rbp), %r15
	movl	%r12d, %edi
	movl	%eax, %esi
	movq	%r15, %rdx
	movl	$256, %ecx                      ## imm = 0x100
	callq	_unparse_flags
	leaq	-320(%rbp), %rsi
	movq	%rbx, %rdi
	callq	__hx509_unparse_Name
	movq	_HX509_KU_CERT_MISSING@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	-320(%rbp), %r9
	leaq	L_.str.1(%rip), %rcx
	movl	%r14d, %edi
	xorl	%esi, %esi
	movq	%r15, %r8
	xorl	%eax, %eax
	callq	_hx509_set_error_string
	movq	-320(%rbp), %rdi
	callq	_free
	jmp	LBB0_7
LBB0_2:
	movl	$0, %eax
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.3:
	movq	_HX509_KU_CERT_MISSING@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rcx
	movl	%r14d, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_hx509_set_error_string
LBB0_7:
	movl	(%rbx), %eax
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	addq	$304, %rsp                      ## imm = 0x130
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_asn1_oid_id_x509_ce_keyUsage,4,2 ## @asn1_oid_id_x509_ce_keyUsage
	.comm	_HX509_KU_CERT_MISSING,4,2      ## @HX509_KU_CERT_MISSING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Required extension key usage missing from certifiate"

L_.str.1:                               ## @.str.1
	.asciz	"Key usage %s required but missing from certifiate %s"

	.no_dead_strip	_check_key_usage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_key_usage
_check_key_usage:                       ; @check_key_usage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #384
	.cfi_def_cfa_offset 384
	stp	x28, x27, [sp, #320]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #336]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #352]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #368]            ; 16-byte Folded Spill
	add	x29, sp, #368
	.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 w27, -56
	.cfi_offset w28, -64
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	str	xzr, [sp, #32]
	mov	x0, x1
	bl	__hx509_cert_get_version
	cmp	w0, #3
	b.ge	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_9
LBB0_2:
Lloh3:
	adrp	x1, _asn1_oid_id_x509_ce_keyUsage@GOTPAGE
Lloh4:
	ldr	x1, [x1, _asn1_oid_id_x509_ce_keyUsage@GOTPAGEOFF]
	add	x2, sp, #32
	mov	x0, x20
	bl	_find_extension
	cbz	x0, LBB0_6
; %bb.3:
	ldp	w1, w8, [x0]
	add	x2, sp, #52
	add	x3, sp, #40
	mov	x0, x8
	bl	_decode_KeyUsage
	cbnz	w0, LBB0_9
; %bb.4:
	ldr	w0, [sp, #52]
	bl	_KeyUsage2int
	bics	wzr, w21, w0
	b.eq	LBB0_1
; %bb.5:
	bic	w21, w21, w0
	bl	_asn1_KeyUsage_units
	mov	x1, x0
	add	x22, sp, #56
	add	x2, sp, #56
	mov	x0, x21
	mov	w3, #256
	bl	_unparse_flags
	add	x1, sp, #24
	mov	x0, x20
	bl	__hx509_unparse_Name
Lloh5:
	adrp	x20, _HX509_KU_CERT_MISSING@GOTPAGE
Lloh6:
	ldr	x20, [x20, _HX509_KU_CERT_MISSING@GOTPAGEOFF]
	ldr	w2, [x20]
	ldr	x8, [sp, #24]
	stp	x22, x8, [sp]
Lloh7:
	adrp	x3, l_.str.1@PAGE
Lloh8:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_hx509_set_error_string
	ldr	x0, [sp, #24]
	bl	_free
	b	LBB0_8
LBB0_6:
	cbz	w22, LBB0_1
; %bb.7:
Lloh9:
	adrp	x20, _HX509_KU_CERT_MISSING@GOTPAGE
Lloh10:
	ldr	x20, [x20, _HX509_KU_CERT_MISSING@GOTPAGEOFF]
	ldr	w2, [x20]
Lloh11:
	adrp	x3, l_.str@PAGE
Lloh12:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_hx509_set_error_string
LBB0_8:
	ldr	w0, [x20]
LBB0_9:
	ldur	x8, [x29, #-56]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #368]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #352]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #336]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #320]            ; 16-byte Folded Reload
	add	sp, sp, #384
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_asn1_oid_id_x509_ce_keyUsage,4,2 ; @asn1_oid_id_x509_ce_keyUsage
	.comm	_HX509_KU_CERT_MISSING,4,2      ; @HX509_KU_CERT_MISSING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Required extension key usage missing from certifiate"

l_.str.1:                               ; @.str.1
	.asciz	"Key usage %s required but missing from certifiate %s"

	.no_dead_strip	_check_key_usage
.subsections_via_symbols
