	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_to_req
_add_to_req:                            ## @add_to_req
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	%edi, %r13d
	movq	$0, -48(%rbp)
	movq	%rdx, %rdi
	callq	__hx509_get_cert
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	8(%rax), %rdi
	movl	(%rax), %esi
	shll	$4, %esi
	addl	$16, %esi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movslq	(%rcx), %r12
	shlq	$4, %r12
	leaq	(%rax,%r12), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	movl	$16, %edx
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	callq	_memset
	leaq	-112(%rbp), %r15
	movq	%r15, %rdi
	callq	__hx509_query_clear
	movq	_HX509_QUERY_FIND_ISSUER_CERT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -104(%rbp)
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -112(%rbp)
	movl	24(%rbx), %esi
	leaq	-48(%rbp), %rcx
	movl	%r13d, %edi
	movq	%r15, %rdx
	callq	_hx509_certs_find
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_3
LBB0_12:
	movq	-48(%rbp), %rdi
	callq	_hx509_cert_free
LBB0_13:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_free_OCSPInnerRequest
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	%r15d, %ebx
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movq	16(%rbx), %rdi
	movq	-48(%rbp), %rsi
	testq	%rdi, %rdi
	movq	%rbx, %r14
	je	LBB0_6
## %bb.4:
	callq	_hx509_cert_cmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_HX509_REVOKE_NOT_SAME_PARENT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	L_.str(%rip), %rcx
	xorl	%ebx, %ebx
	movl	%r13d, %edi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_hx509_set_error_string
	movq	-48(%rbp), %rdi
	callq	_hx509_cert_free
	testl	%r15d, %r15d
	jne	LBB0_13
	jmp	LBB0_14
LBB0_6:
	movq	%rsi, %rdi
	callq	_hx509_cert_ref
	movq	%rax, 16(%r14)
LBB0_7:
	movq	-48(%rbp), %rdi
	callq	__hx509_get_cert
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	8(%r14), %edi
	movq	%r15, %rbx
	leaq	(%r15,%r12), %rsi
	addq	$8, %rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	callq	_copy_AlgorithmIdentifier
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	addq	$12, %rcx
	leaq	(%rbx,%r12), %r9
	addq	$12, %r9
	movl	%r13d, %edi
	xorl	%esi, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	callq	__hx509_create_signature
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	8(%rcx), %eax
	movl	%eax, -76(%rbp)
	movl	4(%rcx), %eax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movl	%ecx, -80(%rbp)
	leaq	(%rbx,%r12), %r9
	addq	$4, %r9
	leaq	-80(%rbp), %rcx
	movl	%r13d, %edi
	xorl	%esi, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	callq	__hx509_create_signature
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_copy_CertificateSerialNumber
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	(%r14), %rax
	incl	(%rax)
	movq	-48(%rbp), %rdi
	callq	_hx509_cert_free
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HX509_QUERY_FIND_ISSUER_CERT,4,2 ## @HX509_QUERY_FIND_ISSUER_CERT
	.comm	_HX509_REVOKE_NOT_SAME_PARENT,4,2 ## @HX509_REVOKE_NOT_SAME_PARENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not same parent certifate as last certificate in request"

	.no_dead_strip	_add_to_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_to_req
_add_to_req:                            ; @add_to_req
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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 w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x21, x0
	str	xzr, [sp, #24]
	mov	x0, x2
	bl	__hx509_get_cert
	mov	x22, x0
	ldr	x8, [x20]
	ldr	x0, [x8, #8]
	ldr	w8, [x8]
	lsl	w8, w8, #4
	add	w1, w8, #16
	bl	_realloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x23, x0
	ldr	x8, [x20]
	str	x0, [x8, #8]
	ldrsw	x27, [x8]
	add	x19, x0, x27, lsl #4
	mov	x0, x19
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	x0, sp
	bl	__hx509_query_clear
Lloh0:
	adrp	x8, _HX509_QUERY_FIND_ISSUER_CERT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HX509_QUERY_FIND_ISSUER_CERT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	orr	w8, w9, w8
	str	w8, [sp, #8]
	str	x22, [sp]
	ldr	w1, [x20, #24]
	mov	x2, sp
	add	x3, sp, #24
	mov	x0, x21
	bl	_hx509_certs_find
	mov	x24, x0
	cbz	w0, LBB0_6
LBB0_2:
	ldr	x0, [sp, #24]
	bl	_hx509_cert_free
LBB0_3:
	mov	x0, x19
	bl	_free_OCSPInnerRequest
	mov	x0, x19
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	b	LBB0_5
LBB0_4:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
LBB0_5:
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_6:
	ldr	x0, [x20, #16]
	ldr	x1, [sp, #24]
	cbz	x0, LBB0_9
; %bb.7:
	bl	_hx509_cert_cmp
	cbz	x0, LBB0_10
; %bb.8:
Lloh6:
	adrp	x8, _HX509_REVOKE_NOT_SAME_PARENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HX509_REVOKE_NOT_SAME_PARENT@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
Lloh9:
	adrp	x3, l_.str@PAGE
Lloh10:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x21
	mov	w1, #0
	mov	x2, x24
	bl	_hx509_set_error_string
	ldr	x0, [sp, #24]
	bl	_hx509_cert_free
	cbnz	w24, LBB0_3
	b	LBB0_5
LBB0_9:
	mov	x0, x1
	bl	_hx509_cert_ref
	str	x0, [x20, #16]
LBB0_10:
	ldr	x0, [sp, #24]
	bl	__hx509_get_cert
	mov	x26, x0
	ldr	w0, [x20, #8]
	add	x28, x23, x27, lsl #4
	add	x25, x28, #8
	mov	x1, x25
	bl	_copy_AlgorithmIdentifier
	mov	x24, x0
	cbnz	w0, LBB0_2
; %bb.11:
	add	x3, x22, #12
	add	x5, x28, #12
	mov	x0, x21
	mov	x1, #0
	mov	x2, x25
	mov	x4, #0
	bl	__hx509_create_signature
	mov	x24, x0
	cbnz	w0, LBB0_2
; %bb.12:
	ldr	w8, [x26, #8]
	str	w8, [sp, #20]
	ldr	w8, [x26, #4]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	str	w8, [sp, #16]
	add	x8, x23, x27, lsl #4
	add	x5, x8, #4
	add	x3, sp, #16
	mov	x0, x21
	mov	x1, #0
	mov	x2, x25
	mov	x4, #0
	bl	__hx509_create_signature
	mov	x24, x0
	cbnz	w0, LBB0_2
; %bb.13:
	mov	x0, x22
	mov	x1, x19
	bl	_copy_CertificateSerialNumber
	mov	x24, x0
	cbnz	w0, LBB0_2
; %bb.14:
	ldr	x8, [x20]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldr	x0, [sp, #24]
	bl	_hx509_cert_free
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HX509_QUERY_FIND_ISSUER_CERT,4,2 ; @HX509_QUERY_FIND_ISSUER_CERT
	.comm	_HX509_REVOKE_NOT_SAME_PARENT,4,2 ; @HX509_REVOKE_NOT_SAME_PARENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not same parent certifate as last certificate in request"

	.no_dead_strip	_add_to_req
.subsections_via_symbols
