	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function it930x_frontend_attach
_it930x_frontend_attach:                ## @it930x_frontend_attach
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_adap_to_priv
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_adap_to_d
	movq	%rax, %r13
	movq	8(%rax), %r15
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	%r13, %rdi
	movl	$63143, %esi                    ## imm = 0xF6A7
	movl	$7, %edx
	callq	_af9035_wr_reg
	testl	%eax, %eax
	js	LBB0_20
## %bb.1:
	movq	%r13, %rdi
	movl	$61699, %esi                    ## imm = 0xF103
	movl	$7, %edx
	callq	_af9035_wr_reg
	testl	%eax, %eax
	js	LBB0_20
## %bb.2:
	movq	%r13, %rdi
	movl	$55508, %esi                    ## imm = 0xD8D4
	movl	$1, %edx
	movl	$1, %ecx
	callq	_af9035_wr_reg_mask
	testl	%eax, %eax
	js	LBB0_20
## %bb.3:
	movq	%r13, %rdi
	movl	$55509, %esi                    ## imm = 0xD8D5
	movl	$1, %edx
	movl	$1, %ecx
	callq	_af9035_wr_reg_mask
	testl	%eax, %eax
	js	LBB0_20
## %bb.4:
	movq	%r13, %rdi
	movl	$55507, %esi                    ## imm = 0xD8D3
	movl	$1, %edx
	movl	$1, %ecx
	callq	_af9035_wr_reg_mask
	testl	%eax, %eax
	js	LBB0_20
## %bb.5:
	movq	%r13, %rdi
	movl	$55480, %esi                    ## imm = 0xD8B8
	movl	$1, %edx
	movl	$1, %ecx
	callq	_af9035_wr_reg_mask
	testl	%eax, %eax
	js	LBB0_20
## %bb.6:
	movq	%r13, %rdi
	movl	$55481, %esi                    ## imm = 0xD8B9
	movl	$1, %edx
	movl	$1, %ecx
	callq	_af9035_wr_reg_mask
	testl	%eax, %eax
	js	LBB0_20
## %bb.7:
	movq	%r13, %rdi
	movl	$55479, %esi                    ## imm = 0xD8B7
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_af9035_wr_reg_mask
	testl	%eax, %eax
	js	LBB0_20
## %bb.8:
	movl	$200, %edi
	callq	_msleep
	movq	%r13, %rdi
	movl	$55479, %esi                    ## imm = 0xD8B7
	movl	$1, %edx
	movl	$1, %ecx
	callq	_af9035_wr_reg_mask
	testl	%eax, %eax
	js	LBB0_20
## %bb.9:
	leaq	-72(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	leaq	-48(%rbp), %rax
	movq	%rax, -56(%rbp)
	movq	8(%r12), %rax
	movq	%rax, -64(%rbp)
	movq	_SI2168_TS_SERIAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -72(%rbp)
	movq	24(%r14), %rcx
	movslq	(%r12), %rdx
	shlq	$4, %rdx
	movq	%rax, 8(%rcx,%rdx)
	movq	%r14, %rax
	addq	$16, %rax
	movq	%rax, (%rcx,%rdx)
	movq	_it930x_addresses_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movl	(%rax,%rcx,4), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movq	%rbx, %rcx
	movq	%r13, %r8
	callq	_af9035_add_i2c_dev
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.10:
	movq	8(%r12), %rax
	cmpq	$0, (%rax)
	je	LBB0_23
## %bb.11:
	movq	-48(%rbp), %rax
	movq	%rax, 8(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_20:
	movl	%eax, %ebx
LBB0_21:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dev_dbg
LBB0_22:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"adap->id=%d\n"

	.comm	_SI2168_TS_SERIAL,4,2           ## @SI2168_TS_SERIAL
L_.str.1:                               ## @.str.1
	.asciz	"si2168"

	.comm	_it930x_addresses_table,8,3     ## @it930x_addresses_table
	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"failed=%d\n"

	.no_dead_strip	_it930x_frontend_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function it930x_frontend_attach
_it930x_frontend_attach:                ; @it930x_frontend_attach
	.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	x21, x0
	bl	_adap_to_priv
	mov	x20, x0
	mov	x0, x21
	bl	_adap_to_d
	mov	x22, x0
	ldr	x19, [x0, #8]
	ldr	w2, [x21]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	x0, x22
	mov	w1, #63143
	mov	w2, #7
	bl	_af9035_wr_reg
	tbnz	w0, #31, LBB0_12
; %bb.1:
	mov	x0, x22
	mov	w1, #61699
	mov	w2, #7
	bl	_af9035_wr_reg
	tbnz	w0, #31, LBB0_12
; %bb.2:
	mov	x0, x22
	mov	w1, #55508
	mov	w2, #1
	mov	w3, #1
	bl	_af9035_wr_reg_mask
	tbnz	w0, #31, LBB0_12
; %bb.3:
	mov	x0, x22
	mov	w1, #55509
	mov	w2, #1
	mov	w3, #1
	bl	_af9035_wr_reg_mask
	tbnz	w0, #31, LBB0_12
; %bb.4:
	mov	x0, x22
	mov	w1, #55507
	mov	w2, #1
	mov	w3, #1
	bl	_af9035_wr_reg_mask
	tbnz	w0, #31, LBB0_12
; %bb.5:
	mov	x0, x22
	mov	w1, #55480
	mov	w2, #1
	mov	w3, #1
	bl	_af9035_wr_reg_mask
	tbnz	w0, #31, LBB0_12
; %bb.6:
	mov	x0, x22
	mov	w1, #55481
	mov	w2, #1
	mov	w3, #1
	bl	_af9035_wr_reg_mask
	tbnz	w0, #31, LBB0_12
; %bb.7:
	mov	x0, x22
	mov	w1, #55479
	mov	w2, #0
	mov	w3, #1
	bl	_af9035_wr_reg_mask
	tbnz	w0, #31, LBB0_12
; %bb.8:
	mov	w0, #200
	bl	_msleep
	mov	x0, x22
	mov	w1, #55479
	mov	w2, #1
	mov	w3, #1
	bl	_af9035_wr_reg_mask
	tbnz	w0, #31, LBB0_12
; %bb.9:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	mov	x8, sp
	ldr	x9, [x21, #8]
	stp	x9, x8, [sp, #16]
Lloh2:
	adrp	x8, _SI2168_TS_SERIAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SI2168_TS_SERIAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	x8, [x20, #24]
	ldrsw	x10, [x21]
	add	x8, x8, x10, lsl #4
	add	x10, x20, #16
	stp	x10, x9, [x8]
Lloh5:
	adrp	x8, _it930x_addresses_table@GOTPAGE
Lloh6:
	ldr	x8, [x8, _it930x_addresses_table@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x20]
	ldr	w2, [x8, x9, lsl #2]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x3, sp, #8
	mov	x0, x22
	mov	x4, x22
	bl	_af9035_add_i2c_dev
	mov	x23, x0
	cbnz	w0, LBB0_13
; %bb.10:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_15
; %bb.11:
	mov	w23, #0
	ldr	x8, [sp]
	str	x8, [x20, #8]
	b	LBB0_14
LBB0_12:
	mov	x23, x0
LBB0_13:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_dev_dbg
LBB0_14:
	mov	x0, x23
	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_15:
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"adap->id=%d\n"

	.comm	_SI2168_TS_SERIAL,4,2           ; @SI2168_TS_SERIAL
l_.str.1:                               ; @.str.1
	.asciz	"si2168"

	.comm	_it930x_addresses_table,8,3     ; @it930x_addresses_table
	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"failed=%d\n"

	.no_dead_strip	_it930x_frontend_attach
.subsections_via_symbols
