	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function or51211_load_firmware
_or51211_load_firmware:                 ## @or51211_load_firmware
	.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	$2352, %rsp                     ## imm = 0x930
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	(%rdi), %r12
	movl	8(%rsi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	movl	$17, -2384(%rbp)
	leaq	-2384(%rbp), %rbx
	movq	%r12, %rdi
	movl	$80, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	_i2c_writebytes
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_3:
	leaq	-1804(%rbp), %rdx
	movq	%r12, %rdi
	movl	$80, %esi
	movl	$192, %ecx
	callq	_i2c_readbytes
	testq	%rax, %rax
	je	LBB0_4
## %bb.15:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	movq	(%r14), %rax
	subq	%rax, %rbx
	cmpq	$31, %rbx
	ja	LBB0_14
## %bb.5:
	xorl	%r8d, %r8d
	jmp	LBB0_6
LBB0_14:
	movups	(%rax), %xmm0
	movups	16(%rax), %xmm1
	movaps	%xmm0, -2384(%rbp)
	movaps	%xmm1, -2368(%rbp)
	movups	32(%rax), %xmm0
	movups	48(%rax), %xmm1
	movaps	%xmm0, -2352(%rbp)
	movaps	%xmm1, -2336(%rbp)
	movups	64(%rax), %xmm0
	movups	80(%rax), %xmm1
	movaps	%xmm0, -2320(%rbp)
	movaps	%xmm1, -2304(%rbp)
	movups	96(%rax), %xmm0
	movups	112(%rax), %xmm1
	movaps	%xmm0, -2288(%rbp)
	movaps	%xmm1, -2272(%rbp)
	movups	128(%rax), %xmm0
	movups	144(%rax), %xmm1
	movaps	%xmm0, -2256(%rbp)
	movaps	%xmm1, -2240(%rbp)
	movups	160(%rax), %xmm0
	movups	176(%rax), %xmm1
	movaps	%xmm0, -2224(%rbp)
	movaps	%xmm1, -2208(%rbp)
	movups	192(%rax), %xmm0
	movups	208(%rax), %xmm1
	movaps	%xmm0, -2192(%rbp)
	movaps	%xmm1, -2176(%rbp)
	movups	224(%rax), %xmm0
	movups	240(%rax), %xmm1
	movaps	%xmm0, -2160(%rbp)
	movaps	%xmm1, -2144(%rbp)
	movups	256(%rax), %xmm0
	movups	272(%rax), %xmm1
	movaps	%xmm0, -2128(%rbp)
	movaps	%xmm1, -2112(%rbp)
	movups	288(%rax), %xmm0
	movups	304(%rax), %xmm1
	movaps	%xmm0, -2096(%rbp)
	movaps	%xmm1, -2080(%rbp)
	movups	320(%rax), %xmm0
	movups	336(%rax), %xmm1
	movaps	%xmm0, -2064(%rbp)
	movaps	%xmm1, -2048(%rbp)
	movups	352(%rax), %xmm0
	movups	368(%rax), %xmm1
	movaps	%xmm0, -2032(%rbp)
	movaps	%xmm1, -2016(%rbp)
	movups	384(%rax), %xmm0
	movups	400(%rax), %xmm1
	movaps	%xmm0, -2000(%rbp)
	movaps	%xmm1, -1984(%rbp)
	movups	416(%rax), %xmm0
	movups	432(%rax), %xmm1
	movaps	%xmm0, -1968(%rbp)
	movaps	%xmm1, -1952(%rbp)
	movups	448(%rax), %xmm0
	movups	464(%rax), %xmm1
	movaps	%xmm0, -1936(%rbp)
	movaps	%xmm1, -1920(%rbp)
	movups	480(%rax), %xmm0
	movups	496(%rax), %xmm1
	movaps	%xmm0, -1904(%rbp)
	movaps	%xmm1, -1888(%rbp)
	movups	512(%rax), %xmm0
	movups	528(%rax), %xmm1
	movaps	%xmm0, -1872(%rbp)
	movaps	%xmm1, -1856(%rbp)
	movups	544(%rax), %xmm0
	movups	560(%rax), %xmm1
	movaps	%xmm0, -1840(%rbp)
	movaps	%xmm1, -1824(%rbp)
	movl	$144, %r8d
LBB0_6:
	leaq	-2384(,%r8,4), %rsi
	addq	%rbp, %rsi
	leaq	(%rax,%r8,4), %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdi,%rdx,4), %ecx
	movl	%ecx, (%rsi,%rdx,4)
	incq	%rdx
	cmpq	$1, %rdx
	jne	LBB0_7
## %bb.8:
	cmpq	$31, %rbx
	ja	LBB0_11
## %bb.9:
	leaq	(%r8,%rdx), %rcx
	addq	$3, %rcx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	-12(%rax,%rcx,4), %edx
	movl	%edx, -2396(%rbp,%rcx,4)
	movl	-8(%rax,%rcx,4), %edx
	movl	%edx, -2392(%rbp,%rcx,4)
	movl	-4(%rax,%rcx,4), %edx
	movl	%edx, -2388(%rbp,%rcx,4)
	movl	(%rax,%rcx,4), %edx
	movl	%edx, -2384(%rbp,%rcx,4)
	addq	$4, %rcx
	cmpq	$148, %rcx
	jne	LBB0_10
LBB0_11:
	andq	$-32, %rbx
	xorl	%ecx, %ecx
	cmpq	$-768, %rbx                     ## imm = 0xFD00
	jne	LBB0_12
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	580(%rax,%rcx,4), %edx
	movl	%edx, -1036(%rbp,%rcx,4)
	movl	584(%rax,%rcx,4), %edx
	movl	%edx, -1032(%rbp,%rcx,4)
	movl	588(%rax,%rcx,4), %edx
	movl	%edx, -1028(%rbp,%rcx,4)
	movl	592(%rax,%rcx,4), %edx
	movl	%edx, -1024(%rbp,%rcx,4)
	addq	$4, %rcx
	cmpq	$248, %rcx
	jne	LBB0_16
LBB0_17:
	movq	(%r12), %rax
	movq	%r15, %rdi
	callq	*8(%rax)
	movq	(%r12), %rax
	movl	(%rax), %esi
	leaq	-2384(%rbp), %rdx
	movq	%r12, %rdi
	movl	$585, %ecx                      ## imm = 0x249
	callq	_i2c_writebytes
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movups	580(%rax,%rcx,4), %xmm0
	movups	596(%rax,%rcx,4), %xmm1
	movups	%xmm0, -1036(%rbp,%rcx,4)
	movups	%xmm1, -1020(%rbp,%rcx,4)
	cmpq	$240, %rcx
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movups	612(%rax,%rcx,4), %xmm0
	movups	628(%rax,%rcx,4), %xmm1
	movups	%xmm0, -1004(%rbp,%rcx,4)
	movups	%xmm1, -988(%rbp,%rcx,4)
	addq	$16, %rcx
	jmp	LBB0_12
LBB0_19:
	movl	$1, %edi
	callq	_msleep
	movq	(%r12), %rax
	movl	(%rax), %esi
	movl	$1572, %edx                     ## imm = 0x624
	addq	(%r14), %rdx
	movq	%r12, %rdi
	movl	$8125, %ecx                     ## imm = 0x1FBD
	callq	_i2c_writebytes
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_2
LBB0_21:
	movl	$1, %edi
	callq	_msleep
	movq	(%r12), %rax
	movl	(%rax), %esi
	movq	_run_buf@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	_i2c_writebytes
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_2
LBB0_23:
	movl	$10, %edi
	callq	_msleep
	movq	(%r12), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	_i2c_writebytes
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	leaq	L_.str.6(%rip), %rdi
LBB0_2:
	callq	_pr_warn
	movl	$-1, %eax
LBB0_26:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_28
## %bb.27:
	addq	$2352, %rsp                     ## imm = 0x930
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movl	$10, %edi
	callq	_msleep
	leaq	L_.str.7(%rip), %rdi
	callq	_pr_info
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Firmware is %zu bytes\n"

L_.str.1:                               ## @.str.1
	.asciz	"error eprom addr\n"

L_.str.2:                               ## @.str.2
	.asciz	"error eprom\n"

L_.str.3:                               ## @.str.3
	.asciz	"error 1\n"

L_.str.4:                               ## @.str.4
	.asciz	"error 2\n"

	.comm	_run_buf,8,3                    ## @run_buf
L_.str.5:                               ## @.str.5
	.asciz	"error 3\n"

L_.str.6:                               ## @.str.6
	.asciz	"error 4\n"

L_.str.7:                               ## @.str.7
	.asciz	"Done.\n"

	.no_dead_strip	_or51211_load_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function or51211_load_firmware
_or51211_load_firmware:                 ; @or51211_load_firmware
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #2352
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x19, [x0]
	ldr	w1, [x1, #8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	mov	w8, #17
	str	w8, [sp]
	mov	x22, sp
	mov	x2, sp
	mov	x0, x19
	mov	w1, #80
	mov	w3, #1
	bl	_i2c_writebytes
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_23
LBB0_2:
	add	x2, x22, #580
	mov	x0, x19
	mov	w1, #80
	mov	w3, #192
	bl	_i2c_readbytes
	cbz	x0, LBB0_4
; %bb.3:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_23
LBB0_4:
	ldr	x8, [x20]
	mov	x9, sp
	sub	x10, x9, x8
	cmp	x10, #63
	b.hi	LBB0_6
; %bb.5:
	mov	x10, #0
	b	LBB0_7
LBB0_6:
	ldp	q0, q1, [x8]
	ldp	q2, q3, [x8, #32]
	stp	q0, q1, [sp]
	stp	q2, q3, [sp, #32]
	ldp	q0, q1, [x8, #64]
	ldp	q2, q3, [x8, #96]
	stp	q0, q1, [sp, #64]
	stp	q2, q3, [sp, #96]
	ldp	q0, q1, [x8, #128]
	ldp	q2, q3, [x8, #160]
	stp	q0, q1, [sp, #128]
	stp	q2, q3, [sp, #160]
	ldp	q0, q1, [x8, #192]
	ldp	q2, q3, [x8, #224]
	stp	q0, q1, [sp, #192]
	stp	q2, q3, [sp, #224]
	ldp	q0, q1, [x8, #256]
	ldp	q2, q3, [x8, #288]
	stp	q0, q1, [sp, #256]
	stp	q2, q3, [sp, #288]
	ldp	q0, q1, [x8, #320]
	ldp	q2, q3, [x8, #352]
	stp	q0, q1, [sp, #320]
	stp	q2, q3, [sp, #352]
	ldp	q0, q1, [x8, #384]
	ldp	q2, q3, [x8, #416]
	stp	q0, q1, [sp, #384]
	stp	q2, q3, [sp, #416]
	ldp	q0, q1, [x8, #448]
	ldp	q2, q3, [x8, #480]
	stp	q0, q1, [sp, #448]
	stp	q2, q3, [sp, #480]
	ldp	q0, q1, [x8, #512]
	ldp	q2, q3, [x8, #544]
	stp	q0, q1, [sp, #512]
	mov	w10, #144
	stp	q2, q3, [sp, #544]
LBB0_7:
	lsl	x10, x10, #2
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x8, x10]
	str	w11, [x9, x10]
	add	x10, x10, #4
	cmp	x10, #580
	b.ne	LBB0_8
; %bb.9:
	mov	x10, sp
	sub	x9, x10, x8
	and	x9, x9, #0xffffffffffffffc0
	cmn	x9, #768
	b.ne	LBB0_11
; %bb.10:
	mov	x9, #0
	b	LBB0_13
LBB0_11:
	mov	x11, #0
	add	x12, x10, #1348
	add	x13, x8, #612
	mov	w9, #240
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	x14, x13, x11
	ldp	q0, q1, [x14, #-32]
	ldp	q2, q3, [x14]
	add	x14, x12, x11
	stp	q0, q1, [x14]
	stp	q2, q3, [x14, #32]
	add	x11, x11, #64
	cmp	x11, #960
	b.ne	LBB0_12
LBB0_13:
	add	x10, x10, #1348
	add	x8, x8, #580
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	lsl	x11, x9, #2
	ldr	w12, [x8, x11]
	str	w12, [x10, x11]
	add	x9, x9, #1
	cmp	x9, #248
	b.ne	LBB0_14
; %bb.15:
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	mov	x0, x21
	blr	x8
	ldr	x8, [x19]
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #585
	bl	_i2c_writebytes
	cbz	x0, LBB0_17
; %bb.16:
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_23
LBB0_17:
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x19]
	ldr	w1, [x8]
	ldr	x8, [x20]
	add	x2, x8, #1572
	mov	x0, x19
	mov	w3, #8125
	bl	_i2c_writebytes
	cbz	x0, LBB0_19
; %bb.18:
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_23
LBB0_19:
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x19]
	ldr	w1, [x8]
Lloh13:
	adrp	x20, _run_buf@GOTPAGE
Lloh14:
	ldr	x20, [x20, _run_buf@GOTPAGEOFF]
	ldr	x2, [x20]
	mov	x0, x19
	mov	w3, #2
	bl	_i2c_writebytes
	cbz	x0, LBB0_21
; %bb.20:
Lloh15:
	adrp	x0, l_.str.5@PAGE
Lloh16:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_23
LBB0_21:
	mov	w0, #10
	bl	_msleep
	ldr	x8, [x19]
	ldr	w1, [x8]
	ldr	x2, [x20]
	mov	x0, x19
	mov	w3, #2
	bl	_i2c_writebytes
	cbz	x0, LBB0_26
; %bb.22:
Lloh17:
	adrp	x0, l_.str.6@PAGE
Lloh18:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_23:
	bl	_pr_warn
	mov	w0, #-1
LBB0_24:
	ldur	x8, [x29, #-56]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.25:
	add	sp, sp, #2352
	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
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_26:
	mov	w0, #10
	bl	_msleep
Lloh22:
	adrp	x0, l_.str.7@PAGE
Lloh23:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_info
	mov	w0, #0
	b	LBB0_24
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Firmware is %zu bytes\n"

l_.str.1:                               ; @.str.1
	.asciz	"error eprom addr\n"

l_.str.2:                               ; @.str.2
	.asciz	"error eprom\n"

l_.str.3:                               ; @.str.3
	.asciz	"error 1\n"

l_.str.4:                               ; @.str.4
	.asciz	"error 2\n"

	.comm	_run_buf,8,3                    ; @run_buf
l_.str.5:                               ; @.str.5
	.asciz	"error 3\n"

l_.str.6:                               ; @.str.6
	.asciz	"error 4\n"

l_.str.7:                               ; @.str.7
	.asciz	"Done.\n"

	.no_dead_strip	_or51211_load_firmware
.subsections_via_symbols
