	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_init_recovery
_i2c_init_recovery:                     ## @i2c_init_recovery
	.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
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.1:
	movq	%rdi, %r14
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	cmpq	$0, 32(%rbx)
	movq	_i2c_generic_scl_recovery@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	je	LBB0_8
## %bb.4:
	cmpq	%rcx, %rax
	jne	LBB0_8
## %bb.5:
	movq	_get_scl_gpio_value@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_set_scl_gpio_value@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.6:
	movq	_get_sda_gpio_value@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	callq	_gpiod_get_direction
	testq	%rax, %rax
	jne	LBB0_15
## %bb.7:
	movq	_set_sda_gpio_value@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	jmp	LBB0_15
LBB0_2:
	leaq	L_.str(%rip), %rdx
LBB0_14:
	leaq	8(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	movq	$0, (%r14)
	jmp	LBB0_15
LBB0_8:
	cmpq	%rcx, %rax
	jne	LBB0_15
## %bb.9:
	leaq	L_.str.1(%rip), %rdx
	cmpl	$0, 20(%rbx)
	je	LBB0_14
## %bb.10:
	cmpl	$0, 16(%rbx)
	je	LBB0_14
## %bb.11:
	cmpl	$0, 12(%rbx)
	jne	LBB0_15
## %bb.12:
	cmpl	$0, 8(%rbx)
	je	LBB0_13
LBB0_15:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_13:
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no recover_bus() found"

	.comm	_i2c_generic_scl_recovery,8,3   ## @i2c_generic_scl_recovery
	.comm	_get_scl_gpio_value,4,2         ## @get_scl_gpio_value
	.comm	_set_scl_gpio_value,4,2         ## @set_scl_gpio_value
	.comm	_get_sda_gpio_value,4,2         ## @get_sda_gpio_value
	.comm	_set_sda_gpio_value,4,2         ## @set_sda_gpio_value
L_.str.1:                               ## @.str.1
	.asciz	"no {get|set}_scl() found"

L_.str.2:                               ## @.str.2
	.asciz	"either get_sda() or set_sda() needed"

L_.str.3:                               ## @.str.3
	.asciz	"Not using recovery: %s\n"

	.no_dead_strip	_i2c_init_recovery
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_init_recovery
_i2c_init_recovery:                     ; @i2c_init_recovery
	.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
	ldr	x20, [x0]
	cbz	x20, LBB0_15
; %bb.1:
	mov	x19, x0
	ldr	x8, [x20]
	cbz	x8, LBB0_9
; %bb.2:
	ldr	x10, [x20, #32]
Lloh0:
	adrp	x9, _i2c_generic_scl_recovery@GOTPAGE
Lloh1:
	ldr	x9, [x9, _i2c_generic_scl_recovery@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x10, #0
	ccmp	x8, x9, #0, ne
	b.eq	LBB0_10
; %bb.3:
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.4:
	ldr	w8, [x20, #20]
	cbz	w8, LBB0_13
; %bb.5:
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_13
; %bb.6:
	ldr	w8, [x20, #12]
	cbnz	w8, LBB0_15
; %bb.7:
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_15
; %bb.8:
Lloh3:
	adrp	x2, l_.str.2@PAGE
Lloh4:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_9:
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_14
LBB0_10:
Lloh7:
	adrp	x8, _get_scl_gpio_value@GOTPAGE
Lloh8:
	ldr	x8, [x8, _get_scl_gpio_value@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _set_scl_gpio_value@GOTPAGE
Lloh11:
	ldr	x9, [x9, _set_scl_gpio_value@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	stp	w8, w9, [x20, #16]
	ldr	x0, [x20, #24]
	cbz	x0, LBB0_15
; %bb.11:
Lloh13:
	adrp	x8, _get_sda_gpio_value@GOTPAGE
Lloh14:
	ldr	x8, [x8, _get_sda_gpio_value@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	bl	_gpiod_get_direction
	cbnz	x0, LBB0_15
; %bb.12:
Lloh16:
	adrp	x8, _set_sda_gpio_value@GOTPAGE
Lloh17:
	ldr	x8, [x8, _set_sda_gpio_value@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	b	LBB0_15
LBB0_13:
Lloh19:
	adrp	x2, l_.str.1@PAGE
Lloh20:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_14:
	add	x0, x19, #8
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	str	xzr, [x19]
LBB0_15:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no recover_bus() found"

	.comm	_i2c_generic_scl_recovery,8,3   ; @i2c_generic_scl_recovery
	.comm	_get_scl_gpio_value,4,2         ; @get_scl_gpio_value
	.comm	_set_scl_gpio_value,4,2         ; @set_scl_gpio_value
	.comm	_get_sda_gpio_value,4,2         ; @get_sda_gpio_value
	.comm	_set_sda_gpio_value,4,2         ; @set_sda_gpio_value
l_.str.1:                               ; @.str.1
	.asciz	"no {get|set}_scl() found"

l_.str.2:                               ; @.str.2
	.asciz	"either get_sda() or set_sda() needed"

l_.str.3:                               ; @.str.3
	.asciz	"Not using recovery: %s\n"

	.no_dead_strip	_i2c_init_recovery
.subsections_via_symbols
