void diskd(void) {
  char Buffer[512];
  char str[256];
  int drive, sec, i, ii, c, line;
  puts0("drive? ");
  getsn(str, 256);
  drive = htoi(str);
  puts0("\r\nabs sec? ");
  getsn(str, 256);
  sec = atoi(str);
  puts0("\r\ndrive = ");
  puthex(drive);
  puts0(" sec = ");
  putdec(sec);
  for (i = 0; i < 512; i++)
    Buffer[i] = 0;
  i = secread(drive, sec, Buffer);
  puts0(" err code = ");
  puthex(i);
  if (i == 1)
    puts0(" OK");
  puts0("\r\n");
  ii = 0;
  for (line = 0; line < 32; line++) {
    if (line == 15) {
      puts0(" press any key ");
      getch();
      putch('\r');
    }
    for (i = 0; i < 16; i++) {
      c = Buffer[ii++];
      puthex_b(c);
      putch(' ');
    }
    ii = ii - 16;
    for (i = 0; i < 16; i++) {
      c = (Buffer[ii++]) & 0xFFU;
      if (c < ' ')
        putch('.');
      else
        putch(c);
    }
    puts0("\r\n");
  }
}


x86 assembly (clang, -O0):
<diskd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x320,%rsp
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   10a0 <puts0@plt>
lea    -0x300(%rbp),%rdi
mov    $0x100,%esi
mov    $0x0,%al
call   1030 <getsn@plt>
lea    -0x300(%rbp),%rdi
mov    $0x0,%al
call   1080 <htoi@plt>
mov    %eax,-0x304(%rbp)
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   10a0 <puts0@plt>
lea    -0x300(%rbp),%rdi
mov    $0x100,%esi
mov    $0x0,%al
call   1030 <getsn@plt>
lea    -0x300(%rbp),%rdi
mov    $0x0,%al
call   10b0 <atoi@plt>
mov    %eax,-0x308(%rbp)
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   10a0 <puts0@plt>
mov    -0x304(%rbp),%edi
mov    $0x0,%al
call   1070 <puthex@plt>
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   10a0 <puts0@plt>
mov    -0x308(%rbp),%edi
mov    $0x0,%al
call   1060 <putdec@plt>
movl   $0x0,-0x30c(%rbp)
cmpl   $0x200,-0x30c(%rbp)
jge    1288 <diskd+0xe8>
movslq -0x30c(%rbp),%rax
movb   $0x0,-0x200(%rbp,%rax,1)
mov    -0x30c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30c(%rbp)
jmp    1255 <diskd+0xb5>
mov    -0x304(%rbp),%edi
mov    -0x308(%rbp),%esi
lea    -0x200(%rbp),%rdx
mov    $0x0,%al
call   1050 <secread@plt>
mov    %eax,-0x30c(%rbp)
lea    0xd78(%rip),%rdi
mov    $0x0,%al
call   10a0 <puts0@plt>
mov    -0x30c(%rbp),%edi
mov    $0x0,%al
call   1070 <puthex@plt>
cmpl   $0x1,-0x30c(%rbp)
jne    12de <diskd+0x13e>
lea    0xd5d(%rip),%rdi
mov    $0x0,%al
call   10a0 <puts0@plt>
lea    0xd53(%rip),%rdi
mov    $0x0,%al
call   10a0 <puts0@plt>
movl   $0x0,-0x310(%rbp)
movl   $0x0,-0x318(%rbp)
cmpl   $0x20,-0x318(%rbp)
jge    1452 <diskd+0x2b2>
cmpl   $0xf,-0x318(%rbp)
jne    133b <diskd+0x19b>
lea    0xd1a(%rip),%rdi
mov    $0x0,%al
call   10a0 <puts0@plt>
mov    $0x0,%al
call   1090 <getch@plt>
mov    $0xd,%edi
mov    $0x0,%al
call   10c0 <putch@plt>
movl   $0x0,-0x30c(%rbp)
cmpl   $0x10,-0x30c(%rbp)
jge    13a0 <diskd+0x200>
mov    -0x310(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x310(%rbp)
cltq
movsbl -0x200(%rbp,%rax,1),%eax
ff
mov    %eax,-0x314(%rbp)
mov    -0x314(%rbp),%edi
mov    $0x0,%al
call   1040 <puthex_b@plt>
mov    $0x20,%edi
mov    $0x0,%al
call   10c0 <putch@plt>
mov    -0x30c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30c(%rbp)
jmp    1345 <diskd+0x1a5>
mov    -0x310(%rbp),%eax
sub    $0x10,%eax
mov    %eax,-0x310(%rbp)
movl   $0x0,-0x30c(%rbp)
cmpl   $0x10,-0x30c(%rbp)
jge    1430 <diskd+0x290>
mov    -0x310(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x310(%rbp)
cltq
movsbl -0x200(%rbp,%rax,1),%eax
ff
and    $0xff,%eax
mov    %eax,-0x314(%rbp)
cmpl   $0x20,-0x314(%rbp)
jge    140a <diskd+0x26a>
mov    $0x2e,%edi
mov    $0x0,%al
call   10c0 <putch@plt>
jmp    1417 <diskd+0x277>
mov    -0x314(%rbp),%edi
mov    $0x0,%al
call   10c0 <putch@plt>
jmp    141c <diskd+0x27c>
mov    -0x30c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30c(%rbp)
jmp    13b9 <diskd+0x219>
lea    0xc01(%rip),%rdi
mov    $0x0,%al
call   10a0 <puts0@plt>
mov    -0x318(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x318(%rbp)
jmp    1300 <diskd+0x160>
add    $0x320,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diskd>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x308,%rsp
lea    0xe3c(%rip),%rdi
xor    %eax,%eax
call   10b0 <puts0@plt>
lea    0x200(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1030 <getsn@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1090 <htoi@plt>
mov    %eax,%r14d
lea    0xe12(%rip),%rdi
xor    %eax,%eax
call   10b0 <puts0@plt>
mov    %rbp,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1030 <getsn@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   10c0 <atoi@plt>
mov    %eax,%ebp
lea    0xdf5(%rip),%rdi
xor    %eax,%eax
call   10b0 <puts0@plt>
mov    %r14d,%edi
xor    %eax,%eax
call   1080 <puthex@plt>
lea    0xde8(%rip),%rdi
xor    %eax,%eax
call   10b0 <puts0@plt>
mov    %ebp,%edi
xor    %eax,%eax
call   1070 <putdec@plt>
mov    %rsp,%rbx
mov    $0x200,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <secread@plt>
mov    %eax,%ebx
lea    0xdb6(%rip),%rdi
xor    %eax,%eax
call   10b0 <puts0@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1080 <puthex@plt>
cmp    $0x1,%ebx
jne    1294 <diskd+0xe4>
lea    0xda7(%rip),%rdi
xor    %eax,%eax
call   10b0 <puts0@plt>
lea    0xd9d(%rip),%r15
mov    %r15,%rdi
xor    %eax,%eax
call   10b0 <puts0@plt>
lea    0xd8f(%rip),%r14
mov    $0x2e,%ebp
xor    %ebx,%ebx
jmp    1590 <diskd+0x3e0>
nopl   0x0(%rax,%rax,1)
movsbl (%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0x1(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0x2(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0x3(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0x4(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0x5(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0x6(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0x7(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0x8(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0x9(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0xa(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0xb(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0xc(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0xd(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0xe(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movsbl 0xf(%rsp,%rbx,1),%edi
xor    %eax,%eax
call   1040 <puthex_b@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
mov    (%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movzbl 0x1(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movzbl 0x2(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movzbl 0x3(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
mov    0x4(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movzbl 0x5(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movzbl 0x6(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movzbl 0x7(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
mov    0x8(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movzbl 0x9(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movzbl 0xa(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movzbl 0xb(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
mov    0xc(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movzbl 0xd(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movzbl 0xe(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
movzbl 0xf(%rsp,%rbx,1),%eax
cmp    $0x20,%al
cmovb  %ebp,%eax
movzbl %al,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   10b0 <puts0@plt>
add    $0x10,%rbx
cmp    $0x200,%ebx
je     15be <diskd+0x40e>
cmp    $0xf0,%ebx
jne    12c0 <diskd+0x110>
mov    %r14,%rdi
xor    %eax,%eax
call   10b0 <puts0@plt>
xor    %eax,%eax
call   10a0 <getch@plt>
mov    $0xd,%edi
xor    %eax,%eax
call   10d0 <putch@plt>
jmp    12c0 <diskd+0x110>
add    $0x308,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"drive? \00"
@.str.1 = [12 x i8] c"\0D\0Aabs sec? \00"
@.str.2 = [11 x i8] c"\0D\0Adrive = \00"
@.str.3 = [8 x i8] c" sec = \00"
@.str.4 = [13 x i8] c" err code = \00"
@.str.5 = [4 x i8] c" OK\00"
@.str.6 = [3 x i8] c"\0D\0A\00"
@.str.7 = [16 x i8] c" press any key \00"
define void @diskd() {
%1 = alloca [512 x i8]
%2 = alloca [256 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%11 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @getsn to i32 (i8*, i32, ...)*)(i8* %10, i32 256)
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @htoi to i32 (i8*, ...)*)(i8* %12)
store i32 %13, i32* %3
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%16 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @getsn to i32 (i8*, i32, ...)*)(i8* %15, i32 256)
%17 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %17)
store i32 %18, i32* %4
%19 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%20 = load i32, i32* %3
%21 = call i32 (i32, ...) bitcast (i32 (...)* @puthex to i32 (i32, ...)*)(i32 %20)
%22 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%23 = load i32, i32* %4
%24 = call i32 (i32, ...) bitcast (i32 (...)* @putdec to i32 (i32, ...)*)(i32 %23)
store i32 0, i32* %5
br label %25
25: ; preds = %32, %0
%26 = load i32, i32* %5
%27 = icmp slt i32 %26, 512
br i1 %27, label %28, label %35
28: ; preds = %25
%29 = load i32, i32* %5
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %30
store i8 0, i8* %31
br label %32
32: ; preds = %28
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 1
store i32 %34, i32* %5
br label %25
35: ; preds = %25
%36 = load i32, i32* %3
%37 = load i32, i32* %4
%38 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%39 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @secread to i32 (i32, i32, i8*, ...)*)(i32 %36, i32 %37, i8* %38)
store i32 %39, i32* %5
%40 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%41 = load i32, i32* %5
%42 = call i32 (i32, ...) bitcast (i32 (...)* @puthex to i32 (i32, ...)*)(i32 %41)
%43 = load i32, i32* %5
%44 = icmp eq i32 %43, 1
br i1 %44, label %45, label %47
45: ; preds = %35
%46 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %47
47: ; preds = %45, %35
%48 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %6
store i32 0, i32* %8
br label %49
49: ; preds = %103, %47
%50 = load i32, i32* %8
%51 = icmp slt i32 %50, 32
br i1 %51, label %52, label %106
52: ; preds = %49
%53 = load i32, i32* %8
%54 = icmp eq i32 %53, 15
br i1 %54, label %55, label %59
55: ; preds = %52
%56 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%57 = call i32 (...) @getch()
%58 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 13)
br label %59
59: ; preds = %55, %52
store i32 0, i32* %5
br label %60
60: ; preds = %73, %59
%61 = load i32, i32* %5
%62 = icmp slt i32 %61, 16
br i1 %62, label %63, label %76
63: ; preds = %60
%64 = load i32, i32* %6
%65 = add nsw i32 %64, 1
store i32 %65, i32* %6
%66 = sext i32 %64 to i64
%67 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %66
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
store i32 %69, i32* %7
%70 = load i32, i32* %7
%71 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %70)
%72 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
br label %73
73: ; preds = %63
%74 = load i32, i32* %5
%75 = add nsw i32 %74, 1
store i32 %75, i32* %5
br label %60
76: ; preds = %60
%77 = load i32, i32* %6
%78 = sub nsw i32 %77, 16
store i32 %78, i32* %6
store i32 0, i32* %5
br label %79
79: ; preds = %98, %76
%80 = load i32, i32* %5
%81 = icmp slt i32 %80, 16
br i1 %81, label %82, label %101
82: ; preds = %79
%83 = load i32, i32* %6
%84 = add nsw i32 %83, 1
store i32 %84, i32* %6
%85 = sext i32 %83 to i64
%86 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %85
%87 = load i8, i8* %86
%88 = sext i8 %87 to i32
%89 = and i32 %88, 255
store i32 %89, i32* %7
%90 = load i32, i32* %7
%91 = icmp slt i32 %90, 32
br i1 %91, label %92, label %94
92: ; preds = %82
%93 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 46)
br label %97
94: ; preds = %82
%95 = load i32, i32* %7
%96 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %95)
br label %97
97: ; preds = %94, %92
br label %98
98: ; preds = %97
%99 = load i32, i32* %5
%100 = add nsw i32 %99, 1
store i32 %100, i32* %5
br label %79
101: ; preds = %79
%102 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %103
103: ; preds = %101
%104 = load i32, i32* %8
%105 = add nsw i32 %104, 1
store i32 %105, i32* %8
br label %49
106: ; preds = %49
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"drive? \00"
@.str.1 = [12 x i8] c"\0D\0Aabs sec? \00"
@.str.2 = [11 x i8] c"\0D\0Adrive = \00"
@.str.3 = [8 x i8] c" sec = \00"
@.str.4 = [13 x i8] c" err code = \00"
@.str.5 = [4 x i8] c" OK\00"
@.str.6 = [3 x i8] c"\0D\0A\00"
@.str.7 = [16 x i8] c" press any key \00"
define void @diskd() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @getsn to i32 (i8*, i32, ...)*)(i8* %5, i32 256)
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @htoi to i32 (i8*, ...)*)(i8* %5)
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @getsn to i32 (i8*, i32, ...)*)(i8* %5, i32 256)
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %5)
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 (i32, ...) bitcast (i32 (...)* @puthex to i32 (i32, ...)*)(i32 %8)
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 (i32, ...) bitcast (i32 (...)* @putdec to i32 (i32, ...)*)(i32 %11)
%16 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @secread to i32 (i32, i32, i8*, ...)*)(i32 %8, i32 %11, i8* %4)
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%18 = call i32 (i32, ...) bitcast (i32 (...)* @puthex to i32 (i32, ...)*)(i32 %16)
%19 = icmp eq i32 %16, 1
br i1 %19, label %20, label %22
20: ; preds = %0
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %22
22: ; preds = %20, %0
%23 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %24
24: ; preds = %22, %32
%25 = phi i32 [ 0, %22 ], [ %242, %32 ]
%26 = phi i32 [ 0, %22 ], [ %129, %32 ]
%27 = icmp eq i32 %25, 15
br i1 %27, label %28, label %32
28: ; preds = %24
%29 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
%30 = call i32 (...) @getch()
%31 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 13)
br label %32
32: ; preds = %28, %24
%33 = sext i32 %26 to i64
%34 = or i64 %33, 1
%35 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %33
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %37)
%39 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%40 = or i64 %33, 2
%41 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %34
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %43)
%45 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%46 = or i64 %33, 3
%47 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %40
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %49)
%51 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%52 = or i64 %33, 4
%53 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %46
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %55)
%57 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%58 = or i64 %33, 5
%59 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %52
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %61)
%63 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%64 = or i64 %33, 6
%65 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %58
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %67)
%69 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%70 = or i64 %33, 7
%71 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %64
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %73)
%75 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%76 = or i64 %33, 8
%77 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %70
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %79)
%81 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%82 = or i64 %33, 9
%83 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %76
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %85)
%87 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%88 = or i64 %33, 10
%89 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %82
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %91)
%93 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%94 = or i64 %33, 11
%95 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %88
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %97)
%99 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%100 = or i64 %33, 12
%101 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %94
%102 = load i8, i8* %101
%103 = sext i8 %102 to i32
%104 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %103)
%105 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%106 = or i64 %33, 13
%107 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %100
%108 = load i8, i8* %107
%109 = sext i8 %108 to i32
%110 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %109)
%111 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%112 = or i64 %33, 14
%113 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %106
%114 = load i8, i8* %113
%115 = sext i8 %114 to i32
%116 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %115)
%117 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%118 = or i64 %33, 15
%119 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %112
%120 = load i8, i8* %119
%121 = sext i8 %120 to i32
%122 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %121)
%123 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%124 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %118
%125 = load i8, i8* %124
%126 = sext i8 %125 to i32
%127 = call i32 (i32, ...) bitcast (i32 (...)* @puthex_b to i32 (i32, ...)*)(i32 %126)
%128 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 32)
%129 = add i32 %26, 16
%130 = or i64 %33, 1
%131 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %33
%132 = load i8, i8* %131
%133 = icmp ult i8 %132, 32
%134 = select i1 %133, i8 46, i8 %132
%135 = zext i8 %134 to i32
%136 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %135)
%137 = or i64 %33, 2
%138 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %130
%139 = load i8, i8* %138
%140 = icmp ult i8 %139, 32
%141 = select i1 %140, i8 46, i8 %139
%142 = zext i8 %141 to i32
%143 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %142)
%144 = or i64 %33, 3
%145 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %137
%146 = load i8, i8* %145
%147 = icmp ult i8 %146, 32
%148 = select i1 %147, i8 46, i8 %146
%149 = zext i8 %148 to i32
%150 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %149)
%151 = or i64 %33, 4
%152 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %144
%153 = load i8, i8* %152
%154 = icmp ult i8 %153, 32
%155 = select i1 %154, i8 46, i8 %153
%156 = zext i8 %155 to i32
%157 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %156)
%158 = or i64 %33, 5
%159 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %151
%160 = load i8, i8* %159
%161 = icmp ult i8 %160, 32
%162 = select i1 %161, i8 46, i8 %160
%163 = zext i8 %162 to i32
%164 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %163)
%165 = or i64 %33, 6
%166 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %158
%167 = load i8, i8* %166
%168 = icmp ult i8 %167, 32
%169 = select i1 %168, i8 46, i8 %167
%170 = zext i8 %169 to i32
%171 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %170)
%172 = or i64 %33, 7
%173 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %165
%174 = load i8, i8* %173
%175 = icmp ult i8 %174, 32
%176 = select i1 %175, i8 46, i8 %174
%177 = zext i8 %176 to i32
%178 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %177)
%179 = or i64 %33, 8
%180 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %172
%181 = load i8, i8* %180
%182 = icmp ult i8 %181, 32
%183 = select i1 %182, i8 46, i8 %181
%184 = zext i8 %183 to i32
%185 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %184)
%186 = or i64 %33, 9
%187 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %179
%188 = load i8, i8* %187
%189 = icmp ult i8 %188, 32
%190 = select i1 %189, i8 46, i8 %188
%191 = zext i8 %190 to i32
%192 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %191)
%193 = or i64 %33, 10
%194 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %186
%195 = load i8, i8* %194
%196 = icmp ult i8 %195, 32
%197 = select i1 %196, i8 46, i8 %195
%198 = zext i8 %197 to i32
%199 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %198)
%200 = or i64 %33, 11
%201 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %193
%202 = load i8, i8* %201
%203 = icmp ult i8 %202, 32
%204 = select i1 %203, i8 46, i8 %202
%205 = zext i8 %204 to i32
%206 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %205)
%207 = or i64 %33, 12
%208 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %200
%209 = load i8, i8* %208
%210 = icmp ult i8 %209, 32
%211 = select i1 %210, i8 46, i8 %209
%212 = zext i8 %211 to i32
%213 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %212)
%214 = or i64 %33, 13
%215 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %207
%216 = load i8, i8* %215
%217 = icmp ult i8 %216, 32
%218 = select i1 %217, i8 46, i8 %216
%219 = zext i8 %218 to i32
%220 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %219)
%221 = or i64 %33, 14
%222 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %214
%223 = load i8, i8* %222
%224 = icmp ult i8 %223, 32
%225 = select i1 %224, i8 46, i8 %223
%226 = zext i8 %225 to i32
%227 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %226)
%228 = or i64 %33, 15
%229 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %221
%230 = load i8, i8* %229
%231 = icmp ult i8 %230, 32
%232 = select i1 %231, i8 46, i8 %230
%233 = zext i8 %232 to i32
%234 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %233)
%235 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %228
%236 = load i8, i8* %235
%237 = icmp ult i8 %236, 32
%238 = select i1 %237, i8 46, i8 %236
%239 = zext i8 %238 to i32
%240 = call i32 (i32, ...) bitcast (i32 (...)* @putch to i32 (i32, ...)*)(i32 %239)
%241 = call i32 (i8*, ...) bitcast (i32 (...)* @puts0 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%242 = add nuw nsw i32 %25, 1
%243 = icmp eq i32 %242, 32
br i1 %243, label %244, label %24
244: ; preds = %32
ret void
}