	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_bpmp_serialize_i2c_msg
_tegra_bpmp_serialize_i2c_msg:          ## @tegra_bpmp_serialize_i2c_msg
	.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, -56(%rbp)                 ## 8-byte Spill
	movl	$0, %r12d
	testl	%ecx, %ecx
	je	LBB0_9
## %bb.1:
	movq	%rdx, %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r13
	movl	%ecx, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	cmpq	-64(%rbp), %r15                 ## 8-byte Folded Reload
	je	LBB0_9
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	$0, -44(%rbp)
	leaq	(%r15,%r15,2), %r14
	movl	16(%rbx,%r14,8), %edi
	leaq	-44(%rbp), %rsi
	callq	_tegra_bpmp_xlate_flags
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movb	(%rbx,%r14,8), %al
	leal	1(%r12), %ecx
	movl	%r12d, %edx
	movb	%al, (%r13,%rdx)
	movb	1(%rbx,%r14,8), %al
	leal	2(%r12), %edx
	movb	%al, (%r13,%rcx)
	movb	-44(%rbp), %al
	leal	3(%r12), %ecx
	movb	%al, (%r13,%rdx)
	movb	-43(%rbp), %al
	leal	4(%r12), %edx
	movb	%al, (%r13,%rcx)
	movb	4(%rbx,%r14,8), %al
	leal	5(%r12), %ecx
	movb	%al, (%r13,%rdx)
	movb	5(%rbx,%r14,8), %al
	addl	$6, %r12d
	movb	%al, (%r13,%rcx)
	movq	_SERIALI2C_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	jne	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rbx,%r14,8), %rax
	addq	$4, %rax
	cmpl	$0, (%rax)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %r8
	leaq	(%rbx,%r14,8), %rcx
	addq	$8, %rcx
	movl	%r12d, %esi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	(%rsi,%rdx), %edi
	movq	(%rcx), %rbx
	movzbl	(%rbx,%rdx), %ebx
	movb	%bl, (%r13,%rdi)
	incq	%rdx
	movl	(%rax), %edi
	cmpq	%rdi, %rdx
	jb	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	addl	%edx, %r12d
	movq	%r8, %rbx
	jmp	LBB0_8
LBB0_9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r12d, 8(%rax)
	xorl	%eax, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SERIALI2C_RD,4,2               ## @SERIALI2C_RD
	.no_dead_strip	_tegra_bpmp_serialize_i2c_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_bpmp_serialize_i2c_msg
_tegra_bpmp_serialize_i2c_msg:          ; @tegra_bpmp_serialize_i2c_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	cbz	w3, LBB0_9
; %bb.1:
	mov	x20, x2
	mov	x22, #0
	mov	w21, #0
	ldr	x23, [x19]
	mov	w24, #24
Lloh0:
	adrp	x25, _SERIALI2C_RD@GOTPAGE
Lloh1:
	ldr	x25, [x25, _SERIALI2C_RD@GOTPAGEOFF]
	mov	w26, w3
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	cmp	x22, x26
	b.eq	LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	str	wzr, [sp, #12]
	madd	x8, x22, x24, x20
	ldr	w0, [x8, #16]
	add	x1, sp, #12
	bl	_tegra_bpmp_xlate_flags
	tbnz	w0, #31, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	madd	x8, x22, x24, x20
	ldr	w9, [x8]
	add	w10, w21, #1
	strb	w9, [x23, w21, uxtw]
	ldr	w9, [x8]
	lsr	w9, w9, #8
	add	w11, w21, #2
	strb	w9, [x23, w10, uxtw]
	ldr	w9, [sp, #12]
	add	w10, w21, #3
	strb	w9, [x23, w11, uxtw]
	ldr	w9, [sp, #12]
	lsr	w9, w9, #8
	strb	w9, [x23, w10, uxtw]
	ldr	w9, [x8, #4]!
	add	w10, w21, #4
	add	w11, w21, #5
	strb	w9, [x23, w10, uxtw]
	ldr	w9, [x8]
	lsr	w9, w9, #8
	add	w21, w21, #6
	strb	w9, [x23, w11, uxtw]
	ldr	w9, [sp, #12]
	ldr	w10, [x25]
	tst	w10, w9
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x8]
	cbz	w9, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x9, #0
	madd	x10, x22, x24, x20
	add	x10, x10, #8
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x11, [x10]
	ldrb	w11, [x11, x9]
	add	w12, w21, w9
	strb	w11, [x23, w12, uxtw]
	add	x9, x9, #1
	ldr	w11, [x8]
	cmp	x9, x11
	b.lo	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w21, w21, w9
	b	LBB0_2
LBB0_9:
	mov	w21, #0
LBB0_10:
	mov	w0, #0
	str	w21, [x19, #8]
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SERIALI2C_RD,4,2               ; @SERIALI2C_RD
	.no_dead_strip	_tegra_bpmp_serialize_i2c_msg
.subsections_via_symbols
