	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s10_send_buf
_s10_send_buf:                          ## @s10_send_buf
	.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	_NUM_SVC_BUFS@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_6
## %bb.1:
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r15
	movq	8(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	_SVC_BUF_LOCK@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	(%r15), %rsi
	addq	%r13, %rsi
	callq	_test_and_set_bit_lock
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	(%r12), %rax
	addq	$16, %r13
	cmpq	%rax, %rbx
	jb	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movq	(%r12), %rax
LBB0_5:
	cmpq	%rax, %rbx
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	jne	LBB0_7
LBB0_6:
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_10
LBB0_7:
	movq	_SVC_BUF_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%r13, %rax
	cmovbq	%rax, %r13
	movq	(%r15), %rax
	shlq	$4, %rbx
	movq	8(%rax,%rbx), %r12
	movq	%r12, %rdi
	movq	%r13, %rdx
	callq	_memcpy
	movq	_COMMAND_RECONFIG_DATA_SUBMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	_s10_svc_send_msg
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movq	%r13, %rcx
	jmp	LBB0_10
LBB0_8:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_dev_err
	movl	(%r14), %edi
	addq	(%r15), %rbx
	movq	%rbx, %rsi
	callq	_clear_bit_unlock
LBB0_10:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_SVC_BUFS,8,3               ## @NUM_SVC_BUFS
	.comm	_SVC_BUF_LOCK,4,2               ## @SVC_BUF_LOCK
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.comm	_SVC_BUF_SIZE,8,3               ## @SVC_BUF_SIZE
	.comm	_COMMAND_RECONFIG_DATA_SUBMIT,4,2 ## @COMMAND_RECONFIG_DATA_SUBMIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error while sending data to service layer (%d)"

	.no_dead_strip	_s10_send_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s10_send_buf
_s10_send_buf:                          ; @s10_send_buf
	.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	x23, _NUM_SVC_BUFS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NUM_SVC_BUFS@GOTPAGEOFF]
	ldr	x8, [x23]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x22, x2
	mov	x21, x1
	mov	x26, #0
	mov	x24, #0
	ldr	x19, [x0]
	ldr	x20, [x19, #8]
Lloh2:
	adrp	x25, _SVC_BUF_LOCK@GOTPAGE
Lloh3:
	ldr	x25, [x25, _SVC_BUF_LOCK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	ldr	x8, [x19]
	add	x1, x8, x26
	bl	_test_and_set_bit_lock
	cbz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #1
	ldr	x8, [x23]
	add	x26, x26, #16
	cmp	x24, x8
	b.lo	LBB0_2
; %bb.4:
	cmp	x24, x8
	b.ne	LBB0_7
LBB0_5:
Lloh4:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_6:
	ldr	x8, [x23]
	cmp	x24, x8
	b.eq	LBB0_5
LBB0_7:
Lloh7:
	adrp	x8, _SVC_BUF_SIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SVC_BUF_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x8, x22
	csel	x22, x8, x22, lo
	ldr	x8, [x19]
	add	x8, x8, x24, lsl #4
	ldr	x23, [x8, #8]
	mov	x0, x23
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
Lloh10:
	adrp	x8, _COMMAND_RECONFIG_DATA_SUBMIT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _COMMAND_RECONFIG_DATA_SUBMIT@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	mov	x3, x22
	bl	_s10_svc_send_msg
	tbnz	w0, #31, LBB0_9
; %bb.8:
	mov	x21, x22
	b	LBB0_10
LBB0_9:
	mov	x21, x0
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_err
	ldr	w0, [x25]
	ldr	x8, [x19]
	add	x1, x8, x24, lsl #4
	bl	_clear_bit_unlock
LBB0_10:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_SVC_BUFS,8,3               ; @NUM_SVC_BUFS
	.comm	_SVC_BUF_LOCK,4,2               ; @SVC_BUF_LOCK
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.comm	_SVC_BUF_SIZE,8,3               ; @SVC_BUF_SIZE
	.comm	_COMMAND_RECONFIG_DATA_SUBMIT,4,2 ; @COMMAND_RECONFIG_DATA_SUBMIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error while sending data to service layer (%d)"

	.no_dead_strip	_s10_send_buf
.subsections_via_symbols
