	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_twsi_reset                 ## -- Begin function qib_twsi_reset
	.p2align	4, 0x90
_qib_twsi_reset:                        ## @qib_twsi_reset
	.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
	movq	%rdi, %rbx
	movb	(%rdi), %cl
	movb	8(%rdi), %al
	movl	$1, %r14d
	movl	$1, %edx
	shlq	%cl, %rdx
	movl	%eax, %ecx
	shlq	%cl, %r14
	orl	%edx, %r14d
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	callq	*16(%rdi)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sda_in
	movl	%eax, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sda_in
	movl	%eax, %r12d
	orl	%r15d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sda_in
	movl	%eax, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sda_in
	movl	%eax, %r15d
	orl	%r13d, %r15d
	orl	%r12d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sda_in
	movl	%eax, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sda_in
	movl	%eax, %r13d
	orl	%r12d, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sda_in
	movl	%eax, %r12d
	orl	%r13d, %r12d
	orl	%r15d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sda_in
	movl	%eax, %r13d
	orl	%r12d, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_scl_out
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sda_in
	movl	%eax, %r15d
	orl	%r13d, %r15d
	je	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	*16(%rbx)
	andl	%r14d, %eax
	cmpl	%r14d, %eax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_qib_dev_err
LBB0_3:
	movl	$1, %edi
	callq	_udelay
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sda_out
	movl	$1, %edi
	callq	_udelay
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_sda_out
	movq	_TWSI_BUF_WAIT_USEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_udelay
LBB0_4:
	xorl	%eax, %eax
	testl	%r15d, %r15d
	sete	%al
	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	"GPIO pins not at rest: %d\n"

	.comm	_TWSI_BUF_WAIT_USEC,4,2         ## @TWSI_BUF_WAIT_USEC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_twsi_reset                 ; -- Begin function qib_twsi_reset
	.p2align	2
_qib_twsi_reset:                        ; @qib_twsi_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	mov	w8, #1
	ldp	x9, x10, [x0]
	lsl	x9, x8, x9
	lsl	x8, x8, x10
	orr	w20, w8, w9
	ldr	x8, [x0, #16]
	mov	w1, #0
	mov	w2, #0
	mov	x3, x20
	blr	x8
	mov	x0, x19
	mov	w1, #0
	bl	_scl_out
	mov	x0, x19
	mov	w1, #1
	bl	_scl_out
	mov	x0, x19
	mov	w1, #0
	bl	_sda_in
	mov	x21, x0
	mov	x0, x19
	mov	w1, #0
	bl	_scl_out
	mov	x0, x19
	mov	w1, #1
	bl	_scl_out
	mov	x0, x19
	mov	w1, #0
	bl	_sda_in
	orr	w21, w0, w21
	mov	x0, x19
	mov	w1, #0
	bl	_scl_out
	mov	x0, x19
	mov	w1, #1
	bl	_scl_out
	mov	x0, x19
	mov	w1, #0
	bl	_sda_in
	orr	w21, w0, w21
	mov	x0, x19
	mov	w1, #0
	bl	_scl_out
	mov	x0, x19
	mov	w1, #1
	bl	_scl_out
	mov	x0, x19
	mov	w1, #0
	bl	_sda_in
	orr	w21, w0, w21
	mov	x0, x19
	mov	w1, #0
	bl	_scl_out
	mov	x0, x19
	mov	w1, #1
	bl	_scl_out
	mov	x0, x19
	mov	w1, #0
	bl	_sda_in
	orr	w21, w0, w21
	mov	x0, x19
	mov	w1, #0
	bl	_scl_out
	mov	x0, x19
	mov	w1, #1
	bl	_scl_out
	mov	x0, x19
	mov	w1, #0
	bl	_sda_in
	orr	w21, w0, w21
	mov	x0, x19
	mov	w1, #0
	bl	_scl_out
	mov	x0, x19
	mov	w1, #1
	bl	_scl_out
	mov	x0, x19
	mov	w1, #0
	bl	_sda_in
	orr	w21, w0, w21
	mov	x0, x19
	mov	w1, #0
	bl	_scl_out
	mov	x0, x19
	mov	w1, #1
	bl	_scl_out
	mov	x0, x19
	mov	w1, #0
	bl	_sda_in
	orr	w21, w0, w21
	mov	x0, x19
	mov	w1, #0
	bl	_scl_out
	mov	x0, x19
	mov	w1, #1
	bl	_scl_out
	mov	x0, x19
	mov	w1, #0
	bl	_sda_in
	orr	w21, w0, w21
	cbz	w21, LBB0_4
; %bb.1:
	ldr	x8, [x19, #16]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	blr	x8
	and	w2, w0, w20
	cmp	w2, w20
	b.eq	LBB0_3
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_qib_dev_err
LBB0_3:
	mov	w0, #1
	bl	_udelay
	mov	x0, x19
	mov	w1, #0
	bl	_sda_out
	mov	w0, #1
	bl	_udelay
	mov	x0, x19
	mov	w1, #1
	bl	_sda_out
Lloh2:
	adrp	x8, _TWSI_BUF_WAIT_USEC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TWSI_BUF_WAIT_USEC@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_udelay
LBB0_4:
	cmp	w21, #0
	cset	w0, eq
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GPIO pins not at rest: %d\n"

	.comm	_TWSI_BUF_WAIT_USEC,4,2         ; @TWSI_BUF_WAIT_USEC
.subsections_via_symbols
