#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*/ fprintf(int /*<<< orphan*/, char *, char, char);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main() {
  int x;
  int y;
  char c1, c2;
  fscanf(stdin, "%d%d", &x, &y);
  fprintf(stdout, "x=%d,y=%d\n", x, y);
  fscanf(stdin, "%c%c", &c1, &c2);
  fprintf(stdout, "c1=%c,c2=%c\n", c1, c2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
mov    $0x0,%al
call   1030 <fscanf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%eax
mov    %al,%cl
mov    -0xc(%rbp),%eax
lea    0xe9f(%rip),%rsi
movsbl %cl,%edx
movsbl %al,%ecx
call   1040 <fprintf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
lea    0xe8f(%rip),%rsi
lea    -0xd(%rbp),%rdx
lea    -0xe(%rbp),%rcx
mov    $0x0,%al
call   1030 <fscanf@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%edi
mov    -0xd(%rbp),%al
lea    0xe72(%rip),%rsi
movsbl %al,%edx
movsbl -0xe(%rbp),%ecx
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    0x2eba(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
xor    %eax,%eax
call   1030 <fscanf@plt>
mov    0x2e88(%rip),%rbx
mov    (%rbx),%edi
movsbl 0x14(%rsp),%edx
movsbl 0x10(%rsp),%ecx
lea    0xea2(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%r14),%edi
lea    0xe9e(%rip),%rsi
lea    0xf(%rsp),%rdx
lea    0xe(%rsp),%rcx
xor    %eax,%eax
call   1030 <fscanf@plt>
mov    (%rbx),%edi
movsbl 0xf(%rsp),%edx
movsbl 0xe(%rsp),%ecx
lea    0xe7f(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [5 x i8] c"%d%d\00"
@stdout = global i32 0
@.str.1 = [11 x i8] c"x=%d,y=%d\0A\00"
@.str.2 = [5 x i8] c"%c%c\00"
@.str.3 = [13 x i8] c"c1=%c,c2=%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
store i32 0, i32* %1
%6 = load i32, i32* @stdin
%7 = call i32 (i32, i8*, ...) @fscanf(i32 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%8 = load i32, i32* @stdout
%9 = load i32, i32* %2
%10 = trunc i32 %9 to i8
%11 = load i32, i32* %3
%12 = trunc i32 %11 to i8
%13 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8 signext %10, i8 signext %12)
%14 = load i32, i32* @stdin
%15 = call i32 (i32, i8*, ...) @fscanf(i32 %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %4, i8* %5)
%16 = load i32, i32* @stdout
%17 = load i8, i8* %4
%18 = load i8, i8* %5
%19 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8 signext %17, i8 signext %18)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [5 x i8] c"%d%d\00"
@stdout = global i32 0
@.str.1 = [11 x i8] c"x=%d,y=%d\0A\00"
@.str.2 = [5 x i8] c"%c%c\00"
@.str.3 = [13 x i8] c"c1=%c,c2=%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = load i32, i32* @stdin
%8 = call i32 (i32, i8*, ...) @fscanf(i32 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%9 = load i32, i32* @stdout
%10 = load i32, i32* %1
%11 = trunc i32 %10 to i8
%12 = load i32, i32* %2
%13 = trunc i32 %12 to i8
%14 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8 signext %11, i8 signext %13)
%15 = load i32, i32* @stdin
%16 = call i32 (i32, i8*, ...) @fscanf(i32 %15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %3, i8* %4)
%17 = load i32, i32* @stdout
%18 = load i8, i8* %3
%19 = load i8, i8* %4
%20 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8 signext %18, i8 signext %19)
ret i32 0
}