	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efi_get_certs
_efi_get_certs:                         ## @efi_get_certs
	.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	%rsi, %r14
	movq	%rdi, %r13
	movq	$0, -56(%rbp)
	movq	_ImageSecurityDatabaseGUID@GOTPCREL(%rip), %rdi
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %rcx
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_efi_getenv
	movq	_EFI_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.1:
	movq	-56(%rbp), %rdi
	callq	_malloc
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r15
	movq	_ImageSecurityDatabaseGUID@GOTPCREL(%rip), %rdi
	leaq	-56(%rbp), %rcx
	movq	%r13, %rsi
	movq	%rax, %rdx
	callq	_efi_getenv
	movq	_EFI_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.6:
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_7
## %bb.8:
	xorl	%ecx, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	$0, %r14d
	cmpq	(%r15), %rax
	jb	LBB0_18
## %bb.9:
	xorl	%r14d, %r14d
	movq	_efiCertX509GUID@GOTPCREL(%rip), %rbx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %r13
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	leaq	24(%r15), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movslq	8(%r15), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leal	1(%r14), %ebx
	movl	%ebx, %esi
	shll	$4, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, %r12
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movq	%r14, %rax
	movq	16(%r15), %r14
	addq	$-4, %r14
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movslq	%eax, %rbx
	shlq	$4, %rbx
	movq	%r14, (%r12,%rbx)
	movq	%r14, %rdi
	callq	_malloc
	movq	%r12, %rcx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, 8(%r12,%rbx)
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	128(%r15,%rcx,4), %esi
	movq	%rax, %rdi
	movq	%r14, %rdx
	callq	_memcpy
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r14d
	movq	_efiCertX509GUID@GOTPCREL(%rip), %rbx
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r13), %rax
	movq	-56(%rbp), %rcx
	subq	%rax, %rcx
	movq	%rcx, -56(%rbp)
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=1
	leaq	(%r15,%rax,4), %r13
	cmpq	(%r15,%rax,4), %rcx
	movq	%r13, %r15
	jae	LBB0_10
	jmp	LBB0_18
LBB0_2:
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_4:
	xorl	%edi, %edi
LBB0_5:
	movl	%ebx, %esi
	callq	_free_certificates
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_7:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
LBB0_18:
	movslq	%r14d, %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_19:
	movq	%r15, %rdi
	callq	_xfree
LBB0_20:
	movq	%rbx, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%edi, %edi
	xorl	%ebx, %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_14:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_ImageSecurityDatabaseGUID,4,2  ## @ImageSecurityDatabaseGUID
	.comm	_EFI_BUFFER_TOO_SMALL,8,3       ## @EFI_BUFFER_TOO_SMALL
	.comm	_EFI_SUCCESS,8,3                ## @EFI_SUCCESS
	.comm	_efiCertX509GUID,4,2            ## @efiCertX509GUID
	.no_dead_strip	_efi_get_certs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efi_get_certs
_efi_get_certs:                         ; @efi_get_certs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x0, _ImageSecurityDatabaseGUID@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ImageSecurityDatabaseGUID@GOTPAGEOFF]
	add	x3, sp, #8
	mov	x1, x22
	mov	x2, #0
	bl	_efi_getenv
	mov	x21, #0
Lloh2:
	adrp	x8, _EFI_BUFFER_TOO_SMALL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EFI_BUFFER_TOO_SMALL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.1:
	ldr	x0, [sp, #8]
	bl	_malloc
	cbz	x0, LBB0_11
; %bb.2:
	mov	x19, x0
Lloh5:
	adrp	x0, _ImageSecurityDatabaseGUID@GOTPAGE
Lloh6:
	ldr	x0, [x0, _ImageSecurityDatabaseGUID@GOTPAGEOFF]
	add	x3, sp, #8
	mov	x1, x22
	mov	x2, x19
	bl	_efi_getenv
Lloh7:
	adrp	x8, _EFI_SUCCESS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EFI_SUCCESS@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.3:
	mov	w22, #0
	mov	x21, #0
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_15
; %bb.4:
	ldr	x9, [x19]
	cmp	x8, x9
	b.lo	LBB0_15
; %bb.5:
	mov	w22, #0
	mov	x21, #0
Lloh10:
	adrp	x23, _efiCertX509GUID@GOTPAGE
Lloh11:
	ldr	x23, [x23, _efiCertX509GUID@GOTPAGEOFF]
	mov	x25, x19
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x25]
	ldr	x9, [sp, #8]
	subs	x9, x9, x8
	str	x9, [sp, #8]
	add	x25, x25, x8, lsl #2
	ldr	x8, [x25]
	ccmp	x9, x8, #0, ne
	b.lo	LBB0_15
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x25, #24
	mov	x0, x23
	mov	w2, #4
	bl	_memcmp
	cbnz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldrsw	x27, [x25, #8]
	add	w26, w22, #1
	lsl	w1, w26, #4
	mov	x0, x21
	bl	_realloc
	mov	x21, x0
	cbz	x0, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x25, #16]
	sub	x24, x8, #4
	add	x28, x21, w22, sxtw #4
	str	x24, [x28]
	mov	x0, x24
	bl	_malloc
	str	x0, [x28, #8]
	cbz	x0, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x25, #128
	ldr	w1, [x8, x27, lsl #2]
	mov	x2, x24
	bl	_memcpy
	mov	x22, x26
	b	LBB0_6
LBB0_11:
	mov	x21, #0
	b	LBB0_17
LBB0_12:
	mov	x21, #0
LBB0_13:
	mov	w22, #0
LBB0_14:
	mov	x0, x21
	mov	x1, x22
	bl	_free_certificates
	mov	x21, #0
	b	LBB0_16
LBB0_15:
	sxtw	x8, w22
	str	x8, [x20]
LBB0_16:
	mov	x0, x19
	bl	_xfree
LBB0_17:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ImageSecurityDatabaseGUID,4,2  ; @ImageSecurityDatabaseGUID
	.comm	_EFI_BUFFER_TOO_SMALL,8,3       ; @EFI_BUFFER_TOO_SMALL
	.comm	_EFI_SUCCESS,8,3                ; @EFI_SUCCESS
	.comm	_efiCertX509GUID,4,2            ; @efiCertX509GUID
	.no_dead_strip	_efi_get_certs
.subsections_via_symbols
