	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcxhr_iec958_capture_byte
_pcxhr_iec958_capture_byte:             ## @pcxhr_iec958_capture_byte
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_CMD_ACCESS_IO_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdi
	callq	_pcxhr_init_rmh
	movq	_IO_NUM_UER_CHIP_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-48(%rbp), %rax
	orl	%ecx, (%rax)
	movslq	(%rbx), %rcx
	cmpq	$4, %rcx
	jae	LBB0_1
## %bb.2:
	leaq	l_switch.table.pcxhr_iec958_capture_byte(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movq	8(%rbx), %rdi
	cmpq	$0, (%rdi)
	je	LBB0_5
## %bb.3:
	cmpl	$5, %r15d
	jae	LBB0_1
## %bb.4:
	leaq	l_switch.table.pcxhr_iec958_capture_byte.1(%rip), %rdx
	jmp	LBB0_7
LBB0_5:
	cmpl	$5, %r15d
	jae	LBB0_1
## %bb.6:
	leaq	l_switch.table.pcxhr_iec958_capture_byte.2(%rip), %rdx
LBB0_7:
	movslq	%r15d, %rsi
	movq	(%rdx,%rsi,8), %rdx
	movl	(%rdx), %edx
	andl	$1048575, %ecx                  ## imm = 0xFFFFF
	movl	%ecx, 4(%rax)
	movq	_CHIP_SIG_AND_MAP_SPI@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	movl	%edx, 8(%rax)
	movl	$3, -40(%rbp)
	leaq	-48(%rbp), %rsi
	callq	_pcxhr_send_msg
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	movq	-32(%rbp), %rax
	movb	4(%rax), %al
	jne	LBB0_10
## %bb.9:
	rolb	$4, %al
	movl	%eax, %ecx
	andb	$51, %cl
	shlb	$2, %cl
	shrb	$2, %al
	andb	$51, %al
	orb	%cl, %al
	movl	%eax, %ecx
	andb	$85, %cl
	addb	%cl, %cl
	shrb	%al
	andb	$85, %al
	orb	%cl, %al
LBB0_10:
	movl	(%rbx), %esi
	movzbl	%al, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	callq	_snd_printdd
	movb	%bl, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_ACCESS_IO_READ,4,2         ## @CMD_ACCESS_IO_READ
	.comm	_IO_NUM_UER_CHIP_REG,4,2        ## @IO_NUM_UER_CHIP_REG
	.comm	_CS8420_01_CS,4,2               ## @CS8420_01_CS
	.comm	_CS8420_23_CS,4,2               ## @CS8420_23_CS
	.comm	_CS8420_45_CS,4,2               ## @CS8420_45_CS
	.comm	_CS8420_67_CS,4,2               ## @CS8420_67_CS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CS8416_CSB0,4,2                ## @CS8416_CSB0
	.comm	_CS8416_CSB1,4,2                ## @CS8416_CSB1
	.comm	_CS8416_CSB2,4,2                ## @CS8416_CSB2
	.comm	_CS8416_CSB3,4,2                ## @CS8416_CSB3
	.comm	_CS8416_CSB4,4,2                ## @CS8416_CSB4
	.comm	_CS8420_CSB0,4,2                ## @CS8420_CSB0
	.comm	_CS8420_CSB1,4,2                ## @CS8420_CSB1
	.comm	_CS8420_CSB2,4,2                ## @CS8420_CSB2
	.comm	_CS8420_CSB3,4,2                ## @CS8420_CSB3
	.comm	_CS8420_CSB4,4,2                ## @CS8420_CSB4
	.comm	_CHIP_SIG_AND_MAP_SPI,4,2       ## @CHIP_SIG_AND_MAP_SPI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read iec958 AES %d byte %d = 0x%x\n"

	.no_dead_strip	_pcxhr_iec958_capture_byte
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.pcxhr_iec958_capture_byte
l_switch.table.pcxhr_iec958_capture_byte:
	.quad	_CS8420_01_CS
	.quad	_CS8420_23_CS
	.quad	_CS8420_45_CS
	.quad	_CS8420_67_CS

	.p2align	3                               ## @switch.table.pcxhr_iec958_capture_byte.1
l_switch.table.pcxhr_iec958_capture_byte.1:
	.quad	_CS8416_CSB0
	.quad	_CS8416_CSB1
	.quad	_CS8416_CSB2
	.quad	_CS8416_CSB3
	.quad	_CS8416_CSB4

	.p2align	3                               ## @switch.table.pcxhr_iec958_capture_byte.2
l_switch.table.pcxhr_iec958_capture_byte.2:
	.quad	_CS8420_CSB0
	.quad	_CS8420_CSB1
	.quad	_CS8420_CSB2
	.quad	_CS8420_CSB3
	.quad	_CS8420_CSB4

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcxhr_iec958_capture_byte
_pcxhr_iec958_capture_byte:             ; @pcxhr_iec958_capture_byte
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _CMD_ACCESS_IO_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_ACCESS_IO_READ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_pcxhr_init_rmh
Lloh3:
	adrp	x8, _IO_NUM_UER_CHIP_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IO_NUM_UER_CHIP_REG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	ldr	x8, [sp, #8]
	ldr	w10, [x8]
	orr	w9, w10, w9
	str	w9, [x8]
	ldrsw	x9, [x21]
	cmp	w9, #4
	b.hs	LBB0_8
; %bb.1:
Lloh6:
	adrp	x10, l_switch.table.pcxhr_iec958_capture_byte@PAGE
Lloh7:
	add	x10, x10, l_switch.table.pcxhr_iec958_capture_byte@PAGEOFF
	ldr	x9, [x10, x9, lsl #3]
	ldr	w9, [x9]
	str	w9, [x8, #4]
	ldr	x0, [x21, #8]
	ldr	x10, [x0]
	cbz	x10, LBB0_4
; %bb.2:
	cmp	w20, #5
	b.hs	LBB0_8
; %bb.3:
Lloh8:
	adrp	x10, l_switch.table.pcxhr_iec958_capture_byte.1@PAGE
Lloh9:
	add	x10, x10, l_switch.table.pcxhr_iec958_capture_byte.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	cmp	w20, #5
	b.hs	LBB0_8
; %bb.5:
Lloh10:
	adrp	x10, l_switch.table.pcxhr_iec958_capture_byte.2@PAGE
Lloh11:
	add	x10, x10, l_switch.table.pcxhr_iec958_capture_byte.2@PAGEOFF
LBB0_6:
	ldr	x10, [x10, w20, sxtw #3]
	ldr	w10, [x10]
	and	w9, w9, #0xfffff
Lloh12:
	adrp	x11, _CHIP_SIG_AND_MAP_SPI@GOTPAGE
Lloh13:
	ldr	x11, [x11, _CHIP_SIG_AND_MAP_SPI@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	and	w10, w10, w11
	stp	w9, w10, [x8, #4]
	mov	w8, #3
	str	w8, [sp, #16]
	add	x1, sp, #8
	bl	_pcxhr_send_msg
	cbnz	w0, LBB0_9
; %bb.7:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	ldr	x9, [sp, #24]
	ldrb	w9, [x9, #4]
	rbit	w10, w9
	lsr	w10, w10, #24
	cmp	x8, #0
	csel	w22, w10, w9, eq
	ldr	w1, [x21]
	and	w3, w22, #0xff
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_snd_printdd
	mov	w0, #0
	strb	w22, [x19]
	b	LBB0_9
LBB0_8:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_ACCESS_IO_READ,4,2         ; @CMD_ACCESS_IO_READ
	.comm	_IO_NUM_UER_CHIP_REG,4,2        ; @IO_NUM_UER_CHIP_REG
	.comm	_CS8420_01_CS,4,2               ; @CS8420_01_CS
	.comm	_CS8420_23_CS,4,2               ; @CS8420_23_CS
	.comm	_CS8420_45_CS,4,2               ; @CS8420_45_CS
	.comm	_CS8420_67_CS,4,2               ; @CS8420_67_CS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CS8416_CSB0,4,2                ; @CS8416_CSB0
	.comm	_CS8416_CSB1,4,2                ; @CS8416_CSB1
	.comm	_CS8416_CSB2,4,2                ; @CS8416_CSB2
	.comm	_CS8416_CSB3,4,2                ; @CS8416_CSB3
	.comm	_CS8416_CSB4,4,2                ; @CS8416_CSB4
	.comm	_CS8420_CSB0,4,2                ; @CS8420_CSB0
	.comm	_CS8420_CSB1,4,2                ; @CS8420_CSB1
	.comm	_CS8420_CSB2,4,2                ; @CS8420_CSB2
	.comm	_CS8420_CSB3,4,2                ; @CS8420_CSB3
	.comm	_CS8420_CSB4,4,2                ; @CS8420_CSB4
	.comm	_CHIP_SIG_AND_MAP_SPI,4,2       ; @CHIP_SIG_AND_MAP_SPI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read iec958 AES %d byte %d = 0x%x\n"

	.no_dead_strip	_pcxhr_iec958_capture_byte
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.pcxhr_iec958_capture_byte
l_switch.table.pcxhr_iec958_capture_byte:
	.quad	_CS8420_01_CS
	.quad	_CS8420_23_CS
	.quad	_CS8420_45_CS
	.quad	_CS8420_67_CS

	.p2align	3                               ; @switch.table.pcxhr_iec958_capture_byte.1
l_switch.table.pcxhr_iec958_capture_byte.1:
	.quad	_CS8416_CSB0
	.quad	_CS8416_CSB1
	.quad	_CS8416_CSB2
	.quad	_CS8416_CSB3
	.quad	_CS8416_CSB4

	.p2align	3                               ; @switch.table.pcxhr_iec958_capture_byte.2
l_switch.table.pcxhr_iec958_capture_byte.2:
	.quad	_CS8420_CSB0
	.quad	_CS8420_CSB1
	.quad	_CS8420_CSB2
	.quad	_CS8420_CSB3
	.quad	_CS8420_CSB4

.subsections_via_symbols
