	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function raydium_i2c_initialize
_raydium_i2c_initialize:                ## @raydium_i2c_initialize
	.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
	movq	%rdi, %r12
	movq	_RM_MAX_RETRIES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.1:
	movq	24(%r12), %r14
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	movq	_RM_MAX_RETRIES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_RM_BOOT_DELAY_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	movq	%r12, %rdi
	callq	_raydium_i2c_check_fw_status
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rax
	movq	_RAYDIUM_TS_BLDR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_RAYDIUM_TS_MAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
	jmp	LBB0_10
LBB0_7:
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.9:
	movq	_RAYDIUM_TS_BLDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movl	%ebx, %r13d
	jmp	LBB0_10
LBB0_8:
	movq	(%r12), %rax
	xorl	%r13d, %r13d
LBB0_10:
	movq	_RAYDIUM_TS_BLDR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	movl	$-1, %edi
	callq	_cpu_to_le32
	movl	%eax, 16(%r12)
	movabsq	$1095216660735, %rax            ## imm = 0xFF000000FF
	movq	%rax, 8(%r12)
	jmp	LBB0_13
LBB0_12:
	movq	%r12, %rdi
	callq	_raydium_i2c_query_ts_info
LBB0_13:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RM_MAX_RETRIES,4,2             ## @RM_MAX_RETRIES
	.comm	_RM_BOOT_DELAY_MS,4,2           ## @RM_BOOT_DELAY_MS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to read 'hello' packet: %d\n"

	.comm	_RAYDIUM_TS_BLDR,8,3            ## @RAYDIUM_TS_BLDR
	.comm	_RAYDIUM_TS_MAIN,8,3            ## @RAYDIUM_TS_MAIN
	.no_dead_strip	_raydium_i2c_initialize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function raydium_i2c_initialize
_raydium_i2c_initialize:                ; @raydium_i2c_initialize
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x24, _RM_MAX_RETRIES@GOTPAGE
Lloh1:
	ldr	x24, [x24, _RM_MAX_RETRIES@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh2:
	adrp	x23, _RAYDIUM_TS_BLDR@GOTPAGE
Lloh3:
	ldr	x23, [x23, _RAYDIUM_TS_BLDR@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	w25, #0
	ldr	x21, [x19, #24]
Lloh4:
	adrp	x26, _RM_BOOT_DELAY_MS@GOTPAGE
Lloh5:
	ldr	x26, [x26, _RM_BOOT_DELAY_MS@GOTPAGEOFF]
Lloh6:
	adrp	x22, l_.str@PAGE
Lloh7:
	add	x22, x22, l_.str@PAGEOFF
Lloh8:
	adrp	x27, _RAYDIUM_TS_MAIN@GOTPAGE
Lloh9:
	ldr	x27, [x27, _RAYDIUM_TS_MAIN@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_dev_err
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w25, w25, #1
	ldr	w8, [x24]
	cmp	w25, w8
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x26]
	bl	_msleep
	mov	x0, x19
	bl	_raydium_i2c_check_fw_status
	mov	x20, x0
	cbnz	w0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19]
	ldr	x9, [x23]
	ldr	x10, [x27]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_3
; %bb.6:
	mov	w20, #0
	b	LBB0_10
LBB0_7:
	cbz	w20, LBB0_9
; %bb.8:
	ldr	x8, [x23]
	str	x8, [x19]
	b	LBB0_10
LBB0_9:
	mov	w20, #0
	ldr	x8, [x19]
LBB0_10:
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	mov	w0, #-1
	bl	_cpu_to_le32
	str	w0, [x19, #16]
	movi	d0, #0x0000ff000000ff
	str	d0, [x19, #8]
	b	LBB0_13
LBB0_12:
	mov	x0, x19
	bl	_raydium_i2c_query_ts_info
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RM_MAX_RETRIES,4,2             ; @RM_MAX_RETRIES
	.comm	_RM_BOOT_DELAY_MS,4,2           ; @RM_BOOT_DELAY_MS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to read 'hello' packet: %d\n"

	.comm	_RAYDIUM_TS_BLDR,8,3            ; @RAYDIUM_TS_BLDR
	.comm	_RAYDIUM_TS_MAIN,8,3            ; @RAYDIUM_TS_MAIN
	.no_dead_strip	_raydium_i2c_initialize
.subsections_via_symbols
