	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ti_sci_get_device_state
_ti_sci_get_device_state:               ## @ti_sci_get_device_state
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movq	%r8, %r13
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.23:
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movl	%r12d, -56(%rbp)                ## 4-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.3:
	movq	%r15, %rax
	testq	%r15, %r15
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_7
## %bb.4:
	movq	%r14, %rdx
	testq	%r14, %r14
	jne	LBB0_7
## %bb.5:
	testq	%rcx, %rcx
	jne	LBB0_7
## %bb.6:
	movq	%r12, %rax
	testq	%r12, %r12
	jne	LBB0_7
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_7:
	movq	%rbx, %rdi
	callq	_handle_to_ti_sci_info
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_TI_SCI_MSG_GET_DEVICE_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TI_SCI_FLAG_REQ_ACK_ON_PROCESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$4, %ecx
	movl	$16, %r8d
	callq	_ti_sci_get_one_xfer
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r13, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_22
LBB0_9:
	movq	(%r13), %rax
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_ti_sci_do_xfer
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_dev_err
	movq	%r13, %rsi
LBB0_21:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_ti_sci_put_one_xfer
LBB0_22:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rbx
	movq	%rbx, %rdi
	callq	_ti_sci_is_response_ack
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	testq	%r15, %r15
	je	LBB0_15
## %bb.14:
	movl	12(%rbx), %eax
	movl	%eax, (%r15)
LBB0_15:
	testq	%r14, %r14
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	je	LBB0_17
## %bb.16:
	movl	8(%rbx), %eax
	movl	%eax, (%r14)
LBB0_17:
	testq	%r13, %r13
	je	LBB0_19
## %bb.18:
	movl	4(%rbx), %eax
	movl	%eax, (%r13)
LBB0_19:
	movq	%rbx, %rax
	xorl	%ebx, %ebx
	testq	%r12, %r12
	je	LBB0_21
## %bb.20:
	movl	(%rax), %eax
	movl	%eax, (%r12)
	jmp	LBB0_21
LBB0_12:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TI_SCI_MSG_GET_DEVICE_STATE,4,2 ## @TI_SCI_MSG_GET_DEVICE_STATE
	.comm	_TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,4,2 ## @TI_SCI_FLAG_REQ_ACK_ON_PROCESSED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Message alloc failed(%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Mbox send fail %d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_ti_sci_get_device_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ti_sci_get_device_state
_ti_sci_get_device_state:               ; @ti_sci_get_device_state
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x5
	mov	x21, x4
	mov	x22, x3
	mov	x24, x2
	mov	x25, x1
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_2:
	cbz	x20, LBB0_7
; %bb.3:
	cbnz	x24, LBB0_8
; %bb.4:
	cbnz	x22, LBB0_8
; %bb.5:
	cbnz	x21, LBB0_8
; %bb.6:
	cbnz	x19, LBB0_8
LBB0_7:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_13
LBB0_8:
	mov	x0, x20
	bl	_handle_to_ti_sci_info
	mov	x20, x0
	ldr	x26, [x0, #8]
Lloh3:
	adrp	x8, _TI_SCI_MSG_GET_DEVICE_STATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TI_SCI_MSG_GET_DEVICE_STATE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _TI_SCI_FLAG_REQ_ACK_ON_PROCESSED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TI_SCI_FLAG_REQ_ACK_ON_PROCESSED@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w3, #4
	mov	w4, #16
	bl	_ti_sci_get_one_xfer
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.9:
	mov	x0, x23
	bl	_PTR_ERR
	mov	x25, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x26
	mov	x2, x25
	bl	_dev_err
	b	LBB0_13
LBB0_10:
	ldr	x8, [x23]
	str	w25, [x8]
	mov	x0, x20
	mov	x1, x23
	bl	_ti_sci_do_xfer
	cbz	w0, LBB0_14
; %bb.11:
	mov	x25, x0
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x26
	mov	x2, x25
	bl	_dev_err
LBB0_12:
	mov	x0, x20
	mov	x1, x23
	bl	_ti_sci_put_one_xfer
LBB0_13:
	mov	x0, x25
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
	ldr	x26, [x23]
	mov	x0, x26
	bl	_ti_sci_is_response_ack
	cbz	w0, LBB0_23
; %bb.15:
	cbz	x24, LBB0_17
; %bb.16:
	ldr	w8, [x26, #12]
	str	w8, [x24]
LBB0_17:
	cbz	x22, LBB0_19
; %bb.18:
	ldr	w8, [x26, #8]
	str	w8, [x22]
LBB0_19:
	cbz	x21, LBB0_21
; %bb.20:
	ldr	w8, [x26, #4]
	str	w8, [x21]
LBB0_21:
	mov	w25, #0
	cbz	x19, LBB0_12
; %bb.22:
	ldr	w8, [x26]
	str	w8, [x19]
	b	LBB0_12
LBB0_23:
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TI_SCI_MSG_GET_DEVICE_STATE,4,2 ; @TI_SCI_MSG_GET_DEVICE_STATE
	.comm	_TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,4,2 ; @TI_SCI_FLAG_REQ_ACK_ON_PROCESSED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Message alloc failed(%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Mbox send fail %d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_ti_sci_get_device_state
.subsections_via_symbols
