	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_powermac_master_xfer
_i2c_powermac_master_xfer:              ## @i2c_powermac_master_xfer
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_i2c_get_adapdata
	movq	%rax, %r14
	movl	(%rbx), %eax
	movq	_I2C_M_TEN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_2:
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%r13b
	movl	4(%rbx), %r12d
	movq	_I2C_M_REV_DIR_ADDR@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	setne	%r15b
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_pmac_i2c_open
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movb	%r15b, -41(%rbp)                ## 1-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	_pmac_i2c_mode_std@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pmac_i2c_setmode
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	xorl	%ecx, %ecx
	movb	%r13b, %cl
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	(%rcx,%rax,2), %eax
	movb	-41(%rbp), %cl                  ## 1-byte Reload
	xorl	%esi, %esi
	movb	%cl, %sil
	xorl	%eax, %esi
	movl	8(%rbx), %r9d
	movl	12(%rbx), %r8d
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_pmac_i2c_xfer
	movl	%eax, %r12d
LBB0_5:
	movq	%r14, %rdi
	callq	_pmac_i2c_close
	testl	%r12d, %r12d
	movl	$1, %eax
	cmovsl	%r12d, %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_TEN,4,2                  ## @I2C_M_TEN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_I2C_M_REV_DIR_ADDR,4,2         ## @I2C_M_REV_DIR_ADDR
	.comm	_pmac_i2c_mode_std,4,2          ## @pmac_i2c_mode_std
	.no_dead_strip	_i2c_powermac_master_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_powermac_master_xfer
_i2c_powermac_master_xfer:              ; @i2c_powermac_master_xfer
	.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	x20, x1
	bl	_i2c_get_adapdata
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _I2C_M_TEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_M_TEN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	mov	x19, x0
Lloh6:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w22, ne
	ldr	w23, [x20, #4]
Lloh9:
	adrp	x9, _I2C_M_REV_DIR_ADDR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _I2C_M_REV_DIR_ADDR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w24, ne
	mov	w1, #0
	bl	_pmac_i2c_open
	cbnz	w0, LBB0_6
; %bb.3:
Lloh12:
	adrp	x8, _pmac_i2c_mode_std@GOTPAGE
Lloh13:
	ldr	x8, [x8, _pmac_i2c_mode_std@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pmac_i2c_setmode
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.4:
	bfi	w22, w23, #1, #31
	eor	w1, w22, w24
	ldp	w5, w4, [x20, #8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_pmac_i2c_xfer
	mov	x21, x0
LBB0_5:
	mov	x0, x19
	bl	_pmac_i2c_close
	cmp	w21, #0
	csinc	w0, w21, wzr, lt
LBB0_6:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_TEN,4,2                  ; @I2C_M_TEN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_I2C_M_REV_DIR_ADDR,4,2         ; @I2C_M_REV_DIR_ADDR
	.comm	_pmac_i2c_mode_std,4,2          ; @pmac_i2c_mode_std
	.no_dead_strip	_i2c_powermac_master_xfer
.subsections_via_symbols
