	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function swsci_setup
_swsci_setup:                           ## @swsci_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, (%rdi)
	movq	_SWSCI_GBDA_SUPPORTED_CALLS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rcx
	xorl	%edx, %edx
	callq	_swsci
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movl	-20(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -20(%rbp)
	orl	%eax, (%rbx)
LBB0_2:
	movq	_SWSCI_GBDA_REQUESTED_CALLBACKS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rcx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_swsci
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movl	-20(%rbp), %eax
	orl	%eax, 4(%rbx)
LBB0_4:
	movq	_SWSCI_SBCB_SUPPORTED_CALLBACKS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rcx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_swsci
	testq	%rax, %rax
	jne	LBB0_9
## %bb.5:
	movl	-20(%rbp), %eax
	movl	%eax, %ecx
	shll	$4, %ecx
	andl	$-65536, %ecx                   ## imm = 0xFFFF0000
	andl	$2047, %eax                     ## imm = 0x7FF
	leal	(%rcx,%rax,2), %edx
	incl	%edx
	movl	%edx, -20(%rbp)
	movl	4(%rbx), %esi
	testq	%r14, %r14
	je	LBB0_6
## %bb.8:
	orl	%edx, %esi
	movl	%esi, 4(%rbx)
	jmp	LBB0_9
LBB0_6:
	movl	%edx, %eax
	notl	%eax
	testl	%eax, %esi
	je	LBB0_9
## %bb.7:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
LBB0_9:
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SWSCI_GBDA_SUPPORTED_CALLS,4,2 ## @SWSCI_GBDA_SUPPORTED_CALLS
	.comm	_SWSCI_GBDA_REQUESTED_CALLBACKS,4,2 ## @SWSCI_GBDA_REQUESTED_CALLBACKS
	.comm	_SWSCI_SBCB_SUPPORTED_CALLBACKS,4,2 ## @SWSCI_SBCB_SUPPORTED_CALLBACKS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SWSCI BIOS requested (%08x) SBCB callbacks that are not supported (%08x)\n"

L_.str.1:                               ## @.str.1
	.asciz	"SWSCI GBDA callbacks %08x, SBCB callbacks %08x\n"

	.no_dead_strip	_swsci_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function swsci_setup
_swsci_setup:                           ; @swsci_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	movi.2s	v0, #1
	str	d0, [x0]
Lloh0:
	adrp	x8, _SWSCI_GBDA_SUPPORTED_CALLS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SWSCI_GBDA_SUPPORTED_CALLS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	w2, #0
	bl	_swsci
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w8, [sp, #12]
	lsl	w8, w8, #1
	str	w8, [sp, #12]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_2:
Lloh3:
	adrp	x8, _SWSCI_GBDA_REQUESTED_CALLBACKS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SWSCI_GBDA_REQUESTED_CALLBACKS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w2, #0
	bl	_swsci
	mov	x20, x0
	cbnz	x0, LBB0_4
; %bb.3:
	ldr	w8, [sp, #12]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_4:
Lloh6:
	adrp	x8, _SWSCI_SBCB_SUPPORTED_CALLBACKS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SWSCI_SBCB_SUPPORTED_CALLBACKS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w2, #0
	bl	_swsci
	cbnz	x0, LBB0_9
; %bb.5:
	ldr	w8, [sp, #12]
	lsl	w9, w8, #4
	and	w9, w9, #0xffff0000
	bfi	w9, w8, #1, #11
	orr	w2, w9, #0x1
	str	w2, [sp, #12]
	ldr	w1, [x19, #4]
	cbz	x20, LBB0_7
; %bb.6:
	orr	w8, w1, w2
	str	w8, [x19, #4]
	b	LBB0_9
LBB0_7:
	bics	wzr, w1, w2
	b.eq	LBB0_9
; %bb.8:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
LBB0_9:
	ldp	w1, w2, [x19]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SWSCI_GBDA_SUPPORTED_CALLS,4,2 ; @SWSCI_GBDA_SUPPORTED_CALLS
	.comm	_SWSCI_GBDA_REQUESTED_CALLBACKS,4,2 ; @SWSCI_GBDA_REQUESTED_CALLBACKS
	.comm	_SWSCI_SBCB_SUPPORTED_CALLBACKS,4,2 ; @SWSCI_SBCB_SUPPORTED_CALLBACKS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SWSCI BIOS requested (%08x) SBCB callbacks that are not supported (%08x)\n"

l_.str.1:                               ; @.str.1
	.asciz	"SWSCI GBDA callbacks %08x, SBCB callbacks %08x\n"

	.no_dead_strip	_swsci_setup
.subsections_via_symbols
