	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pch_phub_bin_write
_pch_phub_bin_write:                    ## @pch_phub_bin_write
	.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	%r9, %r15
	movq	%r8, %r12
	movq	%rcx, %r13
	movq	%rsi, %rdi
	callq	_kobj_to_dev
	movl	%eax, %edi
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	_pch_phub_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock_interruptible
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_2:
	movq	_PCH_PHUB_OROM_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%ebx, %ebx
	cmpq	%r12, %rax
	jb	LBB0_11
## %bb.3:
	cmpq	%r15, %rax
	jb	LBB0_11
## %bb.4:
	movl	12(%r14), %edi
	leaq	-52(%rbp), %rsi
	callq	_pci_map_rom
	movl	%eax, 8(%r14)
	testl	%eax, %eax
	je	LBB0_14
## %bb.5:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	testq	%r15, %r15
	je	LBB0_11
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%r12), %rsi
	movq	_PCH_PHUB_OROM_SIZE@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jb	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	addq	(%r14), %rsi
	movq	%r13, %r15
	movsbl	(%r13,%rbx), %edx
	movq	%r14, %rdi
	callq	_pch_phub_write_serial_rom
	testl	%eax, %eax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	incl	%ebx
	cmpq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	movq	%r15, %r13
	jb	LBB0_7
LBB0_11:
	movl	8(%r14), %esi
	movl	12(%r14), %edi
	callq	_pci_unmap_rom
	jmp	LBB0_12
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_9:
	movl	%eax, %r13d
	movl	8(%r14), %esi
	movl	12(%r14), %edi
	callq	_pci_unmap_rom
	movl	%r13d, %ebx
LBB0_12:
	movq	_pch_phub_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pch_phub_mutex,4,2             ## @pch_phub_mutex
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_PCH_PHUB_OROM_SIZE,8,3         ## @PCH_PHUB_OROM_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_pch_phub_bin_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pch_phub_bin_write
_pch_phub_bin_write:                    ; @pch_phub_bin_write
	.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	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x0, x1
	bl	_kobj_to_dev
	bl	_dev_get_drvdata
	mov	x19, x0
Lloh0:
	adrp	x0, _pch_phub_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _pch_phub_mutex@GOTPAGEOFF]
	bl	_mutex_lock_interruptible
	cbz	w0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_6
LBB0_2:
Lloh5:
	adrp	x24, _PCH_PHUB_OROM_SIZE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _PCH_PHUB_OROM_SIZE@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x8, x21
	ccmp	x8, x20, #0, hs
	b.hs	LBB0_7
LBB0_3:
	mov	w23, #0
LBB0_4:
	ldp	w1, w0, [x19, #8]
	bl	_pci_unmap_rom
LBB0_5:
Lloh7:
	adrp	x0, _pch_phub_mutex@GOTPAGE
Lloh8:
	ldr	x0, [x0, _pch_phub_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x23
	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
LBB0_7:
	ldr	w0, [x19, #12]
	add	x1, sp, #12
	bl	_pci_map_rom
	str	w0, [x19, #8]
	cbz	w0, LBB0_14
; %bb.8:
	cbz	x20, LBB0_3
; %bb.9:
	mov	x25, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x24]
	add	x8, x25, x21
	cmp	x9, x8
	b.lo	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x9, [x19]
	add	x1, x8, x9
	ldrsb	w2, [x22, x25]
	mov	x0, x19
	bl	_pch_phub_write_serial_rom
	cbnz	w0, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	add	w25, w25, #1
	cmp	x25, x20
	b.lo	LBB0_10
LBB0_13:
	mov	x23, x25
	b	LBB0_4
LBB0_14:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_5
LBB0_15:
	mov	x23, x0
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_pch_phub_mutex,4,2             ; @pch_phub_mutex
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_PCH_PHUB_OROM_SIZE,8,3         ; @PCH_PHUB_OROM_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_pch_phub_bin_write
.subsections_via_symbols
