	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ibmasm_start_reverse_heartbeat ## -- Begin function ibmasm_start_reverse_heartbeat
	.p2align	4, 0x90
_ibmasm_start_reverse_heartbeat:        ## @ibmasm_start_reverse_heartbeat
	.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, %r14
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	$4, %esi
	callq	_ibmasm_new_command
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$2, %ebx
	ja	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r13), %edi
	movq	_rhb_dot_cmd@GOTPCREL(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	_IBMASM_CMD_PENDING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_ibmasm_exec_command
	movq	_IBMASM_CMD_TIMEOUT_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ibmasm_wait_for_response
	movq	(%r13), %r12
	movq	_IBMASM_CMD_COMPLETE@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	8(%r14), %edi
	movq	(%r14), %rsi
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_REVERSE_HEARTBEAT_TIMEOUT@GOTPCREL(%rip), %rax
	imull	(%rax), %edx
	callq	_wait_event_interruptible_timeout
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	cmpq	%r15, %r12
	setne	%al
	addl	%eax, %ebx
	cmpq	$0, (%r14)
	je	LBB0_2
LBB0_6:
	movq	_EINTR@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_3:
	movl	$1, %r15d
LBB0_7:
	movq	%r13, %rdi
	callq	_command_put
	movq	$0, (%r14)
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_rhb_dot_cmd,4,2                ## @rhb_dot_cmd
	.comm	_IBMASM_CMD_PENDING,8,3         ## @IBMASM_CMD_PENDING
	.comm	_IBMASM_CMD_TIMEOUT_NORMAL,4,2  ## @IBMASM_CMD_TIMEOUT_NORMAL
	.comm	_IBMASM_CMD_COMPLETE,8,3        ## @IBMASM_CMD_COMPLETE
	.comm	_REVERSE_HEARTBEAT_TIMEOUT,4,2  ## @REVERSE_HEARTBEAT_TIMEOUT
	.comm	_HZ,4,2                         ## @HZ
	.comm	_current,4,2                    ## @current
	.comm	_EINTR,4,2                      ## @EINTR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ibmasm_start_reverse_heartbeat ; -- Begin function ibmasm_start_reverse_heartbeat
	.p2align	2
_ibmasm_start_reverse_heartbeat:        ; @ibmasm_start_reverse_heartbeat
	.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	x19, x1
	mov	x21, x0
	mov	w1, #4
	bl	_ibmasm_new_command
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	mov	w23, #0
Lloh0:
	adrp	x26, _IBMASM_CMD_COMPLETE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _IBMASM_CMD_COMPLETE@GOTPAGEOFF]
Lloh2:
	adrp	x27, _REVERSE_HEARTBEAT_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x27, [x27, _REVERSE_HEARTBEAT_TIMEOUT@GOTPAGEOFF]
Lloh4:
	adrp	x28, _HZ@GOTPAGE
Lloh5:
	ldr	x28, [x28, _HZ@GOTPAGEOFF]
Lloh6:
	adrp	x22, _current@GOTPAGE
Lloh7:
	ldr	x22, [x22, _current@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w23, #2
	b.hi	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x20, #8]
Lloh8:
	adrp	x1, _rhb_dot_cmd@GOTPAGE
Lloh9:
	ldr	x1, [x1, _rhb_dot_cmd@GOTPAGEOFF]
	mov	w2, #4
	bl	_memcpy
Lloh10:
	adrp	x8, _IBMASM_CMD_PENDING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IBMASM_CMD_PENDING@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	str	x8, [x20]
	mov	x0, x21
	mov	x1, x20
	bl	_ibmasm_exec_command
Lloh13:
	adrp	x8, _IBMASM_CMD_TIMEOUT_NORMAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IBMASM_CMD_TIMEOUT_NORMAL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ibmasm_wait_for_response
	ldr	x24, [x20]
	ldr	x25, [x26]
	ldr	w0, [x19, #8]
	ldr	x1, [x19]
	ldr	w8, [x27]
	ldr	w9, [x28]
	mul	w2, w9, w8
	bl	_wait_event_interruptible_timeout
	ldr	w0, [x22]
	bl	_signal_pending
	cbnz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x24, x25
	cinc	w23, w23, ne
	ldr	x8, [x19]
	cbz	x8, LBB0_2
LBB0_5:
Lloh16:
	adrp	x8, _EINTR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_6:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_7:
	mov	w21, #1
LBB0_8:
	mov	x0, x20
	bl	_command_put
	str	xzr, [x19]
LBB0_9:
	mov	x0, x21
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_rhb_dot_cmd,4,2                ; @rhb_dot_cmd
	.comm	_IBMASM_CMD_PENDING,8,3         ; @IBMASM_CMD_PENDING
	.comm	_IBMASM_CMD_TIMEOUT_NORMAL,4,2  ; @IBMASM_CMD_TIMEOUT_NORMAL
	.comm	_IBMASM_CMD_COMPLETE,8,3        ; @IBMASM_CMD_COMPLETE
	.comm	_REVERSE_HEARTBEAT_TIMEOUT,4,2  ; @REVERSE_HEARTBEAT_TIMEOUT
	.comm	_HZ,4,2                         ; @HZ
	.comm	_current,4,2                    ; @current
	.comm	_EINTR,4,2                      ; @EINTR
.subsections_via_symbols
