	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __update_table_header
___update_table_header:                 ## @__update_table_header
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_EEPROM_ADDRESS_SIZE@GOTPCREL(%rip), %rax
	movq	_EEPROM_TABLE_HEADER_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	(%rax), %ecx
	movl	%ecx, -32(%rbp)
	movq	%rsi, -24(%rbp)
	movl	$0, -16(%rbp)
	movq	_EEPROM_I2C_TARGET_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -12(%rbp)
	movq	_EEPROM_HDR_START@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rsi)
	addq	$4, %rdi
	movslq	(%rax), %rax
	addq	%rax, %rsi
	callq	___encode_table_header_to_buff
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%eax, %ebx
	testl	%eax, %eax
	jg	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_DRM_ERROR
LBB0_2:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EEPROM_ADDRESS_SIZE,4,2        ## @EEPROM_ADDRESS_SIZE
	.comm	_EEPROM_TABLE_HEADER_SIZE,4,2   ## @EEPROM_TABLE_HEADER_SIZE
	.comm	_EEPROM_I2C_TARGET_ADDR,4,2     ## @EEPROM_I2C_TARGET_ADDR
	.comm	_EEPROM_HDR_START,4,2           ## @EEPROM_HDR_START
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to write EEPROM table header, ret:%d"

	.no_dead_strip	___update_table_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __update_table_header
___update_table_header:                 ; @__update_table_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _EEPROM_ADDRESS_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EEPROM_ADDRESS_SIZE@GOTPAGEOFF]
	ldr	w9, [x8]
Lloh2:
	adrp	x10, _EEPROM_TABLE_HEADER_SIZE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _EEPROM_TABLE_HEADER_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	add	w9, w10, w9
	str	w9, [sp, #8]
	str	x1, [sp, #16]
Lloh5:
	adrp	x9, _EEPROM_I2C_TARGET_ADDR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EEPROM_I2C_TARGET_ADDR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _EEPROM_HDR_START@GOTPAGE
Lloh9:
	ldr	x10, [x10, _EEPROM_HDR_START@GOTPAGEOFF]
	stp	wzr, w9, [sp, #24]
Lloh10:
	ldr	w9, [x10]
	str	w9, [x1]
	add	x0, x0, #4
	ldrsw	x8, [x8]
	add	x1, x1, x8
	bl	___encode_table_header_to_buff
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_transfer
	mov	x19, x0
	cmp	w0, #0
	b.gt	LBB0_2
; %bb.1:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DRM_ERROR
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EEPROM_ADDRESS_SIZE,4,2        ; @EEPROM_ADDRESS_SIZE
	.comm	_EEPROM_TABLE_HEADER_SIZE,4,2   ; @EEPROM_TABLE_HEADER_SIZE
	.comm	_EEPROM_I2C_TARGET_ADDR,4,2     ; @EEPROM_I2C_TARGET_ADDR
	.comm	_EEPROM_HDR_START,4,2           ; @EEPROM_HDR_START
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to write EEPROM table header, ret:%d"

	.no_dead_strip	___update_table_header
.subsections_via_symbols
