	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ibmasm_receive_event           ## -- Begin function ibmasm_receive_event
	.p2align	4, 0x90
_ibmasm_receive_event:                  ## @ibmasm_receive_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	movq	_IBMASM_EVENT_MAX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%edx, %edi
	callq	_min
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	(%r13), %rax
	movq	16(%r13), %rbx
	leaq	(%rax,%rax,2), %r14
	movl	8(%rbx,%r14,4), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_memcpy_fromio
	movl	%r12d, (%rbx,%r14,4)
	movl	8(%r13), %ecx
	movl	%ecx, 4(%rbx,%r14,4)
	movq	(%r13), %rax
	incq	%rax
	movq	_IBMASM_NUM_EVENTS@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_3:
	movq	%rdx, (%r13)
	incl	%ecx
	movl	%ecx, 8(%r13)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wake_up_event_readers          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IBMASM_EVENT_MAX_SIZE,4,2      ## @IBMASM_EVENT_MAX_SIZE
	.comm	_IBMASM_NUM_EVENTS,4,2          ## @IBMASM_NUM_EVENTS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ibmasm_receive_event           ; -- Begin function ibmasm_receive_event
	.p2align	2
_ibmasm_receive_event:                  ; @ibmasm_receive_event
	.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	x19, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
Lloh0:
	adrp	x8, _IBMASM_EVENT_MAX_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IBMASM_EVENT_MAX_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x2
	bl	_min
	mov	x21, x0
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x22, #16]
	ldr	x9, [x22]
	mov	w10, #12
	madd	x23, x9, x10, x8
	ldr	w0, [x23, #8]
	mov	x1, x19
	mov	x2, x21
	bl	_memcpy_fromio
	ldr	w8, [x22, #8]
	stp	w21, w8, [x23]
	ldr	x9, [x22]
	add	x9, x9, #1
Lloh3:
	adrp	x10, _IBMASM_NUM_EVENTS@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IBMASM_NUM_EVENTS@GOTPAGEOFF]
Lloh5:
	ldrsw	x10, [x10]
	udiv	x11, x9, x10
	msub	x9, x11, x10, x9
	str	x9, [x22]
	add	w8, w8, #1
	str	w8, [x22, #8]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	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
	b	_wake_up_event_readers
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IBMASM_EVENT_MAX_SIZE,4,2      ; @IBMASM_EVENT_MAX_SIZE
	.comm	_IBMASM_NUM_EVENTS,4,2          ; @IBMASM_NUM_EVENTS
.subsections_via_symbols
