	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gigaset_fill_inbuf             ## -- Begin function gigaset_fill_inbuf
	.p2align	4, 0x90
_gigaset_fill_inbuf:                    ## @gigaset_fill_inbuf
	.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
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_DEBUG_INTR@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_gig_dbg
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.1:
	movl	(%r15), %ebx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r15), %r15d
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	movl	%r15d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_gig_dbg
	movl	%r15d, -64(%rbp)                ## 4-byte Spill
	subl	$1, %r15d
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	sbbl	%r13d, %r13d
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	movq	_RBUFSIZE@GOTPCREL(%rip), %rcx
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx), %r15d
	addl	-60(%rbp), %r15d                ## 4-byte Folded Reload
	cmpl	%ebx, -64(%rbp)                 ## 4-byte Folded Reload
	cmoval	-56(%rbp), %r15d                ## 4-byte Folded Reload
	subl	%ebx, %r15d
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r14d, %r15d
	cmovael	%r14d, %r15d
	movl	%ebx, %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	8(%rax), %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	movq	%rcx, %r13
	callq	_memcpy
	movq	%r13, %rcx
	addl	%r15d, %ebx
	xorl	%r13d, %r13d
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	addq	%r15, %r12
	movl	%edx, %ebx
	subl	%r15d, %r14d
	jne	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	movl	%r14d, %r13d
LBB0_5:
	movq	_DEBUG_INTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_gig_dbg
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	xorl	%ebx, %ebx
	cmpl	-52(%rbp), %r13d                ## 4-byte Folded Reload
	setne	%bl
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_INTR,4,2                 ## @DEBUG_INTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"received %u bytes"

L_.str.1:                               ## @.str.1
	.asciz	"buffer state: %u -> %u"

	.comm	_RBUFSIZE,4,2                   ## @RBUFSIZE
L_.str.2:                               ## @.str.2
	.asciz	"buffer overflow (%u bytes lost)\n"

L_.str.3:                               ## @.str.3
	.asciz	"setting tail to %u"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gigaset_fill_inbuf             ; -- Begin function gigaset_fill_inbuf
	.p2align	2
_gigaset_fill_inbuf:                    ; @gigaset_fill_inbuf
	.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	x19, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _DEBUG_INTR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _DEBUG_INTR@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_gig_dbg
	cbz	w19, LBB0_4
; %bb.1:
	ldp	w21, w24, [x20]
	ldr	w0, [x23]
	str	x21, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x24
	bl	_gig_dbg
	sub	w27, w24, #1
	cmp	w24, #0
	csetm	w28, eq
Lloh6:
	adrp	x26, _RBUFSIZE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _RBUFSIZE@GOTPAGEOFF]
	mov	x23, x19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x26]
	add	w8, w8, w28
	cmp	w24, w21
	csel	w8, w27, w8, hi
	subs	w8, w8, w21
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, w23
	csel	w25, w8, w23, lo
	ldr	x8, [x20, #8]
	add	x0, x8, w21, uxtw
	mov	x1, x22
	mov	x2, x25
	bl	_memcpy
	add	w8, w25, w21
	ldr	w9, [x26]
	udiv	w10, w8, w9
	msub	w21, w10, w9, w8
	add	x22, x22, x25
	subs	w23, w23, w25
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w0, #0
	b	LBB0_7
LBB0_5:
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x23
	bl	_dev_err
LBB0_6:
Lloh10:
	adrp	x8, _DEBUG_INTR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DEBUG_INTR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x21
	bl	_gig_dbg
	str	w21, [x20]
	cmp	w23, w19
	cset	w0, ne
LBB0_7:
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_INTR,4,2                 ; @DEBUG_INTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"received %u bytes"

l_.str.1:                               ; @.str.1
	.asciz	"buffer state: %u -> %u"

	.comm	_RBUFSIZE,4,2                   ; @RBUFSIZE
l_.str.2:                               ; @.str.2
	.asciz	"buffer overflow (%u bytes lost)\n"

l_.str.3:                               ; @.str.3
	.asciz	"setting tail to %u"

.subsections_via_symbols
