	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_bttv_i2c                  ## -- Begin function init_bttv_i2c
	.p2align	4, 0x90
_init_bttv_i2c:                         ## @init_bttv_i2c
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_strscpy
	movq	_i2c_hw@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movl	$1, (%rbx)
	jmp	LBB0_3
LBB0_2:
	cmpl	$0, (%rbx)
	je	LBB0_4
LBB0_3:
	movl	40(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edx
	callq	_strscpy
	movq	_bttv_algo@GOTPCREL(%rip), %rax
	movq	%rax, 72(%rbx)
LBB0_7:
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	40(%rbx), %r14
	movl	%eax, 56(%rbx)
	movq	80(%rbx), %rax
	movq	%rax, 48(%rbx)
	movl	40(%rbx), %edi
	movl	4(%rbx), %ecx
	movl	32(%rbx), %r8d
	cmpl	$0, (%rbx)
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %r9
	cmoveq	%rax, %r9
	leaq	L_.str.3(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	leaq	36(%rbx), %rsi
	movq	%r14, %rdi
	callq	_i2c_set_adapdata
	movq	%r14, 16(%rbx)
	cmpl	$0, (%rbx)
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_i2c_add_adapter
	jmp	LBB0_10
LBB0_9:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_bttv_bit_setscl
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_bttv_bit_setsda
	movq	%r14, %rdi
	callq	_i2c_bit_add_bus
LBB0_10:
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	jne	LBB0_13
## %bb.11:
	movq	_i2c_scan@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_13
## %bb.12:
	leaq	16(%rbx), %rsi
	movl	36(%rbx), %edi
	callq	_do_i2c_scan
	movq	8(%rbx), %rax
LBB0_13:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	_i2c_udelay@GOTPCREL(%rip), %r14
	cmpl	$4, (%r14)
	jg	LBB0_6
## %bb.5:
	movl	$5, (%r14)
LBB0_6:
	movl	40(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$4, %edx
	callq	_strscpy
	leaq	88(%rbx), %rax
	movq	_bttv_i2c_algo_bit_template@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 88(%rbx)
	movl	(%r14), %ecx
	movl	%ecx, 88(%rbx)
	movq	%rbx, 96(%rbx)
	movq	%rax, 64(%rbx)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bttv internal"

	.comm	_I2C_NAME_SIZE,4,2              ## @I2C_NAME_SIZE
	.comm	_i2c_hw,8,3                     ## @i2c_hw
L_.str.1:                               ## @.str.1
	.asciz	"bt878"

	.comm	_bttv_algo,4,2                  ## @bttv_algo
	.comm	_i2c_udelay,4,2                 ## @i2c_udelay
L_.str.2:                               ## @.str.2
	.asciz	"bttv"

	.comm	_bttv_i2c_algo_bit_template,16,3 ## @bttv_i2c_algo_bit_template
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
L_.str.3:                               ## @.str.3
	.asciz	"bt%d #%d [%s]"

L_.str.4:                               ## @.str.4
	.asciz	"hw"

L_.str.5:                               ## @.str.5
	.asciz	"sw"

	.comm	_i2c_scan,8,3                   ## @i2c_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_bttv_i2c                  ; -- Begin function init_bttv_i2c
	.p2align	2
_init_bttv_i2c:                         ; @init_bttv_i2c
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #24]
Lloh0:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strscpy
Lloh5:
	adrp	x8, _i2c_hw@GOTPAGE
Lloh6:
	ldr	x8, [x8, _i2c_hw@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_3
LBB0_2:
	ldr	w8, [x19]
	cbz	w8, LBB0_10
LBB0_3:
	ldr	w0, [x19, #40]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #4
	bl	_strscpy
Lloh10:
	adrp	x8, _bttv_algo@GOTPAGE
Lloh11:
	ldr	x8, [x8, _bttv_algo@GOTPAGEOFF]
	str	x8, [x19, #72]
LBB0_4:
Lloh12:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mov	x20, x19
	ldr	w0, [x20, #40]!
	str	w8, [x19, #56]
	ldr	x8, [x19, #80]
	str	x8, [x19, #48]
	ldr	w4, [x19, #32]
	ldp	w8, w3, [x19]
Lloh15:
	adrp	x9, l_.str.4@PAGE
Lloh16:
	add	x9, x9, l_.str.4@PAGEOFF
Lloh17:
	adrp	x10, l_.str.5@PAGE
Lloh18:
	add	x10, x10, l_.str.5@PAGEOFF
	cmp	w8, #0
	csel	x5, x10, x9, eq
Lloh19:
	adrp	x2, l_.str.3@PAGE
Lloh20:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w1, #4
	bl	_snprintf
	add	x1, x19, #36
	mov	x0, x20
	bl	_i2c_set_adapdata
	str	x20, [x19, #16]
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_i2c_add_adapter
	str	x0, [x19, #8]
	cbz	x0, LBB0_7
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	mov	w1, #1
	bl	_bttv_bit_setscl
	mov	x0, x19
	mov	w1, #1
	bl	_bttv_bit_setsda
	mov	x0, x20
	bl	_i2c_bit_add_bus
	str	x0, [x19, #8]
	cbnz	x0, LBB0_9
LBB0_7:
Lloh21:
	adrp	x8, _i2c_scan@GOTPAGE
Lloh22:
	ldr	x8, [x8, _i2c_scan@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.8:
	add	x1, x19, #16
	ldr	w0, [x19, #36]
	bl	_do_i2c_scan
	ldr	x0, [x19, #8]
LBB0_9:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh24:
	adrp	x20, _i2c_udelay@GOTPAGE
Lloh25:
	ldr	x20, [x20, _i2c_udelay@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #4
	b.gt	LBB0_12
; %bb.11:
	mov	w8, #5
	str	w8, [x20]
LBB0_12:
	ldr	w0, [x19, #40]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #4
	bl	_strscpy
Lloh28:
	adrp	x8, _bttv_i2c_algo_bit_template@GOTPAGE
Lloh29:
	ldr	x8, [x8, _bttv_i2c_algo_bit_template@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	mov	x9, x19
	str	x8, [x9, #88]!
	ldr	w8, [x20]
	str	w8, [x9]
	str	x19, [x19, #96]
	str	x9, [x19, #64]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bttv internal"

	.comm	_I2C_NAME_SIZE,4,2              ; @I2C_NAME_SIZE
	.comm	_i2c_hw,8,3                     ; @i2c_hw
l_.str.1:                               ; @.str.1
	.asciz	"bt878"

	.comm	_bttv_algo,4,2                  ; @bttv_algo
	.comm	_i2c_udelay,4,2                 ; @i2c_udelay
l_.str.2:                               ; @.str.2
	.asciz	"bttv"

	.comm	_bttv_i2c_algo_bit_template,16,3 ; @bttv_i2c_algo_bit_template
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
l_.str.3:                               ; @.str.3
	.asciz	"bt%d #%d [%s]"

l_.str.4:                               ; @.str.4
	.asciz	"hw"

l_.str.5:                               ; @.str.5
	.asciz	"sw"

	.comm	_i2c_scan,8,3                   ; @i2c_scan
.subsections_via_symbols
