	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmc_etr_sync_sg_buf
_tmc_etr_sync_sg_buf:                   ## @tmc_etr_sync_sg_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	32(%rdi), %rax
	movq	(%rax), %r13
	movq	%r13, %rdi
	callq	_tmc_sg_get_data_page_offset
	testq	%rax, %rax
	js	LBB0_1
## %bb.3:
	movq	%rax, %r15
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_tmc_sg_get_data_page_offset
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:
	movq	%r15, 8(%r14)
	cmpq	$0, 24(%r14)
	je	LBB0_7
## %bb.6:
	movq	16(%r14), %rax
	jmp	LBB0_11
LBB0_1:
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	jmp	LBB0_2
LBB0_4:
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
LBB0_2:
	callq	_dev_warn
	movq	$0, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	subq	%r15, %rax
	jae	LBB0_8
## %bb.9:
	movq	16(%r14), %rcx
	jmp	LBB0_10
LBB0_8:
	xorl	%ecx, %ecx
LBB0_10:
	addq	%rcx, %rax
LBB0_11:
	movq	%rax, (%r14)
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%rax, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tmc_sg_table_sync_data_range   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to map RRP %llx to offset\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unable to map RWP %llx to offset\n"

	.no_dead_strip	_tmc_etr_sync_sg_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tmc_etr_sync_sg_buf
_tmc_etr_sync_sg_buf:                   ; @tmc_etr_sync_sg_buf
	.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	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	x20, [x8]
	mov	x0, x20
	bl	_tmc_sg_get_data_page_offset
	tbnz	x0, #63, LBB0_4
; %bb.1:
	mov	x21, x0
	mov	x0, x20
	mov	x1, x22
	bl	_tmc_sg_get_data_page_offset
	tbnz	x0, #63, LBB0_5
; %bb.2:
	str	x21, [x19, #8]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_7
; %bb.3:
	ldr	x2, [x19, #16]
	b	LBB0_11
LBB0_4:
	ldr	w0, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	b	LBB0_6
LBB0_5:
	ldr	w0, [x20]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
LBB0_6:
	bl	_dev_warn
	str	xzr, [x19]
	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
LBB0_7:
	subs	x8, x0, x21
	b.hs	LBB0_9
; %bb.8:
	ldr	x9, [x19, #16]
	b	LBB0_10
LBB0_9:
	mov	x9, #0
LBB0_10:
	add	x2, x8, x9
LBB0_11:
	str	x2, [x19]
	mov	x0, x20
	mov	x1, x21
	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
	b	_tmc_sg_table_sync_data_range
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to map RRP %llx to offset\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unable to map RWP %llx to offset\n"

	.no_dead_strip	_tmc_etr_sync_sg_buf
.subsections_via_symbols
