	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function loader_init
_loader_init:                           ## @loader_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_ishtp_get_client_data
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_cl_data_to_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_ishtp_cl_link
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_LOADER_CL_TX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ishtp_set_tx_ring_size
	movq	_LOADER_CL_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ishtp_set_rx_ring_size
	movq	%r15, %rdi
	callq	_ishtp_get_ishtp_device
	movq	_loader_ishtp_guid@GOTPCREL(%rip), %rsi
	movl	%eax, %edi
	callq	_ishtp_fw_cl_get_client
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rdi
	callq	_ishtp_get_fw_client_id
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_ishtp_cl_set_fw_client_id
	movq	_ISHTP_CL_CONNECTING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ishtp_set_connection_state
	movq	%r15, %rdi
	callq	_ishtp_cl_connect
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_cl_data_to_dev
	testl	%ebx, %ebx
	js	LBB0_5
## %bb.8:
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r14), %edi
	movq	_loader_cl_event_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ishtp_register_event_cb
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_cl_data_to_dev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	jmp	LBB0_7
LBB0_3:
	movq	%r14, %rdi
	callq	_cl_data_to_dev
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
LBB0_6:
	movq	%r15, %rdi
	callq	_ishtp_cl_unlink
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset flag: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"ishtp_cl_link failed\n"

	.comm	_LOADER_CL_TX_RING_SIZE,4,2     ## @LOADER_CL_TX_RING_SIZE
	.comm	_LOADER_CL_RX_RING_SIZE,4,2     ## @LOADER_CL_RX_RING_SIZE
	.comm	_loader_ishtp_guid,4,2          ## @loader_ishtp_guid
L_.str.2:                               ## @.str.2
	.asciz	"ISH client uuid not found\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_ISHTP_CL_CONNECTING,4,2        ## @ISHTP_CL_CONNECTING
L_.str.3:                               ## @.str.3
	.asciz	"Client connect fail\n"

L_.str.4:                               ## @.str.4
	.asciz	"Client connected\n"

	.comm	_loader_cl_event_cb,4,2         ## @loader_cl_event_cb
	.no_dead_strip	_loader_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function loader_init
_loader_init:                           ; @loader_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_ishtp_get_client_data
	mov	x20, x0
	bl	_cl_data_to_dev
	str	x21, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_ishtp_cl_link
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _LOADER_CL_TX_RING_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LOADER_CL_TX_RING_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ishtp_set_tx_ring_size
Lloh5:
	adrp	x8, _LOADER_CL_RX_RING_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LOADER_CL_RX_RING_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ishtp_set_rx_ring_size
	mov	x0, x19
	bl	_ishtp_get_ishtp_device
Lloh8:
	adrp	x1, _loader_ishtp_guid@GOTPAGE
Lloh9:
	ldr	x1, [x1, _loader_ishtp_guid@GOTPAGEOFF]
	bl	_ishtp_fw_cl_get_client
	cbz	x0, LBB0_5
; %bb.2:
	bl	_ishtp_get_fw_client_id
	mov	x1, x0
	mov	x0, x19
	bl	_ishtp_cl_set_fw_client_id
Lloh10:
	adrp	x8, _ISHTP_CL_CONNECTING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ISHTP_CL_CONNECTING@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ishtp_set_connection_state
	mov	x0, x19
	bl	_ishtp_cl_connect
	mov	x21, x0
	mov	x0, x20
	bl	_cl_data_to_dev
	tbnz	w21, #31, LBB0_6
; %bb.3:
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x20]
Lloh15:
	adrp	x8, _loader_cl_event_cb@GOTPAGE
Lloh16:
	ldr	x8, [x8, _loader_cl_event_cb@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_ishtp_register_event_cb
	mov	w21, #0
	b	LBB0_8
LBB0_4:
	mov	x21, x0
	mov	x0, x20
	bl	_cl_data_to_dev
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_5:
	mov	x0, x20
	bl	_cl_data_to_dev
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh22:
	adrp	x8, _ENOENT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_6:
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
LBB0_7:
	mov	x0, x19
	bl	_ishtp_cl_unlink
LBB0_8:
	mov	x0, 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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset flag: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"ishtp_cl_link failed\n"

	.comm	_LOADER_CL_TX_RING_SIZE,4,2     ; @LOADER_CL_TX_RING_SIZE
	.comm	_LOADER_CL_RX_RING_SIZE,4,2     ; @LOADER_CL_RX_RING_SIZE
	.comm	_loader_ishtp_guid,4,2          ; @loader_ishtp_guid
l_.str.2:                               ; @.str.2
	.asciz	"ISH client uuid not found\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_ISHTP_CL_CONNECTING,4,2        ; @ISHTP_CL_CONNECTING
l_.str.3:                               ; @.str.3
	.asciz	"Client connect fail\n"

l_.str.4:                               ; @.str.4
	.asciz	"Client connected\n"

	.comm	_loader_cl_event_cb,4,2         ; @loader_cl_event_cb
	.no_dead_strip	_loader_init
.subsections_via_symbols
