	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function put_scom
_put_scom:                              ## @put_scom
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, -48(%rbp)
	movq	_SCOM_MAX_RETRIES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_1
## %bb.2:
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	leaq	-44(%rbp), %rcx
	callq	_raw_put_scom
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r13d
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	je	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%r12d, %r12d
	jne	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %edi
	movq	_SCOM_FSI2PIB_RESET_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movl	$4, %ecx
	callq	_fsi_device_write
	xorl	%r13d, %r13d
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	testl	%r13d, %r13d
	jne	LBB0_12
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %esi
	movq	%rbx, %rdi
	callq	_handle_fsi2pib_status
	movl	%eax, %r13d
	testl	%r13d, %r13d
	jne	LBB0_12
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_SCOM_STATUS_PIB_RESP_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	-44(%rbp), %esi
	movq	_SCOM_STATUS_PIB_RESP_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	sarl	%cl, %esi
	movq	%rbx, %rdi
	callq	_handle_pib_status
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r13d
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_msleep
	incl	%r12d
	movq	_SCOM_MAX_RETRIES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jl	LBB0_3
	jmp	LBB0_14
LBB0_1:
                                        ## implicit-def: $r13d
LBB0_14:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%r13d, %r13d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_SCOM_MAX_RETRIES,4,2           ## @SCOM_MAX_RETRIES
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SCOM_FSI2PIB_RESET_REG,4,2     ## @SCOM_FSI2PIB_RESET_REG
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SCOM_STATUS_PIB_RESP_MASK,4,2  ## @SCOM_STATUS_PIB_RESP_MASK
	.comm	_SCOM_STATUS_PIB_RESP_SHIFT,4,2 ## @SCOM_STATUS_PIB_RESP_SHIFT
	.no_dead_strip	_put_scom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function put_scom
_put_scom:                              ; @put_scom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	w8, #-1
	str	w8, [sp, #8]
Lloh0:
	adrp	x23, _SCOM_MAX_RETRIES@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SCOM_MAX_RETRIES@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w24, #0
Lloh2:
	adrp	x26, _SCOM_STATUS_PIB_RESP_SHIFT@GOTPAGE
Lloh3:
	ldr	x26, [x26, _SCOM_STATUS_PIB_RESP_SHIFT@GOTPAGEOFF]
Lloh4:
	adrp	x27, _EBUSY@GOTPAGE
Lloh5:
	ldr	x27, [x27, _EBUSY@GOTPAGEOFF]
Lloh6:
	adrp	x28, _ENODEV@GOTPAGE
Lloh7:
	ldr	x28, [x28, _ENODEV@GOTPAGEOFF]
Lloh8:
	adrp	x25, _SCOM_FSI2PIB_RESET_REG@GOTPAGE
Lloh9:
	ldr	x25, [x25, _SCOM_FSI2PIB_RESET_REG@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x3, sp, #12
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_raw_put_scom
	cbz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x22, x0
	ldr	w8, [x28]
	cmn	w0, w8
	ccmp	w24, #0, #0, ne
	b.ne	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x21]
	ldr	w1, [x25]
	add	x2, sp, #8
	mov	w3, #4
	bl	_fsi_device_write
	ldr	w8, [x27]
	neg	w22, w8
	cbnz	w22, LBB0_7
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [sp, #12]
	mov	x0, x21
	bl	_handle_fsi2pib_status
	mov	x22, x0
	cbnz	w22, LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp, #12]
Lloh10:
	adrp	x9, _SCOM_STATUS_PIB_RESP_MASK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SCOM_STATUS_PIB_RESP_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	and	w8, w9, w8
	ldr	w9, [x26]
	asr	w1, w8, w9
	mov	x0, x21
	bl	_handle_pib_status
	mov	x22, x0
	cbz	w0, LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x27]
	cmn	w22, w8
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
	bl	_msleep
	add	w24, w24, #1
	ldr	w8, [x23]
	cmp	w24, w8
	b.lt	LBB0_2
	b	LBB0_10
LBB0_9:
                                        ; implicit-def: $w22
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SCOM_MAX_RETRIES,4,2           ; @SCOM_MAX_RETRIES
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SCOM_FSI2PIB_RESET_REG,4,2     ; @SCOM_FSI2PIB_RESET_REG
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SCOM_STATUS_PIB_RESP_MASK,4,2  ; @SCOM_STATUS_PIB_RESP_MASK
	.comm	_SCOM_STATUS_PIB_RESP_SHIFT,4,2 ; @SCOM_STATUS_PIB_RESP_SHIFT
	.no_dead_strip	_put_scom
.subsections_via_symbols
