	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2400m_dev_initialize          ## -- Begin function i2400m_dev_initialize
	.p2align	4, 0x90
_i2400m_dev_initialize:                 ## @i2400m_dev_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
	subq	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_i2400m_dev
	movq	%rax, %r14
	leaq	L_.str(%rip), %rdx
	movl	$3, %edi
	movq	%rax, %rsi
	movq	%r12, %rcx
	callq	_d_fnstart
	movq	_i2400m_passive_mode@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_13
## %bb.1:
	movq	_i2400m_idle_mode_disabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.3:
	movq	%r12, %rdi
	callq	_i2400m_le_v1_3
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_I2400M_TLV_CONFIG_IDLE_PARAMETERS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -152(%rbp)
	movl	$16, %edi
	callq	_cpu_to_le16
	movq	%rax, -160(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -144(%rbp)
	jmp	LBB0_6
LBB0_2:
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_5:
	movq	_I2400M_TLV_CONFIG_IDLE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, -152(%rbp)
	movl	$8, %edi
	callq	_cpu_to_le16
	movq	%rax, -160(%rbp)
	movq	$0, -144(%rbp)
LBB0_6:
	leaq	-160(%rbp), %rax
	movq	%rax, -128(%rbp)
	movl	$1, %r15d
LBB0_7:
	movq	%r12, %rdi
	callq	_i2400m_ge_v1_4
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	_I2400M_TLV_CONFIG_D2H_DATA_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	leaq	-200(%rbp), %r13
	movq	%rax, -192(%rbp)
	movl	$8, %edi
	callq	_cpu_to_le16
	movq	%rax, -200(%rbp)
	movl	$1, -208(%rbp)
	leal	1(%r15), %ebx
	movl	%r15d, %eax
	movq	%r13, -128(%rbp,%rax,8)
	cmpq	$0, (%r12)
	je	LBB0_9
## %bb.10:
	movq	_I2400M_TLV_CONFIG_DL_HOST_REORDER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	leaq	-176(%rbp), %r13
	movq	%rax, -168(%rbp)
	movl	$8, %edi
	callq	_cpu_to_le16
	movq	%rax, -176(%rbp)
	movl	$1, -184(%rbp)
	orl	$2, %r15d
	movl	%ebx, %eax
	movq	%r13, -128(%rbp,%rax,8)
	jmp	LBB0_11
LBB0_9:
	movl	%ebx, %r15d
LBB0_11:
	leaq	-128(%rbp), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_i2400m_set_init_config
	testl	%eax, %eax
	js	LBB0_12
LBB0_13:
	movq	%r12, %rdi
	callq	_i2400m_cmd_get_state
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_15
	jmp	LBB0_14
LBB0_12:
	movl	%eax, %ebx
LBB0_14:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_15:
	leaq	L_.str.2(%rip), %rdx
	movl	$3, %edi
	movq	%r14, %rsi
	movq	%r12, %rcx
	movl	%ebx, %r8d
	callq	_d_fnend
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movl	%ebx, %eax
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(i2400m %p)\n"

	.comm	_i2400m_passive_mode,8,3        ## @i2400m_passive_mode
	.comm	_i2400m_idle_mode_disabled,8,3  ## @i2400m_idle_mode_disabled
	.comm	_I2400M_TLV_CONFIG_IDLE_PARAMETERS,4,2 ## @I2400M_TLV_CONFIG_IDLE_PARAMETERS
	.comm	_I2400M_TLV_CONFIG_IDLE_TIMEOUT,4,2 ## @I2400M_TLV_CONFIG_IDLE_TIMEOUT
	.comm	_I2400M_TLV_CONFIG_D2H_DATA_FORMAT,4,2 ## @I2400M_TLV_CONFIG_D2H_DATA_FORMAT
	.comm	_I2400M_TLV_CONFIG_DL_HOST_REORDER,4,2 ## @I2400M_TLV_CONFIG_DL_HOST_REORDER
L_.str.1:                               ## @.str.1
	.asciz	"failed to initialize the device: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"(i2400m %p) = %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2400m_dev_initialize          ; -- Begin function i2400m_dev_initialize
	.p2align	2
_i2400m_dev_initialize:                 ; @i2400m_dev_initialize
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	bl	_i2400m_dev
	mov	x20, x0
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #3
	mov	x1, x20
	mov	x3, x19
	bl	_d_fnstart
Lloh5:
	adrp	x8, _i2400m_passive_mode@GOTPAGE
Lloh6:
	ldr	x8, [x8, _i2400m_passive_mode@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbnz	x8, LBB0_12
; %bb.1:
Lloh8:
	adrp	x8, _i2400m_idle_mode_disabled@GOTPAGE
Lloh9:
	ldr	x8, [x8, _i2400m_idle_mode_disabled@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_i2400m_le_v1_3
	cbz	x0, LBB0_5
; %bb.3:
Lloh11:
	adrp	x8, _I2400M_TLV_CONFIG_IDLE_PARAMETERS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I2400M_TLV_CONFIG_IDLE_PARAMETERS@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	x0, [sp, #56]
	mov	w0, #16
	bl	_cpu_to_le16
	str	xzr, [sp, #72]
	b	LBB0_6
LBB0_4:
	mov	w21, #0
	b	LBB0_7
LBB0_5:
Lloh14:
	adrp	x8, _I2400M_TLV_CONFIG_IDLE_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _I2400M_TLV_CONFIG_IDLE_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	x0, [sp, #56]
	mov	w0, #8
	bl	_cpu_to_le16
LBB0_6:
	str	x0, [sp, #48]
	str	xzr, [sp, #64]
	add	x8, sp, #48
	str	x8, [sp, #80]
	mov	w21, #1
LBB0_7:
	mov	x0, x19
	bl	_i2400m_ge_v1_4
	cbz	x0, LBB0_11
; %bb.8:
Lloh17:
	adrp	x8, _I2400M_TLV_CONFIG_D2H_DATA_FORMAT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _I2400M_TLV_CONFIG_D2H_DATA_FORMAT@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	add	x8, sp, #24
	add	x25, x8, #8
	str	x0, [sp, #40]
	mov	w0, #8
	bl	_cpu_to_le16
	str	x0, [sp, #32]
	mov	w23, #1
	str	w23, [sp, #24]
	add	w22, w21, #1
	add	x24, sp, #80
	str	x25, [x24, w21, uxtw #3]
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.9:
Lloh20:
	adrp	x8, _I2400M_TLV_CONFIG_DL_HOST_REORDER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _I2400M_TLV_CONFIG_DL_HOST_REORDER@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	mov	x8, sp
	add	x25, x8, #8
	str	x0, [sp, #16]
	mov	w0, #8
	bl	_cpu_to_le16
	str	x0, [sp, #8]
	str	w23, [sp]
	orr	w21, w21, #0x2
	str	x25, [x24, w22, uxtw #3]
	b	LBB0_11
LBB0_10:
	mov	x21, x22
LBB0_11:
	add	x1, sp, #80
	mov	x0, x19
	mov	x2, x21
	bl	_i2400m_set_init_config
	tbnz	w0, #31, LBB0_13
LBB0_12:
	mov	x0, x19
	bl	_i2400m_cmd_get_state
	mov	x21, x0
	tbz	w0, #31, LBB0_15
	b	LBB0_14
LBB0_13:
	mov	x21, x0
LBB0_14:
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_err
LBB0_15:
Lloh25:
	adrp	x2, l_.str.2@PAGE
Lloh26:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w0, #3
	mov	x1, x20
	mov	x3, x19
	mov	x4, x21
	bl	_d_fnend
	ldur	x8, [x29, #-72]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x21
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(i2400m %p)\n"

	.comm	_i2400m_passive_mode,8,3        ; @i2400m_passive_mode
	.comm	_i2400m_idle_mode_disabled,8,3  ; @i2400m_idle_mode_disabled
	.comm	_I2400M_TLV_CONFIG_IDLE_PARAMETERS,4,2 ; @I2400M_TLV_CONFIG_IDLE_PARAMETERS
	.comm	_I2400M_TLV_CONFIG_IDLE_TIMEOUT,4,2 ; @I2400M_TLV_CONFIG_IDLE_TIMEOUT
	.comm	_I2400M_TLV_CONFIG_D2H_DATA_FORMAT,4,2 ; @I2400M_TLV_CONFIG_D2H_DATA_FORMAT
	.comm	_I2400M_TLV_CONFIG_DL_HOST_REORDER,4,2 ; @I2400M_TLV_CONFIG_DL_HOST_REORDER
l_.str.1:                               ; @.str.1
	.asciz	"failed to initialize the device: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"(i2400m %p) = %d\n"

.subsections_via_symbols
