	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ch7017_init
_ch7017_init:                           ## @ch7017_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r12
	movq	%r15, 16(%rbx)
	movq	%rax, 8(%rbx)
	movq	_CH7017_DEVICE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ch7017_read
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	-36(%rbp), %esi
	leal	-128(%rsi), %eax
	cmpl	$3, %eax
	jae	LBB0_3
## %bb.6:
	cltq
	leaq	l_reltable.ch7017_init(%rip), %rcx
	movslq	(%rcx,%rax,4), %rsi
	addq	%rcx, %rsi
	movl	(%r15), %edx
	movl	(%rbx), %ecx
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movl	$1, %r14d
	jmp	LBB0_5
LBB0_3:
	movl	(%r15), %edx
	movl	(%rbx), %ecx
	leaq	L_.str.3(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_4:
	movq	%r12, %rdi
	callq	_kfree
LBB0_5:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_CH7017_DEVICE_ID,4,2           ## @CH7017_DEVICE_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ch7017"

L_.str.1:                               ## @.str.1
	.asciz	"ch7018"

L_.str.2:                               ## @.str.2
	.asciz	"ch7019"

L_.str.3:                               ## @.str.3
	.asciz	"ch701x not detected, got %d: from %s slave %d.\n"

L_.str.4:                               ## @.str.4
	.asciz	"%s detected on %s, addr %d\n"

	.no_dead_strip	_ch7017_init
	.section	__TEXT,__const
	.p2align	2                               ## @reltable.ch7017_init
l_reltable.ch7017_init:
	.long	L_.str.2-l_reltable.ch7017_init
	.long	L_.str.1-l_reltable.ch7017_init
	.long	L_.str-l_reltable.ch7017_init

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ch7017_init
_ch7017_init:                           ; @ch7017_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	stp	x0, x21, [x20, #8]
Lloh3:
	adrp	x8, _CH7017_DEVICE_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CH7017_DEVICE_ID@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #28
	mov	x0, x20
	bl	_ch7017_read
	cbz	w0, LBB0_5
; %bb.2:
	ldr	w8, [sp, #28]
	sub	w9, w8, #128
	cmp	w9, #3
	b.hs	LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, l_switch.table.ch7017_init@PAGE
Lloh7:
	add	x8, x8, l_switch.table.ch7017_init@PAGEOFF
	ldr	x8, [x8, w9, sxtw #3]
	ldr	w9, [x21]
	ldr	w10, [x20]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	w0, #1
	b	LBB0_6
LBB0_4:
	ldr	w9, [x21]
	ldr	w10, [x20]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_5:
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_CH7017_DEVICE_ID,4,2           ; @CH7017_DEVICE_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ch7017"

l_.str.1:                               ; @.str.1
	.asciz	"ch7018"

l_.str.2:                               ; @.str.2
	.asciz	"ch7019"

l_.str.3:                               ; @.str.3
	.asciz	"ch701x not detected, got %d: from %s slave %d.\n"

l_.str.4:                               ; @.str.4
	.asciz	"%s detected on %s, addr %d\n"

	.no_dead_strip	_ch7017_init
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.ch7017_init
l_switch.table.ch7017_init:
	.quad	l_.str.2
	.quad	l_.str.1
	.quad	l_.str

.subsections_via_symbols
