	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qup_i2c_bam_xfer
_qup_i2c_bam_xfer:                      ## @qup_i2c_bam_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	_i2c_get_adapdata
	movq	%rax, %r12
	movl	24(%rax), %edi
	callq	_enable_irq
	movq	%r12, %rdi
	callq	_qup_i2c_req_dma
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_QUP_MX_INPUT_CNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	48(%r12), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	_QUP_MX_OUTPUT_CNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	48(%r12), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	_QUP_REPACK_EN@GOTPCREL(%rip), %rax
	movq	_QUP_BAM_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_QUP_IO_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	48(%r12), %rsi
	callq	_writel
	movq	_QUP_OPERATIONAL_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	48(%r12), %rsi
	movl	$768, %edi                      ## imm = 0x300
	callq	_writel
	movq	_QUP_RUN_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_qup_i2c_change_state
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_3
LBB0_2:
	movl	24(%r12), %edi
	callq	_disable_irq
	movq	$0, 16(%r12)
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	(%r12), %edi
	movq	_QUP_I2C_CLK_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	48(%r12), %rsi
	callq	_writel
	movq	%r12, %rdi
	callq	_qup_i2c_bam_clear_tag_buffers
	movl	$0, %ebx
	testl	%r15d, %r15d
	jle	LBB0_2
## %bb.4:
	leal	-1(%r15), %r13d
	movl	%r15d, %r15d
	shlq	$2, %r13
	shlq	$2, %r15
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14), %rsi
	movq	%rsi, 16(%r12)
	xorl	%eax, %eax
	cmpq	%r14, %r13
	sete	%al
	movl	%eax, 4(%r12)
	movq	%r12, %rdi
	callq	_qup_i2c_bam_make_desc
	testl	%eax, %eax
	jne	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r12), %rax
	cmpq	%rax, 40(%r12)
	jg	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%rax, 32(%r12)
	jg	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, 4(%r12)
	je	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_qup_i2c_bam_schedule_desc
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_qup_i2c_bam_clear_tag_buffers
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	addq	$4, %r14
	xorl	%ebx, %ebx
	cmpq	%r14, %r15
	jne	LBB0_5
	jmp	LBB0_2
LBB0_13:
	movl	%eax, %ebx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_QUP_MX_INPUT_CNT,8,3           ## @QUP_MX_INPUT_CNT
	.comm	_QUP_MX_OUTPUT_CNT,8,3          ## @QUP_MX_OUTPUT_CNT
	.comm	_QUP_REPACK_EN,4,2              ## @QUP_REPACK_EN
	.comm	_QUP_BAM_MODE,4,2               ## @QUP_BAM_MODE
	.comm	_QUP_IO_MODE,8,3                ## @QUP_IO_MODE
	.comm	_QUP_OPERATIONAL_MASK,8,3       ## @QUP_OPERATIONAL_MASK
	.comm	_QUP_RUN_STATE,4,2              ## @QUP_RUN_STATE
	.comm	_QUP_I2C_CLK_CTL,8,3            ## @QUP_I2C_CLK_CTL
	.no_dead_strip	_qup_i2c_bam_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qup_i2c_bam_xfer
_qup_i2c_bam_xfer:                      ; @qup_i2c_bam_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	x21, x2
	mov	x20, x1
	bl	_i2c_get_adapdata
	mov	x19, x0
	ldr	w0, [x0, #24]
	bl	_enable_irq
	mov	x0, x19
	bl	_qup_i2c_req_dma
	mov	x22, x0
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x19, #48]
Lloh0:
	adrp	x9, _QUP_MX_INPUT_CNT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QUP_MX_INPUT_CNT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #48]
Lloh3:
	adrp	x9, _QUP_MX_OUTPUT_CNT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QUP_MX_OUTPUT_CNT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
Lloh6:
	adrp	x8, _QUP_REPACK_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QUP_REPACK_EN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _QUP_BAM_MODE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _QUP_BAM_MODE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x8, [x19, #48]
Lloh12:
	adrp	x9, _QUP_IO_MODE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _QUP_IO_MODE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #48]
Lloh15:
	adrp	x9, _QUP_OPERATIONAL_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _QUP_OPERATIONAL_MASK@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #768
	bl	_writel
Lloh18:
	adrp	x8, _QUP_RUN_STATE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _QUP_RUN_STATE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qup_i2c_change_state
	mov	x22, x0
	cbz	w0, LBB0_3
LBB0_2:
	ldr	w0, [x19, #24]
	bl	_disable_irq
	str	xzr, [x19, #16]
	mov	x0, x22
	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
LBB0_3:
	ldr	w0, [x19]
	ldr	x8, [x19, #48]
Lloh21:
	adrp	x9, _QUP_I2C_CLK_CTL@GOTPAGE
Lloh22:
	ldr	x9, [x9, _QUP_I2C_CLK_CTL@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x19
	bl	_qup_i2c_bam_clear_tag_buffers
	subs	w23, w21, #1
	b.lt	LBB0_13
; %bb.4:
	mov	w21, w21
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	str	x20, [x19, #16]
	cmp	x23, #0
	cset	w8, eq
	str	w8, [x19, #4]
	mov	x0, x19
	mov	x1, x20
	bl	_qup_i2c_bam_make_desc
	cbnz	w0, LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x19, #40]
	ldr	x8, [x19, #8]
	cmp	x9, x8
	b.gt	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x19, #32]
	cmp	x9, x8
	b.gt	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_qup_i2c_bam_schedule_desc
	cbnz	w0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_qup_i2c_bam_clear_tag_buffers
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w22, #0
	sub	x23, x23, #1
	add	x20, x20, #4
	subs	x21, x21, #1
	b.ne	LBB0_5
	b	LBB0_2
LBB0_12:
	mov	x22, x0
	b	LBB0_2
LBB0_13:
	mov	w22, #0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_QUP_MX_INPUT_CNT,8,3           ; @QUP_MX_INPUT_CNT
	.comm	_QUP_MX_OUTPUT_CNT,8,3          ; @QUP_MX_OUTPUT_CNT
	.comm	_QUP_REPACK_EN,4,2              ; @QUP_REPACK_EN
	.comm	_QUP_BAM_MODE,4,2               ; @QUP_BAM_MODE
	.comm	_QUP_IO_MODE,8,3                ; @QUP_IO_MODE
	.comm	_QUP_OPERATIONAL_MASK,8,3       ; @QUP_OPERATIONAL_MASK
	.comm	_QUP_RUN_STATE,4,2              ; @QUP_RUN_STATE
	.comm	_QUP_I2C_CLK_CTL,8,3            ; @QUP_I2C_CLK_CTL
	.no_dead_strip	_qup_i2c_bam_xfer
.subsections_via_symbols
