	.file	"extr_v3_purp.c_X509_check_issued.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	X509_check_issued
	.type	X509_check_issued, @function
X509_check_issued:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	mov	rdi, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	X509_get_issuer_name@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	X509_get_subject_name@PLT
	mov	esi, r12d
	mov	edi, eax
	call	X509_NAME_cmp@PLT
	test	rax, rax
	je	.L2
	mov	eax, DWORD PTR X509_V_ERR_SUBJECT_ISSUER_MISMATCH[rip]
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L26
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	call	x509v3_cache_extensions@PLT
	mov	rdi, rbx
	call	x509v3_cache_extensions@PLT
	mov	rsi, QWORD PTR 8[rbx]
	test	rsi, rsi
	je	.L7
	mov	rdi, rbp
	call	X509_check_akid@PLT
	cmp	DWORD PTR X509_V_OK[rip], eax
	jne	.L1
.L7:
	mov	rdi, rbp
	call	X509_get0_pubkey@PLT
	mov	r12, rax
	mov	eax, DWORD PTR NID_undef[rip]
	mov	DWORD PTR [rsp], eax
	mov	DWORD PTR 4[rsp], eax
	mov	eax, DWORD PTR X509_V_ERR_NO_ISSUER_PUBLIC_KEY[rip]
	test	r12, r12
	je	.L1
	mov	edi, DWORD PTR 4[rbx]
	call	OBJ_obj2nid@PLT
	mov	rdx, rsp
	lea	rsi, 4[rsp]
	mov	edi, eax
	call	OBJ_find_sigid_algs@PLT
	test	eax, eax
	jne	.L9
.L10:
	mov	eax, DWORD PTR X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, DWORD PTR [rsp]
	call	EVP_PKEY_type@PLT
	mov	rdi, r12
	mov	r13, rax
	call	EVP_PKEY_base_id@PLT
	cmp	r13, rax
	jne	.L10
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR EXFLAG_PROXY[rip], eax
	je	.L23
	mov	esi, DWORD PTR KU_DIGITAL_SIGNATURE[rip]
	mov	rdi, rbp
	call	ku_reject@PLT
	test	rax, rax
	je	.L13
	mov	eax, DWORD PTR X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	mov	esi, DWORD PTR KU_KEY_CERT_SIGN[rip]
	mov	rdi, rbp
	call	ku_reject@PLT
	test	rax, rax
	jne	.L27
.L13:
	mov	eax, DWORD PTR X509_V_OK[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L27:
	mov	eax, DWORD PTR X509_V_ERR_KEYUSAGE_NO_CERTSIGN[rip]
	jmp	.L1
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	X509_check_issued, .-X509_check_issued
	.comm	X509_V_OK,4,4
	.comm	X509_V_ERR_SUBJECT_ISSUER_MISMATCH,4,4
	.comm	X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH,4,4
	.comm	X509_V_ERR_NO_ISSUER_PUBLIC_KEY,4,4
	.comm	X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE,4,4
	.comm	X509_V_ERR_KEYUSAGE_NO_CERTSIGN,4,4
	.comm	NID_undef,4,4
	.comm	KU_KEY_CERT_SIGN,4,4
	.comm	KU_DIGITAL_SIGNATURE,4,4
	.comm	EXFLAG_PROXY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_v3_purp.c_X509_check_issued.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	X509_check_issued
	.syntax unified
	.arm
	.fpu softvfp
	.type	X509_check_issued, %function
X509_check_issued:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L28
	sub	sp, sp, #16
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r5, r0
	bl	X509_get_subject_name
	mov	r6, r0
	mov	r0, r4
	bl	X509_get_issuer_name
	mov	r1, r0
	mov	r0, r6
	bl	X509_NAME_cmp
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L28+4
	ldr	r0, [r3]
.L1:
	ldr	r3, .L28
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, r5
	bl	x509v3_cache_extensions
	mov	r0, r4
	bl	x509v3_cache_extensions
	ldr	r1, [r4, #8]
	cmp	r1, #0
	beq	.L7
	mov	r0, r5
	bl	X509_check_akid
	ldr	r3, .L28+8
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L1
.L7:
	mov	r0, r5
	bl	X509_get0_pubkey
	ldr	r3, .L28+12
	subs	r6, r0, #0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	str	r3, [sp, #8]
	beq	.L26
	ldr	r0, [r4, #4]
	bl	OBJ_obj2nid
	add	r2, sp, #4
	add	r1, sp, #8
	bl	OBJ_find_sigid_algs
	cmp	r0, #0
	bne	.L9
.L10:
	ldr	r3, .L28+16
	ldr	r0, [r3]
	b	.L1
.L9:
	ldr	r0, [sp, #4]
	bl	EVP_PKEY_type
	mov	r3, r0
	mov	r0, r6
	mov	r6, r3
	bl	EVP_PKEY_base_id
	cmp	r6, r0
	bne	.L10
	ldr	r3, .L28+20
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L22
	ldr	r3, .L28+24
	mov	r0, r5
	ldr	r1, [r3]
	bl	ku_reject
	cmp	r0, #0
	beq	.L13
	ldr	r3, .L28+28
	ldr	r0, [r3]
	b	.L1
.L26:
	ldr	r3, .L28+32
	ldr	r0, [r3]
	b	.L1
.L22:
	ldr	r3, .L28+36
	mov	r0, r5
	ldr	r1, [r3]
	bl	ku_reject
	cmp	r0, #0
	bne	.L27
.L13:
	ldr	r3, .L28+8
	ldr	r0, [r3]
	b	.L1
.L27:
	ldr	r3, .L28+40
	ldr	r0, [r3]
	b	.L1
.L25:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	.LC0
	.word	X509_V_ERR_SUBJECT_ISSUER_MISMATCH
	.word	X509_V_OK
	.word	NID_undef
	.word	X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH
	.word	EXFLAG_PROXY
	.word	KU_DIGITAL_SIGNATURE
	.word	X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE
	.word	X509_V_ERR_NO_ISSUER_PUBLIC_KEY
	.word	KU_KEY_CERT_SIGN
	.word	X509_V_ERR_KEYUSAGE_NO_CERTSIGN
	.size	X509_check_issued, .-X509_check_issued
	.comm	X509_V_OK,4,4
	.comm	X509_V_ERR_SUBJECT_ISSUER_MISMATCH,4,4
	.comm	X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH,4,4
	.comm	X509_V_ERR_NO_ISSUER_PUBLIC_KEY,4,4
	.comm	X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE,4,4
	.comm	X509_V_ERR_KEYUSAGE_NO_CERTSIGN,4,4
	.comm	NID_undef,4,4
	.comm	KU_KEY_CERT_SIGN,4,4
	.comm	KU_DIGITAL_SIGNATURE,4,4
	.comm	EXFLAG_PROXY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
