	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fjes_hw_start_debug            ## -- Begin function fjes_hw_start_debug
	.p2align	4, 0x90
_fjes_hw_start_debug:                   ## @fjes_hw_start_debug
	.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	%rdi, %r14
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	movq	32(%r14), %r15
	movq	24(%r14), %rbx
	movq	_FJES_DEBUG_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
	movl	20(%r14), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	16(%r14), %edx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	(%r14), %edi
	callq	_FJES_DEV_COMMAND_START_DBG_REQ_LEN
	movq	%r15, %rdi
	movq	%rax, (%r15)
	movl	40(%r14), %eax
	movl	%eax, 24(%r15)
	movl	(%r14), %eax
	movl	%eax, 8(%r15)
	movl	(%r14), %eax
	movq	_FJES_DEBUG_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	testl	%eax, %eax
	jle	LBB0_5
## %bb.2:
	movl	%eax, %r12d
	movq	8(%r14), %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_vmalloc_to_page
	movl	%eax, %edi
	callq	_page_to_phys
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_offset_in_page
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	%r15, %rax
	movq	16(%rdi), %rcx
	movq	%rax, (%rcx)
	cmpl	$1, %r12d
	je	LBB0_5
## %bb.3:
	movl	%r12d, %r13d
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_FJES_DEBUG_PAGE_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movslq	%r15d, %rbx
	imulq	%rax, %rbx
	shlq	$2, %rbx
	addq	8(%r14), %rbx
	movq	%rbx, %rdi
	callq	_vmalloc_to_page
	movl	%eax, %edi
	callq	_page_to_phys
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_offset_in_page
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	%r12, %rax
	movq	16(%rdi), %rcx
	movq	%rax, (%rcx,%r15,8)
	incq	%r15
	cmpq	%r15, %r13
	jne	LBB0_4
LBB0_5:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	$0, (%r15)
	movl	$0, 12(%r15)
	callq	_trace_fjes_hw_start_debug_req
	movq	_FJES_CMD_REQ_START_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_fjes_hw_issue_request_command
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_trace_fjes_hw_start_debug
	movq	(%r15), %rax
	movq	_FJES_DEV_COMMAND_START_DBG_RES_LEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.7:
	movq	_FJES_CMD_STATUS_NORMAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_9
## %bb.8:
	xorl	%ebx, %ebx
	cmpl	$132, 12(%r15)
	jne	LBB0_11
	jmp	LBB0_13
LBB0_6:
	movq	_ENOMSG@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str(%rip), %rdi
	callq	_trace_fjes_hw_start_debug_err
	jmp	LBB0_13
LBB0_9:
	cmpl	$129, %ebx
	je	LBB0_14
## %bb.10:
	cmpl	$128, %ebx
LBB0_11:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	leaq	L_.str.1(%rip), %rdi
	callq	_trace_fjes_hw_start_debug_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_FJES_DEBUG_BUFFER_SIZE,4,2     ## @FJES_DEBUG_BUFFER_SIZE
	.comm	_FJES_DEBUG_PAGE_SIZE,4,2       ## @FJES_DEBUG_PAGE_SIZE
	.comm	_FJES_CMD_REQ_START_DEBUG,4,2   ## @FJES_CMD_REQ_START_DEBUG
	.comm	_FJES_DEV_COMMAND_START_DBG_RES_LEN,8,3 ## @FJES_DEV_COMMAND_START_DBG_RES_LEN
	.comm	_ENOMSG,4,2                     ## @ENOMSG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid res_buf"

	.comm	_FJES_CMD_STATUS_NORMAL,4,2     ## @FJES_CMD_STATUS_NORMAL
L_.str.1:                               ## @.str.1
	.asciz	"Busy Timeout"

	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fjes_hw_start_debug            ; -- Begin function fjes_hw_start_debug
	.p2align	2
_fjes_hw_start_debug:                   ; @fjes_hw_start_debug
	.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	x20, x0
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_12
; %bb.1:
	ldp	x19, x21, [x20, #24]
Lloh0:
	adrp	x8, _FJES_DEBUG_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FJES_DEBUG_BUFFER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	ldr	w2, [x20, #20]
	mov	x0, x21
	mov	w1, #0
	bl	_memset
	ldr	w2, [x20, #16]
	mov	x0, x19
	mov	w1, #0
	bl	_memset
	ldr	w0, [x20]
	bl	_FJES_DEV_COMMAND_START_DBG_REQ_LEN
	str	x0, [x21]
	ldr	w8, [x20, #40]
	str	w8, [x21, #24]
	ldr	w8, [x20]
	str	w8, [x21, #8]
	ldr	w8, [x20]
Lloh3:
	adrp	x24, _FJES_DEBUG_PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _FJES_DEBUG_PAGE_SIZE@GOTPAGEOFF]
	ldr	w9, [x24]
	sdiv	w25, w8, w9
	cmp	w25, #1
	b.lt	LBB0_5
; %bb.2:
	ldr	x22, [x20, #8]
	mov	x0, x22
	bl	_vmalloc_to_page
	bl	_page_to_phys
	mov	x23, x0
	mov	x0, x22
	bl	_offset_in_page
	add	x8, x0, x23
	ldr	x9, [x21, #16]
	str	x8, [x9]
	cmp	w25, #1
	b.eq	LBB0_5
; %bb.3:
	mov	w26, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	ldr	x9, [x20, #8]
	mul	w8, w8, w26
	add	x22, x9, w8, sxtw #2
	mov	x0, x22
	bl	_vmalloc_to_page
	bl	_page_to_phys
	mov	x23, x0
	mov	x0, x22
	bl	_offset_in_page
	add	x8, x0, x23
	ldr	x9, [x21, #16]
	str	x8, [x9, x26, lsl #3]
	add	x26, x26, #1
	cmp	x25, x26
	b.ne	LBB0_4
LBB0_5:
	str	xzr, [x19]
	str	wzr, [x19, #12]
	mov	x0, x21
	bl	_trace_fjes_hw_start_debug_req
Lloh5:
	adrp	x8, _FJES_CMD_REQ_START_DEBUG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FJES_CMD_REQ_START_DEBUG@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_fjes_hw_issue_request_command
	mov	x20, x0
	mov	x0, x19
	bl	_trace_fjes_hw_start_debug
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _FJES_DEV_COMMAND_START_DBG_RES_LEN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FJES_DEV_COMMAND_START_DBG_RES_LEN@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.6:
Lloh11:
	adrp	x8, _FJES_CMD_STATUS_NORMAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FJES_CMD_STATUS_NORMAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_10
; %bb.7:
	ldr	w8, [x19, #12]
	cmp	w8, #132
	b.ne	LBB0_12
; %bb.8:
	mov	w19, #0
	b	LBB0_14
LBB0_9:
Lloh14:
	adrp	x8, _ENOMSG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMSG@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w19, w8
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_trace_fjes_hw_start_debug_err
	b	LBB0_14
LBB0_10:
	cmp	w20, #129
	b.eq	LBB0_15
; %bb.11:
	cmp	w20, #128
LBB0_12:
Lloh19:
	adrp	x8, _EPERM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_14:
	mov	x0, x19
	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_15:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_trace_fjes_hw_start_debug_err
Lloh23:
	adrp	x8, _EBUSY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_FJES_DEBUG_BUFFER_SIZE,4,2     ; @FJES_DEBUG_BUFFER_SIZE
	.comm	_FJES_DEBUG_PAGE_SIZE,4,2       ; @FJES_DEBUG_PAGE_SIZE
	.comm	_FJES_CMD_REQ_START_DEBUG,4,2   ; @FJES_CMD_REQ_START_DEBUG
	.comm	_FJES_DEV_COMMAND_START_DBG_RES_LEN,8,3 ; @FJES_DEV_COMMAND_START_DBG_RES_LEN
	.comm	_ENOMSG,4,2                     ; @ENOMSG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid res_buf"

	.comm	_FJES_CMD_STATUS_NORMAL,4,2     ; @FJES_CMD_STATUS_NORMAL
l_.str.1:                               ; @.str.1
	.asciz	"Busy Timeout"

	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
