	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function api_cmd_status_update
_api_cmd_status_update:                 ## @api_cmd_status_update
	.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
	movq	%rdi, %r13
	movq	8(%rdi), %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %r14
	movl	4(%rbx), %edi
	callq	_be64_to_cpu
	movl	%eax, %r12d
	movl	(%rbx), %edi
	callq	_be32_to_cpu
	movl	%eax, %r15d
	movq	_CHKSUM_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_HINIC_API_CMD_STATUS_GET
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_1:
	movq	_CHAIN_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_HINIC_API_CMD_STATUS_HEADER_GET
	movq	_HINIC_API_CMD_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jae	LBB0_4
## %bb.2:
	movq	_CONS_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_HINIC_API_CMD_STATUS_GET
	movq	%rax, (%r13)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CHKSUM_ERR,4,2                 ## @CHKSUM_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"API CMD status: Xor check error\n"

	.comm	_CHAIN_ID,4,2                   ## @CHAIN_ID
	.comm	_HINIC_API_CMD_MAX,4,2          ## @HINIC_API_CMD_MAX
L_.str.1:                               ## @.str.1
	.asciz	"unknown API CMD Chain %d\n"

	.comm	_CONS_IDX,4,2                   ## @CONS_IDX
	.no_dead_strip	_api_cmd_status_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function api_cmd_status_update
_api_cmd_status_update:                 ; @api_cmd_status_update
	.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	x19, x0
	ldp	x21, x8, [x0, #8]
	ldr	x20, [x8]
	ldr	w0, [x21, #4]
	bl	_be64_to_cpu
	mov	x22, x0
	ldr	w0, [x21]
	bl	_be32_to_cpu
	mov	x21, x0
Lloh0:
	adrp	x8, _CHKSUM_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHKSUM_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_HINIC_API_CMD_STATUS_GET
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	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
	b	_dev_err
LBB0_2:
Lloh5:
	adrp	x8, _CHAIN_ID@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CHAIN_ID@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_HINIC_API_CMD_STATUS_HEADER_GET
                                        ; kill: def $w0 killed $w0 def $x0
Lloh8:
	adrp	x8, _HINIC_API_CMD_MAX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HINIC_API_CMD_MAX@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w0, w8
	b.hs	LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _CONS_IDX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CONS_IDX@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_HINIC_API_CMD_STATUS_GET
	str	x0, [x19]
	b	LBB0_5
LBB0_4:
	str	x0, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_5:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_CHKSUM_ERR,4,2                 ; @CHKSUM_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"API CMD status: Xor check error\n"

	.comm	_CHAIN_ID,4,2                   ; @CHAIN_ID
	.comm	_HINIC_API_CMD_MAX,4,2          ; @HINIC_API_CMD_MAX
l_.str.1:                               ; @.str.1
	.asciz	"unknown API CMD Chain %d\n"

	.comm	_CONS_IDX,4,2                   ; @CONS_IDX
	.no_dead_strip	_api_cmd_status_update
.subsections_via_symbols
