#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*/ exit(int);
int /*<<< orphan*/ read_field();
int /*<<< orphan*/ sscanf(char *, char *, double *);
int /*<<< orphan*/ tilt(double, double);
int /*<<< orphan*/ write_field();
void main(int argc, char *argv[]) {
  void error_print();
  double tx, ty;
  if (argc != 3) {
    error_print(argv[0]);
    exit(1);
  }
  sscanf(argv[1], "%le", &ty);
  sscanf(argv[2], "%le", &tx);
  read_field();
  tilt(tx, ty);
  write_field();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x4(%rbp)
je     1191 <main+0x31>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1060 <error_print@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe60(%rip),%rsi
lea    -0x20(%rbp),%rdx
call   1050 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe48(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <sscanf@plt>
mov    $0x0,%al
call   1030 <read_field@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1040 <tilt@plt>
mov    $0x0,%al
call   1080 <write_field@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
cmp    $0x3,%edi
jne    11bf <main+0x5f>
mov    0x8(%rbx),%rdi
lea    0xe86(%rip),%r14
lea    0x8(%rsp),%rdx
mov    %r14,%rsi
call   1050 <sscanf@plt>
mov    0x10(%rbx),%rdi
lea    0x10(%rsp),%rdx
mov    %r14,%rsi
call   1050 <sscanf@plt>
xor    %eax,%eax
call   1030 <read_field@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <tilt@plt>
xor    %eax,%eax
call   1080 <write_field@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret
mov    (%rbx),%rdi
xor    %eax,%eax
call   1060 <error_print@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%le\00"
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca double
%6 = alloca double
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 3
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %2
%15 = load i8**, i8*** %4
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @sscanf(i8* %17, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %6)
%19 = load i8**, i8*** %4
%20 = getelementptr inbounds i8*, i8** %19, i64 2
%21 = load i8*, i8** %20
%22 = call i32 @sscanf(i8* %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %5)
%23 = call i32 (...) @read_field()
%24 = load double, double* %5
%25 = load double, double* %6
%26 = call i32 @tilt(double %24, double %25)
%27 = call i32 (...) @write_field()
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%le\00"
define void @main(i32 %0, i8** nocapture %1) {
%3 = alloca double
%4 = alloca double
%5 = bitcast double* %3 to i8*
%6 = bitcast double* %4 to i8*
%7 = icmp eq i32 %0, 3
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i8*, i8** %1
tail call void (i8*, ...) bitcast (void (...)* @error_print to void (i8*, ...)*)(i8* %9)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @sscanf(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %4)
%15 = getelementptr inbounds i8*, i8** %1, i64 2
%16 = load i8*, i8** %15
%17 = call i32 @sscanf(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%18 = call i32 (...) @read_field()
%19 = load double, double* %3
%20 = load double, double* %4
%21 = call i32 @tilt(double %19, double %20)
%22 = call i32 (...) @write_field()
ret void
}