	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_init_timestamp         ## -- Begin function mlx4_en_init_timestamp
	.p2align	4, 0x90
_mlx4_en_init_timestamp:                ## @mlx4_en_init_timestamp
	.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
	cmpq	$0, (%rdi)
	je	LBB0_1
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	movq	48(%rdi), %r12
	leaq	20(%rdi), %r14
	movq	%r14, %rdi
	callq	_seqlock_init
	leaq	24(%rbx), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_mlx4_en_read_clock@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movl	$48, %edi
	callq	_CLOCKSOURCE_MASK
	movl	%eax, 32(%rbx)
	movl	(%r12), %edi
	callq	_freq_to_shift
	movl	%eax, 28(%rbx)
	imull	$1000, (%r12), %edi             ## imm = 0x3E8
	movl	%eax, %esi
	callq	_clocksource_khz2mult
	movl	%eax, 24(%rbx)
	movl	%eax, 44(%rbx)
	movq	%r14, %rdi
	callq	_write_seqlock_irqsave
	leaq	40(%rbx), %r12
	xorl	%eax, %eax
	callq	_ktime_get_real
	movl	%eax, %edi
	callq	_ktime_to_ns
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_timecounter_init
	movq	%r14, %rdi
	callq	_write_sequnlock_irqrestore
	leaq	16(%rbx), %r14
	movq	_mlx4_en_ptp_clock_info@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 16(%rbx)
	leaq	L_.str(%rip), %rdx
	movl	$16, %esi
	callq	_snprintf
	movq	8(%rbx), %rsi
	movq	%r14, %rdi
	callq	_ptp_clock_register
	movq	%rax, (%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	$0, (%rbx)
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx4_err                       ## TAILCALL
LBB0_2:
	cmpq	$0, (%rbx)
	je	LBB0_3
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx4_info                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mlx4_en_read_clock,4,2         ## @mlx4_en_read_clock
	.comm	_mlx4_en_ptp_clock_info,4,2     ## @mlx4_en_ptp_clock_info
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mlx4 ptp"

L_.str.1:                               ## @.str.1
	.asciz	"ptp_clock_register failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"registered PHC clock\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_init_timestamp         ; -- Begin function mlx4_en_init_timestamp
	.p2align	2
_mlx4_en_init_timestamp:                ; @mlx4_en_init_timestamp
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
	ldr	x22, [x0, #48]
	add	x20, x0, #20
	mov	x0, x20
	bl	_seqlock_init
	add	x21, x19, #24
	mov	x0, x21
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh0:
	adrp	x8, _mlx4_en_read_clock@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mlx4_en_read_clock@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #36]
	mov	w0, #48
	bl	_CLOCKSOURCE_MASK
	str	w0, [x19, #32]
	ldr	w0, [x22]
	bl	_freq_to_shift
	mov	x1, x0
	str	w0, [x19, #28]
	ldr	w8, [x22]
	mov	w9, #1000
	mul	w0, w8, w9
	bl	_clocksource_khz2mult
	str	w0, [x19, #24]
	str	w0, [x19, #44]
	mov	x0, x20
	bl	_write_seqlock_irqsave
	add	x22, x19, #40
	bl	_ktime_get_real
	bl	_ktime_to_ns
	mov	x2, x0
	mov	x0, x22
	mov	x1, x21
	bl	_timecounter_init
	mov	x0, x20
	bl	_write_sequnlock_irqrestore
Lloh3:
	adrp	x8, _mlx4_en_ptp_clock_info@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mlx4_en_ptp_clock_info@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x20, x19
	str	w0, [x20, #16]!
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #16
	bl	_snprintf
	ldr	x1, [x19, #8]
	mov	x0, x20
	bl	_ptp_clock_register
	str	x0, [x19]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	str	xzr, [x19]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mlx4_err
LBB0_4:
	ldr	x8, [x19]
	cbz	x8, LBB0_1
; %bb.5:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mlx4_info
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_mlx4_en_read_clock,4,2         ; @mlx4_en_read_clock
	.comm	_mlx4_en_ptp_clock_info,4,2     ; @mlx4_en_ptp_clock_info
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mlx4 ptp"

l_.str.1:                               ; @.str.1
	.asciz	"ptp_clock_register failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"registered PHC clock\n"

.subsections_via_symbols
