	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function m88ds3103_init
_m88ds3103_init:                        ## @m88ds3103_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	%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	48(%rdi), %r13
	movq	32(%r13), %r15
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	$0, (%r13)
	movq	%r13, %rdi
	movl	$8, %esi
	movl	$1, %edx
	movl	$1, %ecx
	callq	_m88ds3103_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movq	%r13, %rdi
	movl	$4, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_m88ds3103_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	movq	%r13, %rdi
	movl	$35, %esi
	movl	$16, %edx
	xorl	%ecx, %ecx
	callq	_m88ds3103_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.3:
	movl	16(%r13), %edi
	leaq	-44(%rbp), %rdx
	movl	$185, %esi
	callq	_regmap_read
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
LBB0_12:
	leaq	L_.str.9(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%ebx, %r12d
LBB0_26:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	-44(%rbp), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpl	$0, -44(%rbp)
	je	LBB0_5
LBB0_25:
	movl	$1, (%r13)
	movl	$1, 32(%r14)
	movq	_FE_SCALE_NOT_AVAILABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	40(%r14), %rdx
	movq	%rcx, (%rdx)
	movl	$1, 16(%r14)
	movq	(%rax), %rcx
	movq	24(%r14), %rdx
	movq	%rcx, (%rdx)
	movl	$1, (%r14)
	movq	(%rax), %rax
	movq	8(%r14), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_26
LBB0_5:
	movl	16(%r13), %edi
	movl	$7, %esi
	movl	$224, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	movl	16(%r13), %edi
	movl	$7, %esi
	xorl	%edx, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movq	_m88ds3103_ops@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movq	8(%r13), %rax
	movq	_M88RS6000_CHIP_ID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.9:
	movq	_M88RS6000_FIRMWARE@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_M88DS3103_FIRMWARE@GOTPCREL(%rip), %rax
LBB0_10:
	movq	(%rax), %rsi
	leaq	-56(%rbp), %rdi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdx
	callq	_request_firmware
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_12
LBB0_13:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_info
	movl	16(%r13), %edi
	movl	$178, %esi
	movl	$1, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.14:
	movq	-56(%rbp), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jle	LBB0_20
## %bb.15:
	movq	24(%r13), %rax
	movl	(%rax), %edi
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	decl	%edi
	movl	%ebx, %esi
	callq	_min
	movl	16(%r13), %edi
	movq	-56(%rbp), %rcx
	movslq	(%rcx), %rdx
	movslq	%ebx, %rsi
	subq	%rsi, %rdx
	shlq	$2, %rdx
	addq	8(%rcx), %rdx
	movl	$176, %esi
	movl	%eax, %ecx
	callq	_regmap_bulk_write
	testl	%eax, %eax
	jne	LBB0_17
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%ebx, %ecx
	movq	24(%r13), %rax
	movl	(%rax), %edi
	subl	%edi, %ecx
	incl	%ecx
	testl	%ecx, %ecx
	movl	%ecx, %ebx
	jg	LBB0_16
LBB0_20:
	movl	16(%r13), %edi
	movl	$178, %esi
	xorl	%edx, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.21:
	movq	-56(%rbp), %rdi
	callq	_release_firmware
	movl	16(%r13), %edi
	leaq	-44(%rbp), %rdx
	movl	$185, %esi
	callq	_regmap_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.22:
	cmpl	$0, -44(%rbp)
	je	LBB0_23
## %bb.24:
	movq	_m88ds3103_ops@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movl	-44(%rbp), %ecx
	movl	%ecx, %edx
	shrl	$4, %edx
	andl	$15, %edx
	andl	$15, %ecx
	leaq	L_.str.8(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	jmp	LBB0_25
LBB0_17:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_18:
	movq	-56(%rbp), %rdi
	callq	_release_firmware
	jmp	LBB0_12
LBB0_23:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

L_.str.1:                               ## @.str.1
	.asciz	"firmware=%02x\n"

L_.str.2:                               ## @.str.2
	.asciz	"found a '%s' in cold state\n"

	.comm	_m88ds3103_ops,4,2              ## @m88ds3103_ops
	.comm	_M88RS6000_CHIP_ID,8,3          ## @M88RS6000_CHIP_ID
	.comm	_M88RS6000_FIRMWARE,8,3         ## @M88RS6000_FIRMWARE
	.comm	_M88DS3103_FIRMWARE,8,3         ## @M88DS3103_FIRMWARE
L_.str.3:                               ## @.str.3
	.asciz	"firmware file '%s' not found\n"

L_.str.4:                               ## @.str.4
	.asciz	"downloading firmware from file '%s'\n"

L_.str.5:                               ## @.str.5
	.asciz	"firmware download failed %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.6:                               ## @.str.6
	.asciz	"firmware did not run\n"

L_.str.7:                               ## @.str.7
	.asciz	"found a '%s' in warm state\n"

L_.str.8:                               ## @.str.8
	.asciz	"firmware version: %X.%X\n"

	.comm	_FE_SCALE_NOT_AVAILABLE,8,3     ## @FE_SCALE_NOT_AVAILABLE
L_.str.9:                               ## @.str.9
	.asciz	"failed=%d\n"

	.no_dead_strip	_m88ds3103_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function m88ds3103_init
_m88ds3103_init:                        ; @m88ds3103_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x0
	ldr	x21, [x0, #48]
	ldr	x19, [x21, #32]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	str	wzr, [x21]
	mov	x0, x21
	mov	w1, #8
	mov	w2, #1
	mov	w3, #1
	bl	_m88ds3103_update_bits
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.1:
	mov	x0, x21
	mov	w1, #4
	mov	w2, #1
	mov	w3, #0
	bl	_m88ds3103_update_bits
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.2:
	mov	x0, x21
	mov	w1, #35
	mov	w2, #16
	mov	w3, #0
	bl	_m88ds3103_update_bits
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x21, #16]
	add	x2, sp, #28
	mov	w1, #185
	bl	_regmap_read
	mov	x22, x0
	cbz	w0, LBB0_6
LBB0_4:
	str	x22, [sp]
Lloh2:
	adrp	x1, l_.str.9@PAGE
Lloh3:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
LBB0_5:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
LBB0_6:
	ldr	w8, [sp, #28]
	str	x8, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_8
LBB0_7:
	mov	w22, #0
Lloh6:
	adrp	x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FE_SCALE_NOT_AVAILABLE@GOTPAGEOFF]
	ldr	x9, [x8]
	ldr	x10, [x20, #40]
	str	x9, [x10]
	ldr	x9, [x8]
	ldr	x10, [x20, #24]
	str	x9, [x10]
	mov	w9, #1
	str	w9, [x21]
	str	w9, [x20, #32]
	str	w9, [x20, #16]
	str	w9, [x20]
	ldr	x8, [x8]
	ldr	x9, [x20, #8]
	str	x8, [x9]
	b	LBB0_5
LBB0_8:
	ldr	w0, [x21, #16]
	mov	w1, #7
	mov	w2, #224
	bl	_regmap_write
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.9:
	ldr	w0, [x21, #16]
	mov	w1, #7
	mov	w2, #0
	bl	_regmap_write
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.10:
Lloh8:
	adrp	x24, _m88ds3103_ops@GOTPAGE
Lloh9:
	ldr	x24, [x24, _m88ds3103_ops@GOTPAGEOFF]
	ldr	w8, [x24]
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	x8, [x21, #8]
Lloh12:
	adrp	x9, _M88RS6000_CHIP_ID@GOTPAGE
Lloh13:
	ldr	x9, [x9, _M88RS6000_CHIP_ID@GOTPAGEOFF]
Lloh14:
	adrp	x10, _M88RS6000_FIRMWARE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _M88RS6000_FIRMWARE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
Lloh17:
	adrp	x11, _M88DS3103_FIRMWARE@GOTPAGE
Lloh18:
	ldr	x11, [x11, _M88DS3103_FIRMWARE@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	x23, [x8]
	add	x0, sp, #16
	mov	x1, x23
	mov	x2, x19
	bl	_request_firmware
	cbz	w0, LBB0_12
; %bb.11:
	mov	x22, x0
	str	x23, [sp]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_4
LBB0_12:
	str	x23, [sp]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	w0, [x21, #16]
	mov	w1, #178
	mov	w2, #1
	bl	_regmap_write
	mov	x22, x0
	cbnz	w0, LBB0_22
; %bb.13:
	ldr	x8, [sp, #16]
	ldr	w22, [x8]
	cmp	w22, #1
	b.lt	LBB0_17
; %bb.14:
	ldr	x8, [x21, #24]
	ldr	w8, [x8]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	sub	w0, w8, #1
	mov	x1, x22
	bl	_min
	mov	x3, x0
	ldr	w0, [x21, #16]
	ldr	x8, [sp, #16]
	ldr	x9, [x8, #8]
	ldr	w8, [x8]
	sub	w8, w8, w22
	add	x2, x9, w8, sxtw #2
	mov	w1, #176
	bl	_regmap_bulk_write
	cbnz	w0, LBB0_21
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x21, #24]
	ldr	w8, [x8]
	sub	w9, w22, w8
	add	w22, w9, #1
	cmp	w22, #0
	b.gt	LBB0_15
LBB0_17:
	ldr	w0, [x21, #16]
	mov	w1, #178
	mov	w2, #0
	bl	_regmap_write
	mov	x22, x0
	cbnz	w0, LBB0_22
; %bb.18:
	ldr	x0, [sp, #16]
	bl	_release_firmware
	ldr	w0, [x21, #16]
	add	x2, sp, #28
	mov	w1, #185
	bl	_regmap_read
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.19:
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_23
; %bb.20:
	ldr	w8, [x24]
	str	x8, [sp]
Lloh23:
	adrp	x1, l_.str.7@PAGE
Lloh24:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	w8, [sp, #28]
	ubfx	w9, w8, #4, #4
	and	w8, w8, #0xf
	stp	x9, x8, [sp]
Lloh25:
	adrp	x1, l_.str.8@PAGE
Lloh26:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	b	LBB0_7
LBB0_21:
	mov	x23, x0
	str	x23, [sp]
Lloh27:
	adrp	x1, l_.str.5@PAGE
Lloh28:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x22, x23
LBB0_22:
	ldr	x0, [sp, #16]
	bl	_release_firmware
	b	LBB0_4
LBB0_23:
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w22, w8
Lloh32:
	adrp	x1, l_.str.6@PAGE
Lloh33:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

l_.str.1:                               ; @.str.1
	.asciz	"firmware=%02x\n"

l_.str.2:                               ; @.str.2
	.asciz	"found a '%s' in cold state\n"

	.comm	_m88ds3103_ops,4,2              ; @m88ds3103_ops
	.comm	_M88RS6000_CHIP_ID,8,3          ; @M88RS6000_CHIP_ID
	.comm	_M88RS6000_FIRMWARE,8,3         ; @M88RS6000_FIRMWARE
	.comm	_M88DS3103_FIRMWARE,8,3         ; @M88DS3103_FIRMWARE
l_.str.3:                               ; @.str.3
	.asciz	"firmware file '%s' not found\n"

l_.str.4:                               ; @.str.4
	.asciz	"downloading firmware from file '%s'\n"

l_.str.5:                               ; @.str.5
	.asciz	"firmware download failed %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.6:                               ; @.str.6
	.asciz	"firmware did not run\n"

l_.str.7:                               ; @.str.7
	.asciz	"found a '%s' in warm state\n"

l_.str.8:                               ; @.str.8
	.asciz	"firmware version: %X.%X\n"

	.comm	_FE_SCALE_NOT_AVAILABLE,8,3     ; @FE_SCALE_NOT_AVAILABLE
l_.str.9:                               ; @.str.9
	.asciz	"failed=%d\n"

	.no_dead_strip	_m88ds3103_init
.subsections_via_symbols
