	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_scmi_do_xfer                   ## -- Begin function scmi_do_xfer
	.p2align	4, 0x90
_scmi_do_xfer:                          ## @scmi_do_xfer
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	callq	_handle_to_scmi_info
	movq	%rax, %r13
	movq	16(%rax), %r15
	leaq	8(%rax), %rdi
	movl	16(%r12), %esi
	callq	_idr_find
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_2:
	movl	(%r14), %edi
	movq	%r12, %rsi
	callq	_mbox_send_message
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	cmpq	$0, 8(%r12)
	je	LBB0_9
## %bb.5:
	xorl	%eax, %eax
	callq	_ktime_get
	movq	_SCMI_MAX_POLL_TO_NS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_ktime_add_ns
	movl	%eax, %ebx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_scmi_xfer_done_no_timeout
	movl	%eax, %edi
	callq	_spin_until_cond
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_ktime_before
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movl	4(%r14), %esi
	movq	%r12, %rdi
	callq	_scmi_fetch_response
	jmp	LBB0_7
LBB0_3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	jmp	LBB0_15
LBB0_9:
	movq	(%r13), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	leaq	24(%r12), %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	jne	LBB0_7
## %bb.10:
	movq	__RET_IP_@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_11:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.12:
	negl	%ebx
	jmp	LBB0_14
LBB0_7:
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.13:
	callq	_scmi_to_linux_errno
	movl	%eax, %ebx
	jmp	LBB0_14
LBB0_8:
	xorl	%ebx, %ebx
LBB0_14:
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_mbox_client_txdone
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mbox send fail %d\n"

	.comm	_SCMI_MAX_POLL_TO_NS,4,2        ## @SCMI_MAX_POLL_TO_NS
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"mbox timed out in resp(caller: %pS)\n"

	.comm	__RET_IP_,8,3                   ## @_RET_IP_
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_scmi_do_xfer                   ; -- Begin function scmi_do_xfer
	.p2align	2
_scmi_do_xfer:                          ; @scmi_do_xfer
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	bl	_handle_to_scmi_info
	mov	x23, x0
	ldr	x21, [x0, #16]
	add	x0, x0, #8
	ldr	w1, [x20, #16]
	bl	_idr_find
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_15
LBB0_2:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_mbox_send_message
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
; %bb.4:
	bl	_ktime_get
Lloh3:
	adrp	x8, _SCMI_MAX_POLL_TO_NS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCMI_MAX_POLL_TO_NS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_ktime_add_ns
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_scmi_xfer_done_no_timeout
	bl	_spin_until_cond
	bl	_ktime_get
	mov	x1, x21
	bl	_ktime_before
	cbz	x0, LBB0_9
; %bb.5:
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_scmi_fetch_response
	b	LBB0_11
LBB0_6:
	mov	x22, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_dev_dbg
	b	LBB0_15
LBB0_7:
	ldr	x8, [x23]
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x1, x0
	add	x0, x20, #24
	bl	_wait_for_completion_timeout
	cbnz	w0, LBB0_11
; %bb.8:
Lloh8:
	adrp	x8, __RET_IP_@GOTPAGE
Lloh9:
	ldr	x8, [x8, __RET_IP_@GOTPAGEOFF]
Lloh10:
	ldr	x2, [x8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_9:
Lloh13:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cbz	w8, LBB0_11
; %bb.10:
	neg	w22, w8
	b	LBB0_14
LBB0_11:
	ldr	x0, [x20]
	cbz	x0, LBB0_13
; %bb.12:
	bl	_scmi_to_linux_errno
	mov	x22, x0
	b	LBB0_14
LBB0_13:
	mov	w22, #0
LBB0_14:
	ldr	w0, [x19]
	mov	x1, x22
	bl	_mbox_client_txdone
LBB0_15:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mbox send fail %d\n"

	.comm	_SCMI_MAX_POLL_TO_NS,4,2        ; @SCMI_MAX_POLL_TO_NS
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"mbox timed out in resp(caller: %pS)\n"

	.comm	__RET_IP_,8,3                   ; @_RET_IP_
.subsections_via_symbols
