	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scpi_send_message
_scpi_send_message:                     ## @scpi_send_message
	.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
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rax
	movq	_scpi_info@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	(%rdi), %rcx
	movq	(%rcx,%rax,8), %r13
	testq	%r13, %r13
	js	LBB0_1
## %bb.3:
	movl	%r8d, %r14d
	cmpq	$0, 16(%rdi)
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.4:
	movl	36(%rdi), %esi
	movq	%r13, %rdi
	callq	_test_bit
	xorl	%r12d, %r12d
	testq	%rax, %rax
	setne	%r12b
	movq	(%rbx), %rcx
	jmp	LBB0_8
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	addq	$32, %rdi
	callq	_atomic_inc_return
	movq	(%rbx), %rcx
	movq	8(%rcx), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_6
## %bb.7:
	xorl	%edx, %edx
	divq	%rsi
	movq	%rdx, %r12
	jmp	LBB0_8
LBB0_6:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
	movl	%edx, %r12d
LBB0_8:
	shlq	$2, %r12
	addq	24(%rcx), %r12
	movq	%r12, %rdi
	callq	_get_scpi_xfer
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r15
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	%rax, %r14
	movq	(%rbx), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_12
## %bb.11:
	movq	%r13, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_PACK_LEGACY_SCPI_CMD
	movl	%eax, 40(%r14)
	jmp	LBB0_13
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_12:
	movq	_SCPI_SLOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, 40(%r14)
	movq	%r13, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_PACK_SCPI_CMD
LBB0_13:
	movl	%eax, 12(%r14)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%r14)
	movl	%ebx, (%r14)
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, 24(%r14)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r14)
	addq	$16, %r15
	movq	%r15, %rdi
	callq	_reinit_completion
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_mbox_send_message
	movl	%eax, %ebx
	testq	%r13, %r13
	je	LBB0_18
## %bb.14:
	testl	%ebx, %ebx
	js	LBB0_18
## %bb.15:
	movq	_MAX_RX_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_16
## %bb.17:
	movl	8(%r14), %ebx
LBB0_18:
	testq	%r13, %r13
	je	LBB0_21
LBB0_19:
	testl	%ebx, %ebx
	jns	LBB0_21
## %bb.20:
	movl	12(%r14), %esi
	movq	%r12, %rdi
	callq	_scpi_process_cmd
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_put_scpi_xfer
	jmp	LBB0_22
LBB0_16:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testq	%r13, %r13
	jne	LBB0_19
LBB0_21:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_put_scpi_xfer
	testl	%ebx, %ebx
	jle	LBB0_22
## %bb.23:
	movl	%ebx, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_scpi_to_linux_errno            ## TAILCALL
LBB0_22:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_scpi_info,8,3                  ## @scpi_info
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SCPI_SLOT,4,2                  ## @SCPI_SLOT
	.comm	_MAX_RX_TIMEOUT,4,2             ## @MAX_RX_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_scpi_send_message
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scpi_send_message
_scpi_send_message:                     ; @scpi_send_message
	.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
Lloh0:
	adrp	x26, _scpi_info@GOTPAGE
Lloh1:
	ldr	x26, [x26, _scpi_info@GOTPAGEOFF]
	ldr	x8, [x26]
	ldr	x9, [x8]
	ldr	x25, [x9, x0, lsl #3]
	tbnz	x25, #63, LBB0_3
; %bb.1:
	mov	x22, x4
	mov	x19, x3
	mov	x23, x2
	mov	x24, x1
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_4
; %bb.2:
	ldr	w1, [x8, #36]
	mov	x0, x25
	bl	_test_bit
	cmp	x0, #0
	cset	w9, ne
	ldr	x8, [x26]
	b	LBB0_5
LBB0_3:
Lloh2:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
	add	x0, x8, #32
	bl	_atomic_inc_return
	ldr	x8, [x26]
	ldr	x9, [x8, #8]
	udiv	x10, x0, x9
	msub	x9, x10, x9, x0
LBB0_5:
	ldr	x8, [x8, #24]
	add	x20, x8, x9, lsl #2
	mov	x0, x20
	bl	_get_scpi_xfer
	cbz	x0, LBB0_8
; %bb.6:
	mov	x21, x0
	ldr	x8, [x26]
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_10
; %bb.7:
	mov	x0, x25
	mov	x1, x23
	bl	_PACK_LEGACY_SCPI_CMD
	str	w0, [x21, #40]
	b	LBB0_11
LBB0_8:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_21
LBB0_10:
Lloh6:
	adrp	x8, _SCPI_SLOT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SCPI_SLOT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_BIT
	str	w0, [x21, #40]
	mov	x0, x25
	mov	x1, x23
	bl	_PACK_SCPI_CMD
LBB0_11:
	str	w0, [x21, #12]
	stp	x19, x24, [x21, #24]
	add	x24, x21, #16
	stp	w23, w22, [x21]
	mov	x0, x24
	bl	_reinit_completion
	ldr	w0, [x20]
	mov	x1, x21
	bl	_mbox_send_message
	mov	x22, x0
	cbz	x19, LBB0_15
; %bb.12:
	tbnz	w22, #31, LBB0_15
; %bb.13:
Lloh9:
	adrp	x8, _MAX_RX_TIMEOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX_RX_TIMEOUT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_18
; %bb.14:
	ldr	w22, [x21, #8]
LBB0_15:
	cbz	x19, LBB0_19
LBB0_16:
	tbz	w22, #31, LBB0_19
; %bb.17:
	ldr	w1, [x21, #12]
	mov	x0, x20
	bl	_scpi_process_cmd
	mov	x0, x21
	mov	x1, x20
	bl	_put_scpi_xfer
	b	LBB0_21
LBB0_18:
Lloh12:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
	cbnz	x19, LBB0_16
LBB0_19:
	mov	x0, x21
	mov	x1, x20
	bl	_put_scpi_xfer
	cmp	w22, #1
	b.lt	LBB0_21
; %bb.20:
	mov	x0, x22
	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	_scpi_to_linux_errno
LBB0_21:
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_scpi_info,8,3                  ; @scpi_info
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SCPI_SLOT,4,2                  ; @SCPI_SLOT
	.comm	_MAX_RX_TIMEOUT,4,2             ; @MAX_RX_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_scpi_send_message
.subsections_via_symbols
