	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sgx_secs_validate
_sgx_secs_validate:                     ## @sgx_secs_validate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rsi), %eax
	testl	%eax, %eax
	je	LBB0_31
## %bb.1:
	leal	-1(%rax), %ecx
	testl	%ecx, 4(%rsi)
	jne	LBB0_31
## %bb.2:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	addl	%edx, %edx
	cmpl	%edx, %eax
	jl	LBB0_31
## %bb.3:
	testl	%ecx, %eax
	jne	LBB0_31
## %bb.4:
	cmpq	$0, 40(%rsi)
	jne	LBB0_31
## %bb.5:
	cmpq	$0, 48(%rsi)
	jne	LBB0_31
## %bb.6:
	cmpq	$0, 56(%rsi)
	je	LBB0_7
LBB0_31:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_32:
	popq	%rbp
	retq
LBB0_7:
	movq	_SECS_ATTR_RSV4_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_11
## %bb.8:
	movq	72(%rsi), %rdx
	xorl	%ecx, %ecx
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx,%rcx,8)
	jne	LBB0_31
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	incq	%rcx
	cmpq	%rcx, %r8
	jne	LBB0_10
LBB0_11:
	movl	64(%rsi), %ecx
	notl	%ecx
	testb	$3, %cl
	jne	LBB0_31
## %bb.12:
	cmpl	$0, 68(%rsi)
	je	LBB0_31
## %bb.13:
	cmpl	(%rdi), %eax
	jg	LBB0_31
## %bb.14:
	movq	_SECS_RSV1_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_18
## %bb.15:
	movq	32(%rsi), %rcx
	xorl	%edx, %edx
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%rdx,8)
	jne	LBB0_31
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_16
LBB0_18:
	movq	_SECS_RSV2_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_22
## %bb.19:
	movq	24(%rsi), %rcx
	xorl	%edx, %edx
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%rdx,8)
	jne	LBB0_31
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_20
LBB0_22:
	movq	_SECS_RSV3_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_26
## %bb.23:
	movq	16(%rsi), %rcx
	xorl	%edx, %edx
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%rdx,8)
	jne	LBB0_31
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_24
LBB0_26:
	movq	_SECS_RSV4_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_27
## %bb.28:
	movq	8(%rsi), %rdx
	xorl	%esi, %esi
	xorl	%eax, %eax
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx,%rsi,8)
	jne	LBB0_31
## %bb.29:                              ##   in Loop: Header=BB0_30 Depth=1
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_30
	jmp	LBB0_32
LBB0_27:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_SECS_ATTR_RSV4_SIZE,4,2        ## @SECS_ATTR_RSV4_SIZE
	.comm	_SECS_RSV1_SIZE,4,2             ## @SECS_RSV1_SIZE
	.comm	_SECS_RSV2_SIZE,4,2             ## @SECS_RSV2_SIZE
	.comm	_SECS_RSV3_SIZE,4,2             ## @SECS_RSV3_SIZE
	.comm	_SECS_RSV4_SIZE,4,2             ## @SECS_RSV4_SIZE
	.no_dead_strip	_sgx_secs_validate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sgx_secs_validate
_sgx_secs_validate:                     ; @sgx_secs_validate
	.cfi_startproc
; %bb.0:
	ldr	w8, [x1]
	cbz	w8, LBB0_7
; %bb.1:
	ldr	w10, [x1, #4]
	sub	w9, w8, #1
	tst	w10, w9
	b.ne	LBB0_7
; %bb.2:
Lloh0:
	adrp	x10, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w8, w10, lsl #1
	b.lt	LBB0_7
; %bb.3:
	tst	w8, w9
	b.ne	LBB0_7
; %bb.4:
	ldr	x9, [x1, #40]
	cbnz	x9, LBB0_7
; %bb.5:
	ldr	x9, [x1, #48]
	cbnz	x9, LBB0_7
; %bb.6:
	ldr	x9, [x1, #56]
	cbz	x9, LBB0_9
LBB0_7:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_8:
	ret
LBB0_9:
Lloh6:
	adrp	x9, _SECS_ATTR_RSV4_SIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SECS_ATTR_RSV4_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.10:
	ldr	x10, [x1, #72]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10]
	cbnz	x11, LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x10, x10, #8
	subs	x9, x9, #1
	b.ne	LBB0_11
LBB0_13:
	ldr	w9, [x1, #64]
	mvn	w9, w9
	tst	w9, #0x3
	b.ne	LBB0_7
; %bb.14:
	ldr	w9, [x1, #68]
	cbz	w9, LBB0_7
; %bb.15:
	ldr	w9, [x0]
	cmp	w8, w9
	b.gt	LBB0_7
; %bb.16:
Lloh9:
	adrp	x8, _SECS_RSV1_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SECS_RSV1_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.17:
	ldr	x9, [x1, #32]
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbnz	x10, LBB0_7
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.ne	LBB0_18
LBB0_20:
Lloh12:
	adrp	x8, _SECS_RSV2_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SECS_RSV2_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.21:
	ldr	x9, [x1, #24]
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbnz	x10, LBB0_7
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.ne	LBB0_22
LBB0_24:
Lloh15:
	adrp	x8, _SECS_RSV3_SIZE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SECS_RSV3_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_28
; %bb.25:
	ldr	x9, [x1, #16]
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbnz	x10, LBB0_7
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.ne	LBB0_26
LBB0_28:
Lloh18:
	adrp	x8, _SECS_RSV4_SIZE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SECS_RSV4_SIZE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_32
; %bb.29:
	ldr	x9, [x1, #8]
	mov	w0, #0
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbnz	x10, LBB0_7
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.ne	LBB0_30
	b	LBB0_8
LBB0_32:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_SECS_ATTR_RSV4_SIZE,4,2        ; @SECS_ATTR_RSV4_SIZE
	.comm	_SECS_RSV1_SIZE,4,2             ; @SECS_RSV1_SIZE
	.comm	_SECS_RSV2_SIZE,4,2             ; @SECS_RSV2_SIZE
	.comm	_SECS_RSV3_SIZE,4,2             ; @SECS_RSV3_SIZE
	.comm	_SECS_RSV4_SIZE,4,2             ; @SECS_RSV4_SIZE
	.no_dead_strip	_sgx_secs_validate
.subsections_via_symbols
