	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda8290_i2c_gate_ctrl
_tda8290_i2c_gate_ctrl:                 ## @tda8290_i2c_gate_ctrl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$32, %rsp
	movq	(%rdi), %rax
	movq	8(%rax), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -24(%rbp)
	movl	$2, -20(%rbp)
	movl	$0, -8(%rbp)
	testl	%esi, %esi
	leaq	_tda8290_i2c_gate_ctrl.tda8290_open(%rip), %rcx
	leaq	_tda8290_i2c_gate_ctrl.tda8290_close(%rip), %rdx
	cmoveq	%rcx, %rdx
	movq	%rdx, -16(%rbp)
	movl	(%rax), %edi
	leaq	-24(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.2:
	movl	$20, %edi
	callq	_msleep
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$32, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	2                               ## @tda8290_i2c_gate_ctrl.tda8290_close
_tda8290_i2c_gate_ctrl.tda8290_close:
	.long	33                              ## 0x21
	.long	192                             ## 0xc0

	.p2align	2                               ## @tda8290_i2c_gate_ctrl.tda8290_open
_tda8290_i2c_gate_ctrl.tda8290_open:
	.long	33                              ## 0x21
	.long	128                             ## 0x80

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not access tda8290 I2C gate\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_tda8290_i2c_gate_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda8290_i2c_gate_ctrl
_tda8290_i2c_gate_ctrl:                 ; @tda8290_i2c_gate_ctrl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x8, [x0]
	ldr	x9, [x8, #8]
	ldr	w9, [x9]
	mov	w10, #2
	stp	w9, w10, [sp, #8]
	str	wzr, [sp, #24]
Lloh0:
	adrp	x9, _tda8290_i2c_gate_ctrl.tda8290_close@PAGE
Lloh1:
	add	x9, x9, _tda8290_i2c_gate_ctrl.tda8290_close@PAGEOFF
Lloh2:
	adrp	x10, _tda8290_i2c_gate_ctrl.tda8290_open@PAGE
Lloh3:
	add	x10, x10, _tda8290_i2c_gate_ctrl.tda8290_open@PAGEOFF
	cmp	w1, #0
	csel	x9, x10, x9, eq
	str	x9, [sp, #16]
	ldr	w0, [x8]
	add	x1, sp, #8
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #20
	bl	_msleep
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @tda8290_i2c_gate_ctrl.tda8290_close
_tda8290_i2c_gate_ctrl.tda8290_close:
	.long	33                              ; 0x21
	.long	192                             ; 0xc0

	.p2align	2                               ; @tda8290_i2c_gate_ctrl.tda8290_open
_tda8290_i2c_gate_ctrl.tda8290_open:
	.long	33                              ; 0x21
	.long	128                             ; 0x80

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not access tda8290 I2C gate\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_tda8290_i2c_gate_ctrl
.subsections_via_symbols
