#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 */
struct floppy_struct {
  void *fmt_gap;
  void *spec1;
  void *rate;
  void *gap;
  void *stretch;
  void *track;
  void *head;
  void *sect;
  void *size;
};

/* Variables and functions */
void *convert(char *, int *);
int set_params(char **params, struct floppy_struct *ft) {
  int error;
  error = 0;
  ft->size = convert(params[0], &error);
  ft->sect = convert(params[1], &error);
  ft->head = convert(params[2], &error);
  ft->track = convert(params[3], &error);
  ft->stretch = convert(params[4], &error);
  ft->gap = convert(params[5], &error);
  ft->rate = convert(params[6], &error);
  ft->spec1 = convert(params[7], &error);
  ft->fmt_gap = convert(params[8], &error);
  return error;
}


x86 assembly (clang, -O0):
<set_params>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <convert@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x40(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <convert@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x38(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <convert@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x30(%rax)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <convert@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x28(%rax)
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <convert@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x20(%rax)
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <convert@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x18(%rax)
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <convert@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <convert@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <convert@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_params>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movl   $0x0,0xc(%rsp)
mov    (%rdi),%rdi
lea    0xc(%rsp),%r15
mov    %r15,%rsi
call   1030 <convert@plt>
mov    %rax,0x40(%r14)
mov    0x8(%rbx),%rdi
mov    %r15,%rsi
call   1030 <convert@plt>
mov    %rax,0x38(%r14)
mov    0x10(%rbx),%rdi
mov    %r15,%rsi
call   1030 <convert@plt>
mov    %rax,0x30(%r14)
mov    0x18(%rbx),%rdi
mov    %r15,%rsi
call   1030 <convert@plt>
mov    %rax,0x28(%r14)
mov    0x20(%rbx),%rdi
mov    %r15,%rsi
call   1030 <convert@plt>
mov    %rax,0x20(%r14)
mov    0x28(%rbx),%rdi
mov    %r15,%rsi
call   1030 <convert@plt>
mov    %rax,0x18(%r14)
mov    0x30(%rbx),%rdi
mov    %r15,%rsi
call   1030 <convert@plt>
mov    %rax,0x10(%r14)
mov    0x38(%rbx),%rdi
mov    %r15,%rsi
call   1030 <convert@plt>
mov    %rax,0x8(%r14)
mov    0x40(%rbx),%rdi
mov    %r15,%rsi
call   1030 <convert@plt>
mov    %rax,(%r14)
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.floppy_struct = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
define i32 @set_params(i8** %0, %struct.floppy_struct* %1) {
%3 = alloca i8**
%4 = alloca %struct.floppy_struct*
%5 = alloca i32
store i8** %0, i8*** %3
store %struct.floppy_struct* %1, %struct.floppy_struct** %4
store i32 0, i32* %5
%6 = load i8**, i8*** %3
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i8* @convert(i8* %8, i32* %5)
%10 = load %struct.floppy_struct*, %struct.floppy_struct** %4
%11 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %10, i32 0, i32 8
store i8* %9, i8** %11
%12 = load i8**, i8*** %3
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i8* @convert(i8* %14, i32* %5)
%16 = load %struct.floppy_struct*, %struct.floppy_struct** %4
%17 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %16, i32 0, i32 7
store i8* %15, i8** %17
%18 = load i8**, i8*** %3
%19 = getelementptr inbounds i8*, i8** %18, i64 2
%20 = load i8*, i8** %19
%21 = call i8* @convert(i8* %20, i32* %5)
%22 = load %struct.floppy_struct*, %struct.floppy_struct** %4
%23 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %22, i32 0, i32 6
store i8* %21, i8** %23
%24 = load i8**, i8*** %3
%25 = getelementptr inbounds i8*, i8** %24, i64 3
%26 = load i8*, i8** %25
%27 = call i8* @convert(i8* %26, i32* %5)
%28 = load %struct.floppy_struct*, %struct.floppy_struct** %4
%29 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %28, i32 0, i32 5
store i8* %27, i8** %29
%30 = load i8**, i8*** %3
%31 = getelementptr inbounds i8*, i8** %30, i64 4
%32 = load i8*, i8** %31
%33 = call i8* @convert(i8* %32, i32* %5)
%34 = load %struct.floppy_struct*, %struct.floppy_struct** %4
%35 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %34, i32 0, i32 4
store i8* %33, i8** %35
%36 = load i8**, i8*** %3
%37 = getelementptr inbounds i8*, i8** %36, i64 5
%38 = load i8*, i8** %37
%39 = call i8* @convert(i8* %38, i32* %5)
%40 = load %struct.floppy_struct*, %struct.floppy_struct** %4
%41 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %40, i32 0, i32 3
store i8* %39, i8** %41
%42 = load i8**, i8*** %3
%43 = getelementptr inbounds i8*, i8** %42, i64 6
%44 = load i8*, i8** %43
%45 = call i8* @convert(i8* %44, i32* %5)
%46 = load %struct.floppy_struct*, %struct.floppy_struct** %4
%47 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %46, i32 0, i32 2
store i8* %45, i8** %47
%48 = load i8**, i8*** %3
%49 = getelementptr inbounds i8*, i8** %48, i64 7
%50 = load i8*, i8** %49
%51 = call i8* @convert(i8* %50, i32* %5)
%52 = load %struct.floppy_struct*, %struct.floppy_struct** %4
%53 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %52, i32 0, i32 1
store i8* %51, i8** %53
%54 = load i8**, i8*** %3
%55 = getelementptr inbounds i8*, i8** %54, i64 8
%56 = load i8*, i8** %55
%57 = call i8* @convert(i8* %56, i32* %5)
%58 = load %struct.floppy_struct*, %struct.floppy_struct** %4
%59 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %58, i32 0, i32 0
store i8* %57, i8** %59
%60 = load i32, i32* %5
ret i32 %60
}

LLVM IR (-O2):
%struct.floppy_struct = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
define i32 @set_params(i8** nocapture %0, %struct.floppy_struct* nocapture writeonly %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = load i8*, i8** %0
%6 = call i8* @convert(i8* %5, i32* %3)
%7 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %1, i64 0, i32 8
store i8* %6, i8** %7
%8 = getelementptr inbounds i8*, i8** %0, i64 1
%9 = load i8*, i8** %8
%10 = call i8* @convert(i8* %9, i32* %3)
%11 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %1, i64 0, i32 7
store i8* %10, i8** %11
%12 = getelementptr inbounds i8*, i8** %0, i64 2
%13 = load i8*, i8** %12
%14 = call i8* @convert(i8* %13, i32* %3)
%15 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %1, i64 0, i32 6
store i8* %14, i8** %15
%16 = getelementptr inbounds i8*, i8** %0, i64 3
%17 = load i8*, i8** %16
%18 = call i8* @convert(i8* %17, i32* %3)
%19 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %1, i64 0, i32 5
store i8* %18, i8** %19
%20 = getelementptr inbounds i8*, i8** %0, i64 4
%21 = load i8*, i8** %20
%22 = call i8* @convert(i8* %21, i32* %3)
%23 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %1, i64 0, i32 4
store i8* %22, i8** %23
%24 = getelementptr inbounds i8*, i8** %0, i64 5
%25 = load i8*, i8** %24
%26 = call i8* @convert(i8* %25, i32* %3)
%27 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %1, i64 0, i32 3
store i8* %26, i8** %27
%28 = getelementptr inbounds i8*, i8** %0, i64 6
%29 = load i8*, i8** %28
%30 = call i8* @convert(i8* %29, i32* %3)
%31 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %1, i64 0, i32 2
store i8* %30, i8** %31
%32 = getelementptr inbounds i8*, i8** %0, i64 7
%33 = load i8*, i8** %32
%34 = call i8* @convert(i8* %33, i32* %3)
%35 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %1, i64 0, i32 1
store i8* %34, i8** %35
%36 = getelementptr inbounds i8*, i8** %0, i64 8
%37 = load i8*, i8** %36
%38 = call i8* @convert(i8* %37, i32* %3)
%39 = getelementptr inbounds %struct.floppy_struct, %struct.floppy_struct* %1, i64 0, i32 0
store i8* %38, i8** %39
%40 = load i32, i32* %3
ret i32 %40
}