#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 *, ...);
int main(int argc, char *argv[]) {
  int x;
  char c;
  float farn = 70, cel;
  int upper = 120;
  c = 'A';
  printf("c = %d %c \n", c, c);
  printf("Test inline assignment in C\n Help\b");
  if ((x = 5) == 5)
    printf("Inline assigned x=%d\n", x);
  while (farn <= upper) {
    cel = (farn - 32) / 9 * 5;
    printf("celsius %f Fahrenheit %f\n", cel, farn);
    farn += 5;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xed2(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movl   $0x78,-0x24(%rbp)
movb   $0x41,-0x15(%rbp)
movsbl -0x15(%rbp),%esi
movsbl -0x15(%rbp),%edx
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x5,-0x14(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1178 <main+0x68>
jmp    1189 <main+0x79>
mov    -0x14(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118e <main+0x7e>
movss  -0x1c(%rbp),%xmm1
cvtsi2ssl -0x24(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1206 <main+0xf6>
movss  -0x1c(%rbp),%xmm0
movss  0xe5e(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xe4e(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xe3e(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe6d(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  0xe0d(%rip),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    118e <main+0x7e>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf98(%rip),%rdi
mov    $0x41,%esi
mov    $0x41,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf8c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfa1(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfa4(%rip),%rbx
movsd  0xea7(%rip),%xmm0
movsd  0xea7(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe9d(%rip),%xmm0
movsd  0xe9d(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe93(%rip),%xmm0
movsd  0xe93(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe89(%rip),%xmm0
movsd  0xe89(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe7f(%rip),%xmm0
movsd  0xe7f(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe75(%rip),%xmm0
movsd  0xe75(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe6b(%rip),%xmm0
movsd  0xe6b(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe61(%rip),%xmm0
movsd  0xe61(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe57(%rip),%xmm0
movsd  0xe57(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe4d(%rip),%xmm0
movsd  0xe4d(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe43(%rip),%xmm0
movsd  0xe43(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"c = %d %c \0A\00"
@.str.1 = [35 x i8] c"Test inline assignment in C\0A Help\08\00"
@.str.2 = [22 x i8] c"Inline assigned x=%d\0A\00"
@.str.3 = [26 x i8] c"celsius %f Fahrenheit %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8
%8 = alloca float
%9 = alloca float
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 7.000000e+01, float* %8
store i32 120, i32* %10
store i8 65, i8* %7
%11 = load i8, i8* %7
%12 = sext i8 %11 to i32
%13 = load i8, i8* %7
%14 = sext i8 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
store i32 5, i32* %6
br i1 true, label %17, label %20
17: ; preds = %2
%18 = load i32, i32* %6
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %18)
br label %20
20: ; preds = %17, %2
br label %21
21: ; preds = %26, %20
%22 = load float, float* %8
%23 = load i32, i32* %10
%24 = sitofp i32 %23 to float
%25 = fcmp ole float %22, %24
br i1 %25, label %26, label %38
26: ; preds = %21
%27 = load float, float* %8
%28 = fsub float %27, 3.200000e+01
%29 = fdiv float %28, 9.000000e+00
%30 = fmul float %29, 5.000000e+00
store float %30, float* %9
%31 = load float, float* %9
%32 = fpext float %31 to double
%33 = load float, float* %8
%34 = fpext float %33 to double
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double %32, double %34)
%36 = load float, float* %8
%37 = fadd float %36, 5.000000e+00
store float %37, float* %8
br label %21
38: ; preds = %21
%39 = load i32, i32* %3
ret i32 %39
}

LLVM IR (-O2):
@.str = [12 x i8] c"c = %d %c \0A\00"
@.str.1 = [35 x i8] c"Test inline assignment in C\0A Help\08\00"
@.str.2 = [22 x i8] c"Inline assigned x=%d\0A\00"
@.str.3 = [26 x i8] c"celsius %f Fahrenheit %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 65, i32 65)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 5)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double 0x40351C71C0000000, double 7.000000e+01)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double 0x4037E38E40000000, double 7.500000e+01)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double 0x403AAAAAC0000000, double 8.000000e+01)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double 0x403D71C720000000, double 8.500000e+01)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double 0x40401C71C0000000, double 9.000000e+01)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double 3.500000e+01, double 9.500000e+01)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double 0x4042E38E40000000, double 1.000000e+02)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double 0x4044471C60000000, double 1.050000e+02)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double 0x4045AAAAC0000000, double 1.100000e+02)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double 0x40470E38E0000000, double 1.150000e+02)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double 0x404871C720000000, double 1.200000e+02)
ret i32 0
}