	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function static_config_buf_prepare_for_upload
_static_config_buf_prepare_for_upload:  ## @static_config_buf_prepare_for_upload
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r12
	leaq	8(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_sja1105_static_config_check_valid
	movq	_SJA1105_CONFIG_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_sja1105_static_config_pack
	movslq	%r15d, %rbx
	addl	$-4, %r15d
	addq	%r14, %rbx
	movq	_SJA1105_SIZE_TABLE_HEADER@GOTPCREL(%rip), %rax
	subq	(%rax), %rbx
	movq	_UNPACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_sja1105_table_header_packing
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_sja1105_crc32
	movl	%eax, -40(%rbp)
	movq	_PACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_sja1105_table_header_packing
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	(%r12), %rdi
	movq	_sja1105_static_config_error_msg@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %esi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SJA1105_CONFIG_OK,8,3          ## @SJA1105_CONFIG_OK
	.comm	_sja1105_static_config_error_msg,8,3 ## @sja1105_static_config_error_msg
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SJA1105_SIZE_TABLE_HEADER,8,3  ## @SJA1105_SIZE_TABLE_HEADER
	.comm	_UNPACK,4,2                     ## @UNPACK
	.comm	_PACK,4,2                       ## @PACK
	.no_dead_strip	_static_config_buf_prepare_for_upload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function static_config_buf_prepare_for_upload
_static_config_buf_prepare_for_upload:  ; @static_config_buf_prepare_for_upload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	add	x21, x0, #8
	mov	x0, x21
	bl	_sja1105_static_config_check_valid
Lloh0:
	adrp	x8, _SJA1105_CONFIG_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SJA1105_CONFIG_OK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	bl	_sja1105_static_config_pack
	sub	w21, w20, #4
Lloh3:
	adrp	x8, _SJA1105_SIZE_TABLE_HEADER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SJA1105_SIZE_TABLE_HEADER@GOTPAGEOFF]
	add	x9, x19, w20, sxtw
Lloh5:
	ldr	x8, [x8]
	sub	x20, x9, x8
Lloh6:
	adrp	x8, _UNPACK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UNPACK@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x20
	bl	_sja1105_table_header_packing
	mov	x0, x19
	mov	x1, x21
	bl	_sja1105_crc32
	str	w0, [sp, #8]
Lloh9:
	adrp	x8, _PACK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PACK@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x20
	bl	_sja1105_table_header_packing
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	x8, [x22]
Lloh12:
	adrp	x9, _sja1105_static_config_error_msg@GOTPAGE
Lloh13:
	ldr	x9, [x9, _sja1105_static_config_error_msg@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	w1, [x9, x0, lsl #2]
	mov	x0, x8
	bl	_dev_err
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SJA1105_CONFIG_OK,8,3          ; @SJA1105_CONFIG_OK
	.comm	_sja1105_static_config_error_msg,8,3 ; @sja1105_static_config_error_msg
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SJA1105_SIZE_TABLE_HEADER,8,3  ; @SJA1105_SIZE_TABLE_HEADER
	.comm	_UNPACK,4,2                     ; @UNPACK
	.comm	_PACK,4,2                       ; @PACK
	.no_dead_strip	_static_config_buf_prepare_for_upload
.subsections_via_symbols
