	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function serial_out
_serial_out:                            ## @serial_out
	.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	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rsi), %r12d
	movl	4(%rsi), %esi
	leal	-1(%rsi), %ecx
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shlq	%cl, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%r12d, %edx
	callq	_trace_fsi_master_gpio_out
	cmpl	$0, 4(%r15)
	je	LBB0_7
## %bb.1:
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_set_sda_output
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_sda_out
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_clock_toggle
	movl	4(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_6
## %bb.2:
	notl	%r12d
	movl	$-1, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_clock_toggle
	addl	%r12d, %r12d
	incl	%r13d
	movl	4(%r15), %ecx
	cmpl	%ecx, %r13d
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %ebx
	andl	-56(%rbp), %ebx                 ## 4-byte Folded Reload
	decb	%cl
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	cmpl	%ebx, %r14d
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_sda_out
	movl	%ebx, %r14d
	jmp	LBB0_5
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"trying to output 0 bits\n"

	.no_dead_strip	_serial_out
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function serial_out
_serial_out:                            ; @serial_out
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	ldp	w21, w22, [x1]
	mov	x1, x22
	mov	x2, x21
	bl	_trace_fsi_master_gpio_out
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_set_sda_output
	mov	x0, x19
	mov	w1, #0
	bl	_sda_out
	mov	x0, x19
	mov	w1, #1
	bl	_clock_toggle
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	w23, #0
	sub	w9, w22, #1
	mov	w10, #1
	lsl	x22, x10, x9
	mvn	w24, w21
	mov	w25, #-1
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	w1, #1
	bl	_clock_toggle
	lsl	w24, w24, #1
	add	w23, w23, #1
	ldr	w8, [x20, #4]
	cmp	w23, w8
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	and	w9, w24, w22
	sub	w8, w8, #1
	asr	w21, w9, w8
	cmp	w25, w21
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_sda_out
	mov	x25, x21
	b	LBB0_3
LBB0_6:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_dev_warn
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"trying to output 0 bits\n"

	.no_dead_strip	_serial_out
.subsections_via_symbols
