	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efi_get_secureboot             ## -- Begin function efi_get_secureboot
	.p2align	4, 0x90
_efi_get_secureboot:                    ## @efi_get_secureboot
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	$8, -32(%rbp)
	movq	_efi_SecureBoot_name@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_efi_variable_guid@GOTPCREL(%rip), %rsi
	leaq	-32(%rbp), %rcx
	leaq	-64(%rbp), %r8
	xorl	%edx, %edx
	callq	_get_efi_var
	movq	_EFI_NOT_FOUND@GOTPCREL(%rip), %rcx
	movq	_efi_secureboot_mode_disabled@GOTPCREL(%rip), %rbx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.1:
	movq	_EFI_SUCCESS@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_9
## %bb.2:
	movq	$8, -32(%rbp)
	movq	_efi_SetupMode_name@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_efi_variable_guid@GOTPCREL(%rip), %rsi
	leaq	-32(%rbp), %rcx
	leaq	-56(%rbp), %r8
	xorl	%edx, %edx
	callq	_get_efi_var
	cmpq	(%r15), %rax
	jne	LBB0_9
## %bb.3:
	cmpq	$0, -64(%rbp)
	je	LBB0_10
## %bb.4:
	cmpq	$1, -56(%rbp)
	je	LBB0_10
## %bb.5:
	movq	$8, -32(%rbp)
	movq	_shim_MokSBState_name@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_shim_guid@GOTPCREL(%rip), %rsi
	leaq	-36(%rbp), %rdx
	leaq	-32(%rbp), %rcx
	leaq	-48(%rbp), %r8
	callq	_get_efi_var
	cmpq	(%r15), %rax
	jne	LBB0_8
## %bb.6:
	movq	_EFI_VARIABLE_RUNTIME_ACCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -36(%rbp)
	jne	LBB0_8
## %bb.7:
	cmpq	$1, -48(%rbp)
	je	LBB0_10
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_pr_efi
	movq	_efi_secureboot_mode_enabled@GOTPCREL(%rip), %rbx
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_pr_efi_err
	movq	_efi_secureboot_mode_unknown@GOTPCREL(%rip), %rbx
LBB0_10:
	movl	(%rbx), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_efi_SecureBoot_name,4,2        ## @efi_SecureBoot_name
	.comm	_efi_variable_guid,4,2          ## @efi_variable_guid
	.comm	_EFI_NOT_FOUND,8,3              ## @EFI_NOT_FOUND
	.comm	_efi_secureboot_mode_disabled,4,2 ## @efi_secureboot_mode_disabled
	.comm	_EFI_SUCCESS,8,3                ## @EFI_SUCCESS
	.comm	_efi_SetupMode_name,4,2         ## @efi_SetupMode_name
	.comm	_shim_MokSBState_name,4,2       ## @shim_MokSBState_name
	.comm	_shim_guid,4,2                  ## @shim_guid
	.comm	_EFI_VARIABLE_RUNTIME_ACCESS,4,2 ## @EFI_VARIABLE_RUNTIME_ACCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UEFI Secure Boot is enabled.\n"

	.comm	_efi_secureboot_mode_enabled,4,2 ## @efi_secureboot_mode_enabled
L_.str.1:                               ## @.str.1
	.asciz	"Could not determine UEFI Secure Boot status.\n"

	.comm	_efi_secureboot_mode_unknown,4,2 ## @efi_secureboot_mode_unknown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efi_get_secureboot             ; -- Begin function efi_get_secureboot
	.p2align	2
_efi_get_secureboot:                    ; @efi_get_secureboot
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	w8, #8
	str	x8, [sp, #8]
Lloh0:
	adrp	x8, _efi_SecureBoot_name@GOTPAGE
Lloh1:
	ldr	x8, [x8, _efi_SecureBoot_name@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, _efi_variable_guid@GOTPAGE
Lloh4:
	ldr	x1, [x1, _efi_variable_guid@GOTPAGEOFF]
	add	x3, sp, #8
	add	x4, sp, #32
	mov	x2, #0
	bl	_get_efi_var
Lloh5:
	adrp	x8, _EFI_NOT_FOUND@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EFI_NOT_FOUND@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
LBB0_1:
Lloh8:
	adrp	x8, _efi_secureboot_mode_disabled@GOTPAGE
Lloh9:
	ldr	x8, [x8, _efi_secureboot_mode_disabled@GOTPAGEOFF]
	b	LBB0_11
LBB0_2:
Lloh10:
	adrp	x20, _EFI_SUCCESS@GOTPAGE
Lloh11:
	ldr	x20, [x20, _EFI_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.3:
	mov	w8, #8
	str	x8, [sp, #8]
Lloh12:
	adrp	x8, _efi_SetupMode_name@GOTPAGE
Lloh13:
	ldr	x8, [x8, _efi_SetupMode_name@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, _efi_variable_guid@GOTPAGE
Lloh16:
	ldr	x1, [x1, _efi_variable_guid@GOTPAGEOFF]
	add	x3, sp, #8
	add	x4, sp, #24
	mov	x2, #0
	bl	_get_efi_var
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.4:
	ldr	x9, [sp, #32]
Lloh17:
	adrp	x8, _efi_secureboot_mode_disabled@GOTPAGE
Lloh18:
	ldr	x8, [x8, _efi_secureboot_mode_disabled@GOTPAGEOFF]
	cbz	x9, LBB0_11
; %bb.5:
	ldr	x9, [sp, #24]
	cmp	x9, #1
	b.eq	LBB0_11
; %bb.6:
	mov	w8, #8
	str	x8, [sp, #8]
Lloh19:
	adrp	x8, _shim_MokSBState_name@GOTPAGE
Lloh20:
	ldr	x8, [x8, _shim_MokSBState_name@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x1, _shim_guid@GOTPAGE
Lloh23:
	ldr	x1, [x1, _shim_guid@GOTPAGEOFF]
	sub	x2, x29, #20
	add	x3, sp, #8
	add	x4, sp, #16
	bl	_get_efi_var
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.7:
	ldur	w8, [x29, #-20]
Lloh24:
	adrp	x9, _EFI_VARIABLE_RUNTIME_ACCESS@GOTPAGE
Lloh25:
	ldr	x9, [x9, _EFI_VARIABLE_RUNTIME_ACCESS@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_9
; %bb.8:
	ldr	x8, [sp, #16]
	cmp	x8, #1
	b.eq	LBB0_1
LBB0_9:
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pr_efi
Lloh29:
	adrp	x8, _efi_secureboot_mode_enabled@GOTPAGE
Lloh30:
	ldr	x8, [x8, _efi_secureboot_mode_enabled@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_pr_efi_err
Lloh33:
	adrp	x8, _efi_secureboot_mode_unknown@GOTPAGE
Lloh34:
	ldr	x8, [x8, _efi_secureboot_mode_unknown@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_efi_SecureBoot_name,4,2        ; @efi_SecureBoot_name
	.comm	_efi_variable_guid,4,2          ; @efi_variable_guid
	.comm	_EFI_NOT_FOUND,8,3              ; @EFI_NOT_FOUND
	.comm	_efi_secureboot_mode_disabled,4,2 ; @efi_secureboot_mode_disabled
	.comm	_EFI_SUCCESS,8,3                ; @EFI_SUCCESS
	.comm	_efi_SetupMode_name,4,2         ; @efi_SetupMode_name
	.comm	_shim_MokSBState_name,4,2       ; @shim_MokSBState_name
	.comm	_shim_guid,4,2                  ; @shim_guid
	.comm	_EFI_VARIABLE_RUNTIME_ACCESS,4,2 ; @EFI_VARIABLE_RUNTIME_ACCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UEFI Secure Boot is enabled.\n"

	.comm	_efi_secureboot_mode_enabled,4,2 ; @efi_secureboot_mode_enabled
l_.str.1:                               ; @.str.1
	.asciz	"Could not determine UEFI Secure Boot status.\n"

	.comm	_efi_secureboot_mode_unknown,4,2 ; @efi_secureboot_mode_unknown
.subsections_via_symbols
