#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*/ print_field(char const *, char *, int, int);
int /*<<< orphan*/ printf(char *);
void do_purchasing_card(const char *line) {
  printf("Purchasing Card Line\n\n");
  print_field(line, "F6", 5, 12);
  print_field(line, "F8", 30, 12);
  print_field(line, "F9", 42, 8);
  print_field(line, "F10", 50, 12);
  print_field(line, "F11", 62, 12);
  print_field(line, "f15", 97, 4);
  print_field(line, "F17", 102, 20);
  print_field(line, "F19", 134, 15);
  print_field(line, "F22", 184, 12);
  printf("\n");
}


x86 assembly (clang, -O0):
<do_purchasing_card>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed4(%rip),%rsi
mov    $0x5,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x1e,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xea6(%rip),%rsi
mov    $0x2a,%edx
mov    $0x8,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe8f(%rip),%rsi
mov    $0x32,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe79(%rip),%rsi
mov    $0x3e,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe63(%rip),%rsi
mov    $0x61,%edx
mov    $0x4,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe4d(%rip),%rsi
mov    $0x66,%edx
mov    $0x14,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe37(%rip),%rsi
mov    $0x86,%edx
mov    $0xf,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe21(%rip),%rsi
mov    $0xb8,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
lea    0xdec(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_purchasing_card>:
push   %rbx
mov    %rdi,%rbx
lea    0xee6(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
mov    $0x1e,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
lea    0xe8d(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2a,%edx
mov    $0x8,%ecx
call   1050 <print_field@plt>
lea    0xe77(%rip),%rsi
mov    %rbx,%rdi
mov    $0x32,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
lea    0xe62(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3e,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
lea    0xe4d(%rip),%rsi
mov    %rbx,%rdi
mov    $0x61,%edx
mov    $0x4,%ecx
call   1050 <print_field@plt>
lea    0xe38(%rip),%rsi
mov    %rbx,%rdi
mov    $0x66,%edx
mov    $0x14,%ecx
call   1050 <print_field@plt>
lea    0xe23(%rip),%rsi
mov    %rbx,%rdi
mov    $0x86,%edx
mov    $0xf,%ecx
call   1050 <print_field@plt>
lea    0xe0e(%rip),%rsi
mov    %rbx,%rdi
mov    $0xb8,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Purchasing Card Line\0A\0A\00"
@.str.1 = [3 x i8] c"F6\00"
@.str.2 = [3 x i8] c"F8\00"
@.str.3 = [3 x i8] c"F9\00"
@.str.4 = [4 x i8] c"F10\00"
@.str.5 = [4 x i8] c"F11\00"
@.str.6 = [4 x i8] c"f15\00"
@.str.7 = [4 x i8] c"F17\00"
@.str.8 = [4 x i8] c"F19\00"
@.str.9 = [4 x i8] c"F22\00"
@.str.10 = [2 x i8] c"\0A\00"
define void @do_purchasing_card(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @print_field(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 12)
%6 = load i8*, i8** %2
%7 = call i32 @print_field(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 30, i32 12)
%8 = load i8*, i8** %2
%9 = call i32 @print_field(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 42, i32 8)
%10 = load i8*, i8** %2
%11 = call i32 @print_field(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 50, i32 12)
%12 = load i8*, i8** %2
%13 = call i32 @print_field(i8* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 62, i32 12)
%14 = load i8*, i8** %2
%15 = call i32 @print_field(i8* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 97, i32 4)
%16 = load i8*, i8** %2
%17 = call i32 @print_field(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 102, i32 20)
%18 = load i8*, i8** %2
%19 = call i32 @print_field(i8* %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 134, i32 15)
%20 = load i8*, i8** %2
%21 = call i32 @print_field(i8* %20, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 184, i32 12)
%22 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"F6\00"
@.str.2 = [3 x i8] c"F8\00"
@.str.3 = [3 x i8] c"F9\00"
@.str.4 = [4 x i8] c"F10\00"
@.str.5 = [4 x i8] c"F11\00"
@.str.6 = [4 x i8] c"f15\00"
@.str.7 = [4 x i8] c"F17\00"
@.str.8 = [4 x i8] c"F19\00"
@.str.9 = [4 x i8] c"F22\00"
@str = [22 x i8] c"Purchasing Card Line\0A\00"
define void @do_purchasing_card(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 12)
%4 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 30, i32 12)
%5 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 42, i32 8)
%6 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 50, i32 12)
%7 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 62, i32 12)
%8 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 97, i32 4)
%9 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 102, i32 20)
%10 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 134, i32 15)
%11 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 184, i32 12)
%12 = tail call i32 @putchar(i32 10)
ret void
}