	.file	"/home/s/projects/compile/src/sys/boot/pc32/boot2/boot2.c"


	.text
	.globl	memcpy
	.type	memcpy,@function
memcpy:
	pushl	%ebx
	pushl	%esi
	movl	20(%esp), %eax
	movl	%eax, %ecx
	decl	%ecx
	js	.LBB1_3
	movl	16(%esp), %ecx
	movl	12(%esp), %edx
	movl	%eax, %esi
.LBB1_2:
	movb	-1(%ecx,%eax), %bl
	movb	%bl, -1(%edx,%eax)
	decl	%eax
	decl	%esi
	jne	.LBB1_2
.LBB1_3:
	popl	%esi
	popl	%ebx
	ret
	.size	memcpy, .-memcpy


	.globl	strcmp
	.type	strcmp,@function
strcmp:
	pushl	%ebx
	xorl	%ecx, %ecx
	jmp	.LBB2_1
.LBB2_3:
	incl	%ecx
.LBB2_1:
	movl	8(%esp), %eax
	movb	(%eax,%ecx), %dl
	movl	12(%esp), %eax
	movzbl	(%eax,%ecx), %ebx
	cmpb	%bl, %dl
	movzbl	%dl, %eax
	jne	.LBB2_4
	testb	%dl, %dl
	jne	.LBB2_3
.LBB2_4:
	subl	%ebx, %eax
	popl	%ebx
	ret
	.size	strcmp, .-strcmp


	.globl	main
	.type	main,@function
main:
	pushl	%ebx
	pushl	%edi
	pushl	%esi
	subl	$24, %esp
	movl	__base, %eax
	leal	_end+65535(%eax), %ecx
	andl	$-65536, %ecx
	subl	%eax, %ecx
	movl	%ecx, boot2_dmadat
	movl	$41216, %ecx
	subl	%eax, %ecx
	movl	$262144, __v86
	movl	$514, __v86+40
	movzbl	(%ecx), %ecx
	movl	%ecx, dsk.0
	testb	$-128, %cl
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %edx
	movl	%edx, dsk.1
	andl	$127, %ecx
	movl	%ecx, dsk.2
	movl	$41217, %ecx
	subl	%eax, %ecx
	movzbl	(%ecx), %eax
	incl	%eax
	movl	%eax, dsk.3
	movl	$1, bootinfo
	movl	$84, bootinfo+48
	movl	$0, bootinfo+56
	movl	$21, __v86+4
	movl	$34816, __v86+24
	call	__v86int
	movl	__v86+24, %eax
	movl	%eax, bootinfo+60
	incb	bootinfo+52
	call	dskprobe
	testl	%eax, %eax
	jne	.LBB3_3
	movl	$.L.str3, (%esp)
	call	*boot2_ufs_api+4
	testl	%eax, %eax
	je	.LBB3_3
	movl	%eax, (%esp)
	movl	$512, 8(%esp)
	movl	$cmd, 4(%esp)
	movl	boot2_ufs_api+8, %eax
	call	*%eax
.LBB3_3:
	cmpb	$0, cmd
	jne	.LBB3_5
	movl	$1, %esi
	jmp	.LBB3_6
.LBB3_5:
	movl	$cmd, 8(%esp)
	movl	$.L.str3, 4(%esp)
	movl	$.L.str4, (%esp)
	call	printf
	call	parse
	movb	$0, cmd
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %esi
.LBB3_6:
	movl	opts, %eax
	testl	$536940544, %eax
	jne	.LBB3_8
	orl	$536875008, %eax
	movl	%eax, opts
.LBB3_8:
	testb	$16, %ah
	je	.LBB3_11
	call	sio_init
	testl	%eax, %eax
	je	.LBB3_11
	movl	$536870912, opts
.LBB3_11:
	testl	%esi, %esi
	jne	.LBB3_18
.LBB3_12:
	movl	$cmd, %edi
	jmp	.LBB3_13
.LBB3_39:
	movl	$7, %ecx
	call	xputc
	xorl	%esi, %esi
.LBB3_13:
	movl	dsk.0, %eax
	movl	dsk.1, %ecx
	movl	dsk.2, %edx
	movl	dsk.4, %ebx
	addl	$97, %ebx
	movl	%ebx, 16(%esp)
	movl	%edx, 12(%esp)
	movl	dev_nm(,%ecx,4), %ecx
	movl	%ecx, 8(%esp)
	andl	$127, %eax
	movl	%eax, 4(%esp)
	movl	$kname, 20(%esp)
	movl	$.L.str8, (%esp)
	call	printf
	testl	%esi, %esi
	jne	.LBB3_36
.LBB3_14:
	movl	$cmd, %esi
	jmp	.LBB3_15
.LBB3_26:
	cmpl	$8, %eax
	je	.LBB3_33
	cmpl	$10, %eax
	je	.LBB3_35
	cmpl	$13, %eax
	je	.LBB3_35
.LBB3_29:
	movl	%esi, %ecx
	subl	%edi, %ecx
	cmpl	$511, %ecx
	jae	.LBB3_31
	movb	%al, (%esi)
	incl	%esi
.LBB3_31:
	movl	%eax, (%esp)
	call	putchar
.LBB3_15:
	xorl	%ecx, %ecx
	call	xgetc
	cmpl	$126, %eax
	jg	.LBB3_32
	cmpl	$7, %eax
	jg	.LBB3_26
	testl	%eax, %eax
	je	.LBB3_15
	jmp	.LBB3_29
.LBB3_32:
	cmpl	$127, %eax
	jne	.LBB3_29
.LBB3_33:
	cmpl	%edi, %esi
	jbe	.LBB3_15
	movl	$.L.str17, (%esp)
	call	printf
	decl	%esi
	jmp	.LBB3_15
.LBB3_35:
	movb	$0, (%esi)
	jmp	.LBB3_38
.LBB3_36:
	movl	$90, %esi
	movl	%esi, %ecx
	call	keyhit
	testl	%eax, %eax
	jne	.LBB3_14
	movl	$13, %esi
	movl	%esi, %ecx
	call	xputc
	movl	$10, %esi
	movl	%esi, %ecx
	call	xputc
.LBB3_38:
	call	parse
	testl	%eax, %eax
	jne	.LBB3_39
	call	load
	xorl	%esi, %esi
	jmp	.LBB3_13
.LBB3_18:
	cmpb	$0, kname
	jne	.LBB3_12
	xorl	%edi, %edi
.LBB3_20:
	movb	.L.str5+12(%edi), %al
	movb	%al, kname+12(%edi)
	decl	%edi
	cmpl	$-13, %edi
	jne	.LBB3_20
	movl	$54, %ecx
	call	keyhit
	testl	%eax, %eax
	jne	.LBB3_12
	call	load
	xorl	%edi, %edi
.LBB3_23:
	movb	.L.str6+7(%edi), %al
	movb	%al, kname+7(%edi)
	decl	%edi
	cmpl	$-8, %edi
	jne	.LBB3_23
	call	load
	xorl	%edi, %edi
.LBB3_25:
	movb	.L.str7+7(%edi), %al
	movb	%al, kname+7(%edi)
	decl	%edi
	cmpl	$-8, %edi
	jne	.LBB3_25
	jmp	.LBB3_12
	.size	main, .-main


	.type	dskprobe,@function
dskprobe:
	pushl	%ebp
	pushl	%ebx
	pushl	%edi
	pushl	%esi
	subl	$12, %esp
	movl	boot2_dmadat, %esi
	movl	$0, dsk.5
	movl	$1, (%esp)
	xorl	%edx, %edx
	movl	%esi, %ecx
	call	drvread
	testl	%eax, %eax
	jne	.LBB4_22
	leal	446(%esi), %eax
	movl	dsk.3, %ecx
	cmpl	$2, %ecx
	jae	.LBB4_16
	xorl	%edx, %edx
	movl	%esi, %edi
	movl	%ecx, %ebx
	jmp	.LBB4_3
.LBB4_5:
	cmpb	$-91, 450(%edi)
	jne	.LBB4_11
	movzbl	446(%edi), %ebp
	andl	$128, %ebp
	jne	.LBB4_8
	cmpl	$1, %ebx
	ja	.LBB4_11
.LBB4_8:
	testl	%ebp, %ebp
	jne	.LBB4_12
	testl	%ecx, %ecx
	je	.LBB4_12
	leal	2(%edx), %ebx
.LBB4_11:
	addl	$16, %edi
	incl	%edx
.LBB4_3:
	cmpl	$4, %edx
	jb	.LBB4_5
	movl	%ebx, %edx
	jmp	.LBB4_13
.LBB4_12:
	addl	$2, %edx
.LBB4_13:
	cmpl	$1, %ecx
	jne	.LBB4_15
	movl	%edx, dsk.3
.LBB4_15:
	movl	%edx, %ecx
.LBB4_16:
	cmpl	$1, %ecx
	je	.LBB4_24
	testl	%ecx, %ecx
	je	.LBB4_19
	shll	$4, %ecx
	leal	-32(%ecx,%eax), %eax
.LBB4_19:
	cmpb	$-91, 4(%eax)
	je	.LBB4_23
	movl	$.L.str11, 4(%esp)
.LBB4_21:
	movl	$.L.str10, (%esp)
	call	printf
.LBB4_22:
	movl	$-1, %eax
	jmp	.LBB4_38
.LBB4_23:
	movl	8(%eax), %eax
	movl	%eax, dsk.5
.LBB4_24:
	movl	dsk.5, %edx
	movl	$1, (%esp)
	incl	%edx
	movl	%esi, %ecx
	call	drvread
	testl	%eax, %eax
	jne	.LBB4_22
	cmpl	$-2108275369, (%esi)
	jne	.LBB4_27
	cmpl	$-2108275369, 132(%esi)
	je	.LBB4_29
.LBB4_27:
	cmpl	$2, dsk.4
	je	.LBB4_37
	movl	$.L.str12, 4(%esp)
	jmp	.LBB4_21
.LBB4_29:
	movl	dsk.6, %eax
	testl	%eax, %eax
	jne	.LBB4_33
	cmpw	$4, 4(%esi)
	jne	.LBB4_32
	movl	$1, dsk.1
.LBB4_32:
	incl	%eax
	movl	%eax, dsk.6
.LBB4_33:
	movzwl	138(%esi), %eax
	movl	dsk.4, %ecx
	cmpl	%eax, %ecx
	jae	.LBB4_35
	movl	%ecx, %eax
	shll	$4, %eax
	cmpl	$0, 148(%esi,%eax)
	jne	.LBB4_36
.LBB4_35:
	movl	$.L.str13, 4(%esp)
	jmp	.LBB4_21
.LBB4_36:
	leal	148(%esi), %eax
	shll	$4, %ecx
	movl	dsk.5, %edx
	addl	4(%eax,%ecx), %edx
	movl	%edx, dsk.5
	subl	184(%esi), %edx
	movl	%edx, dsk.5
.LBB4_37:
	call	*boot2_ufs_api
.LBB4_38:
	addl	$12, %esp
	popl	%esi
	popl	%edi
	popl	%ebx
	popl	%ebp
	ret
	.size	dskprobe, .-dskprobe


	.globl	printf
	.type	printf,@function
printf:
	pushl	%ebp
	pushl	%ebx
	pushl	%edi
	pushl	%esi
	subl	$36, %esp
	leal	60(%esp), %eax
	movl	%eax, 32(%esp)
	movl	56(%esp), %eax
	movl	%eax, 12(%esp)
	movb	(%eax), %al
	testb	%al, %al
	je	.LBB5_13
	leal	22(%esp), %ecx
	negl	%ecx
	movl	%ecx, 8(%esp)
.LBB5_2:
	cmpb	$37, %al
	je	.LBB5_4
	incl	12(%esp)
	movsbl	%al, %eax
	jmp	.LBB5_11
.LBB5_4:
	movl	12(%esp), %ecx
	movsbl	1(%ecx), %eax
	addl	$2, %ecx
	movl	%ecx, 12(%esp)
	cmpl	$99, %eax
	je	.LBB5_10
	cmpl	$115, %eax
	je	.LBB5_14
	cmpl	$117, %eax
	jne	.LBB5_11
	movl	32(%esp), %eax
	leal	4(%eax), %ecx
	movl	%ecx, 32(%esp)
	movl	(%eax), %eax
	movl	%eax, 16(%esp)
	leal	22(%esp), %ecx
.LBB5_8:
	movl	16(%esp), %eax
	movl	$-858993459, %edx
	mull	%edx
	shrl	$3, %edx
	imull	$10, %edx, %eax
	movl	16(%esp), %ebx
	subl	%eax, %ebx
	orb	$48, %bl
	movb	%bl, (%ecx)
	incl	%ecx
	cmpl	$9, 16(%esp)
	jbe	.LBB5_17
	movl	%edx, 16(%esp)
	jmp	.LBB5_8
.LBB5_10:
	movl	32(%esp), %eax
	leal	4(%eax), %ecx
	movl	%ecx, 32(%esp)
	movl	(%eax), %eax
.LBB5_11:
	movl	%eax, (%esp)
	call	putchar
.LBB5_12:
	movl	12(%esp), %eax
	movb	(%eax), %al
	testb	%al, %al
	jne	.LBB5_2
	jmp	.LBB5_13
.LBB5_14:
	movl	32(%esp), %eax
	leal	4(%eax), %ecx
	movl	%ecx, 32(%esp)
	movl	(%eax), %esi
	movb	(%esi), %al
.LBB5_15:
	testb	%al, %al
	je	.LBB5_12
	movsbl	%al, %eax
	movl	%eax, (%esp)
	call	putchar
	movb	1(%esi), %al
	incl	%esi
	jmp	.LBB5_15
.LBB5_17:
	leal	-1(%ecx), %eax
	leal	22(%esp), %edx
	cmpl	%edx, %eax
	jb	.LBB5_12
	movl	8(%esp), %eax
	leal	-1(%ecx,%eax), %esi
	xorl	%edi, %edi
	movl	$-1, %ebx
.LBB5_19:
	movl	%esi, %eax
	subl	%edi, %eax
	movsbl	22(%esp,%eax), %eax
	movl	%eax, (%esp)
	leal	(%esi,%ebx), %eax
	leal	22(%esp,%eax), %ebp
	call	putchar
	decl	%ebx
	incl	%edi
	leal	22(%esp), %eax
	cmpl	%eax, %ebp
	jae	.LBB5_19
	jmp	.LBB5_12
.LBB5_13:
	addl	$36, %esp
	popl	%esi
	popl	%edi
	popl	%ebx
	popl	%ebp
	ret
	.size	printf, .-printf


	.type	parse,@function
parse:
	pushl	%ebp
	pushl	%ebx
	pushl	%edi
	pushl	%esi
	subl	$12, %esp
	movl	$cmd, %eax
	movl	$8388611, %esi
	jmp	.LBB6_1
.LBB6_3:
	movl	8(%esp), %eax
.LBB6_1:
	movb	(%eax), %cl
	testb	%cl, %cl
	je	.LBB6_53
	leal	1(%eax), %edx
	movl	%edx, 8(%esp)
	movb	%cl, %dl
	addb	$-9, %dl
	cmpb	$2, %dl
	jb	.LBB6_3
	cmpb	$32, %cl
	je	.LBB6_3
	movl	%eax, %edi
	jmp	.LBB6_6
.LBB6_8:
	movl	%ebx, %edi
.LBB6_6:
	movb	1(%edi), %dl
	testb	%dl, %dl
	je	.LBB6_12
	leal	1(%edi), %ebx
	movb	%dl, %ch
	addb	$-9, %ch
	cmpb	$23, %ch
	movzbl	%ch, %ebp
	ja	.LBB6_8
	btl	%ebp, %esi
	jae	.LBB6_8
	testb	%dl, %dl
	je	.LBB6_12
	movb	$0, (%ebx)
	incl	%ebx
	movl	%ebx, %edi
	jmp	.LBB6_13
.LBB6_12:
	incl	%edi
.LBB6_13:
	cmpb	$45, %cl
	je	.LBB6_18
	movl	%eax, %ecx
.LBB6_15:
	movb	1(%ecx), %dl
	testb	%dl, %dl
	je	.LBB6_48
	cmpb	$40, %dl
	je	.LBB6_29
	incl	%ecx
	jmp	.LBB6_15
.LBB6_23:
	decl	%edx
.LBB6_20:
	testl	%edx, %edx
	js	.LBB6_54
	cmpb	%cl, optstr(%edx)
	jne	.LBB6_23
	movb	flags(%edx), %cl
	movl	$1, %edx
	shll	%cl, %edx
	xorl	%edx, opts
.LBB6_18:
	incl	%eax
	movb	(%eax), %cl
	testb	%cl, %cl
	je	.LBB6_24
	movl	$11, %edx
	jmp	.LBB6_20
.LBB6_24:
	movl	opts, %eax
	testl	$1073741824, %eax
	jne	.LBB6_26
.LBB6_25:
	movl	%edi, %eax
	jmp	.LBB6_1
.LBB6_26:
	movl	$1174, %ecx
	subl	__base, %ecx
	movzbl	(%ecx), %ecx
	testb	$16, %cl
	jne	.LBB6_28
	movl	$.L.str14, (%esp)
	call	printf
	movl	$536875008, %eax
	orl	opts, %eax
	movl	%eax, opts
.LBB6_28:
	andl	$-1073741825, %eax
	movl	%eax, opts
	jmp	.LBB6_25
.LBB6_29:
	testb	%dl, %dl
	je	.LBB6_48
	movl	8(%esp), %edx
	cmpb	$58, (%edx)
	je	.LBB6_32
	movl	$-1, %edx
	jmp	.LBB6_34
.LBB6_32:
	movsbl	(%eax), %edx
	addl	$-48, %edx
	cmpl	$9, %edx
	ja	.LBB6_54
	addl	$2, %eax
.LBB6_34:
	incl	%ecx
	subl	%eax, %ecx
	cmpl	$2, %ecx
	jne	.LBB6_54
	movb	(%eax), %cl
	xorl	%ebx, %ebx
	jmp	.LBB6_36
.LBB6_38:
	cmpl	$2, %ebx
	je	.LBB6_54
	incl	%ebx
.LBB6_36:
	movl	dev_nm(,%ebx,4), %ebp
	cmpb	(%ebp), %cl
	jne	.LBB6_38
	movb	1(%ebp), %ch
	cmpb	%ch, 1(%eax)
	jne	.LBB6_38
	movl	%ebx, dsk.1
	movsbl	3(%eax), %ecx
	addl	$-48, %ecx
	movl	%ecx, dsk.2
	cmpb	$44, 4(%eax)
	jne	.LBB6_54
	cmpl	$9, %ecx
	ja	.LBB6_54
	movl	$1, dsk.3
	leal	5(%eax), %ebp
	cmpb	$44, 6(%eax)
	jne	.LBB6_45
	movsbl	(%ebp), %ebp
	addl	$-47, %ebp
	movl	%ebp, dsk.3
	cmpl	$4, %ebp
	ja	.LBB6_54
	addl	$7, %eax
	movl	%eax, %ebp
.LBB6_45:
	cmpb	$41, 1(%ebp)
	jne	.LBB6_54
	movsbl	(%ebp), %eax
	addl	$-97, %eax
	movl	%eax, dsk.4
	cmpl	$7, %eax
	ja	.LBB6_54
	cmpl	$-1, %edx
	cmovnel	%edx, %ecx
	cmpl	$2, %ebx
	sbbl	%eax, %eax
	andl	$128, %eax
	addl	%ecx, %eax
	movl	%eax, dsk.0
	addl	$2, %ebp
	movl	%ebp, %eax
.LBB6_48:
	movb	-1(%edi), %cl
	movl	%edi, %edx
	subl	%eax, %edx
	testb	%cl, %cl
	sete	%ch
	movzbl	%ch, %ebx
	movl	%edx, %ebp
	subl	%ebx, %ebp
	cmpl	%ebx, %edx
	je	.LBB6_25
	cmpl	$1023, %ebp
	ja	.LBB6_54
	testl	%ebp, %ebp
	js	.LBB6_25
	testb	%cl, %cl
	sete	%cl
	movzbl	%cl, %ecx
	addl	%eax, %ecx
	movl	%eax, %edx
	subl	%edi, %edx
	movl	%edi, %ebp
	subl	%ecx, %ebp
	addl	%ebx, %edx
	movl	$1, %ecx
	subl	%edx, %ecx
.LBB6_52:
	movb	(%eax,%ebp), %dl
	movb	%dl, kname(%ebp)
	decl	%ebp
	decl	%ecx
	jne	.LBB6_52
	jmp	.LBB6_25
.LBB6_53:
	call	dskprobe
	jmp	.LBB6_55
.LBB6_54:
	movl	$-1, %eax
.LBB6_55:
	addl	$12, %esp
	popl	%esi
	popl	%edi
	popl	%ebx
	popl	%ebp
	ret
	.size	parse, .-parse


	.type	keyhit,@function
keyhit:
	pushl	%ebx
	pushl	%edi
	pushl	%esi
	testb	$16, opts+3
	je	.LBB7_3
.LBB7_1:
	xorl	%eax, %eax
.LBB7_2:
	popl	%esi
	popl	%edi
	popl	%ebx
	ret
.LBB7_3:
	movl	%ecx, %esi
	xorl	%edi, %edi
	movl	$1, %ebx
	jmp	.LBB7_4
.LBB7_6:
	movl	$1132, %eax
	subl	__base, %eax
	testl	%edi, %edi
	movl	(%eax), %eax
	cmovel	%eax, %edi
	cmpl	%edi, %eax
	jb	.LBB7_1
	leal	(%edi,%esi), %ecx
	cmpl	%ecx, %eax
	jae	.LBB7_1
.LBB7_4:
	movl	%ebx, %ecx
	call	xgetc
	testl	%eax, %eax
	je	.LBB7_6
	movl	$1, %eax
	jmp	.LBB7_2
	.size	keyhit, .-keyhit


	.type	load,@function
load:
	pushl	%ebp
	pushl	%ebx
	pushl	%edi
	pushl	%esi
	subl	$236, %esp
	movl	$kname, (%esp)
	call	*boot2_ufs_api+4
	movl	%eax, 36(%esp)
	testl	%eax, %eax
	jne	.LBB8_4
	cmpl	$0, ls
	jne	.LBB8_39
	movl	$kname, 4(%esp)
	movl	$.L.str15, (%esp)
.LBB8_3:
	call	printf
	jmp	.LBB8_39
.LBB8_4:
	leal	184(%esp), %eax
	movl	%eax, 4(%esp)
	movl	36(%esp), %eax
	movl	%eax, (%esp)
	movl	$52, 8(%esp)
	movl	boot2_ufs_api+8, %eax
	call	*%eax
	cmpl	$52, %eax
	je	.LBB8_6
.LBB8_5:
	movl	$.L.str16, 4(%esp)
	movl	$.L.str10, (%esp)
	jmp	.LBB8_3
.LBB8_6:
	movl	184(%esp), %eax
	movzwl	%ax, %ecx
	cmpl	$267, %ecx
	je	.LBB8_18
	cmpb	$127, %al
	jne	.LBB8_5
	cmpb	$69, 185(%esp)
	jne	.LBB8_5
	cmpb	$76, 186(%esp)
	jne	.LBB8_5
	cmpb	$70, 187(%esp)
	jne	.LBB8_5
	movl	212(%esp), %esi
	movl	%esi, fs_off
	xorl	%esi, %esi
	movl	boot2_ufs_api+8, %edi
	movl	%esi, %ebx
	jmp	.LBB8_12
.LBB8_27:
	movl	36(%esp), %ecx
	movl	%ecx, (%esp)
	movl	%ebx, %ecx
	shll	$5, %ecx
	leal	120(%esp,%ecx), %ecx
	movl	%ecx, 4(%esp)
	movl	$32, 8(%esp)
	call	*%edi
	cmpl	$32, %eax
	jne	.LBB8_5
	movl	%ebx, %eax
	shll	$5, %eax
	cmpl	$1, 120(%esp,%eax)
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %ebx
	incl	%esi
.LBB8_12:
	movzwl	228(%esp), %eax
	cmpl	%eax, %esi
	jge	.LBB8_14
	cmpl	$2, %ebx
	jl	.LBB8_27
.LBB8_14:
	movl	$-1, %edi
	leal	120(%esp), %ebx
.LBB8_15:
	incl	%edi
	cmpl	$1, %edi
	jg	.LBB8_29
	movl	$16777215, %esi
	andl	12(%ebx), %esi
	subl	__base, %esi
	movl	4(%ebx), %eax
	movl	%eax, fs_off
	movl	16(%ebx), %ebp
	movl	%ebp, 8(%esp)
	movl	%esi, 4(%esp)
	movl	36(%esp), %ecx
	movl	%ecx, (%esp)
	call	*boot2_ufs_api+8
	cmpl	%ebp, %eax
	jne	.LBB8_5
	addl	$32, %ebx
	jmp	.LBB8_15
.LBB8_18:
	movl	$16777215, %eax
	andl	204(%esp), %eax
	movl	%eax, 32(%esp)
	movl	__base, %ecx
	movl	%ecx, 28(%esp)
	movl	$4096, fs_off
	movl	188(%esp), %esi
	movl	%esi, 8(%esp)
	subl	%ecx, %eax
	movl	%eax, 4(%esp)
	movl	36(%esp), %eax
	movl	%eax, (%esp)
	movl	boot2_ufs_api+8, %eax
	call	*%eax
	cmpl	%esi, %eax
	jne	.LBB8_5
	movl	$4095, %esi
	addl	188(%esp), %esi
	movl	192(%esp), %edi
	movl	%edi, 8(%esp)
	andl	$-4096, %esi
	movl	%esi, %ebx
	subl	28(%esp), %ebx
	movl	32(%esp), %ecx
	leal	(%ecx,%ebx), %ecx
	movl	%ecx, 4(%esp)
	movl	36(%esp), %ecx
	movl	%ecx, (%esp)
	movl	boot2_ufs_api+8, %eax
	call	*%eax
	cmpl	%edi, %eax
	jne	.LBB8_5
	movl	192(%esp), %eax
	addl	%eax, %ebx
	movl	$4095, %ecx
	addl	196(%esp), %ecx
	andl	$-4096, %ecx
	addl	%ecx, %ebx
	movl	32(%esp), %edx
	leal	(%edx,%ebx), %edi
	addl	__base, %edi
	movl	%edi, bootinfo+64
	addl	%eax, %esi
	addl	%ecx, %esi
	subl	28(%esp), %esi
	addl	%edx, %esi
	xorl	%eax, %eax
.LBB8_21:
	movb	203(%esp,%eax), %cl
	movb	%cl, 3(%esi,%eax)
	decl	%eax
	cmpl	$-4, %eax
	jne	.LBB8_21
	movl	32(%esp), %eax
	leal	4(%eax,%ebx), %esi
	movl	200(%esp), %edi
	testl	%edi, %edi
	je	.LBB8_38
	movl	%edi, 8(%esp)
	movl	%esi, 4(%esp)
	movl	36(%esp), %esi
	movl	%esi, (%esp)
	movl	boot2_ufs_api+8, %esi
	call	*%esi
	cmpl	%edi, %eax
	jne	.LBB8_5
	addl	$4, %ebx
	addl	200(%esp), %ebx
	movl	32(%esp), %esi
	leal	(%esi,%ebx), %esi
	movl	%esi, 4(%esp)
	movl	36(%esp), %esi
	movl	%esi, (%esp)
	movl	$4, 8(%esp)
	movl	boot2_ufs_api+8, %esi
	call	*%esi
	cmpl	$4, %eax
	jne	.LBB8_5
	movl	32(%esp), %eax
	movl	(%ebx,%eax), %esi
	addl	$-4, %esi
	movl	%esi, 8(%esp)
	leal	4(%eax,%ebx), %eax
	movl	%eax, 4(%esp)
	movl	36(%esp), %eax
	movl	%eax, (%esp)
	movl	boot2_ufs_api+8, %eax
	call	*%eax
	cmpl	%esi, %eax
	jne	.LBB8_5
	addl	$4, %ebx
	addl	%ebx, %esi
	addl	32(%esp), %esi
	jmp	.LBB8_38
.LBB8_29:
	movl	$4095, %eax
	addl	172(%esp), %eax
	andl	$-4096, %eax
	addl	%eax, %esi
	movl	%esi, %eax
	addl	__base, %eax
	movl	%eax, bootinfo+64
	movzwl	234(%esp), %eax
	leal	3(%eax), %ecx
	movzwl	232(%esp), %edx
	cmpl	%ecx, %edx
	jne	.LBB8_37
	imull	$40, %eax, %eax
	movl	216(%esp), %ecx
	leal	40(%ecx,%eax), %eax
	movl	%eax, fs_off
	leal	40(%esp), %eax
	movl	%eax, 4(%esp)
	movl	36(%esp), %eax
	movl	%eax, (%esp)
	movl	$80, 8(%esp)
	movl	boot2_ufs_api+8, %eax
	call	*%eax
	cmpl	$80, %eax
	jne	.LBB8_5
	movl	$-1, %edi
	leal	40(%esp), %ebx
	jmp	.LBB8_32
.LBB8_33:
	xorl	%eax, %eax
.LBB8_34:
	movb	23(%ebx,%eax), %cl
	movb	%cl, 3(%esi,%eax)
	decl	%eax
	cmpl	$-4, %eax
	jne	.LBB8_34
	movl	16(%ebx), %eax
	movl	%eax, fs_off
	movl	20(%ebx), %ebp
	movl	%ebp, 8(%esp)
	leal	4(%esi), %ecx
	movl	%ecx, 4(%esp)
	movl	36(%esp), %ecx
	movl	%ecx, (%esp)
	call	*boot2_ufs_api+8
	cmpl	%ebp, %eax
	jne	.LBB8_5
	movl	20(%ebx), %eax
	leal	4(%eax,%esi), %esi
	addl	$40, %ebx
.LBB8_32:
	incl	%edi
	cmpl	$2, %edi
	jl	.LBB8_33
.LBB8_37:
	movl	$16777215, %eax
	andl	208(%esp), %eax
	movl	%eax, 32(%esp)
.LBB8_38:
	movl	__base, %eax
	addl	%eax, %esi
	movl	%esi, bootinfo+68
	leal	kname(%eax), %ecx
	movl	%ecx, bootinfo+4
	movb	dsk.0, %cl
	movb	%cl, bootinfo+53
	movl	$537264127, %ecx
	andl	opts, %ecx
	movl	dsk.4, %edx
	movl	dsk.2, %esi
	movl	dsk.1, %edi
	movl	dsk.3, %ebx
	leal	bootinfo(%eax), %eax
	movl	%eax, 24(%esp)
	movl	%ecx, 4(%esp)
	movl	32(%esp), %eax
	movl	%eax, (%esp)
	shll	$20, %ebx
	movzbl	dev_maj(%edi), %eax
	orl	%ebx, %eax
	shll	$16, %esi
	orl	%eax, %esi
	shll	$8, %edx
	orl	%esi, %edx
	orl	$-1610612736, %edx
	movl	%edx, 8(%esp)
	movl	$0, 20(%esp)
	movl	$0, 16(%esp)
	movl	$0, 12(%esp)
	call	__exec
.LBB8_39:
	addl	$236, %esp
	popl	%esi
	popl	%edi
	popl	%ebx
	popl	%ebp
	ret
	.size	load, .-load


	.globl	putchar
	.type	putchar,@function
putchar:
	pushl	%esi
	movl	8(%esp), %esi
	cmpl	$10, %esi
	jne	.LBB9_2
	movl	$13, %ecx
	call	xputc
.LBB9_2:
	movl	%esi, %ecx
	call	xputc
	popl	%esi
	ret
	.size	putchar, .-putchar


	.globl	exit
	.type	exit,@function
exit:
	ret
	.size	exit, .-exit


	.globl	dskread
	.type	dskread,@function
dskread:
	subl	$4, %esp
	movl	dsk.5, %edx
	movl	16(%esp), %eax
	movl	%eax, (%esp)
	addl	12(%esp), %edx
	movl	8(%esp), %ecx
	call	drvread
	addl	$4, %esp
	ret
	.size	dskread, .-dskread


	.type	drvread,@function
drvread:
	pushl	%edi
	pushl	%esi
	subl	$12, %esp
	movl	%edx, %esi
	movl	%ecx, %edi
	movl	drvread.c, %ecx
	roll	$8, %ecx
	movl	%ecx, drvread.c
	call	xputc
	movl	$8, %ecx
	call	xputc
	movl	$458752, __v86
	movl	$1829, __v86+4
	addl	__base, %edi
	movl	%edi, %eax
	shrl	$4, %eax
	movzwl	%ax, %eax
	movl	%eax, __v86+8
	movl	%esi, __v86+24
	andl	$15, %edi
	movl	%edi, __v86+36
	movl	%esi, %eax
	shrl	$16, %eax
	movl	%eax, __v86+28
	movl	24(%esp), %eax
	shll	$8, %eax
	orl	dsk.0, %eax
	movl	%eax, __v86+32
	call	__v86int
	movl	$262144, __v86
	testb	$1, __v86+40
	je	.LBB12_2
	movl	__v86+24, %eax
	movl	%esi, 8(%esp)
	movzbl	%ah, %eax
	movl	%eax, 4(%esp)
	movl	$.L.str9, (%esp)
	call	printf
	movl	$-1, %eax
	jmp	.LBB12_3
.LBB12_2:
	xorl	%eax, %eax
.LBB12_3:
	addl	$12, %esp
	popl	%esi
	popl	%edi
	ret
	.size	drvread, .-drvread


	.type	xputc,@function
xputc:
	pushl	%esi
	subl	$8, %esp
	movl	opts, %eax
	testl	$536870912, %eax
	movl	%ecx, %esi
	je	.LBB13_2
	movl	$16, __v86+4
	movl	%esi, %eax
	orl	$3584, %eax
	andl	$3839, %eax
	movl	%eax, __v86+24
	movl	$7, __v86+36
	call	__v86int
	movl	opts, %eax
.LBB13_2:
	testb	$16, %ah
	je	.LBB13_4
	movl	%esi, (%esp)
	call	sio_putc
.LBB13_4:
	addl	$8, %esp
	popl	%esi
	ret
	.size	xputc, .-xputc


	.type	xgetc,@function
xgetc:
	pushl	%esi
	testb	$16, opts+3
	je	.LBB14_2
.LBB14_1:
	xorl	%eax, %eax
	jmp	.LBB14_13
.LBB14_2:
	movl	%ecx, %esi
	jmp	.LBB14_3
.LBB14_7:
	testb	$16, opts+1
	je	.LBB14_11
	call	sio_ischar
	testl	%eax, %eax
	jne	.LBB14_9
.LBB14_11:
	testl	%esi, %esi
	jne	.LBB14_1
.LBB14_3:
	testb	$32, opts+3
	je	.LBB14_7
	movl	$22, __v86+4
	movl	$256, __v86+24
	call	__v86int
	testb	$64, __v86+40
	jne	.LBB14_7
	testl	%esi, %esi
	je	.LBB14_12
.LBB14_6:
	movl	$1, %eax
	jmp	.LBB14_13
.LBB14_9:
	testl	%esi, %esi
	jne	.LBB14_6
	call	sio_getc
	jmp	.LBB14_13
.LBB14_12:
	movl	$22, __v86+4
	movl	$0, __v86+24
	call	__v86int
	movzbl	__v86+24, %eax
.LBB14_13:
	popl	%esi
	ret
	.size	xgetc, .-xgetc
	.type	optstr,@object
	.section	.rodata,"a",@progbits
optstr:
	.ascii	"VhaCgmnPprsv"
	.size	optstr, 12
	.type	flags,@object
flags:
	.ascii	"\035\f\000\r\017\020\034\036\022\005\001\013"
	.size	flags, 12
	.type	.L.str,@object
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"ad"
	.size	.L.str, 3
	.type	.L.str1,@object
.L.str1:
	.asciz	"da"
	.size	.L.str1, 3
	.type	.L.str2,@object
.L.str2:
	.asciz	"fd"
	.size	.L.str2, 3
	.type	dev_nm,@object
	.section	.rodata,"a",@progbits
dev_nm:
	.long	.L.str
	.long	.L.str1
	.long	.L.str2
	.size	dev_nm, 12
	.type	dev_maj,@object
dev_maj:
	.ascii	"\036\004\002"
	.size	dev_maj, 3
	.type	boot2_dmadat,@object
	.section	.gnu.linkonce.b.boot2_dmadat,"aw",@nobits
	.comm	boot2_dmadat,4,4
	.type	dsk.0,@object
	.bss
	.local	dsk.0
	.comm	dsk.0,4,4
	.type	dsk.1,@object
	.local	dsk.1
	.comm	dsk.1,4,4
	.type	dsk.2,@object
	.local	dsk.2
	.comm	dsk.2,4,4
	.type	dsk.3,@object
	.local	dsk.3
	.comm	dsk.3,4,4
	.type	dsk.4,@object
	.local	dsk.4
	.comm	dsk.4,4,4
	.type	dsk.5,@object
	.local	dsk.5
	.comm	dsk.5,4,4
	.type	dsk.6,@object
	.local	dsk.6
	.comm	dsk.6,4,4
	.type	bootinfo,@object
	.local	bootinfo
	.comm	bootinfo,84,16
	.type	.L.str3,@object
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str3:
	.asciz	"/boot.config"
	.size	.L.str3, 13
	.type	cmd,@object
	.bss
	.local	cmd
	.comm	cmd,512,16
	.type	.L.str4,@object
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str4:
	.asciz	"%s: %s"
	.size	.L.str4, 7
	.type	opts,@object
	.data
opts:
	.long	536870912
	.size	opts, 4
	.type	kname,@object
	.bss
	.local	kname
	.comm	kname,1024,16
	.type	.L.str5,@object
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str5:
	.asciz	"/boot/loader"
	.size	.L.str5, 13
	.type	.L.str6,@object
.L.str6:
	.asciz	"/loader"
	.size	.L.str6, 8
	.type	.L.str7,@object
.L.str7:
	.asciz	"/kernel"
	.size	.L.str7, 8
	.type	.L.str8,@object
	.section	.rodata.str1.16,"aMS",@progbits,1
.L.str8:
	.asciz	"\nDragonFly boot\n%u:%s(%u,%c)%s: "
	.size	.L.str8, 33
	.type	fs_off,@object
	.section	.gnu.linkonce.b.fs_off,"aw",@nobits
	.comm	fs_off,4,4
	.type	ls,@object
	.section	.gnu.linkonce.b.ls,"aw",@nobits
	.comm	ls,4,4
	.type	drvread.c,@object
	.data
drvread.c:
	.long	761035823
	.size	drvread.c, 4
	.type	.L.str9,@object
	.section	.rodata.str1.16,"aMS",@progbits,1
.L.str9:
	.asciz	"error %u lba %u\n"
	.size	.L.str9, 17
	.type	.L.str10,@object
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str10:
	.asciz	"Bad %s\n"
	.size	.L.str10, 8
	.type	.L.str11,@object
.L.str11:
	.asciz	"slice"
	.size	.L.str11, 6
	.type	.L.str12,@object
.L.str12:
	.asciz	"label"
	.size	.L.str12, 6
	.type	.L.str13,@object
.L.str13:
	.asciz	"partition"
	.size	.L.str13, 10
	.type	.L.str14,@object
.L.str14:
	.asciz	"NO KB\n"
	.size	.L.str14, 7
	.type	.L.str15,@object
.L.str15:
	.asciz	"No %s\n"
	.size	.L.str15, 7
	.type	.L.str16,@object
.L.str16:
	.asciz	"format"
	.size	.L.str16, 7
	.type	.L.str17,@object
.L.str17:
	.asciz	"\b \b"
	.size	.L.str17, 4

