	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcxhr_iec958_update_byte
_pcxhr_iec958_update_byte:              ## @pcxhr_iec958_update_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movslq	%esi, %rcx
	movb	(%rax,%rcx), %r13b
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r15d
	shll	$5, %r15d
	xorl	%ebx, %ebx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	shrb	%r13b
	shrb	%r12b
	incl	%ebx
	addl	$4, %r15d
	cmpl	$8, %ebx
	je	LBB0_4
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %ecx
	andb	$1, %cl
	movl	%r12d, %eax
	andb	$1, %al
	cmpb	%al, %cl
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movzbl	%al, %r14d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %eax
	movl	%eax, %ecx
	andl	$3, %ecx
	leal	4194304(%rcx), %edx
	cmpl	$4, %eax
	cmovll	%ecx, %edx
	shll	$23, %r14d
	orl	%r15d, %r14d
	orl	%edx, %r14d
	movq	_CMD_ACCESS_IO_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rdi
	callq	_pcxhr_init_rmh
	movq	_IO_NUM_REG_CUER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-80(%rbp), %rcx
	orl	%eax, (%rcx)
	movl	%r14d, 4(%rcx)
	movl	$2, -72(%rbp)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	movl	%r14d, %r8d
	callq	_snd_printdd
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	12(%rax), %edi
	leaq	-80(%rbp), %rsi
	callq	_pcxhr_send_msg
	testl	%eax, %eax
	je	LBB0_3
	jmp	LBB0_5
LBB0_4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movb	%cl, (%rax,%rdx)
	xorl	%eax, %eax
LBB0_5:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_ACCESS_IO_WRITE,4,2        ## @CMD_ACCESS_IO_WRITE
	.comm	_IO_NUM_REG_CUER,4,2            ## @IO_NUM_REG_CUER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write iec958 AES %d byte %d bit %d (cmd %x)\n"

	.no_dead_strip	_pcxhr_iec958_update_byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcxhr_iec958_update_byte
_pcxhr_iec958_update_byte:              ; @pcxhr_iec958_update_byte
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x28, x2
	mov	x21, x1
	mov	x20, x0
	mov	w22, #0
	ldr	x8, [x0]
	sxtw	x9, w21
	str	x9, [sp]                        ; 8-byte Folded Spill
	ldrb	w26, [x8, x9]
	lsl	w27, w1, #5
Lloh0:
	adrp	x19, _IO_NUM_REG_CUER@GOTPAGE
Lloh1:
	ldr	x19, [x19, _IO_NUM_REG_CUER@GOTPAGEOFF]
	mov	w25, #2
Lloh2:
	adrp	x23, l_.str@PAGE
Lloh3:
	add	x23, x23, l_.str@PAGEOFF
	str	w2, [sp, #12]                   ; 4-byte Folded Spill
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	lsr	w26, w26, #1
	lsr	w28, w28, #1
	add	w22, w22, #1
	add	w27, w27, #4
	cmp	w22, #8
	b.eq	LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	and	w9, w26, #0x1
	and	w8, w28, #0x1
	cmp	w9, w8
	b.eq	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w9, [x20, #8]
	and	w10, w9, #0x3
	mov	w11, #4194304
	bfxil	w11, w9, #0, #2
	cmp	w9, #3
	csel	w9, w11, w10, gt
	orr	w8, w27, w8, lsl #23
	orr	w24, w8, w9
Lloh4:
	adrp	x8, _CMD_ACCESS_IO_WRITE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CMD_ACCESS_IO_WRITE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	add	x0, sp, #16
	bl	_pcxhr_init_rmh
	ldr	w8, [x19]
	ldr	x9, [sp, #16]
	ldr	w10, [x9]
	orr	w8, w10, w8
	stp	w8, w24, [x9]
	str	w25, [sp, #24]
	ldr	w1, [x20, #8]
	mov	x0, x23
	mov	x2, x21
	mov	x3, x22
	mov	x4, x24
	bl	_snd_printdd
	ldr	w0, [x20, #12]
	add	x1, sp, #16
	bl	_pcxhr_send_msg
	cbz	w0, LBB0_1
	b	LBB0_5
LBB0_4:
	mov	w0, #0
	ldr	x8, [x20]
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	ldr	x10, [sp]                       ; 8-byte Folded Reload
	strb	w9, [x8, x10]
LBB0_5:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_ACCESS_IO_WRITE,4,2        ; @CMD_ACCESS_IO_WRITE
	.comm	_IO_NUM_REG_CUER,4,2            ; @IO_NUM_REG_CUER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write iec958 AES %d byte %d bit %d (cmd %x)\n"

	.no_dead_strip	_pcxhr_iec958_update_byte
.subsections_via_symbols
