	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isp_set_power
_isp_set_power:                         ## @isp_set_power
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%esi, %esi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	jne	LBB0_1
## %bb.2:
	movq	_ISPSSPM0_IUNIT_POWER_OFF@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_ISPSSPM0_IUNIT_POWER_ON@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r12d
	movq	_BT_MBI_UNIT_PMC@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_MBI_REG_READ@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_ISPSSPM0@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	_ISPSSPM0_ISPSSC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r12d, %ecx
	callq	_iosf_mbi_modify
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	$50, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	movl	(%r14), %edi
	movl	(%r15), %esi
	movl	(%r13), %edx
	leaq	-44(%rbp), %rcx
	callq	_iosf_mbi_read
	movq	_ISPSSPM0_ISPSSS_MASK@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	andl	-44(%rbp), %eax
	movq	_ISPSSPM0_ISPSSS_OFFSET@GOTPCREL(%rip), %r15
	movb	(%r15), %cl
	sarl	%cl, %eax
	movl	%eax, -44(%rbp)
	cmpl	%r12d, %eax
	je	LBB0_8
## %bb.4:
	addq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	leaq	-44(%rbp), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movq	_BT_MBI_UNIT_PMC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MBI_REG_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ISPSSPM0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rcx
	callq	_iosf_mbi_read
	movl	(%r14), %eax
	andl	-44(%rbp), %eax
	movzbl	(%r15), %ecx
	sarl	%cl, %eax
	movl	%eax, -44(%rbp)
	cmpl	%r12d, %eax
	jne	LBB0_5
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_6:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ISPSSPM0_IUNIT_POWER_ON,4,2    ## @ISPSSPM0_IUNIT_POWER_ON
	.comm	_ISPSSPM0_IUNIT_POWER_OFF,4,2   ## @ISPSSPM0_IUNIT_POWER_OFF
	.comm	_BT_MBI_UNIT_PMC,4,2            ## @BT_MBI_UNIT_PMC
	.comm	_MBI_REG_READ,4,2               ## @MBI_REG_READ
	.comm	_ISPSSPM0,4,2                   ## @ISPSSPM0
	.comm	_ISPSSPM0_ISPSSC_MASK,4,2       ## @ISPSSPM0_ISPSSC_MASK
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_ISPSSPM0_ISPSSS_MASK,4,2       ## @ISPSSPM0_ISPSSS_MASK
	.comm	_ISPSSPM0_ISPSSS_OFFSET,4,2     ## @ISPSSPM0_ISPSSS_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IUNIT power-%s timeout.\n"

L_.str.1:                               ## @.str.1
	.asciz	"on"

L_.str.2:                               ## @.str.2
	.asciz	"off"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_isp_set_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isp_set_power
_isp_set_power:                         ; @isp_set_power
	.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
	str	x0, [sp]                        ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _ISPSSPM0_IUNIT_POWER_ON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ISPSSPM0_IUNIT_POWER_ON@GOTPAGEOFF]
Lloh2:
	adrp	x9, _ISPSSPM0_IUNIT_POWER_OFF@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ISPSSPM0_IUNIT_POWER_OFF@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x9, x8, eq
	ldr	w21, [x8]
Lloh4:
	adrp	x23, _BT_MBI_UNIT_PMC@GOTPAGE
Lloh5:
	ldr	x23, [x23, _BT_MBI_UNIT_PMC@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh6:
	adrp	x24, _MBI_REG_READ@GOTPAGE
Lloh7:
	ldr	x24, [x24, _MBI_REG_READ@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh8:
	adrp	x25, _ISPSSPM0@GOTPAGE
Lloh9:
	ldr	x25, [x25, _ISPSSPM0@GOTPAGEOFF]
	ldr	w2, [x25]
Lloh10:
	adrp	x8, _ISPSSPM0_ISPSSC_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ISPSSPM0_ISPSSC_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w4, [x8]
	mov	x3, x21
	bl	_iosf_mbi_modify
Lloh13:
	adrp	x26, _jiffies@GOTPAGE
Lloh14:
	ldr	x26, [x26, _jiffies@GOTPAGEOFF]
	ldr	x19, [x26]
	mov	w0, #50
	bl	_msecs_to_jiffies
	mov	x22, x0
	ldr	w0, [x23]
	ldr	w1, [x24]
	ldr	w2, [x25]
	add	x3, sp, #12
	bl	_iosf_mbi_read
	ldr	w8, [sp, #12]
Lloh15:
	adrp	x27, _ISPSSPM0_ISPSSS_MASK@GOTPAGE
Lloh16:
	ldr	x27, [x27, _ISPSSPM0_ISPSSS_MASK@GOTPAGEOFF]
	ldr	w9, [x27]
	and	w8, w9, w8
Lloh17:
	adrp	x28, _ISPSSPM0_ISPSSS_OFFSET@GOTPAGE
Lloh18:
	ldr	x28, [x28, _ISPSSPM0_ISPSSS_OFFSET@GOTPAGEOFF]
	ldr	w9, [x28]
	asr	w8, w8, w9
	str	w8, [sp, #12]
	cmp	w8, w21
	b.eq	LBB0_4
; %bb.1:
	add	x22, x22, x19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x26]
	mov	x1, x22
	bl	_time_after
	cbnz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w0, [x23]
	ldr	w1, [x24]
	ldr	w2, [x25]
	add	x3, sp, #12
	bl	_iosf_mbi_read
	ldr	w8, [sp, #12]
	ldr	w9, [x27]
	and	w8, w9, w8
	ldr	w9, [x28]
	asr	w8, w8, w9
	str	w8, [sp, #12]
	cmp	w8, w21
	b.ne	LBB0_2
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh19:
	adrp	x8, l_.str.1@PAGE
Lloh20:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh21:
	adrp	x9, l_.str.2@PAGE
Lloh22:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w20, #0
	csel	x2, x9, x8, eq
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_dev_err
Lloh25:
	adrp	x8, _EBUSY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ISPSSPM0_IUNIT_POWER_ON,4,2    ; @ISPSSPM0_IUNIT_POWER_ON
	.comm	_ISPSSPM0_IUNIT_POWER_OFF,4,2   ; @ISPSSPM0_IUNIT_POWER_OFF
	.comm	_BT_MBI_UNIT_PMC,4,2            ; @BT_MBI_UNIT_PMC
	.comm	_MBI_REG_READ,4,2               ; @MBI_REG_READ
	.comm	_ISPSSPM0,4,2                   ; @ISPSSPM0
	.comm	_ISPSSPM0_ISPSSC_MASK,4,2       ; @ISPSSPM0_ISPSSC_MASK
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_ISPSSPM0_ISPSSS_MASK,4,2       ; @ISPSSPM0_ISPSSS_MASK
	.comm	_ISPSSPM0_ISPSSS_OFFSET,4,2     ; @ISPSSPM0_ISPSSS_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IUNIT power-%s timeout.\n"

l_.str.1:                               ; @.str.1
	.asciz	"on"

l_.str.2:                               ; @.str.2
	.asciz	"off"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_isp_set_power
.subsections_via_symbols
