	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dib3000mc_i2c_enumeration      ## -- Begin function dib3000mc_i2c_enumeration
	.p2align	4, 0x90
_dib3000mc_i2c_enumeration:             ## @dib3000mc_i2c_enumeration
	.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	%rcx, %rbx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movq	%r13, 16(%rax)
	testl	%r12d, %r12d
	jle	LBB0_11
## %bb.4:
	movl	%r12d, %r12d
	leaq	_dib3000mc_i2c_enumeration.DIB3000MC_I2C_ADDRESS(%rip), %rdx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_OUTMODE_MPEG2_PAR_CONT_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_dib3000mc_set_output_mode
	leal	1(,%r13,8), %edx
	movq	%r14, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_dib3000mc_write_word
	movl	%r13d, (%r14)
	leaq	1(%r15), %rax
	movq	%r15, %r12
	cmpq	$1, %rax
	leaq	_dib3000mc_i2c_enumeration.DIB3000MC_I2C_ADDRESS(%rip), %rdx
	jbe	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-1(%r12), %r15
	movl	%r15d, %eax
	leaq	(%rbx,%rax,4), %rcx
	movq	%rcx, 8(%r14)
	movl	(%rdx,%rax,4), %r13d
	movl	%r13d, (%r14)
	movq	%r14, %rdi
	callq	_dib3000mc_identify
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_dib3000mc_identify
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	decl	%r12d
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_dprintk
	movq	%r14, %rdi
	callq	_kfree
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_9:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	shlq	$2, %r13
	movq	%rbx, %r12
	xorl	%ebx, %ebx
	movq	_OUTMODE_HIGH_Z@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%r12,%rbx), %rax
	movq	%rax, 8(%r14)
	leaq	_dib3000mc_i2c_enumeration.DIB3000MC_I2C_ADDRESS(%rip), %rax
	movl	(%rbx,%rax), %edx
	movl	%edx, (%r14)
	shll	$3, %edx
	movq	%r14, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_dib3000mc_write_word
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_dib3000mc_set_output_mode
	addq	$4, %rbx
	cmpq	%rbx, %r13
	jne	LBB0_10
LBB0_11:
	movq	%r14, %rdi
	callq	_kfree
	xorl	%eax, %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @dib3000mc_i2c_enumeration.DIB3000MC_I2C_ADDRESS
_dib3000mc_i2c_enumeration.DIB3000MC_I2C_ADDRESS:
	.long	20                              ## 0x14
	.long	22                              ## 0x16
	.long	24                              ## 0x18
	.long	26                              ## 0x1a

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-E-  DiB3000P/MC #%d: not identified\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_OUTMODE_MPEG2_PAR_CONT_CLK,4,2 ## @OUTMODE_MPEG2_PAR_CONT_CLK
	.comm	_OUTMODE_HIGH_Z,4,2             ## @OUTMODE_HIGH_Z
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dib3000mc_i2c_enumeration      ; -- Begin function dib3000mc_i2c_enumeration
	.p2align	2
_dib3000mc_i2c_enumeration:             ; @dib3000mc_i2c_enumeration
	.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	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	str	x23, [x0, #16]
	cmp	w22, #1
	b.lt	LBB0_11
; %bb.2:
	mov	w22, w22
Lloh3:
	adrp	x23, _dib3000mc_i2c_enumeration.DIB3000MC_I2C_ADDRESS@PAGE
Lloh4:
	add	x23, x23, _dib3000mc_i2c_enumeration.DIB3000MC_I2C_ADDRESS@PAGEOFF
Lloh5:
	adrp	x24, _OUTMODE_MPEG2_PAR_CONT_CLK@GOTPAGE
Lloh6:
	ldr	x24, [x24, _OUTMODE_MPEG2_PAR_CONT_CLK@GOTPAGEOFF]
	mov	x27, x22
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	bl	_dib3000mc_set_output_mode
	mov	w2, #1
	bfi	w2, w26, #3, #29
	mov	x0, x19
	mov	w1, #1024
	bl	_dib3000mc_write_word
	str	w26, [x19]
	add	x8, x25, #1
	mov	x27, x25
	cmp	x8, #1
	b.ls	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	x25, x27, #1
	and	x8, x25, #0xffffffff
	lsl	x8, x8, #2
	add	x9, x20, x8
	str	x9, [x19, #8]
	ldr	w26, [x23, x8]
	str	w26, [x19]
	mov	x0, x19
	bl	_dib3000mc_identify
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w21, [x19]
	mov	x0, x19
	bl	_dib3000mc_identify
	cbz	x0, LBB0_3
; %bb.6:
	sub	w1, w27, #1
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	mov	x0, x19
	bl	_kfree
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_9:
Lloh13:
	adrp	x21, _dib3000mc_i2c_enumeration.DIB3000MC_I2C_ADDRESS@PAGE
Lloh14:
	add	x21, x21, _dib3000mc_i2c_enumeration.DIB3000MC_I2C_ADDRESS@PAGEOFF
Lloh15:
	adrp	x23, _OUTMODE_HIGH_Z@GOTPAGE
Lloh16:
	ldr	x23, [x23, _OUTMODE_HIGH_Z@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	str	x20, [x19, #8]
	ldr	w8, [x21], #4
	str	w8, [x19]
	lsl	w2, w8, #3
	mov	x0, x19
	mov	w1, #1024
	bl	_dib3000mc_write_word
	ldr	w1, [x23]
	mov	x0, x19
	bl	_dib3000mc_set_output_mode
	add	x20, x20, #4
	subs	x22, x22, #1
	b.ne	LBB0_10
LBB0_11:
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
LBB0_12:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @dib3000mc_i2c_enumeration.DIB3000MC_I2C_ADDRESS
_dib3000mc_i2c_enumeration.DIB3000MC_I2C_ADDRESS:
	.long	20                              ; 0x14
	.long	22                              ; 0x16
	.long	24                              ; 0x18
	.long	26                              ; 0x1a

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-E-  DiB3000P/MC #%d: not identified\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_OUTMODE_MPEG2_PAR_CONT_CLK,4,2 ; @OUTMODE_MPEG2_PAR_CONT_CLK
	.comm	_OUTMODE_HIGH_Z,4,2             ; @OUTMODE_HIGH_Z
.subsections_via_symbols
