	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function x509_valid_issuer
_x509_valid_issuer:                     ## @x509_valid_issuer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %ecx
	movq	_X509_EXT_BASIC_CONSTRAINTS@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_3
## %bb.1:
	cmpl	$0, 20(%rdi)
	jne	LBB0_5
## %bb.2:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_8
LBB0_3:
	movq	8(%rdi), %rax
	movq	_X509_CERT_V3@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
LBB0_5:
	movq	_X509_EXT_KEY_USAGE@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%ecx, (%rdx)
	je	LBB0_9
## %bb.6:
	movq	_X509_KEY_USAGE_KEY_CERT_SIGN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 16(%rdi)
	je	LBB0_7
LBB0_9:
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
LBB0_8:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_wpa_printf
	movl	$-1, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_X509_EXT_BASIC_CONSTRAINTS,4,2 ## @X509_EXT_BASIC_CONSTRAINTS
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"X509: Non-CA certificate used as an issuer"

	.comm	_X509_CERT_V3,8,3               ## @X509_CERT_V3
L_.str.1:                               ## @.str.1
	.asciz	"X509: v3 CA certificate did not include BasicConstraints extension"

	.comm	_X509_EXT_KEY_USAGE,4,2         ## @X509_EXT_KEY_USAGE
	.comm	_X509_KEY_USAGE_KEY_CERT_SIGN,4,2 ## @X509_KEY_USAGE_KEY_CERT_SIGN
L_.str.2:                               ## @.str.2
	.asciz	"X509: Issuer certificate did not have keyCertSign bit in Key Usage"

	.no_dead_strip	_x509_valid_issuer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function x509_valid_issuer
_x509_valid_issuer:                     ; @x509_valid_issuer
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _X509_EXT_BASIC_CONSTRAINTS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _X509_EXT_BASIC_CONSTRAINTS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	w9, [x0, #20]
	cbnz	w9, LBB0_5
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_3:
	ldr	x9, [x0, #8]
Lloh5:
	adrp	x10, _X509_CERT_V3@GOTPAGE
Lloh6:
	ldr	x10, [x10, _X509_CERT_V3@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.4:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_5:
Lloh10:
	adrp	x9, _X509_EXT_KEY_USAGE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _X509_EXT_KEY_USAGE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	w8, [x0, #16]
Lloh13:
	adrp	x9, _X509_KEY_USAGE_KEY_CERT_SIGN@GOTPAGE
Lloh14:
	ldr	x9, [x9, _X509_KEY_USAGE_KEY_CERT_SIGN@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
LBB0_7:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
Lloh18:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_wpa_printf
	mov	w0, #-1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_X509_EXT_BASIC_CONSTRAINTS,4,2 ; @X509_EXT_BASIC_CONSTRAINTS
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"X509: Non-CA certificate used as an issuer"

	.comm	_X509_CERT_V3,8,3               ; @X509_CERT_V3
l_.str.1:                               ; @.str.1
	.asciz	"X509: v3 CA certificate did not include BasicConstraints extension"

	.comm	_X509_EXT_KEY_USAGE,4,2         ; @X509_EXT_KEY_USAGE
	.comm	_X509_KEY_USAGE_KEY_CERT_SIGN,4,2 ; @X509_KEY_USAGE_KEY_CERT_SIGN
l_.str.2:                               ; @.str.2
	.asciz	"X509: Issuer certificate did not have keyCertSign bit in Key Usage"

	.no_dead_strip	_x509_valid_issuer
.subsections_via_symbols
