	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gigaset_start                  ## -- Begin function gigaset_start
	.p2align	4, 0x90
_gigaset_start:                         ## @gigaset_start
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	24(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock_interruptible
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	leaq	48(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movl	$1, (%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	8(%rbx), %rax
	movq	_MS_LOCKED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	movq	40(%rbx), %rax
	movq	_TIOCM_DTR@GOTPCREL(%rip), %r15
	movq	_TIOCM_RTS@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	orl	(%r15), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	*16(%rax)
	movq	40(%rbx), %rax
	movq	_B115200@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	callq	*8(%rax)
	movq	40(%rbx), %rax
	movq	_CS8@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	callq	*(%rax)
	movl	(%r12), %eax
	orl	(%r15), %eax
	movl	%eax, 16(%rbx)
LBB0_3:
	movl	$1, 20(%rbx)
	leaq	32(%rbx), %rsi
	movq	_EV_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_gigaset_add_event
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	_DEBUG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_gig_dbg
	movq	%rbx, %rdi
	callq	_gigaset_schedule_event
	movl	28(%rbx), %edi
	xorl	%esi, %esi
	cmpl	$0, 20(%rbx)
	sete	%sil
	callq	_wait_event
	movl	$1, %r15d
	jmp	LBB0_6
LBB0_4:
	movl	$0, 20(%rbx)
LBB0_6:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MS_LOCKED,8,3                  ## @MS_LOCKED
	.comm	_TIOCM_DTR,4,2                  ## @TIOCM_DTR
	.comm	_TIOCM_RTS,4,2                  ## @TIOCM_RTS
	.comm	_B115200,4,2                    ## @B115200
	.comm	_CS8,4,2                        ## @CS8
	.comm	_EV_START,4,2                   ## @EV_START
	.comm	_DEBUG_CMD,4,2                  ## @DEBUG_CMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"scheduling START"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gigaset_start                  ; -- Begin function gigaset_start
	.p2align	2
_gigaset_start:                         ; @gigaset_start
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	add	x19, x0, #24
	mov	x0, x19
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_8
LBB0_2:
	add	x21, x20, #48
	mov	x0, x21
	bl	_spin_lock_irqsave
	mov	w22, #1
	str	w22, [x20]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _MS_LOCKED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MS_LOCKED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x20, #40]
Lloh3:
	adrp	x21, _TIOCM_DTR@GOTPAGE
Lloh4:
	ldr	x21, [x21, _TIOCM_DTR@GOTPAGEOFF]
	ldr	x8, [x8, #16]
	ldr	w9, [x21]
Lloh5:
	adrp	x23, _TIOCM_RTS@GOTPAGE
Lloh6:
	ldr	x23, [x23, _TIOCM_RTS@GOTPAGEOFF]
	ldr	w10, [x23]
	orr	w2, w10, w9
	mov	x0, x20
	mov	w1, #0
	blr	x8
	ldr	x8, [x20, #40]
	ldr	x8, [x8, #8]
Lloh7:
	adrp	x9, _B115200@GOTPAGE
Lloh8:
	ldr	x9, [x9, _B115200@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x9]
	mov	x0, x20
	blr	x8
	ldr	x8, [x20, #40]
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _CS8@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CS8@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x9]
	mov	x0, x20
	blr	x8
	ldr	w8, [x21]
	ldr	w9, [x23]
	orr	w8, w9, w8
	str	w8, [x20, #16]
LBB0_4:
	str	w22, [x20, #20]
	add	x1, x20, #32
Lloh13:
	adrp	x8, _EV_START@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EV_START@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_gigaset_add_event
	cbz	w0, LBB0_6
; %bb.5:
Lloh16:
	adrp	x8, _DEBUG_CMD@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DEBUG_CMD@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_gig_dbg
	mov	x0, x20
	bl	_gigaset_schedule_event
	ldr	w0, [x20, #28]
	ldr	w8, [x20, #20]
	cmp	w8, #0
	cset	w1, eq
	bl	_wait_event
	mov	w21, #1
	b	LBB0_7
LBB0_6:
	mov	w21, #0
	str	wzr, [x20, #20]
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_8:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MS_LOCKED,8,3                  ; @MS_LOCKED
	.comm	_TIOCM_DTR,4,2                  ; @TIOCM_DTR
	.comm	_TIOCM_RTS,4,2                  ; @TIOCM_RTS
	.comm	_B115200,4,2                    ; @B115200
	.comm	_CS8,4,2                        ; @CS8
	.comm	_EV_START,4,2                   ; @EV_START
	.comm	_DEBUG_CMD,4,2                  ; @DEBUG_CMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"scheduling START"

.subsections_via_symbols
