	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mox_get_board_info
_mox_get_board_info:                    ## @mox_get_board_info
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_MBOX_CMD_BOARD_INFO@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, -48(%rbp)
	movl	32(%rdi), %edi
	leaq	-48(%rbp), %rsi
	callq	_mbox_send_message
	testl	%eax, %eax
	js	LBB0_15
## %bb.1:
	leaq	28(%rbx), %r14
	movq	_HZ@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	movq	%r14, %rdi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	js	LBB0_15
## %bb.2:
	movq	(%r15), %rdi
	movl	56(%rbx), %esi
	callq	_mox_get_status
	movq	_ENODATA@GOTPCREL(%rip), %r15
	xorl	%ecx, %ecx
	subl	(%r15), %ecx
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:
	cmpl	%ecx, %eax
	jne	LBB0_15
LBB0_4:
	cmpl	%ecx, %eax
	jne	LBB0_6
## %bb.5:
	movl	24(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_7
LBB0_6:
	movq	48(%rbx), %rax
	movl	8(%rax), %ecx
	movl	%ecx, 4(%rbx)
	movl	12(%rax), %ecx
	movl	%ecx, 8(%rbx)
	movl	40(%rbx), %edi
	movl	16(%rax), %esi
	movl	20(%rax), %edx
	callq	_reply_to_mac_addr
	movl	36(%rbx), %edi
	movq	48(%rbx), %rax
	movl	24(%rax), %esi
	movl	28(%rax), %edx
	callq	_reply_to_mac_addr
	movl	$1, 12(%rbx)
	movl	(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_info
	movl	4(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_info
	movl	8(%rbx), %esi
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_info
LBB0_7:
	movq	_MBOX_CMD_ECDSA_PUB_KEY@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, -48(%rbp)
	movl	32(%rbx), %edi
	leaq	-48(%rbp), %rsi
	callq	_mbox_send_message
	testl	%eax, %eax
	js	LBB0_15
## %bb.8:
	movl	(%r12), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	movq	%r14, %rdi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	js	LBB0_15
## %bb.9:
	movq	(%r13), %rdi
	movl	56(%rbx), %esi
	callq	_mox_get_status
	xorl	%ecx, %ecx
	subl	(%r15), %ecx
	testl	%eax, %eax
	jns	LBB0_11
## %bb.10:
	cmpl	%ecx, %eax
	jne	LBB0_15
LBB0_11:
	cmpl	%ecx, %eax
	jne	LBB0_13
## %bb.12:
	movl	24(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_14
LBB0_13:
	movq	48(%rbx), %rdx
	movl	$1, 16(%rbx)
	movl	20(%rbx), %edi
	movl	(%rdx), %ecx
	movl	4(%rdx), %r8d
	movl	8(%rdx), %r9d
	movl	12(%rdx), %esi
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movl	16(%rdx), %esi
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movl	20(%rdx), %esi
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movl	24(%rdx), %esi
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movl	28(%rdx), %esi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	32(%rdx), %esi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	36(%rdx), %r13d
	movl	40(%rdx), %r12d
	movl	44(%rdx), %r15d
	movl	48(%rdx), %r14d
	movl	52(%rdx), %ebx
	movl	56(%rdx), %r11d
	movl	60(%rdx), %r10d
	subq	$8, %rsp
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, %edx
	pushq	%r10
	pushq	%r11
	pushq	%rbx
	pushq	%r14
	pushq	%r15
	pushq	%r12
	pushq	%r13
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	pushq	-80(%rbp)                       ## 8-byte Folded Reload
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	-96(%rbp)                       ## 8-byte Folded Reload
	callq	_sprintf
	addq	$112, %rsp
LBB0_14:
	xorl	%eax, %eax
LBB0_15:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MBOX_CMD_BOARD_INFO,8,3        ## @MBOX_CMD_BOARD_INFO
	.comm	_HZ,4,2                         ## @HZ
	.comm	_ENODATA,4,2                    ## @ENODATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Board does not have manufacturing information burned!\n"

L_.str.1:                               ## @.str.1
	.asciz	"Turris Mox serial number %016llX\n"

L_.str.2:                               ## @.str.2
	.asciz	"           board version %i\n"

L_.str.3:                               ## @.str.3
	.asciz	"           burned RAM size %i MiB\n"

	.comm	_MBOX_CMD_ECDSA_PUB_KEY,8,3     ## @MBOX_CMD_ECDSA_PUB_KEY
L_.str.4:                               ## @.str.4
	.asciz	"Board has no public key burned!\n"

L_.str.5:                               ## @.str.5
	.asciz	"%06x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x"

	.no_dead_strip	_mox_get_board_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mox_get_board_info
_mox_get_board_info:                    ; @mox_get_board_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x0
Lloh0:
	adrp	x22, _MBOX_CMD_BOARD_INFO@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MBOX_CMD_BOARD_INFO@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [sp, #56]
	ldr	w0, [x0, #32]
	add	x1, sp, #56
	bl	_mbox_send_message
	tbnz	w0, #31, LBB0_13
; %bb.1:
	add	x20, x19, #28
Lloh2:
	adrp	x21, _HZ@GOTPAGE
Lloh3:
	ldr	x21, [x21, _HZ@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	mov	x0, x20
	bl	_wait_for_completion_timeout
	tbnz	w0, #31, LBB0_13
; %bb.2:
	ldr	x0, [x22]
	ldr	w1, [x19, #56]
	bl	_mox_get_status
	mov	x2, x0
Lloh4:
	adrp	x22, _ENODATA@GOTPAGE
Lloh5:
	ldr	x22, [x22, _ENODATA@GOTPAGEOFF]
	ldr	w8, [x22]
	neg	w8, w8
	tbz	w0, #31, LBB0_4
; %bb.3:
	cmp	w2, w8
	b.ne	LBB0_14
LBB0_4:
	cmp	w2, w8
	b.ne	LBB0_6
; %bb.5:
	ldr	w0, [x19, #24]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	b	LBB0_7
LBB0_6:
	ldr	x8, [x19, #48]
	ldr	w9, [x8, #8]
	str	w9, [x19, #4]
	ldr	w9, [x8, #12]
	str	w9, [x19, #8]
	ldr	w0, [x19, #40]
	ldp	w1, w2, [x8, #16]
	bl	_reply_to_mac_addr
	ldr	w0, [x19, #36]
	ldr	x8, [x19, #48]
	ldp	w1, w2, [x8, #24]
	bl	_reply_to_mac_addr
	mov	w8, #1
	str	w8, [x19, #12]
	ldr	w1, [x19]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
	ldr	w1, [x19, #4]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	ldr	w1, [x19, #8]
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_info
LBB0_7:
Lloh14:
	adrp	x23, _MBOX_CMD_ECDSA_PUB_KEY@GOTPAGE
Lloh15:
	ldr	x23, [x23, _MBOX_CMD_ECDSA_PUB_KEY@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [sp, #56]
	ldr	w0, [x19, #32]
	add	x1, sp, #56
	bl	_mbox_send_message
	tbnz	w0, #31, LBB0_13
; %bb.8:
	ldr	w8, [x21]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	mov	x0, x20
	bl	_wait_for_completion_timeout
	tbnz	w0, #31, LBB0_13
; %bb.9:
	ldr	x0, [x23]
	ldr	w1, [x19, #56]
	bl	_mox_get_status
	mov	x2, x0
	ldr	w8, [x22]
	neg	w8, w8
	tbz	w0, #31, LBB0_11
; %bb.10:
	cmp	w2, w8
	b.ne	LBB0_14
LBB0_11:
	cmp	w2, w8
	b.ne	LBB0_15
; %bb.12:
	ldr	w0, [x19, #24]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_warn
	b	LBB0_16
LBB0_13:
	mov	x2, x0
LBB0_14:
	mov	x0, x2
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_15:
	ldr	x8, [x19, #48]
	mov	w9, #1
	str	w9, [x19, #16]
	ldr	w0, [x19, #20]
	ldp	w3, w4, [x8]
	ldp	w5, w6, [x8, #8]
	ldr	w7, [x8, #16]
	ldur	q0, [x8, #20]
	ldur	q1, [x8, #36]
	ldur	x9, [x8, #52]
	ldr	w8, [x8, #60]
	str	w8, [sp, #40]
	str	x9, [sp, #32]
	stp	q0, q1, [sp]
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_sprintf
LBB0_16:
	mov	w2, #0
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MBOX_CMD_BOARD_INFO,8,3        ; @MBOX_CMD_BOARD_INFO
	.comm	_HZ,4,2                         ; @HZ
	.comm	_ENODATA,4,2                    ; @ENODATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Board does not have manufacturing information burned!\n"

l_.str.1:                               ; @.str.1
	.asciz	"Turris Mox serial number %016llX\n"

l_.str.2:                               ; @.str.2
	.asciz	"           board version %i\n"

l_.str.3:                               ; @.str.3
	.asciz	"           burned RAM size %i MiB\n"

	.comm	_MBOX_CMD_ECDSA_PUB_KEY,8,3     ; @MBOX_CMD_ECDSA_PUB_KEY
l_.str.4:                               ; @.str.4
	.asciz	"Board has no public key burned!\n"

l_.str.5:                               ; @.str.5
	.asciz	"%06x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x"

	.no_dead_strip	_mox_get_board_info
.subsections_via_symbols
