#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, float, float);
int /*<<< orphan*/ sscanf(char *, char *, float *, float *);
int main(int argc, char **argv) {
  char *range = "0.13/.39";
  char *plot = ".3(.05).5";
  float rlow, rhi, plow, pinc, phi;
  sscanf(range, "%f/%f", &rlow, &rhi);
  printf("For %s, got rlow = %f, rhi = %f\n", range, rlow, rhi);
  range = "-.5/+5";
  sscanf(range, "-%f/+%f", &rlow, &rhi);
  printf("For %s, got rlow = %f, rhi = %f\n", range, rlow, rhi);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xec1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xebc(%rip),%rsi
lea    -0x24(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1040 <sscanf@plt>
mov    -0x18(%rbp),%rsi
movss  -0x24(%rbp),%xmm0
movss  -0x28(%rbp),%xmm1
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb5(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xead(%rip),%rsi
lea    -0x24(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1040 <sscanf@plt>
mov    -0x18(%rbp),%rsi
movss  -0x24(%rbp),%xmm0
movss  -0x28(%rbp),%xmm1
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%rbx
lea    0xed3(%rip),%rsi
lea    0x4(%rsp),%r14
mov    %rsp,%r15
mov    %rbx,%rdi
mov    %r14,%rdx
mov    %r15,%rcx
call   1040 <sscanf@plt>
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm1
lea    0xeb1(%rip),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xec0(%rip),%rbx
lea    0xec0(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
mov    %r15,%rcx
call   1040 <sscanf@plt>
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm1
mov    %r12,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"0.13/.39\00"
@.str.1 = [10 x i8] c".3(.05).5\00"
@.str.2 = [6 x i8] c"%f/%f\00"
@.str.3 = [33 x i8] c"For %s, got rlow = %f, rhi = %f\0A\00"
@.str.4 = [7 x i8] c"-.5/+5\00"
@.str.5 = [8 x i8] c"-%f/+%f\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %7
%13 = load i8*, i8** %6
%14 = call i32 @sscanf(i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), float* %8, float* %9)
%15 = load i8*, i8** %6
%16 = load float, float* %8
%17 = load float, float* %9
%18 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8* %15, float %16, float %17)
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8** %6
%19 = load i8*, i8** %6
%20 = call i32 @sscanf(i8* %19, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), float* %8, float* %9)
%21 = load i8*, i8** %6
%22 = load float, float* %8
%23 = load float, float* %9
%24 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8* %21, float %22, float %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"0.13/.39\00"
@.str.2 = [6 x i8] c"%f/%f\00"
@.str.3 = [33 x i8] c"For %s, got rlow = %f, rhi = %f\0A\00"
@.str.4 = [7 x i8] c"-.5/+5\00"
@.str.5 = [8 x i8] c"-%f/+%f\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %3 to i8*
%6 = bitcast float* %4 to i8*
%7 = call i32 @sscanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), float* %3, float* %4)
%8 = load float, float* %3
%9 = load float, float* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %8, float %9)
%11 = call i32 @sscanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), float* %3, float* %4)
%12 = load float, float* %3
%13 = load float, float* %4
%14 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), float %12, float %13)
ret i32 0
}