	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dibx000_init_i2c_master        ## -- Begin function dibx000_init_i2c_master
	.p2align	4, 0x90
_dibx000_init_i2c_master:               ## @dibx000_init_i2c_master
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %rbx
	leaq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_mutex_init
	movq	%r15, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	16(%rbx), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	sarl	%r13d
	movq	16(%rbx), %rax
	movl	%r13d, (%rax)
	movq	$0, 16(%rax)
	movl	24(%rbx), %ecx
	movl	%ecx, 8(%rax)
	movl	$4, 4(%rax)
	movq	%r12, 56(%rbx)
	movq	%r14, 32(%rbx)
	movl	%r13d, (%rbx)
	movq	_DIB7000P@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	sete	%al
	movq	_DIB8000@GOTPCREL(%rip), %rcx
	cmpq	%r12, (%rcx)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %eax
	shll	$8, %eax
	addl	$768, %eax                      ## imm = 0x300
	movl	%eax, 4(%rbx)
	movl	(%r14), %eax
	leaq	48(%rbx), %rdi
	movl	%eax, 48(%rbx)
	movq	_dibx000_i2c_gated_tuner_algo@GOTPCREL(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rcx
	callq	_i2c_adapter_init
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_err
LBB0_4:
	movq	32(%rbx), %rax
	movl	(%rax), %eax
	leaq	44(%rbx), %rdi
	movl	%eax, 44(%rbx)
	movq	_dibx000_i2c_master_gpio12_xfer_algo@GOTPCREL(%rip), %rsi
	leaq	L_.str.3(%rip), %rdx
	movq	%rbx, %rcx
	callq	_i2c_adapter_init
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_err
LBB0_6:
	movq	32(%rbx), %rax
	movl	(%rax), %eax
	leaq	40(%rbx), %rdi
	movl	%eax, 40(%rbx)
	movq	_dibx000_i2c_master_gpio34_xfer_algo@GOTPCREL(%rip), %rsi
	leaq	L_.str.5(%rip), %rdx
	movq	%rbx, %rcx
	callq	_i2c_adapter_init
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_err
LBB0_8:
	movq	32(%rbx), %rax
	movl	(%rax), %eax
	leaq	28(%rbx), %rdi
	movl	%eax, 28(%rbx)
	movq	_dibx000_i2c_gated_gpio67_algo@GOTPCREL(%rip), %rsi
	leaq	L_.str.6(%rip), %rdx
	movq	%rbx, %rcx
	callq	_i2c_adapter_init
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_err
LBB0_10:
	movl	24(%rbx), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_dibx000_i2c_gate_ctrl
	movq	16(%rbx), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_i2c_transfer
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	sete	%bl
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not acquire lock\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DIB7000P,8,3                   ## @DIB7000P
	.comm	_DIB8000,8,3                    ## @DIB8000
	.comm	_dibx000_i2c_gated_tuner_algo,4,2 ## @dibx000_i2c_gated_tuner_algo
L_.str.1:                               ## @.str.1
	.asciz	"DiBX000 tuner I2C bus"

L_.str.2:                               ## @.str.2
	.asciz	"could not initialize the tuner i2c_adapter\n"

	.comm	_dibx000_i2c_master_gpio12_xfer_algo,4,2 ## @dibx000_i2c_master_gpio12_xfer_algo
L_.str.3:                               ## @.str.3
	.asciz	"DiBX000 master GPIO12 I2C bus"

L_.str.4:                               ## @.str.4
	.asciz	"could not initialize the master i2c_adapter\n"

	.comm	_dibx000_i2c_master_gpio34_xfer_algo,4,2 ## @dibx000_i2c_master_gpio34_xfer_algo
L_.str.5:                               ## @.str.5
	.asciz	"DiBX000 master GPIO34 I2C bus"

	.comm	_dibx000_i2c_gated_gpio67_algo,4,2 ## @dibx000_i2c_gated_gpio67_algo
L_.str.6:                               ## @.str.6
	.asciz	"DiBX000 master GPIO67 I2C bus"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dibx000_init_i2c_master        ; -- Begin function dibx000_init_i2c_master
	.p2align	2
_dibx000_init_i2c_master:               ; @dibx000_init_i2c_master
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x23, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_init
	mov	x0, x19
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_10
; %bb.1:
	ldr	x0, [x21, #16]
	mov	w24, #4
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	asr	w8, w23, #1
	ldr	x9, [x21, #16]
	str	xzr, [x9, #16]
	ldr	w10, [x21, #24]
	stp	w24, w10, [x9, #4]
	str	w8, [x9]
	str	x22, [x21, #56]
	str	x20, [x21, #32]
	str	w8, [x21]
Lloh0:
	adrp	x8, _DIB7000P@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DIB7000P@GOTPAGEOFF]
Lloh2:
	adrp	x9, _DIB8000@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DIB8000@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x22
	ccmp	x8, x22, #4, ne
	mov	w8, #768
	mov	w9, #1024
	csel	w8, w9, w8, eq
	str	w8, [x21, #4]
	ldr	w8, [x20]
	mov	x0, x21
	str	w8, [x0, #48]!
Lloh6:
	adrp	x1, _dibx000_i2c_gated_tuner_algo@GOTPAGE
Lloh7:
	ldr	x1, [x1, _dibx000_i2c_gated_tuner_algo@GOTPAGEOFF]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x3, x21
	bl	_i2c_adapter_init
	cbz	x0, LBB0_3
; %bb.2:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
LBB0_3:
	ldr	x8, [x21, #32]
	ldr	w8, [x8]
	mov	x0, x21
	str	w8, [x0, #44]!
Lloh12:
	adrp	x1, _dibx000_i2c_master_gpio12_xfer_algo@GOTPAGE
Lloh13:
	ldr	x1, [x1, _dibx000_i2c_master_gpio12_xfer_algo@GOTPAGEOFF]
Lloh14:
	adrp	x2, l_.str.3@PAGE
Lloh15:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x3, x21
	bl	_i2c_adapter_init
	cbz	x0, LBB0_5
; %bb.4:
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_err
LBB0_5:
	ldr	x8, [x21, #32]
	ldr	w8, [x8]
	mov	x0, x21
	str	w8, [x0, #40]!
Lloh18:
	adrp	x1, _dibx000_i2c_master_gpio34_xfer_algo@GOTPAGE
Lloh19:
	ldr	x1, [x1, _dibx000_i2c_master_gpio34_xfer_algo@GOTPAGEOFF]
Lloh20:
	adrp	x2, l_.str.5@PAGE
Lloh21:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x3, x21
	bl	_i2c_adapter_init
	cbz	x0, LBB0_7
; %bb.6:
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_err
LBB0_7:
	ldr	x8, [x21, #32]
	ldr	w8, [x8]
	mov	x0, x21
	str	w8, [x0, #28]!
Lloh24:
	adrp	x1, _dibx000_i2c_gated_gpio67_algo@GOTPAGE
Lloh25:
	ldr	x1, [x1, _dibx000_i2c_gated_gpio67_algo@GOTPAGEOFF]
Lloh26:
	adrp	x2, l_.str.6@PAGE
Lloh27:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x3, x21
	bl	_i2c_adapter_init
	cbz	x0, LBB0_9
; %bb.8:
Lloh28:
	adrp	x0, l_.str.4@PAGE
Lloh29:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_err
LBB0_9:
	ldr	w1, [x21, #24]
	mov	x0, x21
	mov	w2, #0
	mov	w3, #0
	bl	_dibx000_i2c_gate_ctrl
	ldr	x1, [x21, #16]
	mov	x0, x20
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	cset	w20, eq
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_11
LBB0_10:
Lloh30:
	adrp	x0, l_.str@PAGE
Lloh31:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
Lloh32:
	adrp	x8, _EINVAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not acquire lock\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DIB7000P,8,3                   ; @DIB7000P
	.comm	_DIB8000,8,3                    ; @DIB8000
	.comm	_dibx000_i2c_gated_tuner_algo,4,2 ; @dibx000_i2c_gated_tuner_algo
l_.str.1:                               ; @.str.1
	.asciz	"DiBX000 tuner I2C bus"

l_.str.2:                               ; @.str.2
	.asciz	"could not initialize the tuner i2c_adapter\n"

	.comm	_dibx000_i2c_master_gpio12_xfer_algo,4,2 ; @dibx000_i2c_master_gpio12_xfer_algo
l_.str.3:                               ; @.str.3
	.asciz	"DiBX000 master GPIO12 I2C bus"

l_.str.4:                               ; @.str.4
	.asciz	"could not initialize the master i2c_adapter\n"

	.comm	_dibx000_i2c_master_gpio34_xfer_algo,4,2 ; @dibx000_i2c_master_gpio34_xfer_algo
l_.str.5:                               ; @.str.5
	.asciz	"DiBX000 master GPIO34 I2C bus"

	.comm	_dibx000_i2c_gated_gpio67_algo,4,2 ; @dibx000_i2c_gated_gpio67_algo
l_.str.6:                               ; @.str.6
	.asciz	"DiBX000 master GPIO67 I2C bus"

.subsections_via_symbols
