#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 /*<<< orphan*/ scanf(char *, int *, int *, int *, int *, int *, int *,
                         int *, int *, int *, int *, int *, int *);
int main(void) {
  int type;
  int m1, m2, m3, m4, m5;
  int i1, i2, i3, i4, i5;
  int check;
  printf("Enter your UPC: ");
  scanf("%1d%1d%1d%1d%1d%1d%1d%1d%1d%1d%1d%1d", &type, &m1, &m2, &m3, &m4, &m5,
        &i1, &i2, &i3, &i4, &i5, &check);
  printf("%d%d%d%d%d%d%d%d%d%d%d%d\n", type, m1, m2, m3, m4, m5, i1, i2, i3, i4,
         i5, check);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x70,%rsp
movl   $0x0,-0x24(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
lea    -0x30(%rbp),%rcx
lea    -0x34(%rbp),%r8
lea    -0x38(%rbp),%r9
lea    -0x3c(%rbp),%r12
lea    -0x40(%rbp),%r15
lea    -0x44(%rbp),%r14
lea    -0x48(%rbp),%rbx
lea    -0x4c(%rbp),%r11
lea    -0x50(%rbp),%r10
lea    -0x54(%rbp),%rax
mov    %r12,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
call   1040 <scanf@plt>
mov    -0x28(%rbp),%esi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    -0x34(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    -0x3c(%rbp),%r12d
mov    -0x40(%rbp),%r15d
mov    -0x44(%rbp),%r14d
mov    -0x48(%rbp),%ebx
mov    -0x4c(%rbp),%r11d
mov    -0x50(%rbp),%r10d
mov    -0x54(%rbp),%eax
lea    0xe62(%rip),%rdi
mov    %r12d,(%rsp)
mov    %r15d,0x8(%rsp)
mov    %r14d,0x10(%rsp)
mov    %ebx,0x18(%rsp)
mov    %r11d,0x20(%rsp)
mov    %r10d,0x28(%rsp)
mov    %eax,0x30(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x30,%rsp
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
sub    $0x8,%rsp
lea    0x8(%rsp),%rax
lea    0xc(%rsp),%r10
lea    0x10(%rsp),%r11
lea    0x14(%rsp),%rbx
lea    0x18(%rsp),%r14
lea    0x1c(%rsp),%r15
lea    0x20(%rsp),%r12
lea    0xea8(%rip),%rdi
lea    0x34(%rsp),%rsi
lea    0x30(%rsp),%rdx
lea    0x2c(%rsp),%rcx
lea    0x28(%rsp),%r8
lea    0x24(%rsp),%r9
push   %rax
push   %r10
push   %r11
push   %rbx
push   %r14
push   %r15
push   %r12
call   1040 <scanf@plt>
add    $0x40,%rsp
mov    0x2c(%rsp),%esi
mov    0x28(%rsp),%edx
mov    0x24(%rsp),%ecx
mov    0x20(%rsp),%r8d
mov    0x1c(%rsp),%r9d
mov    0x18(%rsp),%r10d
mov    0x14(%rsp),%r11d
mov    0x10(%rsp),%r14d
mov    0xc(%rsp),%r15d
mov    0x8(%rsp),%r12d
mov    0x4(%rsp),%r13d
mov    (%rsp),%ebx
sub    $0x8,%rsp
lea    0xe5d(%rip),%rdi
xor    %eax,%eax
push   %rbx
push   %r13
push   %r12
push   %r15
push   %r14
push   %r11
push   %r10
call   1030 <printf@plt>
add    $0x40,%rsp
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter your UPC: \00"
@.str.1 = [37 x i8] c"%1d%1d%1d%1d%1d%1d%1d%1d%1d%1d%1d%1d\00"
@.str.2 = [26 x i8] c"%d%d%d%d%d%d%d%d%d%d%d%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %1
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32* %12, i32* %13)
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = load i32, i32* %9
%24 = load i32, i32* %10
%25 = load i32, i32* %11
%26 = load i32, i32* %12
%27 = load i32, i32* %13
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %16, i32 %17, i32 %18, i32 %19, i32 %20, i32 %21, i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter your UPC: \00"
@.str.1 = [37 x i8] c"%1d%1d%1d%1d%1d%1d%1d%1d%1d%1d%1d%1d\00"
@.str.2 = [26 x i8] c"%d%d%d%d%d%d%d%d%d%d%d%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = bitcast i32* %1 to i8*
%14 = bitcast i32* %2 to i8*
%15 = bitcast i32* %3 to i8*
%16 = bitcast i32* %4 to i8*
%17 = bitcast i32* %5 to i8*
%18 = bitcast i32* %6 to i8*
%19 = bitcast i32* %7 to i8*
%20 = bitcast i32* %8 to i8*
%21 = bitcast i32* %9 to i8*
%22 = bitcast i32* %10 to i8*
%23 = bitcast i32* %11 to i8*
%24 = bitcast i32* %12 to i8*
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%26 = call i32 @scanf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32* %12)
%27 = load i32, i32* %1
%28 = load i32, i32* %2
%29 = load i32, i32* %3
%30 = load i32, i32* %4
%31 = load i32, i32* %5
%32 = load i32, i32* %6
%33 = load i32, i32* %7
%34 = load i32, i32* %8
%35 = load i32, i32* %9
%36 = load i32, i32* %10
%37 = load i32, i32* %11
%38 = load i32, i32* %12
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %27, i32 %28, i32 %29, i32 %30, i32 %31, i32 %32, i32 %33, i32 %34, i32 %35, i32 %36, i32 %37, i32 %38)
ret i32 0
}