	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_X509_STORE_CTX_purpose_inherit ## -- Begin function X509_STORE_CTX_purpose_inherit
	.p2align	4, 0x90
_X509_STORE_CTX_purpose_inherit:        ## @X509_STORE_CTX_purpose_inherit
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movq	%rdi, %r14
	testl	%edx, %edx
	cmovel	%esi, %ebx
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.1:
	movl	%esi, %r12d
	movl	%ebx, %edi
	callq	_X509_PURPOSE_get_by_id
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.3:
	movl	%eax, %edi
	callq	_X509_PURPOSE_get0
	movl	(%rax), %ecx
	movq	_X509_TRUST_DEFAULT@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_6
## %bb.4:
	movl	%r12d, %edi
	callq	_X509_PURPOSE_get_by_id
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.5:
	movl	%eax, %edi
	callq	_X509_PURPOSE_get0
LBB0_6:
	testl	%r15d, %r15d
	jne	LBB0_16
## %bb.7:
	movl	(%rax), %r15d
LBB0_8:
	testl	%r15d, %r15d
	je	LBB0_9
LBB0_16:
	movl	%r15d, %edi
	callq	_X509_TRUST_get_by_id
	xorl	%r12d, %r12d
	movl	$0, %ecx
	cmpl	$-1, %eax
	jne	LBB0_10
## %bb.17:
	movq	_X509_F_X509_STORE_CTX_PURPOSE_INHERIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_X509_R_UNKNOWN_TRUST_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_X509err
	jmp	LBB0_18
LBB0_2:
	movq	_X509_F_X509_STORE_CTX_PURPOSE_INHERIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_X509_R_UNKNOWN_PURPOSE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_X509err
	xorl	%r12d, %r12d
	jmp	LBB0_18
LBB0_9:
	xorl	%r15d, %r15d
	movb	$1, %cl
LBB0_10:
	testl	%ebx, %ebx
	je	LBB0_13
## %bb.11:
	movq	(%r14), %rax
	cmpl	$0, (%rax)
	jne	LBB0_13
## %bb.12:
	movl	%ebx, (%rax)
LBB0_13:
	movl	$1, %r12d
	testb	%cl, %cl
	jne	LBB0_18
## %bb.14:
	movq	(%r14), %rax
	cmpl	$0, 4(%rax)
	jne	LBB0_18
## %bb.15:
	movl	%r15d, 4(%rax)
LBB0_18:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_X509_F_X509_STORE_CTX_PURPOSE_INHERIT,4,2 ## @X509_F_X509_STORE_CTX_PURPOSE_INHERIT
	.comm	_X509_R_UNKNOWN_PURPOSE_ID,4,2  ## @X509_R_UNKNOWN_PURPOSE_ID
	.comm	_X509_TRUST_DEFAULT,4,2         ## @X509_TRUST_DEFAULT
	.comm	_X509_R_UNKNOWN_TRUST_ID,4,2    ## @X509_R_UNKNOWN_TRUST_ID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_X509_STORE_CTX_purpose_inherit ; -- Begin function X509_STORE_CTX_purpose_inherit
	.p2align	2
_X509_STORE_CTX_purpose_inherit:        ; @X509_STORE_CTX_purpose_inherit
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x3
	mov	x20, x0
	cmp	w2, #0
	csel	w21, w1, w2, eq
	cbz	w21, LBB0_7
; %bb.1:
	mov	x22, x1
	mov	x0, x21
	bl	_X509_PURPOSE_get_by_id
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.2:
	bl	_X509_PURPOSE_get0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _X509_TRUST_DEFAULT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _X509_TRUST_DEFAULT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x22
	bl	_X509_PURPOSE_get_by_id
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.4:
	bl	_X509_PURPOSE_get0
LBB0_5:
	cbnz	w19, LBB0_8
; %bb.6:
	ldr	w19, [x0]
LBB0_7:
	cbz	w19, LBB0_13
LBB0_8:
	mov	x0, x19
	bl	_X509_TRUST_get_by_id
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.9:
	mov	w8, #0
	cbnz	w21, LBB0_14
	b	LBB0_15
LBB0_10:
Lloh3:
	adrp	x8, _X509_F_X509_STORE_CTX_PURPOSE_INHERIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _X509_F_X509_STORE_CTX_PURPOSE_INHERIT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _X509_R_UNKNOWN_PURPOSE_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _X509_R_UNKNOWN_PURPOSE_ID@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh8:
	adrp	x8, _X509_F_X509_STORE_CTX_PURPOSE_INHERIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _X509_F_X509_STORE_CTX_PURPOSE_INHERIT@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _X509_R_UNKNOWN_TRUST_ID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _X509_R_UNKNOWN_TRUST_ID@GOTPAGEOFF]
LBB0_12:
	ldr	w1, [x8]
	bl	_X509err
	mov	w0, #0
	b	LBB0_20
LBB0_13:
	mov	w8, #1
	cbz	w21, LBB0_15
LBB0_14:
	ldr	x9, [x20]
	ldr	w10, [x9]
	cbz	w10, LBB0_18
LBB0_15:
	tbnz	w8, #0, LBB0_19
LBB0_16:
	ldr	x8, [x20]
	ldr	w9, [x8, #4]
	cbnz	w9, LBB0_19
; %bb.17:
	str	w19, [x8, #4]
	b	LBB0_19
LBB0_18:
	str	w21, [x9]
	tbz	w8, #0, LBB0_16
LBB0_19:
	mov	w0, #1
LBB0_20:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_X509_F_X509_STORE_CTX_PURPOSE_INHERIT,4,2 ; @X509_F_X509_STORE_CTX_PURPOSE_INHERIT
	.comm	_X509_R_UNKNOWN_PURPOSE_ID,4,2  ; @X509_R_UNKNOWN_PURPOSE_ID
	.comm	_X509_TRUST_DEFAULT,4,2         ; @X509_TRUST_DEFAULT
	.comm	_X509_R_UNKNOWN_TRUST_ID,4,2    ; @X509_R_UNKNOWN_TRUST_ID
.subsections_via_symbols
