	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmstb_i2c_xfer
_brcmstb_i2c_xfer:                      ## @brcmstb_i2c_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r12
	callq	_i2c_get_adapdata
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_brcmstb_i2c_get_xfersz
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	testl	%r14d, %r14d
	jle	LBB0_24
## %bb.1:
	leal	-1(%r14), %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movl	%r14d, %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	incq	%r13
	cmpq	-104(%rbp), %r13                ## 8-byte Folded Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_23
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	leaq	(,%r13,2), %rbx
	addq	%r13, %rbx
	movq	16(%r12,%rbx,8), %r15
	testq	%r15, %r15
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %r9d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$48, %r9d
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12,%rbx,8), %r14d
	movl	4(%r12,%rbx,8), %r8d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	%r14d, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpq	%r12, %r13
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jae	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_I2C_M_NOSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 28(%r12,%rbx,8)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_COND_START_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_COND_NOSTOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_COND_RESTART@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r12,%rbx,8), %rbx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	callq	_brcmstb_set_i2c_start_stop
	movq	_I2C_M_NOSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	testl	%eax, 4(%rbx)
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_brcmstb_i2c_do_addr
	testl	%eax, %eax
	js	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	je	LBB0_22
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r14d, %edi
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_min
	movl	%eax, %r13d
	cmpl	%ebx, %r14d
	jle	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	_COND_RESTART@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r12d
	movq	_COND_NOSTOP@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_14 Depth=2
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -80(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	_COND_NOSTOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_COND_RESTART@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	andl	%eax, %r12d
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=2
	movl	%r12d, %esi
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=2
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_brcmstb_set_i2c_start_stop
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	callq	_brcmstb_i2c_xfer_bsc_data
	testl	%eax, %eax
	js	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	_COND_NOSTOP@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_COND_NOSTART@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movslq	%r13d, %rax
	leaq	(%r15,%rax,4), %r15
	subl	%r13d, %r14d
	jne	LBB0_14
	jmp	LBB0_22
LBB0_20:
	movl	%eax, %r14d
LBB0_24:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_24
LBB0_11:
	movl	%eax, %ebx
	movl	%r13d, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edi
	leaq	(%rax,%rax,2), %rax
	movl	8(%r12,%rax,8), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%ebx, %r14d
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"msg# %d/%d flg %x buf %x len %d\n"

	.comm	_I2C_M_NOSTART,4,2              ## @I2C_M_NOSTART
	.comm	_COND_START_STOP,4,2            ## @COND_START_STOP
	.comm	_COND_RESTART,4,2               ## @COND_RESTART
	.comm	_COND_NOSTOP,4,2                ## @COND_NOSTOP
L_.str.1:                               ## @.str.1
	.asciz	"NACK for addr %2.2x msg#%d rc = %d\n"

	.comm	_COND_NOSTART,4,2               ## @COND_NOSTART
	.no_dead_strip	_brcmstb_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmstb_i2c_xfer
_brcmstb_i2c_xfer:                      ; @brcmstb_i2c_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x25, x1
	bl	_i2c_get_adapdata
	mov	x22, x0
	bl	_brcmstb_i2c_get_xfersz
	subs	w8, w20, #1
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
	b.lt	LBB0_21
; %bb.1:
	mov	x23, x0
	mov	x21, #0
	str	w20, [sp, #20]                  ; 4-byte Folded Spill
	mov	w8, w20
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
Lloh0:
	adrp	x19, _COND_NOSTOP@GOTPAGE
Lloh1:
	ldr	x19, [x19, _COND_NOSTOP@GOTPAGEOFF]
	str	x25, [sp, #32]                  ; 8-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldp	x8, x25, [sp, #24]              ; 16-byte Folded Reload
	cmp	x21, x8
	b.eq	LBB0_22
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	mov	w8, #24
	madd	x26, x21, x8, x25
	ldr	x27, [x26, #16]
	cbz	x27, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w8, #48
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w28, [x26]
	ldr	w0, [x22]
	mov	x20, x26
	ldr	w4, [x20, #4]!
	stp	x8, x28, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	ldr	x24, [sp, #40]                  ; 8-byte Folded Reload
	mov	x3, x24
	bl	_dev_dbg
	cmp	x21, x24
	b.hs	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w8, #24
	madd	x8, x21, x8, x25
	ldr	w8, [x8, #28]
Lloh4:
	adrp	x9, _I2C_M_NOSTART@GOTPAGE
Lloh5:
	ldr	x9, [x9, _I2C_M_NOSTART@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh7:
	adrp	x8, _COND_START_STOP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _COND_START_STOP@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	mvn	w24, w8
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh10:
	adrp	x8, _COND_RESTART@GOTPAGE
Lloh11:
	ldr	x8, [x8, _COND_RESTART@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w24, w9, w8
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	mov	x1, x24
	bl	_brcmstb_set_i2c_start_stop
	ldr	w8, [x20]
Lloh13:
	adrp	x9, _I2C_M_NOSTART@GOTPAGE
Lloh14:
	ldr	x9, [x9, _I2C_M_NOSTART@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	mov	x1, x26
	bl	_brcmstb_i2c_do_addr
	tbnz	w0, #31, LBB0_23
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w28, LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x24
LBB0_14:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x28
	mov	x1, x23
	bl	_min
	mov	x20, x0
	cmp	w28, w23
	b.le	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
Lloh16:
	adrp	x8, _COND_RESTART@GOTPAGE
Lloh17:
	ldr	x8, [x8, _COND_RESTART@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	bic	w8, w25, w8
	ldr	w9, [x19]
	orr	w1, w8, w9
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_14 Depth=2
	mov	x1, x24
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	cmp	x21, x8
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=2
Lloh19:
	adrp	x8, _COND_RESTART@GOTPAGE
Lloh20:
	ldr	x8, [x8, _COND_RESTART@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	bic	w1, w25, w8
LBB0_18:                                ;   in Loop: Header=BB0_14 Depth=2
	mov	x0, x22
	bl	_brcmstb_set_i2c_start_stop
	mov	x0, x22
	mov	x1, x27
	mov	x2, x20
	mov	x3, x26
	bl	_brcmstb_i2c_xfer_bsc_data
	tbnz	w0, #31, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x27, x27, w20, sxtw #2
Lloh22:
	adrp	x8, _COND_NOSTART@GOTPAGE
Lloh23:
	ldr	x8, [x8, _COND_NOSTART@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w25, w9, w8
	subs	w28, w28, w20
	b.ne	LBB0_14
	b	LBB0_2
LBB0_20:
	mov	x20, x0
LBB0_21:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_22:
	ldr	w20, [sp, #20]                  ; 4-byte Folded Reload
	b	LBB0_21
LBB0_23:
	mov	x20, x0
	and	x8, x21, #0xffffffff
	ldr	w0, [x22]
	mov	w9, #24
	madd	x8, x8, x9, x25
	ldr	w2, [x8, #8]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x21
	mov	x4, x20
	bl	_dev_dbg
	b	LBB0_21
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"msg# %d/%d flg %x buf %x len %d\n"

	.comm	_I2C_M_NOSTART,4,2              ; @I2C_M_NOSTART
	.comm	_COND_START_STOP,4,2            ; @COND_START_STOP
	.comm	_COND_RESTART,4,2               ; @COND_RESTART
	.comm	_COND_NOSTOP,4,2                ; @COND_NOSTOP
l_.str.1:                               ; @.str.1
	.asciz	"NACK for addr %2.2x msg#%d rc = %d\n"

	.comm	_COND_NOSTART,4,2               ; @COND_NOSTART
	.no_dead_strip	_brcmstb_i2c_xfer
.subsections_via_symbols
