	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_sirfsoc_queue_cmd
_i2c_sirfsoc_queue_cmd:                 ## @i2c_sirfsoc_queue_cmd
	.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, %r15
	cmpq	$0, 40(%rdi)
	je	LBB0_9
## %bb.1:
	movl	(%r15), %eax
	xorl	%r12d, %r12d
	cmpl	4(%r15), %eax
	jge	LBB0_8
## %bb.2:
	xorl	%r12d, %r12d
	movq	_SIRFSOC_I2C_CMD_BUF_MAX@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%r15), %rbx
	movl	8(%r15), %edi
	leal	1(%rdi), %eax
	movl	%eax, 8(%r15)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_SIRFSOC_I2C_CMD
	addq	%rax, %rbx
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_writel
	incl	%r12d
	movl	(%r15), %eax
	addl	%r12d, %eax
	cmpl	4(%r15), %eax
	jge	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r15), %eax
	cmpl	(%r13), %eax
	jge	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SIRFSOC_I2C_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%edi, %edi
	callq	_SIRFSOC_I2C_CMD_RP
	movl	%eax, %r14d
	orl	%ebx, %r14d
	movl	(%r15), %eax
	addl	%r12d, %eax
	movl	4(%r15), %ecx
	decl	%ecx
	cmpl	%ecx, %eax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 32(%r15)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SIRFSOC_I2C_STOP@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_SIRFSOC_I2C_NACK@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	jmp	LBB0_7
LBB0_8:
	movl	%r12d, 12(%r15)
	jmp	LBB0_16
LBB0_9:
	movq	_SIRFSOC_I2C_CMD_BUF_MAX@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	decl	%eax
	cmpl	%eax, 8(%r15)
	jge	LBB0_16
## %bb.10:
	movq	_SIRFSOC_I2C_WRITE@GOTPCREL(%rip), %r13
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	24(%r15), %rbx
	movl	8(%r15), %edi
	leal	1(%rdi), %eax
	movl	%eax, 8(%r15)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_SIRFSOC_I2C_CMD
	addq	%rax, %rbx
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_writel
	movq	16(%r15), %rax
	movslq	(%r15), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%r15)
	movl	(%rax,%rcx,4), %r14d
	movq	24(%r15), %rbx
	movl	8(%r15), %edi
	leal	1(%rdi), %eax
	movl	%eax, 8(%r15)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_SIRFSOC_I2C_CMD
	addq	%rax, %rbx
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_writel
	movl	(%r12), %eax
	decl	%eax
	cmpl	%eax, 8(%r15)
	jge	LBB0_16
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %eax
	cmpl	4(%r15), %eax
	jge	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r13), %ebx
	xorl	%edi, %edi
	callq	_SIRFSOC_I2C_CMD_RP
	movl	%eax, %r14d
	orl	%ebx, %r14d
	movl	4(%r15), %eax
	decl	%eax
	cmpl	%eax, (%r15)
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	$0, 32(%r15)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_SIRFSOC_I2C_STOP@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	jmp	LBB0_15
LBB0_16:
	movl	$0, 8(%r15)
	movq	_SIRFSOC_I2C_START_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SIRFSOC_I2C_CMD_START@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r15), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SIRFSOC_I2C_CMD_BUF_MAX,4,2    ## @SIRFSOC_I2C_CMD_BUF_MAX
	.comm	_SIRFSOC_I2C_READ,4,2           ## @SIRFSOC_I2C_READ
	.comm	_SIRFSOC_I2C_STOP,4,2           ## @SIRFSOC_I2C_STOP
	.comm	_SIRFSOC_I2C_NACK,4,2           ## @SIRFSOC_I2C_NACK
	.comm	_SIRFSOC_I2C_WRITE,4,2          ## @SIRFSOC_I2C_WRITE
	.comm	_SIRFSOC_I2C_START_CMD,4,2      ## @SIRFSOC_I2C_START_CMD
	.comm	_SIRFSOC_I2C_CMD_START,8,3      ## @SIRFSOC_I2C_CMD_START
	.no_dead_strip	_i2c_sirfsoc_queue_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_sirfsoc_queue_cmd
_i2c_sirfsoc_queue_cmd:                 ; @i2c_sirfsoc_queue_cmd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_8
; %bb.1:
	ldp	w8, w9, [x19]
	cmp	w8, w9
	b.ge	LBB0_15
; %bb.2:
	mov	w21, #0
Lloh0:
	adrp	x22, _SIRFSOC_I2C_CMD_BUF_MAX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SIRFSOC_I2C_CMD_BUF_MAX@GOTPAGEOFF]
Lloh2:
	adrp	x23, _SIRFSOC_I2C_READ@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SIRFSOC_I2C_READ@GOTPAGEOFF]
Lloh4:
	adrp	x24, _SIRFSOC_I2C_STOP@GOTPAGE
Lloh5:
	ldr	x24, [x24, _SIRFSOC_I2C_STOP@GOTPAGEOFF]
Lloh6:
	adrp	x25, _SIRFSOC_I2C_NACK@GOTPAGE
Lloh7:
	ldr	x25, [x25, _SIRFSOC_I2C_NACK@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x26, [x19, #24]
	ldr	w0, [x19, #8]
	add	w8, w0, #1
	str	w8, [x19, #8]
	bl	_SIRFSOC_I2C_CMD
	add	x1, x0, x26
	mov	x0, x20
	bl	_writel
	add	w21, w21, #1
	ldp	w8, w9, [x19]
	add	w8, w8, w21
	cmp	w8, w9
	b.ge	LBB0_16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #8]
	ldr	w9, [x22]
	cmp	w8, w9
	b.ge	LBB0_16
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w20, [x23]
	mov	w0, #0
	bl	_SIRFSOC_I2C_CMD_RP
	orr	w20, w0, w20
	ldp	w8, w9, [x19]
	sub	w9, w9, #1
	add	w8, w21, w8
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w8, w8, w20
	orr	w20, w8, w9
	b	LBB0_3
LBB0_8:
	ldr	w8, [x19, #8]
Lloh8:
	adrp	x21, _SIRFSOC_I2C_CMD_BUF_MAX@GOTPAGE
Lloh9:
	ldr	x21, [x21, _SIRFSOC_I2C_CMD_BUF_MAX@GOTPAGEOFF]
	ldr	w9, [x21]
	sub	w9, w9, #1
	cmp	w8, w9
	b.ge	LBB0_17
; %bb.9:
Lloh10:
	adrp	x22, _SIRFSOC_I2C_WRITE@GOTPAGE
Lloh11:
	ldr	x22, [x22, _SIRFSOC_I2C_WRITE@GOTPAGEOFF]
Lloh12:
	adrp	x23, _SIRFSOC_I2C_STOP@GOTPAGE
Lloh13:
	ldr	x23, [x23, _SIRFSOC_I2C_STOP@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x24, [x19, #24]
	ldr	w0, [x19, #8]
	add	w8, w0, #1
	str	w8, [x19, #8]
	bl	_SIRFSOC_I2C_CMD
	add	x1, x0, x24
	mov	x0, x20
	bl	_writel
	ldrsw	x8, [x19]
	add	w9, w8, #1
	str	w9, [x19]
	ldp	x9, x24, [x19, #16]
	ldr	w20, [x9, x8, lsl #2]
	ldr	w0, [x19, #8]
	add	w8, w0, #1
	str	w8, [x19, #8]
	bl	_SIRFSOC_I2C_CMD
	add	x1, x0, x24
	mov	x0, x20
	bl	_writel
	ldr	w8, [x19, #8]
	ldr	w9, [x21]
	sub	w9, w9, #1
	cmp	w8, w9
	b.ge	LBB0_17
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldp	w8, w9, [x19]
	cmp	w8, w9
	b.ge	LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w20, [x22]
	mov	w0, #0
	bl	_SIRFSOC_I2C_CMD_RP
	orr	w20, w0, w20
	ldp	w8, w9, [x19]
	sub	w9, w9, #1
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x23]
	orr	w20, w8, w20
	b	LBB0_10
LBB0_15:
	mov	w21, #0
LBB0_16:
	str	w21, [x19, #12]
LBB0_17:
	str	wzr, [x19, #8]
Lloh14:
	adrp	x8, _SIRFSOC_I2C_START_CMD@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SIRFSOC_I2C_START_CMD@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	x8, [x19, #24]
Lloh17:
	adrp	x9, _SIRFSOC_I2C_CMD_START@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SIRFSOC_I2C_CMD_START@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x1, x9, x8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_writel
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SIRFSOC_I2C_CMD_BUF_MAX,4,2    ; @SIRFSOC_I2C_CMD_BUF_MAX
	.comm	_SIRFSOC_I2C_READ,4,2           ; @SIRFSOC_I2C_READ
	.comm	_SIRFSOC_I2C_STOP,4,2           ; @SIRFSOC_I2C_STOP
	.comm	_SIRFSOC_I2C_NACK,4,2           ; @SIRFSOC_I2C_NACK
	.comm	_SIRFSOC_I2C_WRITE,4,2          ; @SIRFSOC_I2C_WRITE
	.comm	_SIRFSOC_I2C_START_CMD,4,2      ; @SIRFSOC_I2C_START_CMD
	.comm	_SIRFSOC_I2C_CMD_START,8,3      ; @SIRFSOC_I2C_CMD_START
	.no_dead_strip	_i2c_sirfsoc_queue_cmd
.subsections_via_symbols
