	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gigaset_add_event              ## -- Begin function gigaset_add_event
	.p2align	4, 0x90
_gigaset_add_event:                     ## @gigaset_add_event
	.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	%r9, -72(%rbp)                  ## 8-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	leaq	8(%rdi), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %r14d
	leal	1(%r14), %eax
	movq	_MAX_EVENTS@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%edx, %r13d
	xorl	%edi, %edi
	cmpl	4(%rbx), %edx
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	24(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	xorl	%r14d, %r14d
	jmp	LBB0_3
LBB0_2:
	movq	16(%rbx), %rax
	leaq	(%r14,%r14,4), %rcx
	leaq	(%rax,%rcx,8), %r14
	movl	%r15d, (%rax,%rcx,8)
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, 32(%rax,%rcx,8)
	movl	$-1, 4(%rax,%rcx,8)
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, 24(%rax,%rcx,8)
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, 16(%rax,%rcx,8)
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, 8(%rax,%rcx,8)
	movl	%r13d, (%rbx)
LBB0_3:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_EVENTS,4,2                 ## @MAX_EVENTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"event queue full\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gigaset_add_event              ; -- Begin function gigaset_add_event
	.p2align	2
_gigaset_add_event:                     ; @gigaset_add_event
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x5
	mov	x20, x4
	mov	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x22, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _MAX_EVENTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_EVENTS@GOTPAGEOFF]
	ldp	w26, w9, [x22]
	add	w10, w26, #1
Lloh2:
	ldr	w8, [x8]
	udiv	w11, w10, w8
	msub	w27, w11, w8, w10
	cmp	w27, w9
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x22, #24]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x26, #0
	b	LBB0_3
LBB0_2:
	ldr	x8, [x22, #16]
	mov	w9, #40
	madd	x26, x26, x9, x8
	stp	x23, x25, [x26, #24]
	mov	w8, #-1
	stp	w24, w8, [x26]
	str	x21, [x26, #16]
	str	w20, [x26, #8]
	str	w27, [x22]
LBB0_3:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x26
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_EVENTS,4,2                 ; @MAX_EVENTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"event queue full\n"

.subsections_via_symbols
