int main() {
  char s[1000];
  int w1 = 5;
  int w2 = 12;
  strncpy(s, "123.456", 1000);
  printf("%*s: %*g  string: %s\n", w1, "atof", w2, atof(s), s);
  printf("%*s: %*g  string: %s\n", w1, "a2f", w2, a2f(s), s);
  strncpy(s, "+123.456", 1000);
  printf("%*s: %*g  string: %s\n", w1, "atof", w2, atof(s), s);
  printf("%*s: %*g  string: %s\n", w1, "a2f", w2, a2f(s), s);
  strncpy(s, "-123.456", 1000);
  printf("%*s: %*g  string: %s\n", w1, "atof", w2, atof(s), s);
  printf("%*s: %*g  string: %s\n", w1, "a2f", w2, a2f(s), s);
  strncpy(s, "+123e-4", 1000);
  printf("%*s: %*g  string: %s\n", w1, "atof", w2, atof(s), s);
  printf("%*s: %*g  string: %s\n", w1, "a2f", w2, a2f(s), s);
  strncpy(s, "+13.0e4", 1000);
  printf("%*s: %*g  string: %s\n", w1, "atof", w2, atof(s), s);
  printf("%*s: %*g  string: %s\n", w1, "a2f", w2, a2f(s), s);
  strncpy(s, "-23.00001E+5", 1000);
  printf("%*s: %*g  string: %s\n", w1, "atof", w2, atof(s), s);
  printf("%*s: %*g  string: %s\n", w1, "a2f", w2, a2f(s), s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x460,%rsp
movl   $0x5,-0x3f4(%rbp)
movl   $0xc,-0x3f8(%rbp)
lea    -0x3f0(%rbp),%rdi
lea    0xeb3(%rip),%rsi
mov    $0x3e8,%edx
call   1030 <strncpy@plt>
mov    -0x3f4(%rbp),%eax
mov    %eax,-0x458(%rbp)
mov    -0x3f8(%rbp),%eax
mov    %eax,-0x454(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x0,%al
call   1040 <atof@plt>
mov    -0x458(%rbp),%esi
mov    -0x454(%rbp),%ecx
mov    %eax,%r8d
lea    -0x3f0(%rbp),%r9
lea    0xe46(%rip),%rdi
lea    0xe55(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x3f4(%rbp),%eax
mov    %eax,-0x450(%rbp)
mov    -0x3f8(%rbp),%eax
mov    %eax,-0x44c(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x0,%al
call   1060 <a2f@plt>
mov    -0x450(%rbp),%esi
mov    -0x44c(%rbp),%ecx
mov    %eax,%r8d
lea    -0x3f0(%rbp),%r9
lea    0xdf5(%rip),%rdi
lea    0xe09(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x3f0(%rbp),%rdi
lea    0xdf8(%rip),%rsi
mov    $0x3e8,%edx
call   1030 <strncpy@plt>
mov    -0x3f4(%rbp),%eax
mov    %eax,-0x448(%rbp)
mov    -0x3f8(%rbp),%eax
mov    %eax,-0x444(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x0,%al
call   1040 <atof@plt>
mov    -0x448(%rbp),%esi
mov    -0x444(%rbp),%ecx
mov    %eax,%r8d
lea    -0x3f0(%rbp),%r9
lea    0xd8c(%rip),%rdi
lea    0xd9b(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x3f4(%rbp),%eax
mov    %eax,-0x440(%rbp)
mov    -0x3f8(%rbp),%eax
mov    %eax,-0x43c(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x0,%al
call   1060 <a2f@plt>
mov    -0x440(%rbp),%esi
mov    -0x43c(%rbp),%ecx
mov    %eax,%r8d
lea    -0x3f0(%rbp),%r9
lea    0xd3b(%rip),%rdi
lea    0xd4f(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x3f0(%rbp),%rdi
lea    0xd47(%rip),%rsi
mov    $0x3e8,%edx
call   1030 <strncpy@plt>
mov    -0x3f4(%rbp),%eax
mov    %eax,-0x438(%rbp)
mov    -0x3f8(%rbp),%eax
mov    %eax,-0x434(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x0,%al
call   1040 <atof@plt>
mov    -0x438(%rbp),%esi
mov    -0x434(%rbp),%ecx
mov    %eax,%r8d
lea    -0x3f0(%rbp),%r9
lea    0xcd2(%rip),%rdi
lea    0xce1(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x3f4(%rbp),%eax
mov    %eax,-0x430(%rbp)
mov    -0x3f8(%rbp),%eax
mov    %eax,-0x42c(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x0,%al
call   1060 <a2f@plt>
mov    -0x430(%rbp),%esi
mov    -0x42c(%rbp),%ecx
mov    %eax,%r8d
lea    -0x3f0(%rbp),%r9
lea    0xc81(%rip),%rdi
lea    0xc95(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x3f0(%rbp),%rdi
lea    0xc96(%rip),%rsi
mov    $0x3e8,%edx
call   1030 <strncpy@plt>
mov    -0x3f4(%rbp),%eax
mov    %eax,-0x428(%rbp)
mov    -0x3f8(%rbp),%eax
mov    %eax,-0x424(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x0,%al
call   1040 <atof@plt>
mov    -0x428(%rbp),%esi
mov    -0x424(%rbp),%ecx
mov    %eax,%r8d
lea    -0x3f0(%rbp),%r9
lea    0xc18(%rip),%rdi
lea    0xc27(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x3f4(%rbp),%eax
mov    %eax,-0x420(%rbp)
mov    -0x3f8(%rbp),%eax
mov    %eax,-0x41c(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x0,%al
call   1060 <a2f@plt>
mov    -0x420(%rbp),%esi
mov    -0x41c(%rbp),%ecx
mov    %eax,%r8d
lea    -0x3f0(%rbp),%r9
lea    0xbc7(%rip),%rdi
lea    0xbdb(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x3f0(%rbp),%rdi
lea    0xbe4(%rip),%rsi
mov    $0x3e8,%edx
call   1030 <strncpy@plt>
mov    -0x3f4(%rbp),%eax
mov    %eax,-0x418(%rbp)
mov    -0x3f8(%rbp),%eax
mov    %eax,-0x414(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x0,%al
call   1040 <atof@plt>
mov    -0x418(%rbp),%esi
mov    -0x414(%rbp),%ecx
mov    %eax,%r8d
lea    -0x3f0(%rbp),%r9
lea    0xb5e(%rip),%rdi
lea    0xb6d(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x3f4(%rbp),%eax
mov    %eax,-0x410(%rbp)
mov    -0x3f8(%rbp),%eax
mov    %eax,-0x40c(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x0,%al
call   1060 <a2f@plt>
mov    -0x410(%rbp),%esi
mov    -0x40c(%rbp),%ecx
mov    %eax,%r8d
lea    -0x3f0(%rbp),%r9
lea    0xb0d(%rip),%rdi
lea    0xb21(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x3f0(%rbp),%rdi
lea    0xb32(%rip),%rsi
mov    $0x3e8,%edx
call   1030 <strncpy@plt>
mov    -0x3f4(%rbp),%eax
mov    %eax,-0x408(%rbp)
mov    -0x3f8(%rbp),%eax
mov    %eax,-0x404(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x0,%al
call   1040 <atof@plt>
mov    -0x408(%rbp),%esi
mov    -0x404(%rbp),%ecx
mov    %eax,%r8d
lea    -0x3f0(%rbp),%r9
lea    0xaa4(%rip),%rdi
lea    0xab3(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x3f4(%rbp),%eax
mov    %eax,-0x400(%rbp)
mov    -0x3f8(%rbp),%eax
mov    %eax,-0x3fc(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x0,%al
call   1060 <a2f@plt>
mov    -0x400(%rbp),%esi
mov    -0x3fc(%rbp),%ecx
mov    %eax,%r8d
lea    -0x3f0(%rbp),%r9
lea    0xa53(%rip),%rdi
lea    0xa67(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x460,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x3e8,%rsp
lea    0xecb(%rip),%rsi
mov    %rsp,%rbx
mov    $0x3e8,%edx
mov    %rbx,%rdi
call   1030 <strncpy@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <atof@plt>
lea    0xe8a(%rip),%r14
lea    0xe99(%rip),%r15
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r15,%rdx
mov    $0xc,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <a2f@plt>
lea    0xe70(%rip),%r12
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r12,%rdx
mov    $0xc,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe50(%rip),%rsi
mov    $0x3e8,%edx
mov    %rbx,%rdi
call   1030 <strncpy@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <atof@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r15,%rdx
mov    $0xc,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <a2f@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r12,%rdx
mov    $0xc,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdf7(%rip),%rsi
mov    $0x3e8,%edx
mov    %rbx,%rdi
call   1030 <strncpy@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <atof@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r15,%rdx
mov    $0xc,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <a2f@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r12,%rdx
mov    $0xc,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd9e(%rip),%rsi
mov    $0x3e8,%edx
mov    %rbx,%rdi
call   1030 <strncpy@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <atof@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r15,%rdx
mov    $0xc,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <a2f@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r12,%rdx
mov    $0xc,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd44(%rip),%rsi
mov    $0x3e8,%edx
mov    %rbx,%rdi
call   1030 <strncpy@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <atof@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r15,%rdx
mov    $0xc,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <a2f@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r12,%rdx
mov    $0xc,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcea(%rip),%rsi
mov    $0x3e8,%edx
mov    %rbx,%rdi
call   1030 <strncpy@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <atof@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r15,%rdx
mov    $0xc,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <a2f@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    %r12,%rdx
mov    $0xc,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"123.456\00"
@.str.1 = [22 x i8] c"%*s: %*g string: %s\0A\00"
@.str.2 = [5 x i8] c"atof\00"
@.str.3 = [4 x i8] c"a2f\00"
@.str.4 = [9 x i8] c"+123.456\00"
@.str.5 = [9 x i8] c"-123.456\00"
@.str.6 = [8 x i8] c"+123e-4\00"
@.str.7 = [8 x i8] c"+13.0e4\00"
@.str.8 = [13 x i8] c"-23.00001E+5\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca i32
%3 = alloca i32
store i32 5, i32* %2
store i32 12, i32* %3
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%5 = call i8* @strncpy(i8* %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 1000)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %8)
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %9, i8* %10)
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%15 = call i32 (i8*, ...) bitcast (i32 (...)* @a2f to i32 (i8*, ...)*)(i8* %14)
%16 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %13, i32 %15, i8* %16)
%18 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%19 = call i8* @strncpy(i8* %18, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i64 1000)
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%23 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %22)
%24 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %20, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %21, i32 %23, i8* %24)
%26 = load i32, i32* %2
%27 = load i32, i32* %3
%28 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%29 = call i32 (i8*, ...) bitcast (i32 (...)* @a2f to i32 (i8*, ...)*)(i8* %28)
%30 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %27, i32 %29, i8* %30)
%32 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%33 = call i8* @strncpy(i8* %32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i64 1000)
%34 = load i32, i32* %2
%35 = load i32, i32* %3
%36 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%37 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %36)
%38 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %35, i32 %37, i8* %38)
%40 = load i32, i32* %2
%41 = load i32, i32* %3
%42 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%43 = call i32 (i8*, ...) bitcast (i32 (...)* @a2f to i32 (i8*, ...)*)(i8* %42)
%44 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %40, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %41, i32 %43, i8* %44)
%46 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%47 = call i8* @strncpy(i8* %46, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i64 1000)
%48 = load i32, i32* %2
%49 = load i32, i32* %3
%50 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%51 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %50)
%52 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %48, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %49, i32 %51, i8* %52)
%54 = load i32, i32* %2
%55 = load i32, i32* %3
%56 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%57 = call i32 (i8*, ...) bitcast (i32 (...)* @a2f to i32 (i8*, ...)*)(i8* %56)
%58 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %54, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %55, i32 %57, i8* %58)
%60 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%61 = call i8* @strncpy(i8* %60, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i64 1000)
%62 = load i32, i32* %2
%63 = load i32, i32* %3
%64 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%65 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %64)
%66 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %62, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %63, i32 %65, i8* %66)
%68 = load i32, i32* %2
%69 = load i32, i32* %3
%70 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%71 = call i32 (i8*, ...) bitcast (i32 (...)* @a2f to i32 (i8*, ...)*)(i8* %70)
%72 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %68, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %69, i32 %71, i8* %72)
%74 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%75 = call i8* @strncpy(i8* %74, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i64 1000)
%76 = load i32, i32* %2
%77 = load i32, i32* %3
%78 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%79 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %78)
%80 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %76, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %77, i32 %79, i8* %80)
%82 = load i32, i32* %2
%83 = load i32, i32* %3
%84 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%85 = call i32 (i8*, ...) bitcast (i32 (...)* @a2f to i32 (i8*, ...)*)(i8* %84)
%86 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %82, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %83, i32 %85, i8* %86)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"123.456\00"
@.str.1 = [22 x i8] c"%*s: %*g string: %s\0A\00"
@.str.2 = [5 x i8] c"atof\00"
@.str.3 = [4 x i8] c"a2f\00"
@.str.4 = [9 x i8] c"+123.456\00"
@.str.5 = [9 x i8] c"-123.456\00"
@.str.6 = [8 x i8] c"+123e-4\00"
@.str.7 = [8 x i8] c"+13.0e4\00"
@.str.8 = [13 x i8] c"-23.00001E+5\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i8* @strncpy(i8* %2, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 1000)
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 12, i32 %4, i8* %2)
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @a2f to i32 (i8*, ...)*)(i8* %2)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 12, i32 %6, i8* %2)
%8 = call i8* @strncpy(i8* %2, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i64 1000)
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %2)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 12, i32 %9, i8* %2)
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @a2f to i32 (i8*, ...)*)(i8* %2)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 12, i32 %11, i8* %2)
%13 = call i8* @strncpy(i8* %2, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i64 1000)
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %2)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 12, i32 %14, i8* %2)
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @a2f to i32 (i8*, ...)*)(i8* %2)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 12, i32 %16, i8* %2)
%18 = call i8* @strncpy(i8* %2, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i64 1000)
%19 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %2)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 12, i32 %19, i8* %2)
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @a2f to i32 (i8*, ...)*)(i8* %2)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 12, i32 %21, i8* %2)
%23 = call i8* @strncpy(i8* %2, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i64 1000)
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %2)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 12, i32 %24, i8* %2)
%26 = call i32 (i8*, ...) bitcast (i32 (...)* @a2f to i32 (i8*, ...)*)(i8* %2)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 12, i32 %26, i8* %2)
%28 = call i8* @strncpy(i8* %2, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i64 1000)
%29 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %2)
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 12, i32 %29, i8* %2)
%31 = call i32 (i8*, ...) bitcast (i32 (...)* @a2f to i32 (i8*, ...)*)(i8* %2)
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 12, i32 %31, i8* %2)
ret i32 0
}