	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hx509_ocsp_verify              ## -- Begin function hx509_ocsp_verify
	.p2align	4, 0x90
_hx509_ocsp_verify:                     ## @hx509_ocsp_verify
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, %r14
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r13
	movl	%edx, %edi
	callq	__hx509_get_cert
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	testq	%r12, %r12
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	callq	_time
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_2:
	movq	16(%rbp), %rax
	movq	$0, (%rax)
	leaq	-72(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_parse_ocsp_basic
	testl	%eax, %eax
	je	LBB0_3
## %bb.20:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rcx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_set_error_string
	jmp	LBB0_19
LBB0_3:
	movl	%r15d, -76(%rbp)                ## 4-byte Spill
	cmpq	$0, -72(%rbp)
	movq	%r13, %r12
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_14
## %bb.4:
	movq	%r13, %r14
	addq	$4, %r14
	movl	$28, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	addq	$32, %rbx
	cmpq	-72(%rbp), %r15
	jae	LBB0_14
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rdi
	addq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_der_heim_integer_cmp
	testl	%eax, %eax
	jne	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rax
	leaq	(%rax,%rbx), %rdx
	addq	$-4, %rdx
	leaq	(%rax,%rbx), %r8
	addq	$-8, %r8
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%r13, %rcx
	callq	__hx509_verify_signature
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rax
	movl	-12(%rax,%rbx), %ecx
	andl	$-2, %ecx
	cmpl	$128, %ecx
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rcx
	addq	-56(%rbp), %rcx                 ## 8-byte Folded Reload
	cmpq	%rcx, -28(%rax,%rbx)
	jg	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-20(%rax,%rbx), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rax), %rax
	cmpq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	jl	LBB0_13
	jmp	LBB0_12
LBB0_14:
	leaq	-72(%rbp), %rdi
	callq	_free_OCSPBasicOCSPResponse
	leaq	-44(%rbp), %rsi
	movl	-76(%rbp), %edi                 ## 4-byte Reload
	callq	_hx509_cert_get_subject
	testl	%eax, %eax
	jne	LBB0_15
## %bb.16:
	movl	-44(%rbp), %edi
	leaq	-88(%rbp), %rsi
	callq	_hx509_name_to_string
	movl	%eax, %ebx
	leaq	-44(%rbp), %rdi
	callq	_hx509_name_free
	testl	%ebx, %ebx
	je	LBB0_17
LBB0_15:
	movq	%r12, %rdi
	callq	_hx509_clear_error_string
LBB0_18:
	movq	_HX509_CERT_NOT_IN_OCSP@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_HX509_CERT_NOT_IN_OCSP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-88(%rbp), %r8
	leaq	L_.str.1(%rip), %rcx
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_hx509_set_error_string
	movq	-88(%rbp), %rdi
	callq	_free
	jmp	LBB0_18
LBB0_10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_12:
	movq	16(%rbp), %rcx
	movq	%rax, (%rcx)
	leaq	-72(%rbp), %rdi
	callq	_free_OCSPBasicOCSPResponse
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to parse OCSP response"

	.comm	_HX509_CERT_NOT_IN_OCSP,4,2     ## @HX509_CERT_NOT_IN_OCSP
L_.str.1:                               ## @.str.1
	.asciz	"Certificate %s not in OCSP response or not good"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hx509_ocsp_verify              ; -- Begin function hx509_ocsp_verify
	.p2align	2
_hx509_ocsp_verify:                     ; @hx509_ocsp_verify
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x20, x6
	mov	x24, x5
	mov	x25, x4
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	mov	x0, x2
	bl	__hx509_get_cert
	mov	x23, x0
	cbnz	x22, LBB0_2
; %bb.1:
	mov	x0, #0
	bl	_time
	mov	x22, x0
LBB0_2:
	str	xzr, [x20]
	add	x2, sp, #32
	mov	x0, x25
	mov	x1, x24
	bl	_parse_ocsp_basic
	cbz	w0, LBB0_4
; %bb.3:
	mov	x24, x0
Lloh0:
	adrp	x3, l_.str@PAGE
Lloh1:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	mov	x2, x24
	bl	_hx509_set_error_string
	b	LBB0_19
LBB0_4:
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_15
; %bb.5:
	mov	x25, #0
	mov	x26, #0
	add	x24, x23, #4
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x26, x26, #1
	ldr	x8, [sp, #32]
	add	x25, x25, #32
	cmp	x26, x8
	b.hs	LBB0_15
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #40]
	add	x8, x8, x25
	add	x0, x8, #28
	mov	x1, x24
	bl	_der_heim_integer_cmp
	cbnz	w0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [sp, #40]
	add	x8, x8, x25
	add	x2, x8, #24
	add	x4, x8, #20
	mov	x0, x19
	mov	x1, #0
	mov	x3, x23
	bl	__hx509_verify_signature
	cbnz	w0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [sp, #40]
	add	x9, x8, x25
	ldr	w9, [x9, #16]
	and	w9, w9, #0xfffffffe
	cmp	w9, #128
	b.eq	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x8, x25]
	ldr	x10, [x19]
	add	x10, x10, x22
	cmp	x9, x10
	b.gt	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x8, x25
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x8]
	cmp	x8, x22
	b.lt	LBB0_6
; %bb.13:
	mov	x22, x8
LBB0_14:
	str	x22, [x20]
	add	x0, sp, #32
	bl	_free_OCSPBasicOCSPResponse
	mov	w24, #0
	b	LBB0_19
LBB0_15:
	add	x0, sp, #32
	bl	_free_OCSPBasicOCSPResponse
	add	x1, sp, #28
	mov	x0, x21
	bl	_hx509_cert_get_subject
Lloh2:
	adrp	x21, _HX509_CERT_NOT_IN_OCSP@GOTPAGE
Lloh3:
	ldr	x21, [x21, _HX509_CERT_NOT_IN_OCSP@GOTPAGEOFF]
	cbnz	w0, LBB0_17
; %bb.16:
	ldr	w0, [sp, #28]
	add	x1, sp, #16
	bl	_hx509_name_to_string
	mov	x20, x0
	add	x0, sp, #28
	bl	_hx509_name_free
	cbz	w20, LBB0_20
LBB0_17:
	mov	x0, x19
	bl	_hx509_clear_error_string
LBB0_18:
	ldr	w24, [x21]
LBB0_19:
	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
	add	sp, sp, #128
	ret
LBB0_20:
	ldr	w2, [x21]
	ldr	x8, [sp, #16]
	str	x8, [sp]
Lloh4:
	adrp	x3, l_.str.1@PAGE
Lloh5:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_hx509_set_error_string
	ldr	x0, [sp, #16]
	bl	_free
	b	LBB0_18
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to parse OCSP response"

	.comm	_HX509_CERT_NOT_IN_OCSP,4,2     ; @HX509_CERT_NOT_IN_OCSP
l_.str.1:                               ; @.str.1
	.asciz	"Certificate %s not in OCSP response or not good"

.subsections_via_symbols
